mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-28 17:03:59 +00:00
Merge branch 'dillon/90-e-invoice-e' into vapor/development
This commit is contained in:
@@ -42,11 +42,13 @@ class TransactionResource extends JsonResource
|
||||
$eInvoice = false;
|
||||
if($booking && $this->type === TransactionType::REFUND){
|
||||
$kvp = $this->attributesKVP()->where('key', KVPKey::TRANSACTION_MODEL_CLASS)->first();
|
||||
$transactionCreditNote = Transaction::where('id', $kvp->value)->first();
|
||||
if($transactionCreditNote){
|
||||
$kvp = $transactionCreditNote->attributesKVP()->where('key', KVPKey::AUTOCOUNT_DOCNO_CREDIT_NOTE)->first();
|
||||
if($kvp){
|
||||
$eInvoice = true;
|
||||
if($kvp){
|
||||
$transactionCreditNote = Transaction::where('id', $kvp->value)->first();
|
||||
if($transactionCreditNote){
|
||||
$kvp = $transactionCreditNote->attributesKVP()->where('key', KVPKey::AUTOCOUNT_DOCNO_CREDIT_NOTE)->first();
|
||||
if($kvp){
|
||||
$eInvoice = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user