From 9a7ea008460f8720fb14b07cefd1ebde0dca23fb Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Wed, 12 Nov 2025 09:45:24 +0530 Subject: [PATCH] Added customer code column and no of days pending and indication colour messages --- .../Commands/SendInvoiceDataReport.php | 5 +++-- .../views/mail/invoice_data_report.blade.php | 19 +++++++++++++++---- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/app/Console/Commands/SendInvoiceDataReport.php b/app/Console/Commands/SendInvoiceDataReport.php index e823476..44bc741 100644 --- a/app/Console/Commands/SendInvoiceDataReport.php +++ b/app/Console/Commands/SendInvoiceDataReport.php @@ -181,11 +181,12 @@ class SendInvoiceDataReport extends Command //'no' => $no++, 'plant' => $plant->name, // 'distribution_type' => $selectedDistribution, - // 'customer_code' => $inv->customer_code, + 'customer_code' => $inv->customer_code, 'document_number' => $inv->document_number, 'document_date' => $inv->document_date, 'customer_trade_name' => $inv->customer_trade_name, 'customer_location' => $inv->customer_location, + 'no_of_days_pending' => abs((int)now()->diffInDays($documentDate)), 'status' => 'Pending', 'status_class' => $statusColor, ]; @@ -208,7 +209,7 @@ class SendInvoiceDataReport extends Command $this->info($contentVars['greeting'] ?? 'Invoice Data Report'); $this->table( - ['No', 'Plant', 'Document Number', 'Document Date', 'Trade Name', 'Location', 'Status'],//'Distribution Type', 'Customer Code', + ['No', 'Plant', 'Customer Code', 'Document Number', 'Document Date', 'Trade Name', 'Location', 'Pending Days', 'Status'],//'Distribution Type' $tableData ); $this->info($contentVars['wishes'] ?? ''); diff --git a/resources/views/mail/invoice_data_report.blade.php b/resources/views/mail/invoice_data_report.blade.php index 746659b..d79f3aa 100644 --- a/resources/views/mail/invoice_data_report.blade.php +++ b/resources/views/mail/invoice_data_report.blade.php @@ -79,12 +79,13 @@ No Plant - {{-- Distribution Type - Customer Code --}} + {{-- Distribution Type --}} + Customer Code Document Number Document Date Customer TradeName Customer Location + Pending Days Status @@ -93,8 +94,8 @@ {{ $row['no'] }} {{ $row['plant'] }} - {{-- {{ $row['distribution_type'] }} - {{ $row['customer_code'] }} --}} + {{-- {{ $row['distribution_type'] }} --}} + {{ $row['customer_code'] }} {{ $row['document_number'] }} @if(!empty($row['document_date']) && $row['document_date'] != '-') @@ -110,6 +111,7 @@ {{-- {{ $row['status'] }} --}} + {{ $row['no_of_days_pending'] }} {{ $row['status'] }} @@ -118,6 +120,15 @@ @endif + {{--

* Pending - Long Days Pending, Pending - One Day Pending

--}} +

+ * Pending
+ + - Long Days Pending
+ + - One Day Pending +

+

{!! $wishes !!}