mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
Merge branch 'dillon/90-e-invoice-e' into vapor/staging
This commit is contained in:
@@ -162,9 +162,8 @@ class CreateInvoiceTransactionV2Processor
|
||||
$eInvoiceStartDate = Carbon::parse(env('E_INVOICE_START_DATE', '2025-07-01 00:00:00'));
|
||||
$bookingCreatedDate = Carbon::parse($booking->created_at);
|
||||
$eInvoiceRequestedDate = Carbon::parse($supplier->e_invoice_requested_at);
|
||||
|
||||
// if ($bookingCreatedDate->isAfter($eInvoiceStartDate) && $bookingCreatedDate->isAfter($eInvoiceRequestedDate) && $supplier->e_invoice === 1)
|
||||
if ($bookingCreatedDate->isAfter($eInvoiceStartDate) && $bookingCreatedDate->diffInMinutes($eInvoiceRequestedDate) <= 60 && $supplier->e_invoice === 1) {
|
||||
|
||||
if ($bookingCreatedDate->isAfter($eInvoiceStartDate) && ($bookingCreatedDate->isAfter($eInvoiceRequestedDate) || $bookingCreatedDate->diffInMinutes($eInvoiceRequestedDate) <= 60) && $supplier->e_invoice === 1) {
|
||||
$eInvoice = true;
|
||||
}
|
||||
$kvp = $booking->attributesKVP()->where('key', KVPKey::BOOKING_EINVOICE_ELIGIBLE)->first();
|
||||
|
||||
@@ -141,7 +141,7 @@ class AutocountSalesInvoiceBookingResource extends JsonResource
|
||||
'DebtorCode' => $company->debtor,
|
||||
'Ref' => $invoiceTransaction ? $invoiceTransaction->bill_no : '',
|
||||
'ShipInfo' => $this->marking,
|
||||
'AccNo' => $category === 'Compensation Voucher' ? '1000-000' : '949-2000',
|
||||
'AccNo' => $category === 'Compensation Voucher' ? '920-0000' : '949-2000',
|
||||
'DetailDescription' => 'PRODUCT NAME :',
|
||||
'FurtherDescription' => $voucher->code,
|
||||
'Classification' => '022',
|
||||
|
||||
@@ -32,7 +32,7 @@ class BookingResource extends JsonResource
|
||||
$eInvoiceRequestedDate = Carbon::parse($this->company->e_invoice_requested_at);
|
||||
|
||||
// if ($bookingCreatedDate->isAfter($eInvoiceStartDate) && $bookingCreatedDate->isAfter($eInvoiceRequestedDate) && $this->company->e_invoice === 1) {
|
||||
if ($bookingCreatedDate->isAfter($eInvoiceStartDate) && $bookingCreatedDate->diffInMinutes($eInvoiceRequestedDate) <= 60 && $this->company->e_invoice === 1) {
|
||||
if ($bookingCreatedDate->isAfter($eInvoiceStartDate) && ($bookingCreatedDate->isAfter($eInvoiceRequestedDate) || $bookingCreatedDate->diffInMinutes($eInvoiceRequestedDate) <= 60) && $this->company->e_invoice === 1) {
|
||||
$eInvoice = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user