From bab387a82f3af188003fdc79cde9b83f4e6ec22b Mon Sep 17 00:00:00 2001 From: Quentin-Seekness <72733832+Quentin-Seekness@users.noreply.github.com> Date: Mon, 26 Sep 2022 11:51:04 +0200 Subject: [PATCH] Stock at date estimated value calculation The calculation was done in the sql request (pmp * reel or pmp * stock depending if a warehouse has been selectionned). But the real stock at date is calculated below this request (from l. 509 to l. 534). The estimated value displayed (l. 567) is not correct anymore and should use the calculated stock instead. --- htdocs/product/stock/stockatdate.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/product/stock/stockatdate.php b/htdocs/product/stock/stockatdate.php index d88355c6912..760fc338e21 100644 --- a/htdocs/product/stock/stockatdate.php +++ b/htdocs/product/stock/stockatdate.php @@ -243,7 +243,7 @@ $num = 0; $title = $langs->trans('StockAtDate'); -$sql = 'SELECT p.rowid, p.ref, p.label, p.description, p.price,'; +$sql = 'SELECT p.rowid, p.ref, p.label, p.description, p.price, p.pmp,'; $sql .= ' p.price_ttc, p.price_base_type, p.fk_product_type, p.desiredstock, p.seuil_stock_alerte,'; $sql .= ' p.tms as datem, p.duration, p.tobuy, p.stock, '; if ($fk_warehouse > 0) { @@ -565,12 +565,12 @@ while ($i < ($limit ? min($num, $limit) : $num)) { // PMP value print '