mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
E-Invoice - Fix an error reported by Eileen on a transfer with refund inaccessible
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