0
Searching answer

BIRT Eclipse report templates: how to add EU VAT number

Stan 2 years ago in API updated by Thierry ABAQUE 10 months ago 6

Hello,


The dynamic fields corresponding to EU VAT disappeared in the new XTRF templates. While I can see a field with our company EU VAT –

(xtrfContext.getRootObject().getCustomer().getBranch().getCountrySpecificFiscalCodeValue() != "" ? reportContext.getMessage("pdf.eu_vat", reportContext.getLocale()) + " " + xtrfContext.getRootObject().getCustomer().getBranch().getCountrySpecificFiscalCodeValue() : "")

 – I would like to know there the XTRF BIRT expressions are stored. XTRF Knowledge base here at UserEcho seems not to cover this important issue.

Hi Stan,


Try using this one:


if(xtrfContext.getRootObject().getCustomerVATUE()!="") {"VAT: " + xtrfContext.getRootObject().getCustomerVATUE()}


it checks if the EUVAT is set for the client and if it is, it displays it with this expression:


xtrfContext.getRootObject().getCustomerVATUE()


Kind regards,

Peter

Tried different options and finally cannot force XTRF to display EU VAT/Tax ID at all.


None of the options below work:

1. if(xtrfContext.getRootObject().getCustomerVATUE()!="") {"VAT: " + xtrfContext.getRootObject().getCustomerVATUE()}

(the one that you, Peter, provided)


2. (xtrfContext.getRootObject().getCustomer().getTaxNo1WithCountrySymbol() != "" ? "Tax ID " + xtrfContext.getRootObject().getCustomer().getTaxNo1WithCountrySymbol() : "")


For some reason the Tax ID appeares on the built-in template, but
- sometimes (??)
- copying&pasting them brings to nothing.

Any ideas how make to get Tax ID's work again?

+1

Hi, here is what we are using:

(xtrfContext.getRootObject().getCustomerCountry().getDisplayName() != "Ελλάδα [GR]" ? xtrfContext.getRootObject().getCustomer().getTaxNo1WithCountrySymbol() : xtrfContext.getRootObject().getCustomer().getTaxNo1())


So, we are checking if the country is Greece or not. If it is, then we don't need the country symbol before the VAT ID. If is is not, we are getting the EU VAT ID (it is the xtrfContext.getRootObject().getCustomer().getTaxNo1WithCountrySymbol() line).

Hi Stan,


If you are editing the built in template, try looking at the Visibility setting for the EU VAT row. Perhaps there is a condition there that hides it.


Hi Peter,

I have the same issue as Stan.

I checked visibility parameters and had the same as yours.

So, how to do that?

Thanks.

Thierry