Added cycle count page and stock data table livewire page #466
@@ -557,13 +557,24 @@ class CycleCount extends Page
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
Notification::make()
|
Notification::make()
|
||||||
->danger()
|
->title('Unknown : Data Found')
|
||||||
->title('Unknown : Data Found')
|
->body("No matching record found for the given Location, Item Code, Batch, and Document Number under Plant Code '$plantCode' in stock data master.")
|
||||||
->body("No matching record found for the given Location, Item Code, Batch, and Document Number under Plant Code '$plantCode' in stock data master.")
|
->danger()
|
||||||
->seconds(3)
|
->actions([
|
||||||
->send();
|
\Filament\Notifications\Actions\Action::make('confirm_update')
|
||||||
|
->label('Yes, Update')
|
||||||
$this->dispatch('playWarnSound');
|
->button()
|
||||||
|
->dispatch('confirmStockUpdate', [
|
||||||
|
'plantId' => $plantId,
|
||||||
|
'location' => $location,
|
||||||
|
'bin' => $bin,
|
||||||
|
'stickerMasterId' => $stickerMasterId,
|
||||||
|
'batch' => $this->batch,
|
||||||
|
'docNo' => $this->docNo,
|
||||||
|
'quantity' => $this->quantity
|
||||||
|
]),
|
||||||
|
])
|
||||||
|
->send();
|
||||||
|
|
||||||
$this->form->fill([
|
$this->form->fill([
|
||||||
'plant_id' => $plantId,
|
'plant_id' => $plantId,
|
||||||
@@ -572,6 +583,8 @@ class CycleCount extends Page
|
|||||||
'qr_code' => null,
|
'qr_code' => null,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
$this->dispatch('playWarnSound');
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -597,6 +610,13 @@ class CycleCount extends Page
|
|||||||
->body("Item Code should contain minimum 6 digits '$this->itemCode'")
|
->body("Item Code should contain minimum 6 digits '$this->itemCode'")
|
||||||
->danger()
|
->danger()
|
||||||
->send();
|
->send();
|
||||||
|
|
||||||
|
$this->form->fill([
|
||||||
|
'plant_id' => $plantId,
|
||||||
|
'location' => $location,
|
||||||
|
'bin' => $bin,
|
||||||
|
'qr_code' => null,
|
||||||
|
]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
elseif(!ctype_alnum($this->itemCode)){
|
elseif(!ctype_alnum($this->itemCode)){
|
||||||
@@ -606,6 +626,12 @@ class CycleCount extends Page
|
|||||||
->danger()
|
->danger()
|
||||||
->duration(5000)
|
->duration(5000)
|
||||||
->send();
|
->send();
|
||||||
|
$this->form->fill([
|
||||||
|
'plant_id' => $plantId,
|
||||||
|
'location' => $location,
|
||||||
|
'bin' => $bin,
|
||||||
|
'qr_code' => null,
|
||||||
|
]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
elseif(strlen($this->batch) < 5){
|
elseif(strlen($this->batch) < 5){
|
||||||
@@ -624,6 +650,12 @@ class CycleCount extends Page
|
|||||||
->danger()
|
->danger()
|
||||||
->duration(5000)
|
->duration(5000)
|
||||||
->send();
|
->send();
|
||||||
|
$this->form->fill([
|
||||||
|
'plant_id' => $plantId,
|
||||||
|
'location' => $location,
|
||||||
|
'bin' => $bin,
|
||||||
|
'qr_code' => null,
|
||||||
|
]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
elseif(!ctype_alnum($this->sNo)){
|
elseif(!ctype_alnum($this->sNo)){
|
||||||
@@ -633,6 +665,12 @@ class CycleCount extends Page
|
|||||||
->danger()
|
->danger()
|
||||||
->duration(5000)
|
->duration(5000)
|
||||||
->send();
|
->send();
|
||||||
|
$this->form->fill([
|
||||||
|
'plant_id' => $plantId,
|
||||||
|
'location' => $location,
|
||||||
|
'bin' => $bin,
|
||||||
|
'qr_code' => null,
|
||||||
|
]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -645,6 +683,12 @@ class CycleCount extends Page
|
|||||||
->danger()
|
->danger()
|
||||||
->duration(5000)
|
->duration(5000)
|
||||||
->send();
|
->send();
|
||||||
|
$this->form->fill([
|
||||||
|
'plant_id' => $plantId,
|
||||||
|
'location' => $location,
|
||||||
|
'bin' => $bin,
|
||||||
|
'qr_code' => null,
|
||||||
|
]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -661,6 +705,12 @@ class CycleCount extends Page
|
|||||||
->danger()
|
->danger()
|
||||||
->duration(5000)
|
->duration(5000)
|
||||||
->send();
|
->send();
|
||||||
|
$this->form->fill([
|
||||||
|
'plant_id' => $plantId,
|
||||||
|
'location' => $location,
|
||||||
|
'bin' => $bin,
|
||||||
|
'qr_code' => null,
|
||||||
|
]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -675,6 +725,13 @@ class CycleCount extends Page
|
|||||||
->duration(5000)
|
->duration(5000)
|
||||||
->send();
|
->send();
|
||||||
|
|
||||||
|
$this->form->fill([
|
||||||
|
'plant_id' => $plantId,
|
||||||
|
'location' => $location,
|
||||||
|
'bin' => $bin,
|
||||||
|
'qr_code' => null,
|
||||||
|
]);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -689,93 +746,24 @@ class CycleCount extends Page
|
|||||||
->danger()
|
->danger()
|
||||||
->duration(5000)
|
->duration(5000)
|
||||||
->send();
|
->send();
|
||||||
|
$this->form->fill([
|
||||||
|
'plant_id' => $plantId,
|
||||||
|
'location' => $location,
|
||||||
|
'bin' => $bin,
|
||||||
|
'qr_code' => null,
|
||||||
|
]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$stickerMasterId = $stickerExists->id;
|
$stickerMasterId = $stickerExists->id;
|
||||||
|
|
||||||
$serialExist = StockDataMaster::where('serial_number', $this->sNo)->where('type', '1')->first();
|
$quanExist = StockDataMaster::where('plant_id', $plantId)
|
||||||
|
|
||||||
if(!$serialExist){
|
|
||||||
Notification::make()
|
|
||||||
->danger()
|
|
||||||
->title('Unknown Serial Number')
|
|
||||||
->body('Scanned serial number not found in stock data master for the type SFG')
|
|
||||||
->seconds(3)
|
|
||||||
->send();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$serialAgaPlant = StockDataMaster::where('plant_id', $plantId)->where('serial_number', $this->sNo)->where('type', '1')->first();
|
|
||||||
|
|
||||||
if(!$serialAgaPlant){
|
|
||||||
Notification::make()
|
|
||||||
->danger()
|
|
||||||
->title('Unknown Serial Number')
|
|
||||||
->body("Scanned serial number not found in stock data master for the type SFG against plant code '$plantCode'")
|
|
||||||
->seconds(3)
|
|
||||||
->send();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($serialAgaPlant->location != $location) {
|
|
||||||
|
|
||||||
Notification::make()
|
|
||||||
->danger()
|
|
||||||
->title('Invalid Location')
|
|
||||||
->body("Serial number '$this->sNo' does not belong to location '$location' for the type SFG against plant code '$plantCode'.")
|
|
||||||
->seconds(3)
|
|
||||||
->send();
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($serialAgaPlant->sticker_master_id != $stickerMasterId) {
|
|
||||||
|
|
||||||
Notification::make()
|
|
||||||
->danger()
|
|
||||||
->title('Invalid Item Code')
|
|
||||||
->body("Serial number '$this->sNo' does not belong to item code '$this->itemCode' for the type SFG against plant code '$plantCode'.")
|
|
||||||
->seconds(3)
|
|
||||||
->send();
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($serialAgaPlant->batch != '' || $serialAgaPlant->batch != null) {
|
|
||||||
|
|
||||||
if($serialAgaPlant->batch != $this->batch){
|
|
||||||
Notification::make()
|
|
||||||
->danger()
|
|
||||||
->title('Invalid Batch')
|
|
||||||
->body("Serial number '$this->sNo' does not belong to batch '$this->batch' for the type SFG against plant code '$plantCode'.")
|
|
||||||
->seconds(3)
|
|
||||||
->send();
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($serialAgaPlant->bin != '' || $serialAgaPlant->bin != null) {
|
|
||||||
|
|
||||||
if($serialAgaPlant->bin != $bin){
|
|
||||||
Notification::make()
|
|
||||||
->danger()
|
|
||||||
->title('Invalid Bin')
|
|
||||||
->body("Serial number '$this->sNo' does not belong to bin '$bin' for the type SFG against plant code '$plantCode'.")
|
|
||||||
->seconds(3)
|
|
||||||
->send();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$serial = StockDataMaster::where('plant_id', $plantId)
|
|
||||||
->where('serial_number', $this->sNo)
|
->where('serial_number', $this->sNo)
|
||||||
->where('location', $location)
|
->where('location', $location)
|
||||||
->where('type', '1')
|
->where('type', '1')
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
if($serial->quantity == '' || $serial->quantity == null){
|
if($quanExist->quantity == '' || $quanExist->quantity == null){
|
||||||
Notification::make()
|
Notification::make()
|
||||||
->warning()
|
->warning()
|
||||||
->title('Unknown Quantity')
|
->title('Unknown Quantity')
|
||||||
@@ -785,7 +773,7 @@ class CycleCount extends Page
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
elseif ((int) $serial->quantity > 1) {
|
elseif ((int) $quanExist->quantity > 1) {
|
||||||
Notification::make()
|
Notification::make()
|
||||||
->warning()
|
->warning()
|
||||||
->title('Invalid Quantity')
|
->title('Invalid Quantity')
|
||||||
@@ -796,17 +784,256 @@ class CycleCount extends Page
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$serialExist = StockDataMaster::where('serial_number', $this->sNo)->where('type', '1')->first();
|
||||||
|
|
||||||
|
if(!$serialExist){
|
||||||
|
|
||||||
|
Notification::make()
|
||||||
|
->title('Unknown Serial Number')
|
||||||
|
->body('Scanned serial number not found in stock data master for the type SFG')
|
||||||
|
->danger()
|
||||||
|
->actions([
|
||||||
|
\Filament\Notifications\Actions\Action::make('confirm_update')
|
||||||
|
->label('Yes, Update')
|
||||||
|
->button()
|
||||||
|
->dispatch('confirmSerialUpdate', [
|
||||||
|
'plantId' => $plantId,
|
||||||
|
'location' => $location,
|
||||||
|
'bin' => $bin,
|
||||||
|
'serial_number' => $this->sNo,
|
||||||
|
'stickerMasterId' => $stickerMasterId,
|
||||||
|
'batch' => $this->batch,
|
||||||
|
'docNo' => $this->docNo,
|
||||||
|
'quantity' => $this->quantity
|
||||||
|
]),
|
||||||
|
])
|
||||||
|
->send();
|
||||||
|
|
||||||
|
$this->form->fill([
|
||||||
|
'plant_id' => $plantId,
|
||||||
|
'location' => $location,
|
||||||
|
'bin' => $bin,
|
||||||
|
'qr_code' => null,
|
||||||
|
]);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$serialAgaPlant = StockDataMaster::where('plant_id', $plantId)->where('serial_number', $this->sNo)->where('type', '1')->first();
|
||||||
|
|
||||||
|
if(!$serialAgaPlant){
|
||||||
|
|
||||||
|
Notification::make()
|
||||||
|
->title('Unknown Serial Number')
|
||||||
|
->body("Scanned serial number not found in stock data master for the type SFG against plant code '$plantCode'")
|
||||||
|
->danger()
|
||||||
|
->actions([
|
||||||
|
\Filament\Notifications\Actions\Action::make('confirm_update')
|
||||||
|
->label('Yes, Update')
|
||||||
|
->button()
|
||||||
|
->dispatch('confirmSerialUpdate', [
|
||||||
|
'plantId' => $plantId,
|
||||||
|
'location' => $location,
|
||||||
|
'bin' => $bin,
|
||||||
|
'serial_number' => $this->sNo,
|
||||||
|
'stickerMasterId' => $stickerMasterId,
|
||||||
|
'batch' => $this->batch,
|
||||||
|
'docNo' => $this->docNo,
|
||||||
|
'quantity' => $this->quantity
|
||||||
|
]),
|
||||||
|
])
|
||||||
|
->send();
|
||||||
|
|
||||||
|
$this->form->fill([
|
||||||
|
'plant_id' => $plantId,
|
||||||
|
'location' => $location,
|
||||||
|
'bin' => $bin,
|
||||||
|
'qr_code' => null,
|
||||||
|
]);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($serialAgaPlant->location != $location) {
|
||||||
|
|
||||||
|
Notification::make()
|
||||||
|
->title('Invalid Location')
|
||||||
|
->body("Serial number '$this->sNo' does not belong to location '$location' for the type SFG against plant code '$plantCode'.")
|
||||||
|
->danger()
|
||||||
|
->actions([
|
||||||
|
\Filament\Notifications\Actions\Action::make('confirm_update')
|
||||||
|
->label('Yes, Update')
|
||||||
|
->button()
|
||||||
|
->dispatch('confirmSerialUpdate', [
|
||||||
|
'plantId' => $plantId,
|
||||||
|
'location' => $location,
|
||||||
|
'bin' => $bin,
|
||||||
|
'serial_number' => $this->sNo,
|
||||||
|
'stickerMasterId' => $stickerMasterId,
|
||||||
|
'batch' => $this->batch,
|
||||||
|
'docNo' => $this->docNo,
|
||||||
|
'quantity' => $this->quantity
|
||||||
|
]),
|
||||||
|
])
|
||||||
|
->send();
|
||||||
|
|
||||||
|
$this->form->fill([
|
||||||
|
'plant_id' => $plantId,
|
||||||
|
'location' => $location,
|
||||||
|
'bin' => $bin,
|
||||||
|
'qr_code' => null,
|
||||||
|
]);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($serialAgaPlant->sticker_master_id != $stickerMasterId) {
|
||||||
|
|
||||||
|
Notification::make()
|
||||||
|
->title('Invalid Item Code')
|
||||||
|
->body("Serial number '$this->sNo' does not belong to item code '$this->itemCode' for the type SFG against plant code '$plantCode'.")
|
||||||
|
->danger()
|
||||||
|
->actions([
|
||||||
|
\Filament\Notifications\Actions\Action::make('confirm_update')
|
||||||
|
->label('Yes, Update')
|
||||||
|
->button()
|
||||||
|
->dispatch('confirmSerialUpdate', [
|
||||||
|
'plantId' => $plantId,
|
||||||
|
'location' => $location,
|
||||||
|
'bin' => $bin,
|
||||||
|
'serial_number' => $this->sNo,
|
||||||
|
'stickerMasterId' => $stickerMasterId,
|
||||||
|
'batch' => $this->batch,
|
||||||
|
'docNo' => $this->docNo,
|
||||||
|
'quantity' => $this->quantity
|
||||||
|
]),
|
||||||
|
])
|
||||||
|
->send();
|
||||||
|
|
||||||
|
$this->form->fill([
|
||||||
|
'plant_id' => $plantId,
|
||||||
|
'location' => $location,
|
||||||
|
'bin' => $bin,
|
||||||
|
'qr_code' => null,
|
||||||
|
]);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($serialAgaPlant->batch != '' || $serialAgaPlant->batch != null) {
|
||||||
|
|
||||||
|
if($serialAgaPlant->batch != $this->batch){
|
||||||
|
Notification::make()
|
||||||
|
->title('Invalid Batch')
|
||||||
|
->body("Serial number '$this->sNo' does not belong to batch '$this->batch' for the type SFG against plant code '$plantCode'.")
|
||||||
|
->danger()
|
||||||
|
->actions([
|
||||||
|
\Filament\Notifications\Actions\Action::make('confirm_update')
|
||||||
|
->label('Yes, Update')
|
||||||
|
->button()
|
||||||
|
->dispatch('confirmSerialUpdate', [
|
||||||
|
'plantId' => $plantId,
|
||||||
|
'location' => $location,
|
||||||
|
'bin' => $bin,
|
||||||
|
'serial_number' => $this->sNo,
|
||||||
|
'stickerMasterId' => $stickerMasterId,
|
||||||
|
'batch' => $this->batch,
|
||||||
|
'docNo' => $this->docNo,
|
||||||
|
'quantity' => $this->quantity
|
||||||
|
]),
|
||||||
|
])
|
||||||
|
->send();
|
||||||
|
|
||||||
|
$this->form->fill([
|
||||||
|
'plant_id' => $plantId,
|
||||||
|
'location' => $location,
|
||||||
|
'bin' => $bin,
|
||||||
|
'qr_code' => null,
|
||||||
|
]);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// if ($serialAgaPlant->bin != '' || $serialAgaPlant->bin != null) {
|
||||||
|
|
||||||
|
// if($serialAgaPlant->bin != $bin){
|
||||||
|
// Notification::make()
|
||||||
|
// ->danger()
|
||||||
|
// ->title('Invalid Bin')
|
||||||
|
// ->body("Serial number '$this->sNo' does not belong to bin '$bin' for the type SFG against plant code '$plantCode'.")
|
||||||
|
// ->seconds(3)
|
||||||
|
// ->send();
|
||||||
|
|
||||||
|
// Notification::make()
|
||||||
|
// ->title('Invalid Bin')
|
||||||
|
// ->body("Serial number '$this->sNo' does not belong to bin '$bin' for the type SFG against plant code '$plantCode'.")
|
||||||
|
// ->danger()
|
||||||
|
// ->actions([
|
||||||
|
// \Filament\Notifications\Actions\Action::make('confirm_update')
|
||||||
|
// ->label('Yes, Update')
|
||||||
|
// ->button()
|
||||||
|
// ->dispatch('confirmSerialUpdate', [
|
||||||
|
// 'plantId' => $plantId,
|
||||||
|
// 'location' => $location,
|
||||||
|
// 'bin' => $bin,
|
||||||
|
// 'serial_number' => $this->sNo,
|
||||||
|
// 'stickerMasterId' => $stickerMasterId,
|
||||||
|
// 'batch' => $this->batch,
|
||||||
|
// 'docNo' => $this->docNo,
|
||||||
|
// 'quantity' => $this->quantity
|
||||||
|
// ]),
|
||||||
|
// ])
|
||||||
|
// ->send();
|
||||||
|
|
||||||
|
// $this->form->fill([
|
||||||
|
// 'plant_id' => $plantId,
|
||||||
|
// 'location' => $location,
|
||||||
|
// 'bin' => $bin,
|
||||||
|
// 'qr_code' => null,
|
||||||
|
// ]);
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
$serial = StockDataMaster::where('plant_id', $plantId)
|
||||||
|
->where('serial_number', $this->sNo)
|
||||||
|
->where('location', $location)
|
||||||
|
->where('type', '1')
|
||||||
|
->first();
|
||||||
|
|
||||||
|
// if($serial->quantity == '' || $serial->quantity == null){
|
||||||
|
// Notification::make()
|
||||||
|
// ->warning()
|
||||||
|
// ->title('Unknown Quantity')
|
||||||
|
// ->body("Quantity is missing for serial number '$this->sNo' (Type: SFG) in Plant Code '$plantCode'. Please update it in Stock Data Master.")
|
||||||
|
// ->seconds(3)
|
||||||
|
// ->send();
|
||||||
|
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
// elseif ((int) $serial->quantity > 1) {
|
||||||
|
// Notification::make()
|
||||||
|
// ->warning()
|
||||||
|
// ->title('Invalid Quantity')
|
||||||
|
// ->body("Quantity should be '1' against '$this->sNo' for the type SFG against plant code '$plantCode'!Please update quantity in stock data master.")
|
||||||
|
// ->seconds(3)
|
||||||
|
// ->send();
|
||||||
|
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
|
||||||
if ($serial) {
|
if ($serial) {
|
||||||
|
|
||||||
if($serial->scanned_status == 'Scanned'){
|
if($serial->scanned_status == 'Scanned'){
|
||||||
|
|
||||||
Notification::make()
|
Notification::make()
|
||||||
->warning()
|
->warning()
|
||||||
->title('Completed')
|
->title('Completed')
|
||||||
->body("Already completed the scanning process Serial number '$this->sNo' for the type SFG against plant code '$plantCode'.")
|
->body("Already completed the scanning process Serial number '$this->sNo' for the type SFG against plant code '$plantCode'.")
|
||||||
->seconds(3)
|
->seconds(3)
|
||||||
->send();
|
->send();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ class StockDataTable extends Component
|
|||||||
->where('location', $location)
|
->where('location', $location)
|
||||||
->where('sticker_master_id', $stickerMasterId)
|
->where('sticker_master_id', $stickerMasterId)
|
||||||
->where('doc_no', $docNo)
|
->where('doc_no', $docNo)
|
||||||
|
->where('bin', $bin)
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
if (!$record) {
|
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)
|
public function loadCompletedData($location, $plantId, $isSerial)
|
||||||
{
|
{
|
||||||
$this->plantId = $plantId;
|
$this->plantId = $plantId;
|
||||||
|
|||||||
Reference in New Issue
Block a user