Index: APPS/Halux/PPS/impl/AansturingActie/common/KlantEtiket.cls.xml
===================================================================
diff -u -r59951 -r59955
--- APPS/Halux/PPS/impl/AansturingActie/common/KlantEtiket.cls.xml (.../KlantEtiket.cls.xml) (revision 59951)
+++ APPS/Halux/PPS/impl/AansturingActie/common/KlantEtiket.cls.xml (.../KlantEtiket.cls.xml) (revision 59955)
@@ -6,42 +6,49 @@
1
APPS.Halux.PPS.impl.AansturingActie
+
+APPS.Halux.PPS.impl.AansturingActie.common.KlantEtiket.PrinterFactory
+1
+
+
+
+initvalue:%CacheString
+1
+1
+%Status
+1
+
+
+
BatchID:%String,ActieParameters:%ListOfDataTypes
APPS.Halux.PPS.dto.ActieResultaat
0)
- #dim ToeleveringID As %String = ""
- #dim Dossiercode As %String = ""
- #dim Aantal As %Integer = 1
- If (PrintSpecifiekEtiket) {
- Set ToeleveringID = ActieParameters.GetAt(1)
- Set Dossiercode = ActieParameters.GetAt(2)
- Set Aantal = ActieParameters.GetAt(3)
-
- Do ActieParameters.RemoveAt(3)
- Do ActieParameters.RemoveAt(2)
- Do ActieParameters.RemoveAt(1)
- }
+ #dim Printer As APPS.Halux.PPS.impl.AansturingActie.common.KlantEtiket.Printer = ..PrinterFactory.GeefKlantEtiketPrinter(Batch.GeefCategorie())
- If (Batch.GeefCategorie() = ##class(APPS.Halux.common.enu.Categorie).Kaderdeur()) {
- Set KADPrinter = ##class(APPS.Halux.PPS.impl.AansturingActie.common.KlantEtiket.KAD.Printer).%New()
- Do KADPrinter.PrintKlantEtiketToDropFolder(Batch)
- } elseIf (Batch.GeefCategorie() = ##class(APPS.Halux.common.enu.Categorie).Mat()) {
- Set MatPrinter = ##class(APPS.Halux.PPS.impl.AansturingActie.common.KlantEtiket.Mat.Printer).%New()
- Do MatPrinter.PrintKlantEtiketToDropFolder(Batch)
- } elseIf (Batch.GeefCategorie() = ##class(APPS.Halux.common.enu.Categorie).Inpak()) {
- Set InpakPrinter = ##class(APPS.Halux.PPS.impl.AansturingActie.common.KlantEtiket.Inpak.Printer).%New()
- Do InpakPrinter.PrintKlantEtiketToDropFolder(Batch)
- } elseIf (Batch.GeefCategorie() = ##class(APPS.Halux.common.enu.Categorie).Onbepaald()) {
- Set OnbepaaldPrinter = ##class(APPS.Halux.PPS.impl.AansturingActie.common.KlantEtiket.Onbepaald.Printer).%New()
- Do OnbepaaldPrinter.PrintKlantEtiketToDropFolder(Batch)
- } elseIf (Batch.GeefCategorie() = ##class(APPS.Halux.common.enu.Categorie).ProductOpMaat()) {
- Set ProductOpMaatPrinter = ##class(APPS.Halux.PPS.impl.AansturingActie.common.KlantEtiket.ProductOpMaat.Printer).%New()
- Do ProductOpMaatPrinter.PrintKlantEtiketToDropFolder(Batch)
- } Else {
+ If (Printer.%ClassName(1) = "APPS.Halux.PPS.impl.AansturingActie.common.KlantEtiket.Geen.Printer") {
+
+ #dim PrintSpecifiekEtiket As %Boolean = (ActieParameters.Count() > 0)
+ #dim ToeleveringID As %String = ""
+ #dim Dossiercode As %String = ""
+ #dim Aantal As %Integer = 1
+
+ If (PrintSpecifiekEtiket) {
+ Set ToeleveringID = ActieParameters.GetAt(1)
+ Set Dossiercode = ActieParameters.GetAt(2)
+ Set Aantal = ActieParameters.GetAt(3)
+
+ Do ActieParameters.RemoveAt(3)
+ Do ActieParameters.RemoveAt(2)
+ Do ActieParameters.RemoveAt(1)
+ }
+
#dim KlantEtiketPrinter As APPS.Halux.PPS.impl.AansturingActie.common.KlantEtiket.Template
If (Batch.GeefProductieGroep() = ##class(APPS.Halux.common.enu.ProductieGroep).Kast()) {
Set KlantEtiketPrinter = ##class(APPS.Halux.PPS.impl.AansturingActie.common.KlantEtiket.MaatwerkInVHOSSEtiketPrinter).%New()
@@ -56,7 +63,9 @@
Do KlantEtiketPrinter.PrintKlantEtiket(Batch, PrintSpecifiekEtiket, ToeleveringID, Dossiercode, Aantal)
Set ..ResultaatOpmerking = KlantEtiketPrinter.GeefResultaatOmschrijving()
- }
+ } Else {
+ Do Printer.PrintKlantEtiketToDropFolder(Batch)
+ }
Quit ..GeefGeslaagdAansturingResultaat()
]]>
@@ -102,6 +111,14 @@
%Library.CacheStorage
+KlantEtiketDefaultData
+
+listnode
+"KlantEtiket"
+
+PrinterFactory
+
+