mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-22 14:04:01 +00:00
E-Invoice - Fix a problem Regenerating E-Invoice does not pick up latest data
This commit is contained in:
@@ -81,7 +81,8 @@ class GenerateCreditNotePdfV2Logic
|
||||
}
|
||||
|
||||
$supplier = $this->fetchesCompany->execute(['id' => $transaction->receiver]);
|
||||
$brn = $supplier->documents->where('document_type', DocumentType::SSM_REGISTRATION)->first();
|
||||
// $brn = $supplier->documents->where('document_type', DocumentType::SSM_REGISTRATION)->first(); //wrong
|
||||
$brn = $supplier->documents()->where('document_type', DocumentType::SSM_REGISTRATION)->latest()->first();
|
||||
|
||||
$eInvoiceStarted = false;
|
||||
$eInvoiceStartDate = Carbon::parse(env('E_INVOICE_START_DATE', '2025-07-01 00:00:00'));
|
||||
|
||||
Reference in New Issue
Block a user