Customer delivery address added to the Sales invoice report

We added the customer Delivery address field to the Sales invoice report. However, we also need to add the Delivery name field.

Is this something you would be able to assist us with? Thank you!

00.jpeg

Hi,

If I understand correctly you want to add additional data (DeliveryName) to your DDSP and consequently to your template:

A small customization of the DSP class will be necessary. Below it the screenshot where and what you need to add in the DocSalesInvoiceReportDSP class:

This is the code that needs to be added:

// (3a) Add Delivery name and address
_addingRecord.addCalculatedField('DeliveryName', salesTable.DeliveryName);
_addingRecord.addCalculatedField('DeliveryAddress', salesTable.deliveryAddress().Address);

The DeliveryName field comes from the SalesTable. Since you need DeliveryAddress as well, I would recommend to add it here in the header and not at the line as you have it now. You refer to the address from the first line anyway, so it makes more sense to move it to the header. This address is read via deliveryAddress() method on the SalesTable.

​After this customization is done and compiled, you can generate the DDSP file again and you will see the two fields under the header data:

01

​I hope this helps.