| 34505 |
ranu |
1 |
// franchisee sale reports ---------------------------
|
|
|
2 |
// franchisee sale reports ---------------------------
|
|
|
3 |
// franchisee sale reports ---------------------------
|
|
|
4 |
|
|
|
5 |
$(document).on('click', '.analysis-franchise-sales', function () {
|
|
|
6 |
|
|
|
7 |
var fofoId = $(this).data("fofoid");
|
|
|
8 |
|
|
|
9 |
|
|
|
10 |
let endPoint = `${context}/analysis-franchiseeSalesReport?fofoId=${fofoId}`;
|
|
|
11 |
|
|
|
12 |
doGetAjaxRequestHandler(endPoint,
|
|
|
13 |
function (response) {
|
|
|
14 |
$('#' + 'main-content').html(response);
|
|
|
15 |
});
|
|
|
16 |
});
|
|
|
17 |
|
|
|
18 |
|
|
|
19 |
$(document).on('click', '.analysis-franchisee-sales-fetch-report', function () {
|
|
|
20 |
var startDate = $("#analysis-startDate-franchisee-sales").val();
|
|
|
21 |
|
|
|
22 |
var fofoId = $(this).data("fofoid");
|
|
|
23 |
|
|
|
24 |
var endDate = $("#analysis-endDate-franchisee-sales").val();
|
|
|
25 |
|
|
|
26 |
let endPoint = `${context}/analysis-franchiseeSalesReport?fofoId=${fofoId}&startDate=${startDate}&endDate=${endDate}`;
|
|
|
27 |
|
|
|
28 |
doGetAjaxRequestHandler(endPoint,
|
|
|
29 |
function (response) {
|
|
|
30 |
$('#' + 'main-content').html(response);
|
|
|
31 |
});
|
|
|
32 |
});
|
|
|
33 |
|
|
|
34 |
$(document).on('click', '.analysis-download-franchisee-sales', function () {
|
|
|
35 |
var fofoId = $(this).data("fofoid");
|
|
|
36 |
var startDate = $("#analysis-startDate-franchisee-sales").val();
|
|
|
37 |
|
|
|
38 |
var endDate = $("#analysis-endDate-franchisee-sales").val();
|
|
|
39 |
|
|
|
40 |
if (startDate == "" || startDate == undefined) {
|
|
|
41 |
|
|
|
42 |
alert("start date is not be empty!!");
|
|
|
43 |
return;
|
|
|
44 |
}
|
|
|
45 |
if (endDate == "" || endDate == undefined) {
|
|
|
46 |
|
|
|
47 |
alert("end date is not be empty!!");
|
|
|
48 |
return;
|
|
|
49 |
}
|
|
|
50 |
let endPoint = `${context}/analysis-downloadFranchiseeSales?startDate=${startDate}&endDate=${endDate}&fofoId=${fofoId}`;
|
|
|
51 |
window.location.href = endPoint;
|
|
|
52 |
});
|
|
|
53 |
|
|
|
54 |
|
|
|
55 |
// wallet summuary reports-----------------
|
|
|
56 |
// wallet summuary reports-----------------
|
|
|
57 |
// wallet summuary reports-----------------
|
|
|
58 |
|
|
|
59 |
$(document).on('click', ".analysis-wallet_statement", function () {
|
|
|
60 |
var fofoId = $(this).data("fofoid");
|
|
|
61 |
doGetAjaxRequestHandler(context + "/analysis-walletSummaryFetchReportByDate?fofoId=" + fofoId,
|
|
|
62 |
function (response) {
|
|
|
63 |
$('#' + 'main-content').html(response);
|
|
|
64 |
});
|
|
|
65 |
});
|
|
|
66 |
|
|
|
67 |
$(document).on('click', '.analysis-wallet-summary-fetch-report', function () {
|
|
|
68 |
var startDate = $("#analysis-startDate-wallet-summary-report").val();
|
|
|
69 |
|
|
|
70 |
var fofoId = $(this).data("fofoid");
|
|
|
71 |
|
|
|
72 |
var endDate = $("#analysis-endDate-wallet-summary-report").val();
|
|
|
73 |
|
|
|
74 |
let endPoint = `${context}/analysis-walletSummaryFetchReportByDate?fofoId=${fofoId}&startDate=${startDate}&endDate=${endDate}`;
|
|
|
75 |
|
|
|
76 |
doGetAjaxRequestHandler(endPoint,
|
|
|
77 |
function (response) {
|
|
|
78 |
$('#' + 'main-content').html(response);
|
|
|
79 |
});
|
|
|
80 |
});
|
|
|
81 |
|
|
|
82 |
$(document).on('click', '.analysis-download-wallet-summary-report', function () {
|
|
|
83 |
var fofoId = $(this).data("fofoid");
|
|
|
84 |
var startDate = $("#analysis-startDate-wallet-summary-report").val();
|
|
|
85 |
|
|
|
86 |
var endDate = $("#analysis-endDate-wallet-summary-report").val();
|
|
|
87 |
|
|
|
88 |
if (startDate == "" || startDate == undefined) {
|
|
|
89 |
|
|
|
90 |
alert("start date is not be empty!!");
|
|
|
91 |
return;
|
|
|
92 |
}
|
|
|
93 |
if (endDate == "" || endDate == undefined) {
|
|
|
94 |
|
|
|
95 |
alert("end date is not be empty!!");
|
|
|
96 |
return;
|
|
|
97 |
}
|
|
|
98 |
let endPoint = `${context}/analysis-downloadWalletSummaryReport?startDate=${startDate}&endDate=${endDate}&fofoId=${fofoId}`;
|
|
|
99 |
window.location.href = endPoint;
|
|
|
100 |
});
|
|
|
101 |
|
|
|
102 |
|
|
|
103 |
// account statement reports -----------------
|
|
|
104 |
// account statement reports -----------------
|
|
|
105 |
// account statement reports -----------------
|
|
|
106 |
// account statement reports -----------------
|
|
|
107 |
|
|
|
108 |
$(document).on('click', ".analysis-account-statement", function () {
|
|
|
109 |
var fofoId = $(this).data("fofoid");
|
|
|
110 |
doGetAjaxRequestHandler(context + "/analysis-account-statement?fofoId=" + fofoId,
|
|
|
111 |
function (response) {
|
|
|
112 |
$('#' + 'main-content').html(response);
|
|
|
113 |
});
|
|
|
114 |
});
|
|
|
115 |
|
|
|
116 |
$(document).on('click', '.analysis-download-partner-account-statement-report', function () {
|
|
|
117 |
var startDate = getDatesFromPicker('input[name="analysis-accountStatementPeriod"]').startDate;
|
|
|
118 |
var endDate = getDatesFromPicker('input[name="analysis-accountStatementPeriod"]').endDate;
|
|
|
119 |
var fofoId = $(this).data("fofoid");
|
|
|
120 |
if (startDate == "" || startDate == undefined) {
|
|
|
121 |
alert("start date is not be empty!!");
|
|
|
122 |
return;
|
|
|
123 |
}
|
|
|
124 |
if (endDate == "" || endDate == undefined) {
|
|
|
125 |
|
|
|
126 |
alert("end date is not be empty!!");
|
|
|
127 |
return;
|
|
|
128 |
}
|
|
|
129 |
let endPoint = `${context}/analysis/account/statement?startDate=${startDate}&endDate=${endDate}&fofoId=${fofoId}`;
|
|
|
130 |
|
|
|
131 |
window.location.href = endPoint;
|
|
|
132 |
});
|
|
|
133 |
$(document).on('click', '.analysis-fetch-partner-account-statement-report', function () {
|
|
|
134 |
var fofoId = $(this).data("fofoid");
|
|
|
135 |
var startDate = getDatesFromPicker('input[name="analysis-accountStatementPeriod"]').startDate;
|
|
|
136 |
var endDate = getDatesFromPicker('input[name="analysis-accountStatementPeriod"]').endDate;
|
|
|
137 |
|
|
|
138 |
if (startDate == "" || startDate == undefined) {
|
|
|
139 |
alert("start date is not be empty!!");
|
|
|
140 |
return;
|
|
|
141 |
}
|
|
|
142 |
if (endDate == "" || endDate == undefined) {
|
|
|
143 |
|
|
|
144 |
alert("end date is not be empty!!");
|
|
|
145 |
return;
|
|
|
146 |
}
|
|
|
147 |
|
|
|
148 |
doGetAjaxRequestHandler(context + "/analysis-account-statement-report?startDate=" + startDate + "&endDate=" + endDate + "&fofoId=" + fofoId,
|
|
|
149 |
function (response) {
|
|
|
150 |
$('.account-statement-conatiner').html(response);
|
|
|
151 |
});
|
|
|
152 |
|
|
|
153 |
});
|
|
|
154 |
|
|
|
155 |
|
|
|
156 |
// loan statement here ..................///
|
|
|
157 |
// loan statement here ..................///
|
|
|
158 |
// loan statement here ..................///
|
|
|
159 |
// loan statement here ..................///
|
|
|
160 |
|
|
|
161 |
|
|
|
162 |
$(document).on('click', ".analysis-loan-statement", function () {
|
|
|
163 |
var fofoId = $(this).data("fofoid");
|
|
|
164 |
doGetAjaxRequestHandler(context + "/analysis-loan/loan-statement?fofoId=" + fofoId,
|
|
|
165 |
function (response) {
|
|
|
166 |
$('#' + 'main-content').html(response);
|
|
|
167 |
});
|
|
|
168 |
});
|
|
|
169 |
|
|
|
170 |
$(document).on('click', '.analysis-partner-loan-statement-report', function () {
|
|
|
171 |
var fofoId = $(this).data("fofoid");
|
|
|
172 |
var startDate = getDatesFromPicker('input[name="analysis-loanStatementPeriod"]').startDate;
|
|
|
173 |
var endDate = getDatesFromPicker('input[name="analysis-loanStatementPeriod"]').endDate;
|
|
|
174 |
|
|
|
175 |
if (startDate == "" || startDate == undefined) {
|
|
|
176 |
alert("start date is not be empty!!");
|
|
|
177 |
return;
|
|
|
178 |
}
|
|
|
179 |
if (endDate == "" || endDate == undefined) {
|
|
|
180 |
|
|
|
181 |
alert("end date is not be empty!!");
|
|
|
182 |
return;
|
|
|
183 |
}
|
|
|
184 |
doGetAjaxRequestHandler(context + "/analysis-loan/partner-loan-statement-report?startDate=" + startDate + "&endDate=" + endDate + "&fofoId=" + fofoId,
|
|
|
185 |
function (response) {
|
|
|
186 |
$('.loan-statement-conatiner').html(response);
|
|
|
187 |
$('#loanStatementSummaryReport').DataTable({
|
|
|
188 |
"scrollX": true,
|
|
|
189 |
"bPaginate": true,
|
|
|
190 |
"bLengthChange": true,
|
|
|
191 |
"bFilter": true,
|
|
|
192 |
"bInfo": false,
|
|
|
193 |
"bAutoWidth": false
|
|
|
194 |
});
|
|
|
195 |
});
|
|
|
196 |
|
|
|
197 |
|
|
|
198 |
});
|
|
|
199 |
|
|
|
200 |
$(document).on('click', '.analysis-download-partner-loan-statement', function () {
|
|
|
201 |
var fofoId = $(this).data("fofoid");
|
|
|
202 |
var startDate = getDatesFromPicker('input[name="analysis-loanStatementPeriod"]').startDate;
|
|
|
203 |
var endDate = getDatesFromPicker('input[name="analysis-loanStatementPeriod"]').endDate;
|
|
|
204 |
|
|
|
205 |
if (startDate == "" || startDate == undefined) {
|
|
|
206 |
|
|
|
207 |
alert("start date is not be empty!!");
|
|
|
208 |
return;
|
|
|
209 |
}
|
|
|
210 |
if (endDate == "" || endDate == undefined) {
|
|
|
211 |
|
|
|
212 |
alert("end date is not be empty!!");
|
|
|
213 |
return;
|
|
|
214 |
}
|
|
|
215 |
let endPoint = `${context}/analysis-loan/download-partner-loan-statement-report?startDate=${startDate}&endDate=${endDate}&fofoId=${fofoId}`;
|
|
|
216 |
|
|
|
217 |
window.location.href = endPoint;
|
|
|
218 |
});
|