diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 872dbc07784..911d1556225 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1442,7 +1442,7 @@ else print ''; $sql = "SELECT cd.rowid, cd.statut, cd.label as label_det, cd.fk_product, cd.description, cd.price_ht, cd.qty,"; - $sql.= " cd.tva_tx, cd.remise_percent, cd.info_bits, cd.subprice,"; + $sql.= " cd.tva_tx, cd.remise_percent, cd.info_bits, cd.subprice, cd.multicurrency_subprice,"; $sql.= " cd.date_ouverture_prevue as date_debut, cd.date_ouverture as date_debut_reelle,"; $sql.= " cd.date_fin_validite as date_fin, cd.date_cloture as date_fin_reelle,"; $sql.= " cd.commentaire as comment, cd.fk_product_fournisseur_price as fk_fournprice, cd.buy_price_ht as pa_ht,"; @@ -1461,6 +1461,9 @@ else print ''; print ''; print ''; + if (!empty($conf->multicurrency->enabled)) { + print ''; + } print ''; if ($conf->global->PRODUCT_USE_UNITS) print ''; print ''; @@ -1509,8 +1512,12 @@ else } // TVA print ''; - // Prix + // Price print '\n"; + // Price multicurrency + if (!empty($conf->multicurrency->enabled)) { + print ''; + } // Quantite print ''; // Unit @@ -1949,6 +1956,8 @@ else { $var = true; + $forcetoshowtitlelines=1; + // Add free products/services $object->formAddObjectLine(1, $mysoc, $soc); @@ -2075,7 +2084,7 @@ $db->close(); ?> margin->enabled && $action == 'editline') +if (! empty($conf->margin->enabled) && $action == 'editline') { ?> diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index c7ebe5b7b8b..26086f04725 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -37,7 +37,7 @@ if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($ob $usemargins=1; } -global $dateSelector, $forceall, $senderissupplier, $inputalsopricewithtax; +global $dateSelector, $forceall, $forcetoshowtitlelines, $senderissupplier, $inputalsopricewithtax; if (! isset($dateSelector)) $dateSelector=1; // For backward compatibility elseif (empty($dateSelector)) $dateSelector=0; if (empty($forceall)) $forceall=0; @@ -53,7 +53,7 @@ if (in_array($object->element,array('propal', 'supplier_proposal','facture','fac lines) == 0); +$nolinesbefore=(count($this->lines) == 0 || $forcetoshowtitlelines); if ($nolinesbefore) { ?>
'.$langs->trans("ServiceNb",$cursorline).''.$langs->trans("VAT").''.$langs->trans("PriceUHT").''.$langs->trans("PriceUHTCurrency").''.$langs->trans("Qty").''.$langs->trans("Unit").''.$langs->trans("ReductionShort").''.vatrate($objp->tva_tx,'%',$objp->info_bits).''.($objp->subprice != '' ? price($objp->subprice) : '')."'.price($objp->multicurrency_subprice).''.$objp->qty.'