Index: development/models/tax/TAX Configurator,1.0.0.xml =================================================================== diff -u -r1603 -r1621 --- development/models/tax/TAX Configurator,1.0.0.xml (.../TAX Configurator,1.0.0.xml) (revision 1603) +++ development/models/tax/TAX Configurator,1.0.0.xml (.../TAX Configurator,1.0.0.xml) (revision 1621) @@ -5465,47 +5465,66 @@ STATE.SavedAndExit or STATE.SavedAndContinue or (CONFIG.InputMode == "CreateConfig") or (CONFIG.Backend == "axapta") local string _ItemId = ""; +local string _ItemIdOnlies = "9.963.992.8"; local string _ProductieWijze = DATA.Kenmerken.ProductieWijze; local collection _LosseComponenten = {"ZL", "ZR", "B", "R", "F"}; local boolean _IsLosseComponent = DATA.Kenmerken.ProductieWijze in _LosseComponenten; local boolean _IsVolledigeLade = (_ProductieWijze == "V") or (_ProductieWijze == "") or not(_IsLosseComponent); +local boolean _IsZijkant = (_ProductieWijze == "ZL") or (_ProductieWijze == "ZR"); -if (_IsVolledigeLade) then - if (DATA.Kenmerken.VerpakkingType == "V1") then _ItemId = "9.754.358.6" end if; - if (DATA.Kenmerken.VerpakkingType == "Probox") then _ItemId = "9.963.984.8" end if; - if (DATA.Kenmerken.VerpakkingType == "BulkPerOnderdeelGegroepeerd") then _ItemId = "9.261.254.12" end if; - if (DATA.Kenmerken.VerpakkingType == "FlatpackV1") then _ItemId = "9.264.067.15" end if; -else - if (DATA.Kenmerken.VerpakkingType == "LosseComponentenInBulk") then - if (DATA.Kenmerken.LadeKleur <> DATA.Kenmerken.LadeBinnenKleur) then - if (DATA.Kenmerken.ProductieWijze == "ZL") then _ItemId = "9.532.142.12" end if; - if (DATA.Kenmerken.ProductieWijze == "ZR") then _ItemId = "9.532.142.12" end if; - if (DATA.Kenmerken.ProductieWijze == "B") then _ItemId = "7.000.149.2" end if; - if (DATA.Kenmerken.ProductieWijze == "F") then _ItemId = "7.000.151.4" end if; - if (DATA.Kenmerken.ProductieWijze == "R") then _ItemId = "7.000.150.3" end if; - else - local collection _FineerKleuren = {"NE", "NN", "MB", "SY", "ZY", "BE", "XE"}; - local collection _MelamineKleuren = {"E1", "E2", "N1", "S", "W", "XG", "DA", "LA"}; - - local boolean _IsFineer = Data.Kenmerken.LadeKleur in _FineerKleuren; - local boolean _IsMelamine = Data.Kenmerken.LadeKleur in _MelamineKleuren; - - if (_IsFineer and Data.Kenmerken.ProductieWijze == "ZL") then _ItemId = "9.532.126.12" end if; - if (_IsFineer and Data.Kenmerken.ProductieWijze == "ZL") then _ItemId = "9.532.126.12" end if; - if (_IsFineer and Data.Kenmerken.ProductieWijze == "B") then _ItemId = "7.000.156.2" end if; - if (_IsFineer and Data.Kenmerken.ProductieWijze == "F") then _ItemId = "7.000.158.4" end if; - if (_IsFineer and Data.Kenmerken.ProductieWijze == "R") then _ItemId = "7.000.157.3" end if; - - if (_IsMelamine and Data.Kenmerken.ProductieWijze == "ZL") then _ItemId = "9.532.134.12" end if; - if (_IsMelamine and Data.Kenmerken.ProductieWijze == "ZR") then _ItemId = "9.532.134.12" end if; - if (_IsMelamine and Data.Kenmerken.ProductieWijze == "B") then _ItemId = "7.000.152.5" end if; - if (_IsMelamine and Data.Kenmerken.ProductieWijze == "F") then _ItemId = "7.000.154.0" end if; - if (_IsMelamine and Data.Kenmerken.ProductieWijze == "R") then _ItemId = "7.000.153.6" end if; - end if; +if (DATA.Kenmerken.VerpakkingType == "V1") then + if (_IsVolledigeLade) then + _ItemId = "9.754.358.6"; + else + _ItemId = _ItemIdOnlies; end if; end if; +if (DATA.Kenmerken.VerpakkingType == "Probox") then + if (_IsVolledigeLade) then + _ItemId = "9.963.984.8"; + else + _ItemId = _ItemIdOnlies; + end if; +end if; + +if (DATA.Kenmerken.VerpakkingType == "BulkPerOnderdeelGegroepeerd") then + _ItemId = "9.261.254.12"; +end if; + +if (DATA.Kenmerken.VerpakkingType == "FlatpackV1") then + _ItemId = "9.264.067.15"; +end if; + +if (DATA.Kenmerken.VerpakkingType == "Pallet") then + _ItemId = "7.001.225.0"; +end if; + +if (DATA.Kenmerken.VerpakkingType == "LosseComponentenInBulk") then + if (DATA.Kenmerken.LadeKleur <> DATA.Kenmerken.LadeBinnenKleur) then + if _IsZijkant then _ItemId = "9.532.142.12" end if; + if (DATA.Kenmerken.ProductieWijze == "B") then _ItemId = "7.000.149.2" end if; + if (DATA.Kenmerken.ProductieWijze == "F") then _ItemId = "7.000.151.4" end if; + if (DATA.Kenmerken.ProductieWijze == "R") then _ItemId = "7.000.150.3" end if; + else + local collection _FineerKleuren = {"NE", "NN", "MB", "SY", "ZY", "BE", "XE"}; + local collection _MelamineKleuren = {"E1", "E2", "N1", "S", "W", "XG", "DA", "LA"}; + local boolean _IsFineer = Data.Kenmerken.LadeKleur in _FineerKleuren; + local boolean _IsMelamine = Data.Kenmerken.LadeKleur in _MelamineKleuren; + + if (_IsFineer and _IsZijkant) then _ItemId = "9.532.126.12" end if; + if (_IsFineer and Data.Kenmerken.ProductieWijze == "B") then _ItemId = "7.000.156.2" end if; + if (_IsFineer and Data.Kenmerken.ProductieWijze == "F") then _ItemId = "7.000.158.4" end if; + if (_IsFineer and Data.Kenmerken.ProductieWijze == "R") then _ItemId = "7.000.157.3" end if; + + if (_IsMelamine and _IsZijkant) then _ItemId = "9.532.134.12" end if; + if (_IsMelamine and Data.Kenmerken.ProductieWijze == "B") then _ItemId = "7.000.152.5" end if; + if (_IsMelamine and Data.Kenmerken.ProductieWijze == "F") then _ItemId = "7.000.154.0" end if; + if (_IsMelamine and Data.Kenmerken.ProductieWijze == "R") then _ItemId = "7.000.153.6" end if; + end if; +end if; + if (_ItemId == "") then _ItemId = "9.754.358.6" end if; ItemId = _ItemId;