From dd718387ede012de798140bd358f02f4923c78ec Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sun, 8 Feb 2015 20:04:36 +0200 Subject: [PATCH] Fixed issue with production database config not being used --- app/controllers/AppController.php | 6 +++--- app/ninja/repositories/InvoiceRepository.php | 5 ++++- bootstrap/environment.default.php | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/controllers/AppController.php b/app/controllers/AppController.php index 15dd80d671b3..3f887089d9d5 100644 --- a/app/controllers/AppController.php +++ b/app/controllers/AppController.php @@ -59,19 +59,19 @@ class AppController extends BaseController return Redirect::to('/setup')->withInput(); } - $content = " $app, 'database' => $database, 'mail' => $mail] as $key => $config) { $content = 'balance = $invoice->amount; // if the invoice prefix is diff than quote prefix, use the same number for the invoice - if (($account->invoice_number_prefix || $account->quote_number_prefix) && $account->invoice_number_prefix != $account->quote_number_prefix) { + if (($account->invoice_number_prefix || $account->quote_number_prefix) + && $account->invoice_number_prefix != $account->quote_number_prefix + && $account->share_counter) { + $invoiceNumber = $invoice->invoice_number; if (strpos($invoiceNumber, $account->quote_number_prefix) === 0) { $invoiceNumber = substr($invoiceNumber, strlen($account->quote_number_prefix)); diff --git a/bootstrap/environment.default.php b/bootstrap/environment.default.php index 60409212e89a..c12ddd0b5998 100755 --- a/bootstrap/environment.default.php +++ b/bootstrap/environment.default.php @@ -1,4 +1,4 @@