Enabled adding blank row in invoice fields

This commit is contained in:
Hillel Coren 2016-09-25 11:07:15 +03:00
parent ac1dddc201
commit f529b2ed06
5 changed files with 12 additions and 3 deletions

View File

@ -87,6 +87,7 @@ trait PresentsInvoice
'invoice.partial_due', 'invoice.partial_due',
'invoice.custom_text_value1', 'invoice.custom_text_value1',
'invoice.custom_text_value2', 'invoice.custom_text_value2',
'.blank',
], ],
INVOICE_FIELDS_CLIENT => [ INVOICE_FIELDS_CLIENT => [
'client.client_name', 'client.client_name',
@ -101,6 +102,7 @@ trait PresentsInvoice
'client.contact_name', 'client.contact_name',
'client.custom_value1', 'client.custom_value1',
'client.custom_value2', 'client.custom_value2',
'.blank',
], ],
INVOICE_FIELDS_ACCOUNT => [ INVOICE_FIELDS_ACCOUNT => [
'account.company_name', 'account.company_name',
@ -115,6 +117,7 @@ trait PresentsInvoice
'account.country', 'account.country',
'account.custom_value1', 'account.custom_value1',
'account.custom_value2', 'account.custom_value2',
'.blank',
] ]
]; ];
@ -199,6 +202,7 @@ trait PresentsInvoice
'company_name', 'company_name',
'website', 'website',
'phone', 'phone',
'blank',
]; ];
foreach ($fields as $field) { foreach ($fields as $field) {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -677,6 +677,8 @@ NINJA.renderInvoiceField = function(invoice, field) {
} else { } else {
return false; return false;
} }
} else if (field == '.blank') {
return [{text: ' '}, {text: ' '}];
} }
} }
@ -785,6 +787,8 @@ NINJA.renderClientOrAccountField = function(invoice, field) {
if (invoice.features.invoice_settings) { if (invoice.features.invoice_settings) {
return invoice.account.custom_label2 && invoice.account.custom_value2 ? {text: invoice.account.custom_label2 + ' ' + invoice.account.custom_value2} : false; return invoice.account.custom_label2 && invoice.account.custom_value2 ? {text: invoice.account.custom_label2 + ' ' + invoice.account.custom_value2} : false;
} }
} else if (field == '.blank') {
return {text: ' '};
} }
return false; return false;

View File

@ -2137,6 +2137,7 @@ $LANG = array(
'invoice_fields_help' => 'Drag and drop fields to change their order and location', 'invoice_fields_help' => 'Drag and drop fields to change their order and location',
'new_category' => 'New Category', 'new_category' => 'New Category',
'restore_product' => 'Restore Product', 'restore_product' => 'Restore Product',
'blank' => 'Blank',
); );