mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-30 01:43:59 +00:00
crm changes
This commit is contained in:
@@ -25,6 +25,11 @@ class Transaction extends AbstractModel implements Documentable, Transactionable
|
||||
use SoftDeletes;
|
||||
use LogData;
|
||||
|
||||
protected $casts = [
|
||||
'type' => 'int',
|
||||
'status' => 'int',
|
||||
];
|
||||
|
||||
protected $table = 'transactions';
|
||||
|
||||
public function owner(): morphTo
|
||||
@@ -112,6 +117,14 @@ class Transaction extends AbstractModel implements Documentable, Transactionable
|
||||
return $this->HasOne(GroupTransaction::class, 'transaction_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return HasOne
|
||||
*/
|
||||
public function voucherRedemption(): HasOne
|
||||
{
|
||||
return $this->HasOne(VoucherRedemption::class, 'transaction_id', 'id');
|
||||
}
|
||||
|
||||
public function convert_original_amount()
|
||||
{
|
||||
if($this->booking()->first()->fix_currency_id !== 1) {
|
||||
|
||||
Reference in New Issue
Block a user