mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 14:04:31 -04:00
Fix timezone issue with dates
This commit is contained in:
parent
189d6381ca
commit
4f04e56c7e
@ -219,7 +219,7 @@ class InvoiceApiController extends BaseAPIController
|
||||
}
|
||||
|
||||
if (!isset($data['invoice_date'])) {
|
||||
$fields['invoice_date_sql'] = date_create()->format('Y-m-d');
|
||||
$fields['invoice_date_sql'] = Utils::today();
|
||||
}
|
||||
if (!isset($data['due_date'])) {
|
||||
$fields['due_date_sql'] = false;
|
||||
|
@ -103,7 +103,7 @@ class InvoiceController extends BaseController
|
||||
$invoice->invoice_number = $account->getNextInvoiceNumber($invoice);
|
||||
$invoice->balance = $invoice->amount;
|
||||
$invoice->invoice_status_id = 0;
|
||||
$invoice->invoice_date = date_create()->format('Y-m-d');
|
||||
$invoice->invoice_date = Utils::today();
|
||||
$method = 'POST';
|
||||
$url = "{$entityType}s";
|
||||
} else {
|
||||
|
@ -602,7 +602,7 @@ class BasePaymentDriver
|
||||
$payment->client_id = $invoice->client_id;
|
||||
$payment->contact_id = $invitation->contact_id;
|
||||
$payment->transaction_reference = $ref;
|
||||
$payment->payment_date = date_create()->format('Y-m-d');
|
||||
$payment->payment_date = Utils::today();
|
||||
$payment->ip = Request::ip();
|
||||
|
||||
$payment = $this->creatingPayment($payment, $paymentMethod);
|
||||
|
@ -297,7 +297,7 @@ class InvoiceRepository extends BaseRepository
|
||||
$entityType = ENTITY_QUOTE;
|
||||
}
|
||||
$invoice = $account->createInvoice($entityType, $data['client_id']);
|
||||
$invoice->invoice_date = date_create()->format('Y-m-d');
|
||||
$invoice->invoice_date = Utils::today();
|
||||
if (isset($data['has_tasks']) && filter_var($data['has_tasks'], FILTER_VALIDATE_BOOLEAN)) {
|
||||
$invoice->has_tasks = true;
|
||||
}
|
||||
@ -660,7 +660,7 @@ class InvoiceRepository extends BaseRepository
|
||||
}
|
||||
}
|
||||
$clone->invoice_number = $invoiceNumber ?: $account->getNextInvoiceNumber($clone);
|
||||
$clone->invoice_date = date_create()->format('Y-m-d');
|
||||
$clone->invoice_date = Utils::today();
|
||||
|
||||
foreach ([
|
||||
'client_id',
|
||||
@ -862,7 +862,7 @@ class InvoiceRepository extends BaseRepository
|
||||
$invoice->invoice_number = $recurInvoice->account->getNextInvoiceNumber($invoice);
|
||||
$invoice->amount = $recurInvoice->amount;
|
||||
$invoice->balance = $recurInvoice->amount;
|
||||
$invoice->invoice_date = date_create()->format('Y-m-d');
|
||||
$invoice->invoice_date = Utils::today();
|
||||
$invoice->discount = $recurInvoice->discount;
|
||||
$invoice->po_number = $recurInvoice->po_number;
|
||||
$invoice->public_notes = Utils::processVariables($recurInvoice->public_notes);
|
||||
|
Loading…
x
Reference in New Issue
Block a user