Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur
2025-11-01 19:37:25 +01:00
2 changed files with 4 additions and 2 deletions

View File

@@ -34,6 +34,7 @@ require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/cashcontrol/class/cashcontrol.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
/**
* @var Conf $conf
@@ -355,7 +356,7 @@ if ($action == "create" || $action == "start" || $action == 'close') {
$sql .= " WHERE pf.fk_facture = f.rowid AND p.rowid = pf.fk_paiement AND cp.id = p.fk_paiement";
$sql .= " AND f.module_source = '".$db->escape($posmodule)."'";
$sql .= " AND f.pos_source = '".$db->escape($terminalid)."'";
$sql .= " AND f.paye = 1";
$sql .= " AND (f.fk_statut = ".Facture::STATUS_VALIDATED." OR f.fk_statut = ".Facture::STATUS_CLOSED.")";
$sql .= " AND p.entity IN (".getEntity('facture').")";
if ($key == 'cash') {
$sql .= " AND cp.code = 'LIQ'";

View File

@@ -454,7 +454,8 @@ class MouvementStock extends CommonObject
$qtyisnotenough = 0;
if (isset($product->stock_warehouse[$entrepot_id])) {
foreach ($product->stock_warehouse[$entrepot_id]->detail_batch as $batchcursor => $prodbatch) {
if ((string) $batch != (string) $batchcursor) { // Lot '59' must be different than lot '59c'
// Lot '59' must be different than lot '59c' and also '0123' must be different than '123'
if ((string) $batch !== (string) $batchcursor) {
continue;
}