mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-09-01 10:54:00 +00:00
Merge branch 'development' into 'master'
Development See merge request CIEFWorldwideSdnBhd/exchange-2.0!80
This commit is contained in:
@@ -57,7 +57,7 @@ class BookingResource extends JsonResource
|
||||
'expired_payment_attempts' => TransactionResource::collection($this->transactions()->payments()->where('status', ApprovalStatus::PENDING_SUBMISSION)->whereDate('expires_on', '<', Carbon::now())->get()),
|
||||
'payment_history' => TransactionResource::collection($this->transactions()->where(function($query){
|
||||
$query->where(function($query){
|
||||
$query->payments();
|
||||
$query->payments()->where('status', '!=', ApprovalStatus::PENDING_SUBMISSION);
|
||||
})->orWhere(function($query){
|
||||
$query->where(function($query){
|
||||
$query->where('type', TransactionType::REFUND)->whereIn('status', [ApprovalStatus::APPROVED, ApprovalStatus::PENDING_VERIFICATION, ApprovalStatus::REJECTED, ApprovalStatus::COMPLETED]);
|
||||
|
||||
@@ -16,14 +16,16 @@ class TransactionResource extends JsonResource
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
$booking = (int) $this->type === TransactionType::BILL ? $this->owner->owner : $this->booking;
|
||||
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'booking' => new BookingResource($this->booking),
|
||||
'booking' => new BookingResource($booking),
|
||||
'type' => (int) $this->type,
|
||||
'bill_no' => $this->bill_no,
|
||||
'payment_reference' => $this->payment_reference,
|
||||
'payment_method' => (float) $this->payment_method,
|
||||
'recipient_bank_account' => new BankResource($this->when((int) $this->type === TransactionType::BILL, $this->booking->bank)),
|
||||
'recipient_bank_account' => new BankResource($booking->bank),
|
||||
'issuer_name' => $this->issuerCompany->name,
|
||||
'amount' => (double) $this->amount,
|
||||
'original_amount' => (double) $this->original_amount,
|
||||
@@ -35,7 +37,6 @@ class TransactionResource extends JsonResource
|
||||
'status' => (int) $this->status,
|
||||
'details' => TransactionDetailResource::collection($this->transactionDetails),
|
||||
'documents' => new DocumentResource($this->documents()->first()),
|
||||
// 'transaction_payment' => new TransactionResource($this->when((int) $this->type === TransactionType::BILL, $this->owner)),
|
||||
'transaction_bill' => new TransactionResource($this->when((int) $this->type === TransactionType::PAYMENT, $this->transactions()->first())),
|
||||
'expires_on' => Carbon::parse($this->expires_on)->format('d-m-Y h:i:s A'),
|
||||
'updated_at' => Carbon::parse($this->updated_at)->format('d-m-Y h:i:s A'),
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<bank-in-component :data="item"></bank-in-component>
|
||||
<div class="row" v-if="item.status === 1 || item.status === 2">
|
||||
<div class="row hide" v-if="item.status === 1 || item.status === 2">
|
||||
<div class="col">
|
||||
<span class="text-complete fs-10 pointer requestModal" data-type="topUpModal">Cancel this order?</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user