removed unwanted mail trigger for invoice validation error mail
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 11s
Gemini PR Review / review (pull_request) Failing after 30s
Laravel Pint / pint (pull_request) Successful in 2m0s
Laravel Larastan / larastan (pull_request) Failing after 13m13s

This commit is contained in:
dhanabalan
2025-12-06 10:08:18 +05:30
parent 67961ff0f9
commit 1905359179
2 changed files with 5 additions and 392 deletions

View File

@@ -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>
@@ -288,29 +138,9 @@ class InvalidSerialMail extends Mailable
";
break;
case 'DuplicateCapacitorQR':
$this->greeting = "
$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(