mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-11 03:51:25 +01:00
Fix rounding of foreign amount
This commit is contained in:
@@ -4826,7 +4826,8 @@ function price($amount, $form = 0, $outlangs = '', $trunc = 1, $rounding = -1, $
|
|||||||
* 'MU'=Round to Max unit price (MAIN_MAX_DECIMALS_UNIT)
|
* 'MU'=Round to Max unit price (MAIN_MAX_DECIMALS_UNIT)
|
||||||
* 'MT'=Round to Max for totals with Tax (MAIN_MAX_DECIMALS_TOT)
|
* 'MT'=Round to Max for totals with Tax (MAIN_MAX_DECIMALS_TOT)
|
||||||
* 'MS'=Round to Max for stock quantity (MAIN_MAX_DECIMALS_STOCK)
|
* 'MS'=Round to Max for stock quantity (MAIN_MAX_DECIMALS_STOCK)
|
||||||
* 'CR'=Foreign currency accurancy
|
* 'CU'=Round to Max unit price of foreign currency accuracy
|
||||||
|
* 'CT'=Round to Max for totals with Tax of foreign currency accuracy
|
||||||
* Numeric = Nb of digits for rounding
|
* Numeric = Nb of digits for rounding
|
||||||
* @param int $option Put 1 if you know that content is already universal format number (so no correction on decimal will be done)
|
* @param int $option Put 1 if you know that content is already universal format number (so no correction on decimal will be done)
|
||||||
* Put 2 if you know that number is a user input (so we know we don't have to fix decimal separator).
|
* Put 2 if you know that number is a user input (so we know we don't have to fix decimal separator).
|
||||||
|
|||||||
@@ -869,7 +869,7 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
|
|
||||||
$price_base_type = 'HT';
|
$price_base_type = 'HT';
|
||||||
$pu_ht_devise = GETPOST('multicurrency_subprice', 'CU');
|
$pu_ht_devise = price2num(GETPOST('multicurrency_subprice'), 'CU');
|
||||||
|
|
||||||
// Add buying price
|
// Add buying price
|
||||||
$fournprice = (GETPOST('fournprice') ? GETPOST('fournprice') : '');
|
$fournprice = (GETPOST('fournprice') ? GETPOST('fournprice') : '');
|
||||||
|
|||||||
Reference in New Issue
Block a user