diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php
index 232df30e280..8cb60d25215 100644
--- a/htdocs/contrat/card.php
+++ b/htdocs/contrat/card.php
@@ -1270,7 +1270,9 @@ else
$usemargins=0;
if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($object->element,array('facture','propal','commande'))) $usemargins=1;
- // Title line for service
+ $var=false;
+
+ // Title line for service
$cursorline=1;
while ($cursorline <= $nbofservices)
{
@@ -1309,8 +1311,6 @@ else
print '
| ';
print "\n";
- $var=true;
-
$objp = $db->fetch_object($result);
$var=!$var;
@@ -1338,18 +1338,18 @@ else
}
else
{
- print "".dol_htmlentitiesbr($objp->description)." | \n";
+ print ''.dol_htmlentitiesbr($objp->description)." | \n";
}
// TVA
print ''.vatrate($objp->tva_tx,'%',$objp->info_bits).' | ';
// Prix
- print ''.price($objp->subprice)." | \n";
+ print ''.($objp->subprice != '' ? price($objp->subprice) : '')." | \n";
// Quantite
print ''.$objp->qty.' | ';
// Remise
if ($objp->remise_percent > 0)
{
- print ''.$objp->remise_percent."% | \n";
+ print ''.$objp->remise_percent."% | \n";
}
else
{
@@ -1481,7 +1481,7 @@ else
print '';
print $langs->trans("DateStartPlanned").' ';
$form->select_date($db->jdate($objp->date_debut),"date_start_update",$usehm,$usehm,($db->jdate($objp->date_debut)>0?0:1),"update");
- print ' '.$langs->trans("DateEndPlanned").' ';
+ print ' '.$langs->trans("DateEndPlanned").' ';
$form->select_date($db->jdate($objp->date_fin),"date_end_update",$usehm,$usehm,($db->jdate($objp->date_fin)>0?0:1),"update");
print ' | ';
@@ -1505,7 +1505,7 @@ else
if ($object->statut > 0)
{
- print '';
+ print '
';
print '
| ';
print "
\n";
}
@@ -1521,7 +1521,7 @@ else
if ($action == 'deleteline' && ! $_REQUEST["cancel"] && $user->rights->contrat->creer && $object->lines[$cursorline-1]->id == GETPOST('rowid'))
{
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".GETPOST('rowid'),$langs->trans("DeleteContractLine"),$langs->trans("ConfirmDeleteContractLine"),"confirm_deleteline",'',0,1);
- if ($ret == 'html') print '';
+ if ($ret == 'html') print '';
}
/*
@@ -1541,7 +1541,7 @@ else
array('type' => 'select', 'name' => 'newcid', 'values' => $arraycontractid));
$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".GETPOST('rowid'),$langs->trans("MoveToAnotherContract"),$langs->trans("ConfirmMoveToAnotherContract"),"confirm_move",$formquestion);
- print '';
+ print '';
}
/*
@@ -1553,7 +1553,7 @@ else
$dateactend = dol_mktime(12, 0, 0, GETPOST('endmonth'), GETPOST('endday'), GETPOST('endyear'));
$comment = GETPOST('comment');
$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".GETPOST('ligne')."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment),$langs->trans("ActivateService"),$langs->trans("ConfirmActivateService",dol_print_date($dateactstart,"%A %d %B %Y")),"confirm_active", '', 0, 1);
- print '';
+ print '';
}
/*
@@ -1565,7 +1565,7 @@ else
$dateactend = dol_mktime(12, 0, 0, GETPOST('endmonth'), GETPOST('endday'), GETPOST('endyear'));
$comment = GETPOST('comment');
$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".GETPOST('ligne')."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment), $langs->trans("CloseService"), $langs->trans("ConfirmCloseService",dol_print_date($dateactend,"%A %d %B %Y")), "confirm_closeline", '', 0, 1);
- print '';
+ print '';
}
@@ -1574,7 +1574,7 @@ else
{
print '';
- print '';
+ print '
';
print '| '.$langs->trans("ServiceStatus").': '.$object->lines[$cursorline-1]->getLibStatut(4).' | ';
print '';
if ($user->societe_id == 0)
@@ -1591,7 +1591,7 @@ else
print ' | ';
print "
\n";
- print '';
+ print '
';
print '| ';
// Si pas encore active
@@ -1630,7 +1630,7 @@ else
print ' |