1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-09 12:42:36 +01:00

Fix for dates

This commit is contained in:
Hillel Coren 2017-01-30 10:15:28 +02:00
parent cdd8150605
commit 6d65b8e7cc
4 changed files with 6 additions and 6 deletions

View File

@ -231,7 +231,7 @@ class InvoiceApiController extends BaseAPIController
}
if (!isset($data['invoice_date'])) {
$fields['invoice_date_sql'] = Utils::today();
$fields['invoice_date_sql'] = Utils::today(false)->format('Y-m-d');
}
if (!isset($data['due_date'])) {
$fields['due_date_sql'] = false;

View File

@ -101,7 +101,7 @@ class InvoiceController extends BaseController
$invoice->invoice_number = $account->getNextNumber($invoice);
$invoice->balance = $invoice->amount;
$invoice->invoice_status_id = 0;
$invoice->invoice_date = Utils::today();
$invoice->invoice_date = Utils::today(false)->format('Y-m-d');
$method = 'POST';
$url = "{$entityType}s";
} else {

View File

@ -603,7 +603,7 @@ class BasePaymentDriver
$payment->client_id = $invoice->client_id;
$payment->contact_id = $invitation->contact_id;
$payment->transaction_reference = $ref;
$payment->payment_date = Utils::today();
$payment->payment_date = Utils::today(false)->format('Y-m-d');
$payment->ip = Request::ip();
$payment = $this->creatingPayment($payment, $paymentMethod);

View File

@ -301,7 +301,7 @@ class InvoiceRepository extends BaseRepository
$entityType = ENTITY_QUOTE;
}
$invoice = $account->createInvoice($entityType, $data['client_id']);
$invoice->invoice_date = Utils::today();
$invoice->invoice_date = Utils::today(false)->format('Y-m-d');
if (isset($data['has_tasks']) && filter_var($data['has_tasks'], FILTER_VALIDATE_BOOLEAN)) {
$invoice->has_tasks = true;
}
@ -666,7 +666,7 @@ class InvoiceRepository extends BaseRepository
}
}
$clone->invoice_number = $invoiceNumber ?: $account->getNextNumber($clone);
$clone->invoice_date = Utils::today();
$clone->invoice_date = Utils::today(false)->format('Y-m-d');
foreach ([
'client_id',
@ -870,7 +870,7 @@ class InvoiceRepository extends BaseRepository
$invoice->invoice_number = $recurInvoice->account->getNextNumber($invoice);
$invoice->amount = $recurInvoice->amount;
$invoice->balance = $recurInvoice->amount;
$invoice->invoice_date = Utils::today();
$invoice->invoice_date = Utils::today(false)->format('Y-m-d');
$invoice->discount = $recurInvoice->discount;
$invoice->po_number = $recurInvoice->po_number;
$invoice->public_notes = Utils::processVariables($recurInvoice->public_notes);