mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix warning
This commit is contained in:
parent
7e277aa6ef
commit
17ae12abfd
|
|
@ -3245,7 +3245,7 @@ class Facture extends CommonInvoice
|
|||
$sortorder = 'ASC,ASC,ASC,ASC';
|
||||
}
|
||||
|
||||
$resBatchList = $productbatch->findAllForProduct($productStatic->id, $idwarehouse, (!empty($conf->global->STOCK_ALLOW_NEGATIVE_TRANSFER) ? null : 0), $sortfield, $sortorder);
|
||||
$resBatchList = $productbatch->findAllForProduct($productStatic->id, $idwarehouse, (getDolGlobalInt('STOCK_ALLOW_NEGATIVE_TRANSFER') ? null : 0), $sortfield, $sortorder);
|
||||
if (!is_array($resBatchList)) {
|
||||
$error++;
|
||||
$this->error = $this->db->lasterror();
|
||||
|
|
@ -3288,7 +3288,7 @@ class Facture extends CommonInvoice
|
|||
}
|
||||
|
||||
if (!$error && $product_qty_remain > 0) {
|
||||
if ($conf->global->STOCK_ALLOW_NEGATIVE_TRANSFER) {
|
||||
if (getDolGlobalInt('STOCK_ALLOW_NEGATIVE_TRANSFER')) {
|
||||
// take in the first batch
|
||||
$batch = $batchList[0];
|
||||
$result = $mouvP->livraison($user, $productStatic->id, $idwarehouse, $product_qty_remain, $this->lines[$i]->subprice, $langs->trans('InvoiceValidatedInDolibarr', $num), '', '', '', $batch->batch);
|
||||
|
|
|
|||
|
|
@ -1268,7 +1268,7 @@ if ($action == 'create') {
|
|||
print '<!-- Show warehouse selection -->';
|
||||
|
||||
$stockMin = false;
|
||||
if (empty($conf->global->STOCK_ALLOW_NEGATIVE_TRANSFER)) {
|
||||
if (!getDolGlobalInt('STOCK_ALLOW_NEGATIVE_TRANSFER')) {
|
||||
$stockMin = 0;
|
||||
}
|
||||
print $formproduct->selectWarehouses($tmpentrepot_id, 'entl'.$indiceAsked, '', 1, 0, $line->fk_product, '', 1, 0, array(), 'minwidth200', '', 1, $stockMin, 'stock DESC, e.ref');
|
||||
|
|
|
|||
|
|
@ -391,7 +391,7 @@ class MouvementStock extends CommonObject
|
|||
|
||||
// Check if stock is enough when qty is < 0
|
||||
// Note that qty should be > 0 with type 0 or 3, < 0 with type 1 or 2.
|
||||
if ($movestock && $qty < 0 && empty($conf->global->STOCK_ALLOW_NEGATIVE_TRANSFER)) {
|
||||
if ($movestock && $qty < 0 && !getDolGlobalInt('STOCK_ALLOW_NEGATIVE_TRANSFER')) {
|
||||
if (isModEnabled('productbatch') && $product->hasbatch() && !$skip_batch) {
|
||||
$foundforbatch = 0;
|
||||
$qtyisnotenough = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user