scope is added for the code field of InvoiceTotal model

This commit is contained in:
Sevan Nerse 2020-11-11 13:18:13 +03:00
parent 5c7a886a99
commit 66ac9eceb1

View File

@ -31,6 +31,11 @@ class InvoiceTotal extends Model
return $this->belongsTo('App\Models\Sale\Invoice');
}
public function scopeCode($query, $code)
{
return $query->where('code', '=', $code);
}
/**
* Convert amount to double.
*