From 3ce478e27a74af822bdf29a5eaeed7c070394ec6 Mon Sep 17 00:00:00 2001 From: Omair Saleh Date: Tue, 17 Jan 2023 12:07:36 +0800 Subject: [PATCH] debug update group rate --- app/Models/Transaction.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/Models/Transaction.php b/app/Models/Transaction.php index a1fb0849..42cb198b 100644 --- a/app/Models/Transaction.php +++ b/app/Models/Transaction.php @@ -104,6 +104,14 @@ class Transaction extends AbstractModel implements Documentable, Transactionable return $this->HasMany(TransactionDetail::class, 'transaction_id', 'id'); } + /** + * @return HasOneThrough + */ + public function group(): HasOneThrough + { + return $this->HasOneThrough(Group::class, GroupTransaction::class); + } + public function convert_original_amount() { if($this->booking()->first()->fix_currency_id !== 1) {