diff --git a/app/controllers/AppController.php b/app/controllers/AppController.php index 15dd80d671b3..a7f02ab4bff0 100644 --- a/app/controllers/AppController.php +++ b/app/controllers/AppController.php @@ -40,7 +40,7 @@ class AppController extends BaseController $database = Input::get('database'); $dbType = $database['default']; - $database[$dbType] = $database['type']; + $database['connections'] = [$dbType => $database['type']]; unset($database['type']); $mail = Input::get('mail'); @@ -59,19 +59,19 @@ class AppController extends BaseController return Redirect::to('/setup')->withInput(); } - $content = " $app, 'database' => $database, 'mail' => $mail] as $key => $config) { $content = ' $val) { + foreach ($database['connections'][$dbType] as $key => $val) { Config::set("database.connections.{$dbType}.{$key}", $val); } diff --git a/app/ninja/repositories/InvoiceRepository.php b/app/ninja/repositories/InvoiceRepository.php index 5e4c1e723d16..e74927157646 100755 --- a/app/ninja/repositories/InvoiceRepository.php +++ b/app/ninja/repositories/InvoiceRepository.php @@ -372,7 +372,10 @@ class InvoiceRepository $clone->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 @@