From 64f5933454acef96f6cc854538b0f93088e44427 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 3 Apr 2007 10:19:34 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20visualisation=20de=20l'avoir=20lors=20d'?= =?UTF-8?q?une=20cr=E9ation=20de=20facture=20via=20une=20commande?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/compta/facture.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 62c8ddb2043..2b71ec2b627 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1570,7 +1570,7 @@ if ($_GET['action'] == 'create') { $title=$langs->trans('Products'); - $sql = 'SELECT pt.rowid, pt.subprice, pt.tva_tx, pt.qty, pt.remise_percent, pt.description, pt.info_bits,'; + $sql = 'SELECT pt.rowid, pt.subprice, pt.tva_tx, pt.qty, pt.fk_remise_except, pt.remise_percent, pt.description, pt.info_bits,'; $sql.= ' p.label as product, p.ref, p.rowid as prodid'; $sql.= ' FROM '.MAIN_DB_PREFIX.'commandedet as pt'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON pt.fk_product = p.rowid'; @@ -1642,7 +1642,20 @@ if ($_GET['action'] == 'create') } print "\n"; print ''; - print dolibarr_trunc($objp->description,60); + if ($objp->description) + { + if ($objp->description == '(CREDIT_NOTE)') + { + $discount=new DiscountAbsolute($db); + $discount->fetch($objp->fk_remise_except); + print $langs->trans("DiscountFromCreditNote",$discount->ref_facture_source); + // \TODO Mettre ici lien sur ref avoir en ajoutant fonction getNomUrl sur classe DiscountAbsolute + } + else + { + print dolibarr_trunc($objp->description,60); + } + } print ''; print ''.$objp->tva_tx.'%'; print ''.price($objp->subprice).'';