Subversion Repositories SmartDukaan

Rev

Rev 35971 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
33507 tejus.loha 1
<section class="wrapper">
2
    <style>
34085 tejus.loha 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
        /*}*/
33507 tejus.loha 16
        #paymentDetail:hover {
33582 tejus.loha 17
            background-color: #9acfea;
33507 tejus.loha 18
        }
33525 tejus.loha 19
 
20
        #paymentDetail {
21
            background-color: gainsboro;
22
        }
33578 tejus.loha 23
 
34085 tejus.loha 24
        /*.padd-lr {*/
25
        /*    padding-left: 10px;*/
26
        /*    padding-right: 10px;*/
27
        /*}*/
33582 tejus.loha 28
 
29
        .mk_docVerified {
30
            width: 40px;
31
        }
32
 
33
        .mk_feeCompleted {
34
            width: 40px;
35
        }
33617 tejus.loha 36
 
37
        #allPendingLoiForm td, #allPendingLoiForm th {
38
            min-width: 95px;
39
        }
34085 tejus.loha 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
        }
33507 tejus.loha 86
    </style>
33559 tejus.loha 87
    <div class="row ">
88
        <div class="col-lg-12">
89
            <h3 class="page-header"><i class="icon_document_alt"></i>PENDING LOI</h3>
90
            <ol class="breadcrumb">
91
                <li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
92
                <li><i class="icon_document_alt"></i>Pending LOI Forms</li>
33711 tejus.loha 93
                #if($isAuthUser ||$isDocApprover)
33617 tejus.loha 94
                    <div style="float:right;margin-bottom: 1%">
95
                        From:
96
                        <input type="date" name="from" placeholder="Form">
97
                        To:
98
                        <input type="date" name="to" placeholder="To">
99
                        <button id="downloadAllLoiForm">
34085 tejus.loha 100
                            Download
33617 tejus.loha 101
                        </button>
102
                    </div>
103
                #end
33559 tejus.loha 104
            </ol>
105
        </div>
106
    </div>
33617 tejus.loha 107
    <div>
108
        <div class="col-lg-12">
34085 tejus.loha 109
            ##            <div style="display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;">
110
            ####                <div class="right-align">
111
            ####                    <span style="margin-right: 10px;">Search</span>
112
            ####                    <input placeholder="Search Name"
113
            ####                           type="text"
114
            ####                           class="form-control"
115
            ####                           id="loiform-search-by-name"
116
            ####                           name="partner"
117
            ####                           value="">
118
            ####                </div>
119
            ##                <div class="left-align">
120
            ##                    <span>Show</span>
121
            ##                    <select style="width: 70px; height: 30px; margin: 0 10px;" name="pageSize">
122
            ##                        #foreach($size in $pageSizes)
123
            ##                            <option value="$size" #if($size==$pageSize) selected #end>$size</option>
124
            ##                        #end
125
            ##                    </select>
126
            ##                    <span>Entries</span>
127
            ##                </div>
128
            ##            </div>
129
            <div class="pending-loi-forms table-responsive">
130
                <table class="table table-border table-condensed table-bordered table-responsive" id="allPendingLoiForm"
131
                       style="width:100%">
132
                    <thead class="row htable">
33617 tejus.loha 133
                    <tr>
34085 tejus.loha 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">
154
                            <input type="hidden" value="$data.getId()">
155
                            <td>$data.getId()</td>
156
                            <td>$data.getCompanyName()</td>
157
                            <td>$data.getLoiFormFilledBy()</td>
158
                            <td>$data.getOwnerName()</td>
159
                            <td>$data.getMobile()</td>
160
                            <td>$data.getEmail()</td>
161
                            <td>$data.getCity()</td>
162
                            <td class="currency">$data.getTotalCommitment()</td>
163
                            #if($isAgreedBrandFeeChanger)
164
                                <td><select name="brandType">
165
                                    $data.getBrandType()
166
                                    #foreach($type in $brandType)
167
                                        <option value="$type" #if($type==$data.getBrandType()) selected
168
                                        #end>$type</option>
169
                                    #end
170
                                </select>
171
                                <td><input name="brandFee" value="$data.getBrandFee()">
172
                                    <div align="right">
173
                                        <button type="button" class="save_agree_brand_fee btn-success"
174
                                                value="$data.getId()">Save
175
                                        </button>
176
                                    </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()
33710 tejus.loha 186
                            </td>
33845 tejus.loha 187
                            <td>$data.getStatus()</td>
34085 tejus.loha 188
                            #if($data.isDocVerified().equals(true))
189
                                <td style="background-color: #2ac845" class="mk_docVerified">Yes</td>
190
                            #elseif($data.isDocVerified().equals(false))
191
                                <td style="background-color: red" class="mk_docVerified">No</td>
192
                            #else
193
                                <td>--</td>
194
                            #end
195
                            #if($data.getBrandFee()==$data.getTotalFeeCollection())
196
                                <td style="background-color: #2ac845" class="mk_feeCompleted">Yes</td>
197
                            #else
198
                                <td style="background-color: red" class="mk_feeCompleted">No</td>
199
                            #end
33507 tejus.loha 200
 
34085 tejus.loha 201
                            #if(!$data.isPaymentApprover())
202
                                <td>
35971 aman 203
                                    #if($data.getStatus().name() == 'LOI_REJECT')
204
                                        <span style="color:red; font-weight:bold;">LOI Rejected</span>
205
                                        #if($isAuthUser)
206
                                            <button type="button" class="btn-success mk-approve-loi"
207
                                                    value="$data.getId()"
208
                                                    data-company="$data.getCompanyName()" data-flag="1">
209
                                                Re-Approve Loi
210
                                            </button>
211
                                        #end
212
                                    #else
35977 aman 213
                                        #if(!$data.isLoiOtpPresent() &&  $data.isDocVerified() && $data.getBrandFee()==$data.getTotalFeeCollection() && !$data.isDocApprover() && $data.isLoiApproved())
34085 tejus.loha 214
                                        <button type="button" class="btn-primary generateLoi" value="$data.getId()">
215
                                            Generate
216
                                            LOI
217
                                        </button>
33712 tejus.loha 218
 
34085 tejus.loha 219
                                    #end
220
                                    #if($isAuthUser)
221
                                        <button type="button" class="btn-danger mk-approve-loi" value="$data.getId()"
222
                                                data-company="$data.getCompanyName()" data-flag="0">Reject Loi
223
                                        </button>
224
                                    #end
225
                                    #if(!($data.getLoiFillerEmail().equals($data.getLoginEmail())) && !$data.isDocApprover() && !$data.isLoiApproved() &&!$isAuthUser)
226
                                        <button type="button" class="btn-danger mk-approve-loi" value="$data.getId()"
227
                                                data-company="$data.getCompanyName()" data-flag="0">Reject Loi
228
                                        </button>
229
                                        <button type="button" class="btn-success mk-approve-loi" value="$data.getId()"
230
                                                data-company="$data.getCompanyName()" data-flag="1">
231
                                            Approve Loi
232
                                        </button>
233
                                    #end
33507 tejus.loha 234
 
34085 tejus.loha 235
                                    #if($data.getBrandFee()>$data.getTotalFeeCollection() && !$data.isDocApprover())
236
                                        <button type="button" class="btn-primary payModelBtn" value="$data.getId()"
237
                                                data-toggle="modal" data-target="#brandFeeCollectionModel">Add payment
238
                                        </button>
239
                                    #end
240
                                    #if($data.getLoiDoc()==0 && $data.isSalesTeam() && !$data.isLoiOtpPresent() && !$data.isDocApprover())
241
                                        <button type="button" class="btn-primary updateLoiForm" value="$data.getId()"
242
                                                style="width: 100px">Update
243
                                        </button>
244
                                    #end
245
                                    #if(!$data.isDocVerified() && $data.isSalesTeam()&& !$data.isDocApprover())
246
                                        <button type="button" class="upload-document-form btn-primary"
247
                                                value="$data.getId()">Upload
248
                                            Document
249
                                        </button>
250
                                    #else
251
                                        #if($data.isDocApprover())
252
                                            #if($data.isDocApprover() && !$data.isDocVerified())
253
                                                <button class="upload-document-form btn-primary" value="$data.getId()">
254
                                                    Approve
255
                                                    Document
256
                                                </button>
257
                                            #else
258
                                                <p>Document verified</p>
259
                                            #end
33617 tejus.loha 260
                                        #end
33577 tejus.loha 261
                                    #end
35971 aman 262
                                    #end
34085 tejus.loha 263
                                </td>
264
                            #else
265
                                <td>
266
                                    <button id="paymentDetail"
267
                                            onclick="getPaymentsDetails($data.getId())" data-toggle="modal"
268
                                            data-target="#commonModalDiv">View Payments
269
                                    </button>
270
                                </td>
271
                            #end
272
                        </tr>
33617 tejus.loha 273
                        #end
34085 tejus.loha 274
                    </tbody>
275
                    <tfoot class="row htable">
276
                    <tr>
277
                        <th>Id</th>
278
                        <th>Company Name</th>
279
                        <th>Filled By</th>
280
                        <th>Owner name</th>
281
                        <th>Mobile</th>
282
                        <th>Email</th>
283
                        <th>Billing City</th>
284
                        <th>Total Commit</th>
285
                        <th>Brand Type</th>
286
                        <th>Brand Fee</th>
287
                        <th>Total collection</th>
288
                        <th>Status</th>
289
                        <th>Document Verified</th>
290
                        <th>Brand Fee Completed</th>
291
                        <th>Action</th>
33617 tejus.loha 292
                    </tr>
34085 tejus.loha 293
                    </tfoot>
294
                </table>
295
            </div>
33617 tejus.loha 296
        </div>
34085 tejus.loha 297
 
298
 
299
        ##        <div style="margin-left: 2%" id="paginationInfo">$paginationInfo</div>
300
        ##        <div class="stack">
301
        ##            <div id="pagination" class="pagination"></div>
302
        ##        </div>
33507 tejus.loha 303
    </div>
304
 
305
 
306
    <div class="modal fade" id="brandFeeCollectionModel" role="dialog">
33578 tejus.loha 307
        <div class="modal-dialog modal-lg">
33507 tejus.loha 308
 
309
            <!-- Modal content-->
310
            <div class="modal-content">
311
                <div class="modal-header">
312
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
313
                    <h4 class="modal-title">Brand Fee Collection Form</h4>
314
                </div>
315
                <div class="modal-body" style="max-height: 500px;overflow-y: auto;">
316
                    <form name="brandFeeCollectionForm" id="brandFeeCollectionForm" style="align-content: center"
317
                          method="post">
33885 tejus.loha 318
 
33507 tejus.loha 319
                        <div class="row">
33578 tejus.loha 320
                            <div class="col-lg-2">
33507 tejus.loha 321
                                <div class="form-group">
33578 tejus.loha 322
                                    <label>Amount:</label>
35971 aman 323
                                    <input type="number" name="collectedAmount" class="form-control"
324
                                           placeholder="Enter amount" required></div>
33507 tejus.loha 325
                            </div>
33578 tejus.loha 326
                            <div class="col-lg-2">
33507 tejus.loha 327
                                <div class="form-group">
33578 tejus.loha 328
                                    <label>Payment Mode:</label>
33507 tejus.loha 329
                                    <select class="form-control" name="paymentMode" required>
35971 aman 330
                                        <option value="" selected>Select mode</option>
33507 tejus.loha 331
                                        <option value="UPI">UPI</option>
332
                                        <option value="Cheque">Cheque</option>
333
                                        <option value="IMPS">IMPS</option>
334
                                        <option value="NEFT">NEFT</option>
335
                                        <option value="RTGS">RTGS</option>
336
                                    </select>
337
                                </div>
338
                            </div>
33578 tejus.loha 339
                            <div class="col-lg-2">
33507 tejus.loha 340
                                <div class="form-group">
33578 tejus.loha 341
                                    <label>Reference No:</label>
35971 aman 342
                                    <input type="text" name="paymentReferenceNo" class="form-control"
343
                                           placeholder="Enter reference no" required>
33507 tejus.loha 344
                                </div>
345
                            </div>
33885 tejus.loha 346
                            <div class="col-lg-2">
33507 tejus.loha 347
                                <div class="form-group">
33885 tejus.loha 348
                                    <label>Attachment:</label>
349
                                    <input type="hidden" id="payment-sc-docId" name="paymentAttachment">
350
                                    <input type="file" class="form-control" id="payment-sc-doc" required>
351
                                </div>
352
                            </div>
353
                            <div class="col-lg-3">
354
                                <div class="form-group">
33578 tejus.loha 355
                                    <label>Collecting Date:</label>
356
                                    <input type="datetime-local" name="feeCollectingTimeStamp" class="form-control"
357
                                           required>
358
                                </div>
359
                            </div>
33885 tejus.loha 360
                            <div class="col-lg-1">
33578 tejus.loha 361
                                <div class="form-group">
33507 tejus.loha 362
                                    <button type="button" class="btn-primary " id="addBrandFeePayment" value=""
363
                                            style="margin-top:28px;">Add
364
                                    </button>
365
                                </div>
366
 
367
                            </div>
368
                        </div>
369
                    </form>
370
                </div>
371
                <div class="modal-footer">
372
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
373
                </div>
374
            </div>
375
 
376
        </div>
377
    </div>
378
    <div class="modal fade" id="commonModalDiv" role="dialog">
33885 tejus.loha 379
        <div class="modal-dialog modal-lg" style="width:1300px;">
33507 tejus.loha 380
 
381
            <!-- Modal content-->
382
            <div class="modal-content">
383
                <div class="modal-header">
384
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
385
                </div>
33658 tejus.loha 386
                <div class="modal-body" style="width: 100% ;align-items: center">
33507 tejus.loha 387
                    <div id="commonModalBody">
388
                        ## dynemic model bodies
389
                    </div>
390
                </div>
391
                <div class="modal-footer">
392
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
393
                </div>
394
            </div>
395
 
396
        </div>
397
    </div>
398
 
399
 
400
</section>
401
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.2/jspdf.min.js"></script>
402
<script>
403
    $(document).ready(function () {
404
        $('.payModelBtn').click(function () {
405
            let loiId = $(this).val();
406
            addBrandFeePayment.value = loiId;
407
        });
408
 
33617 tejus.loha 409
        var dtable = $('#allPendingLoiForm').DataTable({
410
            "scrollX": true,
411
            "scrollY": "500px",
412
            scrollCollapse: true,
413
            "fixedHeader": true,
414
            fixedColumns: {
33845 tejus.loha 415
                leftColumns: 2
33617 tejus.loha 416
            }
33507 tejus.loha 417
 
33617 tejus.loha 418
        });
34085 tejus.loha 419
 
33617 tejus.loha 420
    });
421
 
34085 tejus.loha 422
    function getPaymentsDetails(loiId) {
423
        doGetAjaxRequestHandler(`${context}/paymentsDetail?loiId=` + loiId, function (response) {
424
            //handle response here
425
            $('#commonModalDiv #commonModalBody').html(response);
426
            $('#commonModalDiv').modal('show');
427
        });
428
    }
429
 
430
        ## $(document).ready(function () {
431
        ##     $('.payModelBtn').click(function () {
432
        ##         let loiId = $(this).val();
433
        ##         addBrandFeePayment.value = loiId;
434
        ##     });
435
        ##     // Callback to Handle Page Changes
436
        ##     var page = 1
437
        ##     // pendingPageLoiForm(1);
438
        ##     $('div.modal-backdrop.fade').remove();
439
        ##
440
        ##     function onPageChangeHandler(selectedPage) {
441
        ##         page = selectedPage;
442
        ##         console.log('Selected Page:', selectedPage);
443
        ##         pendingPageLoiForm(selectedPage);
444
        ##     }
445
        ##
446
        ##     createPagination('pagination', $pageCount, page, onPageChangeHandler);
447
        ##     $('#allPendingLoiForm').DataTable({
448
        ##         searching: true,      // Disable searching
449
        ##         paging: false,         // Disable pagination
450
        ##         info: false,           // Disable entity size display
451
        ##         ordering: true,        // Enable sorting
452
        ##         fixedColumns:   {
453
        ##             leftColumns: 2
454
        ##         },
455
        ##     });
456
        ## });
457
        ##
458
        ## function getPaymentsDetails(loiId) {
459
        ##     doGetAjaxRequestHandler(`${context}/paymentsDetail?loiId=` + loiId, function (response) {
460
        ##         //handle response here
461
        ##         $('#commonModalDiv #commonModalBody').html(response);
462
        ##         $('#commonModalDiv').modal('show');
463
        ##     });
464
        ## }
465
        ##
466
        ## $(function () {
467
        ##     getPartnerAheadOptions($("#typeaheadpartner"), function (selectedPartner) {
468
        ##         partnerId = selectedPartner.partnerId;
469
        ##         console.log(partnerId);
470
        ##     });
471
        ## });
33507 tejus.loha 472
</script>