From a36dee13f382490017dde011be50696ea4a41b0a Mon Sep 17 00:00:00 2001 From: hanxuntao <641739520@qq.com> Date: Fri, 28 Apr 2023 17:41:54 +0800 Subject: [PATCH] 1 --- .../MvcShipping/DAL/MsOpApply/MsOpApplyDAL.cs | 6 +- .../Viewsjs/MsChFee/FeeAmendDrCrGrid.js | 76 ++++++++++++++++++- .../SoftMng/Controllers/ExportController.cs | 4 +- 3 files changed, 77 insertions(+), 9 deletions(-) diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOpApply/MsOpApplyDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOpApply/MsOpApplyDAL.cs index 78e07043..ca10e5eb 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOpApply/MsOpApplyDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOpApply/MsOpApplyDAL.cs @@ -1485,9 +1485,9 @@ namespace DSWeb.MvcShipping.DAL.MsOpApplyDAL } } } - StrSerialNo = StrSerialNo + ")"; - var cmdDelete = db.GetSqlStringCommand("delete from op_apply_detail where BSNO='" + headData.BSNO + "' and SerialNo not in " + StrSerialNo); - db.ExecuteNonQuery(cmdDelete, tran); + //StrSerialNo = StrSerialNo + ")"; + //var cmdDelete = db.GetSqlStringCommand("delete from op_apply_detail where BSNO='" + headData.BSNO + "' and SerialNo not in " + StrSerialNo); + //db.ExecuteNonQuery(cmdDelete, tran); if (headData.IsSERVICE1 != "1") { var cmdDeleteService1 = db.GetSqlStringCommand("delete from op_apply_service where OPField='SERVICE1' and BSNO='" + headData.BSNO + "'"); diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeAmendDrCrGrid.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeAmendDrCrGrid.js index 8e043c7f..72c3a017 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeAmendDrCrGrid.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeAmendDrCrGrid.js @@ -53,7 +53,7 @@ Ext.extend(Shipping.FeeAmendEditGrid, Ext.Panel, { this.ADDAMENDNOTFEECLOSE = 0; this.AmendSalenotedit = 0; this.FEELOCKNOTPR = 0; - + this.ACCTAXRATESAMETAXRATE = 0; _thisAmendfee = this; this.StoreDrOpRange = Ext.create('DsExt.ux.RefTableStore', { model: 'MsFeeOP', @@ -934,7 +934,21 @@ Ext.extend(Shipping.FeeAmendEditGrid, Ext.Panel, { }, width: 150 - }, { + }, { + sortable: true, + dataIndex: 'AccTax', + header: Zi.LAN.FEE.AccTax2, //'销项税率', + renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; }, + align: 'right', + width: 80 + }, { + sortable: true, + dataIndex: 'AccAmount', + header: Zi.LAN.FEE.AccAmount2, //'销项税率', + renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; }, + align: 'right', + width: 80 + }, { sortable: true, dataIndex: 'IsAdvancedpay', header: Zi.LAN.FEE.IsAdvancedpay, //'是否垫付', @@ -1743,7 +1757,21 @@ Ext.extend(Shipping.FeeAmendEditGrid, Ext.Panel, { } }, width: 150 - }, { + }, { + sortable: true, + dataIndex: 'AccTax', + header: Zi.LAN.FEE.AccTax, //'进项税率', + renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; }, + align: 'right', + width: 80 + }, { + sortable: true, + dataIndex: 'AccAmount', + header: Zi.LAN.FEE.AccAmount, //'进项金额', + renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; }, + align: 'right', + width: 80 + }, { sortable: true, dataIndex: 'IsAdvancedpay', header: Zi.LAN.FEE.IsAdvancedpay, //'是否垫付', @@ -3957,7 +3985,32 @@ Ext.extend(Shipping.FeeAmendEditGrid, Ext.Panel, { }, scope: this }); + Ext.Ajax.request({ + waitMsg: '', + url: '/MvcShipping/MsSysParamSet/GetData', + params: { + condition: "PARAMNAME='ACCTAXRATESAMETAXRATE'" + }, + callback: function (options, success, response) { + if (success) { + var result = Ext.JSON.decode(response.responseText); + if (result.Success != true) { + + } else { + var data = result.data; + if (data.PARAMVALUE == '1') { + this.ACCTAXRATESAMETAXRATE = 1; + } else { + + } + } + } else { + + } + }, + scope: this + }); Ext.Ajax.request({ waitMsg: '', @@ -6370,7 +6423,22 @@ Ext.extend(Shipping.FeeAmendEditGrid, Ext.Panel, { var unitPrice = e.record.data['UnitPrice']; var quantity = e.record.data['Quantity']; - if (_thisAmendfee.ACCTAXRATESAMETAXRATE == 1) e.record.set('AccTaxRate', taxrate); + if (_thisAmendfee.ACCTAXRATESAMETAXRATE == 1) { + e.record.set('AccTaxRate', taxrate); + var amount = e.record.data['Amount']; + if (taxrate == 0) { + e.record.set('AccTax', 0); + } else { + var taxrateb = Add(1, Div(taxrate, 100, 4), 4); + var taxb = Div(amount, taxrateb); + var tax = Div(Mul(taxb, taxrate), 100); + var accamount = Add(amount, -tax); + e.record.set('AccTax', tax); + e.record.set('AccAmount', accamount); + } + + + } if (unitPrice != null) { var taxrateb = Add(1, Div(taxrate, 100, 4), 4); //parseFloat(1 + parseFloat(taxrate).mul(0.01)); diff --git a/DSWeb/Areas/SoftMng/Controllers/ExportController.cs b/DSWeb/Areas/SoftMng/Controllers/ExportController.cs index 0b4956f8..b296dd7b 100644 --- a/DSWeb/Areas/SoftMng/Controllers/ExportController.cs +++ b/DSWeb/Areas/SoftMng/Controllers/ExportController.cs @@ -3058,12 +3058,12 @@ string swcn = "2020030084935", string swpw = "8a5889ea8e53b257e2a3ba053979ee64" opapplyhead.PORTDISCHARGE = preDecHeadVo.distinatePortName; if (preDecHeadVo.cusTradeCountry == "CHN") { - if (string.IsNullOrEmpty(opapplyhead.ENTERP.Trim())) + //if (string.IsNullOrEmpty(opapplyhead.ENTERP.Trim())) opapplyhead.ENTERP = DecHead_Local.TradeName; } else { - if (string.IsNullOrEmpty(opapplyhead.ENTERP.Trim())) + //if (string.IsNullOrEmpty(opapplyhead.ENTERP.Trim())) opapplyhead.ENTERP = preDecHeadVo.consigneeCname; }