Added 'created_by' and 'updated_by' columns on record creation
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
This commit is contained in:
@@ -613,6 +613,8 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
'invoice_number' => $invoiceNumber,
|
||||
'quantity' => 1,
|
||||
'operator_id' => $operatorName,
|
||||
'created_by' => $operatorName,
|
||||
'updated_by' => $operatorName,
|
||||
]);
|
||||
$inserted++;
|
||||
}
|
||||
@@ -653,6 +655,8 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
'invoice_number' => $invoiceNumber,
|
||||
'quantity' => $bundleQty,
|
||||
'operator_id' => $operatorName,
|
||||
'created_by' => $operatorName,
|
||||
'updated_by' => $operatorName,
|
||||
]);
|
||||
$inserted++;
|
||||
}
|
||||
@@ -716,6 +720,7 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
$existEmpRecQty->update([
|
||||
'quantity' => $newInsQty,
|
||||
'operator_id' => $operatorName,
|
||||
'updated_by' => $operatorName,
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
$newQuan--;
|
||||
@@ -727,6 +732,8 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
'invoice_number' => $invoiceNumber,
|
||||
'quantity' => $newInsQty,
|
||||
'operator_id' => $operatorName,
|
||||
'created_by' => $operatorName,
|
||||
'updated_by' => $operatorName,
|
||||
]);
|
||||
$inserted++;
|
||||
}
|
||||
@@ -746,6 +753,7 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
$existEmpRecQty->update([
|
||||
'quantity' => $newInsQty,
|
||||
'operator_id' => $operatorName,
|
||||
'updated_by' => $operatorName,
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
$newQuan--;
|
||||
@@ -757,6 +765,8 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
'invoice_number' => $invoiceNumber,
|
||||
'quantity' => $newInsQty,
|
||||
'operator_id' => $operatorName,
|
||||
'created_by' => $operatorName,
|
||||
'updated_by' => $operatorName,
|
||||
]);
|
||||
$inserted++;
|
||||
}
|
||||
@@ -1232,6 +1242,8 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
'invoice_number' => $invoiceNumber,
|
||||
'serial_number' => $serialNumber,
|
||||
'operator_id' => $operatorName,
|
||||
'created_by' => $operatorName,
|
||||
'updated_by' => $operatorName,
|
||||
]);
|
||||
$inserted++;
|
||||
}
|
||||
@@ -1777,6 +1789,8 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
'invoice_number' => $invoiceNumber,
|
||||
'quantity' => 1,
|
||||
'operator_id' => $operatorName,
|
||||
'created_by' => $operatorName,
|
||||
'updated_by' => $operatorName,
|
||||
]);
|
||||
$inserted++;
|
||||
}
|
||||
@@ -1810,6 +1824,8 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
'invoice_number' => $invoiceNumber,
|
||||
'quantity' => $bundleQty,
|
||||
'operator_id' => $operatorName,
|
||||
'created_by' => $operatorName,
|
||||
'updated_by' => $operatorName,
|
||||
]);
|
||||
$inserted++;
|
||||
}
|
||||
@@ -1841,6 +1857,8 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
'invoice_number' => $invoiceNumber,
|
||||
'quantity' => $totalExcelQty,
|
||||
'operator_id' => $operatorName,
|
||||
'created_by' => $operatorName,
|
||||
'updated_by' => $operatorName,
|
||||
]);
|
||||
$inserted++;
|
||||
}
|
||||
@@ -2205,6 +2223,8 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
'invoice_number' => $invoiceNumber,
|
||||
'serial_number' => $serialNumber,
|
||||
'operator_id' => $operatorName,
|
||||
'created_by' => $operatorName,
|
||||
'updated_by' => $operatorName,
|
||||
]);
|
||||
$inserted++;
|
||||
}
|
||||
@@ -2949,6 +2969,7 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
if ($curExistQty > $curScanQty) { // 5 > 2
|
||||
$record->quantity = $curExistQty - $curScanQty; // 5 - 2
|
||||
$record->operator_id = $operatorName;
|
||||
// $record->updated_by = $operatorName;
|
||||
// $record->updated_at = now();
|
||||
$record->save();
|
||||
|
||||
@@ -2961,12 +2982,15 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
'quantity' => $curScanQty,
|
||||
'created_at' => $createdDt,
|
||||
'operator_id' => $operatorName,
|
||||
'created_by' => $operatorName,
|
||||
'updated_by' => $operatorName,
|
||||
]);
|
||||
} elseif ($curExistQty == $curScanQty) { // 2 = 2
|
||||
// $record->delete();
|
||||
$record->serial_number = $serialNumber;
|
||||
$record->batch_number = $batchNumber;
|
||||
$record->operator_id = $operatorName;
|
||||
// $record->updated_by = $operatorName;
|
||||
// $record->updated_at = now();
|
||||
$record->save();
|
||||
|
||||
@@ -2977,6 +3001,8 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
// 'quantity' => $curScanQty,
|
||||
// 'created_at' => $createdDt,
|
||||
// 'operator_id'=> $operatorName,
|
||||
// 'created_by' => $operatorName,
|
||||
// 'updated_by' => $operatorName,
|
||||
// ]);
|
||||
} else {
|
||||
Notification::make()
|
||||
@@ -3032,6 +3058,7 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
$record->batch_number = $batchNumber;
|
||||
// $record->updated_at = now();
|
||||
$record->operator_id = $operatorName;
|
||||
// $record->updated_by = $operatorName;
|
||||
$record->save();
|
||||
}
|
||||
|
||||
@@ -3400,6 +3427,7 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
$record->scanned_status = 'Scanned';
|
||||
}
|
||||
$record->operator_id = $operatorName;
|
||||
// $record->updated_by = $operatorName;
|
||||
$record->save();
|
||||
|
||||
// Notification::make()
|
||||
@@ -3516,6 +3544,7 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
$record->scanned_status = 'Scanned';
|
||||
}
|
||||
$record->operator_id = $operatorName;
|
||||
// $record->updated_by = $operatorName;
|
||||
$record->save();
|
||||
|
||||
// Notification::make()
|
||||
@@ -3698,6 +3727,7 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
$record->scanned_status = 'Scanned';
|
||||
}
|
||||
$record->operator_id = $operatorName;
|
||||
// $record->updated_by = $operatorName;
|
||||
$record->save();
|
||||
|
||||
// Notification::make()
|
||||
|
||||
Reference in New Issue
Block a user