Files
exchange-2.0/app/Models/Transaction.php
T
weiken.intex 9ed67e74e2 create Transaction & Transaction Detail
- Supplier (AP)
	- PO
	- DO
	- INV

- Customer (AR)
	- PO
	- DO
	- INV
2020-12-07 14:00:24 +08:00

28 lines
551 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Relations\HasOne;
class Transaction extends AbstractModel
{
protected $table = 'transaction';
public function company(): HasOne
{
return $this->hasOne(Companies::class, 'company_id', 'id');
}
public function currency(): HasOne
{
return $this->hasOne(Currency::class, 'currency_id', 'id');
}
public function original_currency(): HasOne
{
return $this->hasOne(Currency::class, 'original_currency_id', 'id');
}
}