10 Commits

Author SHA1 Message Date
02990f1f5d Merge pull request 'Changed logic for eta date and etd date in import transit mail' (#758) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Reviewed-on: #758
2026-06-17 05:49:47 +00:00
dhanabalan
8d8e433ce9 Changed logic for eta date and etd date in import transit mail
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 16s
Laravel Larastan / larastan (pull_request) Failing after 1m35s
Laravel Pint / pint (pull_request) Failing after 1m33s
2026-06-17 11:19:20 +05:30
7f773c6b92 Merge pull request 'Added item description in characteristic approval mail template' (#757) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Reviewed-on: #757
2026-06-17 04:18:20 +00:00
dhanabalan
afcbadaee0 Added item description in characteristic approval mail template
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 19s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 18s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 21s
Laravel Larastan / larastan (pull_request) Failing after 1m37s
Laravel Pint / pint (pull_request) Failing after 1m35s
2026-06-17 09:47:51 +05:30
838a1bb731 Merge pull request 'issue solved in sub assembly code in testing panel readings' (#756) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 29s
Reviewed-on: #756
2026-06-15 09:02:43 +00:00
dhanabalan
e5cb8241eb issue solved in sub assembly code in testing panel readings
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 18s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 18s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 1m57s
Laravel Larastan / larastan (pull_request) Failing after 3m29s
2026-06-15 14:32:28 +05:30
ecfda1b739 Merge pull request 'Changed time of import transit mail report' (#755) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Failing after 20s
Reviewed-on: #755
2026-06-15 04:16:44 +00:00
dhanabalan
75836e3159 Changed time of import transit mail report
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Failing after 16s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Failing after 4s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 19s
Laravel Pint / pint (pull_request) Successful in 1m57s
Laravel Larastan / larastan (pull_request) Failing after 3m46s
2026-06-15 09:46:31 +05:30
e616a66278 Merge pull request 'Added mail logic for to and cc for quality validation' (#754) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 25s
Reviewed-on: #754
2026-06-15 03:54:08 +00:00
dhanabalan
bfb8fcde29 Added mail logic for to and cc for quality validation
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 1m22s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 48s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 2m2s
Laravel Pint / pint (pull_request) Successful in 2m21s
Laravel Larastan / larastan (pull_request) Failing after 4m5s
2026-06-15 09:23:53 +05:30
5 changed files with 90 additions and 54 deletions

View File

@@ -337,7 +337,7 @@ class Scheduler extends Command
}
break;
case 'Daily':
if (now()->format('H:i') == '11:30') {
if (now()->format('H:i') == '09:30') {
try {
\Artisan::call('send-import-transit', [
'schedule_type' => $rule->schedule_type,

View File

@@ -53,50 +53,12 @@ class SendImportTransit extends Command
return;
}
// $todayRecordExists = ImportTransit::whereDate('created_at', now()->toDateString())->first();
// if (!$todayRecordExists) {
// $this->info('No records created today. Mail not sent.');
// return;
// }
// $tableData = ImportTransit::select([
// 'cri_rfq_number',
// 'mail_received_date',
// 'pricol_ref_number',
// 'requester',
// 'shipper',
// 'shipper_location',
// 'shipper_invoice',
// 'shipper_invoice_date',
// 'customs_agent_name',
// 'eta_date',
// 'status',
// 'delivery_location',
// 'etd_date',
// 'mode',
// 'inco_terms',
// 'port_of_loading',
// 'port_of_discharge',
// 'delivery_city',
// 'packages',
// 'type_of_package',
// 'gross_weight',
// 'volume',
// 'bill_number',
// 'bill_received_date',
// 'vessel_number',
// 'remark',
// 'is_transit_identified',
// ])
// ->where('status', '!=', 'Delivered')
// ->get();
$tableData = ImportTransit::where('status', '!=', 'Delivered')->orderByRaw("
CAST(
regexp_replace(cri_rfq_number, '.*-([0-9]+).*', '\\1')
AS INTEGER
)
CASE
WHEN cri_rfq_number ~ '[0-9]+'
THEN CAST(regexp_replace(cri_rfq_number, '[^0-9]', '', 'g') AS INTEGER)
ELSE NULL
END NULLS LAST
")->get();

View File

@@ -3529,14 +3529,80 @@ class QualityValidationResource extends Resource
$mPlantName = $mailData['plant_name'];
$emails = $mailData['emails'];
$ccEmails = $mailData['cc_emails'] ?? [];
$mUserName = Filament::auth()->user()->name;
if (! empty($emails)) {
// Mail::to($emails)->send(new InvalidSerialMail($serNo, $invoiceNumber, $mPlantName, $mInvoiceType));
Mail::to($emails)->send(
new InvalidQualityMail($state, $mPorder, $mPlantName, $mLinePart, $mUserName, $mExpectedValue, 'InvalidPartNumber')
);
} else {
// if (! empty($emails)) {
// if (is_array($emails)) {
// $emailList = collect($emails)
// ->flatMap(fn ($email) => explode(',', $email))
// ->map(fn ($email) => trim($email))
// ->filter()
// ->toArray();
// } else {
// $emailList = array_map('trim', explode(',', $emails));
// }
// $ccList = [];
// if (!empty($cc_emails)) {
// if (is_array($cc_emails)) {
// $ccList = collect($cc_emails)
// ->flatMap(fn ($email) => explode(',', $email))
// ->map(fn ($email) => trim($email))
// ->filter()
// ->toArray();
// } else {
// $ccList = collect(explode(',', $cc_emails))
// ->map(fn ($email) => trim($email))
// ->filter()
// ->toArray();
// }
// }
// Mail::to($emailList)
// ->cc($ccList)
// ->send(
// new InvalidQualityMail(
// $state,
// $mPorder,
// $mPlantName,
// $mLinePart,
// $mUserName,
// $mExpectedValue,
// 'InvalidPartNumber'
// )
// );
// }
if (!empty($emails)) {
$emailList = collect(is_array($emails) ? $emails : explode(',', $emails))
->flatMap(fn ($email) => explode(',', $email))
->map(fn ($email) => trim($email))
->filter()
->toArray();
$ccList = collect(is_array($ccEmails) ? $ccEmails : explode(',', $ccEmails))
->flatMap(fn ($email) => explode(',', $email))
->map(fn ($email) => trim($email))
->filter()
->toArray();
Mail::to($emailList)
->cc($ccList)
->send(
new InvalidQualityMail(
$state,
$mPorder,
$mPlantName,
$mLinePart,
$mUserName,
$mExpectedValue,
'InvalidPartNumber'
)
);
}
else {
\Log::warning("No recipients found for plant {$mPlantName}, module Serial, rule invalid_serial.");
}
$set('part_validation1', null);
@@ -3978,6 +4044,7 @@ class QualityValidationResource extends Resource
->where('module', 'QualityValidation')
->where('rule_name', 'QualityMail')
->where(fn ($q) => $q->whereNull('schedule_type')->orWhere('schedule_type', ''))
// ->get()
->pluck('email')
->toArray();
@@ -3995,13 +4062,16 @@ class QualityValidationResource extends Resource
->where('module', 'QualityValidation')
->where('rule_name', 'QualityMail')
->where(fn ($q) => $q->whereNull('schedule_type')->orWhere('schedule_type', ''))
->pluck('email')
->toArray();
->get(['email', 'cc_emails']);
// ->pluck('email')
// ->toArray();
return [
'plant_id' => $plantId,
'plant_name' => $mPlantName,
'emails' => $emails,
'emails' => $emails->pluck('email')->filter()->toArray(),
'cc_emails' => $emails->pluck('cc_emails')->filter()->toArray(),
// 'emails' => $emails,
];
}

View File

@@ -813,7 +813,7 @@ class TestingPanelReadingResource extends Resource
if ($plantId) {
return MotorTestingMaster::whereHas('testingPanelReadings', function ($query) {
$query->whereNotNull('id');
})->orderBy('subassembly_code')->pluck('subassembly_code', 'id');
})->whereNotNull('subassembly_code')->orderBy('subassembly_code')->pluck('subassembly_code', 'id');
} else {
return [];
// return Item::whereHas('motorTestingMasters')

View File

@@ -29,6 +29,10 @@
<td>Item Code</td>
<td style="text-align: center;">{{ $request->item->code ?? $request->code }}</td>
</tr>
<tr>
<td>Description</td>
<td style="text-align: center;">{{ $request->item->description ?? $request->description }}</td>
</tr>
<tr>
<td>Job Number</td>
<td style="text-align: center;">{{ $request->aufnr }}</td>