Merge pull request 'added one more validation in customer po master' (#815) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Reviewed-on: #815
This commit was merged in pull request #815.
This commit is contained in:
@@ -111,6 +111,13 @@ class CustomerPoMasterImporter extends Importer
|
|||||||
$warnMsg[] = "Customer PO '{$this->data['customer_po']}' is already mapped to customer '{$existingPo->customer_name}'.";
|
$warnMsg[] = "Customer PO '{$this->data['customer_po']}' is already mapped to customer '{$existingPo->customer_name}'.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$existingPoItem = CustomerPoMaster::where('plant_id', $plant->id)->where('item_id', $item->id)->where('customer_po', $this->data['customer_po'])->where('customer_name', $this->data['customer_name'])->first();
|
||||||
|
|
||||||
|
if ($existingPoItem)
|
||||||
|
{
|
||||||
|
$warnMsg[] = "Customer PO '{$this->data['customer_po']}' is already exist with item code '{$this->data['item']}' and customer name '{$this->data['customer_name']}'.";
|
||||||
|
}
|
||||||
|
|
||||||
// $user = User::where('name', $this->data['created_by'])->first();
|
// $user = User::where('name', $this->data['created_by'])->first();
|
||||||
// if (! $user) {
|
// if (! $user) {
|
||||||
// $warnMsg[] = 'User not found';
|
// $warnMsg[] = 'User not found';
|
||||||
|
|||||||
Reference in New Issue
Block a user