public static bool ConfirmPurchaseArrive(PurchaseArriveModel Model, string DetailProductCount, string DetailFromBillNo, string DetailFromLineNo, string length, out string strMsg) { bool isSucc = false;//是否添加成功 strMsg = ""; try { isSucc = PurchaseArriveDBHelper.ConfirmPurchaseArrive(Model, DetailProductCount, DetailFromBillNo, DetailFromLineNo, length, out strMsg); //确认成功后调用“自动生成凭证”方法 if (isSucc == true) { string str = ""; XBase.Business.Office.FinanceManager.AutoVoucherBus.AutoVoucherInsert(12, Model.TotalFee, "officedba.PurchaseArrive," + Model.ID, Model.CurrencyType + "," + Model.Rate, Model.ProviderID, out str); //returnValue=0 业务单未设凭证模板,returnValue=1 企业不启用业务单自动生成凭证,returnValue = 2 企业不启用自动生成凭证自动登帐, returnValue = 3 自动生成凭证失败 ,returnValue = "4" 回写业务单登记凭证状态成功,returnValue = "5" 回写业务单登记凭证状态失败 strMsg += str; } } catch (Exception e) { strMsg += e.Message; } return(isSucc); }