Subversion Repositories SmartDukaan

Rev

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

Rev 36022 Rev 36027
Line 222... Line 222...
222
				}
222
				}
223
			});
223
			});
224
		}
224
		}
225
	});
225
	});
226
 
226
 
-
 
227
	// Approve Invoice Return (finance approval for shipped invoices)
-
 
228
	$(document).on('click', '.approve-invoice-return', function () {
-
 
229
		var proId = $(this).data("pro-id");
-
 
230
		if (confirm("Are you sure you want to approve and refund this invoice return?")) {
-
 
231
			doAjaxRequestHandler(context + "/return/invoice/approve/" + proId, "PUT", function (response) {
-
 
232
				if (response === 'true') {
-
 
233
					alert("Invoice return approved and refunded successfully");
-
 
234
					doAjaxRequestHandler(context + "/return/invoice", "GET", function (resp) {
-
 
235
						$('#main-content').html(resp);
-
 
236
					});
-
 
237
				} else {
-
 
238
					alert("Approval failed: " + response);
-
 
239
				}
-
 
240
			});
-
 
241
		}
-
 
242
	});
-
 
243
 
227
	// Process Invoice Return (non-GRN'd)
244
	// Process Invoice Return (non-GRN'd)
228
	$(document).on('click', '.process-invoice-return', function () {
245
	$(document).on('click', '.process-invoice-return', function () {
229
		var invoiceNumber = $(this).data("invoice");
246
		var invoiceNumber = $(this).data("invoice");
230
		var remark = $('#invoice-return-remark').val();
247
		var remark = $('#invoice-return-remark').val();
231
		if (confirm("Are you sure you want to process return for invoice " + invoiceNumber + "?")) {
248
		if (confirm("Are you sure you want to process return for invoice " + invoiceNumber + "?")) {