mustangproject icon indicating copy to clipboard operation
mustangproject copied to clipboard

Nullpointer Exception import zugferd

Open StefanSchmaltz opened this issue 2 years ago • 5 comments

java.lang.NullPointerException at org.mustangproject.ZUGFeRD.TransactionCalculator.getVATPercentAmountMap(TransactionCalculator.java:187) at org.mustangproject.ZUGFeRD.TransactionCalculator.getGrandTotal(TransactionCalculator.java:44) at org.mustangproject.ZUGFeRD.ZUGFeRDInvoiceImporter.extractInvoice(ZUGFeRDInvoiceImporter.java:349)

Mustang-CLI-2.5.3.jar

StefanSchmaltz avatar Sep 13 '22 08:09 StefanSchmaltz

Hi, Steps to reproduce? E.g. the invoice? Thanks and kind regards Jochen

jstaerk avatar Sep 13 '22 18:09 jstaerk

Hi, invoice is not public. currentAllowance.getTaxPercent() is null -->NPE solution: old code: ATAmount theAmount = hm.get(currentAllowance.getTaxPercent().stripTrailingZeros()); new code: ATAmount theAmount = currentAllowance.getTaxPercent()==null?null:hm.get(currentAllowance.getTaxPercent().stripTrailingZeros());

StefanSchmaltz avatar Sep 14 '22 09:09 StefanSchmaltz

Does the invoice validate?

jstaerk avatar Sep 14 '22 10:09 jstaerk

Yes, invoice validates Please contact me by mail, I can send the invoice.pdf

opensprinklershop avatar Oct 07 '22 13:10 opensprinklershop

I don't have your email, but mine is listed on https://www.mustangproject.org/contact-us/ :-)

jstaerk avatar Oct 13 '22 14:10 jstaerk