private static bool CreateNewItemPay(PoSysNoItem item, decimal noUseReturnPoint) { string baseUrl = System.Configuration.ConfigurationManager.AppSettings["InvoiceRestFulBaseUrl"]; string languageCode = System.Configuration.ConfigurationManager.AppSettings["LanguageCode"]; string companyCode = System.Configuration.ConfigurationManager.AppSettings["CompanyCode"]; PayableInfo payableInfo = new PayableInfo(); List <POItem> items = AutoCloseDA.QueryPOItemsForPrint(item.PoSysNo); decimal? totalAmt = GettoTalAmt(items); decimal? trueAmt = GettrueAmt(items); payableInfo.OrderSysNo = item.PoSysNo; payableInfo.BatchNumber = 1; payableInfo.OrderStatus = 6; payableInfo.OrderType = PayableOrderType.POAdjust; payableInfo.OperationUserFullName = "Job User"; payableInfo.InStockAmt = totalAmt - trueAmt - noUseReturnPoint; payableInfo.CompanyCode = companyCode; ECCentral.Job.Utility.RestClient client = new ECCentral.Job.Utility.RestClient(baseUrl, languageCode); ECCentral.Job.Utility.RestServiceError error; var ar = client.Update("/Payable/CreateByPO", payableInfo, out error); if (error != null && error.Faults != null && error.Faults.Count > 0) { string errorMsg = ""; foreach (var errorItem in error.Faults) { errorMsg += errorItem.ErrorDescription; } Logger.WriteLog(errorMsg, "JobConsole"); OnShowInfo(errorMsg); OnShowInfo("PO单编号为:" + item.PoSysNo.ToString() + "财务收款单调整失败"); return(false); } else { OnShowInfo("PO单编号为:" + item.PoSysNo.ToString() + "财务收款单调整成功"); return(true); } }
public CreateEmailContent(int id, string emails) { entity = EmailDA.QueryPOEntity(id); entity = EmailDA.GetReturnPoint(entity); if (entity != null) { // entity.TotalAmt = entity.TotalAmt.ToString().Replace(entity.CurrencySymbol, ""); items = AutoCloseDA.QueryPOItemsForPrint(entity); } SetBaseInfo(entity); displayNo = ""; vendor = AutoClose.DAL.EmailDA.GetVendorBySysNo(entity.VendorSysNo); SetPoNumber(entity); //设置流水号 SetSendType(); //设置送货方式 SettotalInPage(); //设置本页小计 SettotalReturnPointAndtotalAmt(); //设置totalReturnPoint和totalAmt SetPmName(); //设置我方采购员 SetCurrency(); //设置货币种类 }