mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
* FIX #35766: Update buying price INT Float loose Decimals . * Fix: keep fk_product_fournisseur_price as int; treat buying price as float (no truncation) [#35766] * Updated per feedback: keep fk_product_fournisseur_price as ?int (rowid) and as float. Adjusted FactureRec::updateline PHPDoc to ?int and float|'' (model still normalizes via price2num). Tested on a recurring line: decimals preserved, FK stored as int, CI green. Minor adjustments before v22 backport * Delete .hooktest * Delete dev/tools/pre-commit/README.md * Delete test/phpunit/phpunit.xml --------- Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
committed by
Laurent Destailleur
parent
17e78c99a2
commit
ea2543e9e4
@@ -1042,7 +1042,7 @@ if (empty($reshook)) {
|
||||
$date_start_fill,
|
||||
$date_end_fill,
|
||||
(int) $fournprice,
|
||||
(int) $buyingprice,
|
||||
(float) $buyingprice,
|
||||
(int) $fk_parent_line
|
||||
);
|
||||
|
||||
|
||||
@@ -1308,7 +1308,7 @@ class FactureRec extends CommonInvoice
|
||||
$sql .= ", total_ttc='".price2num($total_ttc)."'";
|
||||
$sql .= ", date_start_fill=".((int) $date_start_fill);
|
||||
$sql .= ", date_end_fill=".((int) $date_end_fill);
|
||||
$sql .= ", fk_product_fournisseur_price=".($fk_fournprice > 0 ? $fk_fournprice : 'null');
|
||||
$sql .= ", fk_product_fournisseur_price=".($fk_fournprice > 0 ? (int) $fk_fournprice : 'null');
|
||||
$sql .= ", buy_price_ht=".($pa_ht ? price2num($pa_ht) : 0);
|
||||
$sql .= ", info_bits=".((int) $info_bits);
|
||||
$sql .= ", rang=".((int) $rang);
|
||||
|
||||
Reference in New Issue
Block a user