fixed #259
This commit is contained in:
@ -111,6 +111,16 @@ class Invoice extends Model
|
||||
return $query->where('invoice_status_code', '<>', 'draft');
|
||||
}
|
||||
|
||||
public function scopePaid($query)
|
||||
{
|
||||
return $query->where('invoice_status_code', '=', 'paid');
|
||||
}
|
||||
|
||||
public function scopeNotPaid($query)
|
||||
{
|
||||
return $query->where('invoice_status_code', '<>', 'paid');
|
||||
}
|
||||
|
||||
public function onCloning($src, $child = null)
|
||||
{
|
||||
$this->invoice_status_code = 'draft';
|
||||
|
Reference in New Issue
Block a user