Index: BL/Flow/Offerte/ScanEDIMail.cls.xml =================================================================== diff -u -r734 -r771 --- BL/Flow/Offerte/ScanEDIMail.cls.xml (.../ScanEDIMail.cls.xml) (revision 734) +++ BL/Flow/Offerte/ScanEDIMail.cls.xml (.../ScanEDIMail.cls.xml) (revision 771) @@ -1,10 +1,11 @@ - + BL.EC.Common,BL.Derde.KlantSpecifiek,%VHMacro,%occStatus 1 %RegisteredObject -62070,32238.17621 +62124,57225.379528 +61773,56551.521812 0 @@ -19,24 +20,10 @@ TEMP\ - - - - BL.Flow.Offerte.pxHoofding - - - - %Numeric @@ -63,20 +50,16 @@ Set %ClientIP="192.168.1.15" Lock +FlowXML2Offerte:1 Else Quit ; exclusief gebruik - If (##class(TECH.Config.ConfigMgr).Instance().GetString("BL.Flow.Offerte.ScanEDIMail_OpslaanInTestFolder")) - { + If (##class(TECH.Config.ConfigMgr).Instance().GetString("BL.Flow.Offerte.ScanEDIMail_OpslaanInTestFolder")) { Set TestPath=##class(TECH.Config.ConfigMgr).Instance().GetString("BL.Flow.Offerte.ScanEDIMail_TestFolderLocatie") Set DirRead=TestPath_..#SubPath Set DirArchive=TestPath_..#SubPath_..#ArchiveSubPath - Set DirTemp=TestPath_..#SubPath_..#TempSubPath - } - Else - { + Set DirTemp=TestPath_..#SubPath_..#TempSubPath } + Else { Set DirRead=^BLBeri("MSMGATEWAY")_..#SubPath Set DirArchive=^BLBeri("MSMGATEWAY")_..#SubPath_..#ArchiveSubPath - Set DirTemp=^BLBeri("MSMGATEWAY")_..#SubPath_..#TempSubPath - } - + Set DirTemp=^BLBeri("MSMGATEWAY")_..#SubPath_..#TempSubPath } + Do SCANDIR^vhDEV(DirRead,"*.*",$NA(Local),"") ; Opbouw van local met de bestandsnamen Set FileName="" @@ -137,19 +120,13 @@ For set vnr=$O(Offertes(vnr)) Quit:vnr="" Do . Set OrderCnt=OrderCnt+1 . Set ..pxOfferte=Offertes(vnr) - . // FMA Set blFlowOfferte = ##class(BL.Flow.Offerte.Build).%New() - . $$$blFlowOfferte + . $$$blFlowOfferte . Set blFlowOfferte=%blFlowOfferte ;Kill %blFlowOfferte - . // END FMA - . // FMA ..KLNr moet uit ScanEDIMail . Set (..KLNr,KlantNr)=..pxOfferte.KlantID ; de XML kan rechtstreeks de klant nr definieren . ;Set KlantNr=..DefineKlant() - . // FMA Error handling: als er geen klantnummer is, moet een foutcode teruggegeven worden + log/mail . If 'KlantNr Do Quit - . // FMA Set oOfferte = blFlowOfferte.Create(KlantNr,"EDI") . Do blFlowOfferte.Create(KlantNr,"EDI") . Set oOfferte=blFlowOfferte.oOfferte - . // END FMA . ; Opvullen met andere gegevens . Set oOfferte.StatusTijdStip=$H @@ -186,8 +163,6 @@ oOfferte:Flow.Offerte.Hoofding,pxLijn:BL.Flow.Offerte.pxLijn Datum Number - - - - - + Index: BL/Flow/Offerte/Product.cls.xml =================================================================== diff -u -r734 -r771 --- BL/Flow/Offerte/Product.cls.xml (.../Product.cls.xml) (revision 734) +++ BL/Flow/Offerte/Product.cls.xml (.../Product.cls.xml) (revision 771) @@ -1,48 +1,51 @@ - + - Use new version : BL.Flow.Offerte.LijnProduct - + Businesslogic voor het verwerken van een product offertelijn -Deze businesslogic is afhankelijk van %blFlowOfferte en deze moet reeds geinstantieerd zijn !]]> -%Prod.Product,BL.EC.Common +Deze businesslogic is afhankelijk van %blFlowOfferte en deze moet reeds geinstantieerd zijn ! +%Prod.Product,BL.EC.Common,BL.Prod 1 %RegisteredObject -60710,31716.003583 +62124,57832.578746 60207,60266.304448 0 - - + +Voorbereiden van een offertelijn voor import in een order +oLijn:Flow.Offerte.Lijn,NoSa:%String +%Status + + -/// Voorbereiden van een offertelijn voor prijsberekening en controle -Method Simulate(oLijn As Flow.Offerte.LijnAbstract, Taal As %String, NoSa As %String) As %Status -{ + + +Voorbereiden van een offertelijn voor prijsberekening en controle +oLijn:Flow.Offerte.Lijn,Taal:%String,NoSa:%String +%Status + + -/// Invullen van product, prijs en andere gegevens in de lijn of sublijnen -Method DataFill(oLijn As Flow.Offerte.LijnAbstract, Taal As %String, NoSa As %String) As %Status [ ProcedureBlock = 0 ] -{ + + +Invullen van product, prijs en andere gegevens in de lijn of sublijnen +oLijn:Flow.Offerte.Lijn,Taal:%String,NoSa:%String +0 +%Status + + -/// Controle van een lijn op prijs, levertermijn, aantal -/// What : P = Product, V = Verkoopprijs, L = Levertermijn, A = Aantal -Method Controles(oLijn As Flow.Offerte.LijnAbstract, What As %String, Taal As %String, NoSa As %String) As %Status -{ + + +Controle van een lijn op prijs, levertermijn, aantal +What : P = Product, V = Verkoopprijs, L = Levertermijn, A = Aantal +oLijn:Flow.Offerte.Lijn,What:%String,Taal:%String,NoSa:%String +%Status + + -/// Invullend van een lijn als het juist geCreate is -Method Fill(oLijn As Flow.Offerte.LijnAbstract, PRNr As %Integer, Aantal As %Integer) -{ + + +Invullend van een lijn als het juist geCreate is +oLijn:Flow.Offerte.Lijn,PRNr:%Integer,Aantal:%Integer + + -Method GetProducts(oLijn As Flow.Offerte.LijnAbstract, ByRef lbProducts As %List) As %Status -{ + + +%Status + + -Method GetProdWithPakket(PakRef As %String, KLNr As %Integer) [ Private ] -{ + +PakRef:%String,KLNr:%Integer +1 + + -Method GetProdWithIdentNr(IdentNr As %String, KLNr As %Integer) [ Private ] -{ + +IdentNr:%String,KLNr:%Integer,oLijn:Flow.Offerte.Lijn +1 +0,I<7 Set KortTekst=$$$PRGet($$$KortTekst) Set:KortTekst'[("*"_KLNr_"*") PRNr="" ; Kontrole op kundestam + + If ( $data(oLijn) ) && ( $IsObject(oLijn) ) && ( oLijn.Hoofding.Oorsprong="DYN" ) Do + . Set pxCrit=##class(BL.Prod.sub.pxSearchCriteria).Create($$$ProdCritUsageDynalog) + . Set pxCrit.At="I" + . Set pxCrit.SearchTxt=IdentNr + . Set pxCrit.VerifyCustomer=KLNr + . ;Set pxCrit.Pool = $LB("KS") + . Set lbPRNRs = ##class(BL.Prod.Search).SearchIndexAsList(pxCrit) + . If $ListLength(lbPRNRs)>1 Do + . . ; // opbouw mail naar PM --> voorlopig geen mail sturen .. + . . ;Set BodyIsStream = 1 + . . ;Set BodyIsHTML = 1 + . . ;Set Body = ##class(%GlobalCharacterStream).%New() + . . ;Do Body.WriteLn("Volgende producten hebben het zelfde IdentNr "_(IdentNr) ) + . . ;Do Body.WriteLn("") + . . ;For Counter = 1 : 1 : $LL(lbPRNRs) Do + . . ;. Set PRNr=$LG(lbPRNRs,Counter) + . . ;. Set arTable(Counter)="KortTekst "_$$$TAB_$$$PRGet($$$KortTekst)_$$$TAB_"InternNr"_$$$TAB_PRNr + . . ;Do Body.Write($$ArrayToHTMLTable^vhLib(.arTable)) + . . ;Do SendMiniMail^vhLib("system@vanhoecke.be",$LB("ICT_ProductMGR"),"Meerdere producten met zelfde IdentNr",Body,BodyIsStream,BodyIsHTML) + . . Set PRNr="" ; geen koppeling indien meerdere identnrs gevonden worden + . Else Set PRNr=$LG(lbPRNRs,1) + + Else Do + . Set IdentNr=$$TRIMN^vhRtn1(IdentNr) + . If $L(IdentNr)=8,$D(^KPR2(IdentNr_" ")) Set PRNr=$P(^KPR2(IdentNr_" "),"\") ; exact match + . If $L(IdentNr)=8 Set $E(IdentNr)="" + . If PRNr="",$L(IdentNr)=7 Do + . . For I=0,9,8,1:1:7 Do Quit:PRNr'="" + . . . Set PRNr=$P($G(^KPR2(I_IdentNr_" ")),"\") + . . . If PRNr,I>0,I<7 Set KortTekst=$$$PRGet($$$KortTekst) Set:KortTekst'[("*"_KLNr_"*") PRNr="" ; Kontrole op kundestam Quit:PRNr="" "" Quit $LB($LB(PRNr,1)) -} +]]> + -Method GetProdWithKortTekst(KortTekst As %String, KLNr As %Integer) [ Private ] -{ + +KortTekst:%String,KLNr:%Integer,oLijn:Flow.Offerte.Lijn +1 +11:11,1:$L(KortTekst)))'=$E(KortTekst,4,$S($L(KortTekst)>11:11,1:$L(KortTekst))) - . Quit:($L(KortTekst)>11)&&($E(KortTekst,12,$L(KortTekst))'=$E(NextKT,14,2+$L(KortTekst))) ; Deel 12 tot einde is verschillende - . Set PRNr=PRNr_";"_$P(^KPR1(NextKT),"\") - - Set $E(PRNr)="" ; verwijder eerste ";" - Set:PRNr[";" PRNr="" ; Meerdere niet toegelaten + + If ( $D(oLijn) ) && ( $IsObject(oLijn) ) && ( oLijn.Hoofding.Oorsprong="DYN" ) Do + . Set pxCrit=##class(BL.Prod.sub.pxSearchCriteria).Create($$$ProdCritUsageDynalog) + . Set pxCrit.At="K" + . Set pxCrit.SearchTxt=KortTekst + . Set pxCrit.VerifyCustomer=KLNr + . Set pxCrit.Pool = $LB("KS") + . Set lbPRNRs = ##class(BL.Prod.Search).SearchIndexAsList(pxCrit) + . If $ListLength(lbPRNRs)>1 Set PRNr="" + . Else Set PRNr=$LG(lbPRNRs,1) + Else Do + . Set KeepChar="" + . Set KortTekst=$ZCvt($ZStrip(KortTekst,"*P",,KeepChar),"U") + . ; De index KPR1 is speciaal opgebouwd het 3de en 12de karakter zijn er speciaal tussengevoegd voor de sortering + . Set NextKT=$E(KortTekst,1,3) + . For Set NextKT=$O(^KPR1(NextKT)) Quit:$E(NextKT,1,3)'=$E(KortTekst,1,3) Do ; Looping met de eerste drie karakters + . . Set KT2=$ZCvt($ZStrip($P(^KPR1(NextKT),"\",2),"*P",,KeepChar),"U") + . . Quit:$E(KT2,1,$L(KortTekst))'=KortTekst + . . + . . Set PRNr=PRNr_";"_$P(^KPR1(NextKT),"\") + . Set $E(PRNr)="" ; verwijder eerste ";" + . Set:PRNr[";" PRNr="" ; Meerdere niet toegelaten + Quit:PRNr="" "" Quit $LB($LB(PRNr,1)) -} - - /* */ -]]> - +]]> + - + FishEye: Tag 771 refers to a dead (removed) revision in file `BL/Flow/Offerte/XML2Offerte.cls.xml'. FishEye: No comparison available. Pass `N' to diff? Index: BL/PR/GA/TandemBox.cls.xml =================================================================== diff -u -r734 -r771 --- BL/PR/GA/TandemBox.cls.xml (.../TandemBox.cls.xml) (revision 734) +++ BL/PR/GA/TandemBox.cls.xml (.../TandemBox.cls.xml) (revision 771) @@ -1,9 +1,9 @@ - + PRGACNTs,BL.EC.Common BL.Lib.BaseObj -62101,50960.188005 +62124,59901.919876 59295,64161.046 0 @@ -1708,13 +1708,7 @@ - + Index: BL/Flow/Offerte/Doc.cls.xml =================================================================== diff -u -r734 -r771 --- BL/Flow/Offerte/Doc.cls.xml (.../Doc.cls.xml) (revision 734) +++ BL/Flow/Offerte/Doc.cls.xml (.../Doc.cls.xml) (revision 771) @@ -1,20 +1,18 @@ - + BL.Sys.FOP.Common 1 -BL.Flow.Docs.Basis,BL.Flow.Basis.DocNew -62013,65309.998388 +BL.Flow.Docs.Basis,%RegisteredObject +62124,55856.55067 0 offerte_01.01 - - -DocType voor task-keywords (zie ook BL.Sys.FOP.Common.INC) -OFFERTE + +KyoceraFS4000 @@ -25,16 +23,6 @@ A - -KyoceraFS4000 - - - - -Offerte is afkomstig van Admin (KOF) of van WebShop (WS) -%String - - 1 OFFNr:%String,KLNr:%String @@ -79,72 +67,57 @@ %Status 1 - + %Status Oproepen via : - s sc=##class(BL.Flow.Offerte.Doc).RenderAndPrintDoc("O-528368","KYOCERAFS4000") w sc,! + s sc=##class(BL.Flow.Offerte.Doc).RenderAndPrintDoc("O-560390","BrotherBoekH",1) w sc,! 1 -OFFNr:%String,PrinterName:%String +OFFNr:%String,PrinterName:String,pWithLogo:%Boolean=1 %Status 0) NumCopies=1 + Set:($$$ISOK(sc)) sc=Task.AddActionPrint(PrinterName,NumCopies,,) + Quit:($$$ISERR(sc)) sc + Set sc=##class(BL.Sys.FOP.CommonTasks).RunFopTask(Task,$$$rmBatch,$$$qpvLow) ; $$$rmBatch ; $$$rmSync Quit sc ]]> @@ -154,50 +127,53 @@ OFFNr:%String,MailTo:%String,Subject:%String,Body:%String,FileName:%String,MailFrom:%String %Status Oproepen via : - s sc=##class(BL.Flow.Offerte.Doc).RenderAndFtpDoc("O-171251","vhisiedownload.vanhoecke.be",,"TestWimV002.pdf") w sc,! + s sc=##class(BL.Flow.Offerte.Doc).RenderAndFtpDoc(171251,"vhisiedownload.vanhoecke.be",,"TestWimV002.pdf") w sc,! 1 OFFNr:%String,FtpServer:%String,DestDir:%String,DestFName:%String %Status @@ -304,24 +280,123 @@ -Geeft de standaard Keywords terug op basis van de opgegeven AnalyseRoutine. -Deze method kan in de afgeleide klasse overschreven worden voor specifieke uitbreidingen. +Geeft de standaard Keywords terug op basis van de opgegeven AnalyseRoutine +1 DocType:%String,AnalyseRoutine:%String %String + + +XSLT-parameters voor RenderDoc berekenen. +Geeft een $LB() terug. Bvb: $LB("pWithLogo=0","pWithBgColors=1") +1 +lbXsltParams:%List,pWithLogo:%Boolean=0,pWithBgColors:%Boolean="",pImageColVisible:%String="" +%List + + + + + +Create Task-object + AnalyseRoutine is een verplichte parameter + Keywords is optioneel. Bij voorkeur ";"-gescheiden + UserID is optioneel. +Keywords en UserID worden berekend indien niet gedefinieerd. +1 +AnalyseRoutine:%String,Keywords:%String,UserID:%String +Sys.FOP.Task + + + + + +De render-data toevoegen aan het Doc. +1 +Doc:Sys.FOP.emDoc,DataInVia:%String,DataIn,Template:%String,TransformType:%String="PDF",lbPPODKeywords:%List,lbXsltParams:%List +%Status + + + + + +De render-data ophalen, i.e. invullen in de parameters (als .local doorgeven). +1 + +%Status + + + + + +De render-data toevoegen aan het Doc. +Alleen gebruiken wanneer de data van het document gedefinieerd is via lbDocs, i.e. xml wordt pas later gegenereerd via method GetFopXML() +1 +Doc:Sys.FOP.emDoc,lbDocs:%List,Template:%String,TransformType:%String="PDF",lbPPODKeywords:%List,pWithLogo:%Boolean +%Status + + + + +1 +OFFNr:%String,BronType:%String="F",Extension:%String="pdf" +%String + + + DocRef kan ofwel OFFNr zijn, ofwel lbDocs (list) Target: File, FileWWW, FileWWWUrl, TempFTP, Mail, TempMail - +1 + + + + + + + + +Create Task-object +1 +lbOffertes:%List,TransformType:%String,pWithLogo:%Boolean=0 +1 +Sys.FOP.Task + + - + Index: BL/Flow/Offerte/LijnProductGA.cls.xml =================================================================== diff -u -r734 -r771 --- BL/Flow/Offerte/LijnProductGA.cls.xml (.../LijnProductGA.cls.xml) (revision 734) +++ BL/Flow/Offerte/LijnProductGA.cls.xml (.../LijnProductGA.cls.xml) (revision 771) @@ -1,9 +1,9 @@ - + 1 BL.Flow.Offerte.LijnAbstract -61983,66987.094236 +62124,56577.416183 60814,48320.122288 0 @@ -283,10 +283,10 @@ %List @@ -345,5 +345,5 @@ ]]> - + Index: BL/Flow/Offerte/LijnProduct.cls.xml =================================================================== diff -u -r734 -r771 --- BL/Flow/Offerte/LijnProduct.cls.xml (.../LijnProduct.cls.xml) (revision 734) +++ BL/Flow/Offerte/LijnProduct.cls.xml (.../LijnProduct.cls.xml) (revision 771) @@ -1,13 +1,13 @@ - + Businesslogic voor het verwerken van een product offertelijn Deze businesslogic is afhankelijk van %blFlowOfferte en deze moet reeds geinstantieerd zijn ! %Prod.Product,BL.EC.Common,BL.Prod 1 LijnAbstract -61864,54388.161307 +62124,56517.560495 60207,60266.304448 0 @@ -185,19 +185,21 @@ %ArrayOfObjects " _ $$LCVT^vhLib(lbPRNRs)) + . D WLIP^vhDBG(195,$$$LCVT(lbPRNRs)) . If $ListLength(lbPRNRs)>1 Do . . ; // opbouw mail naar PM --> voorlopig geen mail sturen .. . . ;Set BodyIsStream = 1 . . ;Set BodyIsHTML = 1 . . ;Set Body = ##class(%GlobalCharacterStream).%New() - . . ;Do Body.WriteLn("Volgende producten gevonden met hetzelfde IdentNr "_(IdentNr) ) + . . ;Do Body.WriteLn("Volgende producten hebben het zelfde IdentNr "_(IdentNr) ) . . ;Do Body.WriteLn("") . . ;For Counter = 1 : 1 : $LL(lbPRNRs) Do . . ;. Set PRNr=$LG(lbPRNRs,Counter) @@ -258,9 +260,10 @@ -In arbeidsdagen of weken +Beschikbaarheid van het product in arbeidsdagen of weken (zonder transport) vb $LB(3,"A") = 3 arbeidsdagen -vb $LB(1,"W") = 1 week +vb $LB(1,"W") = 1 week + %List - + Index: BL/Flow/Offerte/Build.cls.xml =================================================================== diff -u -r734 -r771 --- BL/Flow/Offerte/Build.cls.xml (.../Build.cls.xml) (revision 734) +++ BL/Flow/Offerte/Build.cls.xml (.../Build.cls.xml) (revision 771) @@ -1,10 +1,10 @@ - + -BL.EC.Common,%VHMacro +BL.EC.Common 1 %RegisteredObject -62073,43254.664772 +62124,55592.964908 60207,60266.267121 0 @@ -20,28 +20,12 @@ - -oOfferte:Flow.Offerte.Hoofding - - - - - - - Voorbereiden van de offerte voor import in een order @@ -53,11 +37,23 @@ Set Key="" For Set oLijn=..oOfferte.Lijnen.GetNext(.Key) Quit:Key="" Do . Quit:'$isObject(oLijn) - . Do oLijn.BL.Generate(.NoSa) ; (Taal,.NoSa) + . Do ..GenerateLijn(oLijn,.NoSa) Quit ]]> + + +Voorbereiden van een offertelijn voor import in een order +De generatie is polymorph - soort lijn afhankelijk +oLijn:Flow.Offerte.Lijn,NoSa:%String +%Status + + + Voorbereiden van de offerte voor prijsberekening en controle @@ -68,7 +64,7 @@ @@ -78,7 +74,7 @@ De simulatie is polymorph - soort lijn afhankelijk oLijn:Flow.Offerte.Lijn,Taal:%String,NoSa:%String %Status - @@ -91,7 +87,7 @@ Set Key="" For Set oLijn=..oOfferte.Lijnen.GetNext(.Key) Quit:Key="" Do . Quit:..IsSubLijn(oLijn) ; Sublijnen worden gecontroleerd tijdens de hoofdlijnen - . Do oLijn.BL.Controles(Taal,.NoSa) + . Do ..ControleLijn(oLijn,.What,.Taal,.NoSa) ]]> @@ -103,19 +99,11 @@ oLijn:Flow.Offerte.Lijn,What:%String,Taal:%String,NoSa:%String %Status - - - - Creatie van een nieuwe offerte @@ -208,23 +196,33 @@ Opent een offertelijn bepaald door de aard van InputObj. -InputObj is een Object of een ObjectID van klasse Flow.Offerte.Hoofding of Flow.Offerte.LijnAbstract +InputObj is een Object of een ObjectID van klasse Flow.Offerte.Hoofding of Flow.Offerte.Lijn Indien Hoofding dan wordt de eerste OfferteLijn uit de hoofding genomen. -Geeft steeds een Object van de klasse Flow.Offerte.LijnAbstract terug (of leeg indien niet bepaald) +Geeft steeds een Object van de klasse Flow.Offerte.Lijn terug (of leeg indien niet bepaald) 1 InputObj:%String -Flow.Offerte.LijnAbstract +Flow.Offerte.Lijn + +OfferteID + + + Opslaan van een offerte (hoofding en lijnen) @@ -239,22 +237,12 @@ ]]> - -OfferteID - - - Aanmaken van het subobject adres Flow.Offerte.Adres @@ -267,7 +255,6 @@ %Status @@ -281,14 +268,14 @@ Set ..oOfferte="" Kill ..SortCache Set sc=##class(Flow.Offerte.Hoofding).%DeleteId(OfferteID) - d WL^vhDBG("DELETE id:"_OfferteID_" status:"_$$ParseStatus^vhLib(sc)) Quit sc ]]> Days Status,NoMail:%Boolean=0 %Status OfferteID:%String %String @@ -343,46 +330,24 @@ 0 %Date datum + $$$blLeverTermijn($H) New Key,MinDatum,lbTermijn,Datum,VerzW Set Key="" Set MinDatum=+$H For Set oLijn=..oOfferte.Lijnen.GetNext(.Key) Quit:Key="" Do . Quit:'$isObject(oLijn) - // [?? RESET BL] - #If $$$Server="CACHE01" . Set lbTermijn=oLijn.MinLeverTermijn() ; format $LB(aantal,dagofweek) - #Else - . Set lbTermijn=oLijn.BL.MinLeverTermijn() ; format $LB(aantal,dagofweek) - #EndIf + . ;d WLIP^vhDBG(15,"lbTermijn:"_$$LCVT^vhLib(lbTermijn)) . Set Datum=%blLeverTermijn.GetVroegsteDatumFromTermijn(lbTermijn) ; exclusief transport + . ;d WLIP^vhDBG(15,"Vroegstebeschikbaar:"_$$EXTDATE^vhDTyp(Datum,"DKP")) . Set Datum=%blLeverTermijn.GetVroegsteLevering(Datum) ; inclusief transport + . ;d WLIP^vhDBG(15,"Vroegstelevering:"_$$EXTDATE^vhDTyp(Datum,"DKP")) . Set:Datum>MinDatum MinDatum=Datum ; afronden op verzendingswijze Set MinDatum=%blLeverTermijn.AfrondenLeverDag(MinDatum) Quit MinDatum - - /*New Key,MinDatum,lbTermijn,Datum,VerzW - Set Key="" - Set MinDatum=+$H - For Set oLijn=..oOfferte.Lijnen.GetNext(.Key) Quit:Key="" Do - . Quit:'$isObject(oLijn) - . Set lbTermijn=oLijn.BL.MinLeverTermijn() ; format $LB(aantal,dagofweek) - . ;w !,$LI(lbTermijn,2)," ",$LI(lbTermijn,1) - . Set Datum=..CalcDatum(+$H,$LI(lbTermijn,2),$LI(lbTermijn,1)) - . Set:Datum>MinDatum MinDatum=Datum - - ; afronden op verzendingswijze - Set VerzW=..oOfferte.VerzendWijze - Set:VerzW="" VerzW=$$DEFAULT^KLVERZW(,..oOfferte.KlantGetObjectId()) - $$$InitOldLocals - ;w !,"voor verzw ",MinDatum - Set MinDatum=$$LEVERDATUM^KLVERZW(VerzW,MinDatum) - ;w !,"after verzw ",MinDatum - - Quit MinDatum*/ ]]> @@ -406,7 +371,7 @@ Set Titel=$S($G(IsResend):"HERHALING: ",1:"")_"Import offerte "_..oOfferte.%Id()_" in order" Set Body($I(Body))="Referentie: "_..oOfferte.Referentie_$S($L(..oOfferte.CommReferentie):" / "_..oOfferte.CommReferentie,1:"") Set:$L(..oOfferte.Afzender) Body(1)=Body(1)_"~Afzender: "_..oOfferte.Afzender - Set:$L(..oOfferte.Oorsprong) Body(1)=Body(1)_"~Oorsprong: "_$CASE(..oOfferte.Oorsprong,"EC":"E-commerce","DYN":"Dynaplug","EDI":"EDI","OLWEB":"Orgalux webshop",:"") + Set:$L(..oOfferte.Oorsprong) Body(1)=Body(1)_"~Oorsprong: "_$CASE(..oOfferte.Oorsprong,"EC":"E-commerce","DYN":"DynaLog","EDI":"EDI",:"") Set:$L(..Count()) Body(1)=Body(1)_"~Aantal lijnen: "_..Count() If $L(..oOfferte.Commentaar) Do . Set Body($I(Body))="~~OPMERKING:~"_$TR(..oOfferte.Commentaar,$C(10,13),"~") @@ -418,25 +383,17 @@ ]]> - - - - Status wordt steeds per paar opgeslagen. De oneven items bevatten de code, de even items de comment Men kan de comment ook toevoegen aan een reeds bestaande comment dit als AddComment=1 Het comment gedeelte van de status kan undefined zijn of leeg, dit betekent hetzelfde ! -oLijn:Flow.Offerte.LijnAbstract,Code:%String,Comment:%List="",AddComment=0 +oLijn:Flow.Offerte.Lijn,Code:%String,Comment:%List="",AddComment=0 Verwijderd de code en de comment -oLijn:Flow.Offerte.LijnAbstract,Code:%String +oLijn:Flow.Offerte.Lijn,Code:%String Toevoegen van een product aan de offerte. GroepKey:%String,InsertWijze:%String="AP;L",PRNr,Aantal -Flow.Offerte.LijnAbstract +Flow.Offerte.Lijn -Wijzigen van een productlijn. -Eerst wordt er een copy genomen waarna er gecontroleerd wordt of er mag gewijzigd worden +Wijzigen van een productlijn GroepKey:%String,PRNr,Aantal -Flow.Offerte.LijnAbstract +Flow.Offerte.Lijn Toevoegen van een afgeleidproduct aan de offerte -GroepKey:%String,InsertWijze:%String="AP;L",GAData:Prod.GAData.Abstract,Aantal:%Integer -Flow.Offerte.LijnAbstract - - - - - -Toevoegen van een afgeleidproduct aan de offerte -Flow.Offerte.LijnAbstract +Flow.Offerte.Lijn Wijzigen van een afgeleidproduct -GroepKey:%String,GAData:%String,Aantal:%Integer -Flow.Offerte.LijnAbstract - + +Flow.Offerte.Lijn Toevoegen van een text aan de offerte GroepKey:%String,InsertWijze:%String="AP;L",Text:%String -Flow.Offerte.LijnAbstract +Flow.Offerte.Lijn @@ -571,14 +482,7 @@ Wijzigen van een textlijn GroepKey:%String,Text:%String -Flow.Offerte.LijnAbstract - +Flow.Offerte.Lijn @@ -610,100 +514,43 @@ ]]> - + -Split kan zowel een %ArrayOfObjects van pxProductSlit zijn als één record pxProductSplit -oLijn:Flow.Offerte.LijnAbstract -%Status - - - - - Invoegen van sublijnen vertrekkend van de moederlijn en een lijst van producten. format: $LB($LB(PRNr,Aantal),...) vb. $LB($LB(7458,4),$LB(105215,1)) -oLijn:Flow.Offerte.LijnAbstract,lbProducts:%List +oLijn:Flow.Offerte.Lijn,lbProducts:%List rechtstreeks wijzigen . Set PRNr=$LI($LI(lbProducts),1) . Quit:PRNr'?4.7N . Quit:'$D(^KPR(PRNr)) - . Set Factor=$LI($LI(lbProducts),2) + . Set Faktor=$LI($LI(lbProducts),2) . Do oLijn.ProductSetObjectId(PRNr) - . Quit:'Factor - . Quit:Factor=1 - . Set oLijn.Factor=Factor - . Set oLijn.Aantal=oLijn.Aantal*Factor + . Quit:'Faktor + . Quit:Faktor=1 + . Set oLijn.Faktor=Faktor + . Set oLijn.Aantal=oLijn.Aantal*Faktor Else Do ; Meerdere producten -> sublijnen . For I=1:1:$LL(lbProducts) Do . . Set PRNr=$LI($LI(lbProducts,I),1) - . . Set Factor=$LI($LI(lbProducts,I),2) - . . Set oSubLijn=##class(Flow.Offerte.LijnProduct).Create(PRNr,Aantal) + . . Set Faktor=$LI($LI(lbProducts,I),2) + . . Set oSubLijn=##class(Flow.Offerte.LijnProduct).Create(PRNr,oLijn.Aantal*Faktor) + . . Set oSubLijn.Faktor=Faktor . . Set oSubLijn.LeverDatum=oLijn.LeverDatum . . Set oSubLijn.Referentie=oLijn.Referentie + . . Set oSubLijn.EDILijnRef=oLijn.EDILijnRef . . Do ..InsertLijn(oSubLijn,oLijn.GroepKey,"AP;S") . Do ..SetStatus(oLijn,$$$OffStatMoederProduct) . ;Do ..AddStatus(oLijn,$$$OffStatMoederProduct) Quit ]]> - - -Split kan zowel een %ArrayOfObjects van pxProductSplit zijn als één record pxProductSplit -oLijn:Flow.Offerte.LijnAbstract,Split:%RegisteredObject - rechtstreeks wijzigen - . ;w "InsertSubLijnen"_oLijn.%ClassName() - . If $isObject(Split1.GAData)&&(oLijn.%ClassName()="LijnProductGA") Do - . . Set oLijn.GAData=Split1.GAData - . Else If $isObject(Split1.Product)&&(oLijn.%ClassName()="LijnProduct") Do - . . Set oLijn.Product=Split1.Product - . Quit:'Split1.Factor - . Quit:Split1.Factor=1 - . Set oLijn.Faktor=Split1.Factor - . Set oLijn.Aantal=oLijn.Aantal*Split1.Factor - Else Do ; Meerdere producten -> sublijnen - . Set Key="" ; VNR: volgnummer van de producten in ^PAKKET("D") - . Set AantalOrig=oLijn.Aantal - . For Set Split1=Split.GetNext(.Key) Quit:Key="" Do - . . If $isObject(Split1.GAData)&&(Split1.GAData.%ClassName()'["Abstract") Do - . . . Set oSubLijn=##class(Flow.Offerte.LijnProductGA).Create(Split1.GAData,oLijn.Aantal*Split1.Factor) - . . Else If $isObject(Split1.Product) Do - . . . ;d DumpObject^%apiOBJ(Split1.Product) - . . . Set oSubLijn=##class(Flow.Offerte.LijnProduct).Create(Split1.Product.%Id(),oLijn.Aantal*Split1.Factor) - . . Set oSubLijn.Faktor=Split1.Factor - . . Set oSubLijn.LeverDatum=oLijn.LeverDatum - . . Set oSubLijn.Referentie=oLijn.Referentie - . . Set oSubLijn.EDILijnRef=oLijn.EDILijnRef - . . Do ..InsertLijn(oSubLijn,oLijn.GroepKey,"AP;S") - . . ;w oSubLijn.GroepKey," ",oSubLijn.Product.%Id() - . Do ..SetStatus(oLijn,$$$OffStatMoederProduct) - Quit -]]> - - - - - - Controle of de lijn een sublijn is houdt geen rekening met backorders -oLijn:Flow.Offerte.LijnAbstract +oLijn:Flow.Offerte.Lijn %Boolean @@ -712,7 +559,7 @@ Controle of de lijn sublijnen heeft, als de lijn zelf een sublijn is dan 0 -oLijn:Flow.Offerte.LijnAbstract +oLijn:Flow.Offerte.Lijn %Integer Toevoegen van een lijn object aan de SortCache -oLijn:Flow.Offerte.LijnAbstract +oLijn:Flow.Offerte.Lijn @@ -781,7 +628,7 @@ Ophalen van het lijn object vertrekkend van de groepkey GroepKey:%String -Flow.Offerte.LijnAbstract +Flow.Offerte.Lijn @@ -795,7 +642,7 @@ 2 : op welk nivo er moet toegevoegd worden G = Groep, L = Lijn, S = Sublijn, B = backorderlijn De GroepKey is het referentiepunt voor de InsertWijze, als Nivo is S of B dan moet de GroepKey ingevuld zijn. -oLijn:Flow.Offerte.LijnAbstract,GroepKey:%String,InsertWijze:%String="AP;L" +oLijn:Flow.Offerte.Lijn,GroepKey:%String,InsertWijze:%String="AP;L" %Status - + Index: BL/Flow/Offerte/ProductGAData.cls.xml =================================================================== diff -u -r734 -r771 --- BL/Flow/Offerte/ProductGAData.cls.xml (.../ProductGAData.cls.xml) (revision 734) +++ BL/Flow/Offerte/ProductGAData.cls.xml (.../ProductGAData.cls.xml) (revision 771) @@ -1,35 +1,192 @@ - + - Use new version : BL.Flow.Offerte.LijnProductGA -]]> -%Prod.Product,BL.EC.Common +%Prod.Product,BL.EC.Common,PRGACNTs 1 %RegisteredObject -62083,43636.961067 +62124,57841.451635 60207,60266.322035 0 - - + +Fill offertelijn (TBX) via params : +de Kenmerken-array (+ enkele properties) van oLijn worden ingevuld met de gegevens uit de array Params + +%Status + + + + + +Voorbereiden van een offertelijn (TBX) voor import in een order +oLijn:Flow.Offerte.Lijn,NoSa:%String +%Status + + + + + +Voorbereiden van een offertelijn (TBX) voor prijsberekening en controle +Het GAData product wordt gegenereerd, maar NIET opgeslagen. Het KPR product wordt NIET gecreëerd. +De prijs, korttekst, langtekst, ... worden gesimuleerd en ingevuld in de offertelijn. +Vult de Status van offertelijn in als er een fout opgetreden is +oLijn:Flow.Offerte.Lijn,Taal:%String,NoSa:%String +%Status + + + + + +Controle van een lijn (TBX) op prijs, levertermijn, aantal +What : P = Prijzen, L = Levertermijn, A = Aantal +oLijn:Flow.Offerte.Lijn,What:%String,Taal:%String,NoSa:%String +%Status + + + + + +Zie ..GetProducts() + +%Status + + + + + +Genereren van het GAData Product en het KPR Product. +Vult de Status van offertelijn in als er een fout opgetreden is +Via de list lbProducts wordt ook de vermenigvuldigingsfactor meegegeven. +format: $LB($LB(PRNr,Qty),...) vb. $LB($LB(7458,4),$LB(105215,1)) + +%Status +0 Do Quit $$$ERROR($$$GeneralError,$$$LCVT(lbError)) + . Set lbError=$LB($$$errGADataNoKPRProd) ; "KPR Product not created" + . $$$blFlowOfferte + . Do %blFlowOfferte.SetStatus(oLijn,$$$OffStatAfgeleidProd,lbError) + ; Else + Do oLijn.ProductSetObjectId(PRNr) + + ; Save GAData.Product + Set sc=GAProd.SaveClean() + If $$$ISOK(sc) Do + . Set GAProdID=GAProd.%Id() + . Do ##class(Prod.Product).SetPropViaNr(PRNr,"GAProdID",GAProdID) ; ^KPR(PRNr,"G") --> 13e piece + Set lbProducts=$LB($LB(oLijn.ProductGetObjectId(),1)) + Quit $$$OK + + Quit:($$gprErrorInFullCalc) $$$ERROR($$$GeneralError,$$$LCVT(lbError)) +gprErrorInFullCalc() ; Detect error and set to oLijn.Status + Set:('$IsObject(GAProd))&&($G(lbError)="") lbError=$LB($$$errGADataNoProd) ; "GAData Product not created" + If $L($G(lbError)) Do + . $$$blFlowOfferte + . Do %blFlowOfferte.SetStatus(oLijn,$$$OffStatAfgeleidProd,lbError) + Quit ('$IsObject(GAProd)) +]]> + + + +PRNr +0 + + + + + +Maakt een GAData.Product object voor oLijn. Berekent en valideert de DataItems. +Bij fouten wordt de melding via arErrs doorgegeven. +Returns GAProd or "". + +1 +Prod.GAData.Product + "_$LG(tmpLB,$$$liOms)_" ("_$LG(tmpLB,$$$liCode)_") : PRNr="""_$LG(tmpLB,$$$liPRNr)_"""" Quit $LB("VPR")_lbVPR -} +]]> + -/// Maakt een GAData.Product object voor oLijn. Bij fouten wordt de melding via arErrs (node "BLD") doorgegeven. -/// Returns GAProd or "". -Method GAProductBuildTBX(oLijn As Flow.Offerte.LijnAbstract, ByRef blTBox As BL.PR.GA.TandemBox, ByRef arErrs As %String) As Prod.GAData.Product [ Private ] -{ + + +Maakt een GAData.Product object voor oLijn. Bij fouten wordt de melding via arErrs (node "BLD") doorgegeven. +Returns GAProd or "". + +1 +Prod.GAData.Product + voor import into Admin + calc vanuit Excel + - CACHE02 : klasse BL.Prod.GAData.TBXLadeConvert --> voor import into (Dev-)Admin + calc vanuit Excel + - routine BL.PR.GA.TB.tmpDev2.MAC --> voor berekening WSOrder + */ + gbtValuesToProduct #define PL blTBox.LookUp(KM,"DIC") ;New KM,arKenm Do gbtKenmToTempArray Set arKenm("TemplateCode")=GAProd.TemplateCode ; nodig voor blTBox.KMValuesToProduct() Set arKenm="ARRAY" Do:('$D(GAProd.LookUp("PLItem"))) GAProd.BuildLookUp($LB("ICode")) ; "PLItem" is onderdeel van BuildLU("ICode") + Do gbtSetNietMeeItems($$$GetKenm("lstNietMee")) Do gbtFBevestNML - Do bfwResetNMItemsBinnenlade ; Reling/boxside worden sowieso gemonteerd op een binnenlade + Do gbtResetNMItemsBinnenlade ; Reling/boxside worden sowieso gemonteerd op een binnenlade ; Basis Input waarden to Product Set KM="" For Set KM=$O(arKenm(KM)) Quit:(KM="") Do:($L($G($$$PL))) GAProd.SetItemValByPL($$$PL,arKenm(KM)) @@ -161,63 +332,67 @@ Quit gbtKenmToTempArray ;New DSCode,KFront,KRug,KBxs,lbDSCodes - ;Set DSCode=$S($L($$$GetKenm("ItemDS")):$LG(blTBox.BTDep("TBDesign","TBDesignCode",$$$GetKenm("ItemDS")),1), 1:"") + Set DSCode=$S($L($$$GetKenm("ItemDS")):$LG(blTBox.BTDep("TBDesign","TBDesignCode",$$$GetKenm("ItemDS")),1), 1:"") + /* + // tijdelijke methode om DesignCode "L" in te stellen (before 2009) Set lbDSCodes=$S($L($$$GetKenm("ItemDS")):blTBox.BTDep("TBDesign","TBDesignCode",$$$GetKenm("ItemDS")), 1:"") Set DSCode=$LG(lbDSCodes,1) If (DSCode="A")&&($LF(lbDSCodes,"L"))&&($L($$$GetKenm("ItemBX"))) Do . ; INTIVO design-code is afhankelijk van de Boxside --> A of L . Set:($LF(blTBox.BTDep("TBBoxSide","TBDesignCode",$$$GetKenm("ItemBX")),"L")) DSCode="L" + */ Set KFront=$S($L($$$GetKenm("ItemRK")):$LG(blTBox.BTDep("TBRelingKleur","TBFrontKleur",$$$GetKenm("ItemRK")),1), 1:"") Set KRug =$S($L($$$GetKenm("ItemDS")):$LG(blTBox.BTDep("TBDesign","TBRugKleur",dsID),1), 1:"") Set KBxs =$S($L($$$GetKenm("ItemKX")):$$$GetKenm("ItemKX"), $L($$$GetKenm("ItemDS")):$LG(blTBox.BTDep("TBDesign","TBBoxsideKleur",dsID),1), 1:"") - Set arKenm("TBDesign")=$$$GetKenm("ItemDS") - Set arKenm("TBDesignCode")=DSCode - Set arKenm("LadeCode")=$$$GetKenm("ItemLT") + + Set arKenm("TBDesign") =$$$GetKenm("ItemDS") + Set arKenm("TBDesignCode") =DSCode + Set arKenm("LadeCode") =$$$GetKenm("ItemLT") Do gbtBTItemsLadeCode($$$GetKenm("ItemLT")) Set arKenm("TBFBevestiging")=$S(($G(arKenm("TBLadeType"))="B"):"Z", 1:$$$GetKenm("ItemFB")) - Set arKenm("TBCBreedte")=$$$GetKenm("ItemCB") - Set arKenm("TBWandDikte")=$$$GetKenm("ItemWD") - Set arKenm("OpvullijstLi")=$S($$$GetKenm("ItemOPVL")["L":25, 1:0) - Set arKenm("OpvullijstRe")=$S($$$GetKenm("ItemOPVL")["R":25, 1:0) - Set arKenm("MinTolerantie")=blTBox.DFLMinTolerantie($$$GetKenm("ItemWD")) ; $S(+$$$GetKenm("ItemWD")=0:0, 1:1) - Set arKenm("TBLadeDiepte")=$$$GetKenm("ItemLD") - Set arKenm("TBDraagKracht")=$$$GetKenm("ItemDK") - Set arKenm("TBBodemKleur")=$$$GetKenm("ItemKB") - Set arKenm("TBRelingKleur")=$$$GetKenm("ItemRK") - Set arKenm("TBFrontKleur")=KFront - Set arKenm("TBLadeKleur")=$S($$$GetKenm("ItemKL")="BE":"BA", 1:$$$GetKenm("ItemKL")) - Set arKenm("TBRugKleur")=KRug - Set arKenm("TBBlumotion")=$$$GetKenm("ItemBM") + Set arKenm("TBCBreedte") =$$$GetKenm("ItemCB") + Set arKenm("TBWandDikte") =$$$GetKenm("ItemWD") + Set arKenm("OpvullijstLi") =$S($$$GetKenm("ItemOPVL")["L":25, 1:0) + Set arKenm("OpvullijstRe") =$S($$$GetKenm("ItemOPVL")["R":25, 1:0) + Set arKenm("MinTolerantie") =blTBox.DFLMinTolerantie($$$GetKenm("ItemWD")) ; $S(+$$$GetKenm("ItemWD")=0:0, 1:1) + Set arKenm("TBLadeDiepte") =$$$GetKenm("ItemLD") + Set arKenm("TBDraagKracht") =$$$GetKenm("ItemDK") + Set arKenm("TBBodemKleur") =$$$GetKenm("ItemKB") + Set arKenm("TBRelingKleur") =$$$GetKenm("ItemRK") + Set arKenm("TBFrontKleur") =KFront + Set arKenm("TBLadeKleur") =$S($$$GetKenm("ItemKL")="BE":"BA", 1:$$$GetKenm("ItemKL")) + Set arKenm("TBRugKleur") =KRug + Set arKenm("TBBlumotion") =$$$GetKenm("ItemBM") /* * / ; Temporary work-around for GlazenBoxside, until the web-wizard also uses ItemKV ( Switched off by WimV on 27/04/2009) If (DSCode'="I") && ($$$GetKenm("ItemBX")?1(1"BZ",1"BF",1"BC")) Do . ;New KVul . Set KVul=$Case($$$GetKenm("ItemBX"), "BZ":"FZ", "BF":"FG", "BC":"FC", :ERROR) - . Set arKenm("TBBoxSide")="BG" + . Set arKenm("TBBoxSide") ="BG" . Set arKenm("TBBoxsideKleur")=KBxs . Set arKenm("TBVulstukKleur")=KVul Else If (DSCode="I") Do - . Set arKenm("TBBoxSide")=$$$GetKenm("ItemBX") + . Set arKenm("TBBoxSide") =$$$GetKenm("ItemBX") . Set arKenm("TBBoxsideKleur")=KBxs ; $$$GetKenm("ItemKX") . Set arKenm("TBVulstukKleur")=$$$GetKenm("ItemKV") Else Do - . Set arKenm("TBBoxSide")=$$$GetKenm("ItemBX") + . Set arKenm("TBBoxSide") =$$$GetKenm("ItemBX") . Set arKenm("TBBoxsideKleur")=$$$GetKenm("ItemKX") . ;Set arKenm("TBVulstukKleur")=$$$GetKenm("ItemKV") - /* * / ; Remove space to close CommentBlock + /* */ ; ( Switched ON by WimV on 27/04/2009) - Set arKenm("TBBoxSide")=$$$GetKenm("ItemBX") + Set arKenm("TBBoxSide") =$$$GetKenm("ItemBX") Set arKenm("TBBoxsideKleur")=KBxs ; $$$GetKenm("ItemKX") Set arKenm("TBVulstukKleur")=$$$GetKenm("ItemKV") Set arKenm("TBStabilisator")=$$$GetKenm("ItemSB") Set arKenm("TBStalenRug") =$$$GetKenm("ItemSR") Set:(arKenm("TBStalenRug")="") arKenm("TBStalenRug")="Z" Set arKenm("TBSPZijkant") =$P($$$GetKenm("ItemSPZK"),";",1) - + #define SPZkOpMaat(%v) (%v?1(1"M".E,1"SI".E)) If $$$SPZkOpMaat(arKenm("TBSPZijkant")) Do ; Spoelbak zijkant op maat @@ -238,7 +413,6 @@ Set arKenm("TBDwarsVerdeling")=$$$GetKenm("ItemDWV") Set arKenm("OrgaluxProduct")=$$$GetKenm("ItemOLP") Do gbtExtrasFromGlobal() - Do gbtSetNietMeeItems($$$GetKenm("lstNietMee")) Quit gbtBTItemsLadeCode(LCodeID) ; Uit LadeCode volgen deze vijf properties: @@ -293,9 +467,9 @@ . Quit:(NMKey?1(1"NMBlumoBehuizing",1"NMAntislipmat")) . ;d WL^vhDBG($S('$D(arKenm(NMKey)):"Set "_NMKey_" =1", 1:"Val at "_NMKey_" is :"_$G(arKenm(NMKey)))) . Set:('$D(arKenm(NMKey))) arKenm(NMKey)=1 - ;Do bfwResetNMItemsBinnenlade // de oproep is nu verhuisd naar bfwProductFromWSLijn + ;Do gbtResetNMItemsBinnenlade // de oproep is nu verhuisd naar gbtValueToProduct Quit -bfwResetNMItemsBinnenlade +gbtResetNMItemsBinnenlade ; Binnenlade kan NIET gemonteerd worden zonder Reling, dus NMZijReling terug op 0 zetten If ($G(arKenm("TBLadeType"))="B")&&($G(arKenm("TBBoxSide"))'="ZR") Do ; binnenlade met reling/boxside . Set arKenm("NMZijReling")=0 @@ -307,149 +481,16 @@ Set:($G($$$GlobalKLData(0,sDomVERW,KLNrProd,"SR"))?1"V") arKenm("TBStalenRug")=$$$GlobalKLData(0,sDomVERW,KLNrProd,"SR") Set:($G($$$GlobalKLData(0,sDomVERW,KLNrProd,"MATKL1239"))="HA")&&($G(arKenm("TBBodemKleur"))="LGS")&&($G(arKenm("TBLadeDiepte"))?1(1"500")) arKenm("PlaatMat")="HA" ; Bodems Keller gebruiken : "Halux Afgewerkt" i.p.v. "Halux Stroken" Quit -} +]]> + -/// Fill offertelijn (TBX) via params : -/// de Kenmerken-array (+ enkele properties) van oLijn worden ingevuld met de gegevens uit de array Params -Method FillTBX(oLijn As Flow.Offerte.LijnAbstract, Aantal As %Integer, ByRef Params As %String) As %Status -{ - ;New Key - Set oLijn.GenerischType="TBX" - Set oLijn.GenerischProduct="" ; wordt later ingevuld, wanneer het GAData product berekend is. - Set:($D(Aantal)) oLijn.Aantal=Aantal - ; Kenmerken from WSOrder data - For Key="ID","Taal","BonType","KLKorting","KLNummer" Do - . Do oLijn.Kenmerken.SetAt($G(Params("KLT",Key)),Key) - Do oLijn.Kenmerken.SetAt($G(Params("KLT","NietMeeleveren")),"lstNietMee") - ; Kenmerken from WSLijn data - For Key="LIJNNR","AANT","EXCLUDE" Do - . Do oLijn.Kenmerken.SetAt($G(Params("LN",Key)),Key) - For Key="LT","CB","WD","LD","DK","BM","BX","ASM","BGRP","SPZK","SB","OPVL","STDL","VPK","OLP","FB","DWV","FS" Do - . Do oLijn.Kenmerken.SetAt($G(Params("LN",Key)),"Item"_Key) - For Key="KL","KB","RK","KX","KV","DS" Do - . Do oLijn.Kenmerken.SetAt($G(Params("LN","KLR",Key)),"Item"_Key) - Quit $$$OK -} - -/// Voorbereiden van een offertelijn (TBX) voor import in een order -Method GenerateTBX(oLijn As Flow.Offerte.LijnAbstract, NoSa As %String) As %Status -{ - ;New sc,lbProducts - Set sc=oLijn.GetProducts(.lbProducts) - If $$$ISERR(sc) Do - . ; Status is reeds ingevuld in GetProducts() - Else Do - . $$$blFlowOfferte - . Do %blFlowOfferte.InsertSubLijnen(oLijn,lbProducts) - Quit $$$OK -} - -/// Voorbereiden van een offertelijn (TBX) voor prijsberekening en controle -/// Het GAData product wordt gegenereerd, maar NIET opgeslagen. Het KPR product wordt NIET gecreëerd. -/// De prijs, korttekst, langtekst, ... worden gesimuleerd en ingevuld in de offertelijn. -/// Vult de Status van offertelijn in als er een fout opgetreden is -Method SimulateTBX(oLijn As Flow.Offerte.LijnAbstract, Taal As %String, NoSa As %String) As %Status -{ - ;w "BL.Flow.Offerte.ProductGAData : simulate TBX lijn "_oLijn.GroepKey,! - - ;New GAProd,lbError - Set GAProd=..GAProductFullCalc(oLijn,"TBX",.lbError) - Quit:($$simErrorInFullCalc) $$$ERROR($$$GeneralError,$$$LCVT(lbError)) - - ; Simulate values + set to offertelijn properties - Do ..FillOfferteData(oLijn,GAProd,.Taal) - Quit $$$OK -simErrorInFullCalc() ; Detect error and set to oLijn.Status - Set:('$IsObject(GAProd))&&($G(lbError)="") lbError=$LB($$$errGADataNoProd) ; "GAData Product not created" - If $L($G(lbError)) Do - . $$$blFlowOfferte - . Do %blFlowOfferte.SetStatus(oLijn,$$$OffStatAfgeleidProd,lbError) - Quit ('$IsObject(GAProd)) -} - -/// Controle van een lijn (TBX) op prijs, levertermijn, aantal -/// What : P = Prijzen, L = Levertermijn, A = Aantal -Method ControlesTBX(oLijn As Flow.Offerte.LijnAbstract, What As %String, Taal As %String, NoSa As %String) As %Status -{ - -} - -/// Zie ..GetProducts() -Method GetProductsTBX(oLijn As Flow.Offerte.LijnAbstract, ByRef lbProducts As %List) As %Status -{ - Quit ..GetProducts(oLijn,"TBX",.lbProducts) -} - -/// Genereren van het GAData Product en het KPR Product. -/// Vult de Status van offertelijn in als er een fout opgetreden is -/// Via de list lbProducts wordt ook de vermenigvuldigingsfactor meegegeven. -/// format: $LB($LB(PRNr,Qty),...) vb. $LB($LB(7458,4),$LB(105215,1)) -Method GetProducts(oLijn As Flow.Offerte.LijnAbstract, GenType As String, ByRef lbProducts As %List) As %Status -{ - - Set lbProducts="" - Quit:($G(GenType)'?1(1"TBX")) - ;New GAProd,GAProdID,lbError,PRNr,sc - ;w "BL.Flow.Offerte.ProductGAData : generate "_GenType_" lijn "_oLijn.GroepKey,! - - ; Get GAData Product - Set GAProd=..GAProductFullCalc(oLijn,GenType,.lbError) - Quit:($$gprErrorInFullCalc) $$$ERROR($$$GeneralError,$$$LCVT(lbError)) - - ; Create KPR Product - Set lbError="" - Do GAProd.KPRCreate() ; (GenPRNr,QtyStaffel) - Set PRNr=GAProd.ProductGetObjectId() - Do ..InitProduct(PRNr) ; speciale suboproep om omgevingsvariabelen op te zetten - Do oLijn.Kenmerken.SetAt(PRNr,"PRNr") - If PRNr'>0 Do Quit $$$ERROR($$$GeneralError,$$$LCVT(lbError)) - . Set lbError=$LB($$$errGADataNoKPRProd) ; "KPR Product not created" - . $$$blFlowOfferte - . Do %blFlowOfferte.SetStatus(oLijn,$$$OffStatAfgeleidProd,lbError) - ; Else - Do oLijn.ProductSetObjectId(PRNr) - - ; Save GAData.Product - Set sc=GAProd.SaveClean() - If $$$ISOK(sc) Do - . Set GAProdID=GAProd.%Id() - . Do ##class(Prod.Product).SetPropViaNr(PRNr,"GAProdID",GAProdID) ; ^KPR(PRNr,"G") --> 13e piece - Set lbProducts=$LB($LB(oLijn.ProductGetObjectId(),1)) - Quit $$$OK - - Quit:($$gprErrorInFullCalc) $$$ERROR($$$GeneralError,$$$LCVT(lbError)) -gprErrorInFullCalc() ; Detect error and set to oLijn.Status - Set:('$IsObject(GAProd))&&($G(lbError)="") lbError=$LB($$$errGADataNoProd) ; "GAData Product not created" - If $L($G(lbError)) Do - . $$$blFlowOfferte - . Do %blFlowOfferte.SetStatus(oLijn,$$$OffStatAfgeleidProd,lbError) - Quit ('$IsObject(GAProd)) -} - -Method InitProduct(PRNr) [ ProcedureBlock = 0 ] -{ - Do iprInitializeOld - Do RECALC^PRODUKT2(PRNr) - Do BLDIND^PRODUKT2(PRNr) - If $G(^KLPUTZ("AS")) Do iprCalcSchaduwPrijs - Do ZEND^EWPR(PRNr) - Quit -iprInitializeOld - Set Q="K" - Set D="\",U=";" - S (boot,bootrvg)=$ZU(110),cs=$ZU(5) - S DT=$$EXTDATE^vhDTyp($H,"DKP") - Set QU=$G(%QU) - Quit -iprCalcSchaduwPrijs - Quit:'$D(^PRBS("BS",PRNr)) - Do CALCONE^PRBSC(PRNr,"S","S",1) - Quit -} - -/// De prijs, korttekst, langtekst, ... van het GAProduct worden gesimuleerd en ingevuld in de offertelijn -Method FillOfferteData(oLijn As Flow.Offerte.LijnAbstract, GAProd As Prod.GAData.Product, Taal As %String) As %Status [ Private ] -{ + + +De prijs, korttekst, langtekst, ... van het GAProduct worden gesimuleerd en ingevuld in de offertelijn +oLijn:Flow.Offerte.Lijn,GAProd:Prod.GAData.Product,Taal:%String +1 +%Status + - +]]> + - + Index: Flow/Offerte/Hoofding.cls.xml =================================================================== diff -u -r734 -r771 --- Flow/Offerte/Hoofding.cls.xml (.../Hoofding.cls.xml) (revision 734) +++ Flow/Offerte/Hoofding.cls.xml (.../Hoofding.cls.xml) (revision 771) @@ -1,11 +1,10 @@ - + persistent -BL.EC.Common 1 %Persistent,%XML.Adaptor -62012,43728.897873 +62124,60906.732556 60207,60266.652854 0 @@ -97,7 +96,7 @@ -LijnAbstract +Lijn children Hoofding 1 @@ -156,10 +155,6 @@ %Integer - -%String - - Wordt automatisch geinitialiseerd bij eerste oproep zie method OfferteBLBLGet() @@ -178,6 +173,10 @@ 1 + +%String + + 1 - - -Instantiëren en initializeren van het bijhorende OfferteBL-object. -De Oref wordt bijgehouden in de property OfferteBL (transient/niet opgeslagen). -BLClassName:%String="" -BL.Flow.Offerte.Build - - - Voert method InitOfferteBL() uit indien nog niet BL geinitialiseerd is. BL.Flow.Offerte.Build @@ -315,12 +300,6 @@ VervalDatum - -LinkToTBXWebsite - - -EmailOrderbevestiging - 0.6648% @@ -399,5 +378,5 @@ - + Index: Flow/Offerte/Lijn.cls.xml =================================================================== diff -u -r734 -r771 --- Flow/Offerte/Lijn.cls.xml (.../Lijn.cls.xml) (revision 734) +++ Flow/Offerte/Lijn.cls.xml (.../Lijn.cls.xml) (revision 771) @@ -1,161 +1,164 @@ - + 1 persistent BL.EC.Common 1 %Persistent,%XML.Adaptor -61635,33821.12504 +62124,58860.636429 60207,60266.669172 0 - - - + + +Default = leeg +Code opgebouwd als GG.LLL.SS.BB waar +- GG groepering : default = 00 +- LLL lijnvolgorde : default = creatie volgorde +- SS een subgroep nummering : default = 00, wordt ingevuld als vanuit een lijn meerdere lijnen worden gegenereerd +- BB een backorder nummering : default = 00 +de verschillende subvelden worden met een "." gescheiden +%String + - - - + + +Status wordt steeds per paar opgeslagen. +De oneven items bevatten de code, de even items de comment +Men kan de comment ook toevoegen aan een reeds bestaande comment dit als AddComment=1 +Het comment gedeelte van de status kan undefined zijn of leeg dit betekent hetzelfde ! +Mogelijke codes : +- VP = Verschil in Prijs +- GP = Geen product +- FP = Foutief product +- GA = Fout in generatie afgeleid product +- MP = MoederProduct - dummylijn +%List + - - +%String + + -/// Default = leeg -/// Code opgebouwd als GG.LLL.SS.BB waar -/// - GG groepering : default = 00 -/// - LLL lijnvolgorde : default = creatie volgorde -/// - SS een subgroep nummering : default = 00, wordt ingevuld als vanuit een lijn meerdere lijnen worden gegenereerd -/// - BB een backorder nummering : default = 00 -/// de verschillende subvelden worden met een "." gescheiden -Property GroepKey As %String; + +Hoofding +parent +Lijnen +1 + -/// Status wordt steeds per paar opgeslagen. -/// De oneven items bevatten de code, de even items de comment -/// Men kan de comment ook toevoegen aan een reeds bestaande comment dit als AddComment=1 -/// Het comment gedeelte van de status kan undefined zijn of leeg dit betekent hetzelfde ! -/// Mogelijke codes : -/// - VP = Verschil in Prijs -/// - GP = Geen product -/// - FP = Foutief product -/// - GA = Fout in generatie afgeleid product -/// - MP = MoederProduct - dummylijn -Property Status As %List; + + +Voorbereiden van een offertelijn voor import in een order +Deze method wordt in de polymorfe klasse overschreven +NoSa:%String +%Status + + -Property Tekst As %String; + + +Voorbereiden van een offertelijn voor prijsberekening en controle +Deze method wordt in de polymorfe klasse overschreven +Taal:%String,NoSa:%String +%Status + + -//Relationship Hoofding As Hoofding [ Cardinality = parent, Inverse = Lijnen ]; + +Taal:%String,NoSa:%String + + -/// Voorbereiden van een offertelijn voor import in een order -/// Deze method wordt in de polymorfe klasse overschreven -Method Generate(NoSa As %String) As %Status -{ - Quit $$$OK -} + + +Controle op de prijs, levertermijn en aantal indien de prijs is ingevuld. +What : P = Product, V = Verkoopprijs, L = Levertermijn, A = Aantal +Deze method wordt in de polymorfe klasse overschreven +What,Taal:%String,NoSa:%String +%Status + + -/// Voorbereiden van een offertelijn voor prijsberekening en controle -/// Deze method wordt in de polymorfe klasse overschreven -Method Simulate(Taal As %String, NoSa As %String) As %Status -{ - Quit $$$OK -} + + +Bepalen van het product +Indien afgeleidproduct dan wordt het product gegenereerd, ook mogelijk is om meerdere producten te genereren. +Anders trachten via de SearchKeys het product of producten te selecteren. +Via de list lbProducts wordt ook de vermenigvuldigingsfactor meegegeven. +format: $LB($LB(PRNr,Qty),...) vb. $LB($LB(7458,4),$LB(105215,1)) +Deze method wordt in de polymorfe klasse overschreven om de specifieke product te genereren. + +%Status + + -Method DataFill(Taal As %String, NoSa As %String) -{ - Quit $$$OK -} + + +Omvorming van een offertelijn naar een order +Deze method wordt in de polymorfe klasse overschreven +OrderNr +%Status + + -/// Controle op de prijs, levertermijn en aantal indien de prijs is ingevuld. -/// What : P = Product, V = Verkoopprijs, L = Levertermijn, A = Aantal -/// Deze method wordt in de polymorfe klasse overschreven -Method Controles(What, Taal As %String, NoSa As %String) As %Status -{ - Quit $$$OK -} - -/// Bepalen van het product -/// Indien afgeleidproduct dan wordt het product gegenereerd, ook mogelijk is om meerdere producten te genereren. -/// Anders trachten via de SearchKeys het product of producten te selecteren. -/// Via de list lbProducts wordt ook de vermenigvuldigingsfactor meegegeven. -/// format: $LB($LB(PRNr,Qty),...) vb. $LB($LB(7458,4),$LB(105215,1)) -/// Deze method wordt in de polymorfe klasse overschreven om de specifieke product te genereren. -Method GetProducts(ByRef lbProducts As %List) As %Status -{ - Quit $$$OK -} - -/// Omvorming van een offertelijn naar een order -/// Deze method wordt in de polymorfe klasse overschreven -Method BuildOrder(OrderNr) As %Status -{ - Quit $$$OK -} - -/// Creatie (%New) van een lijn -/// Deze method wordt in de polymorfe klasse overschreven -ClassMethod Create() As Flow.Offerte.Lijn -{ + + +Creatie (%New) van een lijn +Deze method wordt in de polymorfe klasse overschreven +1 +Flow.Offerte.Lijn + + -/// In arbeidsdagen of weken -/// vb $LB(3,"A") = 3 arbeidsdagen -/// vb $LB(1,"W") = 1 week -Method MinLeverTermijn() As %List -{ + + +In arbeidsdagen of weken +vb $LB(3,"A") = 3 arbeidsdagen +vb $LB(1,"W") = 1 week +%List + + - - - %%CLASSNAME - - - Groep - - - GroepKey - - - Status - - - Tekst - - - {%%PARENT}("LN") - LijnDefaultData - ^Flow.Offerte.HoofdingC("LN") - ^Flow.Offerte.LijnI - 13 - ^Flow.Offerte.LijnS - %Library.CacheStorage - - -*/ -]]> - - - %Library.CacheStorage -^Flow.Offerte.LijnD +{%%PARENT}("LN") LijnDefaultData -^Flow.Offerte.LijnD +^Flow.Offerte.HoofdingC("LN") ^Flow.Offerte.LijnI ^Flow.Offerte.LijnS -listnode - %%CLASSNAME + +Groep + + +GroepKey + + +Status + + +Tekst + - + FishEye: Tag 771 refers to a dead (removed) revision in file `Flow/Offerte/LijnAbstract.cls.xml'. FishEye: No comparison available. Pass `N' to diff? Index: BL/EC/EDI.cls.xml =================================================================== diff -u -r734 -r771 --- BL/EC/EDI.cls.xml (.../EDI.cls.xml) (revision 734) +++ BL/EC/EDI.cls.xml (.../EDI.cls.xml) (revision 771) @@ -1,10 +1,10 @@ - + BL.EC.Common 1 %RegisteredObject -62073,43114.798707 +62124,59790.230757 60207,60266.060949 0 @@ -72,7 +72,7 @@ d ArrayToTextWF^vhLib("arMatrix(""OUT"",""PRM"")","c:\Temp\TBox Neves calcMatrix.txt") d ArrayToTabDelim^vhLib(.arMatrix,"c:\Temp\TBox Neves calcMatrix002.txt")]]> 1 - + %Status calculation - . ;d WL^vhDBG("oLijn = "_oLijn_" "_$$$LCVT(oLijn.Status)) - // [?? RESET BL] -#IF ($$$Server="CACHE02") - . Do oLijn.BL.Simulate("N",.NoSa) -#ELSE . Do %blFlowOfferte.SimulateLijn(oLijn,"N") ; ..SimulateAll() -#ENDIF . d:($L(oLijn.Status)) WL^vhDBG("oLijn.Status = "_$$$LCVT(oLijn.Status)) . ; Get Prijs and store into array . Set arMatrix("OUT","LST",lnI,"Prijs")=oLijn.NettoEPrijs . Set:($D(arDim)) arMatrix("OUT","PRM",arListItem(arDim(1)),arListItem(arDim(2)),arListItem(arDim(3)))=oLijn.NettoEPrijs . Set:($D(arDim)) arMatrix("OUT","DBG",arListItem(arDim(1)),arListItem(arDim(2)),arListItem(arDim(3)))=$LB(lnI,oLijn.NettoEPrijs) . w !,$J(lnI,2)_". "_"Prijs = "_oLijn.NettoEPrijs,! - //d WL^vhDBG($$$ArrayTT2("arMatrix",.arMatrix)) + ;d WL^vhDBG($$ArrayToText^vhLib("arMatrix",.arMatrix)) Do:($L($G(FilePath))) comOutputToFile() Quit $$$OK comOutputToFile() @@ -243,106 +236,6 @@ FromServer,WSOrdID Flow.Offerte.Hoofding WSOrd) - ;d WLIP^vhDBG(97,"WSOrd "_$G(WSOrd)) - Quit:('$IsObject(WSOrd)) "" - $$$blFlowOfferte - Set KLNr=$$wsoKLNrFromOrder(.sDomVERW) - Set oHfd=%blFlowOfferte.Create() ; incl ID toekennen - Set oHfd.Oorsprong="TBX" - Set oHfd.CreatieTijdStip=$S($$$Trim(WSOrd.SubmitTS)="":$H, 1:$ZDTH(WSOrd.SubmitTS,3)) - ;Set oHfd.Datum=$H - Set oHfd.Referentie=$S($G(sDomVERW)="":"ERROR !!! ", sDomVERW="HFLE":$$$KLNaamHFLE, sDomVERW'="VHEPN":WSOrd.KLNaam, 1:WSOrd.Commissie) - Set oHfd.CommReferentie=$S($G(sDomVERW)="":"ERROR !!! ", sDomVERW'="VHEPN":WSOrd.Commissie, 1:"") - Set oHfd.Commentaar=$$wsoCommentFromOrder - Do oHfd.KlantSetObjectId(KLNr) ; controle op KLNr ??? - Set oHfd.EmailOrderbevestiging = $S(sDomVERW="VHEPN":WSOrd.KLEMail,1:"") // JCL : overhalen Email adres order bevestiging - Set oHfd.LeveringsAdres=$S(sDomVERW="VHEPN":..SelectAdresFromWS(WSOrd,KLNr), 1:"") - Set sc=%blFlowOfferte.Save() ; oHfd.%Save() - ;d WL^vhDBG("OffHoofd saved: "_$$ParseStatus^vhLib(sc)) - Quit:($$$ISERR(sc)) "" - ;Set arGADatas=$$wsoConvertToGADatas - ; Build Lijnen - Set i="" - For Set WSLn=WSOrd.Lijnen.GetNext(.i) Quit:(i="") Do Quit:($$$ISERR(sc)) - . Set GAData=$zobjclassmethod($S(WSLn.GAMeta="TBX":"Prod.GAData.TBXLade",1:"Prod.GAData.Abstract"),"Create") - . Do GAData.BL.GADataFromWSOrderLijn(WSLn,WSOrd.NietMeeleveren) - . ;Do GAData.BL.CompleteGAData() ; Vervolledigen van de Data tijdens calculatie GAProd - . ;Set GAData=arGADatas.GetAt(i) - . Set oLijn=%blFlowOfferte.InsertLijnAfgeleidProduct(,,GAData,+WSLn.Qty) - . Set:('$IsObject(oLijn)) sc=$$$ERROR($$$GeneralError,"oLijn not created") - . Quit:($$$ISERR(sc)) - . Set oLijn.Hoofding=oHfd - . Set sc=oLijn.%Save() - Set GAData="" - ;Set arGADatas="" - Set:('$$$ISERR(sc)) sc=%blFlowOfferte.Save() - If $$$ISERR(sc) Do - . ;Set Status=$$$errCreateWithText(..#errNoSave,$$ParseStatus^vhLib(sc)) - . Set oHfd="" - . Set OffID="" - Else Do - . Set OffID=oHfd.%Id() - Quit oHfd ; OffID -wsoOpenWSOrder - If FromServer="WWW" Do - . ; Call WebService to retrieve WSOrder - . Set WSOrd="" - Else Do - . ; retrieve from local namespace - . If $IsObject(WSOrdID) Do Quit - .. Set WSOrd=WSOrdID - . Else Do - .. Set WSOrd=##class(WS.TBX.Order).%OpenId(WSOrdID) - Quit -wsoKLNrFromOrder(sDomVERW) ; sDomVERW als .local doorgeven - Set lbDomLU=##class(WS.TBX.Order).DomainLookUp(WSOrd.WebDomain,$LB("VERW","KLNR")) - Set sDomVERW=$LG(lbDomLU,1) - Set sDomKLNr=$LG(lbDomLU,2) - Quit +$S(sDomVERW'="VHEPN":sDomKLNr, 1:WSOrd.KLNummer) -wsoCommentFromOrder() - ; Extract EDI ref via volgende lijn: - ; w EDIRef=$$$TextBetween(oHfd.Commentaar,"TBX-EDI-nr: ",$$$CRLF) - Set txt="Levertijd: "_WSOrd.LeverTijd - Set txt=txt_$$$CRLF_"TBX-EDI-nr: "_WSOrd.OrderNr ; $S($L(WSOrd.%Id()):WSOrd.%Id(), 1:WSOrd.mID) - Set:($L(WSOrd.Opmerking1)) txt=txt_$$$CRLF_"Opmerking: "_$$$CRLF_WSOrd.Opmerking1_$$$CRLF - Set KL=oHfd.Klant - Quit:('$IsObject(KL)) txt - ;Set:($D(arCmp)) txt=txt_$$$CRLF_"KlantData" - Set:(WSOrd.KLStraatNrBus'=KL.StraatNrBus) txt=txt_$$$CRLF_"Straat: "_WSOrd.KLStraatNrBus - Set:(WSOrd.PostNr'=KL.Postnummer ) txt=txt_$$$CRLF_"PostNr: "_WSOrd.KLPostNr - Set:(WSOrd.WoonPlaats'=KL.Woonplaats ) txt=txt_$$$CRLF_"WoonPlaats: "_WSOrd.KLWoonPlaats - Set:(WSOrd.Telefoon'=KL.Telefoon1 ) txt=txt_$$$CRLF_"Telefoon: "_WSOrd.KLTelefoon - Set:(WSOrd.Fax'=KL.Telefax ) txt=txt_$$$CRLF_"Fax: "_WSOrd.KLFax - Set:(WSOrd.EMail'=KL.EmailAdres ) txt=txt_$$$CRLF_"EMail: "_WSOrd.KLEMail - Kill KL - Quit txt - /* -wsoConvertToGADatas() - Set arObj=##class(%ArrayOfObjects).%New() - Set i="" - For Set WSLn=WSOrd.Lijnen.GetNext(.i) Quit:(i="") Do Quit:($$$ISERR(sc)) - . Set GAData=$zobjclassmethod($S(WSLn.GAMeta="TBX":"Prod.GAData.TBXLade",1:"Prod.GAData.Abstract"),"Create") - . Do arObj.SetAt(GAData,i) - . Do GAData.BL.GADataFromWSOrderLijn(WSLn) - . Do GAData.BL.CompleteGAData() - Set GAData="" ; clean up obj-ref - Quit arObj - */ -]]> - - - - -Omzetten van WSOrder data naar Offerte.Hoofding+Lijnen -Geeft als resultaat offerte hoofding terug. -De Kenmerken en enkele properties zijn reeds ingevuld, maar de producten (GAData+KPR) zijn nog NIET berekend. -1 -FromServer,WSOrdID -Flow.Offerte.Hoofding - WSOrd) ;d WLIP^vhDBG(97,"WSOrd "_$G(WSOrd)) @@ -357,7 +250,6 @@ Set oHfd.CommReferentie=$S($G(sDomVERW)="":"ERROR !!! ", sDomVERW'="VHEPN":WSOrd.Commissie, 1:"") Set oHfd.Commentaar=$$wsoCommentFromOrder Do oHfd.KlantSetObjectId(KLNr) ; controle op KLNr ??? - Set oHfd.EmailOrderbevestiging = $S(sDomVERW="VHEPN":WSOrd.KLEMail,1:"") // JCL : overhalen Email adres order bevestiging Set oHfd.LeveringsAdres=$S(sDomVERW="VHEPN":..SelectAdresFromWS(WSOrd,KLNr), 1:"") Set sc=%blFlowOfferte.Save() ; oHfd.%Save() ;d WL^vhDBG("OffHoofd saved: "_$$ParseStatus^vhLib(sc)) @@ -369,7 +261,7 @@ For Set WSLn=WSOrd.Lijnen.GetNext(.i) Quit:(i="") Do Quit:($$$ISERR(sc)) . Do wsoConvertWSLijnToArray . Set Qty=$G(arData("LN","AANT")) - . Set oLijn=%blFlowOfferte.InsertLijnAfgeleidProductOLD(,,"TBX",+Qty,.arData) + . Set oLijn=%blFlowOfferte.InsertLijnAfgeleidProduct(,,"TBX",+Qty,.arData) . Set:('$IsObject(oLijn)) sc=$$$ERROR($$$GeneralError,"oLijn not created") . Quit:($$$ISERR(sc)) . Set oLijn.Hoofding=oHfd @@ -424,7 +316,6 @@ Do WSLn.DataArrayFromWSLn(.tmpAr) Merge arData("LN")=tmpAr Quit - /* */ ]]> @@ -476,5 +367,5 @@ - + Index: Flow/Offerte/LijnProductGA.cls.xml =================================================================== diff -u -r734 -r771 --- Flow/Offerte/LijnProductGA.cls.xml (.../LijnProductGA.cls.xml) (revision 734) +++ Flow/Offerte/LijnProductGA.cls.xml (.../LijnProductGA.cls.xml) (revision 771) @@ -1,14 +1,15 @@ - + Offerte lijn met een afgeleidproduct De kenmerken (hoogte, breedte, type, kleur, ...) van het afgeleidproduct wordt opgeslagen in de array kenmerk -Het soort product wordt gedefinieerd door Genersich Type +Het soort product wordt gedefinieerd door Genersich Type +De methods van de klasse zijn slechts doorverwijzigingen naar bussiness logic waar de echte implementatie staat uitgeschreven persistent 1 LijnProduct -61905,60963.119969 +62124,58935.58634 60207,60266.693585 0 @@ -19,7 +20,7 @@ -TBX, GRP, TLM, KAD, SDK, SDC, SDO +TBX, GRP, TLM, KAD %String @@ -30,11 +31,6 @@ - -Prod.GAData.Abstract - - - %String @@ -58,65 +54,10 @@ Maakt een nieuwe OfferteLijn aan en vult de gegevens uit Params in. PRNr is een dummy, verplicht door polymorfisme van LijnProduct 1 -PRNr:%Integer,Aantal:%Integer,GAData:Prod.GAData.Abstract -Flow.Offerte.LijnAbstract - - - - - -Maakt een nieuwe OfferteLijn aan en vult de gegevens uit Params in. -PRNr is een dummy, verplicht door polymorfisme van LijnProduct -1 -Flow.Offerte.LijnAbstract +Flow.Offerte.Lijn - - - - -Bouwt ItemHdr en ItemVal op van de Kenmerken van het LijnProduct - -%Status - - - - - + -/// Voorbereiden van een offertelijn voor import in een order -/// Implementatie : BL.Flow.Offerte.ProductGAData -Method Generate(NoSa As %String) As %Status -{ + + +Voorbereiden van een offertelijn voor import in een order +Implementatie : BL.Flow.Offerte.ProductGAData +NoSa:%String +%Status + + -/// Voorbereiden van een offertelijn voor prijsberekening en controle -/// Vult prijs, levertermijn, min.bestelhoeveelheid, korttekst en langtekst in de offertelijn. -/// Het product en afgeleid product wordt niet opgeslagen. -/// Implementatie : BL.Flow.Offerte.ProductGAData -Method Simulate(Taal As %String, NoSa As %String) As %Status -{ + + +Voorbereiden van een offertelijn voor prijsberekening en controle +Vult prijs, levertermijn, min.bestelhoeveelheid, korttekst en langtekst in de offertelijn. +Het product en afgeleid product wordt niet opgeslagen. +Implementatie : BL.Flow.Offerte.ProductGAData +Taal:%String,NoSa:%String +%Status + + -/// Controle op de prijs, levertermijn en aantal indien de prijs is ingevuld. -/// What : P = Product, V = Verkoopprijs, L = Levertermijn, A = Aantal -/// Implementatie : BL.Flow.Offerte.ProductGAData -Method Controles(What, Taal As %String, NoSa As %String) As %Status -{ + + +Controle op de prijs, levertermijn en aantal indien de prijs is ingevuld. +What : P = Product, V = Verkoopprijs, L = Levertermijn, A = Aantal +Implementatie : BL.Flow.Offerte.ProductGAData +What,Taal:%String,NoSa:%String +%Status + + -/// Genereren van het GAData Product en het KPR Product. -/// Via de list lbProducts wordt ook de vermenigvuldigingsfactor meegegeven. -/// format: $LB($LB(PRNr,Qty),...) vb. $LB($LB(7458,4),$LB(105215,1)) -/// Implementatie : BL.Flow.Offerte.ProductGAData -Method GetProducts(ByRef lbProducts As %List) As %Status -{ + + +Genereren van het GAData Product en het KPR Product. +Via de list lbProducts wordt ook de vermenigvuldigingsfactor meegegeven. +format: $LB($LB(PRNr,Qty),...) vb. $LB($LB(7458,4),$LB(105215,1)) +Implementatie : BL.Flow.Offerte.ProductGAData + +%Status + + -/// In arbeidsdagen of weken -/// vb $LB(3,"A") = 3 arbeidsdagen -/// vb $LB(1,"W") = 1 week -Method MinLeverTermijn() As %List -{ - + + +Beschikbaarheid iIn arbeidsdagen of weken (zonder transport) +vb $LB(3,"A") = 3 arbeidsdagen +vb $LB(1,"W") = 1 week +%List + + - /* */ -]]> - - - - - - - -Visitor:LijnVisitor - + +Bouwt ItemHdr en ItemVal op van de Kenmerken van het LijnProduct + +%Status + @@ -251,11 +218,8 @@ MinBestelHoeveelheid - -GAData - - + Index: Flow/Offerte/LijnProduct.cls.xml =================================================================== diff -u -r734 -r771 --- Flow/Offerte/LijnProduct.cls.xml (.../LijnProduct.cls.xml) (revision 734) +++ Flow/Offerte/LijnProduct.cls.xml (.../LijnProduct.cls.xml) (revision 771) @@ -1,12 +1,13 @@ - + -Offerte lijn met een product +Offerte lijn met een product +De methods van de klasse zijn slechts doorverwijzigingen naar bussiness logic waar de echte implementatie staat uitgeschreven persistent 1 -LijnAbstract -61905,51788.108342 +Lijn +62124,58960.291883 60207,60266.676181 0 @@ -135,30 +136,110 @@ %String + + +Voorbereiden van een offertelijn voor import in een order +Implementatie : BL.Flow.Offerte.Product +NoSa:%String +%Status + + + + + +Voorbereiden van een offertelijn voor prijsberekening en controle +Implementatie : BL.Flow.Offerte.Product +Taal:%String,NoSa:%String +%Status + + + + +Taal:%String,NoSa:%String + + + + + +Controle op de prijs, levertermijn en aantal indien de prijs is ingevuld. +What : P = Product, V = Verkoopprijs, L = Levertermijn, A = Aantal +Implementatie : BL.Flow.Offerte.Product +What,Taal:%String,NoSa:%String +%Status + + + + + +Bepalen van het product +Trachten via de SearchKeys het product of producten te selecteren. +Via de list lbProducts wordt ook de vermenigvuldigingsfactor meegegeven. +format: $LB($LB(PRNr,Qty),...) vb. $LB($LB(7458,4),$LB(105215,1)) +Implementatie : BL.Flow.Offerte.Product + +%Status + + + + + +Omvorming van een offertelijn naar een order +Implementatie : BL.Flow.Offerte.Convert2Order +OrderNr:%String +%Status + + + -Maakt een nieuw GAData-object en initialiseert het bijhorende BL-object +Creatie (%New) van een offertelijn +Implementatie : BL.Flow.Offerte.Product 1 PRNr:%Integer,Aantal:%Integer -Flow.Offerte.LijnAbstract +Flow.Offerte.Lijn - - - - - -Visitor:LijnVisitor - + +Beschikbaarheid van het product in arbeidsdagen of weken (zonder transport) +vb $LB(3,"A") = 3 arbeidsdagen +vb $LB(1,"W") = 1 week + +%List + @@ -236,5 +317,5 @@ - + FishEye: Tag 771 refers to a dead (removed) revision in file `BL/Flow/Offerte/LijnAbstract.cls.xml'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 771 refers to a dead (removed) revision in file `BL/EC/WebShopNEW.cls.xml'. FishEye: No comparison available. Pass `N' to diff? Index: BL/EC/WebShop.cls.xml =================================================================== diff -u -r734 -r771 --- BL/EC/WebShop.cls.xml (.../WebShop.cls.xml) (revision 734) +++ BL/EC/WebShop.cls.xml (.../WebShop.cls.xml) (revision 771) @@ -1,12 +1,12 @@ - + Controle van usernaam en wachtwoord + alle bijhorende rechten BL.EC.Common 1 %RegisteredObject -62103,56530.475945 +62124,58035.877573 60207,60266.142855 0 @@ -399,23 +399,13 @@ Else If $LG(List)="OFT" Do . Set LijnID=$LG(List,2) - // [?? RESET BL] - #If $$$Server="CACHE01" . Set oLijn=##class(Flow.Offerte.Lijn).%OpenId(LijnID) - #Else - . Set oLijn=##class(Flow.Offerte.LijnAbstract).%OpenId(LijnID) - #EndIf . Set Row=$LB("WST",,,oLijn.Tekst,oLijn.Tekst,oLijn.GroepKey) Else If $LG(List)="OFM" Do ; Manueel = product niet gevonden . Set Tekst="" . Set LijnID=$LG(List,2) - // [?? RESET BL] - #If $$$Server="CACHE01" . Set oLijn=##class(Flow.Offerte.Lijn).%OpenId(LijnID) - #Else - . Set oLijn=##class(Flow.Offerte.LijnAbstract).%OpenId(LijnID) - #EndIf . If oLijn.ProductGetObjectId()?4.7N Do ; oude webshop met verwijderd product . . $$$AddTekst(""_$$$Translate("WS:Verwijderd product")_" "_oLijn.ProductGetObjectId()_"
",0) . Else Do ; product niet gevonden @@ -435,12 +425,7 @@ Else If $LG(List)="OFP" Do . Set LijnID=$LG(List,2) - // [?? RESET BL] - #If $$$Server="CACHE01" . Set oLijn=##class(Flow.Offerte.Lijn).%OpenId(LijnID) - #Else - . Set oLijn=##class(Flow.Offerte.LijnAbstract).%OpenId(LijnID) - #EndIf . Set PRNr=oLijn.Product.%Id() . Set Datum=$$FormatDateTime^vhLib("d mmm yy",oLijn.LeverDatum,%Taal) . Set Row=$LB("WSP")_%blProduct.ProductElements(PRNr,%KLNr,oLijn.Tekst,"") @@ -1000,5 +985,5 @@ ]]>
- +
FishEye: Tag 771 refers to a dead (removed) revision in file `BL/Flow/Offerte/DocOLD.cls.xml'. FishEye: No comparison available. Pass `N' to diff? Index: BL/Flow/Offerte/ProductGAKader.cls.xml =================================================================== diff -u -r734 -r771 --- BL/Flow/Offerte/ProductGAKader.cls.xml (.../ProductGAKader.cls.xml) (revision 734) +++ BL/Flow/Offerte/ProductGAKader.cls.xml (.../ProductGAKader.cls.xml) (revision 771) @@ -1,17 +1,20 @@ - + 1 %RegisteredObject -60710,31681.251695 +62124,57851.217686 60207,60266.325843 0 Invullend van een lijn als het juist geCreate is -oLijn:Flow.Offerte.LijnAbstract,PRNr:%Integer,Aantal:%Integer +oLijn:Flow.Offerte.Lijn,PRNr:%Integer,Aantal:%Integer + - + Index: Flow/Offerte/LijnTekst.cls.xml =================================================================== diff -u -r734 -r771 --- Flow/Offerte/LijnTekst.cls.xml (.../LijnTekst.cls.xml) (revision 734) +++ Flow/Offerte/LijnTekst.cls.xml (.../LijnTekst.cls.xml) (revision 771) @@ -1,17 +1,16 @@ - + persistent 1 -LijnAbstract -61963,48517.845945 +Lijn +62124,58883.111686 60207,60266.697276 0 %String - @@ -20,28 +19,26 @@ -Maakt een nieuw GAData-object en initialiseert het bijhorende BL-object +Creatie (%New) van een lijn 1 Tekst:%String -Flow.Offerte.LijnAbstract +Flow.Offerte.Lijn - - - - - -Visitor:LijnVisitor - + +Omvorming van een offertelijn naar een order +Implementatie : BL.Flow.Offerte.Convert2Order +OrderNr:%String +%Status + @@ -62,5 +59,5 @@ - +