Merge branch 'master' of github.com:ZUGFeRD/mustangproject
This commit is contained in:
@@ -499,7 +499,7 @@ public class ZUGFeRDInvoiceImporter {
|
|||||||
xpr = xpath.compile("//*[local-name()=\"ExchangedDocument\"]|//*[local-name()=\"HeaderExchangedDocument\"]");
|
xpr = xpath.compile("//*[local-name()=\"ExchangedDocument\"]|//*[local-name()=\"HeaderExchangedDocument\"]");
|
||||||
NodeList ExchangedDocumentNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET);
|
NodeList ExchangedDocumentNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET);
|
||||||
|
|
||||||
xpr = xpath.compile("//*[local-name()=\"GrandTotalAmount\"]|//*[local-name()=\"TaxInclusiveAmount\"]");
|
xpr = xpath.compile("//*[local-name()=\"SpecifiedTradeSettlementMonetarySummation\"]/*[local-name()=\"GrandTotalAmount\"]|//*[local-name()=\"SpecifiedTradeSettlementHeaderMonetarySummation\"]/*[local-name()=\"GrandTotalAmount\"]|//*[local-name()=\"LegalMonetaryTotal\"]/*[local-name()=\"TaxInclusiveAmount\"]");
|
||||||
BigDecimal expectedGrandTotal = null;
|
BigDecimal expectedGrandTotal = null;
|
||||||
NodeList totalNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET);
|
NodeList totalNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET);
|
||||||
if (totalNodes.getLength() > 0) {
|
if (totalNodes.getLength() > 0) {
|
||||||
@@ -512,7 +512,7 @@ public class ZUGFeRDInvoiceImporter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
xpr = xpath.compile("//*[local-name()=\"TaxBasisTotalAmount\"]|//*[local-name()=\"TaxExclusiveAmount\"]");
|
xpr = xpath.compile("//*[local-name()=\"SpecifiedTradeSettlementMonetarySummation\"]/*[local-name()=\"TaxBasisTotalAmount\"]|//*[local-name()=\"SpecifiedTradeSettlementHeaderMonetarySummation\"]/*[local-name()=\"TaxBasisTotalAmount\"]|//*[local-name()=\"LegalMonetaryTotal\"]/*[local-name()=\"TaxExclusiveAmount\"]");
|
||||||
BigDecimal expectedTaxBasis = null;
|
BigDecimal expectedTaxBasis = null;
|
||||||
NodeList basisNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET);
|
NodeList basisNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET);
|
||||||
if (basisNodes.getLength() > 0) {
|
if (basisNodes.getLength() > 0) {
|
||||||
|
|||||||
@@ -218,8 +218,6 @@ public class MustangReaderWriterTest extends MustangReaderTestCase {
|
|||||||
zi.doRecalculateItemPricesFromLineTotals();
|
zi.doRecalculateItemPricesFromLineTotals();
|
||||||
zi.doIgnoreCalculationErrors();
|
zi.doIgnoreCalculationErrors();
|
||||||
zi.setInputStream(inputStream);
|
zi.setInputStream(inputStream);
|
||||||
// Reading ZUGFeRD
|
|
||||||
String amount = zi.getAmount();
|
|
||||||
|
|
||||||
assertEquals("<?xpacket begin=\"\" id=\"W5M0MpCehiHzreSzNTczkc9d\"?>\n" +
|
assertEquals("<?xpacket begin=\"\" id=\"W5M0MpCehiHzreSzNTczkc9d\"?>\n" +
|
||||||
" <x:xmpmeta xmlns:x=\"adobe:ns:meta/\">\n" +
|
" <x:xmpmeta xmlns:x=\"adobe:ns:meta/\">\n" +
|
||||||
@@ -297,8 +295,8 @@ public class MustangReaderWriterTest extends MustangReaderTestCase {
|
|||||||
" </x:xmpmeta>\n" +
|
" </x:xmpmeta>\n" +
|
||||||
"<?xpacket end=\"r\"?>", zi.getXMP());
|
"<?xpacket end=\"r\"?>", zi.getXMP());
|
||||||
// this resembles the data written in MustangReaderWriterCustomXMLTest
|
// this resembles the data written in MustangReaderWriterCustomXMLTest
|
||||||
assertEquals(amount, "1005.55");
|
assertEquals("845.00", zi.getTaxBasisTotalAmount());
|
||||||
|
assertEquals("1005.55", zi.getAmount());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user