Index: AX/Uitgaand/EC/DataAX/impl/AxFactuurLijnIterator.cls.xml
===================================================================
diff -u -r50353 -r53242
--- AX/Uitgaand/EC/DataAX/impl/AxFactuurLijnIterator.cls.xml (.../AxFactuurLijnIterator.cls.xml) (revision 50353)
+++ AX/Uitgaand/EC/DataAX/impl/AxFactuurLijnIterator.cls.xml (.../AxFactuurLijnIterator.cls.xml) (revision 53242)
@@ -21,7 +21,7 @@
1
@@ -30,17 +30,19 @@
CustomerID:%String,VanafDatum:%Date
'"_$ZD(VanafDatum,3)_"'"
- Set ..ResultSet = ..SqlQueryConnection.GetResultSet(SqlStatement)
+ Set SqlStatement = ..GeefSQLVoorFactuurHoofding()_" where INV.INVOICEACCOUNT=? and INV.INVOICEDATE>?"
+ Set ..ResultSet = ..SqlQueryConnection.GetResultSetWithoutExecute(SqlStatement)
+ Set sc=..ResultSet.Execute(CustomerID,$ZD(VanafDatum,3))
]]>
CustomerID:%String
@@ -52,12 +54,13 @@
_"select INV.INVOICEID, INV.ORDERACCOUNT, INV.INVOICEACCOUNT, INV.INVOICEDATE, INV.DUEDATE, INVOICEAMOUNT,SUMTAX,INV.CURRENCYCODE,INV.CASHDISC, INV.CASHDISCDATE, "
_" TRANS.CLOSED,TRANS.AMOUNTCUR,TRANS.SETTLEAMOUNTCUR"
_" from CUSTINVOICEJOUR as INV"
- _" join salestable as ORD on ORD.salesid = INV.salesid "
+ _" join salestable as ORD on ORD.salesid = INV.salesid and ORD.Partition = INV.Partition and ORD.DataAreaId = INV.DataAreaId"
_" join CUSTTRANS as TRANS on TRANS.INVOICE = INV.INVOICEID "
_" and TRANS.ACCOUNTNUM = INV.INVOICEACCOUNT "
_" and TRANS.TRANSDATE = INV.INVOICEDATE "
_" and TRANS.VOUCHER = INV.LEDGERVOUCHER "
_" and TRANS.DATAAREAID = INV.DATAAREAID "
+ _" and TRANS.PARTITION = INV.PARTITION "
Quit SqlStatement
]]>
@@ -72,17 +75,18 @@
_" InvLine.QTY,InvLine.SALESPRICE,InvLine.PRICEUNIT,InvLine.CURRENCYCODE,InvLine.LINEAMOUNT, SalesLine.RECEIPTDATECONFIRMED,SalesLine.RECEIPTDATEREQUESTED,ProdNotes.Body as PRODREF,"
_" ADR.RECID,ADR.COUNTRYREGIONID,ADR.CITY,ADR.ZIPCODE,ADR.STREET,ADR.ADUNOTA1EXTERNAL,ADR.ADUNOTA2EXTERNAL,ADR.ADUTRANSPORTERAUTH"
_" from CUSTINVOICETRANS as InvLine"
- _" join SalesLine on SalesLine.InventTransId = InvLine.InventTransId and SalesLine.DataAreaId=InvLine.DataAreaId "
- _" join SalesTable ORD on ORD.SalesId = SalesLine.SALESID"
+ _" join SalesLine on SalesLine.InventTransId = InvLine.InventTransId and SalesLine.DataAreaId=InvLine.DataAreaId and SalesLine.Partition = InvLine.Partition"
+ _" join SalesTable ORD on ORD.SalesId = SalesLine.SALESID and ORD.Partition = SalesLine.Partition and ORD.DataAreaId = SalesLine.DataAreaId "
_" left outer join LOGISTICSPOSTALADDRESS as ADR on ADR.RECID =Salesline.DELIVERYPOSTALADDRESS "
- _" join InventDim on InventDim.InventDimId = InvLine.InventDimId "
+ _" join InventDim on InventDim.InventDimId = InvLine.InventDimId and InventDim.Partition = InvLine.Partition"
_" and InventDim.DataAreaId = InvLine.DataAreaId "
_" left outer join ADUEcoResAttributeCombination as Kenmerk on InventDim.ConfigId=Kenmerk.ConfigId "
_" and SalesLine.ITEMID=Kenmerk.ITEMID "
- _" and InventDim.ConfigId<>'' "
- _" left outer join AduCustomerFormNotes as ProdNotes on ProdNotes.REFTABLEID=359 and ProdNotes.REFRECID=SalesLine.RECID and ADUBODYTYPE=5"
- _" where InvLine.DataAreaID='vhbe' and InvLine.INVOICEID = '"_FactuurID_"' " ; specifieke factuur
- Set ..ResultSet = ..SqlQueryConnection.GetResultSet(SqlStatement)
+ _" and InventDim.ConfigId<>'' and SalesLine.Partition=Kenmerk.Partition "
+ _" left outer join AduCustomerFormNotes as ProdNotes on ProdNotes.REFTABLEID=359 and ProdNotes.REFRECID=SalesLine.RECID and ADUBODYTYPE=5 and ProdNotes.Partition=SalesLine.Partition"
+ _" where InvLine.DataAreaID='vhbe' and InvLine.INVOICEID = ? " ; specifieke factuur
+ Set ..ResultSet = ..SqlQueryConnection.GetResultSetWithoutExecute(SqlStatement)
+ Set sc=..ResultSet.Execute(FactuurID)
]]>
@@ -104,7 +108,10 @@
%Status
1