diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 5a97b342900..cdb4d5a30ac 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -969,9 +969,8 @@ else print ""; - print "".$langs->trans("Author")."$author->fullname"; + print "".$langs->trans("Author")."$author->fullname"; - print ''.$langs->trans("GlobalDiscount").''; if ($fac->brouillon == 1 && $user->rights->facture->creer) { @@ -983,7 +982,6 @@ else } else { print ''.$fac->remise_percent.' %'; - } print ''; @@ -995,7 +993,9 @@ else print ''.$conf->monnaie.''; print ''.$langs->trans("AmountTTC").''.price($fac->total_ttc).''; print ''.$conf->monnaie.''; + print ''.$langs->trans("Status").''.($fac->get_libstatut()).''; + if ($fac->note) { print ''.$langs->trans("Note").' : '.nl2br($fac->note).""; @@ -1020,17 +1020,17 @@ else $result = $db->query($sql); if ($result) { - $num_lignes = $db->num_rows(); + $num_lignes = $db->num_rows($result); $i = 0; $total = 0; - echo ''; + print '
'; if ($num_lignes) { print ""; print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; @@ -1039,7 +1039,7 @@ else $var=True; while ($i < $num_lignes) { - $objp = $db->fetch_object(); + $objp = $db->fetch_object($result); $var=!$var; print ""; if ($objp->fk_product > 0) @@ -1047,7 +1047,7 @@ else print ''; print ''; print ''; - print ''; - print ''; + print ''; + print ''; print ''; print ''; print ''; print "\n"; print ''; print ''; - print ''; + + $var=!$var; + + print ''; + print ''; print ''; @@ -1162,12 +1166,12 @@ else print ''; print ''; if ($conf->service->enabled) { - print ''; - print ''; + print ''; + print ''; } print ''; print ""; @@ -1315,7 +1319,7 @@ else * Liste des actions propres à la facture * */ - $sql = "SELECT id, ".$db->pdate("a.datea")." as da, a.note, code "; + $sql = "SELECT id, ".$db->pdate("a.datea")." as da, a.note, code"; $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."user as u "; $sql .= " WHERE a.fk_user_author = u.rowid "; $sql .= " AND a.fk_action in (9,10) "; @@ -1325,7 +1329,7 @@ else $result = $db->query($sql); if ($result) { - $num = $db->num_rows(); + $num = $db->num_rows($result); if ($num) { print_titre($langs->trans("ActionsOnBill")); @@ -1338,10 +1342,10 @@ else $var=True; while ($i < $num) { - $objp = $db->fetch_object(); + $objp = $db->fetch_object($result); $var=!$var; print ""; - print ''; + print ''; print '\n"; print ''; print '';
'.$langs->trans("Description").''.$langs->trans("VAT").''.$langs->trans("PriceUHT").''.$langs->trans("Quantity").''.$langs->trans("Qty").''.$langs->trans("Discount").''.$langs->trans("AmountHT").'  
'; if ($objp->fk_product_type) print img_object($langs->trans("ShowService"),"service"); else print img_object($langs->trans("ShowProduct"),"product"); - print ' '.stripslashes(nl2br($objp->description)).''; + print ' '.stripslashes(nl2br($objp->description)).''; if ($objp->date_start && $objp->date_end) { print " (Du ".dolibarr_print_date($objp->date_start)." au ".dolibarr_print_date($objp->date_end).")"; } if ($objp->date_start && ! $objp->date_end) { print " (A partir du ".dolibarr_print_date($objp->date_start).")"; } if (! $objp->date_start && $objp->date_end) { print " (Jusqu'au ".dolibarr_print_date($objp->date_end).")"; } @@ -1145,15 +1145,19 @@ else print ''.$langs->trans("Description").''.$langs->trans("VAT").''.$langs->trans("PriceUHT").''.$langs->trans("Quantity").''.$langs->trans("Dscount").''.$langs->trans("Qty").''.$langs->trans("Discount").'   
'; print $html->select_tva("tva_tx",$conf->defaulttx); print ' %
Si produit de type service à durée limitée: Du '; - print $html->select_date('',"date_start",0,0,1); - print ' au '; - print $html->select_date('',"date_end",0,0,1); - print '
Si produit de type service à durée limitée: Du '; + print $html->select_date('',"date_start",0,0,1); + print ' au '; + print $html->select_date('',"date_end",0,0,1); + print '
'.$objp->id.''.img_object($langs->trans("ShowTask"),"task").' '.$objp->id.''.dolibarr_print_date($objp->da)."'.stripslashes($objp->note).''.$objp->code.'