From 4939e2da4d8799219a51acbabe18a766bf2955a8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 23 Nov 2011 20:13:20 +0100 Subject: [PATCH] Fix: Show lines details during creation --- htdocs/fourn/facture/fiche.php | 46 +++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 15 deletions(-) diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index ff10216fcfa..1c15522f9ab 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -279,7 +279,7 @@ if ($action == 'add' && $user->rights->fournisseur->facture->creer) $element = 'fourn'; $subelement = 'fournisseur.commande'; } - $object->origin = $_POST['origin']; + $object->origin = $_POST['origin']; $object->origin_id = $_POST['originid']; $id = $object->create($user); @@ -314,20 +314,20 @@ if ($action == 'add' && $user->rights->fournisseur->facture->creer) if ($lines[$i]->date_end) $date_end=$lines[$i]->date_end; $result = $object->addline( - $desc, - $lines[$i]->subprice, - $lines[$i]->tva_tx, - $lines[$i]->localtax1_tx, - $lines[$i]->localtax2_tx, - $lines[$i]->qty, - $lines[$i]->fk_product, - $lines[$i]->remise_percent, - $date_start, - $date_end, - 0, - $lines[$i]->info_bits, + $desc, + $lines[$i]->subprice, + $lines[$i]->tva_tx, + $lines[$i]->localtax1_tx, + $lines[$i]->localtax2_tx, + $lines[$i]->qty, + $lines[$i]->fk_product, + $lines[$i]->remise_percent, + $date_start, + $date_end, + 0, + $lines[$i]->info_bits, 'HT', - $product_type + $product_type ); if ($result < 0) @@ -1149,6 +1149,22 @@ if ($action == 'create') print '
'; print "\n"; + + + // Show origin lines + if (is_object($objectsrc)) + { + print '
'; + + $title=$langs->trans('ProductsAndServices'); + print_titre($title); + + print ''; + + $objectsrc->printOriginLinesList($hookmanager); + + print '
'; + } } else { @@ -1806,7 +1822,7 @@ else /* * Linked object block - */ + */ $somethingshown=$object->showLinkedObjectBlock(); print '';