Subversion Repositories SmartDukaan

Rev

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

Rev 34018 Rev 34085
Line 1... Line 1...
1
<section class="wrapper">
1
<section class="wrapper">
2
    <style>
2
    <style>
-
 
3
        /*.inline {*/
-
 
4
        /*    display: inline-block;*/
-
 
5
        /*    margin-right: 10px; !* Adjust spacing as needed *!*/
-
 
6
        /*}*/
-
 
7
        /*.left-align {*/
-
 
8
        /*    display: flex;*/
-
 
9
        /*    align-items: center;*/
-
 
10
        /*}*/
-
 
11
 
-
 
12
        /*.right-align {*/
-
 
13
        /*    display: flex;*/
-
 
14
        /*    align-items: center;*/
-
 
15
        /*}*/
3
        #paymentDetail:hover {
16
        #paymentDetail:hover {
4
            background-color: #9acfea;
17
            background-color: #9acfea;
5
        }
18
        }
6
 
19
 
7
        #paymentDetail {
20
        #paymentDetail {
8
            background-color: gainsboro;
21
            background-color: gainsboro;
9
        }
22
        }
10
 
23
 
11
        .padd-lr {
24
        /*.padd-lr {*/
12
            padding-left: 10px;
25
        /*    padding-left: 10px;*/
13
            padding-right: 10px;
26
        /*    padding-right: 10px;*/
14
        }
27
        /*}*/
15
 
28
 
16
        .mk_docVerified {
29
        .mk_docVerified {
17
            width: 40px;
30
            width: 40px;
18
        }
31
        }
19
 
32
 
Line 22... Line 35...
22
        }
35
        }
23
 
36
 
24
        #allPendingLoiForm td, #allPendingLoiForm th {
37
        #allPendingLoiForm td, #allPendingLoiForm th {
25
            min-width: 95px;
38
            min-width: 95px;
26
        }
39
        }
-
 
40
 
-
 
41
        #paymentDetail.hover {
-
 
42
            color: #2b669a;
-
 
43
        }
-
 
44
 
-
 
45
        .stack {
-
 
46
            clear: both;
-
 
47
        }
-
 
48
 
-
 
49
        /*.pagination {*/
-
 
50
        /*    display: flex;*/
-
 
51
        /*    gap: 5px;*/
-
 
52
        /*    align-items: center;*/
-
 
53
        /*    justify-content: center;*/
-
 
54
        /*    margin: 20px 0;*/
-
 
55
        /*}*/
-
 
56
 
-
 
57
        /*.pagination button {*/
-
 
58
        /*    padding: 8px 12px;*/
-
 
59
        /*    border: none;*/
-
 
60
        /*    border-radius: 4px;*/
-
 
61
        /*    background-color: #f4f4f4;*/
-
 
62
        /*    cursor: pointer;*/
-
 
63
        /*    transition: background-color 0.3s;*/
-
 
64
        /*}*/
-
 
65
 
-
 
66
        /*button.active {*/
-
 
67
        /*    background-color: #007bff;*/
-
 
68
        /*    color: white;*/
-
 
69
        /*    border: 1px solid #007bff;*/
-
 
70
        /*}*/
-
 
71
 
-
 
72
        /*button {*/
-
 
73
        /*    margin: 2px;*/
-
 
74
        /*    padding: 5px 10px;*/
-
 
75
        /*    cursor: pointer;*/
-
 
76
        /*}*/
-
 
77
 
-
 
78
        /*button:hover:not(.active) {*/
-
 
79
        /*    background-color: #f0f0f0;*/
-
 
80
        /*}*/
-
 
81
 
-
 
82
        #allPendingLoiForm td button:focus, #allPendingLoiForm td button:hover {
-
 
83
            background-position: unset;
-
 
84
            color: #ddd;
-
 
85
        }
27
    </style>
86
    </style>
28
    <div class="row ">
87
    <div class="row ">
29
        <div class="col-lg-12">
88
        <div class="col-lg-12">
30
            <h3 class="page-header"><i class="icon_document_alt"></i>PENDING LOI</h3>
89
            <h3 class="page-header"><i class="icon_document_alt"></i>PENDING LOI</h3>
31
            <ol class="breadcrumb">
90
            <ol class="breadcrumb">
Line 36... Line 95...
36
                        From:
95
                        From:
37
                        <input type="date" name="from" placeholder="Form">
96
                        <input type="date" name="from" placeholder="Form">
38
                        To:
97
                        To:
39
                        <input type="date" name="to" placeholder="To">
98
                        <input type="date" name="to" placeholder="To">
40
                        <button id="downloadAllLoiForm">
99
                        <button id="downloadAllLoiForm">
41
                            Downlod
100
                            Download
42
                        </button>
101
                        </button>
43
                    </div>
102
                    </div>
44
                #end
103
                #end
45
            </ol>
104
            </ol>
46
        </div>
105
        </div>
47
    </div>
106
    </div>
48
    <div>
107
    <div>
49
        <div class="col-lg-12">
108
        <div class="col-lg-12">
50
            <table class="table table-border table-condensed table-bordered" id="allPendingLoiForm" style="width:100%">
109
            ##            <div style="display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;">
51
                <thead class="row htable">
110
            ####                <div class="right-align">
-
 
111
            ####                    <span style="margin-right: 10px;">Search</span>
52
                <tr>
112
            ####                    <input placeholder="Search Name"
53
                    <th>Id</th>
113
            ####                           type="text"
54
                    <th>Company Name</th>
114
            ####                           class="form-control"
55
                    <th>Filled By</th>
115
            ####                           id="loiform-search-by-name"
56
                    <th>Owner name</th>
116
            ####                           name="partner"
57
                    <th>Mobile</th>
117
            ####                           value="">
58
                    <th>Email</th>
118
            ####                </div>
59
                    <th>Billing City</th>
119
            ##                <div class="left-align">
60
                    <th>Total Commit</th>
120
            ##                    <span>Show</span>
61
                    <th>Brand Type</th>
121
            ##                    <select style="width: 70px; height: 30px; margin: 0 10px;" name="pageSize">
62
                    <th>Brand Fee</th>
122
            ##                        #foreach($size in $pageSizes)
63
                    <th>Total collection</th>
123
            ##                            <option value="$size" #if($size==$pageSize) selected #end>$size</option>
64
                    <th>Status</th>
124
            ##                        #end
65
                    <th>Document Verified</th>
125
            ##                    </select>
66
                    <th>Brand Fee Completed</th>
126
            ##                    <span>Entries</span>
67
                    <th>Action</th>
127
            ##                </div>
68
                </tr>
128
            ##            </div>
69
                </thead>
129
            <div class="pending-loi-forms table-responsive">
-
 
130
                <table class="table table-border table-condensed table-bordered table-responsive" id="allPendingLoiForm"
70
                <tbody>
131
                       style="width:100%">
71
                    #foreach($data in $pendingFormList)
132
                    <thead class="row htable">
72
                    <tr>
133
                    <tr>
-
 
134
                        <th>Id</th>
-
 
135
                        <th>Company Name</th>
-
 
136
                        <th>Filled By</th>
-
 
137
                        <th>Owner name</th>
-
 
138
                        <th>Mobile</th>
-
 
139
                        <th>Email</th>
-
 
140
                        <th>Billing City</th>
-
 
141
                        <th>Total Commit</th>
-
 
142
                        <th>Brand Type</th>
-
 
143
                        <th>Brand Fee</th>
-
 
144
                        <th>Total collection</th>
-
 
145
                        <th>Status</th>
-
 
146
                        <th>Document Verified</th>
-
 
147
                        <th>Brand Fee Completed</th>
-
 
148
                        <th>Action</th>
-
 
149
                    </tr>
-
 
150
                    </thead>
-
 
151
                    <tbody id="allPendingLoiFormData">
-
 
152
                        #foreach($data in $pendingFormList)
-
 
153
                        <tr style="font-weight: bold">
73
                        <input type="hidden" value="$data.getId()">
154
                            <input type="hidden" value="$data.getId()">
74
                        <td>$data.getId()</td>
155
                            <td>$data.getId()</td>
75
                        <td>$data.getCompanyName()</td>
156
                            <td>$data.getCompanyName()</td>
76
                        <td>$data.getLoiFormFilledBy()</td>
157
                            <td>$data.getLoiFormFilledBy()</td>
77
                        <td>$data.getOwnerName()</td>
158
                            <td>$data.getOwnerName()</td>
78
                        <td>$data.getMobile()</td>
159
                            <td>$data.getMobile()</td>
79
                        <td>$data.getEmail()</td>
160
                            <td>$data.getEmail()</td>
80
                        <td>$data.getCity()</td>
161
                            <td>$data.getCity()</td>
81
                        <td class="currency">$data.getTotalCommitment()</td>
162
                            <td class="currency">$data.getTotalCommitment()</td>
-
 
163
                            #if($isAgreedBrandFeeChanger)
-
 
164
                                <td><select name="brandType">
82
                        <td>$data.getBrandType()</td>
165
                                    $data.getBrandType()
-
 
166
                                    #foreach($type in $brandType)
-
 
167
                                        <option value="$type" #if($type==$data.getBrandType()) selected
-
 
168
                                        #end>$type</option>
-
 
169
                                    #end
83
                        #if($isAgreedBrandFeeChanger)
170
                                </select>
84
                            <td><input name="brandFee" value="$data.getBrandFee()">
171
                                <td><input name="brandFee" value="$data.getBrandFee()">
85
                                <div align="right">
172
                                    <div align="right">
86
                                    <button type="button" class="save_agree_brand_fee btn-success"
173
                                        <button type="button" class="save_agree_brand_fee btn-success"
87
                                            value="$data.getId()">Save
174
                                                value="$data.getId()">Save
88
                                    </button>
175
                                        </button>
-
 
176
                                    </div>
89
                                </div>
177
                                </td>
-
 
178
 
-
 
179
                            #else
-
 
180
                                <td>$data.getBrandType()</td>
-
 
181
                                <td class="currency">$data.getBrandFee()</td>
-
 
182
                            #end
-
 
183
                            <td class="currency" class="btn btn-primary" id="paymentDetail"
-
 
184
                                onclick="getPaymentsDetails($data.getId())" data-toggle="modal"
-
 
185
                                data-target="#commonModalDiv"> $data.getTotalFeeCollection()
90
                            </td>
186
                            </td>
91
 
-
 
92
                        #else
-
 
93
                            <td class="currency">$data.getBrandFee()</td>
-
 
94
                        #end
-
 
95
                        <td class="currency" class="btn btn-primary" id="paymentDetail"
-
 
96
                            onclick="getPaymentsDetails($data.getId())" data-toggle="modal"
-
 
97
                            data-target="#commonModalDiv"> $data.getTotalFeeCollection()
-
 
98
                        </td>
-
 
99
                            <td>$data.getStatus()</td>
187
                            <td>$data.getStatus()</td>
100
                        #if($data.isDocVerified().equals(true))
188
                            #if($data.isDocVerified().equals(true))
101
                            <td style="background-color: #2ac845" class="mk_docVerified">Yes</td>
189
                                <td style="background-color: #2ac845" class="mk_docVerified">Yes</td>
102
                        #elseif($data.isDocVerified().equals(false))
190
                            #elseif($data.isDocVerified().equals(false))
103
                            <td style="background-color: red" class="mk_docVerified">No</td>
191
                                <td style="background-color: red" class="mk_docVerified">No</td>
104
                        #else
192
                            #else
105
                            <td>--</td>
193
                                <td>--</td>
106
                        #end
194
                            #end
107
                        #if($data.getBrandFee()==$data.getTotalFeeCollection())
195
                            #if($data.getBrandFee()==$data.getTotalFeeCollection())
108
                            <td style="background-color: #2ac845" class="mk_feeCompleted">Yes</td>
196
                                <td style="background-color: #2ac845" class="mk_feeCompleted">Yes</td>
109
                        #else
197
                            #else
110
                            <td style="background-color: red" class="mk_feeCompleted">No</td>
198
                                <td style="background-color: red" class="mk_feeCompleted">No</td>
111
                        #end
199
                            #end
112
 
200
 
113
                        #if(!$data.isPaymentApprover())
201
                            #if(!$data.isPaymentApprover())
114
                            <td>
202
                                <td>
115
                                #if(!$data.isLoiOtpPresent() &&  $data.isDocVerified() && $data.getTotalFeeCollection()!=0.0 && !$data.isDocApprover() && $data.isLoiApproved())
203
                                    #if(!$data.isLoiOtpPresent() &&  $data.isDocVerified() && $data.getTotalFeeCollection()!=0.0 && !$data.isDocApprover() && $data.isLoiApproved())
116
                                    <button type="button" class="btn-primary generateLoi" value="$data.getId()">Generate
204
                                        <button type="button" class="btn-primary generateLoi" value="$data.getId()">
-
 
205
                                            Generate
117
                                        LOI
206
                                            LOI
118
                                    </button>
207
                                        </button>
119
 
208
 
120
                                #end
209
                                    #end
-
 
210
                                    #if($isAuthUser)
-
 
211
                                        <button type="button" class="btn-danger mk-approve-loi" value="$data.getId()"
-
 
212
                                                data-company="$data.getCompanyName()" data-flag="0">Reject Loi
-
 
213
                                        </button>
-
 
214
                                    #end
121
                                #if(!($data.getLoiFillerEmail().equals($data.getLoginEmail())) && !$data.isDocApprover() && !$data.isLoiApproved())
215
                                    #if(!($data.getLoiFillerEmail().equals($data.getLoginEmail())) && !$data.isDocApprover() && !$data.isLoiApproved() &&!$isAuthUser)
122
                                    <button type="button" class="btn-danger mk-approve-loi" value="$data.getId()"
216
                                        <button type="button" class="btn-danger mk-approve-loi" value="$data.getId()"
123
                                            data-company="$data.getCompanyName()" data-flag="0">Reject Loi
217
                                                data-company="$data.getCompanyName()" data-flag="0">Reject Loi
124
                                    </button>
218
                                        </button>
125
                                    <button type="button" class="btn-success mk-approve-loi" value="$data.getId()"
219
                                        <button type="button" class="btn-success mk-approve-loi" value="$data.getId()"
126
                                            data-company="$data.getCompanyName()" data-flag="1">
220
                                                data-company="$data.getCompanyName()" data-flag="1">
127
                                        Approve Loi
221
                                            Approve Loi
128
                                    </button>
222
                                        </button>
129
                                #end
223
                                    #end
130
 
224
 
131
                                #if($data.getBrandFee()>$data.getTotalFeeCollection() && !$data.isDocApprover())
225
                                    #if($data.getBrandFee()>$data.getTotalFeeCollection() && !$data.isDocApprover())
132
                                    <button type="button" class="btn-primary payModelBtn" value="$data.getId()"
226
                                        <button type="button" class="btn-primary payModelBtn" value="$data.getId()"
133
                                            data-toggle="modal" data-target="#brandFeeCollectionModel">Add payment
227
                                                data-toggle="modal" data-target="#brandFeeCollectionModel">Add payment
134
                                    </button>
228
                                        </button>
135
                                #end
229
                                    #end
136
                                #if($data.getLoiDoc()==0 && $data.isSalesTeam() && !$data.isLoiOtpPresent() && !$data.isDocApprover())
230
                                    #if($data.getLoiDoc()==0 && $data.isSalesTeam() && !$data.isLoiOtpPresent() && !$data.isDocApprover())
137
                                    <button type="button" class="btn-primary updateLoiForm" value="$data.getId()"
231
                                        <button type="button" class="btn-primary updateLoiForm" value="$data.getId()"
138
                                            style="width: 100px">Update
232
                                                style="width: 100px">Update
139
                                    </button>
233
                                        </button>
140
                                #end
234
                                    #end
141
                                #if(!$data.isDocVerified() && $data.isSalesTeam()&& !$data.isDocApprover())
235
                                    #if(!$data.isDocVerified() && $data.isSalesTeam()&& !$data.isDocApprover())
142
                                    <button type="button" class="upload-document-form btn-primary"
236
                                        <button type="button" class="upload-document-form btn-primary"
143
                                            value="$data.getId()">Upload
237
                                                value="$data.getId()">Upload
144
                                        Document
238
                                            Document
145
                                    </button>
239
                                        </button>
146
                                #else
240
                                    #else
147
                                    #if($data.isDocApprover())
241
                                        #if($data.isDocApprover())
148
                                        #if($data.isDocApprover() && !$data.isDocVerified())
242
                                            #if($data.isDocApprover() && !$data.isDocVerified())
149
                                            <button class="upload-document-form btn-primary" value="$data.getId()">
243
                                                <button class="upload-document-form btn-primary" value="$data.getId()">
150
                                                Approve
244
                                                    Approve
151
                                                Document
245
                                                    Document
152
                                            </button>
246
                                                </button>
153
                                        #else
247
                                            #else
154
                                            <p>Document verified</p>
248
                                                <p>Document verified</p>
-
 
249
                                            #end
155
                                        #end
250
                                        #end
156
                                    #end
251
                                    #end
157
                                #end
252
                                </td>
158
                            </td>
-
 
159
                        #else
253
                            #else
160
                            <td>
254
                                <td>
161
                                <button id="paymentDetail"
255
                                    <button id="paymentDetail"
162
                                        onclick="getPaymentsDetails($data.getId())" data-toggle="modal"
256
                                            onclick="getPaymentsDetails($data.getId())" data-toggle="modal"
163
                                        data-target="#commonModalDiv">View Payments
257
                                            data-target="#commonModalDiv">View Payments
164
                                </button>
258
                                    </button>
165
                            </td>
259
                                </td>
-
 
260
                            #end
-
 
261
                        </tr>
166
                        #end
262
                        #end
-
 
263
                    </tbody>
-
 
264
                    <tfoot class="row htable">
-
 
265
                    <tr>
-
 
266
                        <th>Id</th>
-
 
267
                        <th>Company Name</th>
-
 
268
                        <th>Filled By</th>
-
 
269
                        <th>Owner name</th>
-
 
270
                        <th>Mobile</th>
-
 
271
                        <th>Email</th>
-
 
272
                        <th>Billing City</th>
-
 
273
                        <th>Total Commit</th>
-
 
274
                        <th>Brand Type</th>
-
 
275
                        <th>Brand Fee</th>
-
 
276
                        <th>Total collection</th>
-
 
277
                        <th>Status</th>
-
 
278
                        <th>Document Verified</th>
-
 
279
                        <th>Brand Fee Completed</th>
-
 
280
                        <th>Action</th>
167
                    </tr>
281
                    </tr>
168
                    #end
282
                    </tfoot>
169
                </tbody>
283
                </table>
170
            </table>
284
            </div>
171
        </div>
285
        </div>
-
 
286
 
-
 
287
 
-
 
288
        ##        <div style="margin-left: 2%" id="paginationInfo">$paginationInfo</div>
-
 
289
        ##        <div class="stack">
-
 
290
        ##            <div id="pagination" class="pagination"></div>
-
 
291
        ##        </div>
172
    </div>
292
    </div>
173
 
293
 
174
 
294
 
175
    <div class="modal fade" id="brandFeeCollectionModel" role="dialog">
295
    <div class="modal fade" id="brandFeeCollectionModel" role="dialog">
176
        <div class="modal-dialog modal-lg">
296
        <div class="modal-dialog modal-lg">
Line 271... Line 391...
271
    $(document).ready(function () {
391
    $(document).ready(function () {
272
        $('.payModelBtn').click(function () {
392
        $('.payModelBtn').click(function () {
273
            let loiId = $(this).val();
393
            let loiId = $(this).val();
274
            addBrandFeePayment.value = loiId;
394
            addBrandFeePayment.value = loiId;
275
        });
395
        });
276
    });
-
 
277
 
396
 
278
    function getPaymentsDetails(loiId) {
-
 
279
        doGetAjaxRequestHandler(`${context}/paymentsDetail?loiId=` + loiId, function (response) {
-
 
280
            //handle response here
-
 
281
            $('#commonModalDiv #commonModalBody').html(response);
-
 
282
            $('#commonModalDiv').modal('show');
-
 
283
 
-
 
284
        });
-
 
285
    }
-
 
286
 
-
 
287
    $(document).ready(function () {
-
 
288
        var dtable = $('#allPendingLoiForm').DataTable({
397
        var dtable = $('#allPendingLoiForm').DataTable({
289
            "scrollX": true,
398
            "scrollX": true,
290
            "scrollY": "500px",
399
            "scrollY": "500px",
291
            scrollCollapse: true,
400
            scrollCollapse: true,
292
            "fixedHeader": true,
401
            "fixedHeader": true,
293
            fixedColumns: {
402
            fixedColumns: {
294
                leftColumns: 2
403
                leftColumns: 2
295
            }
404
            }
296
 
405
 
297
        });
406
        });
-
 
407
 
298
    });
408
    });
299
 
409
 
300
</script>
410
    function getPaymentsDetails(loiId) {
-
 
411
        doGetAjaxRequestHandler(`${context}/paymentsDetail?loiId=` + loiId, function (response) {
301
<style>
412
            //handle response here
-
 
413
            $('#commonModalDiv #commonModalBody').html(response);
302
    #paymentDetail.hover {
414
            $('#commonModalDiv').modal('show');
303
        color: #2b669a;
415
        });
304
    }
416
    }
305
</style>
-
 
306
417
 
-
 
418
        ## $(document).ready(function () {
-
 
419
        ##     $('.payModelBtn').click(function () {
-
 
420
        ##         let loiId = $(this).val();
-
 
421
        ##         addBrandFeePayment.value = loiId;
-
 
422
        ##     });
-
 
423
        ##     // Callback to Handle Page Changes
-
 
424
        ##     var page = 1
-
 
425
        ##     // pendingPageLoiForm(1);
-
 
426
        ##     $('div.modal-backdrop.fade').remove();
-
 
427
        ##
-
 
428
        ##     function onPageChangeHandler(selectedPage) {
-
 
429
        ##         page = selectedPage;
-
 
430
        ##         console.log('Selected Page:', selectedPage);
-
 
431
        ##         pendingPageLoiForm(selectedPage);
-
 
432
        ##     }
-
 
433
        ##
-
 
434
        ##     createPagination('pagination', $pageCount, page, onPageChangeHandler);
-
 
435
        ##     $('#allPendingLoiForm').DataTable({
-
 
436
        ##         searching: true,      // Disable searching
-
 
437
        ##         paging: false,         // Disable pagination
-
 
438
        ##         info: false,           // Disable entity size display
-
 
439
        ##         ordering: true,        // Enable sorting
-
 
440
        ##         fixedColumns:   {
-
 
441
        ##             leftColumns: 2
-
 
442
        ##         },
-
 
443
        ##     });
-
 
444
        ## });
-
 
445
        ##
-
 
446
        ## function getPaymentsDetails(loiId) {
-
 
447
        ##     doGetAjaxRequestHandler(`${context}/paymentsDetail?loiId=` + loiId, function (response) {
-
 
448
        ##         //handle response here
-
 
449
        ##         $('#commonModalDiv #commonModalBody').html(response);
-
 
450
        ##         $('#commonModalDiv').modal('show');
-
 
451
        ##     });
-
 
452
        ## }
-
 
453
        ##
-
 
454
        ## $(function () {
-
 
455
        ##     getPartnerAheadOptions($("#typeaheadpartner"), function (selectedPartner) {
-
 
456
        ##         partnerId = selectedPartner.partnerId;
-
 
457
        ##         console.log(partnerId);
-
 
458
        ##     });
-
 
459
        ## });
-
 
460
</script>
-
 
461