diff --git a/htdocs/contrat/contact.php b/htdocs/contrat/contact.php index 31a204b5479b77961c0fd59d0057af1ecde85fb8..9a8835019f650df2f802dde0184dd139faee13ac 100644 --- a/htdocs/contrat/contact.php +++ b/htdocs/contrat/contact.php @@ -239,6 +239,9 @@ if ($id > 0) { if ($mesg) print $mesg; + $soc = new Societe($db); + $soc->fetch($contrat->socidp); + $head = contract_prepare_head($contrat); $hselected=1; @@ -257,8 +260,18 @@ if ($id > 0) // Customer print "<tr><td>".$langs->trans("Customer")."</td>"; - print '<td colspan="3">'; - print '<b><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$contrat->societe->id.'">'.$contrat->societe->nom.'</a></b></td></tr>'; + print '<td colspan="3">'.$soc->getNomUrl(1).'</td></tr>'; + + // Ligne info remises tiers + print '<tr><td>'.$langs->trans('Discount').'</td><td>'; + if ($contrat->societe->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$contrat->societe->remise_client); + else print $langs->trans("CompanyHasNoRelativeDiscount"); + $absolute_discount=$contrat->societe->getCurrentDiscount(); + print '. '; + if ($absolute_discount) print $langs->trans("CompanyHasAbsoluteDiscount",$absolute_discount,$langs->trans("Currency".$conf->monnaie)); + else print $langs->trans("CompanyHasNoAbsoluteDiscount"); + print '.'; + print '</td></tr>'; print "</table>"; diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php index 1a7c4cb47b647afa10f1d78dcec10b1679a3dd42..8791e34fad9861cd103fb2b389d2e6dd8d25eeb5 100644 --- a/htdocs/contrat/fiche.php +++ b/htdocs/contrat/fiche.php @@ -340,10 +340,10 @@ if ($_GET["action"] == 'create') print '<td><input type="text" maxlength="30" name="ref" size="20"></td></tr>'; // Customer - print '<tr><td>'.$langs->trans("Customer").'</td><td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$soc->id.'">'.$obj->nom.'</a></td></tr>'; + print '<tr><td>'.$langs->trans("Customer").'</td><td>'.$soc->getNomUrl(1).'</td></tr>'; // Ligne info remises tiers - print '<tr><td>'.$langs->trans('Info').'</td><td>'; + print '<tr><td>'.$langs->trans('Discount').'</td><td>'; if ($soc->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_client); else print $langs->trans("CompanyHasNoRelativeDiscount"); $absolute_discount=$soc->getCurrentDiscount(); @@ -588,11 +588,10 @@ else // Customer print "<tr><td>".$langs->trans("Customer")."</td>"; - print '<td colspan="3">'; - print '<b><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$contrat->societe->id.'">'.$contrat->societe->nom.'</a></b></td></tr>'; + print '<td colspan="3">'.$contrat->societe->getNomUrl(1).'</td></tr>'; // Ligne info remises tiers - print '<tr><td>'.$langs->trans('Info').'</td><td>'; + print '<tr><td>'.$langs->trans('Discount').'</td><td>'; if ($contrat->societe->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$contrat->societe->remise_client); else print $langs->trans("CompanyHasNoRelativeDiscount"); $absolute_discount=$contrat->societe->getCurrentDiscount(); diff --git a/htdocs/contrat/ligne.php b/htdocs/contrat/ligne.php index 28584054dc1dd19f4d80b75a237dcb7097745adc..123ddc537b14b3a2072509d64ccd141b6bed2dff 100644 --- a/htdocs/contrat/ligne.php +++ b/htdocs/contrat/ligne.php @@ -111,6 +111,9 @@ if ($id > 0) $contrat = New Contrat($db); if ( $contrat->fetch($id) > 0) { + $soc = new Societe($db); + $soc->fetch($contrat->socidp); + $author = new User($db); $author->id = $contrat->user_author_id; $author->fetch(); @@ -161,8 +164,18 @@ if ($id > 0) // Customer print "<tr><td>".$langs->trans("Customer")."</td>"; - print '<td colspan="3">'; - print '<b><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$contrat->societe->id.'">'.$contrat->societe->nom.'</a></b></td></tr>'; + print '<td colspan="3">'.$soc->getNomUrl(1).'</td></tr>'; + + // Ligne info remises tiers + print '<tr><td>'.$langs->trans('Discount').'</td><td>'; + if ($soc->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_client); + else print $langs->trans("CompanyHasNoRelativeDiscount"); + $absolute_discount=$soc->getCurrentDiscount(); + print '. '; + if ($absolute_discount) print $langs->trans("CompanyHasAbsoluteDiscount",$absolute_discount,$langs->trans("Currency".$conf->monnaie)); + else print $langs->trans("CompanyHasNoAbsoluteDiscount"); + print '.'; + print '</td></tr>'; // Statut contrat print '<tr><td>'.$langs->trans("Status").'</td><td colspan="3">'; diff --git a/htdocs/contrat/note.php b/htdocs/contrat/note.php index b60d1857dcde968c79c8182d399c27c7918f7f9b..6785972443f8309860f8849939b4eb3831d053ce 100644 --- a/htdocs/contrat/note.php +++ b/htdocs/contrat/note.php @@ -136,9 +136,20 @@ if ($_GET["id"]) // Reference print '<tr><td width="25%">'.$langs->trans('Ref').'</td><td colspan="5">'.$contrat->ref.'</td></tr>'; + // Societe print '<tr><td>'.$langs->trans("Customer").'</td>'; - print '<td colspan="3">'; - print '<a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$soc->id.'">'.$soc->nom.'</a></td>'; + print '<td colspan="3">'.$soc->getNomUrl(1).'</td></tr>'; + + // Ligne info remises tiers + print '<tr><td>'.$langs->trans('Discount').'</td><td>'; + if ($contrat->societe->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$contrat->societe->remise_client); + else print $langs->trans("CompanyHasNoRelativeDiscount"); + $absolute_discount=$contrat->societe->getCurrentDiscount(); + print '. '; + if ($absolute_discount) print $langs->trans("CompanyHasAbsoluteDiscount",$absolute_discount,$langs->trans("Currency".$conf->monnaie)); + else print $langs->trans("CompanyHasNoAbsoluteDiscount"); + print '.'; + print '</td></tr>'; // Note publique print '<tr><td valign="top">'.$langs->trans("NotePublic").' :</td>';