fix #35503 - Wrong format of buying price in dispatch.php / reception.php (#35504)

* Change price calculation method in dispatch.php

In output field price should be used instead of price2num, other formatting does not work (esp. when you use German langugae settings)

* Format cost price before displaying in input field

In output field price should be used, otherwise formatting does not work (esp. when you use German langugae settings)

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
Günter Lukas
2025-09-26 23:50:57 +02:00
committed by GitHub
parent 1427895a62
commit ee0dd8b672
2 changed files with 3 additions and 3 deletions

View File

@@ -938,9 +938,9 @@ if ($id > 0 || !empty($ref)) {
print '<!-- This is a up (may include discount or not depending on STOCK_EXCLUDE_DISCOUNT_FOR_PMP. will be used for PMP calculation) -->';
if (getDolGlobalString('SUPPLIER_ORDER_EDIT_BUYINGPRICE_DURING_RECEIPT')) { // Not tested !
print $langs->trans("BuyingPrice").': <input class="maxwidth75" name="pu'.$suffix.'" type="text" value="'.price2num($up_ht_disc, 'MU').'">';
print $langs->trans("BuyingPrice").': <input class="maxwidth75" name="pu'.$suffix.'" type="text" value="'.price($up_ht_disc).'">';
} else {
print '<input class="maxwidth75" name="pu'.$suffix.'" type="hidden" value="'.price2num($up_ht_disc, 'MU').'">';
print '<input class="maxwidth75" name="pu'.$suffix.'" type="hidden" value="'.price($up_ht_disc).'">';
}
print '</td>';