mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-27 00:13:59 +00:00
fix and update the functionality and the ui for accounting automation
This commit is contained in:
@@ -4,9 +4,12 @@ namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Staudenmeir\EloquentHasManyDeep\HasRelationships;
|
||||
|
||||
class StatementTransaction extends Model
|
||||
{
|
||||
use HasRelationships;
|
||||
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
@@ -30,18 +33,18 @@ class StatementTransaction extends Model
|
||||
'posting_date' => 'datetime',
|
||||
];
|
||||
|
||||
public function account()
|
||||
{
|
||||
return $this->hasOneDeep(StatementAccount::class, [AccountStatement::class], ['id', 'id'], ['account_statement_id', 'statement_account_id']);
|
||||
}
|
||||
|
||||
public function statement()
|
||||
{
|
||||
return $this->belongsTo(AccountStatement::class, 'account_statement_id', 'id');
|
||||
}
|
||||
|
||||
public function owner()
|
||||
public function owners()
|
||||
{
|
||||
return $this->morphTo()->nullable();
|
||||
}
|
||||
|
||||
public function statementDetail()
|
||||
{
|
||||
return $this->hasMany(StatementTransactionsDetail::class);
|
||||
return $this->hasMany(StatementTransactionOwner::class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user