/// Routine : BL.Prod.GAData.INC /// /// Author : Wim Vermeulen /// Created : 07/02/2008 /// #include vhLib.Macro #include %occInclude /// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ /// | To be reorganised | /// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ #define ValidPRNr(%v) (%v?2.7N) #define gd ..GAData #define DelimGroepSort ";" /// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ /// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ /// | Calculation of Product+Kost items | /// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ /// CalcCache array keys (cckey) #define cckeyCalcBasis "Basis" #define cckeyCalcExtend "Extend" #define cckeyActief "Actief" /* ; ------------- ; Template code ; ------------- ; (PRBASIC) Set tmpLB=$LB(Actief,"PRBASIC",SubGroep,SortNr,Oms,,,,)_ $LB(PRNr,KTekst,,KenmGrp,Kenm)_ $LB(Qty,KPrijs,GNetto,GTarra,IncludeBS) ; _ $LB(,)_ $LB(,,,,,,) ; (PRKENM) Set tmpLB=$LB(Actief,"PRKENM" ,SubGroep,SortNr,Oms,,,,)_ $LB(PRNr,KTekst,,KenmGrp,Kenm)_ $LB(Qty,KPrijs,GNetto,GTarra,IncludeBS) ; _ $LB(,)_ $LB(,,,,,,) ; (PR1DIM) Set tmpLB=$LB(Actief,"PR1DIM" ,SubGroep,SortNr,Oms,,,,)_ $LB(PRNr,KTekst,PRLen,KenmGrp,Kenm)_ $LB(Qty,KPrijs,GNetto,GTarra,IncludeBS)_ $LB(,)_ $LB(BrutPct,BrutStk,UitvalPct,UitvalStk,DimHF,DimHFBrut,DimHFUitval) ; (KOST) Set tmpLB=$LB(Actief,"KST" ,SubGroep,SortNr,Oms,TijdMulti,TijdWerk,TijdKost,KostPlaats)_ $LB(,,,,)_ $LB(,KPrijs,,,IncludeBS) ; _ $LB(,)_ $LB(,,,,,,) ; (EXTEND) Set tmpLB=$LB($G(FabrGroep),$G(XMLTags),$G(lbKMArgs),$G(FabrOms),$G(FabrPrep),$G(FabrTekst)) _ $LB(,,,$LB(FabrTekstX01,FabrTekstX02)) ; ; ; Groeperen $LB(): handig om list-pos te controleren! ; ; BASIS : $LB(1-9)_ $LB(10-14)_ $LB(15-19)_ $LB(20-21)_ $LB(22-28) ; ; EXTEND: $LB(1-6)_ $LB(7-10) */ /// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ /// | List-items in the CalcBasis array (licb) | /// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ #define licbActief 1 #define licbType 2 #define licbSubGroep 3 #define licbSortNr 4 #define licbOms 5 #define licbTijdWerk 6 #define licbTijdKost 7 #define licbMatKost 8 #define licbKostPlaats 9 #define licbPRNr 10 #define licbKTekst 11 #define licbPRLen 12 #define licbKenmGrp 13 #define licbKenm 14 #define licbQty 15 #define licbKPrijs 16 #define licbGNetto 17 #define licbGTarra 18 #define licbIncludeBS 19 ; Insert here ... #define licbBrutPct 22 #define licbBrutStk 23 #define licbUitvalPct 24 #define licbUitvalStk 25 #define licbDimHF 26 #define licbDimHFBrut 27 #define licbDimHFUitval 28 ; Append here ... /* ; // list-items (licb) voor PARAM, PARAMFORMULE en PARAMOBJ ;#define licbVal 0 ;#define licbProgLabel 0 ;#define licbBT 0 ;#define licbFMLFormule 0 ;#define licbOBJObjectID 0 ;#define licbOBJClassName 0 */ /// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ /// | List-items in the CalcExtended array (lice) | /// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ #define liceFabrGroep 1 #define liceXMLTags 2 #define licelbKMArgs 3 #define liceFabrOms 4 #define liceFabrPrep 5 #define liceFabrTekst 6 #define liceFabrTekstXmulti 10 /// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ /// | PRBASIC : Default formules | /// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ #define prBasicActief 1 #define prBasicPRNr "999999 ???" #define prBasicKTekst ..ItemGetKortTekst(PRNr) #define prBasicQty 1 #define prBasicKPrijs ..ItemGetCifPPL(PRNr,.NoSa)*Qty #define prBasicGNetto ..ItemGetGewicht("N",PRNr)*Qty #define prBasicGTarra 0 #define prBasicCacheLB $LB("","PRBASIC",SubGroep,SortNr,Oms,,,,)_ $LB(PRNr,KTekst,,,)_ $LB(Qty,KPrijs,GNetto,GTarra,IncludeBS) ; _ $LB(,)_ $LB(,,,,,,) /// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ /// | PRKENM : Default formules | /// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ #define prKenmActief 1 #define prKenmKenm $LB($LB("BasisType","?"),$LB("tB",1)) #define prKenmKenmGrp ..dflKenmGrp #define prKenmPRNr ..ProductViaKenmerkLijst(Kenm,KenmGrp) #define prKenmKTekst ..ItemGetKortTekst(PRNr) #define prKenmQty 1 #define prKenmKPrijs ..ItemGetCifPPL(PRNr,.NoSa)*Qty #define prKenmGNetto ..ItemGetGewicht("N",PRNr)*Qty #define prKenmGTarra 0 #define prKenmCacheLB $LB("","PRKENM",SubGroep,SortNr,Oms,,,,)_ $LB(PRNr,KTekst,,KenmGrp,Kenm)_ $LB(Qty,KPrijs,GNetto,GTarra,IncludeBS) ; _ $LB(,)_ $LB(,,,,,,) /// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ /// | PR1DIM : Default formules | /// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ #define pr1dimActief 1 #define pr1dimKenm $LB($LB("BasisType","?"),$LB("tB",1)) ;#define pr1dimKenmGrp $G(%KenmGrpTBX) #define pr1dimKenmGrp ..dflKenmGrp #define pr1dimPRNr ..ProductViaKenmerkLijst(Kenm,KenmGrp) #define pr1dimKTekst ..ItemGetKortTekst(PRNr) #define pr1dimPRLen ..ItemGetPRLen(PRNr) #define pr1dimBrutPct 0 #define pr1dimBrutStk 3 #define pr1dimUitvalPct 0 #define pr1dimUitvalStk 0 #define pr1dimDimHF "999999 ???" #define pr1dimDimHFBrut (DimHF*(1+BrutPct))+BrutStk #define pr1dimDimHFUitval (DimHFBrut*(1+UitvalPct))+UitvalStk #define pr1dimQty 1 #define pr1dimKPrijs ..ItemGetCifPPL(PRNr,.NoSa)*DimHFUitval/PRLen*Qty #define pr1dimGNetto ..ItemGetGewicht("N",PRNr)*DimHFUitval/PRLen*Qty #define pr1dimGTarra 0 #define pr1dimCacheLB $LB("","PR1DIM",SubGroep,SortNr,Oms,,,,)_ $LB(PRNr,KTekst,PRLen,KenmGrp,Kenm)_ $LB(Qty,KPrijs,GNetto,GTarra,IncludeBS)_ $LB(,)_ $LB(BrutPct,BrutStk,UitvalPct,UitvalStk,DimHF,DimHFBrut,DimHFUitval) /// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ /// | KST : Default formules | /// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ #define kstActief 1 #define kstAddTijdKost Set TijdWerk=TijdWerk+SubKost Set TijdKost=TijdKost+SubKost ; emKost.StaffelCorr(SubKost,Staffel) #define kstAddMatKost Set MatKost=MatKost+SubMat Set lbMatKost=$G(lbMatKost)_$LB($LB(SubMat,KostMatID)) #define kstKPrijs ..CalcKost(KostPlaatsID,TijdKost,MatKost) #define kstCacheLB $LB("","KST",SubGroep,SortNr,Oms,TijdWerk,TijdKost,$G(lbMatKost),KostPlaatsID)_ $LB(,,,,)_ $LB(,KPrijs,,,IncludeBS) ; _ $LB(,)_ $LB(,,,,,,) /// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ /// | PARAM / -FORMULE / -OBJ : Default formules | /// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ #define prmActief 1 #define prmVal "" #define prmProgLabel Self.Eval("Val") #define prmBT "" #define prmFMLFormule "" #define prmFMLVal Self.Eval("Formule") #define prmFMLProgLabel $$$prmProgLabel #define prmFMLBT "" #define prmOBJProgLabel Self.Eval("Object") #define prmOBJObject Self.GetObject() #define prmOBJObjectID "" #define prmOBJClassName "" #define prmCacheLB $LB("") /// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ /// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ /// | NAMES of GLOBALS for direct data access | /// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ #define globCalcCache ^Prod.GAData.CalcWV /* #define globProdKenmDataDef ^Prod.Ken.DataDefinitieD */ /// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+