Index: vhTestFiles/UnitTests/AX.Uitgaand.common.impl.AifGenerator.Generate/Test/TestVerkoopfactuur-export/AIF/SalesInvoice/Create/SalesInvoice-Create 300500 - VHBE - 20160501_091500.xml =================================================================== diff -u -r35133 -r35152 --- vhTestFiles/UnitTests/AX.Uitgaand.common.impl.AifGenerator.Generate/Test/TestVerkoopfactuur-export/AIF/SalesInvoice/Create/SalesInvoice-Create 300500 - VHBE - 20160501_091500.xml (.../SalesInvoice-Create 300500 - VHBE - 20160501_091500.xml) (revision 35133) +++ vhTestFiles/UnitTests/AX.Uitgaand.common.impl.AifGenerator.Generate/Test/TestVerkoopfactuur-export/AIF/SalesInvoice/Create/SalesInvoice-Create 300500 - VHBE - 20160501_091500.xml (.../SalesInvoice-Create 300500 - VHBE - 20160501_091500.xml) (revision 35152) @@ -38,10 +38,10 @@ VHBE BDOM G3 + GeneralJournal 2016-05-13 HEREMANS KEUKENS 300500 - GeneralJournal Ledger @@ -70,10 +70,10 @@ VHBE BDOM G3 + GeneralJournal 2016-05-13 HEREMANS KEUKENS 300500 - GeneralJournal Index: AX/Uitgaand/VKP/VerkoopFactuur/impl/AifConverter.cls.xml =================================================================== diff -u -r35145 -r35152 --- AX/Uitgaand/VKP/VerkoopFactuur/impl/AifConverter.cls.xml (.../AifConverter.cls.xml) (revision 35145) +++ AX/Uitgaand/VKP/VerkoopFactuur/impl/AifConverter.cls.xml (.../AifConverter.cls.xml) (revision 35152) @@ -93,17 +93,11 @@ set Transaction.AccountType = "Ledger" #dim TotaalGoederenInclusiefPort As %Numeric = Factuur.GeefTotaalGoederen() + Factuur.GeefTotaalPort() + set Transaction.ADUCorrectedTaxAmount = ..Formatter.FormatNumber( Factuur.GeefTotaalBTW() / TotaalGoederenInclusiefPort * Boeking.Bedrag ,2) + set Transaction.CashDiscAmount = ..Formatter.FormatNumber( -1 * ( Factuur.GeefTotaalKortingKontant() / TotaalGoederenInclusiefPort * Boeking.Bedrag ) ,2) + set:(Factuur.GeefFactuurCode()=##class(DOM.VKP.Factuur.enu.FactuurType).Factuur()) Transaction.AmountCurCredit = ..Formatter.FormatNumber(Boeking.Bedrag+Transaction.ADUCorrectedTaxAmount,2) + set:(Factuur.GeefFactuurCode()=##class(DOM.VKP.Factuur.enu.FactuurType).Creditnota()) Transaction.AmountCurDebit = ..Formatter.FormatNumber(Boeking.Bedrag+Transaction.ADUCorrectedTaxAmount,2) - if Factuur.GeefTotaalKortingKontant() = 0 { - set Transaction.ADUCorrectedTaxAmount = ..Formatter.FormatNumber( Factuur.GeefTotaalBTW() / TotaalGoederenInclusiefPort * Boeking.Bedrag,2) - set:(Factuur.GeefFactuurCode()=##class(DOM.VKP.Factuur.enu.FactuurType).Factuur()) Transaction.AmountCurCredit = ..Formatter.FormatNumber(Boeking.Bedrag,2) - set:(Factuur.GeefFactuurCode()=##class(DOM.VKP.Factuur.enu.FactuurType).Creditnota()) Transaction.AmountCurDebit = ..Formatter.FormatNumber(Boeking.Bedrag,2) - } else { - set Transaction.ADUCorrectedTaxAmount = ..Formatter.FormatNumber( Factuur.GeefTotaalBTW() / TotaalGoederenInclusiefPort * Boeking.Bedrag ,2) - set Transaction.CashDiscAmount = ..Formatter.FormatNumber( -1 * ( Factuur.GeefTotaalKortingKontant() / TotaalGoederenInclusiefPort * Boeking.Bedrag ) ,2) - set:(Factuur.GeefFactuurCode()=##class(DOM.VKP.Factuur.enu.FactuurType).Factuur()) Transaction.AmountCurCredit = ..Formatter.FormatNumber(Boeking.Bedrag+Transaction.ADUCorrectedTaxAmount,2) - set:(Factuur.GeefFactuurCode()=##class(DOM.VKP.Factuur.enu.FactuurType).Creditnota()) Transaction.AmountCurDebit = ..Formatter.FormatNumber(Boeking.Bedrag+Transaction.ADUCorrectedTaxAmount,2) - } #dim BoekhoudRekeningId As %String = ..GrootboekrekeningBepaler.BepaalGrootboekrekening(Factuur.GeefKlantID(),Boeking.BoekhoudRekeningId) set Transaction.LedgerDimension.GetAt(1).Account = BoekhoudRekeningId Index: vhTestFiles/UnitTests/AX.Uitgaand.common.impl.AifGenerator.Generate/Test/TestVerkoopcreditnota-export/AIF/SalesInvoice/Create/SalesInvoice-Create 586689 - VHBE - 20160501_091500.xml =================================================================== diff -u -r35133 -r35152 --- vhTestFiles/UnitTests/AX.Uitgaand.common.impl.AifGenerator.Generate/Test/TestVerkoopcreditnota-export/AIF/SalesInvoice/Create/SalesInvoice-Create 586689 - VHBE - 20160501_091500.xml (.../SalesInvoice-Create 586689 - VHBE - 20160501_091500.xml) (revision 35133) +++ vhTestFiles/UnitTests/AX.Uitgaand.common.impl.AifGenerator.Generate/Test/TestVerkoopcreditnota-export/AIF/SalesInvoice/Create/SalesInvoice-Create 586689 - VHBE - 20160501_091500.xml (.../SalesInvoice-Create 586689 - VHBE - 20160501_091500.xml) (revision 35152) @@ -38,10 +38,10 @@ VHBE BDOM G3 + GeneralJournal 2016-03-22 586689 - GeneralJournal Ledger @@ -70,10 +70,10 @@ VHBE BDOM G3 + GeneralJournal 2016-03-22 586689 - GeneralJournal Index: vhUnitTest/AX/Uitgaand/VKP/VerkoopFactuur/impl/AifConverter/Test.cls.xml =================================================================== diff -u -r35145 -r35152 --- vhUnitTest/AX/Uitgaand/VKP/VerkoopFactuur/impl/AifConverter/Test.cls.xml (.../Test.cls.xml) (revision 35145) +++ vhUnitTest/AX/Uitgaand/VKP/VerkoopFactuur/impl/AifConverter/Test.cls.xml (.../Test.cls.xml) (revision 35152) @@ -60,7 +60,7 @@ do $$$AssertEquals(JournalTableCreditnota.LedgerJournalTrans.GetAt(1).AccountType,"Cust") do $$$AssertEquals(JournalTableCreditnota.LedgerJournalTrans.GetAt(1).AmountCurCredit,"121.00") do $$$AssertEquals(JournalTableCreditnota.LedgerJournalTrans.GetAt(2).AccountType,"Ledger") - do $$$AssertEquals(JournalTableCreditnota.LedgerJournalTrans.GetAt(2).AmountCurDebit,"100.00") + do $$$AssertEquals(JournalTableCreditnota.LedgerJournalTrans.GetAt(2).AmountCurDebit,"121.00") } #dim Factuur As DOM.VKP.Factuur = ##class(vhTest.Utils.DOM.VKP.Factuur).StandaardFactuur() @@ -70,7 +70,7 @@ do $$$AssertEquals(JournalTableFactuur.LedgerJournalTrans.GetAt(1).AccountType,"Cust") do $$$AssertEquals(JournalTableFactuur.LedgerJournalTrans.GetAt(1).AmountCurDebit,"121.00") do $$$AssertEquals(JournalTableFactuur.LedgerJournalTrans.GetAt(2).AccountType,"Ledger") - do $$$AssertEquals(JournalTableFactuur.LedgerJournalTrans.GetAt(2).AmountCurCredit,"100.00") + do $$$AssertEquals(JournalTableFactuur.LedgerJournalTrans.GetAt(2).AmountCurCredit,"121.00") } ]]> @@ -146,7 +146,7 @@ @@ -25,9 +25,9 @@ #dim JournalTable As AXaif.LedgerGeneralJournal.AxdLedgerGeneralJournal = ..GetJournalTable(VerkoopFactuur) do $$$AssertEquals(JournalTable.LedgerJournalTrans.GetAt(2).ADUCorrectedTaxAmount,"12.60") - do $$$AssertEquals(JournalTable.LedgerJournalTrans.GetAt(2).AmountCurCredit,"60.00") + do $$$AssertEquals(JournalTable.LedgerJournalTrans.GetAt(2).AmountCurCredit,"72.60") do $$$AssertEquals(JournalTable.LedgerJournalTrans.GetAt(3).ADUCorrectedTaxAmount,"8.40") - do $$$AssertEquals(JournalTable.LedgerJournalTrans.GetAt(3).AmountCurCredit,"40.00") + do $$$AssertEquals(JournalTable.LedgerJournalTrans.GetAt(3).AmountCurCredit,"48.40") ]]>