upgraded to laravel 10
This commit is contained in:
@ -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',
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -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',
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -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');
|
||||
|
@ -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');
|
||||
|
Reference in New Issue
Block a user