Fixes for quotes

This commit is contained in:
David Bomba 2024-01-24 08:28:18 +11:00
parent 26877f905f
commit b0edf7d8d2
2 changed files with 5 additions and 5 deletions

View File

@ -195,10 +195,10 @@ class Quote extends BaseModel
return $this->dateMutator($value); return $this->dateMutator($value);
} }
// public function getDueDateAttribute($value) public function getDueDateAttribute($value)
// { {
// return $this->dateMutator($value); return $value ? $this->dateMutator($value) : null;
// } }
public function getPartialDueDateAttribute($value) public function getPartialDueDateAttribute($value)
{ {

View File

@ -111,7 +111,7 @@ class QuoteTransformer extends EntityTransformer
'reminder2_sent' => $quote->reminder2_sent ?: '', 'reminder2_sent' => $quote->reminder2_sent ?: '',
'reminder3_sent' => $quote->reminder3_sent ?: '', 'reminder3_sent' => $quote->reminder3_sent ?: '',
'reminder_last_sent' => $quote->reminder_last_sent ?: '', 'reminder_last_sent' => $quote->reminder_last_sent ?: '',
'due_date' => $quote->due_date ? $quote->due_date->format('Y-m-d') : '', 'due_date' => $quote->due_date ?: '',
'terms' => $quote->terms ?: '', 'terms' => $quote->terms ?: '',
'public_notes' => $quote->public_notes ?: '', 'public_notes' => $quote->public_notes ?: '',
'private_notes' => $quote->private_notes ?: '', 'private_notes' => $quote->private_notes ?: '',