Fix regression after renaming field fk_soc
This commit is contained in:
parent
4f4ebfaed3
commit
90f78429ec
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
|
/* Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
|
||||||
* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2006-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
@ -229,11 +229,13 @@ if ($user->rights->categorie->creer)
|
|||||||
|
|
||||||
print_fiche_titre($langs->trans("CreateCat"));
|
print_fiche_titre($langs->trans("CreateCat"));
|
||||||
|
|
||||||
|
dol_fiche_head('');
|
||||||
|
|
||||||
print '<table width="100%" class="border">';
|
print '<table width="100%" class="border">';
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td width="25%" class="fieldrequired">'.$langs->trans("Ref").'</td><td><input id="label" class="flat" name="label" size="25" value="'.$label.'">';
|
print '<td width="20%" class="fieldrequired">'.$langs->trans("Ref").'</td><td><input id="label" class="flat" name="label" size="25" value="'.$label.'">';
|
||||||
print'</td></tr>';
|
print'</td></tr>';
|
||||||
|
|
||||||
// Description
|
// Description
|
||||||
@ -257,9 +259,11 @@ if ($user->rights->categorie->creer)
|
|||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '<br><div class="center">';
|
dol_fiche_end('');
|
||||||
|
|
||||||
|
print '<div class="center">';
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("CreateThisCat").'" name="creation" />';
|
print '<input type="submit" class="button" value="'.$langs->trans("CreateThisCat").'" name="creation" />';
|
||||||
print ' ';
|
print ' ';
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Cancel").'" name="cancel" />';
|
print '<input type="submit" class="button" value="'.$langs->trans("Cancel").'" name="cancel" />';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
|||||||
@ -643,8 +643,8 @@ class Categorie extends CommonObject
|
|||||||
{
|
{
|
||||||
$field=''; $classname=''; $category_table=''; $object_table='';
|
$field=''; $classname=''; $category_table=''; $object_table='';
|
||||||
if ($type=='product') { $field='product'; $classname='Product'; }
|
if ($type=='product') { $field='product'; $classname='Product'; }
|
||||||
if ($type=='customer') { $field='societe'; $classname='Societe'; }
|
if ($type=='customer') { $field='soc'; $classname='Societe'; $category_table='societe'; $object_table='societe'; }
|
||||||
if ($type=='supplier') { $field='societe'; $classname='Fournisseur'; $category_table='fournisseur'; }
|
if ($type=='supplier') { $field='soc'; $classname='Fournisseur'; $category_table='fournisseur'; $object_table='societe'; }
|
||||||
if ($type=='member') { $field='member'; $classname='Adherent'; $category_table=''; $object_table='adherent'; }
|
if ($type=='member') { $field='member'; $classname='Adherent'; $category_table=''; $object_table='adherent'; }
|
||||||
if ($type=='contact') { $field='socpeople'; $classname='Contact'; $category_table='contact'; $object_table='socpeople'; }
|
if ($type=='contact') { $field='socpeople'; $classname='Contact'; $category_table='contact'; $object_table='socpeople'; }
|
||||||
|
|
||||||
|
|||||||
@ -232,7 +232,7 @@ print "</div>";
|
|||||||
$cats = $object->get_filles();
|
$cats = $object->get_filles();
|
||||||
if ($cats < 0)
|
if ($cats < 0)
|
||||||
{
|
{
|
||||||
dol_print_error();
|
dol_print_error($db, $cats->error, $cats->errors);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -286,7 +286,7 @@ if ($object->type == 0)
|
|||||||
$prods = $object->getObjectsInCateg("product");
|
$prods = $object->getObjectsInCateg("product");
|
||||||
if ($prods < 0)
|
if ($prods < 0)
|
||||||
{
|
{
|
||||||
dol_print_error();
|
dol_print_error($db, $prods->error, $prods->errors);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -359,7 +359,7 @@ if ($object->type == 1)
|
|||||||
$socs = $object->getObjectsInCateg("supplier");
|
$socs = $object->getObjectsInCateg("supplier");
|
||||||
if ($socs < 0)
|
if ($socs < 0)
|
||||||
{
|
{
|
||||||
dol_print_error();
|
dol_print_error($db, $socs->error, $socs->errors);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -410,7 +410,7 @@ if($object->type == 2)
|
|||||||
$socs = $object->getObjectsInCateg("customer");
|
$socs = $object->getObjectsInCateg("customer");
|
||||||
if ($socs < 0)
|
if ($socs < 0)
|
||||||
{
|
{
|
||||||
dol_print_error();
|
dol_print_error($db, $socs->error, $socs->errors);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -466,7 +466,7 @@ if ($object->type == 3)
|
|||||||
$prods = $object->getObjectsInCateg("member");
|
$prods = $object->getObjectsInCateg("member");
|
||||||
if ($prods < 0)
|
if ($prods < 0)
|
||||||
{
|
{
|
||||||
dol_print_error($db,$object->error);
|
dol_print_error($db, $prods->error, $prods->errors);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -518,7 +518,7 @@ if($object->type == 4)
|
|||||||
$contacts = $object->getObjectsInCateg("contact");
|
$contacts = $object->getObjectsInCateg("contact");
|
||||||
if ($contacts < 0)
|
if ($contacts < 0)
|
||||||
{
|
{
|
||||||
dol_print_error();
|
dol_print_error($db, $contacts->error, $contacts->errors);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user