Merge pull request #22896 from FHenry/dev_add_lotBatch_in_recpetion_Object_forPDF
NEW: add batch lot for reception and squille PDF
This commit is contained in:
commit
6c9521560e
@ -118,6 +118,10 @@ class Reception extends CommonObject
|
||||
public $lines = array();
|
||||
|
||||
|
||||
// detail of lot and qty = array(id in llx_commande_fournisseur_dispatch, batch, qty)
|
||||
// We can use this to know warehouse planned to be used for each lot.
|
||||
public $detail_batch;
|
||||
|
||||
const STATUS_DRAFT = 0;
|
||||
const STATUS_VALIDATED = 1;
|
||||
const STATUS_CLOSED = 2;
|
||||
@ -1209,6 +1213,14 @@ class Reception extends CommonObject
|
||||
|
||||
$this->total_ttc += $pu_ht + $tva;
|
||||
|
||||
if (isModEnabled('productbatch') && !empty($line->batch)) {
|
||||
$detail_batch = new stdClass();
|
||||
$detail_batch->eatby = $line->eatby;
|
||||
$detail_batch->sellby = $line->sellby;
|
||||
$detail_batch->batch = $line->batch;
|
||||
$detail_batch->qty = $line->qty;
|
||||
$line->detail_batch[] = $detail_batch;
|
||||
}
|
||||
|
||||
$this->lines[] = $line;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user