diff --git a/app/Constants.php b/app/Constants.php index 5ab8e4d5afdc..151d0026df8e 100644 --- a/app/Constants.php +++ b/app/Constants.php @@ -292,7 +292,7 @@ if (!defined('APP_NAME')) define('NINJA_APP_URL', env('NINJA_APP_URL', 'https://app.invoiceninja.com')); define('NINJA_DOCS_URL', env('NINJA_DOCS_URL', 'http://docs.invoiceninja.com/en/latest')); define('NINJA_DATE', '2000-01-01'); - define('NINJA_VERSION', '3.0.2' . env('NINJA_VERSION_SUFFIX')); + define('NINJA_VERSION', '3.0.3' . env('NINJA_VERSION_SUFFIX')); define('SOCIAL_LINK_FACEBOOK', env('SOCIAL_LINK_FACEBOOK', 'https://www.facebook.com/invoiceninja')); define('SOCIAL_LINK_TWITTER', env('SOCIAL_LINK_TWITTER', 'https://twitter.com/invoiceninja')); diff --git a/app/Http/Controllers/InvoiceApiController.php b/app/Http/Controllers/InvoiceApiController.php index a408f6e6dfee..793d00926e21 100644 --- a/app/Http/Controllers/InvoiceApiController.php +++ b/app/Http/Controllers/InvoiceApiController.php @@ -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; diff --git a/app/Http/Controllers/InvoiceController.php b/app/Http/Controllers/InvoiceController.php index fadb5e177c74..83542823fdc2 100644 --- a/app/Http/Controllers/InvoiceController.php +++ b/app/Http/Controllers/InvoiceController.php @@ -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 { diff --git a/app/Ninja/PaymentDrivers/BasePaymentDriver.php b/app/Ninja/PaymentDrivers/BasePaymentDriver.php index d4d83a3ad045..e5bbb005b451 100644 --- a/app/Ninja/PaymentDrivers/BasePaymentDriver.php +++ b/app/Ninja/PaymentDrivers/BasePaymentDriver.php @@ -612,7 +612,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); diff --git a/app/Ninja/Repositories/InvoiceRepository.php b/app/Ninja/Repositories/InvoiceRepository.php index 3d7d81d02cbe..aa116df4872a 100644 --- a/app/Ninja/Repositories/InvoiceRepository.php +++ b/app/Ninja/Repositories/InvoiceRepository.php @@ -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', @@ -869,7 +869,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);