added one more validation in customer po master #815

Merged
jothi merged 1 commits from ranjith-dev into master 2026-07-08 04:23:26 +00:00
Showing only changes of commit d213049fdd - Show all commits

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