金蝶eas税率更新为16%相关功能点

本文介绍金蝶EAS系统中税率从17%、11%和13%分别下调至16%、10%和11%的具体操作步骤。包括数据库表的更新、全局变量的统一设置及单据BeanEx中的税率获取方法优化。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

第一点、数据库的调整

主要涉及到的表有Customer客户和Supplier供应商表,然后物料销售属性MaterialSales 表

--金蝶eas税率更新(17->16,11->10,13->11)
update T_BD_Customer set FTAXRATE = 16 where FTAXRATE = 17;
update T_BD_Supplier set FTAXRATE = 16 where FTAXRATE = 17'
update T_BD_Supplier set FTAXRATE = 10 where FTAXRATE = 11'
update T_BD_Supplier set FTAXRATE = 11 where FTAXRATE = 13'
update T_BD_MaterialSales set  FTAXRATE = 16 where FTAXRATE = 17'

第二点,统一全局变量

public class BizUIHelper
{
    /** 税率(%)默认值 */
    public static BigDecimal DefaultTaxRate = new BigDecimal("17.00");
    /**
     * 获取供应商税率 for beanEx
     */
    public static BigDecimal getTaxRateBySupplier(Context ctx,String customerId) throws BOSException, EASBizException
    {
        FilterInfo filter = new FilterInfo();
        FilterItemCollection fic = filter.getFilterItems();
        fic.add(new FilterItemInfo("id", customerId));
        SelectorItemCollection sic = new SelectorItemCollection();
        sic.add("id");
        sic.add("number");
        sic.add("name");
        sic.add("taxRate");
        EntityViewInfo view = new EntityViewInfo();
        view.setFilter(filter);
        view.setSelector(sic);
        ISupplier ic = SupplierFactory.getLocalInstance(ctx);
        SupplierCollection customerCol = ic.getSupplierCollection(view);
        if (customerCol == null || customerCol.isEmpty()) {
            return DefaultTaxRate;
        }
        SupplierInfo customer = customerCol.get(0);
        if(customer.getTaxRate()==null){return DefaultTaxRate;}
        BigDecimal taxRate = getBigDecimal(customer.getTaxRate());
        return taxRate;
    }
    /**
     * 检测是否关联方客户relatedCustomer
     * @author zhengkai
     */
    public static boolean checkIsRelatedCustomer(CustomerInfo cusInfo){
        boolean isRelatedCustomer=false;
        CtrlUnitInfo ctrInfo = SysContext.getSysContext().getCurrentCtrlUnit();
        if (ctrInfo != null && cusInfo != null &&cusInfo.getId()!=null ) {
            SelectorItemCollection sic = new SelectorItemCollection();
            sic.add("id");
            sic.add("number");
            sic.add("name");
            sic.add("relatedCustomer");

            EntityViewInfo view = new EntityViewInfo();
            view.setSelector(sic);
            FilterInfo filter = new FilterInfo();
            filter.getFilterItems().add(new FilterItemInfo("id",cusInfo.getId().toString(),CompareType.INCLUDE));
            view.setFilter(filter);
            CustomerCollection customerList=null;
            try {
                customerList = CustomerFactory.getRemoteInstance().getCustomerCollection(view);
            } catch (BOSException e) {
                e.printStackTrace();
            }
            if(customerList!=null&&customerList.size()>0){
                isRelatedCustomer = customerList.get(0).getBoolean("relatedCustomer");
            }
        }
        return isRelatedCustomer;
    }
}

第三步,在所有单据beanEx里面调用方法

/** 提交 */
protected IObjectPK _submit(Context ctx, IObjectValue model) throws BOSException, EASBizException
{
    SaleOrderInfo orderInfo = (SaleOrderInfo) model;
    try {
        //2018-01-10 zhengkai 优化税率获取计算
        if(orderInfo.getOrderCustomer()!=null){
        BigDecimal customerTaxRate = BizUIHelper.getTaxRateByCustomer2(ctx,orderInfo.getOrderCustomer().getId()+"");
            for (int i = 0; i < orderInfo.getEntries().size(); i++) {
                orderInfo.getEntries().get(i).setTaxRate(customerTaxRate);
            }
        }
    } catch (Exception e) {
        e.printStackTrace();
    }
}

第四步、检查缺漏的地方

例如是否有外围单据导入,设置为默认税率等

//分录设置默认税率
entry.setTaxRate(taxRate);

以后有什么修改的地方,可以统一修改工具类就可以了。至于税率的获取逻辑各个公司各不相同,根据实际情况设置即可。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值