[Vtigercrm-developers] [Vtigercrm-Developer] How to work with AppConnector in Vtiger?
kiran
kiranraju.jakka at gmail.com
Fri Jan 6 06:47:57 GMT 2017
I tried with an alternative solution. But here is one issue with form
submission. I wrote like this..
creditLimitAlert : function(){
var recordData;
var status = false;
var thisInstance = this;
jQuery('.btn-success').on('click', function(){
var account_id = jQuery('input[name=account_id]').val();
var dataUrl =
"index.php?module=Inventory&action=GetAccount&record="+account_id;
var boom = $.getJSON( dataUrl, function(data){
var bal = data.result[account_id].balance;
var gtotal = parseFloat(jQuery('#grandTotal').text());
console.log('Grand Total :: ' + gtotal);
console.log('Balance ::: ' +
data.result[account_id].balance);
if(gtotal<=bal)
{
$("#EditView").submit();
}else{
alert("Insufficient Balance");
}
});
return false;
});
},
Due to this credit limit business logic is working fine.. but when click any
of the save button which there in tax, discount and Individual discount the
same onclick is happening instead of their own logic.
Can anybody suggest me how do i differentiate record save with fellow save
buttons.
Thanks & Regards,
--
View this message in context: http://vtiger-crm.2324883.n4.nabble.com/Vtigercrm-Developer-How-to-work-with-AppConnector-in-Vtiger-tp20341p20347.html
Sent from the vtigercrm-developers mailing list archive at Nabble.com.
More information about the vtigercrm-developers
mailing list