Added cycle count page and stock data table livewire page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 12s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 13s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 18s
Laravel Pint / pint (pull_request) Successful in 2m42s
Laravel Larastan / larastan (pull_request) Failing after 3m31s

This commit is contained in:
dhanabalan
2026-03-10 10:54:25 +05:30
parent 23908b1493
commit 363241b880
2 changed files with 362 additions and 91 deletions

View File

@@ -87,6 +87,7 @@ class StockDataTable extends Component
->where('location', $location)
->where('sticker_master_id', $stickerMasterId)
->where('doc_no', $docNo)
->where('bin', $bin)
->first();
if (!$record) {
@@ -123,6 +124,49 @@ class StockDataTable extends Component
}
}
public function confirmSerialUpdate($plantId, $location, $bin, $sNo, $stickerMasterId, $batch, $docNo, $quantity)
{
$record = NotInStock::where('plant_id', $plantId)
->where('location', $location)
->where('sticker_master_id', $stickerMasterId)
->where('doc_no', $docNo)
->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,
'doc_no' => $docNo ?? null,
]);
Notification::make()
->title('Record updated in not in stock table.')
->success()
->send();
}
}
public function loadCompletedData($location, $plantId, $isSerial)
{
$this->plantId = $plantId;