mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Don't show clients w/o names
This commit is contained in:
parent
7cb797fcc2
commit
60982deb08
@ -30395,7 +30395,11 @@ function populateInvoiceComboboxes(clientId, invoiceId) {
|
|||||||
$clientSelect.append(new Option('', ''));
|
$clientSelect.append(new Option('', ''));
|
||||||
for (var i=0; i<clients.length; i++) {
|
for (var i=0; i<clients.length; i++) {
|
||||||
var client = clients[i];
|
var client = clients[i];
|
||||||
$clientSelect.append(new Option(getClientDisplayName(client), client.public_id));
|
var clientName = getClientDisplayName(client);
|
||||||
|
if (!clientName) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$clientSelect.append(new Option(clientName, client.public_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (clientId) {
|
if (clientId) {
|
||||||
@ -30419,7 +30423,7 @@ function populateInvoiceComboboxes(clientId, invoiceId) {
|
|||||||
for (var i=0; i<list.length; i++) {
|
for (var i=0; i<list.length; i++) {
|
||||||
var invoice = list[i];
|
var invoice = list[i];
|
||||||
var client = clientMap[invoice.client.public_id];
|
var client = clientMap[invoice.client.public_id];
|
||||||
if (!client) continue; // client is deleted/archived
|
if (!client || !getClientDisplayName(client)) continue; // client is deleted/archived
|
||||||
$invoiceCombobox.append(new Option(invoice.invoice_number + ' - ' + invoice.invoice_status.name + ' - ' +
|
$invoiceCombobox.append(new Option(invoice.invoice_number + ' - ' + invoice.invoice_status.name + ' - ' +
|
||||||
getClientDisplayName(client) + ' - ' + formatMoneyInvoice(invoice.amount, invoice) + ' | ' +
|
getClientDisplayName(client) + ' - ' + formatMoneyInvoice(invoice.amount, invoice) + ' | ' +
|
||||||
formatMoneyInvoice(invoice.balance, invoice), invoice.public_id));
|
formatMoneyInvoice(invoice.balance, invoice), invoice.public_id));
|
||||||
|
@ -501,7 +501,11 @@ function populateInvoiceComboboxes(clientId, invoiceId) {
|
|||||||
$clientSelect.append(new Option('', ''));
|
$clientSelect.append(new Option('', ''));
|
||||||
for (var i=0; i<clients.length; i++) {
|
for (var i=0; i<clients.length; i++) {
|
||||||
var client = clients[i];
|
var client = clients[i];
|
||||||
$clientSelect.append(new Option(getClientDisplayName(client), client.public_id));
|
var clientName = getClientDisplayName(client);
|
||||||
|
if (!clientName) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$clientSelect.append(new Option(clientName, client.public_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (clientId) {
|
if (clientId) {
|
||||||
@ -525,7 +529,7 @@ function populateInvoiceComboboxes(clientId, invoiceId) {
|
|||||||
for (var i=0; i<list.length; i++) {
|
for (var i=0; i<list.length; i++) {
|
||||||
var invoice = list[i];
|
var invoice = list[i];
|
||||||
var client = clientMap[invoice.client.public_id];
|
var client = clientMap[invoice.client.public_id];
|
||||||
if (!client) continue; // client is deleted/archived
|
if (!client || !getClientDisplayName(client)) continue; // client is deleted/archived
|
||||||
$invoiceCombobox.append(new Option(invoice.invoice_number + ' - ' + invoice.invoice_status.name + ' - ' +
|
$invoiceCombobox.append(new Option(invoice.invoice_number + ' - ' + invoice.invoice_status.name + ' - ' +
|
||||||
getClientDisplayName(client) + ' - ' + formatMoneyInvoice(invoice.amount, invoice) + ' | ' +
|
getClientDisplayName(client) + ' - ' + formatMoneyInvoice(invoice.amount, invoice) + ' | ' +
|
||||||
formatMoneyInvoice(invoice.balance, invoice), invoice.public_id));
|
formatMoneyInvoice(invoice.balance, invoice), invoice.public_id));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user