closes #1049
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#1049
|
||||
|
||||
2.22.0
|
||||
=======
|
||||
|
||||
@@ -516,8 +516,9 @@ public class ZUGFeRDInvoiceImporter {
|
||||
xpr = xpath.compile("//*[local-name()=\"SpecifiedTradeSettlementHeaderMonetarySummation\"]/*[local-name()=\"TaxTotalAmount\"]|//*[local-name()=\"TaxTotal\"]/*[local-name()=\"TaxAmount\"]");
|
||||
NodeList taxTotalNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET);
|
||||
if (taxTotalNodes.getLength() > 0) {
|
||||
if (zpp instanceof CalculatedInvoice) {
|
||||
((CalculatedInvoice) zpp).setVATtotal(new BigDecimal(XMLTools.trimOrNull(taxTotalNodes.item(0))));
|
||||
String taxTotalStr=XMLTools.trimOrNull(taxTotalNodes.item(0));
|
||||
if ((zpp instanceof CalculatedInvoice)&&(taxTotalStr!=null)) {
|
||||
((CalculatedInvoice) zpp).setVATtotal(new BigDecimal(taxTotalStr));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -525,8 +526,9 @@ public class ZUGFeRDInvoiceImporter {
|
||||
NodeList lineDueNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET);
|
||||
BigDecimal duePayableAmount = null;
|
||||
if (lineDueNodes.getLength() > 0) {
|
||||
duePayableAmount = new BigDecimal(XMLTools.trimOrNull(lineDueNodes.item(0)));
|
||||
if (zpp instanceof CalculatedInvoice) {
|
||||
String duePayableAmountStr=XMLTools.trimOrNull(lineDueNodes.item(0));
|
||||
if ((zpp instanceof CalculatedInvoice) && (duePayableAmountStr!=null)) {
|
||||
duePayableAmount = new BigDecimal(duePayableAmountStr);
|
||||
((CalculatedInvoice) zpp).setDuePayable(duePayableAmount);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,6 +85,9 @@ public class XMLValidatorTest extends ResourceCase {
|
||||
} catch (final IrrecoverableValidationError e) {
|
||||
noException = false;
|
||||
}
|
||||
assertTrue(noException);
|
||||
noException=true;// moving on...
|
||||
|
||||
final String res = xv.getXMLResult();
|
||||
/*OutputStream os = null;
|
||||
try {
|
||||
@@ -166,6 +169,8 @@ public class XMLValidatorTest extends ResourceCase {
|
||||
noException = false;
|
||||
}
|
||||
assertTrue(noException);
|
||||
noException=true;// moving on...
|
||||
|
||||
try {
|
||||
ctx.clear();
|
||||
tempFile = getResourceAsFile("invalidV2Root.xml");
|
||||
|
||||
Reference in New Issue
Block a user