Merge pull request #1663 from SevanNerse/2.1-dev

scopes are added for InvoiceTotal and BillTotal models
This commit is contained in:
Cüneyt Şentürk 2020-11-11 13:50:16 +03:00 committed by GitHub
commit 1cff173824
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

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

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.
*