zoukankan      html  css  js  c++  java
  • 使用代码创建客户

    //创建简单客户
    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("创建成功。");
    }
    

      

  • 相关阅读:
    沃尔玛的问题
    为什么没有“128位”的通用处理器
    用户模式驱动模型(UMDF)简介
    Live Space的谢幕
    Cheap HDD bracket
    让 UV4 支持STC 单片机
    SQLServer 分组查询相邻两条记录的时间差
    ERP采购系统流程
    C++运算符的优先级和结合性
    Entity Framework 4.1延时加载与贪婪加载之我的理解和数据库中如何存入图片
  • 原文地址:https://www.cnblogs.com/sunny-technology/p/11763942.html
Copyright © 2011-2022 走看看