Added ability to assign a category of product to a customer
This commit is contained in:
parent
e32d52b66d
commit
977bacbdab
@ -182,7 +182,7 @@ class Categorie
|
|||||||
// Clean parameters
|
// Clean parameters
|
||||||
$this->label=trim($this->label);
|
$this->label=trim($this->label);
|
||||||
$this->description=trim($this->description);
|
$this->description=trim($this->description);
|
||||||
|
if ($this->socid == -1) $this->socid = 0;
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
/* Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
|
/* Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
|
||||||
* Copyright (C) 2006-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2006-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||||
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2008 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -121,10 +121,23 @@ print $langs->trans("Description").'</td><td>';
|
|||||||
print nl2br($c->description);
|
print nl2br($c->description);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td width="20%" class="notopnoleft">';
|
if ($type == 0 && $conf->global->CATEGORY_ASSIGNED_TO_A_CUSTOMER)
|
||||||
print $langs->trans("Status").'</td><td>';
|
{
|
||||||
print ($c->visible ? $langs->trans("Visible") : $langs->trans("Invisible"));
|
$soc = new Societe($db);
|
||||||
print '</td></tr>';
|
$soc->fetch($c->socid);
|
||||||
|
|
||||||
|
print '<tr><td width="20%" class="notopnoleft">';
|
||||||
|
print $langs->trans("AssignedToTheCustomer").'</td><td>';
|
||||||
|
print $soc->getNomUrl(1);
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<tr><td width="20%" class="notopnoleft">';
|
||||||
|
print $langs->trans("Status").'</td><td>';
|
||||||
|
print ($c->visible ? $langs->trans("Visible") : $langs->trans("Invisible"));
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
|||||||
@ -72,3 +72,4 @@ ThisCategoryHasNoProduct=This category does not contain any product.
|
|||||||
ThisCategoryHasNoSupplier=This category does not contain any supplier.
|
ThisCategoryHasNoSupplier=This category does not contain any supplier.
|
||||||
ThisCategoryHasNoCustomer=This category does not contain any customer.
|
ThisCategoryHasNoCustomer=This category does not contain any customer.
|
||||||
AssignedToCustomer=Assigned to a customer
|
AssignedToCustomer=Assigned to a customer
|
||||||
|
AssignedToTheCustomer=Assigned to the customer
|
||||||
@ -72,3 +72,4 @@ ThisCategoryHasNoProduct=Cette cat
|
|||||||
ThisCategoryHasNoSupplier=Cette catégorie ne contient aucun fournisseur.
|
ThisCategoryHasNoSupplier=Cette catégorie ne contient aucun fournisseur.
|
||||||
ThisCategoryHasNoCustomer=Cette catégorie ne contient aucun client.
|
ThisCategoryHasNoCustomer=Cette catégorie ne contient aucun client.
|
||||||
AssignedToCustomer=Attribuer à un client
|
AssignedToCustomer=Attribuer à un client
|
||||||
|
AssignedToTheCustomer=Attribué au client
|
||||||
Loading…
Reference in New Issue
Block a user