ranjith-dev #26

Merged
jothi merged 2 commits from ranjith-dev into master 2025-11-29 12:28:01 +00:00
Showing only changes of commit ff8aa8b536 - Show all commits

View File

@@ -51,9 +51,12 @@ class InvoiceDataMail extends Mailable
$firstRecord = InvoiceDataValidation::orderBy('document_date', 'asc')->first();
// $lastRecord = InvoiceDataValidation::orderBy('document_date', 'desc')->first();
if ($firstRecord) {
$startDate = null;
if ($firstRecord && $firstRecord->document_date != null && $firstRecord->document_date != '') {
$startDate = \Carbon\Carbon::parse($firstRecord->document_date)->startOfDay();
// $endDate = \Carbon\Carbon::parse($lastRecord->document_date)->endOfDay();
} else {
$startDate = now()->subDay()->setTime(10, 0, 0);
}
$endDate = now()->setTime(10, 0, 0);