This commit is contained in:
杰 朱
2022-05-20 09:06:45 +08:00
parent 480efb7334
commit 192d432031
3 changed files with 33 additions and 12 deletions

View File

@@ -202,6 +202,27 @@ namespace NX.ERP.U8.AP
{
var id = Guid.NewGuid().ToString().Replace("-", "");
var vhobj = new NX.ERP.U8.VoucherHistory();
var maxnumber = vhobj.getNumber("P0", "单据日期", ApVouch.Date.ToString("yyyyMM"));
string temp = "";
//补足0
for (int i = 0; i < 5 - maxnumber.Length; i++)
{
temp += "0";
}
var mouthstr = ApVouch.Date.ToString("yyyyMM").Substring(2, 4);
string cVouchID = "QTYF" + mouthstr + temp + maxnumber;
STVoucherParameter voucherParameter = new STVoucherParameter
{
VoucherType = this.VoucherID,
@@ -226,7 +247,7 @@ namespace NX.ERP.U8.AP
headXml.setAttribute("VT_ID", 8056);
headXml.setAttribute("bd_c", false);
headXml.setAttribute("bStartFlag", false);
headXml.setAttribute("cVouchID", "");
headXml.setAttribute("cVouchID", cVouchID);
headXml.setAttribute("cFlag", "AP");
headXml.setAttribute("cDeptCode", ApVouch.DeptCode);
headXml.setAttribute("cDigest", ApVouch.Digest);