mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-27 11:41:09 -04:00
solve trailing data error
This commit is contained in:
@ -56,20 +56,6 @@ class Estimate extends Model implements HasMedia
|
||||
'exchange_rate' => 'float'
|
||||
];
|
||||
|
||||
public function setEstimateDateAttribute($value)
|
||||
{
|
||||
if ($value) {
|
||||
$this->attributes['estimate_date'] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
public function setExpiryDateAttribute($value)
|
||||
{
|
||||
if ($value) {
|
||||
$this->attributes['expiry_date'] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
public function getEstimatePdfUrlAttribute()
|
||||
{
|
||||
return url('/estimates/pdf/'.$this->unique_hash);
|
||||
|
||||
@ -34,13 +34,6 @@ class Expense extends Model implements HasMedia
|
||||
'exchange_rate' => 'float'
|
||||
];
|
||||
|
||||
public function setExpenseDateAttribute($value)
|
||||
{
|
||||
if ($value) {
|
||||
$this->attributes['expense_date'] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
public function category()
|
||||
{
|
||||
return $this->belongsTo(ExpenseCategory::class, 'expense_category_id');
|
||||
|
||||
@ -63,20 +63,6 @@ class Invoice extends Model implements HasMedia
|
||||
'invoicePdfUrl',
|
||||
];
|
||||
|
||||
public function setInvoiceDateAttribute($value)
|
||||
{
|
||||
if ($value) {
|
||||
$this->attributes['invoice_date'] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
public function setDueDateAttribute($value)
|
||||
{
|
||||
if ($value) {
|
||||
$this->attributes['due_date'] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
public function emailLogs()
|
||||
{
|
||||
return $this->morphMany('App\Models\EmailLog', 'mailable');
|
||||
|
||||
@ -54,13 +54,6 @@ class Payment extends Model implements HasMedia
|
||||
});
|
||||
}
|
||||
|
||||
public function setPaymentDateAttribute($value)
|
||||
{
|
||||
if ($value) {
|
||||
$this->attributes['payment_date'] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
public function getFormattedCreatedAtAttribute($value)
|
||||
{
|
||||
$dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id);
|
||||
|
||||
Reference in New Issue
Block a user