Index: WS/TAPI/Router.cls.xml =================================================================== diff -u -r35416 -r37152 --- WS/TAPI/Router.cls.xml (.../Router.cls.xml) (revision 35416) +++ WS/TAPI/Router.cls.xml (.../Router.cls.xml) (revision 37152) @@ -282,6 +282,8 @@ 0 %Integer Index: PVTAORFakturatie.mac.rou =================================================================== diff -u --- PVTAORFakturatie.mac.rou (revision 0) +++ PVTAORFakturatie.mac.rou (revision 37152) @@ -0,0 +1,53 @@ +#include vhLib.Macro +#include Prod.Product +#include BL.Derde.KlantSpecifiek +#include BL.Derde.LevSpecifiek + +Export + Set Device=$$OPEN^vhDEV(,"TAOR FakturatieAantallen2.txt","W","T") + Use Device + Write "KLNr FAKNr Datum PRNr KortTekst Telbaar Aantal Omzet AankoopKost ZonderStock",! + Do WriteFacturatie + Do CLOSE^vhDEV(Device) + Quit +WriteFacturatie + Set KLNr=0 + Set BeginDatum=$$CALCDATE^vhLib.DataTypes($H,"BJ","FD",-1) + Set EindDatum=$$CALCDATE^vhLib.DataTypes($H,"M","LD",-1) + For Set KLNr=$O(^KFA1("F",KLNr)) Quit:KLNr="" Do + . Set KlKey=^KK1(KLNr) + . Set Regio=$P(^KKL(KlKey,0),"\",20) + . Set Datum="" ; beginnen vanaf vandaag omdat orders van vorige maand ook in facturen van vandaag kunnen zitten + . For Set Datum=$O(^KFA1("F",KLNr,Datum)) Quit:Datum="" Do + . . Quit:-Datum>EindDatum + . . Quit:-Datum