modified logic against customer po in create page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 20s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 2m49s
Laravel Larastan / larastan (pull_request) Failing after 4m34s
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 20s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 2m49s
Laravel Larastan / larastan (pull_request) Failing after 4m34s
This commit is contained in:
@@ -54,8 +54,6 @@ class CreateWireMasterPacking extends CreateRecord
|
||||
|
||||
$customerPo = trim($this->form->getState()['customer_po_master_id'])?? null;
|
||||
|
||||
$selectedItem = trim($this->form->getState()['item_id'])?? null;
|
||||
|
||||
$wirePackNo = trim($this->form->getState()['wire_packing_number'])?? null;
|
||||
|
||||
$wirePackNo = trim($wirePackNo) ?? null;
|
||||
@@ -166,30 +164,6 @@ class CreateWireMasterPacking extends CreateRecord
|
||||
return;
|
||||
}
|
||||
|
||||
$itemId = Item::where('code', $materialCode)
|
||||
->where('plant_id', $plantId)
|
||||
->value('id');
|
||||
|
||||
if($itemId != $selectedItem){
|
||||
Notification::make()
|
||||
->title("Item Code Mismatch")
|
||||
->body("Scanned Item Code '$materialCode' does not match the selected Item in the form.")
|
||||
->danger()
|
||||
->duration(5000)
|
||||
->send();
|
||||
|
||||
$this->form->fill([
|
||||
'process_order' => null,
|
||||
'plant_id' => $plantId,
|
||||
'customer_po_master_id' => $customerPo,
|
||||
'wire_packing_number' => $wirePackNo,
|
||||
'Sno_quantity' => 0,
|
||||
'created_by' => $operatorName,
|
||||
'scanned_by' => $operatorName,
|
||||
]);
|
||||
return;
|
||||
}
|
||||
|
||||
$icodeAgaCPoPlant = CustomerPoMaster::where('item_id', $itemId)->where('plant_id', $plantId)->first();
|
||||
|
||||
if(!$icodeAgaCPoPlant)
|
||||
@@ -282,7 +256,7 @@ class CreateWireMasterPacking extends CreateRecord
|
||||
{
|
||||
Notification::make()
|
||||
->title("Scanned Weight Exceeds PO Quantity")
|
||||
->body("Scanned weight '$weight' and already scanned weight '$alreadyScannedQty' exceeds allowed quantity '{$customerPoRecord->quantity}' for PO '$customerPoRecord->name' and Item '$materialCode'")
|
||||
->body("Scanned weight '$weight' and already scanned weight '$alreadyScannedQty' exceeds allowed quantity '{$customerPoRecord->quantity}' for PO '$customerPoRecord->customer_po' and Item '$materialCode'")
|
||||
->danger()
|
||||
->duration(5000)
|
||||
->send();
|
||||
|
||||
Reference in New Issue
Block a user