upgraded to laravel 10

This commit is contained in:
Denis Duliçi
2023-03-16 16:36:13 +03:00
parent f16d121c45
commit 37b0d4207e
34 changed files with 843 additions and 866 deletions

View File

@ -30,8 +30,6 @@ class Document extends Model
protected $appends = ['attachment', 'amount_without_tax', 'discount', 'paid', 'received_at', 'status_label', 'sent_at', 'reconciled', 'contact_location'];
protected $dates = ['deleted_at', 'issued_at', 'due_at'];
protected $fillable = [
'company_id',
'type',
@ -67,8 +65,11 @@ class Document extends Model
* @var array
*/
protected $casts = [
'amount' => 'double',
'issued_at' => 'datetime',
'due_at' => 'datetime',
'amount' => 'double',
'currency_rate' => 'double',
'deleted_at' => 'datetime',
];
/**

View File

@ -40,9 +40,10 @@ class DocumentItem extends Model
* @var array
*/
protected $casts = [
'price' => 'double',
'total' => 'double',
'tax' => 'double',
'price' => 'double',
'total' => 'double',
'tax' => 'double',
'deleted_at' => 'datetime',
];
/**

View File

@ -16,15 +16,6 @@ class DocumentItemTax extends Model
protected $fillable = ['company_id', 'type', 'document_id', 'document_item_id', 'tax_id', 'name', 'amount', 'created_from', 'created_by'];
/**
* The attributes that should be cast.
*
* @var array
*/
protected $casts = [
'amount' => 'double',
];
public function document()
{
return $this->belongsTo('App\Models\Document\Document')->withoutGlobalScope('App\Scopes\Document');

View File

@ -18,15 +18,6 @@ class DocumentTotal extends Model
protected $fillable = ['company_id', 'type', 'document_id', 'code', 'name', 'amount', 'sort_order', 'created_from', 'created_by'];
/**
* The attributes that should be cast.
*
* @var array
*/
protected $casts = [
'amount' => 'double',
];
public function document()
{
return $this->belongsTo('App\Models\Document\Document')->withoutGlobalScope('App\Scopes\Document');