mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-09-01 19:04:00 +00:00
E-Invoice - special handling of cases for those booking done before 1st July 2025 that need to generate E-Invoice
This commit is contained in:
@@ -10,6 +10,7 @@ use App\Classes\ValueObjects\Constants\ApprovalStatus;
|
||||
use App\Classes\ValueObjects\Constants\BookingAttributeNames;
|
||||
use App\Classes\ValueObjects\Constants\TransactionType;
|
||||
use App\Classes\ValueObjects\Constants\DocumentType;
|
||||
use App\Classes\ValueObjects\Constants\KVPKey;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
@@ -32,9 +33,12 @@ class BookingResource extends JsonResource
|
||||
if ($bookingCreatedDate->isAfter($eInvoiceStartDate) && $this->company->e_invoice === 1) { //&& $bookingCreatedDate->diffInMinutes($eInvoiceRequestedDate) <= 480 cief todo: 90
|
||||
$eInvoice = true;
|
||||
}
|
||||
// if ($this->company->e_invoice === 1) {
|
||||
// $eInvoice = true;
|
||||
// }
|
||||
|
||||
$kvp = $this->attributesKVP()->where('key', KVPKey::BOOKING_EINVOICE_ELIGIBLE)->first();
|
||||
if($kvp){
|
||||
$eInvoice = true;
|
||||
}
|
||||
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'company' => new CompanyResource($this->company),
|
||||
|
||||
Reference in New Issue
Block a user