Revert "doc"

This reverts commit 380cae761a.
This commit is contained in:
Laurent Destailleur 2022-06-25 04:06:55 +02:00
parent 380cae761a
commit eeaa4f8205
3 changed files with 6 additions and 14 deletions

View File

@ -2155,7 +2155,7 @@ elseif ($id || $ref)
//if ($filter) $sql.= $filter;
$sql .= " ORDER BY obj.fk_product";
dol_syslog("expedition/card.php get list of shipment lines", LOG_DEBUG);
dol_syslog("get list of shipment lines", LOG_DEBUG);
$resql = $db->query($sql);
if ($resql)
{

View File

@ -801,12 +801,6 @@ class Expedition extends CommonObject
}
}
}
// If stock is now 0, we can remove entry into llx_product_stock, but only if there is no child lines into llx_product_batch (detail of batch, because we can imagine
// having a lot1/qty=X and lot2/qty=-X, so 0 but we must not loose repartition of different lot.
$sql = "DELETE FROM ".MAIN_DB_PREFIX."product_stock WHERE reel = 0 AND rowid NOT IN (SELECT fk_product_stock FROM ".MAIN_DB_PREFIX."product_batch as pb)";
$resql = $this->db->query($sql);
// We do not test error, it can fails if there is child in batch details
}
else
{

View File

@ -571,13 +571,11 @@ class MouvementStock extends CommonObject
}
}
if (empty($donotcleanemptyline)) {
// If stock is now 0, we can remove entry into llx_product_stock, but only if there is no child lines into llx_product_batch (detail of batch, because we can imagine
// having a lot1/qty=X and lot2/qty=-X, so 0 but we must not loose repartition of different lot.
$sql = "DELETE FROM ".MAIN_DB_PREFIX."product_stock WHERE reel = 0 AND rowid NOT IN (SELECT fk_product_stock FROM ".MAIN_DB_PREFIX."product_batch as pb)";
$resql = $this->db->query($sql);
// We do not test error, it can fails if there is child in batch details
}
// If stock is now 0, we can remove entry into llx_product_stock, but only if there is no child lines into llx_product_batch (detail of batch, because we can imagine
// having a lot1/qty=X and lot2/qty=-X, so 0 but we must not loose repartition of different lot.
$sql = "DELETE FROM ".MAIN_DB_PREFIX."product_stock WHERE reel = 0 AND rowid NOT IN (SELECT fk_product_stock FROM ".MAIN_DB_PREFIX."product_batch as pb)";
$resql = $this->db->query($sql);
// We do not test error, it can fails if there is child in batch details
}
// Add movement for sub products (recursive call)