Merge pull request 'removed unwanted mail trigger for invoice validation error mail' (#75) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 10s
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 10s
Reviewed-on: #75
This commit was merged in pull request #75.
This commit is contained in:
@@ -3098,22 +3098,6 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
|
||||
$this->dispatch('playWarnSound');
|
||||
|
||||
// ..Mail
|
||||
|
||||
$mInvoiceType = 'Serial';
|
||||
$mailData = $this->getMail();
|
||||
$mPlantName = $mailData['plant_name'];
|
||||
$emails = $mailData['emails'];
|
||||
|
||||
if (! empty($emails)) {
|
||||
// Mail::to($emails)->send(new InvalidSerialMail($serNo, $invoiceNumber, $mPlantName, $mInvoiceType));
|
||||
Mail::to($emails)->send(
|
||||
new InvalidSerialMail($serNo, $invoiceNumber, $mPlantName, $mInvoiceType, 'InvalidFormat')
|
||||
);
|
||||
} else {
|
||||
\Log::warning("No recipients found for plant {$plantId}, module Serial, rule invalid_serial.");
|
||||
}
|
||||
|
||||
$this->form->fill([
|
||||
'plant_id' => $plantId,
|
||||
'invoice_number' => $invoiceNumber,
|
||||
@@ -3155,23 +3139,6 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
|
||||
$this->dispatch('play-warn-sound');
|
||||
|
||||
// ..Mail
|
||||
|
||||
$mInvoiceType = 'Serial';
|
||||
$mailData = $this->getMail();
|
||||
$mPlantName = $mailData['plant_name'];
|
||||
$emails = $mailData['emails'];
|
||||
|
||||
if (! empty($emails)) {
|
||||
Mail::to($emails)->send(
|
||||
new InvalidSerialMail($serNo, $invoiceNumber, $mPlantName, $mInvoiceType, $itemCode, 'NotFound')
|
||||
);
|
||||
} else {
|
||||
\Log::warning("No recipients found for plant {$plantId}, module Serial, rule invalid_serial.");
|
||||
}
|
||||
|
||||
// ..
|
||||
|
||||
$this->form->fill([
|
||||
'plant_id' => $plantId,
|
||||
'invoice_number' => $invoiceNumber,
|
||||
@@ -3240,19 +3207,6 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
|
||||
$this->dispatch('playWarnSound');
|
||||
|
||||
$mInvoiceType = 'Serial';
|
||||
$mailData = $this->getMail();
|
||||
$mPlantName = $mailData['plant_name'];
|
||||
$emails = $mailData['emails'];
|
||||
|
||||
if (! empty($emails)) {
|
||||
Mail::to($emails)->send(
|
||||
new InvalidSerialMail($serNo, $invoiceNumber, $mPlantName, $mInvoiceType, $itemCode, 'NotFoundItemS')
|
||||
);
|
||||
} else {
|
||||
\Log::warning("No recipients found for plant {$plantId}, module Serial, rule invalid_serial.");
|
||||
}
|
||||
|
||||
$this->form->fill([
|
||||
'plant_id' => $plantId,
|
||||
'invoice_number' => $invoiceNumber,
|
||||
@@ -3305,19 +3259,6 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
|
||||
$this->dispatch('playWarnSound');
|
||||
|
||||
$mInvoiceType = 'Serial';
|
||||
$mailData = $this->getMail();
|
||||
$mPlantName = $mailData['plant_name'];
|
||||
$emails = $mailData['emails'];
|
||||
|
||||
if (! empty($emails)) {
|
||||
Mail::to($emails)->send(
|
||||
new InvalidSerialMail($serNo, $invoiceNumber, $mPlantName, $mInvoiceType, $itemCode, 'NotValidPackage')
|
||||
);
|
||||
} else {
|
||||
\Log::warning("No recipients found for plant {$plantId}, module Serial, rule invalid_serial.");
|
||||
}
|
||||
|
||||
$this->form->fill([
|
||||
'plant_id' => $plantId,
|
||||
'invoice_number' => $invoiceNumber,
|
||||
@@ -3356,18 +3297,6 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
->seconds(3)
|
||||
->send();
|
||||
$this->dispatch('playWarnSound');
|
||||
$mInvoiceType = 'Serial';
|
||||
$mailData = $this->getMail();
|
||||
$mPlantName = $mailData['plant_name'];
|
||||
$emails = $mailData['emails'];
|
||||
|
||||
if (! empty($emails)) {
|
||||
Mail::to($emails)->send(
|
||||
new InvalidSerialMail($serNo, $invoiceNumber, $mPlantName, $mInvoiceType, $itemCode, 'NotMotorQR')
|
||||
);
|
||||
} else {
|
||||
\Log::warning("No recipients found for plant {$plantId}, module Serial, rule invalid_serial.");
|
||||
}
|
||||
|
||||
$this->form->fill([
|
||||
'plant_id' => $plantId,
|
||||
@@ -3389,21 +3318,6 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
|
||||
$this->dispatch('playWarnSound');
|
||||
|
||||
// ..Mail
|
||||
|
||||
$mInvoiceType = 'Serial';
|
||||
$mailData = $this->getMail();
|
||||
$mPlantName = $mailData['plant_name'];
|
||||
$emails = $mailData['emails'];
|
||||
|
||||
if (! empty($emails)) {
|
||||
Mail::to($emails)->send(
|
||||
new InvalidSerialMail($serNo, $invoiceNumber, $mPlantName, $mInvoiceType, $itemCode, 'DuplicateMotorQR')
|
||||
);
|
||||
} else {
|
||||
\Log::warning("No recipients found for plant {$plantId}, module Serial, rule invalid_serial.");
|
||||
}
|
||||
|
||||
$this->form->fill([
|
||||
'plant_id' => $plantId,
|
||||
'invoice_number' => $invoiceNumber,
|
||||
@@ -3514,20 +3428,6 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
|
||||
$this->dispatch('playWarnSound');
|
||||
|
||||
$mInvoiceType = 'Serial';
|
||||
$mailData = $this->getMail();
|
||||
$mPlantName = $mailData['plant_name'];
|
||||
$emails = $mailData['emails'];
|
||||
|
||||
if (! empty($emails)) {
|
||||
// Mail::to($emails)->send(new InvalidSerialMail($serNo, $invoiceNumber, $mPlantName, $mInvoiceType));
|
||||
Mail::to($emails)->send(
|
||||
new InvalidSerialMail($serNo, $invoiceNumber, $mPlantName, $mInvoiceType, $itemCode, 'NotPumpQR')
|
||||
);
|
||||
} else {
|
||||
\Log::warning("No recipients found for plant {$plantId}, module Serial, rule invalid_serial.");
|
||||
}
|
||||
|
||||
$this->form->fill([
|
||||
'plant_id' => $plantId,
|
||||
'invoice_number' => $invoiceNumber,
|
||||
@@ -3547,20 +3447,6 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
->send();
|
||||
$this->dispatch('playWarnSound');
|
||||
|
||||
$mInvoiceType = 'Serial';
|
||||
$mailData = $this->getMail();
|
||||
$mPlantName = $mailData['plant_name'];
|
||||
$emails = $mailData['emails'];
|
||||
|
||||
if (! empty($emails)) {
|
||||
// Mail::to($emails)->send(new InvalidSerialMail($serNo, $invoiceNumber, $mPlantName, $mInvoiceType));
|
||||
Mail::to($emails)->send(
|
||||
new InvalidSerialMail($serNo, $invoiceNumber, $mPlantName, $mInvoiceType, $itemCode, 'DuplicatePumpQR')
|
||||
);
|
||||
} else {
|
||||
\Log::warning("No recipients found for plant {$plantId}, module Serial, rule invalid_serial.");
|
||||
}
|
||||
|
||||
$this->form->fill([
|
||||
'plant_id' => $plantId,
|
||||
'invoice_number' => $invoiceNumber,
|
||||
@@ -3675,20 +3561,6 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
|
||||
$this->dispatch('playWarnSound');
|
||||
|
||||
$mInvoiceType = 'Serial';
|
||||
$mailData = $this->getMail();
|
||||
$mPlantName = $mailData['plant_name'];
|
||||
$emails = $mailData['emails'];
|
||||
|
||||
if (! empty($emails)) {
|
||||
// Mail::to($emails)->send(new InvalidSerialMail($serNo, $invoiceNumber, $mPlantName, $mInvoiceType));
|
||||
Mail::to($emails)->send(
|
||||
new InvalidSerialMail($serNo, $invoiceNumber, $mPlantName, $mInvoiceType, $itemCode, 'MissingPanelBox')
|
||||
);
|
||||
} else {
|
||||
\Log::warning("No recipients found for plant {$plantId}, module Serial, rule invalid_serial.");
|
||||
}
|
||||
|
||||
$this->form->fill([
|
||||
'plant_id' => $plantId,
|
||||
'invoice_number' => $invoiceNumber,
|
||||
@@ -3765,20 +3637,6 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
|
||||
$this->dispatch('playWarnSound');
|
||||
|
||||
$mInvoiceType = 'Serial';
|
||||
$mailData = $this->getMail();
|
||||
$mPlantName = $mailData['plant_name'];
|
||||
$emails = $mailData['emails'];
|
||||
|
||||
if (! empty($emails)) {
|
||||
// Mail::to($emails)->send(new InvalidSerialMail($serNo, $invoiceNumber, $mPlantName, $mInvoiceType));
|
||||
Mail::to($emails)->send(
|
||||
new InvalidSerialMail($serNo, $invoiceNumber, $mPlantName, $mInvoiceType, $itemCode, 'UnknownPumpsetQR')
|
||||
);
|
||||
} else {
|
||||
\Log::warning("No recipients found for plant {$plantId}, module Serial, rule invalid_serial.");
|
||||
}
|
||||
|
||||
$this->form->fill([
|
||||
'plant_id' => $plantId,
|
||||
'invoice_number' => $invoiceNumber,
|
||||
@@ -3799,20 +3657,6 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
|
||||
$this->dispatch('playWarnSound');
|
||||
|
||||
$mInvoiceType = 'Serial';
|
||||
$mailData = $this->getMail();
|
||||
$mPlantName = $mailData['plant_name'];
|
||||
$emails = $mailData['emails'];
|
||||
|
||||
if (! empty($emails)) {
|
||||
// Mail::to($emails)->send(new InvalidSerialMail($serNo, $invoiceNumber, $mPlantName, $mInvoiceType));
|
||||
Mail::to($emails)->send(
|
||||
new InvalidSerialMail($serNo, $invoiceNumber, $mPlantName, $mInvoiceType, $itemCode, 'DuplicatePumpsetQR')
|
||||
);
|
||||
} else {
|
||||
\Log::warning("No recipients found for plant {$plantId}, module Serial, rule invalid_serial.");
|
||||
}
|
||||
|
||||
$this->form->fill([
|
||||
'plant_id' => $plantId,
|
||||
'invoice_number' => $invoiceNumber,
|
||||
|
||||
@@ -104,58 +104,15 @@ class InvalidSerialMail extends Mailable
|
||||
{
|
||||
// dynamic subject based on mail type
|
||||
switch ($this->mailType) {
|
||||
case 'NotFound':
|
||||
$this->subjectLine = "Serial Number Not Found ({$this->mplantName})";
|
||||
break;
|
||||
case 'NotFoundInvoice':
|
||||
$this->subjectLine = "Serial Number Not Found in Invoice ({$this->mplantName})";
|
||||
break;
|
||||
case 'NotFoundItemS':
|
||||
$this->subjectLine = "Item Code Not Found ({$this->mplantName})";
|
||||
break;
|
||||
case 'NotValidPackage':
|
||||
$this->subjectLine = "Not Valid Package ({$this->mplantName})";
|
||||
break;
|
||||
case 'InvalidMaterialFormat':
|
||||
$this->subjectLine = "Invalid Qr code format Found material ({$this->mplantName})";
|
||||
break;
|
||||
case 'DuplicateMotorQR':
|
||||
$this->subjectLine = "Duplicate Serial Number ({$this->mplantName})";
|
||||
break;
|
||||
case 'NotMotorQR':
|
||||
$this->subjectLine = "Item Code doesn't have Motor QR ({$this->mplantName})";
|
||||
break;
|
||||
case 'CompletedSerialInvoice':
|
||||
$this->subjectLine = "Completed Serial Invoice ({$this->mplantName})";
|
||||
break;
|
||||
case 'NotPumpQR':
|
||||
$this->subjectLine = "Item Code doesn't have Pump QR ({$this->mplantName})";
|
||||
break;
|
||||
case 'DuplicatePumpQR':
|
||||
$this->subjectLine = "Duplicate Serial Number ({$this->mplantName})";
|
||||
break;
|
||||
case 'CSerialInvoice':
|
||||
$this->subjectLine = "Completed Serial Invoice ({$this->mplantName})";
|
||||
break;
|
||||
case 'MissingPanelBox':
|
||||
$this->subjectLine = "Missing Panel Box ({$this->mplantName})";
|
||||
$this->subjectLine = "Invoice - Second Scanning({$this->mplantName})";
|
||||
break;
|
||||
case 'DuplicateCapacitorQR':
|
||||
$this->subjectLine = "Duplicate Capacitor QR ({$this->mplantName})";
|
||||
break;
|
||||
case 'UnknownPumpsetQR':
|
||||
$this->subjectLine = "Unknown PumpSet QR ({$this->mplantName})";
|
||||
break;
|
||||
case 'DuplicatePumpsetQR':
|
||||
$this->subjectLine = "Duplicate PumpSet QR ({$this->mplantName})";
|
||||
$this->subjectLine = "Invoice - Second Scanning({$this->mplantName})";
|
||||
break;
|
||||
case 'ComSerInv':
|
||||
$this->subjectLine = "Completed Serial Invoice ({$this->mplantName})";
|
||||
break;
|
||||
case 'InvalidFormat':
|
||||
default:
|
||||
$this->subjectLine = "Invalid Serial Format Found ({$this->mplantName})";
|
||||
break;
|
||||
}
|
||||
|
||||
return new Envelope(
|
||||
@@ -170,117 +127,10 @@ class InvalidSerialMail extends Mailable
|
||||
{
|
||||
// dynamic greeting/message body
|
||||
switch ($this->mailType) {
|
||||
case 'NotFound':
|
||||
$this->greeting = "
|
||||
Dear Sir/Madam,<br><br>
|
||||
The scanned Serial Number <b>{$this->serial}</b> was not found in the database
|
||||
for the plant <b>{$this->mplantName}</b>.<br><br>
|
||||
<b>Invoice Number:</b> {$this->invoiceNumber}<br>
|
||||
<b>Invoice Type:</b> {$this->mInvoiceType}<br><br>
|
||||
Please verify the serial number.
|
||||
";
|
||||
break;
|
||||
case 'NotFoundInvoice':
|
||||
$this->greeting = "
|
||||
Dear Sir/Madam,<br><br>
|
||||
The scanned Serial Number <b>'{$this->serial}'</b> was not found in the Invoice Number <b>'{$this->invoiceNumber}'</b>
|
||||
for the plant <b>{$this->mplantName}</b>.<br><br>
|
||||
<b>Invoice Type:</b> {$this->mInvoiceType}<br><br>
|
||||
Please verify the serial number.
|
||||
";
|
||||
break;
|
||||
case 'NotFoundItemS':
|
||||
$this->greeting = "
|
||||
Dear Sir/Madam,<br><br>
|
||||
Item Code <b>'{$this->itemCode}'</b> with Serial Number<b>'{$this->serial}'</b> not found in sticker master
|
||||
for the plant <b>{$this->mplantName}</b>.<br><br>
|
||||
<b>Invoice Number:</b> {$this->invoiceNumber}<br><br>
|
||||
<b>Invoice Type:</b> {$this->mInvoiceType}<br><br>
|
||||
Please verify the Item Code.
|
||||
";
|
||||
break;
|
||||
case 'NotValidPackage':
|
||||
$this->greeting = "
|
||||
Dear Sir/Madam,<br><br>
|
||||
Scanned Item Code<b>'{$this->itemCode}'</b> doesn't have valid package type to proceed!
|
||||
for the plant <b>{$this->mplantName}</b>.<br><br>
|
||||
<b>Invoice Number:</b> {$this->invoiceNumber}<br><br>
|
||||
<b>Invoice Type:</b> {$this->mInvoiceType}<br><br>
|
||||
Please verify the Item Code.
|
||||
";
|
||||
break;
|
||||
case 'InvalidMaterialFormat':
|
||||
$this->greeting = "
|
||||
Dear Sir/Madam,<br><br>
|
||||
Please note that the scanned serial number format appears to be incorrect.<br>
|
||||
<b>Plant:</b> {$this->mplantName}<br>
|
||||
<b>Invoice Type:</b> {$this->mInvoiceType}<br>
|
||||
<b>Invoice Number:</b> {$this->invoiceNumber}<br>
|
||||
<b>Scanned QR Code:</b> {$this->serial}<br>
|
||||
";
|
||||
break;
|
||||
case 'DuplicateMotorQR':
|
||||
$this->greeting = "
|
||||
Dear Sir/Madam,<br><br>
|
||||
Scanned 'Motor' serial number <b>{$this->serial}</b> already completed the scanning process.<br>
|
||||
<b>Plant:</b> {$this->mplantName}<br>
|
||||
<b>Invoice Type:</b> {$this->mInvoiceType}
|
||||
<b>Invoice Number:</b> {$this->invoiceNumber}<br>
|
||||
<b>Scanned QR Code:</b> {$this->serial}<br>
|
||||
";
|
||||
break;
|
||||
case 'NotMotorQR':
|
||||
$this->greeting = "
|
||||
Dear Sir/Madam,<br><br>
|
||||
Scanned Item Code <b>{$this->itemCode}</b> doesn't have 'Motor' QR to proceed!<br>
|
||||
<b>Plant:</b> {$this->mplantName}<br>
|
||||
<b>Invoice Type:</b> {$this->mInvoiceType}<br>
|
||||
<b>Invoice Number:</b> {$this->invoiceNumber}<br>
|
||||
<b>Scanned QR Code:</b> {$this->serial}<br>
|
||||
";
|
||||
break;
|
||||
case 'CompletedSerialInvoice':
|
||||
$this->greeting = "
|
||||
Dear Sir/Madam,<br><br>
|
||||
Serial invoice <b>'{$this->invoiceNumber}'</b> completed the scanning process.<br>
|
||||
<b>Plant:</b> {$this->mplantName}<br>
|
||||
<b>Invoice Type:</b> {$this->mInvoiceType}<br>
|
||||
<b>Scanned QR Code:</b> {$this->serial}<br>
|
||||
";
|
||||
break;
|
||||
case 'NotPumpQR':
|
||||
$this->greeting = "
|
||||
Dear Sir/Madam,<br><br>
|
||||
Scanned Item Code <b>'{$this->itemCode}'</b> doesn't have 'Pump' QR to proceed!<br>
|
||||
<b>Plant:</b> {$this->mplantName}<br>
|
||||
<b>Invoice Type:</b> {$this->mInvoiceType}<br>
|
||||
<b>Invoice Number:</b> {$this->invoiceNumber}<br>
|
||||
<b>Scanned QR Code:</b> {$this->serial}<br>
|
||||
";
|
||||
break;
|
||||
case 'DuplicatePumpQR':
|
||||
$this->greeting = "
|
||||
Dear Sir/Madam,<br><br>
|
||||
Scanned 'Pump' serial number already completed the scanning process.<br>
|
||||
<b>Plant:</b> {$this->mplantName}<br>
|
||||
<b>Invoice Type:</b> {$this->mInvoiceType}<br>
|
||||
<b>Invoice Number:</b> {$this->invoiceNumber}<br>
|
||||
<b>Scanned QR Code:</b> {$this->serial}<br>
|
||||
";
|
||||
break;
|
||||
case 'CSerialInvoice':
|
||||
$this->greeting = "
|
||||
Dear Sir/Madam,<br><br>
|
||||
Serial invoice <b>'{$this->invoiceNumber}'</b> completed the scanning process.<br>
|
||||
<b>Plant:</b> {$this->mplantName}<br>
|
||||
<b>Invoice Type:</b> {$this->mInvoiceType}<br>
|
||||
<b>Scanned QR Code:</b> {$this->serial}<br>
|
||||
";
|
||||
break;
|
||||
case 'MissingPanelBox':
|
||||
$this->greeting = "
|
||||
Dear Sir/Madam,<br><br>
|
||||
Scanned Item Code <b>'{$this->itemCode}'</b> doesn't have 'Panel Box Code' to proceed!<br>
|
||||
The scanned serial number could not be found in the given invoice.<br><br>
|
||||
<b>Plant:</b> {$this->mplantName}<br>
|
||||
<b>Invoice Type:</b> {$this->mInvoiceType}<br>
|
||||
<b>Invoice Number:</b> {$this->invoiceNumber}<br>
|
||||
@@ -290,27 +140,7 @@ class InvalidSerialMail extends Mailable
|
||||
case 'DuplicateCapacitorQR':
|
||||
$this->greeting = "
|
||||
Dear Sir/Madam,<br><br>
|
||||
Scanned 'Capacitor' serial number already completed the scanning process.<br>
|
||||
<b>Plant:</b> {$this->mplantName}<br>
|
||||
<b>Invoice Type:</b> {$this->mInvoiceType}<br>
|
||||
<b>Invoice Number:</b> {$this->invoiceNumber}<br>
|
||||
<b>Scanned QR Code:</b> {$this->serial}<br>
|
||||
";
|
||||
break;
|
||||
case 'UnknownPumpsetQR':
|
||||
$this->greeting = "
|
||||
Dear Sir/Madam,<br><br>
|
||||
Scanned Item Code <b>'{$this->itemCode}'</b> doesn't have 'Pump Set' QR to proceed!<br>
|
||||
<b>Plant:</b> {$this->mplantName}<br>
|
||||
<b>Invoice Type:</b> {$this->mInvoiceType}<br>
|
||||
<b>Invoice Number:</b> {$this->invoiceNumber}<br>
|
||||
<b>Scanned QR Code:</b> {$this->serial}<br>
|
||||
";
|
||||
break;
|
||||
case 'DuplicatePumpsetQR':
|
||||
$this->greeting = "
|
||||
Dear Sir/Madam,<br><br>
|
||||
Scanned 'Pump Set' serial number already completed the scanning process.<br>
|
||||
The scanned <b>Capacitor</b> serial number has already completed the scanning process.<br><br>
|
||||
<b>Plant:</b> {$this->mplantName}<br>
|
||||
<b>Invoice Type:</b> {$this->mInvoiceType}<br>
|
||||
<b>Invoice Number:</b> {$this->invoiceNumber}<br>
|
||||
@@ -327,67 +157,6 @@ class InvalidSerialMail extends Mailable
|
||||
<b>Scanned QR Code:</b> {$this->serial}<br>
|
||||
";
|
||||
break;
|
||||
case 'ItemNotFound':
|
||||
$this->greeting = "
|
||||
Dear Sir/Madam,<br><br>
|
||||
Item code <b>'{$this->itemCode}'</b> not found in database.<br>
|
||||
<b>Plant:</b> {$this->mplantName}<br>
|
||||
<b>Invoice Type:</b> {$this->mInvoiceType}<br>
|
||||
<b>Invoice Number:</b> {$this->invoiceNumber}<br>
|
||||
<b>Scanned QR Code:</b> {$this->serial}<br>
|
||||
";
|
||||
break;
|
||||
case 'ItemNotFoundDB':
|
||||
$this->greeting = "
|
||||
Dear Sir/Madam,<br><br>
|
||||
Item code <b>'{$this->itemCode}'</b> not found in database for choosed plant.<br>
|
||||
<b>Plant:</b> {$this->mplantName}<br>
|
||||
<b>Invoice Type:</b> {$this->mInvoiceType}<br>
|
||||
<b>Invoice Number:</b> {$this->invoiceNumber}<br>
|
||||
<b>Scanned QR Code:</b> {$this->serial}<br>
|
||||
";
|
||||
break;
|
||||
case 'ItemNotValidMaterialType':
|
||||
$this->greeting = "
|
||||
Dear Sir/Madam,<br><br>
|
||||
Item code <b>'{$this->itemCode}'</b> doesn't have a valid material type.<br>
|
||||
<b>Plant:</b> {$this->mplantName}<br>
|
||||
<b>Invoice Type:</b> {$this->mInvoiceType}<br>
|
||||
<b>Invoice Number:</b> {$this->invoiceNumber}<br>
|
||||
<b>Scanned QR Code:</b> {$this->serial}<br>
|
||||
";
|
||||
break;
|
||||
case 'ItemNotInvoice':
|
||||
$this->greeting = "
|
||||
Dear Sir/Madam,<br><br>
|
||||
Item code <b>'{$this->itemCode}'</b> doesn't exist in invoice.<br>
|
||||
<b>Plant:</b> {$this->mplantName}<br>
|
||||
<b>Invoice Type:</b> {$this->mInvoiceType}<br>
|
||||
<b>Invoice Number:</b> {$this->invoiceNumber}<br>
|
||||
<b>Scanned QR Code:</b> {$this->serial}<br>
|
||||
";
|
||||
break;
|
||||
case 'ItemNotInvoice':
|
||||
$this->greeting = "
|
||||
Dear Sir/Madam,<br><br>
|
||||
Item code <b>'{$this->itemCode}'</b> doesn't exist in invoice.<br>
|
||||
<b>Plant:</b> {$this->mplantName}<br>
|
||||
<b>Invoice Type:</b> {$this->mInvoiceType}<br>
|
||||
<b>Invoice Number:</b> {$this->invoiceNumber}<br>
|
||||
<b>Scanned QR Code:</b> {$this->serial}<br>
|
||||
";
|
||||
break;
|
||||
case 'InvalidFormat':
|
||||
default:
|
||||
$this->greeting = "
|
||||
Dear Sir/Madam,<br><br>
|
||||
Please note that the scanned serial number format appears to be incorrect.<br>
|
||||
<b>Plant:</b> {$this->mplantName}<br>
|
||||
<b>Invoice Type:</b> {$this->mInvoiceType}
|
||||
<b>Invoice Number:</b> {$this->invoiceNumber}<br>
|
||||
<b>Scanned QR Code:</b> {$this->serial}<br>
|
||||
";
|
||||
break;
|
||||
}
|
||||
|
||||
return new Content(
|
||||
|
||||
Reference in New Issue
Block a user