DS7_JinGang
hanxuntao 2 years ago
parent a26fcd9ebf
commit a36dee13f3

@ -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 + "'");

@ -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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } 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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } 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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } 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 '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } 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));

@ -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;
}

Loading…
Cancel
Save