Index: BL/MB/UGLYPicking/Receptie.cls.xml =================================================================== diff -u -r20031 -r20080 --- BL/MB/UGLYPicking/Receptie.cls.xml (.../Receptie.cls.xml) (revision 20031) +++ BL/MB/UGLYPicking/Receptie.cls.xml (.../Receptie.cls.xml) (revision 20080) @@ -153,6 +153,12 @@ Set SEP=..#bfrSEP Set ProdIsInKOM=0 + // Enkele variabelen om de code makkelijker te kunnen volgen ... :-P + New ZonderToeleveringBeperking,MetToeleveringBeperking,GebruikDeelAantalVanDezeToelevering + Set ZonderToeleveringBeperking = (UseThisTLNr="") + Set MetToeleveringBeperking = ($$$Not(ZonderToeleveringBeperking)) + Set GebruikDeelAantalVanDezeToelevering = (MetToeleveringBeperking && ($$$Not(GebruikTotaalAantalIndienUseThisTLNr))) + //--------------------------------------------------------------------------------------------- // 1.A Bestaat ^TO("IP",ProductNr)? //--------------------------------------------------------------------------------------------- @@ -179,15 +185,15 @@ If LijnNr'=0 Do - . If ((UseThisTLNr="") || ((UseThisTLNr'="") && 'GebruikTotaalAantalIndienUseThisTLNr)) Do ;Bufferlijn bestaat reeds, geen assoc toeleveringsnummer meegegeven, inhoud van de lijn gewoon +1 + . If ( ZonderToeleveringBeperking || (MetToeleveringBeperking && GebruikDeelAantalVanDezeToelevering)) Do ;Bufferlijn bestaat reeds, geen assoc toeleveringsnummer meegegeven, inhoud van de lijn gewoon +1 .. Set Status=..INCBufferQty(bfrRGID,bfrVolgNr,LijnNr) .. If $LI(Status)=1 Do ;Indien status=2 => dan is de toelevering reeds afgewerkt ... New Rec ... Set Rec=^UPRCP("B",bfrRGID,bfrVolgNr,LijnNr) ... Set $P(Rec,SEP,$$$bsnScanTime)=$H ;ScanTime opnieuw instellen... ... Set ^UPRCP("B",bfrRGID,bfrVolgNr,LijnNr)=Rec - .. Set:(($LI(Status)>0) && (UseThisTLNr="")) Status=$LB(2,"Product '"_ProductNr_"' succesvol ingescand. "_$LI(Status,2)) - .. Set:(($LI(Status)>0) && ((UseThisTLNr'="") && 'GebruikTotaalAantalIndienUseThisTLNr)) Status=$LB(0) + .. Set:(($LI(Status)>0) && (ZonderToeleveringBeperking)) Status=$LB(2,"Product '"_ProductNr_"' succesvol ingescand. "_$LI(Status,2)) + .. Set:(($LI(Status)>0) && (GebruikDeelAantalVanDezeToelevering)) Status=$LB(0) . Else Do ;Bufferlijn bestaat reeds, assoc toeleveringsnummer opgegeven, lijn op maximum scanaantal instellen .. New TotalQty .. Set TotalQty=..GetTotalQtyViaProdNr(ProductNr,UseThisTLNr) @@ -207,7 +213,7 @@ Set ProdIsInKOM=0, ErrorList="" ; ===[ NODE 3: TLNr ]=== - If UseThisTLNr="" Do + If ZonderToeleveringBeperking Do . New tmpStatus,TLNr . Set TLNr="" . For Set TLNr=$O(^TO("IP",ProductNr,TLNr)) Quit:(TLNr="") Do @@ -225,7 +231,7 @@ Quit $LB(3,"Het bestelde aantal voor de toelevering is volledig gescand.") } ;De Qty die initieel in de buffer komt te staan (zelf opgegeven, TLNr aanwezig->TotalQty, anders 1) - Set StartQty=$G(StartQty,$S(UseThisTLNr="":1,1:TotalQty-QtyDone)) + Set StartQty=$G(StartQty,$S(ZonderToeleveringBeperking:1,1:TotalQty-QtyDone)) Quit:(StartQty<0) $LB(-5,"Interne fout: starthoeveelheid("_StartQty_") is kleiner dan nul.") Quit:(StartQty>TotalQty) $LB(-6,"Interne fout: starthoeveelheid("_StartQty_") is groter dan aantal in toeleveringen("_TotalQty_").") @@ -234,11 +240,11 @@ Quit:(AantalToeleveringenFound=0) $LB(-3,"Product '"_ProductNr_"' heeft toeleveringen, maar deze kunnen niet verwerkt worden met dit programma (ongeldige leverancier(s)).") /// JBL, sorry voor de commentaar, maar ik denk dat hier gebeurd : - /// SITUATIE 1 : + /// SITUATIE 1 : (ZonderToeleveringBeperking) /// UseThisTLNr = "" /// Dan wordt hier een nieuwe lijn in buffer aangemaakt als het product er nog niet in zat. /// - /// SITUATIE 2 : + /// SITUATIE 2 : (MetToeleveringBeperking) ///; - UseThisTLNr = ToeleveringsNr ; Enkel het product (met ProductNr) van de toelevering (met UseThisTLNr) wordt toegevoegd, ; dit met maximaal aantal @@ -249,7 +255,7 @@ /// Onderstaande code mag dus vanaf heden enkel uitgevoerd worden als /// - UseThisTLNr ingevuld is /// - GebruikTotaalAantalIndienUseThisTLNr = 1 - If ((UseThisTLNr = "") || ((UseThisTLNr '= "") && GebruikTotaalAantalIndienUseThisTLNr)) { + If ((ZonderToeleveringBeperking) || (MetToeleveringBeperking && GebruikTotaalAantalIndienUseThisTLNr)) { ;AllesOK: Aan buffer toevoegen New Rec,LijnNr Set Rec=ProductNr_SEP_Dossier_SEP_PalletID_SEP_Locatie_SEP_StartQty_SEP_$H_SEP_UserID_SEP_$G(UseThisTLNr)