Subversion Repositories SmartDukaan

Rev

Rev 26492 | Rev 26518 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 26492 Rev 26517
Line 45... Line 45...
45
 
45
 
46
	$(".transactionSubmit").live(
46
	$(".transactionSubmit").live(
47
			'click',
47
			'click',
48
			function() {
48
			function() {
49
				var reference = $('#reference_id').val();
49
				var reference = $('#reference_id').val();
50
				var type = $('#reference-type option:selected').val();
50
				var typeValue = $('#reference-type option:selected').val();
51
				var transactiontype = $('#transaction-type').val();
51
				var transactiontype = $('#transaction-type').val();
52
				var amount = $('#amount').val();
52
				var amount = $('#amount').val();
53
				var description = $('#description').val();
53
				var description = $('#description').val();
54
				var retailerId = currentFofoId
54
				var retailerId = currentFofoId
55
				console.log(currentFofoId)
55
				console.log(currentFofoId)
56
				console.log(type);
56
				console.log(typeValue);
57
				if (type == "") {
57
				if (typeValue == "") {
58
					alert("Please Choose Reference Type");
58
					alert("Please Choose Reference Type");
59
					return;
59
					return;
60
				}
60
				}
61
				if(['INCENTIVES', 'OTHERS', 'BRAND_FEE', 'DIWALI_OFFER',
61
				if(typeValue < 16){
62
					'GOODWILL_GESTURE', 'EOL', 'ACTIVATION_SCHEME', 'BOOSTER_SCHEME', 'SALES_MARKETING_SUPPORT', 'INVESTMENT_PAYOUT'].indexOf(type)<0){
-
 
63
					if(reference == ""){
62
					if(reference == ""){
64
						alert("Reference Id is required");
63
						alert("Reference Id is required");
65
						return;
64
						return;
66
					}
65
					}
67
				}
66
				}
Line 87... Line 86...
87
					if (confirm("Business Date is " + startDate.split("T")[0] + "?") == true) {
86
					if (confirm("Business Date is " + startDate.split("T")[0] + "?") == true) {
88
						if (confirm("Are you sure you want update wallet") == true) {
87
						if (confirm("Are you sure you want update wallet") == true) {
89
	
88
	
90
							doPostAjaxRequestHandler(context
89
							doPostAjaxRequestHandler(context
91
									+ "/walletUpdate?reference=" + reference
90
									+ "/walletUpdate?reference=" + reference
92
									+ "&referenceType=" + type + "&transactiontype="
91
									+ "&referenceTypeValue=" + typeValue + "&transactiontype="
93
									+ transactiontype + "&amount=" + amount
92
									+ transactiontype + "&amount=" + amount
94
									+ "&description=" + description + "&retailerId="
93
									+ "&description=" + description + "&retailerId="
95
									+ currentFofoId +"&businessTimestamp=" + startDate, function(response) {
94
									+ currentFofoId +"&businessTimestamp=" + startDate, function(response) {
96
								if (response != 0) {
95
								if (response != 0) {
97
									alert("successfully submit");
96
									alert("successfully submit");