Add option to avoid use of input price inc tax (works only for 1st tax)

This commit is contained in:
Laurent Destailleur 2023-03-11 19:38:39 +01:00
parent 6969cde52d
commit 81d2618b59
4 changed files with 4 additions and 4 deletions

View File

@ -410,7 +410,7 @@ if ($nolinesbefore) {
</td>
<?php
}
if (!empty($inputalsopricewithtax)) {
if (!empty($inputalsopricewithtax) && !getDolGlobalInt('MAIN_NO_INPUT_PRICE_WITH_TAX')) {
$coldisplay++;
?>
<td class="nobottom linecoluttc right">

View File

@ -223,7 +223,7 @@ $coldisplay++;
print '<td class="right"><input rel="'.$object->multicurrency_tx.'" type="text" class="flat right" size="5" id="multicurrency_subprice" name="multicurrency_subprice" value="'.(GETPOSTISSET('multicurrency_subprice') ? GETPOST('multicurrency_subprice', 'alpha') : price($line->multicurrency_subprice)).'" /></td>';
}
if ($inputalsopricewithtax) {
if (!empty($inputalsopricewithtax) && !getDolGlobalInt('MAIN_NO_INPUT_PRICE_WITH_TAX')) {
$coldisplay++;
print '<td class="right"><input type="text" class="flat right" size="5" id="price_ttc" name="price_ttc" value="'.(GETPOSTISSET('price_ttc') ? GETPOST('price_ttc') : (isset($line->pu_ttc) ? price($line->pu_ttc, 0, '', 0) : '')).'"';
if ($line->fk_prev_id != null) {

View File

@ -92,7 +92,7 @@ if (isModEnabled("multicurrency") && $this->multicurrency_code != $conf->currenc
print '<th class="linecoluht_currency right" style="width: 80px">'.$langs->trans('PriceUHTCurrency', $this->multicurrency_code).'</th>';
}
if ($inputalsopricewithtax) {
if (!empty($inputalsopricewithtax) && !getDolGlobalInt('MAIN_NO_INPUT_PRICE_WITH_TAX')) {
print '<th class="right nowraponall">'.$langs->trans('PriceUTTC').'</th>';
}

View File

@ -325,7 +325,7 @@ print $tooltiponpriceend;
<td class="linecoluht_currency nowraponall right"><?php $coldisplay++; ?><?php print price($sign * $line->multicurrency_subprice); ?></td>
<?php }
if ($inputalsopricewithtax) { ?>
if (!empty($inputalsopricewithtax) && !getDolGlobalInt('MAIN_NO_INPUT_PRICE_WITH_TAX')) { ?>
<td class="linecoluttc nowraponall right"><?php $coldisplay++; ?><?php print (isset($line->pu_ttc) ? price($sign * $line->pu_ttc) : price($sign * $line->subprice)); ?></td>
<?php } ?>