Added custom fields to pdfmake invoices

This commit is contained in:
Hillel Coren 2015-08-17 11:05:15 +03:00
parent d9e08da031
commit c5eeb7d911
2 changed files with 20 additions and 12 deletions

View File

@ -31840,7 +31840,9 @@ NINJA.accountAddress = function(invoice) {
{text: account.address1}, {text: account.address1},
{text: account.address2}, {text: account.address2},
{text: cityStatePostal}, {text: cityStatePostal},
{text: account.country ? account.country.name : ''} {text: account.country ? account.country.name : ''},
{text: invoice.account.custom_value1 ? invoice.account.custom_label1 + ' ' + invoice.account.custom_value1 : false},
{text: invoice.account.custom_value2 ? invoice.account.custom_label2 + ' ' + invoice.account.custom_value2 : false}
]; ];
return NINJA.prepareDataList(data, 'accountAddress'); return NINJA.prepareDataList(data, 'accountAddress');
@ -31905,7 +31907,9 @@ NINJA.clientDetails = function(invoice) {
{text:client.address1}, {text:client.address1},
{text:concatStrings(client.city, client.state, client.postal_code)}, {text:concatStrings(client.city, client.state, client.postal_code)},
{text:client.country ? client.country.name : ''}, {text:client.country ? client.country.name : ''},
{text:clientEmail} {text:clientEmail},
{text: invoice.client.custom_value1 ? invoice.account.custom_client_label1 + ' ' + invoice.client.custom_value1 : false},
{text: invoice.client.custom_value2 ? invoice.account.custom_client_label2 + ' ' + invoice.client.custom_value2 : false}
]; ];
return NINJA.prepareDataList(data, 'clientDetails'); return NINJA.prepareDataList(data, 'clientDetails');

View File

@ -327,7 +327,9 @@ NINJA.accountAddress = function(invoice) {
{text: account.address1}, {text: account.address1},
{text: account.address2}, {text: account.address2},
{text: cityStatePostal}, {text: cityStatePostal},
{text: account.country ? account.country.name : ''} {text: account.country ? account.country.name : ''},
{text: invoice.account.custom_value1 ? invoice.account.custom_label1 + ' ' + invoice.account.custom_value1 : false},
{text: invoice.account.custom_value2 ? invoice.account.custom_label2 + ' ' + invoice.account.custom_value2 : false}
]; ];
return NINJA.prepareDataList(data, 'accountAddress'); return NINJA.prepareDataList(data, 'accountAddress');
@ -392,7 +394,9 @@ NINJA.clientDetails = function(invoice) {
{text:client.address1}, {text:client.address1},
{text:concatStrings(client.city, client.state, client.postal_code)}, {text:concatStrings(client.city, client.state, client.postal_code)},
{text:client.country ? client.country.name : ''}, {text:client.country ? client.country.name : ''},
{text:clientEmail} {text:clientEmail},
{text: invoice.client.custom_value1 ? invoice.account.custom_client_label1 + ' ' + invoice.client.custom_value1 : false},
{text: invoice.client.custom_value2 ? invoice.account.custom_client_label2 + ' ' + invoice.client.custom_value2 : false}
]; ];
return NINJA.prepareDataList(data, 'clientDetails'); return NINJA.prepareDataList(data, 'clientDetails');