mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-21 21:43:57 +00:00
Merge branch 'dillon/90-e-invoice-f-2' into vapor/development
This commit is contained in:
@@ -88,7 +88,28 @@ class GenerateCreditNotePdfV2Logic
|
||||
if ($bookingCreatedDate->isAfter($eInvoiceStartDate)) {
|
||||
$eInvoiceStarted = true;
|
||||
}
|
||||
// $eInvoiceStarted = false; //cief todo: 90 - for testing
|
||||
|
||||
if($eInvoiceStarted) {
|
||||
$eInvoiceStarted = false; //reset to re-evaluate second time
|
||||
$autoCountInvoiceId = '';
|
||||
$autoCountEInvoiceValidationLink = '';
|
||||
|
||||
$metadata = $booking->attributesKVP()->where('key', KVPKey::AUTOCOUNT_DOCNO)->first();
|
||||
if($metadata){
|
||||
$autoCountInvoiceId = $metadata->value;
|
||||
}
|
||||
$metadata = $booking->attributesKVP()->where('key', KVPKey::AUTOCOUNT_EINVOICE_VALIDATION_LINK)->first();
|
||||
if($metadata){
|
||||
$autoCountEInvoiceValidationLink = $metadata->value;
|
||||
}
|
||||
|
||||
Log::info('autoCountInvoiceId: ' . $autoCountInvoiceId);
|
||||
Log::info('autoCountEInvoiceValidationLink: ' . $autoCountEInvoiceValidationLink);
|
||||
|
||||
if($autoCountInvoiceId && $autoCountEInvoiceValidationLink){
|
||||
$eInvoiceStarted = true;
|
||||
}
|
||||
}
|
||||
|
||||
if($eInvoiceStarted)
|
||||
{
|
||||
@@ -103,7 +124,7 @@ class GenerateCreditNotePdfV2Logic
|
||||
}
|
||||
}
|
||||
else{
|
||||
Log::info('Based on booking created date, E-Credit Note not yet started');
|
||||
Log::info('Based on booking created date, E-Credit Note not yet started. / Not Yet Ready.');
|
||||
}
|
||||
|
||||
$pdf = LaravelMpdf::loadView($pdfTemplateName, ['transaction' => $transaction, 'booking' => $booking, 'supplier' => $supplier, 'date' => $date, 'brn' => $brn,]);
|
||||
|
||||
Reference in New Issue
Block a user