diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php index 77c028e944f..6df95ead831 100644 --- a/htdocs/contrat/fiche.php +++ b/htdocs/contrat/fiche.php @@ -276,7 +276,7 @@ if ($_POST["action"] == 'addline' && $user->rights->contrat->creer) $info_bits=0; if ($tva_npr) $info_bits |= 0x01; - + if($price_min && (price2num($pu_ht)*(1-price2num($_POST['remise_percent'])/100) < price2num($price_min))) { $object->error = $langs->trans("CantBeLessThanMinPrice",price2num($price_min,'MU').' '.$langs->trans("Currency".$conf->monnaie)) ; @@ -351,7 +351,7 @@ if ($_POST["action"] == 'updateligne' && $user->rights->contrat->creer && ! $_PO $objectline->date_fin_validite=$date_end_update; $objectline->date_cloture=$date_end_real_update; $objectline->fk_user_cloture=$user->id; - + // TODO verifier price_min si fk_product et multiprix $result=$objectline->update($user); @@ -468,31 +468,31 @@ if ($_GET["action"] == 'create') dol_fiche_head($head, $a, $langs->trans("AddContract"), 0, 'contract'); if ($mesg) print $mesg; - + $soc = new Societe($db); $soc->fetch($socid); - + $object->date_contrat = time(); if ($contratid) $result=$object->fetch($contratid); $numct = $object->getNextNumRef($soc); - + print '
\n"; -// TODO A quoi ca sert ? -/* - if ($propalid) - { - print '| '.$langs->trans("Ref").' | '.$langs->trans("Product").' | '; - print ''.$langs->trans("Price").' | '; - print ''.$langs->trans("Qty").' | '; - print ''.$langs->trans("ReductionShort").' | '; - print '
| [$objp->ref] | \n"; - print ''.$objp->product.' | '; - print "".price($objp->price).' | '; - print ''.$objp->qty.' | '; - print ''.$objp->remise_percent.'% | '; - print "
| \n"; - print ' | '.$objp->product.' | '; - print ''.price($objp->price).' | '; - print ''.$objp->remise_percent.'% | '; - print ''.$objp->qty.' | '; - print "
| ';
- print '';
- print img_object($langs->trans("ShowService"),"service").' '.$objp->ref.'';
- print $objp->label?' - '.$objp->label:'';
+ $productstatic->id=$objp->fk_product;
+ $productstatic->type=$objp->ptype;
+ $productstatic->ref=$objp->pref;
+ print $productstatic->getNomUrl(1,'',20);
+ print $objp->label?' - '.dol_trunc($objp->label,16):'';
if ($objp->description) print ' '.nl2br($objp->description); print ' | ';
}
@@ -918,9 +850,11 @@ else
print '';
if ($objp->fk_product)
{
- print '';
- print img_object($langs->trans("ShowService"),"service").' '.$objp->ref.'';
- print $objp->label?' - '.$objp->label:'';
+ $productstatic->id=$objp->fk_product;
+ $productstatic->type=$objp->ptype;
+ $productstatic->ref=$objp->pref;
+ print $productstatic->getNomUrl(1,'',20);
+ print $objp->label?' - '.dol_trunc($objp->label,16):'';
print ' '; } else diff --git a/htdocs/contrat/liste.php b/htdocs/contrat/liste.php index 0966858a014..e23d4b9206b 100644 --- a/htdocs/contrat/liste.php +++ b/htdocs/contrat/liste.php @@ -102,8 +102,8 @@ if ($resql) print ' | ||
cid\">";
+ print '| ';
print img_object($langs->trans("ShowContract"),"contract").' '.(isset($obj->ref) ? $obj->ref : $obj->cid) .'';
if ($obj->nb_late) print img_warning($langs->trans("Late"));
print ' | ';
diff --git a/htdocs/contrat/services.php b/htdocs/contrat/services.php
index dfa6abf5db2..dac554e00c4 100644
--- a/htdocs/contrat/services.php
+++ b/htdocs/contrat/services.php
@@ -1,6 +1,6 @@
- * Copyright (C) 2004-2009 Laurent Destailleur ';
$contractstatic->id=$obj->cid;
$contractstatic->ref=$obj->ref?$obj->ref:$obj->cid;
@@ -197,12 +197,13 @@ if ($resql)
// Service
print ' | ';
- if ($obj->pid)
+ if ($obj->pid)
{
$productstatic->id=$obj->pid;
$productstatic->type=$obj->ptype;
- $productstatic->ref=$obj-label?$obj->label:$obj->pid;
+ $productstatic->ref=$obj->pref;
print $productstatic->getNomUrl(1,'',20);
+ print $obj->label?' - '.dol_trunc($obj->label,16):'';
}
else
{
| |