TECH.Mockable AX.common.impl.Formatter 1 AX.common.impl.Validator 1 AX.common.impl.FirmaBepaler 1 DOM.PARTIJ.PartijAPI 1 DOM.VKP.VerkoopAPI 1 DOM.common.Locatie.impl.LandRepository 1 AXimpl.AifMessage.Converter.Utils 1 PartijAPI:DOM.PARTIJ.PartijAPI,VerkoopAPI:DOM.VKP.VerkoopAPI,FirmaBepaler:AX.common.impl.FirmaBepaler 1 1 %Status 1 Command:AXimpl.AifMessage.Request AXaif.Message.MessageParts Id:%String 1 AXaif.Customer.AxdCustomer 1,"Normal","Never") set Custable.Currency = "EUR" set Custable.CustClassificationId = ..ConvertCustClassificationId(Klant) set Custable.CustGroup = ..ConvertCustGroup(Partij,Klant) set Custable.Name = ..Formatter.FormatPartyName(Partij) set Custable.EnterpriseNumber = ..Formatter.FormatEnterpriseNumber(Partij.GeefBTWNr()) set Custable.VATNum = ..Formatter.FormatVATNum(Partij.GeefBTWNr()) Set Custable.CreditMax = $fnumber($Case(Klant.GeefKredietlimiet(),"0":"","1000":"1",:Klant.GeefKredietlimiet()),"",20) set Custable.TaxGroup = ..Utils.ConvertTaxGroup(Klant) set:(Partij.GeefAdres().GeefLandNr()=##class(DOM.common.enu.Land).Nederland()) Custable.ADUTaxRegistrationNumber = ##class(TECH.StringUtils).AlignRight($Extract(##class(TECH.StringUtils).StripAllExceptNumeric(Partij.GeefHandelRegisterNr()),1,8),"0",8) set Custable.WebSalesOrderDisplay = "All" set Custable.PaymTermId = ..Formatter.ConvertPaymTermId(Klant.GeefBetalingwijze(), Klant.GeefBetalingTermijn()) set Custable.PaymMode = ..Formatter.ConvertPaymMode(Klant.GeefBetalingwijze()) set DirParty = ##class(AXaif.Customer.AxdEntityDirPartyDirOrganization).%New() set DirParty.class = "entity" set DirParty.LanguageId = ..Formatter.FormatLanguageId(Partij.GeefTaal()) set DirParty.Name = ..Formatter.FormatPartyName(Partij) set OrganizationName = ##class(AXaif.Customer.AxdEntityOrganizationName).%New() set OrganizationName.class = "entity" set OrganizationName.Name = DirParty.Name do DirParty.OrganizationName.Insert(OrganizationName) Do ..ConvertAndAddPostalAddress(Partij, DirParty) do:$length(Partij.GeefTelefoon1()) DirParty.DirPartyContactInfoView.Insert(..ConvertContactInfo("Telefoon 1",Partij.GeefTelefoon1(),"Phone")) do:$length(Partij.GeefTelefoon2()) DirParty.DirPartyContactInfoView.Insert(..ConvertContactInfo("Telefoon 2",Partij.GeefTelefoon2(),"Phone",$$$IsEmptyString(Partij.GeefTelefoon1()))) do:$length(Partij.GeefGsm()) DirParty.DirPartyContactInfoView.Insert(..ConvertContactInfo("Gsm",Partij.GeefGsm(),"Phone")) do:$length(Partij.GeefTelefax()) DirParty.DirPartyContactInfoView.Insert(..ConvertContactInfo("Fax",Partij.GeefTelefax(),"Fax")) do:$length(Partij.GeefEmail()) DirParty.DirPartyContactInfoView.Insert(..ConvertContactInfo("E-mail",Partij.GeefEmail(),"Email")) do:$length(Partij.GeefWebstek()) DirParty.DirPartyContactInfoView.Insert(..ConvertContactInfo("URL",Partij.GeefWebstek(),"URL")) do Custable.DirParty.Insert(DirParty) do AxKlant.CustTable.Insert(Custable) do ..Validator.Validate(AxKlant) quit AxKlant ]]> Partij:DOM.PARTIJ.Partij,Klant:DOM.VKP.VanHoeckeKlant 1 %Boolean Partij:DOM.PARTIJ.Partij,Klant:DOM.VKP.VanHoeckeKlant 1 LocationName:%String,Locator:%String,Type:%String,IsPrimary:%Boolean=1 1 AXaif.Customer.AxdEntityDirPartyContactInfoView Partij:DOM.PARTIJ.Partij,DirParty:AXaif.Customer.AxdEntityDirPartyDirOrganization 1 AXaif.Customer.AxdEntityDirPartyPostalAddressView Partij:DOM.PARTIJ.Partij 1 Klant:DOM.VKP.VanHoeckeKlant 1 BTWNummer:%String 1 %String