修改法人客户开票类型是否是默认
This commit is contained in:
parent
f66f79ab5e
commit
70df439278
@ -57,15 +57,14 @@
|
||||
function saveRecord(){
|
||||
if(!iV_all("0")) return;//先检查填写完整性
|
||||
var tax_isdefault = getItemValue(0,getRow(),"tax_isdefault");
|
||||
var tax_isdefault = getItemValue(0,getRow(),"tax_isdefault");
|
||||
var id = getItemValue(0,getRow(),"id");
|
||||
if(id == ''){//新增时
|
||||
var result = RunJavaMethodTrans("com.tenwa.customer.controller.invoice.CustomerInvoiceController","selectInvoice","customer_id="+"<%=customer_id%>");
|
||||
if(result == "false"){
|
||||
if(tax_isdefault == "no"){
|
||||
/* if(tax_isdefault == "no"){
|
||||
alert("第一条开票信息必须设置为默认开票信息");
|
||||
return;
|
||||
}
|
||||
} */
|
||||
}else{
|
||||
if(tax_isdefault == "yes"){
|
||||
if(!confirm("已有一条默认开票信息,是否确认设为默认?")){
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -179,7 +179,7 @@ public class CustomerInvoiceController {
|
||||
BizObjectManager bom = JBOFactory.getBizObjectManager(CUSTOMER_INVOICE.CLASS_NAME);
|
||||
tx.join(bom);
|
||||
//查询当前客户有无开票信息
|
||||
List<BizObject> CUSTOMER_INVOICES = bom.createQuery("customer_id=:customer_id").setParameter("customer_id",customer_id).getResultList(false);
|
||||
List<BizObject> CUSTOMER_INVOICES = bom.createQuery("customer_id=:customer_id and tax_isdefault='yes'").setParameter("customer_id",customer_id).getResultList(false);
|
||||
if(CUSTOMER_INVOICES != null && CUSTOMER_INVOICES.size() > 0){
|
||||
return "true";
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user