diff --git a/app/controllers/ClientController.php b/app/controllers/ClientController.php index 8d3f4891893b..af6edefd1fe0 100755 --- a/app/controllers/ClientController.php +++ b/app/controllers/ClientController.php @@ -212,7 +212,7 @@ class ClientController extends \BaseController { $client->private_notes = trim(Input::get('private_notes')); $client->size_id = Input::get('size_id') ? : null; $client->industry_id = Input::get('industry_id') ? : null; - $client->currency_id = Input::get('currency_id') ? : 1; + $client->currency_id = Input::get('currency_id') ? : null; $client->payment_terms = Input::get('payment_terms') ? : 0; $client->website = trim(Input::get('website')); diff --git a/public/built.js b/public/built.js index 6456151a5be7..e9a7f5ada7a8 100644 --- a/public/built.js +++ b/public/built.js @@ -31533,8 +31533,8 @@ function populateInvoiceComboboxes(clientId, invoiceId) { var client = clientMap[invoice.client.public_id]; if (!client) continue; // client is deleted/archived $invoiceCombobox.append(new Option(invoice.invoice_number + ' - ' + invoice.invoice_status.name + ' - ' + - getClientDisplayName(client) + ' - ' + formatMoney(invoice.amount, invoice.currency_id) + ' | ' + - formatMoney(invoice.balance, invoice.currency_id), invoice.public_id)); + getClientDisplayName(client) + ' - ' + formatMoney(invoice.amount, client.currency_id) + ' | ' + + formatMoney(invoice.balance, client.currency_id), invoice.public_id)); } $('select#invoice').combobox('refresh'); }); @@ -31559,7 +31559,7 @@ function populateInvoiceComboboxes(clientId, invoiceId) { var client = clientMap[invoice.client.public_id]; setComboboxValue($('.invoice-select'), invoice.public_id, (invoice.invoice_number + ' - ' + invoice.invoice_status.name + ' - ' + getClientDisplayName(client) + ' - ' + - formatMoney(invoice.amount, invoice.currency_id) + ' | ' + formatMoney(invoice.balance, invoice.currency_id))); + formatMoney(invoice.amount, client.currency_id) + ' | ' + formatMoney(invoice.balance, client.currency_id))); $invoiceSelect.trigger('change'); } else if (clientId) { var client = clientMap[clientId]; diff --git a/public/js/script.js b/public/js/script.js index 343ee4f40031..d53189433d11 100644 --- a/public/js/script.js +++ b/public/js/script.js @@ -576,8 +576,8 @@ function populateInvoiceComboboxes(clientId, invoiceId) { var client = clientMap[invoice.client.public_id]; if (!client) continue; // client is deleted/archived $invoiceCombobox.append(new Option(invoice.invoice_number + ' - ' + invoice.invoice_status.name + ' - ' + - getClientDisplayName(client) + ' - ' + formatMoney(invoice.amount, invoice.currency_id) + ' | ' + - formatMoney(invoice.balance, invoice.currency_id), invoice.public_id)); + getClientDisplayName(client) + ' - ' + formatMoney(invoice.amount, client.currency_id) + ' | ' + + formatMoney(invoice.balance, client.currency_id), invoice.public_id)); } $('select#invoice').combobox('refresh'); }); @@ -602,7 +602,7 @@ function populateInvoiceComboboxes(clientId, invoiceId) { var client = clientMap[invoice.client.public_id]; setComboboxValue($('.invoice-select'), invoice.public_id, (invoice.invoice_number + ' - ' + invoice.invoice_status.name + ' - ' + getClientDisplayName(client) + ' - ' + - formatMoney(invoice.amount, invoice.currency_id) + ' | ' + formatMoney(invoice.balance, invoice.currency_id))); + formatMoney(invoice.amount, client.currency_id) + ' | ' + formatMoney(invoice.balance, client.currency_id))); $invoiceSelect.trigger('change'); } else if (clientId) { var client = clientMap[clientId];