Пример #1
0
        public CostChangeInfo UpdateCostChange(CostChangeInfo costChangeInfo)
        {
            CostChangeInfo returnEntity = costChangeInfo;
            DataCommand    command      = DataCommandManager.GetDataCommand("UpdateCostChangeMaster");

            command.SetParameterValue("@CCSysNo", costChangeInfo.SysNo);
            command.SetParameterValue("@VendorSysNo", costChangeInfo.CostChangeBasicInfo.VendorSysNo);
            command.SetParameterValue("@PMSysNo", costChangeInfo.CostChangeBasicInfo.PMSysNo);
            command.SetParameterValue("@EditUser", costChangeInfo.CostChangeBasicInfo.EditUser);
            command.SetParameterValue("@Memo", costChangeInfo.CostChangeBasicInfo.Memo);
            command.SetParameterValue("@TotalDiffAmt", costChangeInfo.CostChangeBasicInfo.TotalDiffAmt);
            command.ExecuteNonQuery();

            if (costChangeInfo.CostChangeItems != null && costChangeInfo.CostChangeItems.Count > 0)
            {
                foreach (CostChangeItemsInfo item in costChangeInfo.CostChangeItems)
                {
                    if (item.ItemActionStatus == ItemActionStatus.Update)//更新
                    {
                        command = DataCommandManager.GetDataCommand("UpdateCostChangeItem");

                        command.SetParameterValue("@ItemSysNo", item.ItemSysNo.Value);
                        command.SetParameterValue("@NewPrice", item.NewPrice);
                        command.SetParameterValue("@ChangeCount", item.ChangeCount);
                        command.ExecuteNonQuery();
                    }
                    else if (item.ItemActionStatus == ItemActionStatus.Add) //新建
                    {
                        CreateCostChangeItemInfo(item, costChangeInfo.SysNo.Value);
                    }
                }
            }

            return(costChangeInfo);
        }
Пример #2
0
        /// <summary>
        /// 更新成本变价单信息
        /// </summary>
        /// <param name="info"></param>
        /// <param name="callbadk"></param>
        public void UpdateCostChangeInfo(CostChangeInfo info, EventHandler <RestClientEventArgs <CostChangeInfo> > callback)
        {
            info.CompanyCode = CPApplication.Current.CompanyCode;
            string relativeUrl = "POService/CostChange/UpdateCostChange";

            restClient.Update <CostChangeInfo>(relativeUrl, info, callback);
        }
Пример #3
0
        /// <summary>
        /// 审核通过成本变价单信息
        /// </summary>
        /// <param name="costChangeInfo"></param>
        /// <returns></returns>
        public virtual CostChangeInfo AuditCostChange(CostChangeInfo costChangeInfo)
        {
            TransactionOptions option = new TransactionOptions();

            //option.IsolationLevel = IsolationLevel.ReadUncommitted;
            option.Timeout = TransactionManager.DefaultTimeout;
            using (TransactionScope ts = new TransactionScope(TransactionScopeOption.Required, option))
            {
                costChangeInfo.CostChangeBasicInfo.Status = CostChangeStatus.Audited;
                //修改单据状态
                costChangeInfo = CostChangeDA.UpdateCostChangeAuditStatus(costChangeInfo);
                //调用Inventory接口:更新库存成本
                ExternalDomainBroker.UpdateCostInWhenCostChange(costChangeInfo);
                //调用Invoice接口:生成结算单的付款单
                ExternalDomainBroker.CreatePayItem(new PayItemInfo()
                {
                    OrderSysNo  = costChangeInfo.SysNo.Value,
                    PayAmt      = costChangeInfo.CostChangeBasicInfo.TotalDiffAmt,
                    OrderType   = PayableOrderType.CostChange,
                    PayStyle    = PayItemStyle.Normal,
                    CompanyCode = costChangeInfo.CompanyCode
                });

                //记录日志
                ExternalDomainBroker.CreateLog("Audit CostChange"
                                               , BizEntity.Common.BizLogType.CostChange_Audit
                                               , costChangeInfo.SysNo.Value, costChangeInfo.CompanyCode);
                ts.Complete();
            }

            return(costChangeInfo);
        }
Пример #4
0
        private CostChangeInfo BuildVMToEntity()
        {
            CostChangeInfo info = EntityConverter <CostChangeInfoVM, CostChangeInfo> .Convert(newChangeInfoVM, (s, t) =>
            {
                t.CostChangeBasicInfo.VendorSysNo = s.CostChangeBasicInfo.VendorSysNo.Value;
                t.CostChangeBasicInfo.PMSysNo     = s.CostChangeBasicInfo.PMSysNo.Value;
                t.CostChangeBasicInfo.Memo        = s.CostChangeBasicInfo.Memo;
                t.CostChangeItems = new List <CostChangeItemsInfo>();

                foreach (CostChangeItemInfoVM changeItem in s.CostChangeItems)
                {
                    t.CostChangeItems.Add(
                        new CostChangeItemsInfo()
                    {
                        ProductSysNo     = changeItem.ProductSysNo.Value,
                        POSysNo          = changeItem.POSysNo.Value,
                        OldPrice         = changeItem.OldPrice.Value,
                        NewPrice         = Convert.ToDecimal(changeItem.NewPrice),
                        ChangeCount      = Convert.ToInt32(changeItem.ChangeCount),
                        CompanyCode      = changeItem.CompanyCode,
                        ItemActionStatus = ItemActionStatus.Add
                    }
                        );
                }
            });

            return(info);
        }
Пример #5
0
        /// <summary>
        /// 创建成本变价单
        /// </summary>
        /// <param name="costChangeInfo">成本变价单Entity</param>
        /// <returns></returns>
        public virtual CostChangeInfo CreateCostChange(CostChangeInfo costChangeInfo)
        {
            #region [Check 实体逻辑]
            //VerifyCreate(consignSettleInfo);
            //VerifySettleItems(consignSettleInfo, SettlementVerifyType.CREATE);
            #endregion

            decimal totalDiffAmt = 0;
            using (TransactionScope scope = new TransactionScope())
            {
                costChangeInfo.CostChangeItems.ForEach(delegate(CostChangeItemsInfo ItemInfo)
                {
                    totalDiffAmt += (ItemInfo.NewPrice - ItemInfo.OldPrice) * ItemInfo.ChangeCount;
                });

                costChangeInfo.CostChangeBasicInfo.InUser       = ServiceContext.Current.UserSysNo;
                costChangeInfo.CostChangeBasicInfo.Status       = CostChangeStatus.Created;
                costChangeInfo.CostChangeBasicInfo.TotalDiffAmt = totalDiffAmt;
                costChangeInfo = CostChangeDA.CreateCostChange(costChangeInfo);

                //写日志
                ExternalDomainBroker.CreateLog("Create CostChange"
                                               , BizEntity.Common.BizLogType.CostChange_Create
                                               , costChangeInfo.SysNo.Value, costChangeInfo.CompanyCode);

                scope.Complete();
            }

            return(costChangeInfo);
        }
Пример #6
0
        public CostChangeInfo UpdateCostChangeStatus(CostChangeInfo costChangeInfo)
        {
            CostChangeInfo returnEntity = costChangeInfo;
            DataCommand    commandItem  = DataCommandManager.GetDataCommand("UpdateCostChangeStatus");

            commandItem.SetParameterValue("@CCSysNo", costChangeInfo.SysNo);
            commandItem.SetParameterValue("@Status", (int)costChangeInfo.CostChangeBasicInfo.Status);
            commandItem.ExecuteNonQuery();
            return(costChangeInfo);
        }
Пример #7
0
        /// <summary>
        /// 成本变价单更新库存成本
        /// </summary>
        /// <param name="costChangeInfo"></param>
        /// <returns></returns>
        public virtual void UpdateCostInWhenCostChange(CostChangeInfo costChangeInfo)
        {
            //预校验
            if (!PreCheck(costChangeInfo))
            {
                throw new BizException("存在有效库存成本数量不够变价数量的商品,无法审核通过!");
            }

            TransactionOptions option = new TransactionOptions();

            //option.IsolationLevel = System.Transactions.IsolationLevel.ReadUncommitted;
            option.Timeout = TransactionManager.DefaultTimeout;
            using (TransactionScope tran = new TransactionScope(TransactionScopeOption.Required, option))
            {
                string msg = SerializationUtility.XmlSerialize(costChangeInfo);
                productInventoryDA.WriteCostLog((int)ECCentral.BizEntity.Inventory.InventoryAdjustContractInfo.CostBillType.CostAdjust, costChangeInfo.SysNo.Value, msg);

                List <ProductCostIn>  ProductCostInList  = new List <ProductCostIn>();
                List <ProductCostOut> ProductCostOutList = new List <ProductCostOut>();
                ProductCostIn         costIn;
                ProductCostOut        costout;
                foreach (CostChangeItemsInfo item in costChangeInfo.CostChangeItems)
                {
                    costout = new ProductCostOut
                    {
                        Quantity     = item.ChangeCount,
                        Cost         = item.OldPrice,
                        BillSysNo    = item.POSysNo,
                        BillType     = (int)ECCentral.BizEntity.Inventory.InventoryAdjustContractInfo.CostBillType.PO,
                        ProductSysNo = item.ProductSysNo
                    };
                    ProductCostOutList.Add(costout);
                    if (item.ChangeCount > 0)   //库存溢出表示为入库
                    {
                        costIn              = new ProductCostIn();
                        costIn.BillType     = (int)ECCentral.BizEntity.Inventory.InventoryAdjustContractInfo.CostBillType.CostAdjust;
                        costIn.BillSysNo    = costChangeInfo.SysNo.Value;
                        costIn.Quantity     = item.ChangeCount;
                        costIn.LeftQuantity = item.ChangeCount;
                        costIn.LockQuantity = 0;
                        costIn.ProductSysNo = item.ProductSysNo;
                        costIn.Cost         = item.NewPrice;
                        ProductCostInList.Add(costIn);
                    }
                }

                //先出
                productInventoryDA.UpdateProductCostForCostChange(ProductCostOutList);
                //后进
                productInventoryDA.WriteProductCost(ProductCostInList);

                tran.Complete();
            }
        }
Пример #8
0
        public CostChangeInfo UpdateCostChangeAuditStatus(CostChangeInfo costChangeInfo)
        {
            CostChangeInfo returnEntity = costChangeInfo;
            DataCommand    commandItem  = DataCommandManager.GetDataCommand("UpdateCostChangeAuditStatus");

            commandItem.SetParameterValue("@CCSysNo", costChangeInfo.SysNo);
            commandItem.SetParameterValue("@AuditUser", ServiceContext.Current.UserSysNo);
            commandItem.SetParameterValue("@AuditMemo", costChangeInfo.CostChangeBasicInfo.AuditMemo);
            commandItem.SetParameterValue("@Status", (int)costChangeInfo.CostChangeBasicInfo.Status);
            commandItem.ExecuteNonQuery();
            return(costChangeInfo);
        }
Пример #9
0
        /// <summary>
        /// 加载成本变价单详细
        /// </summary>
        /// <param name="settlementSysNo"></param>
        /// <returns></returns>
        public virtual CostChangeInfo LoadCostChangeInfo(int ccSysNo)
        {
            CostChangeInfo      returnEntity = new CostChangeInfo();
            CostChangeBasicInfo baseInfo     = CostChangeDA.LoadCostChangeBasicInfo(ccSysNo);

            if (null != baseInfo && baseInfo.SysNo > 0)
            {
                returnEntity.SysNo = ccSysNo;
                returnEntity.CostChangeBasicInfo = baseInfo;
                returnEntity.CostChangeItems     = CostChangeDA.LoadCostChangeItemList(baseInfo.SysNo);
            }
            return(returnEntity);
        }
Пример #10
0
        /// <summary>
        /// 审核拒绝并退回成本变价单信息
        /// </summary>
        /// <param name="costChangeInfo"></param>
        /// <returns></returns>
        public virtual CostChangeInfo RefuseCostChange(CostChangeInfo costChangeInfo)
        {
            using (TransactionScope ts = new TransactionScope())
            {
                costChangeInfo.CostChangeBasicInfo.Status = CostChangeStatus.Created;
                costChangeInfo = CostChangeDA.UpdateCostChangeAuditStatus(costChangeInfo);
                //记录日志
                ExternalDomainBroker.CreateLog("Refuse CostChange"
                                               , BizEntity.Common.BizLogType.CostChange_Refuse
                                               , costChangeInfo.SysNo.Value, costChangeInfo.CompanyCode);
                ts.Complete();
            }

            return(costChangeInfo);
        }
Пример #11
0
        /// <summary>
        /// 作废
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnVoid_Click(object sender, RoutedEventArgs e)
        {
            CostChangeInfo costChangeInfo = BuildVMToEntity();

            costChangeInfo.CostChangeBasicInfo.Status = CostChangeStatus.Abandoned;
            serviceFacade.AbandonCostChange(costChangeInfo, (obj2, args2) =>
            {
                if (args2.FaultsHandle())
                {
                    Window.Alert(ResCostChangeMaintain.AlertMsg_VoidCCFailed);
                    return;
                }

                AlertAndRefreshPage(ResCostChangeMaintain.Msg_VoidCCSuc);
            });
        }
Пример #12
0
        private void btnCreateCostChange_Click(object sender, RoutedEventArgs e)
        {
            if (!ValidationManager.Validate(this) || !CheckVM())
            {
                return;
            }

            CostChangeInfo info = BuildVMToEntity();

            int ItemsCount = info.CostChangeItems.Where(i => i.ItemActionStatus != ItemActionStatus.Delete).Count();

            if (ItemsCount == 0)
            {
                Window.Alert(ResCostChangeMaintain.AlertMsg_NoAvaliableItem);
                return;
            }

            info.CostChangeBasicInfo.Status = CostChangeStatus.Created;
            ////保存PM高级权限,用于业务端验证
            //info.PurchaseOrderBasicInfo.IsManagerPM = AuthMgr.HasFunctionAbsolute(AuthKeyConst.PO_SeniorPM_Query);
            serviceFacade.CreateCostChange(info, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                if (args.Result.SysNo.HasValue)
                {
                    Window.Alert(ResCostChangeNew.Msg_Title, ResCostChangeNew.Msg_CreateCCSuc, MessageType.Information, (objj, argss) =>
                    {
                        if (argss.DialogResult == DialogResultType.Cancel)
                        {
                            Window.Navigate(string.Format("/ECCentral.Portal.UI.PO/CostChangeMaintain/{0}", args.Result.SysNo.Value), true);
                        }
                    });
                }
                else
                {
                    Window.Alert(ResCostChangeNew.AlertMsg_CreateCCFailed);
                    return;
                }
            });
        }
Пример #13
0
        /// <summary>
        /// 更新成本变价单信息
        /// </summary>
        /// <param name="costChangeInfo"></param>
        /// <returns></returns>
        public virtual CostChangeInfo UpdateCostChange(CostChangeInfo costChangeInfo)
        {
            #region [Check更新实体逻辑]

            //VerifyCreate(costChangeInfo);

            #endregion [Check更新实体逻辑]

            List <CostChangeItemsInfo> deleteList = new List <CostChangeItemsInfo>();
            decimal totalDiffAmt = 0;
            using (TransactionScope ts = new TransactionScope())
            {
                deleteList = costChangeInfo.CostChangeItems.Where(item => item.ItemActionStatus == ItemActionStatus.Delete).ToList();
                if (deleteList.Count > 0)
                {
                    deleteList.ForEach(delegate(CostChangeItemsInfo deleteItemInfo)
                    {
                        // 删除Item:
                        CostChangeDA.DeleteCostChangeItems(deleteItemInfo);
                        //将删除的Item从List中去掉:
                        costChangeInfo.CostChangeItems.Remove(deleteItemInfo);
                    });
                }

                costChangeInfo.CostChangeItems.ForEach(delegate(CostChangeItemsInfo ItemInfo)
                {
                    totalDiffAmt += (ItemInfo.NewPrice - ItemInfo.OldPrice) * ItemInfo.ChangeCount;
                });

                costChangeInfo.CostChangeBasicInfo.EditUser     = ServiceContext.Current.UserSysNo;
                costChangeInfo.CostChangeBasicInfo.TotalDiffAmt = totalDiffAmt;
                costChangeInfo = CostChangeDA.UpdateCostChange(costChangeInfo);
                //记录日志
                ExternalDomainBroker.CreateLog("Update CostChange"
                                               , BizEntity.Common.BizLogType.CostChange_Update
                                               , costChangeInfo.SysNo.Value, costChangeInfo.CompanyCode);
                ts.Complete();
            }

            return(costChangeInfo);
        }
Пример #14
0
        /// <summary>
        /// 创建成本变价单
        /// </summary>
        /// <param name="info"></param>
        /// <param name="callback"></param>
        public void CreateCostChange(CostChangeInfo info, EventHandler <RestClientEventArgs <CostChangeInfo> > callback)
        {
            info.CompanyCode = CPApplication.Current.CompanyCode;
            if (info.CostChangeBasicInfo == null)
            {
                info.CostChangeBasicInfo = new CostChangeBasicInfo();
            }
            if (null == info.CostChangeItems)
            {
                info.CostChangeItems = new List <CostChangeItemsInfo>();
            }
            info.CostChangeItems.ForEach(x =>
            {
                x.CompanyCode = CPApplication.Current.CompanyCode;
            });
            info.CostChangeBasicInfo.InUser = CPApplication.Current.LoginUser.UserSysNo;

            string relativeUrl = "POService/CostChange/CreateCostChange";

            restClient.Update <CostChangeInfo>(relativeUrl, info, callback);
        }
Пример #15
0
        /// <summary>
        /// 审核拒绝(退回)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnDeny_Click(object sender, RoutedEventArgs e)
        {
            CostChangeInfo costChangeInfo = BuildVMToEntity();

            if (string.IsNullOrEmpty(ChangeInfoVM.CostChangeBasicInfo.AuditMemo))
            {
                Window.Alert(ResCostChangeMaintain.AlertMsg_AuditMemoEmpty);
                return;
            }

            costChangeInfo.CostChangeBasicInfo.Status = CostChangeStatus.Created;
            serviceFacade.RefuseCostChange(costChangeInfo, (obj2, args2) =>
            {
                if (args2.FaultsHandle())
                {
                    Window.Alert(ResCostChangeMaintain.AlertMsg_DenyCCFailed);
                    return;
                }

                AlertAndRefreshPage(ResCostChangeMaintain.Msg_DenyCCSuc);
            });
        }
Пример #16
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnSaveCostChange_Click(object sender, RoutedEventArgs e)
        {
            if (!ValidationManager.Validate(this) || !CheckVM())
            {
                return;
            }

            CostChangeInfo info       = BuildVMToEntity();
            int            ItemsCount = info.CostChangeItems.Where(i => i.ItemActionStatus != ItemActionStatus.Delete).Count();

            if (ItemsCount == 0)
            {
                Window.Alert(ResCostChangeMaintain.AlertMsg_NoAvaliableItem);
                return;
            }

            ////保存PM高级权限,用于业务端验证
            //info.PurchaseOrderBasicInfo.IsManagerPM = AuthMgr.HasFunctionAbsolute(AuthKeyConst.PO_SeniorPM_Query);
            serviceFacade.UpdateCostChangeInfo(info, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                if (args.Result.SysNo.HasValue)
                {
                    Window.Alert(ResCostChangeMaintain.Msg_Title, ResCostChangeMaintain.Msg_SaveCCSuc, MessageType.Information, (objj, argss) =>
                    {
                        LoadCostChangeInfo();
                    });
                }
                else
                {
                    Window.Alert(ResCostChangeMaintain.AlertMsg_SaveCCFailed);
                    return;
                }
            });
        }
Пример #17
0
        public CostChangeInfo CreateCostChange(CostChangeInfo costChangeInfo)
        {
            DataCommand command = DataCommandManager.GetDataCommand("CreateCostChange");

            command.SetParameterValue("@VendorSysNo", costChangeInfo.CostChangeBasicInfo.VendorSysNo);
            command.SetParameterValue("@PMSysNo", costChangeInfo.CostChangeBasicInfo.PMSysNo);
            command.SetParameterValue("@Status", (int)costChangeInfo.CostChangeBasicInfo.Status);
            command.SetParameterValue("@Memo", costChangeInfo.CostChangeBasicInfo.Memo);
            command.SetParameterValue("@InUser", costChangeInfo.CostChangeBasicInfo.InUser);
            command.SetParameterValue("@TotalDiffAmt", costChangeInfo.CostChangeBasicInfo.TotalDiffAmt);
            command.SetParameterValue("@CompanyCode", "8601");
            costChangeInfo.SysNo = Convert.ToInt32(command.ExecuteScalar());

            if (costChangeInfo.CostChangeItems != null && costChangeInfo.CostChangeItems.Count > 0)
            {
                foreach (CostChangeItemsInfo item in costChangeInfo.CostChangeItems)
                {
                    CreateCostChangeItemInfo(item, costChangeInfo.SysNo.Value);
                }
            }

            return(costChangeInfo);
        }
Пример #18
0
        public void BuildData(System.Collections.Specialized.NameValueCollection requestPostData, out KeyValueVariables variables, out KeyTableVariables tableVariables)
        {
            variables      = new KeyValueVariables();
            tableVariables = new KeyTableVariables();

            CostChangeAppService CostChangeAppServiceInstance = ObjectFactory <CostChangeAppService> .Instance;

            //获取参数
            string costChangeSysNoStr = requestPostData["CostChangeSysNo"];
            int    costChangeSysNo    = int.Parse(costChangeSysNoStr);

            CostChangeInfo costChangeInfo = CostChangeAppServiceInstance.LoadCostChangeInfo(costChangeSysNo);

            //变价单编号
            variables.AddKeyValue("CostChangeinfoSysNo", costChangeInfo.SysNo.Value.ToString());
            //合同号
            variables.AddKeyValue("ContractNo", "");

            //供应商
            VendorAppService VendorAppServiceInstance = ObjectFactory <VendorAppService> .Instance;

            var        vendorNo   = costChangeInfo.CostChangeBasicInfo.VendorSysNo;
            VendorInfo vendorInfo = VendorAppServiceInstance.LoadVendorInfoBySysNo(vendorNo);
            var        vendorName = vendorInfo.VendorBasicInfo.VendorNameLocal;

            variables.AddKeyValue("VendorName", vendorName);

            //部门
            variables.AddKeyValue("DepartmentName", "商品部");

            //制表时间
            var curentDataStr = DateTime.Now.Date.ToString("yyyy-MM-dd");

            variables.AddKeyValue("CurentDate", curentDataStr);

            DataTable dt = new DataTable();

            //商品ID
            dt.Columns.Add("ProductID");
            //商品名称
            dt.Columns.Add("ProductName");
            //税率
            dt.Columns.Add("TaxRange");
            //变价数量
            dt.Columns.Add("ChangeCount");
            //原进价
            dt.Columns.Add("OldPrice");
            //新进价
            dt.Columns.Add("NewPrice");
            //变价金额
            dt.Columns.Add("ChaneAmount");
            //变价税金
            dt.Columns.Add("ChaneTax");
            //采购单编号
            dt.Columns.Add("OrderNo");
            //备注
            dt.Columns.Add("Memo");

            tableVariables.Add("tableCostChangeDetial", dt);

            Func <PurchaseOrderTaxRate, decimal, decimal> Shuijin = (a, b) =>
            {
                return(((decimal)(((int)a) / 100.00)) * b / ((decimal)(((int)a) / 100.00) + 1));
            };

            Func <PurchaseOrderTaxRate, decimal, decimal> Jiakuan = (a, b) =>
            {
                return(b / ((decimal)(((int)a) / 100.00) + 1));
            };


            //采购单实体
            PurchaseOrderAppService purchaseOrderAppServiceInstance = ObjectFactory <PurchaseOrderAppService> .Instance;

            var totalAmount = 0m;

            foreach (var sub in costChangeInfo.CostChangeItems)
            {
                DataRow row = null;
                row = dt.NewRow();

                var taxAndAmount = (sub.NewPrice - sub.OldPrice) * sub.ChangeCount;
                var po           = purchaseOrderAppServiceInstance.LoadPurchaseOrderInfo(sub.POSysNo);
                var taxRateType  = po.PurchaseOrderBasicInfo.TaxRateType.Value;//增值税类型

                //商品ID
                row["ProductID"] = sub.ProductID;
                //商品名称
                row["ProductName"] = sub.ProductName;
                //税率
                row["TaxRange"] = ((int)taxRateType).ToString();//通过采购单 来获取 税率
                //变价数量
                row["ChangeCount"] = sub.ChangeCount;
                //原进价
                row["OldPrice"] = sub.OldPrice.ToString("C");
                //新进价
                row["NewPrice"] = sub.NewPrice.ToString("C");
                //不含税金额(价款)
                row["ChaneAmount"] = Jiakuan(taxRateType, taxAndAmount).ToString("C");
                //变价税金
                row["ChaneTax"] = Shuijin(taxRateType, taxAndAmount).ToString("C");
                //采购单编号
                row["OrderNo"] = sub.POSysNo;
                //备注
                row["Memo"] = "";

                dt.Rows.Add(row);
                totalAmount += taxAndAmount;
            }

            //制单人
            variables.AddKeyValue("CreateUser", costChangeInfo.CostChangeBasicInfo.InUserStr);
            //审核人
            variables.AddKeyValue("AuditUser", costChangeInfo.CostChangeBasicInfo.AuditUserStr);
            //合计
            variables.AddKeyValue("TotalAmount", totalAmount.ToString("C"));
        }
Пример #19
0
 public CostChangeInfo AuditCostChange(CostChangeInfo info)
 {
     return(CostChangeProcessor.AuditCostChange(info));
 }
Пример #20
0
 public CostChangeInfo AbandonCostChange(CostChangeInfo info)
 {
     return(CostChangeProcessor.AbandonCostChange(info));
 }
Пример #21
0
 public CostChangeInfo RefuseCostChange(CostChangeInfo info)
 {
     return(CostChangeProcessor.RefuseCostChange(info));
 }
Пример #22
0
 public CostChangeInfo CancelSubmitAuditPOCostChange(CostChangeInfo info)
 {
     return(CostChangeProcessor.CancelSubmitAuditPOCostChange(info));
 }
Пример #23
0
 public CostChangeInfo SubmitAuditCostChange(CostChangeInfo info)
 {
     return(CostChangeProcessor.SubmitAuditCostChange(info));
 }
Пример #24
0
 public CostChangeInfo UpdateCostChange(CostChangeInfo info)
 {
     return(CostChangeProcessor.UpdateCostChange(info));
 }
Пример #25
0
 public CostChangeInfo CreateCostChange(CostChangeInfo info)
 {
     return(CostChangeProcessor.CreateCostChange(info));
 }
Пример #26
0
 public CostChangeInfo AuditCostChange(CostChangeInfo info)
 {
     return(ObjectFactory <CostChangeAppService> .Instance.AuditCostChange(info));
 }
Пример #27
0
 public CostChangeInfo UpdateCostChange(CostChangeInfo info)
 {
     return(ObjectFactory <CostChangeAppService> .Instance.UpdateCostChange(info));
 }
Пример #28
0
 public CostChangeInfo CancelSubmitAuditPOCostChange(CostChangeInfo info)
 {
     return(ObjectFactory <CostChangeAppService> .Instance.CancelSubmitAuditPOCostChange(info));
 }
Пример #29
0
 /// <summary>
 /// 预校验库存成本变更
 /// </summary>
 /// <param name="costChangeInfo"></param>
 private bool PreCheck(CostChangeInfo costChangeInfo)
 {
     return(ProductCostQueryDA.PreCheckCostChange(costChangeInfo.SysNo.Value));
 }
Пример #30
0
 public void UpdateCostInWhenCostChange(CostChangeInfo costChangeInfo)
 {
     ObjectFactory <ProductInventoryProcessor> .Instance.UpdateCostInWhenCostChange(costChangeInfo);
 }