From 82c1a604a4f7c6319b7b8ce1b1d6ee3bbf496734 Mon Sep 17 00:00:00 2001 From: "DESKTOP-DIHMM3I\\22375" Date: Tue, 20 Dec 2022 13:50:15 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=AD=E5=85=A5=E5=BA=93-=E6=BA=90?= =?UTF-8?q?=E5=A4=B4=E8=AE=A2=E5=8D=95=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ICSSoft.DataProject/PurchaseReceiveDoc.cs | 24 ++++++------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/ICSSoft.ERP.WebAPI/ICSSoft.DataProject/PurchaseReceiveDoc.cs b/ICSSoft.ERP.WebAPI/ICSSoft.DataProject/PurchaseReceiveDoc.cs index c74a6c6..c48e54d 100644 --- a/ICSSoft.ERP.WebAPI/ICSSoft.DataProject/PurchaseReceiveDoc.cs +++ b/ICSSoft.ERP.WebAPI/ICSSoft.DataProject/PurchaseReceiveDoc.cs @@ -113,14 +113,11 @@ namespace ICSSoft.DataProject string connS = ""; string sql = ""; string iFatherIdTwo = ""; - DataSet ds = null; decimal iTaxRate = 0; DateTime time = DateTime.Now; int num = 0; VouchKey key = new VouchKey(); - //int iBaseCodeLen = Convert.ToInt32(dic["iBaseCodeLen"].ToString()); - //int cVouchCodeBase = Convert.ToInt32(dic["cVouchCodeBase"].ToString()); List datas = new List(); if (Bills.Count <= 0) { @@ -269,9 +266,9 @@ namespace ICSSoft.DataProject #region 采购入库单表头 string BusType = "";//业务类型 sql = @"select a.POID,a.cPOID,a.cVenCode,a.cDepCode,a.cexch_name,a.iTaxRate,a.cMaker, - a.nflat,a.cPersonCode,a.cptcode ,b.ID,b.cCode,a.cBusType + a.nflat,a.cPersonCode,a.cptcode,a.cBusType FROM dbo.PO_Pomain a - LEFT JOIN PU_ArrivalVouch b ON a.cPOID=b.cpocode + WHERE a.cPOID ='" + head.POCode + "'"; cmd.CommandText = sql; DataTable dtPOMain = DBHelper.SQlReturnData(sql, cmd); @@ -304,8 +301,8 @@ namespace ICSSoft.DataProject WHCode = head.WHCode; } - cSource = "采购到货单"; - cCode = dtPOMain.Rows[0]["cCode"].ToString(); + cSource = "普通采购"; + cCode = dtPOMain.Rows[0]["cPOID"].ToString(); bredvouch = 0; @@ -328,7 +325,7 @@ namespace ICSSoft.DataProject DataTable dtDisCheck1 = DBHelper.SQlReturnData(sql, cmd); if (dtDisCheck1 != null && dtDisCheck1.Rows.Count > 0) { - foreach (DataRow item in dtDisCheck1.Rows) + foreach (DataRow item in dtDisCheck1.Rows) { if (item["iLZYJ"].ToString() == "10" & (item["iLZFS"].ToString() == "0" | item["iLZFS"].ToString() == "1")) { @@ -431,11 +428,9 @@ namespace ICSSoft.DataProject sql = @"SELECT a.id,a.cInvCode,a.iUnitPrice ,a.iMoney AS 原币无税金额 ,a.ivouchrowno, a.iTax AS 原币税额 ,a.iSum AS 原币价税合计 ,a.iNatUnitPrice , a.iNatMoney AS 本币无税金额 ,a.iNatTax AS 本币税额 ,a.iNatSum AS 本币价税合计 , - a.iTaxPrice ,a.freceivedqty AS 合格品入库数量 ,a.iPerTaxRate,c.Autoid,d.cCode,d.dDate + a.iTaxPrice ,a.freceivedqty AS 合格品入库数量 ,a.iPerTaxRate FROM dbo.PO_Podetails a INNER JOIN dbo.PO_Pomain b ON a.POID=b.POID - LEFT JOIN dbo.PU_ArrivalVouchs c ON a.ID=c.iPOsID - LEFT JOIN dbo.PU_ArrivalVouch d ON c.ID=d.ID WHERE b.cPOID ='" + head.POCode + "'"; cmd.CommandText = sql; DataTable dtPODetails = DBHelper.SQlReturnData(sql, cmd); @@ -472,12 +467,7 @@ namespace ICSSoft.DataProject if (!string.IsNullOrEmpty(dtPODetails.Rows[0]["iTaxPrice"].ToString())) iTaxPrice = decimal.Parse(dtPODetails.Rows[0]["iTaxPrice"].ToString());//原币含税单价 iTaxRate = Convert.ToDecimal(dtPODetails.Rows[0]["iPerTaxRate"]); - if (!string.IsNullOrEmpty(dtPODetails.Rows[0]["Autoid"].ToString()))//采购退货单字体标识 - id = dtPODetails.Rows[0]["Autoid"].ToString(); - if (!string.IsNullOrEmpty(dtPODetails.Rows[0]["cCode"].ToString()))//采购退货单号 - code = dtPODetails.Rows[0]["cCode"].ToString(); - if (!string.IsNullOrEmpty(dtPODetails.Rows[0]["dDate"].ToString()))//采购退货单日期 - dates = dtPODetails.Rows[0]["dDate"].ToString(); + sql = @"INSERT INTO dbo.rdrecords01 ( AutoID ,ID ,cInvCode ,iNum ,iQuantity ,cItemCode,