/// <summary>
        /// 按最新价格重新核算出库单明细价格和头表金额
        /// </summary>
        /// <param name="outMaster">出库单表头</param>
        /// <param name="billOrder">出库单明细列表</param>
        /// <param name="belongSystem">所属系统(药房系统,药库系统)</param>
        protected void AuditPrice(YP_OutMaster outMaster, List <YP_OutOrder> billOrder, string belongSystem)
        {
            outMaster.RetailFee = 0;
            outMaster.TradeFee  = 0;
            outMaster.OutFee    = 0;
            foreach (YP_OutOrder order in billOrder)
            {
                YP_MakerDic makerDic = BindEntity <YP_MakerDic> .CreateInstanceDAL(oleDb).GetModel(order.MakerDicID);

                if (makerDic.RetailPrice != order.RetailPrice || makerDic.TradePrice != order.TradePrice)
                {
                    order.RetailPrice = makerDic.RetailPrice;
                    order.TradePrice  = makerDic.TradePrice;
                    if (belongSystem == ConfigManager.YF_SYSTEM)
                    {
                        order.RetailFee = AccountWriter.YF_ComputeTotalFee(order.RetailPrice, order.OutNum, order.UnitNum);
                        order.TradeFee  = AccountWriter.YF_ComputeTotalFee(order.TradePrice, order.OutNum, order.UnitNum);
                    }
                    else
                    {
                        order.RetailFee = AccountWriter.YK_ComputeTotalFee(order.RetailPrice, order.OutNum);
                        order.TradeFee  = AccountWriter.YK_ComputeTotalFee(order.TradePrice, order.OutNum);
                    }
                }
                outMaster.RetailFee += order.RetailFee;
                outMaster.TradeFee  += order.TradeFee;
                outMaster.OutFee    += order.RetailFee;
            }
        }
Beispiel #2
0
 /// <summary>
 /// 计算余额
 /// </summary>
 /// <param name="account">台帐信息</param>
 protected override void ComputeFee(YP_Account account)
 {
     if (account.OpType == ConfigManager.OP_YF_ADJPRICE)
     {
         account.BalanceFee = AccountWriter.YF_ComputeTotalFee(account.RetailPrice, account.OverNum, account.UnitNum);
     }
     else
     {
         account.BalanceFee = AccountWriter.YK_ComputeTotalFee(account.RetailPrice, account.OverNum);
     }
 }
Beispiel #3
0
 /// <summary>
 /// 计算余额
 /// </summary>
 /// <param name="account">台帐信息</param>
 protected override void ComputeFee(YP_Account account)
 {
     account.BalanceFee = AccountWriter.YK_ComputeTotalFee(account.RetailPrice, account.OverNum);
 }