Added logic for sfg cycle count in cycle count page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 12s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 18s
Laravel Pint / pint (pull_request) Successful in 2m51s
Laravel Larastan / larastan (pull_request) Failing after 3m50s
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 12s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 18s
Laravel Pint / pint (pull_request) Successful in 2m51s
Laravel Larastan / larastan (pull_request) Failing after 3m50s
This commit is contained in:
@@ -52,7 +52,7 @@ class StockDataTable extends Component
|
||||
|
||||
public bool $isSfg = false;
|
||||
|
||||
public $itemCode, $serialNumber;
|
||||
public $itemCode, $serialNumber, $serial_number;
|
||||
|
||||
public $scannedSfgData = [];
|
||||
|
||||
@@ -64,6 +64,8 @@ class StockDataTable extends Component
|
||||
'refreshSfgData' => 'loadSfgData',
|
||||
'refreshSfgNonData' => 'loadSfgNonQuanData',
|
||||
'confirmStockUpdate',
|
||||
'confirmSerialUpdate',
|
||||
'confirmSerialFGUpdate'
|
||||
];
|
||||
|
||||
public $capacitorInput = '';
|
||||
@@ -80,6 +82,8 @@ class StockDataTable extends Component
|
||||
|
||||
public $stickerMasterId;
|
||||
|
||||
public $sNo;
|
||||
|
||||
public function confirmStockUpdate($plantId, $location, $bin, $stickerMasterId, $batch, $docNo, $quantity)
|
||||
{
|
||||
|
||||
@@ -124,13 +128,54 @@ class StockDataTable extends Component
|
||||
}
|
||||
}
|
||||
|
||||
public function confirmSerialUpdate($plantId, $location, $bin, $sNo, $stickerMasterId, $batch, $docNo, $quantity)
|
||||
public function confirmSerialUpdate($plantId, $location, $bin, $serial_number, $stickerMasterId, $batch, $docNo, $quantity)
|
||||
{
|
||||
$sNo = $serial_number;
|
||||
$record = NotInStock::where('plant_id', $plantId)
|
||||
->where('location', $location)
|
||||
->where('sticker_master_id', $stickerMasterId)
|
||||
->where('serial_number', $sNo)
|
||||
->where('bin', $bin)
|
||||
->first();
|
||||
|
||||
if (!$record) {
|
||||
|
||||
NotInStock::create([
|
||||
'plant_id' => $plantId,
|
||||
'location' => $location,
|
||||
'bin' => $bin,
|
||||
'sticker_master_id' => $stickerMasterId,
|
||||
'type' => '1',
|
||||
'serial_number' => $sNo ?? null,
|
||||
'batch' => $batch ?? null,
|
||||
'doc_no' => $docNo ?? null,
|
||||
'scanned_quantity' => $quantity ?? '1',
|
||||
]);
|
||||
|
||||
Notification::make()
|
||||
->title('Record inserted successfully in not in stock table.')
|
||||
->success()
|
||||
->send();
|
||||
|
||||
} else {
|
||||
|
||||
$record->update([
|
||||
'batch' => $batch ?? null,
|
||||
]);
|
||||
|
||||
Notification::make()
|
||||
->title('Record updated in not in stock table.')
|
||||
->success()
|
||||
->send();
|
||||
}
|
||||
}
|
||||
|
||||
public function confirmSerialFGUpdate($plantId, $location, $bin, $sNo, $stickerMasterId)
|
||||
{
|
||||
|
||||
$record = NotInStock::where('plant_id', $plantId)
|
||||
->where('location', $location)
|
||||
->where('sticker_master_id', $stickerMasterId)
|
||||
->where('doc_no', $docNo)
|
||||
->where('bin', $bin)
|
||||
->first();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user