• 使用代码创建客户


    //创建简单客户
    static void CreateSampleCustTable(Args _args)
    {
        CustTable                      customer;
        ContactPerson                  contactPerson;
        CustBankAccount                custBankAccount;
        DirPartyTable                  dirPartyTable;
        AccountNum                     AccountNum;
        ;
        AccountNum = "2019061803";
        customer.clear();
        customer.AccountNum         = AccountNum;
        customer.Blocked            = 0;
        customer.initValue();
        customer.Blocked            =   CustVendorBlocked::No;
        customer.CustGroup          = "10";//客户组
        customer.Currency           = "CNY";//币种
        customer.InclTax            = NoYes::Yes;//包含销售税
        customer.DlvTerm            = "";//交货条款
        customer.DlvMode            = "";//交货方式
        customer.taxGroup           = "No-Tax";//销售税组
        customer.PaymTermId         = "";//付款期限
        customer.PaymMode           = "";//付款方式
        customer.PaymDayId          = "";//付款日
        customer.SalesPoolId        = "";//销售订单池
        customer.BankAccount        = AccountNum;
        customer.DefaultDimension   = 0;
        customer.MainContactWorker  = 0;
        customer.insert();
    
        if (customer.RecId)
        {
            ttsBegin;
            dirPartyTable = DirPartyTable::findRec(customer.Party ,true);
            dirPartyTable.Name          = "客户名称";
            dirPartyTable.LanguageId    = "zh-hans";
            dirPartyTable.NameAlias     = "客户简称";
            dirPartyTable.update();
            ttsCommit;
        }
    
        contactPerson.clear();
        contactPerson.initValue();
        contactPerson.Party = customer.Party;
        contactPerson.initFromCustTable(customer);
        contactPerson.insert();
    
        custBankAccount.clear();
        custBankAccount.initValue();
        custBankAccount.AccountID   =  "AccountID";
        custBankAccount.Name        = "银行账户名称";
        custBankAccount.AccountNum  =  customer.BankAccount;
        custBankAccount.CustAccount = customer.AccountNum;
        custBankAccount.CurrencyCode= customer.Currency;
        custBankAccount.insert();
        info("创建成功。");
    }
    

      

  • 相关阅读:
    项目打包发布到tomcat中,中文出现乱码
    打war包时无法把src/main/java里的xml文件打包上去
    Activemq和Rabbitmq端口冲突
    博客园皮肤炫酷效果
    centos7 ffmpeg安装
    centos7 nginx开启启动
    磁盘满了,找不到占磁盘的文件或者日志
    turn服务部署
    kvm虚拟机配置被克隆rhel6客户机的网卡
    jenkins自动构建
  • 原文地址:https://www.cnblogs.com/sunny-technology/p/11763942.html
Copyright © 2020-2023  润新知