diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 4af0679920d..d79c3def247 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -3702,7 +3702,13 @@ function vatrate($rate, $addpercent=false, $info_bits=0, $usestarfornpr=0)
$info_bits |= 1;
}
- $ret=price($rate,0,'',0,0).($addpercent?'%':'');
+ // If rate is '9/9/9' we don't change it. If rate is '9.000' we apply price()
+ if (! preg_match('/\//', $rate)) $ret=price($rate,0,'',0,0).($addpercent?'%':'');
+ else
+ {
+ // TODO Split on / and output with a price2num to have clean numbers with ton of 000.
+ $ret=$rate.($addpercent?'%':'');
+ }
if ($info_bits & 1) $ret.=' *';
$ret.=$morelabel;
return $ret;
diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php
index c347c693691..5cfe2459247 100644
--- a/htdocs/core/tpl/objectline_view.tpl.php
+++ b/htdocs/core/tpl/objectline_view.tpl.php
@@ -32,7 +32,7 @@
* $usemargins (0 to disable all margins columns, 1 to show according to margin setup)
* $object_rights->creer initialized from = $object->getRights()
* $disableedit, $disablemove, $disableremove
- *
+ *
* $type, $text, $description, $line
*/
@@ -55,7 +55,7 @@ if (empty($outputalsopricetotalwithtax)) $outputalsopricetotalwithtax=0;
|
- info_bits & 2) == 2) {
?>
@@ -83,7 +83,7 @@ if (empty($outputalsopricetotalwithtax)) $outputalsopricetotalwithtax=0;
$discount->fetch($line->fk_remise_except);
echo ($txt?' - ':'').$langs->transnoentities("DiscountFromDeposit",$discount->getNomUrl(0));
// Add date of deposit
- if (! empty($conf->global->INVOICE_ADD_DEPOSIT_DATE))
+ if (! empty($conf->global->INVOICE_ADD_DEPOSIT_DATE))
echo ' ('.dol_print_date($discount->datec).')';
}
elseif ($line->description == '(EXCESS RECEIVED)' && $objp->fk_remise_except > 0)
@@ -101,11 +101,11 @@ if (empty($outputalsopricetotalwithtax)) $outputalsopricetotalwithtax=0;
else
{
$format = $conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE?'dayhour':'day';
-
+
if ($line->fk_product > 0)
{
echo $form->textwithtooltip($text,$description,3,'','',$i,0,(!empty($line->fk_parent_line)?img_picto('', 'rightarrow'):''));
-
+
// Show range
echo get_date_range($line->date_start, $line->date_end, $format);
@@ -138,17 +138,26 @@ if (empty($outputalsopricetotalwithtax)) $outputalsopricetotalwithtax=0;
|
element == 'supplier_proposal') { ?>
ref_fourn; ?> |
-
- tva_tx.($line->vat_src_code?(' ('.$line->vat_src_code.')'):''), '%', $line->info_bits); ?> |
+ tva_tx)) $positiverates.=($positiverates?'/':'').price2num($line->tva_tx);
+ if (price2num($line->localtax1_tx)) $positiverates.=($positiverates?'/':'').price2num($line->localtax1_tx);
+ if (price2num($line->localtax2_tx)) $positiverates.=($positiverates?'/':'').price2num($line->localtax2_tx);
+ if (empty($positiverates)) $positiverates='0';
+ echo vatrate($positiverates.($line->vat_src_code?' ('.$line->vat_src_code.')':''), '%', $line->info_bits);
+ //echo vatrate($line->tva_tx.($line->vat_src_code?(' ('.$line->vat_src_code.')'):''), '%', $line->info_bits);
+ ?> |
subprice); ?> |
-
+
multicurrency->enabled)) { ?>
multicurrency_subprice); ?> |
-
+
pu_ttc)?price($line->pu_ttc):price($line->subprice)); ?> |
@@ -194,7 +203,7 @@ if (empty($outputalsopricetotalwithtax)) $outputalsopricetotalwithtax=0;
{
$rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT,$conf->global->MAIN_MAX_DECIMALS_TOT);
?>
-
+
rights->margins->creer)) { ?>
pa_ht); ?> |
@@ -220,7 +229,7 @@ if (empty($outputalsopricetotalwithtax)) $outputalsopricetotalwithtax=0;
- statut == 0 && ($object_rights->creer)) { ?>
info_bits & 2) == 2 || ! empty($disableedit)) { ?>
@@ -241,7 +250,7 @@ if (empty($outputalsopricetotalwithtax)) $outputalsopricetotalwithtax=0;
?>
|
- 1 && empty($conf->browser->phone) && ($this->situation_counter == 1 || !$this->situation_cycle_ref) && empty($disablemove)) { ?>
0) { ?>
|