mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-24 15:04:19 +00:00
show currency supplier info for transaction
This commit is contained in:
@@ -21,6 +21,7 @@ class TransactionResource extends JsonResource
|
||||
'booking' => new BookingResource($this->booking),
|
||||
'type' => (int) $this->type,
|
||||
'bill_no' => $this->bill_no,
|
||||
'issuer' => new CompanyResource($this->issuer),
|
||||
'recipient_bank_account' => new BankResource($this->when((int) $this->type === TransactionType::BILL,$this->booking->bank)),
|
||||
'amount' => (double) $this->amount,
|
||||
'original_amount' => (double) $this->original_amount,
|
||||
|
||||
@@ -26,6 +26,14 @@ class Transaction extends AbstractModel implements Documentable
|
||||
return $this->BelongsTo( Booking::class, 'booking_id', 'id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BelongsTo
|
||||
*/
|
||||
public function issuer(): BelongsTo
|
||||
{
|
||||
return $this->BelongsTo( Company::class, 'issuer', 'id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BelongsTo
|
||||
*/
|
||||
|
||||
@@ -16,6 +16,11 @@
|
||||
{{ item.type === 3 ? item.original_currency.short_code : item.currency.short_code}} {{(Math.round((item.type === 3 ? item.original_amount : item.amount + Number.EPSILON) * 100) / 100).toFixed(2).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto" v-if="$store.isAdmin && item.type === 3">
|
||||
<div class="font-heading fs-10 bold">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
|
||||
Reference in New Issue
Block a user