Fix: When module shipment is on, a contact of order is also contact of
shipment
This commit is contained in:
parent
09951888a5
commit
449d44419d
@ -1124,14 +1124,6 @@ else
|
|||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
print '<table class="border tableforfield" width="100%">';
|
print '<table class="border tableforfield" width="100%">';
|
||||||
|
|
||||||
// Statut
|
|
||||||
/*print '<tr><td>'.$langs->trans("Status").'</td>';
|
|
||||||
print '<td>';
|
|
||||||
print $object->getLibStatut(4);
|
|
||||||
print '</td>';
|
|
||||||
print '</tr>'."\n";
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Categories
|
// Categories
|
||||||
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire)) {
|
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire)) {
|
||||||
print '<tr><td>' . $langs->trans( "Categories" ) . '</td>';
|
print '<tr><td>' . $langs->trans( "Categories" ) . '</td>';
|
||||||
@ -1151,13 +1143,6 @@ else
|
|||||||
|
|
||||||
$object->load_ref_elements();
|
$object->load_ref_elements();
|
||||||
|
|
||||||
if (! empty($conf->commande->enabled))
|
|
||||||
{
|
|
||||||
print '<tr><td>'.$langs->trans("ContactForOrders").'</td><td colspan="3">';
|
|
||||||
print $object->ref_commande?$object->ref_commande:$langs->trans("NoContactForAnyOrder");
|
|
||||||
print '</td></tr>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (! empty($conf->propal->enabled))
|
if (! empty($conf->propal->enabled))
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("ContactForProposals").'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans("ContactForProposals").'</td><td colspan="3">';
|
||||||
@ -1165,6 +1150,18 @@ else
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! empty($conf->commande->enabled) || ! empty($conf->expedition->enabled))
|
||||||
|
{
|
||||||
|
print '<tr><td>';
|
||||||
|
if (! empty($conf->expedition->enabled)) { print $langs->trans("ContactForOrdersOrShipments"); }
|
||||||
|
else print $langs->trans("ContactForOrders");
|
||||||
|
print '</td><td colspan="3">';
|
||||||
|
$none=$langs->trans("NoContactForAnyOrder");
|
||||||
|
if (! empty($conf->expedition->enabled)) { $none=$langs->trans("NoContactForAnyOrderOrShipments"); }
|
||||||
|
print $object->ref_commande?$object->ref_commande:$none;
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
if (! empty($conf->contrat->enabled))
|
if (! empty($conf->contrat->enabled))
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("ContactForContracts").'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans("ContactForContracts").'</td><td colspan="3">';
|
||||||
|
|||||||
@ -664,10 +664,10 @@ class Contact extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Charge le nombre d'elements auquel est lie ce contact
|
* Load number of elements the contact is used as a link for
|
||||||
* ref_facturation
|
* ref_facturation
|
||||||
* ref_contrat
|
* ref_contrat
|
||||||
* ref_commande
|
* ref_commande (for order and/or shipments)
|
||||||
* ref_propale
|
* ref_propale
|
||||||
*
|
*
|
||||||
* @return int <0 if KO, >=0 if OK
|
* @return int <0 if KO, >=0 if OK
|
||||||
@ -701,7 +701,7 @@ class Contact extends CommonObject
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$this->db->error()." - ".$sql;
|
$this->error=$this->db->lasterror();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -317,10 +317,12 @@ ShowContact=Show contact
|
|||||||
ContactsAllShort=All (No filter)
|
ContactsAllShort=All (No filter)
|
||||||
ContactType=Contact type
|
ContactType=Contact type
|
||||||
ContactForOrders=Order's contact
|
ContactForOrders=Order's contact
|
||||||
|
ContactForOrdersOrShipments=Order's or shipment's contact
|
||||||
ContactForProposals=Proposal's contact
|
ContactForProposals=Proposal's contact
|
||||||
ContactForContracts=Contract's contact
|
ContactForContracts=Contract's contact
|
||||||
ContactForInvoices=Invoice's contact
|
ContactForInvoices=Invoice's contact
|
||||||
NoContactForAnyOrder=This contact is not a contact for any order
|
NoContactForAnyOrder=This contact is not a contact for any order
|
||||||
|
NoContactForAnyOrderOrShipment=This contact is not a contact for any order or shipment
|
||||||
NoContactForAnyProposal=This contact is not a contact for any commercial proposal
|
NoContactForAnyProposal=This contact is not a contact for any commercial proposal
|
||||||
NoContactForAnyContract=This contact is not a contact for any contract
|
NoContactForAnyContract=This contact is not a contact for any contract
|
||||||
NoContactForAnyInvoice=This contact is not a contact for any invoice
|
NoContactForAnyInvoice=This contact is not a contact for any invoice
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user