Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function findTaxForProcess(argPrc, argPrcAmount, argPrcDiscount) {
- if (argPrc == '') { return 0; };
- var _valToReturn;
- if ($('#hdnTaxBefore').val() == "true") {
- // if tax is calculated before discount
- $.ajax({
- url: '/AutoComplete.asmx/FindProcessTax',
- type: 'POST',
- timeout: 5000,
- datatype: 'xml',
- cache: false,
- data: 'argProcess=' + argPrc + '&argAmt=' + argPrcAmount,
- success: function (response) {
- _valToReturn = $(response).find('double').text();
- alert(_valToReturn);
- }
- });
- }
- else {
- // the tax is calculated after discount
- $.ajax({
- url: '/AutoComplete.asmx/FindProcessTaxAter',
- type: 'POST',
- timeout: 5000,
- datatype: 'xml',
- cache: false,
- data: 'argProcess=' + argPrc + '&argAmt=' + argPrcAmount + '&argDiscount=' + argPrcDiscount,
- success: function (response) {
- _valToReturn = $(response).find('double').text();
- alert(_valToReturn);
- }
- });
- }
- alert('came here ' + _valToReturn);
- return _valToReturn;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement