| 25093 |
amit.gupta |
1 |
var saleSearchObj = saleSearchObj || {};
|
|
|
2 |
saleSearchObj.searchText = "";
|
|
|
3 |
saleSearchObj.searchType = "";
|
|
|
4 |
saleSearchObj.startTime = "";
|
|
|
5 |
saleSearchObj.endTime = "";
|
| 23343 |
ashik.ali |
6 |
|
|
|
7 |
$(function() {
|
| 23973 |
govind |
8 |
|
| 27754 |
amit.gupta |
9 |
$(document).on('click', ".pending_fofo_order", function() {
|
| 26647 |
tejbeer |
10 |
console.log("Helloo")
|
|
|
11 |
loadPendingOrder("main-content");
|
|
|
12 |
});
|
|
|
13 |
|
| 28339 |
tejbeer |
14 |
$(document).on('click', ".billed_order_item", function() {
|
|
|
15 |
console.log("Helloo")
|
|
|
16 |
loadBilledOrder("main-content");
|
|
|
17 |
});
|
|
|
18 |
|
|
|
19 |
$(document).on('click', ".unsettled_order_item", function() {
|
|
|
20 |
console.log("Helloo")
|
|
|
21 |
loadUnsettledOrder("main-content");
|
|
|
22 |
});
|
|
|
23 |
|
|
|
24 |
$(document).on('click', ".settled_order_item", function() {
|
|
|
25 |
console.log("Helloo")
|
|
|
26 |
loadSettledOrder("main-content");
|
|
|
27 |
});
|
|
|
28 |
|
|
|
29 |
|
|
|
30 |
|
|
|
31 |
$(document).on('click', ".claim_raised_order_item", function() {
|
|
|
32 |
console.log("Helloo")
|
|
|
33 |
loadClaimedOrder("main-content");
|
|
|
34 |
});
|
|
|
35 |
|
| 27755 |
amit.gupta |
36 |
$(document).on('click', "button.pendingOrderDetail",
|
| 27819 |
tejbeer |
37 |
function() {
|
|
|
38 |
doGetAjaxRequestHandler(context
|
|
|
39 |
+ "/getPendingOrderItem?orderId=" + $(this).data('orderid'), function(
|
|
|
40 |
response) {
|
|
|
41 |
$('.pending-order-container').html(response);
|
| 26647 |
tejbeer |
42 |
});
|
| 27819 |
tejbeer |
43 |
});
|
| 26647 |
tejbeer |
44 |
|
| 27755 |
amit.gupta |
45 |
$(document).on('click', ".pendingOrderCancel",
|
| 27819 |
tejbeer |
46 |
function() {
|
| 26721 |
tejbeer |
47 |
|
| 27819 |
tejbeer |
48 |
var orderId = $(this).data('orderid');
|
|
|
49 |
console.log(orderId);
|
|
|
50 |
if (confirm("Are you sure you want to cancel the order!") == true) {
|
|
|
51 |
doPostAjaxRequestHandler(context
|
|
|
52 |
+ "/cancelPendingOrder?id=" + orderId,
|
|
|
53 |
function(response) {
|
|
|
54 |
if (response == 'true') {
|
|
|
55 |
alert("successfully Cancel");
|
|
|
56 |
loadPendingOrder("main-content");
|
| 26721 |
tejbeer |
57 |
}
|
|
|
58 |
});
|
|
|
59 |
|
| 27819 |
tejbeer |
60 |
return false;
|
|
|
61 |
}
|
|
|
62 |
|
|
|
63 |
});
|
|
|
64 |
|
| 27755 |
amit.gupta |
65 |
$(document).on('click', ".pendingOrderItemCancel",
|
| 27819 |
tejbeer |
66 |
function() {
|
| 26721 |
tejbeer |
67 |
|
| 27819 |
tejbeer |
68 |
var orderItemId = $(this).data('orderitemid');
|
|
|
69 |
if (confirm("Are you sure you want to cancel the order item!") == true) {
|
|
|
70 |
doPostAjaxRequestHandler(context
|
|
|
71 |
+ "/cancelPendingOrderItem?id="
|
|
|
72 |
+ orderItemId, function(response) {
|
|
|
73 |
if (response == 'true') {
|
|
|
74 |
alert("successfully Cancel");
|
|
|
75 |
loadPendingOrder("main-content");
|
| 26721 |
tejbeer |
76 |
}
|
|
|
77 |
});
|
|
|
78 |
|
| 27819 |
tejbeer |
79 |
return false;
|
|
|
80 |
}
|
|
|
81 |
|
|
|
82 |
});
|
|
|
83 |
|
| 28339 |
tejbeer |
84 |
$(document).on('click', ".pendingOrderItemDelivered",
|
|
|
85 |
function() {
|
|
|
86 |
|
|
|
87 |
var orderItemId = $(this).data('poitemid');
|
|
|
88 |
if (confirm("Are you sure you want to delivered the order item!") == true) {
|
|
|
89 |
doPostAjaxRequestHandler(context
|
|
|
90 |
+ "/deliveredPendingOrderItem?id="
|
|
|
91 |
+ orderItemId, function(response) {
|
|
|
92 |
if (response == 'true') {
|
|
|
93 |
alert("successfully delivered marked");
|
|
|
94 |
loadBilledOrder("main-content");
|
|
|
95 |
}
|
|
|
96 |
});
|
|
|
97 |
|
|
|
98 |
return false;
|
|
|
99 |
}
|
|
|
100 |
|
|
|
101 |
});
|
|
|
102 |
|
|
|
103 |
$(document).on('click', ".raiseClaim",
|
|
|
104 |
function() {
|
|
|
105 |
|
|
|
106 |
var orderItemId = $(this).data('poitemid');
|
|
|
107 |
if (confirm("Are you sure you want to raise the claim!") == true) {
|
|
|
108 |
doPostAjaxRequestHandler(context
|
|
|
109 |
+ "/raiseClaimOrderItem?id="
|
|
|
110 |
+ orderItemId, function(response) {
|
|
|
111 |
if (response == 'true') {
|
|
|
112 |
alert("successfully claim raised");
|
|
|
113 |
loadClaimedOrder("main-content");
|
|
|
114 |
}
|
|
|
115 |
});
|
|
|
116 |
|
|
|
117 |
return false;
|
|
|
118 |
}
|
|
|
119 |
|
|
|
120 |
});
|
|
|
121 |
|
| 27754 |
amit.gupta |
122 |
$(document).on('click', ".sale-history", function() {
|
| 23343 |
ashik.ali |
123 |
console.log("Sale History Button Clicked...")
|
| 23973 |
govind |
124 |
saleHistory("main-content", "", "", startDate, endDate);
|
| 23343 |
ashik.ali |
125 |
});
|
| 24880 |
govind |
126 |
|
| 27754 |
amit.gupta |
127 |
$(document).on('click', ".insurance-policy-details", function() {
|
| 24880 |
govind |
128 |
console.log("insurance-policy-details");
|
|
|
129 |
insurancePolicyDetails("main-content");
|
|
|
130 |
});
|
|
|
131 |
|
| 27861 |
tejbeer |
132 |
$(document).on('change', '.fofoLineItemAmount',
|
|
|
133 |
function() {
|
|
|
134 |
var amount = 0;
|
|
|
135 |
var oldtotalAmount = 0;
|
|
|
136 |
console.log(oldtotalAmount)
|
|
|
137 |
$('#fofo-item-table')
|
|
|
138 |
.find('tr')
|
|
|
139 |
.each(
|
|
|
140 |
function() {
|
|
|
141 |
var row = $(this);
|
|
|
142 |
console.log(row);
|
|
|
143 |
|
|
|
144 |
var currentRow = $(this)
|
|
|
145 |
.closest("tr");
|
|
|
146 |
|
|
|
147 |
var col5 = currentRow.find(
|
|
|
148 |
"td:eq(3) input[type='number']").val();
|
|
|
149 |
|
|
|
150 |
|
|
|
151 |
oldtotalAmount = currentRow.find(
|
|
|
152 |
"td:eq(5)").html();
|
|
|
153 |
|
|
|
154 |
console.log(col5);
|
|
|
155 |
if (col5 != undefined) {
|
|
|
156 |
if (col5 != 0) {
|
|
|
157 |
amount = amount + parseInt(col5, 10);
|
|
|
158 |
|
|
|
159 |
}
|
|
|
160 |
}
|
|
|
161 |
});
|
|
|
162 |
|
|
|
163 |
|
|
|
164 |
|
|
|
165 |
$("#totalAmount").text(amount);
|
|
|
166 |
|
|
|
167 |
});
|
|
|
168 |
|
| 27755 |
amit.gupta |
169 |
$(document).on('click', ".updatePaymentDetails",
|
| 27819 |
tejbeer |
170 |
function() {
|
|
|
171 |
console
|
|
|
172 |
.log("updatePaymentDetails target Button Clicked...");
|
|
|
173 |
var i = 1;
|
| 27861 |
tejbeer |
174 |
var paymentOptionsTotalAmount = 0;
|
| 27819 |
tejbeer |
175 |
var invoiceNumber = $(this).data('invoicenumber');
|
|
|
176 |
var fofoId = $(this).data('fofoid');
|
| 27861 |
tejbeer |
177 |
var totalAmount = $('#editAmount').val();
|
| 27819 |
tejbeer |
178 |
var totalNumberOfPaymentOptionId = $(this).data(
|
|
|
179 |
'totalnumberofpaymentoptionid');
|
|
|
180 |
console.log("totalNumberOfPaymentOptionId"
|
|
|
181 |
+ totalNumberOfPaymentOptionId);
|
|
|
182 |
var referenceId = $(this).data('orderid');
|
|
|
183 |
var referenceType = "ORDER";
|
|
|
184 |
var createdTimeStamp = $(this).data('createddatetime');
|
|
|
185 |
console.log(createdTimeStamp);
|
|
|
186 |
console.log(fofoId);
|
|
|
187 |
console.log(referenceId);
|
|
|
188 |
console.log(invoiceNumber);
|
|
|
189 |
console.log(referenceType);
|
|
|
190 |
var paymentOptionTransactionModels = [];
|
| 27861 |
tejbeer |
191 |
var jsonObject = {};
|
| 27819 |
tejbeer |
192 |
var inputvalues = {};
|
|
|
193 |
$('.paymentOptions input')
|
|
|
194 |
.each(
|
| 24105 |
govind |
195 |
function() {
|
| 27819 |
tejbeer |
196 |
console.log($(this).val())
|
| 27861 |
tejbeer |
197 |
paymentOptionsTotalAmount += parseInt($(this).val(), 10)
|
| 27819 |
tejbeer |
198 |
if (!isFinite($(this).val())) {
|
|
|
199 |
return;
|
|
|
200 |
}
|
|
|
201 |
inputvalues = {};
|
|
|
202 |
inputvalues['paymentOptionId'] = $(
|
|
|
203 |
this).data(
|
|
|
204 |
'payment-option-id');
|
|
|
205 |
inputvalues['amount'] = $(this)
|
|
|
206 |
.val();
|
|
|
207 |
inputvalues['createdTimeStamp'] = createdTimeStamp;
|
| 24105 |
govind |
208 |
console
|
| 27819 |
tejbeer |
209 |
.log(inputvalues['createdTimeStamp']);
|
|
|
210 |
if (!inputvalues['amount']) {
|
|
|
211 |
inputvalues['amount'] = "0";
|
| 24880 |
govind |
212 |
}
|
| 27819 |
tejbeer |
213 |
console.log("inputvalues['amount']"
|
|
|
214 |
+ inputvalues['amount']);
|
|
|
215 |
paymentOptionTransactionModels
|
|
|
216 |
.push(inputvalues);
|
|
|
217 |
});
|
|
|
218 |
if (paymentOptionTransactionModels.length != totalNumberOfPaymentOptionId) {
|
|
|
219 |
alert("Sending less or more paymentOptionIds for"
|
|
|
220 |
+ fofoId);
|
|
|
221 |
return false;
|
|
|
222 |
}
|
| 27861 |
tejbeer |
223 |
|
|
|
224 |
|
|
|
225 |
|
|
|
226 |
var ItemIdsAmountArray = [];
|
|
|
227 |
var itemIdsAmount;
|
|
|
228 |
$('#fofo-item-table')
|
|
|
229 |
.find('tr')
|
|
|
230 |
.each(
|
|
|
231 |
function() {
|
|
|
232 |
var row = $(this);
|
|
|
233 |
console.log(row);
|
|
|
234 |
|
|
|
235 |
|
|
|
236 |
|
|
|
237 |
var currentRow = $(this)
|
|
|
238 |
.closest("tr");
|
|
|
239 |
|
|
|
240 |
var itemId = currentRow.find(
|
|
|
241 |
"td:eq(0)").html();
|
|
|
242 |
|
|
|
243 |
var col5 = currentRow.find(
|
|
|
244 |
"td:eq(3) input[type='number']").val();
|
|
|
245 |
var fofoItemId = currentRow.find(
|
|
|
246 |
"td:eq(3) input[type='hidden']").val();
|
|
|
247 |
console.log(itemId)
|
|
|
248 |
|
|
|
249 |
console.log(col5);
|
|
|
250 |
if (col5 != undefined) {
|
|
|
251 |
if (col5 != 0) {
|
|
|
252 |
|
|
|
253 |
itemIdsAmount = {
|
|
|
254 |
"fofoItemId": fofoItemId,
|
|
|
255 |
"amount": col5,
|
|
|
256 |
"itemId": itemId
|
|
|
257 |
|
|
|
258 |
}
|
|
|
259 |
console.log(itemIdsAmount);
|
|
|
260 |
ItemIdsAmountArray.push(itemIdsAmount);
|
|
|
261 |
|
|
|
262 |
console.log(ItemIdsAmountArray)
|
|
|
263 |
}
|
|
|
264 |
}
|
|
|
265 |
});
|
|
|
266 |
|
|
|
267 |
|
|
|
268 |
var totalAmount = $("#totalAmount").html();
|
|
|
269 |
console.log(totalAmount)
|
|
|
270 |
console.log(paymentOptionsTotalAmount)
|
|
|
271 |
if (paymentOptionsTotalAmount != totalAmount) {
|
|
|
272 |
alert("Payment Options and Total Amount are not Same");
|
|
|
273 |
return false;
|
|
|
274 |
}
|
|
|
275 |
|
| 27819 |
tejbeer |
276 |
console.log(paymentOptionTransactionModels);
|
| 27861 |
tejbeer |
277 |
jsonObject['paymentOptionTransactionModel'] = paymentOptionTransactionModels;
|
|
|
278 |
jsonObject['itemAmountModel'] = ItemIdsAmountArray;
|
|
|
279 |
|
|
|
280 |
console.log(jsonObject);
|
| 27819 |
tejbeer |
281 |
if (confirm("Are you sure you want to update paymentTransaction!") == true) {
|
|
|
282 |
doPutAjaxRequestWithJsonHandler(
|
|
|
283 |
context
|
|
|
284 |
+ "/updatePaymentTransaction?referenceId="
|
|
|
285 |
+ referenceId + "&referenceType="
|
|
|
286 |
+ referenceType + "&fofoId="
|
| 27861 |
tejbeer |
287 |
+ fofoId + "&totalAmount=" + totalAmount,
|
| 27819 |
tejbeer |
288 |
JSON
|
| 27861 |
tejbeer |
289 |
.stringify(jsonObject),
|
| 27819 |
tejbeer |
290 |
function(response) {
|
|
|
291 |
if (response === 'true') {
|
|
|
292 |
alert("successfully added");
|
|
|
293 |
loadSearchOrderDetails(
|
|
|
294 |
invoiceNumber,
|
|
|
295 |
"search-order-details-container");
|
| 24105 |
govind |
296 |
}
|
|
|
297 |
});
|
| 27819 |
tejbeer |
298 |
}
|
| 24105 |
govind |
299 |
|
| 27819 |
tejbeer |
300 |
});
|
|
|
301 |
|
| 27755 |
amit.gupta |
302 |
$(document).on('change', '#searchType',
|
| 27819 |
tejbeer |
303 |
function() {
|
|
|
304 |
var searchType = $("#searchType option:selected").val();
|
|
|
305 |
var searchTypevalue = $(this).find('option:selected').text();
|
|
|
306 |
;
|
|
|
307 |
saleSearchObj.searchType = searchType;
|
|
|
308 |
console.log("selected searchType = " + searchType);
|
| 24105 |
govind |
309 |
|
| 27819 |
tejbeer |
310 |
saleHistory("main-content", saleSearchObj.searchType, "",
|
|
|
311 |
startDate, endDate);
|
| 24105 |
govind |
312 |
|
| 27819 |
tejbeer |
313 |
$("#sale-history-search-text").val('');
|
|
|
314 |
});
|
| 23973 |
govind |
315 |
|
| 27755 |
amit.gupta |
316 |
$(document).on('click', "#sale-history-search-button",
|
| 27819 |
tejbeer |
317 |
function() {
|
|
|
318 |
var searchType = $("#searchType option:selected").val();
|
|
|
319 |
console.log("searchType = " + searchType);
|
|
|
320 |
$("#searchType").removeClass("border-highlight");
|
|
|
321 |
saleSearchObj.searchText = $(
|
|
|
322 |
"#sale-history-search-text").val();
|
|
|
323 |
saleSearchObj.searchType = searchType;
|
|
|
324 |
saleSearchObj.startTime = startDate;
|
|
|
325 |
saleSearchObj.endTime = endDate;
|
|
|
326 |
if (typeof (saleSearchObj.searchText) == "undefined"
|
|
|
327 |
|| !saleSearchObj.searchText) {
|
|
|
328 |
saleSearchObj.searchText = "";
|
|
|
329 |
}
|
|
|
330 |
saleHistorySearchInfo(saleSearchObj.searchType,
|
|
|
331 |
saleSearchObj.searchText,
|
|
|
332 |
saleSearchObj.startTime, saleSearchObj.endTime);
|
|
|
333 |
});
|
| 27755 |
amit.gupta |
334 |
$(document).on('click', "#invoice-download-button",
|
| 27819 |
tejbeer |
335 |
function() {
|
|
|
336 |
var searchType = $("#searchType option:selected").val();
|
|
|
337 |
console.log("searchType = " + searchType);
|
|
|
338 |
$("#searchType").removeClass("border-highlight");
|
|
|
339 |
saleSearchObj.searchText = $(
|
|
|
340 |
"#sale-history-search-text").val();
|
|
|
341 |
saleSearchObj.searchType = searchType;
|
|
|
342 |
saleSearchObj.startTime = startDate;
|
|
|
343 |
saleSearchObj.endTime = endDate;
|
|
|
344 |
if (typeof (saleSearchObj.searchText) == "undefined"
|
|
|
345 |
|| !saleSearchObj.searchText) {
|
|
|
346 |
saleSearchObj.searchText = "";
|
|
|
347 |
}
|
|
|
348 |
downloadInvoices(saleSearchObj.searchType,
|
|
|
349 |
saleSearchObj.searchText,
|
|
|
350 |
saleSearchObj.startTime, saleSearchObj.endTime);
|
|
|
351 |
});
|
| 23973 |
govind |
352 |
|
| 27754 |
amit.gupta |
353 |
$(document).on('click', ".search-order", function() {
|
| 23584 |
ashik.ali |
354 |
console.log("search-order clicked")
|
|
|
355 |
loadSearchOrder("main-content");
|
| 23973 |
govind |
356 |
});
|
|
|
357 |
|
| 27819 |
tejbeer |
358 |
$(document).on('click', ".invoices-cancel", function() {
|
|
|
359 |
console.log("searc-order clicked")
|
|
|
360 |
loadInvoiceSearchOrder("main-content");
|
|
|
361 |
});
|
|
|
362 |
|
| 27755 |
amit.gupta |
363 |
$(document).on('click', "#search-order-button",
|
| 27819 |
tejbeer |
364 |
function() {
|
|
|
365 |
console.log("search-order-button clicked")
|
|
|
366 |
var invoiceNumber = $("#search-order-text").val();
|
|
|
367 |
loadSearchOrderDetails(invoiceNumber,
|
|
|
368 |
"search-order-details-container");
|
|
|
369 |
});
|
| 23973 |
govind |
370 |
|
| 27819 |
tejbeer |
371 |
$(document).on('click', "#search-invoice-button",
|
|
|
372 |
function() {
|
|
|
373 |
console.log("search-order-button clicked")
|
|
|
374 |
var invoiceNumber = $("#search-invoice-text").val();
|
|
|
375 |
console.log(invoiceNumber);
|
|
|
376 |
loadSearchOrderDetails(invoiceNumber,
|
|
|
377 |
"search-order-details-container");
|
|
|
378 |
});
|
|
|
379 |
|
|
|
380 |
|
|
|
381 |
|
|
|
382 |
$(document).on('click', "#cancel-invoice-button",
|
|
|
383 |
function() {
|
|
|
384 |
var invoiceNumber = $("#search-invoice-text").val();
|
|
|
385 |
console.log(invoiceNumber);
|
|
|
386 |
if (confirm("Are you sure you want to cancel the order !") == true) {
|
|
|
387 |
doPostAjaxRequestHandler(context
|
|
|
388 |
+ "/cancelOrderByInvoice?invoiceNumbers="
|
|
|
389 |
+ invoiceNumber, function(response) {
|
|
|
390 |
if (response == 'true') {
|
|
|
391 |
alert("Successfully Cancel");
|
|
|
392 |
loadInvoiceSearchOrder("main-content");
|
|
|
393 |
}
|
|
|
394 |
});
|
|
|
395 |
|
|
|
396 |
return false;
|
|
|
397 |
}
|
|
|
398 |
});
|
|
|
399 |
|
| 27755 |
amit.gupta |
400 |
$(document).on('click', "#sale-history-paginated .next",
|
| 27819 |
tejbeer |
401 |
function() {
|
|
|
402 |
var params = {};
|
|
|
403 |
params['searchType'] = saleSearchObj.searchType;
|
|
|
404 |
params['searchValue'] = saleSearchObj.searchText;
|
|
|
405 |
params['startTime'] = walletHistory.startTime;
|
|
|
406 |
params['endTime'] = walletHistory.endTime;
|
|
|
407 |
loadPaginatedNextItems('/getPaginatedSaleHistory', params,
|
|
|
408 |
'sale-history-paginated', 'sale-history-table',
|
|
|
409 |
'sale-details-container');
|
|
|
410 |
$(this).blur();
|
|
|
411 |
});
|
| 27755 |
amit.gupta |
412 |
$(document).on('click', "#insurance-paginated .next",
|
| 27819 |
tejbeer |
413 |
function() {
|
|
|
414 |
loadPaginatedNextItems('/insuranceDetailsPaginated', null,
|
|
|
415 |
'insurance-paginated', 'insurance-details-table',
|
|
|
416 |
'insurance-policy-details-container');
|
|
|
417 |
$(this).blur();
|
|
|
418 |
});
|
| 27755 |
amit.gupta |
419 |
$(document).on('click', "#insurance-paginated .previous",
|
| 27819 |
tejbeer |
420 |
function() {
|
|
|
421 |
loadPaginatedNextItems('/insuranceDetailsPaginated', null,
|
|
|
422 |
'insurance-paginated', 'insurance-details-table',
|
|
|
423 |
'insurance-policy-details-container');
|
|
|
424 |
$(this).blur();
|
|
|
425 |
});
|
| 23973 |
govind |
426 |
|
| 27755 |
amit.gupta |
427 |
$(document).on('click', "#sale-history-paginated .previous",
|
| 27819 |
tejbeer |
428 |
function() {
|
|
|
429 |
var params = {};
|
|
|
430 |
params['searchType'] = saleSearchObj.searchType;
|
|
|
431 |
params['searchValue'] = saleSearchObj.searchText;
|
|
|
432 |
params['startTime'] = walletHistory.startTime;
|
|
|
433 |
params['endTime'] = walletHistory.endTime;
|
|
|
434 |
loadPaginatedPreviousItems('/getPaginatedSaleHistory', params,
|
|
|
435 |
'sale-history-paginated', 'sale-history-table',
|
|
|
436 |
'sale-details-container');
|
|
|
437 |
$(this).blur();
|
|
|
438 |
});
|
| 23973 |
govind |
439 |
|
|
|
440 |
// grn-details
|
|
|
441 |
|
| 27754 |
amit.gupta |
442 |
$(document).on('click', ".sale-details", function() {
|
| 23654 |
amit.gupta |
443 |
orderId = $(this).attr('data');
|
| 23973 |
govind |
444 |
console.log("orderId = " + orderId);
|
|
|
445 |
loadSaleDetails(orderId, "sale-details-container");
|
| 23343 |
ashik.ali |
446 |
});
|
| 27861 |
tejbeer |
447 |
|
|
|
448 |
$(document).on('click', "#editamountbutton", function() {
|
|
|
449 |
$('#editAmount').show();
|
|
|
450 |
});
|
|
|
451 |
|
|
|
452 |
|
|
|
453 |
|
|
|
454 |
|
|
|
455 |
|
| 23343 |
ashik.ali |
456 |
});
|
|
|
457 |
|
| 23973 |
govind |
458 |
function loadSaleDetails(orderId, domId) {
|
|
|
459 |
doGetAjaxRequestHandler(context + "/saleDetails?orderId=" + orderId,
|
| 27819 |
tejbeer |
460 |
function(response) {
|
|
|
461 |
$('#' + domId).html(response);
|
|
|
462 |
});
|
| 23343 |
ashik.ali |
463 |
}
|
|
|
464 |
|
| 26647 |
tejbeer |
465 |
function loadPendingOrder(domId) {
|
|
|
466 |
doGetAjaxRequestHandler(context + "/pendingOrders", function(response) {
|
|
|
467 |
$('#' + domId).html(response);
|
|
|
468 |
|
|
|
469 |
});
|
|
|
470 |
}
|
|
|
471 |
|
| 28339 |
tejbeer |
472 |
function loadClaimedOrder(domId) {
|
|
|
473 |
doGetAjaxRequestHandler(context + "/claimedOrders", function(response) {
|
|
|
474 |
$('#' + domId).html(response);
|
|
|
475 |
|
|
|
476 |
});
|
|
|
477 |
}
|
|
|
478 |
|
|
|
479 |
|
|
|
480 |
function loadBilledOrder(domId) {
|
|
|
481 |
doGetAjaxRequestHandler(context + "/billedOrders", function(response) {
|
|
|
482 |
$('#' + domId).html(response);
|
|
|
483 |
|
|
|
484 |
});
|
|
|
485 |
}
|
|
|
486 |
|
|
|
487 |
|
|
|
488 |
|
|
|
489 |
function loadUnsettledOrder(domId) {
|
|
|
490 |
doGetAjaxRequestHandler(context + "/unsettledOrders", function(response) {
|
|
|
491 |
$('#' + domId).html(response);
|
|
|
492 |
|
|
|
493 |
});
|
|
|
494 |
}
|
|
|
495 |
|
|
|
496 |
|
|
|
497 |
function loadSettledOrder(domId) {
|
|
|
498 |
doGetAjaxRequestHandler(context + "/settledOrders", function(response) {
|
|
|
499 |
$('#' + domId).html(response);
|
|
|
500 |
|
|
|
501 |
});
|
|
|
502 |
}
|
| 23973 |
govind |
503 |
function loadSearchOrder(domId) {
|
|
|
504 |
doGetAjaxRequestHandler(context + "/getSearchOrder", function(response) {
|
| 23584 |
ashik.ali |
505 |
$('#' + domId).html(response);
|
|
|
506 |
});
|
|
|
507 |
}
|
|
|
508 |
|
| 27819 |
tejbeer |
509 |
function loadInvoiceSearchOrder(domId) {
|
|
|
510 |
console.log("Hello");
|
|
|
511 |
doGetAjaxRequestHandler(context + "/getInvoiceSearchOrder", function(response) {
|
| 23584 |
ashik.ali |
512 |
$('#' + domId).html(response);
|
|
|
513 |
});
|
|
|
514 |
}
|
|
|
515 |
|
| 27819 |
tejbeer |
516 |
function loadSearchOrderDetails(invoiceNumber, domId) {
|
|
|
517 |
doGetAjaxRequestHandler(context + "/searchOrderDetails?invoiceNumber="
|
|
|
518 |
+ invoiceNumber, function(response) {
|
|
|
519 |
$('#' + domId).html(response);
|
| 27861 |
tejbeer |
520 |
$('#editAmount').hide();
|
|
|
521 |
|
| 27819 |
tejbeer |
522 |
});
|
|
|
523 |
}
|
|
|
524 |
|
| 23973 |
govind |
525 |
function saleHistory(domId, searchType, searchValue, startTime, endTime) {
|
|
|
526 |
doGetAjaxRequestHandler(context + "/saleHistory?searchType=" + searchType
|
| 27819 |
tejbeer |
527 |
+ "&searchValue=" + searchValue + "&startTime=" + startTime
|
|
|
528 |
+ "&endTime=" + endTime, function(response) {
|
|
|
529 |
$('#' + domId).html(response);
|
|
|
530 |
});
|
| 23343 |
ashik.ali |
531 |
}
|
|
|
532 |
|
| 23973 |
govind |
533 |
function saleHistorySearchInfo(searchType, searchText, startTime, endTime) {
|
| 23343 |
ashik.ali |
534 |
saleHistory("main-content", searchType, searchText, startTime, endTime);
|
| 24105 |
govind |
535 |
|
|
|
536 |
}
|
| 24880 |
govind |
537 |
function insurancePolicyDetails(domId) {
|
|
|
538 |
doGetAjaxRequestHandler(context + "/insuranceDetails", function(response) {
|
|
|
539 |
$('#' + domId).html(response);
|
|
|
540 |
});
|
|
|
541 |
}
|
| 25093 |
amit.gupta |
542 |
|
|
|
543 |
function downloadInvoices(searchType, searchValue, startTime, endTime) {
|
|
|
544 |
doAjaxGetDownload(context + "/downloadInvoices?searchType=" + searchType
|
| 27819 |
tejbeer |
545 |
+ "&searchValue=" + searchValue + "&startTime=" + startTime
|
|
|
546 |
+ "&endTime=" + endTime, "invoices.pdf");
|
| 25093 |
amit.gupta |
547 |
}
|