mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix regression after renaming field fk_soc
This commit is contained in:
parent
4f4ebfaed3
commit
90f78429ec
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* 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) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
* 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"));
|
||||
|
||||
dol_fiche_head('');
|
||||
|
||||
print '<table width="100%" class="border">';
|
||||
|
||||
// Ref
|
||||
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>';
|
||||
|
||||
// Description
|
||||
|
|
@ -257,9 +259,11 @@ if ($user->rights->categorie->creer)
|
|||
|
||||
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 ' ';
|
||||
print ' ';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Cancel").'" name="cancel" />';
|
||||
print '</div>';
|
||||
|
||||
|
|
|
|||
|
|
@ -643,8 +643,8 @@ class Categorie extends CommonObject
|
|||
{
|
||||
$field=''; $classname=''; $category_table=''; $object_table='';
|
||||
if ($type=='product') { $field='product'; $classname='Product'; }
|
||||
if ($type=='customer') { $field='societe'; $classname='Societe'; }
|
||||
if ($type=='supplier') { $field='societe'; $classname='Fournisseur'; $category_table='fournisseur'; }
|
||||
if ($type=='customer') { $field='soc'; $classname='Societe'; $category_table='societe'; $object_table='societe'; }
|
||||
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=='contact') { $field='socpeople'; $classname='Contact'; $category_table='contact'; $object_table='socpeople'; }
|
||||
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ if ($type==0 && $elemid && $action == 'addintocategory' && ($user->rights->produ
|
|||
$newobject = new Product($db);
|
||||
$result = $newobject->fetch($elemid);
|
||||
$elementtype = 'product';
|
||||
|
||||
|
||||
// TODO Add into categ
|
||||
$result=$object->add_type($newobject,$elementtype);
|
||||
if ($result >= 0)
|
||||
|
|
@ -145,7 +145,7 @@ if ($type==0 && $elemid && $action == 'addintocategory' && ($user->rights->produ
|
|||
setEventMessages($object->error,$object->errors,'errors');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -232,7 +232,7 @@ print "</div>";
|
|||
$cats = $object->get_filles();
|
||||
if ($cats < 0)
|
||||
{
|
||||
dol_print_error();
|
||||
dol_print_error($db, $cats->error, $cats->errors);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -286,12 +286,12 @@ if ($object->type == 0)
|
|||
$prods = $object->getObjectsInCateg("product");
|
||||
if ($prods < 0)
|
||||
{
|
||||
dol_print_error();
|
||||
dol_print_error($db, $prods->error, $prods->errors);
|
||||
}
|
||||
else
|
||||
{
|
||||
$showclassifyform=1; $typeid=0;
|
||||
|
||||
|
||||
// Form to add record into a category
|
||||
if ($showclassifyform)
|
||||
{
|
||||
|
|
@ -312,7 +312,7 @@ if ($object->type == 0)
|
|||
print '</table>';
|
||||
print '</form>';
|
||||
}
|
||||
|
||||
|
||||
print "<br>";
|
||||
print "<table class='noborder' width='100%'>\n";
|
||||
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("ProductsAndServices")."</td></tr>\n";
|
||||
|
|
@ -359,7 +359,7 @@ if ($object->type == 1)
|
|||
$socs = $object->getObjectsInCateg("supplier");
|
||||
if ($socs < 0)
|
||||
{
|
||||
dol_print_error();
|
||||
dol_print_error($db, $socs->error, $socs->errors);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -410,7 +410,7 @@ if($object->type == 2)
|
|||
$socs = $object->getObjectsInCateg("customer");
|
||||
if ($socs < 0)
|
||||
{
|
||||
dol_print_error();
|
||||
dol_print_error($db, $socs->error, $socs->errors);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -466,7 +466,7 @@ if ($object->type == 3)
|
|||
$prods = $object->getObjectsInCateg("member");
|
||||
if ($prods < 0)
|
||||
{
|
||||
dol_print_error($db,$object->error);
|
||||
dol_print_error($db, $prods->error, $prods->errors);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -518,7 +518,7 @@ if($object->type == 4)
|
|||
$contacts = $object->getObjectsInCateg("contact");
|
||||
if ($contacts < 0)
|
||||
{
|
||||
dol_print_error();
|
||||
dol_print_error($db, $contacts->error, $contacts->errors);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user