cAFE8(DEC,SWVP,UPRDMS) ;Conversie klanten naar EURO; %AFE8 [ 09/04/01 3:13 PM ] ; DEC : aantal decimalen om vaste prijzen om te rekenen ; niet verplicht : default = par. bij producten ; SWVP = 1 : omrekenen vaste prijzen ; niet verplicht : default = 0 ; UPRDMS : DMS van producten ; niet verplicht : default = "PR" ; T0 ;Wijzigen muntcode klant ; T1 ;Bevestiging\".[] = ok ,[] = hernemen"; T2 ;Dit programma converteert volgende gegevens naar EUR :; T3 ;1. De muntcode van de geselecteerde klant(en) indien verschillend; T4 ; van EUR.; T5 ;2. ALLE orders en bonnen van de geselecteerde klant(en) die opgemaakt; T6 ; werden in een andere munt dan EUR.; T7 ; Opmerkingen :; T8 ; a. Het programma mag meerdere keren uitgevoerd worden voor; T9 ; dezelfde klant; T10 ; b. Tijdens de uitvoering van dit programma mag er niet gewerkt; T11 ; worden in : - Klantenprogramma's; T12 ; - Verkoopadministratie; T13 ; - Vaste prijzen; T14 ;Opgelet :; T15 ;1. De conversie van documenten is ONOMKEERBAAR !; T16 ;2. Documenten in een niet EMU-munt (GBP,USD, enz.) worden eveneens; T17 ; geconverteerd; T18 ;3. Het aantal decimalen waarop de eenheidsprijs in EUR wordt; T19 ; herberekend is afhankelijk van de parameter in programma 7.27.21; T20 ;Bons; in;Vaste prijzen;Klant; T21 ;K;P;B; T22 ; Einde conversie; T23 ; Er werden fouten geconstateerd, gelieve Data-M te verwittigen; ; T0F ;Modifier code monétaire client ; T1F ;Confirmation\".[] = ok ,[] = reprendre"; T2F ;Ce programme convertit les données suivantes vers EUR :; T3F ;1. Le code monétaire de la signalétique du (des) client(s); T4F ; sélectionné(s) si différent de EUR; T5F ;2. TOUS les ordres ainsi que les bons établis dans une autre; T6F ; monnaie que EUR; T7F ; Remarques :; T8F ; a. Ce programme peut être exécuté plusieurs fois pour le même; T9F ; client; T10F ; b. Pendant l'exécution de ce programme on ne peut pas travailler; T11F ; dans : - les programmes de clients; T12F ; - l'administration des ventes; T13F ; - les prix fixes; T14F ;Attention :; T15F ;1. La conversion des ordres et des bons est IRREVERSIBLE; T16F ;2. Les ordres et les bons établis dans une monnaie non U.M.E.; T17F ; (GBP, USD, etc.) sont également convertis; T18F ;3. Le nombre de décimals sur lequel le prix unitair sera arrondi; T19F ; dépend du paramètre dans le 7.27.21; T20F ;Bons; en;Prix fixes;Client; T21F ;C;P;B; T22F ; Fin de la conversion ; T23F ; Des erreurs ont été constatées, veuillez contacter DATA-M; ; T0E ;Customer's currency change ; T1E ;Confirmation\".[] = ok ,[] = cancel"; T2E ;This program will convert to EUR :; T3E ;1. The currency of the selected customer(s) if different; T4E ; from EUR; T5E ;2. All commands and delivery notes of the selected customer(s); T6E ; prepared in another currency than EUR; T7E ; Remarks :; T8E ; a. This program may be executed several times for the same; T9E ; customer; T10E ; b. During execution one cannot work in :; T11E ; - Custumors programs; T12E ; - Sales administration; T13E ; - Fixed prices; T14E ;Attention :; T15E ;1. The conversion of documents is irreversable; T16E ;2. Documents in a non E.M.U. currency (GBP, USD, etc.) will; T17E ; also be converted; T18E ;3. The number of decimals depends on the setting of the appropriate; T19E ; item in program 7.27.21; T20E ;Delivery notes; in;Fixed prices;Customer; T21E ;K;P;B; T22E ; End of conversion; T23E ; Mistakes have happened, please contact DATA-M; ; 1 D P^cA612(2,1,20,80,1,0,1,1,$P($T(@("T0"_QT)),U,2),0,0,7,1,1) S DEC=$$DEC($G(DEC)) D DMS^cAN000("UQC","USC","KL") I '$L(UQC)!'$L(USC) G YZ S UREF=$G(^DMC(UQC,USC,"DATA","REF")) G YZ:'$L(UREF) S FP=101 W @F,@F1 F i=2:1:19 S k=$p($T(@("T"_i_QT)),U,2) s:i=13&'$G(SWVP) k="" I $l(k) W !?2,k,@F2 19 S R="K\22\3\"_$P($T(@("T1"_QT)),U,2)_"\1\\""-,.""[K&$L(K)" D R0 G YZ:K="-",YZ:K="," ; 2 S FP=101 W @F,@F1 D ^cAN003(2,"KL") G YZ:K="-" 21 S R="K\22\3\"_$P($T(@("T1"_QT)),U,2)_"\1\\""-,.""[K&$L(K)" D R0 G 2:K="-",2:K="," S UI1="",@%Q1=0 ; 3 D UNLOCK D ^cAN004("UI1","KL") G Y:UI1="" S KC=UI1 I UI1[" " S KC=$P(UI1," ",2) S MUNT=$$SIG^cAFA1("KL",UI1,111) S FP=1603 W @F,$TR($P(^(0),D,1,2),D," "),@F1 I '$$LOCK(UI1,"V") G 3 ; wijzigen munt bij klant S FP=1703 W @F,$P($T(@("T21"_QT)),U,2) S OK=$$KL(UI1) I 'OK D ER G YZ ; vaste prijsafspraken I $G(SWVP),MUNT'="EUR" W $P($T(@("T21"_QT)),U,3) S OK=$$VP(KC,MUNT,DEC,$G(UPRDMS,"PR")) I 'OK D ER G YZ ; bons W $P($T(@("T21"_QT)),U,4) S OK=$$BON(KC,"V",DEC) I 'OK D ER G YZ 39 G 3 ; ; Y S @%Q1=1,K=$P($T(@("T22"_QT)),U,2) D TXT^cAFA1(250) YZ D C^cA612 Q ; BON(KC,SRT,DEC) ; conversie bons ; SRT = "V" of "A" ; DEC : aantal decimalen om vaste prijzen om te rekenen ; niet verplicht : default = par. bij producten ; N I1,UGL,US,UR,OK,USA,UQA,UPRDMS S OK=1 I '$L($G(SRT)) S SRT="V" S I1="" BONA S I1=$O(^DPAR(Q,"UGL.EUR",I1)) G BONZ:I1="" I $P(^(I1,0),D)'=SRT G BONA ; enkel verkoopdocumenten S UGL=$P(I1,"."),US=$P(I1,".",2) S UPRDMS=$P($G(@("^"_Q_UGL_"(0,US,""UPR"")"),"PR"),D) S DEC=$$DEC($G(DEC),SRT) S UR=0 BONB S UR=$O(@("^"_Q_UGL_"(KC,US,UR)")) G BONA:UR="" I $P(^(UR,1),D,18)="EUR" G BONB D KL^cAFE7(KC,UGL,US,UR,SRT,DEC) I K="-" S OK=0_D_UGL_D_US_D_UR G BONZ ; fout bij wijzigen bon G BONB G BONA BONZ Q OK ; DEC(R,SRT) ; ophalen aantal decimalen N DEC I '$L($G(SRT)) S SRT="V" S DEC=$$DECR^cAFE5("EUR",SRT,$G(UPRDMS,"PR")) I $G(R)