mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for quotes
This commit is contained in:
parent
c1b8d676c2
commit
26877f905f
@ -399,7 +399,6 @@ class QuoteController extends BaseController
|
||||
|
||||
$quote->service()
|
||||
->triggeredActions($request);
|
||||
// ->deletePdf();
|
||||
|
||||
event(new QuoteWasUpdated($quote, $quote->company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null)));
|
||||
|
||||
|
@ -69,8 +69,11 @@ class UpdateOrCreateProduct implements ShouldQueue
|
||||
* we do NOT update the product details this short block we
|
||||
* check for the presence of a task_id and/or expense_id
|
||||
*/
|
||||
$expense_count = count(array_column((array) $this->products, 'expense_id'));
|
||||
$task_count = count(array_column((array) $this->products, 'task_id'));
|
||||
// $expense_count = count(array_column((array) $this->products, 'expense_id'));
|
||||
// $task_count = count(array_column((array) $this->products, 'task_id'));
|
||||
|
||||
$task_count = implode("", array_column((array) $this->products, 'task_id'));
|
||||
$expense_count = implode("", array_column((array) $this->products, 'expense_id'));
|
||||
|
||||
if ($task_count >= 1 || $expense_count >= 1) {
|
||||
return;
|
||||
|
@ -44,7 +44,7 @@ use Laracasts\Presenter\PresentableTrait;
|
||||
* @property string|null $po_number
|
||||
* @property string|null $date
|
||||
* @property string|null $last_sent_date
|
||||
* @property string|null $due_date
|
||||
* @property string|null|Carbon $due_date
|
||||
* @property string|null $next_send_date
|
||||
* @property bool $is_deleted
|
||||
* @property object|null $line_items
|
||||
@ -164,7 +164,7 @@ class Quote extends BaseModel
|
||||
|
||||
protected $casts = [
|
||||
// 'date' => 'date:Y-m-d',
|
||||
// 'due_date' => 'date:Y-m-d',
|
||||
'due_date' => 'date:Y-m-d',
|
||||
// 'partial_due_date' => 'date:Y-m-d',
|
||||
'line_items' => 'object',
|
||||
'backup' => 'object',
|
||||
@ -195,10 +195,10 @@ class Quote extends BaseModel
|
||||
return $this->dateMutator($value);
|
||||
}
|
||||
|
||||
public function getDueDateAttribute($value)
|
||||
{
|
||||
return $this->dateMutator($value);
|
||||
}
|
||||
// public function getDueDateAttribute($value)
|
||||
// {
|
||||
// return $this->dateMutator($value);
|
||||
// }
|
||||
|
||||
public function getPartialDueDateAttribute($value)
|
||||
{
|
||||
|
@ -42,7 +42,6 @@ class MarkSent
|
||||
->service()
|
||||
->setStatus(Quote::STATUS_SENT)
|
||||
->applyNumber()
|
||||
// ->deletePdf()
|
||||
->save();
|
||||
|
||||
event(new QuoteWasMarkedSent($this->quote, $this->quote->company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null)));
|
||||
|
@ -111,7 +111,7 @@ class QuoteTransformer extends EntityTransformer
|
||||
'reminder2_sent' => $quote->reminder2_sent ?: '',
|
||||
'reminder3_sent' => $quote->reminder3_sent ?: '',
|
||||
'reminder_last_sent' => $quote->reminder_last_sent ?: '',
|
||||
'due_date' => $quote->due_date ?: '',
|
||||
'due_date' => $quote->due_date ? $quote->due_date->format('Y-m-d') : '',
|
||||
'terms' => $quote->terms ?: '',
|
||||
'public_notes' => $quote->public_notes ?: '',
|
||||
'private_notes' => $quote->private_notes ?: '',
|
||||
|
Loading…
x
Reference in New Issue
Block a user