v2 first commit

This commit is contained in:
denisdulici
2019-11-16 10:21:14 +03:00
parent 5b23e9c2c4
commit 6d50fa8442
3075 changed files with 3451681 additions and 65594 deletions

View File

@ -2,7 +2,7 @@
namespace App\Models\Expense;
use App\Models\Model;
use App\Abstracts\Model;
use App\Traits\Currencies;
class BillHistory extends Model
@ -24,28 +24,8 @@ class BillHistory extends Model
return $this->belongsTo('App\Models\Expense\Bill');
}
public function item()
{
return $this->belongsTo('App\Models\Common\Item');
}
public function tax()
{
return $this->belongsTo('App\Models\Setting\Tax');
}
public function payment()
{
return $this->belongsTo('App\Models\Setting\Payment');
}
public function status()
{
return $this->belongsTo('App\Models\Expense\BillStatus', 'status_code', 'code');
}
public function getConvertedAmount($format = false)
{
return $this->convert($this->amount, $this->currency_code, $this->currency_rate, $format);
}
}