added one more validation in customer po master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 18s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 21s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 2m21s
Laravel Larastan / larastan (pull_request) Failing after 4m13s

This commit is contained in:
dhanabalan
2026-07-08 09:53:08 +05:30
parent 42e926f9c2
commit d213049fdd

View File

@@ -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';