Merge pull request 'changed logic in panel gr master importer' (#931) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 12s
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 12s
Reviewed-on: #931
This commit was merged in pull request #931.
This commit is contained in:
@@ -116,11 +116,11 @@ class PanelGrMasterImporter extends Importer
|
|||||||
$warnMsg[] = 'Quantity must be greater than 0.';
|
$warnMsg[] = 'Quantity must be greater than 0.';
|
||||||
}
|
}
|
||||||
|
|
||||||
$existingRecord = PanelGrMaster::where('document_number', $this->data['document_number'])->where('plant_id', $this->data['plant'])->first();
|
$existingRecord = PanelGrMaster::where('document_number', $this->data['document_number'])->where('inspection_lot_number', $this->data['inspection_lot_number'])->where('plant_id', $this->data['plant'])->first();
|
||||||
|
|
||||||
if ($existingRecord && $existingRecord->invoice_number != $this->data['invoice_number'])
|
if ($existingRecord)
|
||||||
{
|
{
|
||||||
$warnMsg[] = "Document Number '{$this->data['document_number']}' is already associated with Invoice Number '{$existingRecord->invoice_number}'.";
|
$warnMsg[] = "Document Number '{$this->data['document_number']}' is already associated with Inspection Lot Number '{$existingRecord->inspection_lot_number}'.";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($warnMsg)) {
|
if (! empty($warnMsg)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user