mirror of
https://github.com/crater-invoice/crater.git
synced 2025-12-15 09:52:55 -05:00
v6 update
This commit is contained in:
@@ -35,6 +35,8 @@ class Estimate extends Model implements HasMedia
|
||||
'created_at',
|
||||
'updated_at',
|
||||
'deleted_at',
|
||||
'estimate_date',
|
||||
'expiry_date'
|
||||
];
|
||||
|
||||
protected $appends = [
|
||||
@@ -54,20 +56,6 @@ class Estimate extends Model implements HasMedia
|
||||
'exchange_rate' => 'float'
|
||||
];
|
||||
|
||||
public function setEstimateDateAttribute($value)
|
||||
{
|
||||
if ($value) {
|
||||
$this->attributes['estimate_date'] = Carbon::createFromFormat('Y-m-d', $value);
|
||||
}
|
||||
}
|
||||
|
||||
public function setExpiryDateAttribute($value)
|
||||
{
|
||||
if ($value) {
|
||||
$this->attributes['expiry_date'] = Carbon::createFromFormat('Y-m-d', $value);
|
||||
}
|
||||
}
|
||||
|
||||
public function getEstimatePdfUrlAttribute()
|
||||
{
|
||||
return url('/estimates/pdf/'.$this->unique_hash);
|
||||
|
||||
Reference in New Issue
Block a user