Subversion Repositories SmartDukaan

Rev

Rev 36408 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 36408 Rev 36447
Line 290... Line 290...
290
				}
290
				}
291
			});
291
			});
292
		}
292
		}
293
	});
293
	});
294
 
294
 
-
 
295
	// Acknowledge rejected return — retailer confirms goods received back
-
 
296
	$(document).on('click', '.acknowledge-rejected-return', function () {
-
 
297
		var debitNoteId = $(this).data("debitnote-id");
-
 
298
		if (confirm("Confirm that you have received the rejected goods back? This will restore your inventory.")) {
-
 
299
			doAjaxRequestHandler(context + "/return/debit-note/reject/acknowledge/" + debitNoteId, "PUT", function (response) {
-
 
300
				if (response === 'true') {
-
 
301
					alert("Goods acknowledged. Inventory restored.");
-
 
302
					doAjaxRequestHandler(context + "/return/invoice", "GET", function (resp) {
-
 
303
						$('#main-content').html(resp);
-
 
304
					});
-
 
305
				} else {
-
 
306
					alert("Acknowledgment failed: " + response);
-
 
307
				}
-
 
308
			});
-
 
309
		}
-
 
310
	});
-
 
311
 
295
	// Process Invoice Return (non-GRN'd)
312
	// Process Invoice Return (non-GRN'd)
296
	$(document).on('click', '.process-invoice-return', function () {
313
	$(document).on('click', '.process-invoice-return', function () {
297
		var invoiceNumber = $(this).data("invoice");
314
		var invoiceNumber = $(this).data("invoice");
298
		var remark = $('#invoice-return-remark').val();
315
		var remark = $('#invoice-return-remark').val();
299
		if (confirm("Are you sure you want to process return for invoice " + invoiceNumber + "?")) {
316
		if (confirm("Are you sure you want to process return for invoice " + invoiceNumber + "?")) {