mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-31 21:51:10 -04:00
init crater
This commit is contained in:
31
app/TaxType.php
Normal file
31
app/TaxType.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
namespace Laraspace;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Laraspace\Tax;
|
||||
|
||||
class TaxType extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'percent',
|
||||
'company_id',
|
||||
'compound_tax',
|
||||
'collective_tax',
|
||||
'description'
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'percent' => 'float'
|
||||
];
|
||||
|
||||
public function taxes()
|
||||
{
|
||||
return $this->hasMany(Tax::class);
|
||||
}
|
||||
|
||||
public function scopeWhereCompany($query, $company_id)
|
||||
{
|
||||
$query->where('company_id', $company_id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user