FIX Better support for option MAIN_NO_INPUT_PRICE_WITH_TAX
This commit is contained in:
parent
8af81ff89b
commit
424c53109f
@ -761,7 +761,7 @@ if (!empty($usemargins) && $user->rights->margins->creer) {
|
|||||||
jQuery('#date_end').removeClass('inputmandatory');
|
jQuery('#date_end').removeClass('inputmandatory');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (<?php echo (int) $inputalsopricewithtax; ?> == 1 && data.pricebasetype == 'TTC') {
|
if (<?php echo (int) $inputalsopricewithtax; ?> == 1 && data.pricebasetype == 'TTC' && <?php print getDolGlobalInt('MAIN_NO_INPUT_PRICE_WITH_TAX') ? 'false' : 'true'; ?>) {
|
||||||
console.log("objectline_create.tpl set content of price_ttc");
|
console.log("objectline_create.tpl set content of price_ttc");
|
||||||
jQuery("#price_ttc").val(data.price_ttc);
|
jQuery("#price_ttc").val(data.price_ttc);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -219,7 +219,7 @@ if (!defined('NOREQUIREDB') && !defined('NOREQUIRESOC')) {
|
|||||||
$conf->global->MAIN_PROFID1_IN_ADDRESS = 1;
|
$conf->global->MAIN_PROFID1_IN_ADDRESS = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($mysoc->localtax1_assuj || $mysoc->localtax2_assuj) {
|
if (($mysoc->localtax1_assuj || $mysoc->localtax2_assuj) && !isset($conf->global->MAIN_NO_INPUT_PRICE_WITH_TAX)) {
|
||||||
// For countries using the 2nd or 3rd tax, we disable input/edit of lines using the price including tax (because 2nb and 3rd tax not yet taken into account).
|
// For countries using the 2nd or 3rd tax, we disable input/edit of lines using the price including tax (because 2nb and 3rd tax not yet taken into account).
|
||||||
// Work In Progress to support all taxes into unit price entry when MAIN_UNIT_PRICE_WITH_TAX_IS_FOR_ALL_TAXES is set.
|
// Work In Progress to support all taxes into unit price entry when MAIN_UNIT_PRICE_WITH_TAX_IS_FOR_ALL_TAXES is set.
|
||||||
$conf->global->MAIN_NO_INPUT_PRICE_WITH_TAX = 1;
|
$conf->global->MAIN_NO_INPUT_PRICE_WITH_TAX = 1;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user