mirror of
				https://github.com/crater-invoice/crater.git
				synced 2025-11-03 14:03:18 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			32 lines
		
	
	
		
			552 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			552 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?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);
 | 
						|
    }
 | 
						|
}
 |