Debug v18. Complete #25309

This commit is contained in:
Laurent Destailleur 2023-07-26 03:20:22 +02:00
parent d9a1d08939
commit d08e592bbd
3 changed files with 9 additions and 9 deletions

View File

@ -579,11 +579,11 @@ if (empty($reshook)) {
$localtax2_tx = get_localtax($tva_tx, 2, $mysoc, $object->thirdparty, $tva_npr);
$type = $productsupplier->type;
if (GETPOST('price_ht') != '' || GETPOST('price_ht_devise') != '') {
if (GETPOST('price_ht') != '' || GETPOST('multicurrency_price_ht') != '') {
$price_base_type = 'HT';
$pu = price2num($price_ht, 'MU');
$pu_devise = price2num($price_ht_devise, 'CU');
} elseif (GETPOST('price_ttc') != '' || GETPOST('price_ttc_devise') != '') {
} elseif (GETPOST('price_ttc') != '' || GETPOST('multicurrency_price_ttc') != '') {
$price_base_type = 'TTC';
$pu = price2num($price_ttc, 'MU');
$pu_devise = price2num($price_ttc_devise, 'CU');
@ -658,7 +658,7 @@ if (empty($reshook)) {
$localtax1_tx = get_localtax($tva_tx, 1, $mysoc, $object->thirdparty);
$localtax2_tx = get_localtax($tva_tx, 2, $mysoc, $object->thirdparty);
if (GETPOST('price_ht') != '' || GETPOST('price_ht_devise') != '') {
if (GETPOST('price_ht') != '' || GETPOST('multicurrency_price_ht') != '') {
$pu_ht = price2num($price_ht, 'MU'); // $pu_ht must be rounded according to settings
} else {
$pu_ttc = price2num(GETPOST('price_ttc'), 'MU');

View File

@ -1618,11 +1618,11 @@ if (empty($reshook)) {
$localtax2_tx = get_localtax($tva_tx, 2, $mysoc, $object->thirdparty, $tva_npr);
$type = $productsupplier->type;
if (GETPOST('price_ht') != '' || GETPOST('price_ht_devise') != '') {
if (GETPOST('price_ht') != '' || GETPOST('multicurrency_price_ht') != '') {
$price_base_type = 'HT';
$pu = price2num($price_ht, 'MU');
$pu_devise = price2num($price_ht_devise, 'CU');
} elseif (GETPOST('price_ttc') != '' || GETPOST('price_ttc_devise') != '') {
} elseif (GETPOST('price_ttc') != '' || GETPOST('multicurrency_price_ttc') != '') {
$price_base_type = 'TTC';
$pu = price2num($price_ttc, 'MU');
$pu_devise = price2num($price_ttc_devise, 'CU');
@ -1706,7 +1706,7 @@ if (empty($reshook)) {
$localtax1_tx = get_localtax($tva_tx, 1, $mysoc, $object->thirdparty);
$localtax2_tx = get_localtax($tva_tx, 2, $mysoc, $object->thirdparty);
if (GETPOST('price_ht') != '' || GETPOST('price_ht_devise') != '') {
if (GETPOST('price_ht') != '' || GETPOST('multicurrency_price_ht') != '') {
$pu_ht = price2num($price_ht, 'MU'); // $pu_ht must be rounded according to settings
} else {
$pu_ttc = price2num(GETPOST('price_ttc'), 'MU');

View File

@ -733,11 +733,11 @@ if (empty($reshook)) {
$localtax2_tx = get_localtax($tva_tx, 2, $mysoc, $object->thirdparty, $tva_npr);
$type = $productsupplier->type;
if (GETPOST('price_ht') != '' || GETPOST('price_ht_devise') != '') {
if (GETPOST('price_ht') != '' || GETPOST('multicurrency_price_ht') != '') {
$price_base_type = 'HT';
$pu = price2num($price_ht, 'MU');
$pu_devise = price2num($price_ht_devise, 'CU');
} elseif (GETPOST('price_ttc') != '' || GETPOST('price_ttc_devise') != '') {
} elseif (GETPOST('price_ttc') != '' || GETPOST('multicurrency_price_ttc') != '') {
$price_base_type = 'TTC';
$pu = price2num($price_ttc, 'MU');
$pu_devise = price2num($price_ttc_devise, 'CU');
@ -829,7 +829,7 @@ if (empty($reshook)) {
$localtax1_tx = get_localtax($tva_tx, 1, $mysoc, $object->thirdparty);
$localtax2_tx = get_localtax($tva_tx, 2, $mysoc, $object->thirdparty);
if (GETPOST('price_ht') != '' || GETPOST('price_ht_devise') != '') {
if (GETPOST('price_ht') != '' || GETPOST('multicurrency_price_ht') != '') {
$pu_ht = price2num($price_ht, 'MU'); // $pu_ht must be rounded according to settings
} else {
$pu_ttc = price2num(GETPOST('price_ttc'), 'MU');