make 1688 supplier in supplier currency order dashboard has the same flow as other supplier

This commit is contained in:
Jia Sheng
2024-07-31 22:39:04 +08:00
parent 1467d0880f
commit 7e42bda76e
6 changed files with 55 additions and 36 deletions
+9 -8
View File
@@ -30,6 +30,7 @@ class BillGroupResource extends JsonResource
'original_currency' => new CurrencyResource($this->original_currency),
'issuer_name' => $this->issuerCompany->name,
'issuer_id' => $this->issuerCompany->id,
'invoice_amount' => (float) $this->amount + $bill_refund_amount - $this->service_charge,
'amount' => (float) $this->amount,
'service_charge' => (float) $this->service_charge,
'currency' => new CurrencyResource($this->currency),
@@ -48,12 +49,12 @@ class BillGroupResource extends JsonResource
'type' => (int) $transaction->type,
'bill_no' => $transaction->bill_no,
'payment_method' => (float) $transaction->payment_method,
'amount' => (double) $transaction->amount,
'original_amount' => (double) $transaction->original_amount,
'amount' => (float) $transaction->amount,
'original_amount' => (float) $transaction->original_amount,
'currency' => new CurrencyResource($transaction->currency),
'original_currency' => new CurrencyResource($transaction->original_currency),
'service_charge' => (double) $transaction->service_charge,
'tax' => (double) $transaction->tax,
'service_charge' => (float) $transaction->service_charge,
'tax' => (float) $transaction->tax,
'status' => (int) $transaction->status,
'statusText' => ApprovalStatus::APPROVAL_STATUS_ID[(int) $transaction->status],
'documents' => $transaction->documents()->first() ? new DocumentResource($transaction->documents()->first()) : null,
@@ -66,12 +67,12 @@ class BillGroupResource extends JsonResource
'type' => (int) $transaction->type,
'bill_no' => $transaction->bill_no,
'payment_method' => (float) $transaction->payment_method,
'amount' => (double) $transaction->amount,
'original_amount' => (double) $transaction->original_amount,
'amount' => (float) $transaction->amount,
'original_amount' => (float) $transaction->original_amount,
'currency' => new CurrencyResource($transaction->currency),
'original_currency' => new CurrencyResource($transaction->original_currency),
'service_charge' => (double) $transaction->service_charge,
'tax' => (double) $transaction->tax,
'service_charge' => (float) $transaction->service_charge,
'tax' => (float) $transaction->tax,
'status' => (int) $transaction->status,
'statusText' => ApprovalStatus::APPROVAL_STATUS_ID[(int) $transaction->status],
'updated_at' => Carbon::parse($transaction->updated_at)->format('d-m-Y h:i:s A'),