akaunting/app/Models/Sale/InvoiceHistory.php

32 lines
615 B
PHP
Raw Normal View History

2017-09-14 22:21:00 +03:00
<?php
2019-12-31 15:49:09 +03:00
namespace App\Models\Sale;
2017-09-14 22:21:00 +03:00
2019-11-16 10:21:14 +03:00
use App\Abstracts\Model;
2017-09-14 22:21:00 +03:00
use App\Traits\Currencies;
class InvoiceHistory extends Model
{
use Currencies;
protected $table = 'invoice_histories';
/**
* Attributes that should be mass-assignable.
*
* @var array
*/
protected $fillable = ['company_id', 'invoice_id', 'status_code', 'notify', 'description'];
public function invoice()
{
2019-12-31 15:49:09 +03:00
return $this->belongsTo('App\Models\Sale\Invoice');
2017-09-14 22:21:00 +03:00
}
public function status()
{
2019-12-31 15:49:09 +03:00
return $this->belongsTo('App\Models\Sale\InvoiceStatus', 'status_code', 'code');
2017-09-14 22:21:00 +03:00
}
}