mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for clone quotes
This commit is contained in:
parent
a3b0d199f5
commit
6236bf0dee
@ -28,6 +28,7 @@ class CloneQuoteToInvoiceFactory
|
||||
unset($quote_array['invoice_id']);
|
||||
unset($quote_array['id']);
|
||||
unset($quote_array['invitations']);
|
||||
unset($quote_array['user']);
|
||||
|
||||
//preserve terms if they exist on Quotes
|
||||
//if(array_key_exists('terms', $quote_array) && strlen($quote_array['terms']) < 2)
|
||||
@ -38,7 +39,6 @@ class CloneQuoteToInvoiceFactory
|
||||
// unset($quote_array['public_notes']);
|
||||
unset($quote_array['footer']);
|
||||
unset($quote_array['design_id']);
|
||||
unset($quote_array['user']);
|
||||
|
||||
foreach ($quote_array as $key => $value) {
|
||||
$invoice->{$key} = $value;
|
||||
@ -59,6 +59,7 @@ class CloneQuoteToInvoiceFactory
|
||||
$invoice->last_sent_date = null;
|
||||
$invoice->last_viewed = null;
|
||||
|
||||
|
||||
return $invoice;
|
||||
}
|
||||
}
|
||||
|
@ -240,12 +240,12 @@ class Invoice extends BaseModel
|
||||
|
||||
public function getDueDateAttribute($value)
|
||||
{
|
||||
return $this->dateMutator($value);
|
||||
return $value ? $this->dateMutator($value) : null;
|
||||
}
|
||||
|
||||
public function getPartialDueDateAttribute($value)
|
||||
{
|
||||
return $this->dateMutator($value);
|
||||
return $value ? $this->dateMutator($value) : null;
|
||||
}
|
||||
|
||||
public function company(): \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
|
Loading…
x
Reference in New Issue
Block a user