Commit 3a78eb51 authored by qiankunpingtai's avatar qiankunpingtai
Browse files

修改财务管理部分财务明细未做操作时也可以保存

parent 79d4c7d2
...@@ -896,7 +896,6 @@ function CheckData() { ...@@ -896,7 +896,6 @@ function CheckData() {
function saveAccountHeadAndDetail(listType,ChangeAmount,TotalPrice,OrganId) { function saveAccountHeadAndDetail(listType,ChangeAmount,TotalPrice,OrganId) {
append(); append();
removeit(); removeit();
if ($("#accountData").datagrid('getChanges').length) {
if (!CheckData()) if (!CheckData())
return false; return false;
var inserted = $("#accountData").datagrid('getChanges', "inserted"); var inserted = $("#accountData").datagrid('getChanges', "inserted");
...@@ -948,7 +947,6 @@ function saveAccountHeadAndDetail(listType,ChangeAmount,TotalPrice,OrganId) { ...@@ -948,7 +947,6 @@ function saveAccountHeadAndDetail(listType,ChangeAmount,TotalPrice,OrganId) {
$.messager.alert('提示',XmlHttpRequest.responseText,'error'); $.messager.alert('提示',XmlHttpRequest.responseText,'error');
} }
}); });
}
} }
...@@ -803,7 +803,6 @@ function CheckData() { ...@@ -803,7 +803,6 @@ function CheckData() {
function saveAccountHeadAndDetail(listType,ChangeAmount,TotalPrice,OrganId) { function saveAccountHeadAndDetail(listType,ChangeAmount,TotalPrice,OrganId) {
append(); append();
removeit(); removeit();
if ($("#accountData").datagrid('getChanges').length) {
if (!CheckData()) if (!CheckData())
return false; return false;
var inserted = $("#accountData").datagrid('getChanges', "inserted"); var inserted = $("#accountData").datagrid('getChanges', "inserted");
...@@ -855,6 +854,5 @@ function saveAccountHeadAndDetail(listType,ChangeAmount,TotalPrice,OrganId) { ...@@ -855,6 +854,5 @@ function saveAccountHeadAndDetail(listType,ChangeAmount,TotalPrice,OrganId) {
$.messager.alert('提示',XmlHttpRequest.responseText,'error'); $.messager.alert('提示',XmlHttpRequest.responseText,'error');
} }
}); });
}
} }
\ No newline at end of file
...@@ -819,7 +819,6 @@ function CheckData() { ...@@ -819,7 +819,6 @@ function CheckData() {
function saveAccountHeadAndDetail(listType,ChangeAmount,TotalPrice,OrganId) { function saveAccountHeadAndDetail(listType,ChangeAmount,TotalPrice,OrganId) {
append(); append();
removeit(); removeit();
if ($("#accountData").datagrid('getChanges').length) {
if (!CheckData()) if (!CheckData())
return false; return false;
var inserted = $("#accountData").datagrid('getChanges', "inserted"); var inserted = $("#accountData").datagrid('getChanges', "inserted");
...@@ -871,6 +870,5 @@ function saveAccountHeadAndDetail(listType,ChangeAmount,TotalPrice,OrganId) { ...@@ -871,6 +870,5 @@ function saveAccountHeadAndDetail(listType,ChangeAmount,TotalPrice,OrganId) {
$.messager.alert('提示',XmlHttpRequest.responseText,'error'); $.messager.alert('提示',XmlHttpRequest.responseText,'error');
} }
}); });
}
} }
\ No newline at end of file
...@@ -825,7 +825,6 @@ function CheckData() { ...@@ -825,7 +825,6 @@ function CheckData() {
function saveAccountHeadAndDetail(listType,ChangeAmount,TotalPrice,OrganId) { function saveAccountHeadAndDetail(listType,ChangeAmount,TotalPrice,OrganId) {
append(); append();
removeit(); removeit();
if ($("#accountData").datagrid('getChanges').length) {
if (!CheckData()) if (!CheckData())
return false; return false;
var inserted = $("#accountData").datagrid('getChanges', "inserted"); var inserted = $("#accountData").datagrid('getChanges', "inserted");
...@@ -877,6 +876,5 @@ function saveAccountHeadAndDetail(listType,ChangeAmount,TotalPrice,OrganId) { ...@@ -877,6 +876,5 @@ function saveAccountHeadAndDetail(listType,ChangeAmount,TotalPrice,OrganId) {
$.messager.alert('提示',XmlHttpRequest.responseText,'error'); $.messager.alert('提示',XmlHttpRequest.responseText,'error');
} }
}); });
}
} }
\ No newline at end of file
...@@ -815,7 +815,6 @@ function CheckData() { ...@@ -815,7 +815,6 @@ function CheckData() {
function saveAccountHeadAndDetail(listType,ChangeAmount,TotalPrice,OrganId) { function saveAccountHeadAndDetail(listType,ChangeAmount,TotalPrice,OrganId) {
append(); append();
removeit(); removeit();
if ($("#accountData").datagrid('getChanges').length) {
if (!CheckData()) if (!CheckData())
return false; return false;
var inserted = $("#accountData").datagrid('getChanges', "inserted"); var inserted = $("#accountData").datagrid('getChanges', "inserted");
...@@ -867,6 +866,5 @@ function saveAccountHeadAndDetail(listType,ChangeAmount,TotalPrice,OrganId) { ...@@ -867,6 +866,5 @@ function saveAccountHeadAndDetail(listType,ChangeAmount,TotalPrice,OrganId) {
$.messager.alert('提示',XmlHttpRequest.responseText,'error'); $.messager.alert('提示',XmlHttpRequest.responseText,'error');
} }
}); });
}
} }
\ No newline at end of file
...@@ -837,7 +837,6 @@ function CheckData() { ...@@ -837,7 +837,6 @@ function CheckData() {
function saveAccountHeadAndDetail(listType,ChangeAmount,TotalPrice,OrganId) { function saveAccountHeadAndDetail(listType,ChangeAmount,TotalPrice,OrganId) {
append(); append();
removeit(); removeit();
if ($("#accountData").datagrid('getChanges').length) {
if (!CheckData()) if (!CheckData())
return false; return false;
var inserted = $("#accountData").datagrid('getChanges', "inserted"); var inserted = $("#accountData").datagrid('getChanges', "inserted");
...@@ -889,6 +888,5 @@ function saveAccountHeadAndDetail(listType,ChangeAmount,TotalPrice,OrganId) { ...@@ -889,6 +888,5 @@ function saveAccountHeadAndDetail(listType,ChangeAmount,TotalPrice,OrganId) {
$.messager.alert('提示',XmlHttpRequest.responseText,'error'); $.messager.alert('提示',XmlHttpRequest.responseText,'error');
} }
}); });
}
} }
\ No newline at end of file
...@@ -202,7 +202,7 @@ public class SupplierService { ...@@ -202,7 +202,7 @@ public class SupplierService {
int result=0; int result=0;
try{ try{
if(supplier!=null){ if(supplier!=null){
supplier.setAdvancein(supplier.getAdvancein().add(advanceIn)); //增加预收款的金额,可能增加的是负值 supplier.setAdvancein((supplier.getAdvancein()==null?BigDecimal.ZERO:supplier.getAdvancein()).add(advanceIn)); //增加预收款的金额,可能增加的是负值
result=supplierMapper.updateByPrimaryKeySelective(supplier); result=supplierMapper.updateByPrimaryKeySelective(supplier);
} }
}catch(Exception e){ }catch(Exception e){
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment