From 2b2d764180ae9a552b70abf898f7ee0eabb66a74 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 3 Feb 2014 17:30:35 +0100 Subject: [PATCH] Fix: ref and date of supplier invoice. Fix: Check on bank account --- htdocs/fourn/facture/paiement.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index 8f3f2909832..352c3150c52 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -96,7 +96,7 @@ if ($action == 'add_paiement') { // Si module bank actif, un compte est obligatoire lors de la saisie // d'un paiement - if (! $_POST['accountid']) + if ($_POST['accountid'] <= 0) { setEventMessage($langs->trans('ErrorFieldRequired',$langs->transnoentities('AccountToCredit')), 'errors'); $error++; @@ -298,13 +298,16 @@ if ($action == 'create' || $action == 'add_paiement') $objp = $db->fetch_object($resql); $var=!$var; print ''; - print ''.img_object($langs->trans('ShowBill'),'bill').' '.$objp->ref; - print ''; + print ''; + $invoicesupplierstatic->ref=$objp->ref; + $invoicesupplierstatic->id=$objp->facid; + print $invoicesupplierstatic->getNomUrl(1); + print ''; print ''.$objp->ref_supplier.''; if ($objp->df > 0 ) { print ''; - print dol_print_date($db->jdate($objp->df)).''; + print dol_print_date($db->jdate($objp->df), 'day').''; } else {