Subversion Repositories SmartDukaan

Rev

Rev 34018 | Rev 35971 | Go to most recent revision | 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>
203
                                    #if(!$data.isLoiOtpPresent() &&  $data.isDocVerified() && $data.getTotalFeeCollection()!=0.0 && !$data.isDocApprover() && $data.isLoiApproved())
204
                                        <button type="button" class="btn-primary generateLoi" value="$data.getId()">
205
                                            Generate
206
                                            LOI
207
                                        </button>
33712 tejus.loha 208
 
34085 tejus.loha 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
215
                                    #if(!($data.getLoiFillerEmail().equals($data.getLoginEmail())) && !$data.isDocApprover() && !$data.isLoiApproved() &&!$isAuthUser)
216
                                        <button type="button" class="btn-danger mk-approve-loi" value="$data.getId()"
217
                                                data-company="$data.getCompanyName()" data-flag="0">Reject Loi
218
                                        </button>
219
                                        <button type="button" class="btn-success mk-approve-loi" value="$data.getId()"
220
                                                data-company="$data.getCompanyName()" data-flag="1">
221
                                            Approve Loi
222
                                        </button>
223
                                    #end
33507 tejus.loha 224
 
34085 tejus.loha 225
                                    #if($data.getBrandFee()>$data.getTotalFeeCollection() && !$data.isDocApprover())
226
                                        <button type="button" class="btn-primary payModelBtn" value="$data.getId()"
227
                                                data-toggle="modal" data-target="#brandFeeCollectionModel">Add payment
228
                                        </button>
229
                                    #end
230
                                    #if($data.getLoiDoc()==0 && $data.isSalesTeam() && !$data.isLoiOtpPresent() && !$data.isDocApprover())
231
                                        <button type="button" class="btn-primary updateLoiForm" value="$data.getId()"
232
                                                style="width: 100px">Update
233
                                        </button>
234
                                    #end
235
                                    #if(!$data.isDocVerified() && $data.isSalesTeam()&& !$data.isDocApprover())
236
                                        <button type="button" class="upload-document-form btn-primary"
237
                                                value="$data.getId()">Upload
238
                                            Document
239
                                        </button>
240
                                    #else
241
                                        #if($data.isDocApprover())
242
                                            #if($data.isDocApprover() && !$data.isDocVerified())
243
                                                <button class="upload-document-form btn-primary" value="$data.getId()">
244
                                                    Approve
245
                                                    Document
246
                                                </button>
247
                                            #else
248
                                                <p>Document verified</p>
249
                                            #end
33617 tejus.loha 250
                                        #end
33577 tejus.loha 251
                                    #end
34085 tejus.loha 252
                                </td>
253
                            #else
254
                                <td>
255
                                    <button id="paymentDetail"
256
                                            onclick="getPaymentsDetails($data.getId())" data-toggle="modal"
257
                                            data-target="#commonModalDiv">View Payments
258
                                    </button>
259
                                </td>
260
                            #end
261
                        </tr>
33617 tejus.loha 262
                        #end
34085 tejus.loha 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>
33617 tejus.loha 281
                    </tr>
34085 tejus.loha 282
                    </tfoot>
283
                </table>
284
            </div>
33617 tejus.loha 285
        </div>
34085 tejus.loha 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>
33507 tejus.loha 292
    </div>
293
 
294
 
295
    <div class="modal fade" id="brandFeeCollectionModel" role="dialog">
33578 tejus.loha 296
        <div class="modal-dialog modal-lg">
33507 tejus.loha 297
 
298
            <!-- Modal content-->
299
            <div class="modal-content">
300
                <div class="modal-header">
301
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
302
                    <h4 class="modal-title">Brand Fee Collection Form</h4>
303
                </div>
304
                <div class="modal-body" style="max-height: 500px;overflow-y: auto;">
305
                    <form name="brandFeeCollectionForm" id="brandFeeCollectionForm" style="align-content: center"
306
                          method="post">
33885 tejus.loha 307
 
33507 tejus.loha 308
                        <div class="row">
33578 tejus.loha 309
                            <div class="col-lg-2">
33507 tejus.loha 310
                                <div class="form-group">
33578 tejus.loha 311
                                    <label>Amount:</label>
33507 tejus.loha 312
                                    <input type="number" name="collectedAmount" class="form-control" required></div>
313
                            </div>
33578 tejus.loha 314
                            <div class="col-lg-2">
33507 tejus.loha 315
                                <div class="form-group">
33578 tejus.loha 316
                                    <label>Payment Mode:</label>
33507 tejus.loha 317
                                    <select class="form-control" name="paymentMode" required>
318
                                        <option selected>Select mode</option>
319
                                        <option value="UPI">UPI</option>
320
                                        <option value="Cheque">Cheque</option>
321
                                        <option value="IMPS">IMPS</option>
322
                                        <option value="NEFT">NEFT</option>
323
                                        <option value="RTGS">RTGS</option>
324
                                    </select>
325
                                </div>
326
                            </div>
33578 tejus.loha 327
                            <div class="col-lg-2">
33507 tejus.loha 328
                                <div class="form-group">
33578 tejus.loha 329
                                    <label>Reference No:</label>
33507 tejus.loha 330
                                    <input type="text" name="paymentReferenceNo" class="form-control" required>
331
                                </div>
332
                            </div>
33885 tejus.loha 333
                            <div class="col-lg-2">
33507 tejus.loha 334
                                <div class="form-group">
33885 tejus.loha 335
                                    <label>Attachment:</label>
336
                                    <input type="hidden" id="payment-sc-docId" name="paymentAttachment">
337
                                    <input type="file" class="form-control" id="payment-sc-doc" required>
338
                                </div>
339
                            </div>
340
                            <div class="col-lg-3">
341
                                <div class="form-group">
33578 tejus.loha 342
                                    <label>Collecting Date:</label>
343
                                    <input type="datetime-local" name="feeCollectingTimeStamp" class="form-control"
344
                                           required>
345
                                </div>
346
                            </div>
33885 tejus.loha 347
                            <div class="col-lg-1">
33578 tejus.loha 348
                                <div class="form-group">
33507 tejus.loha 349
                                    <button type="button" class="btn-primary " id="addBrandFeePayment" value=""
350
                                            data-dismiss="modal"
351
                                            style="margin-top:28px;">Add
352
                                    </button>
353
                                </div>
354
 
355
                            </div>
356
                        </div>
357
                    </form>
358
                </div>
359
                <div class="modal-footer">
360
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
361
                </div>
362
            </div>
363
 
364
        </div>
365
    </div>
366
    <div class="modal fade" id="commonModalDiv" role="dialog">
33885 tejus.loha 367
        <div class="modal-dialog modal-lg" style="width:1300px;">
33507 tejus.loha 368
 
369
            <!-- Modal content-->
370
            <div class="modal-content">
371
                <div class="modal-header">
372
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
373
                </div>
33658 tejus.loha 374
                <div class="modal-body" style="width: 100% ;align-items: center">
33507 tejus.loha 375
                    <div id="commonModalBody">
376
                        ## dynemic model bodies
377
                    </div>
378
                </div>
379
                <div class="modal-footer">
380
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
381
                </div>
382
            </div>
383
 
384
        </div>
385
    </div>
386
 
387
 
388
</section>
389
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.2/jspdf.min.js"></script>
390
<script>
391
    $(document).ready(function () {
392
        $('.payModelBtn').click(function () {
393
            let loiId = $(this).val();
394
            addBrandFeePayment.value = loiId;
395
        });
396
 
33617 tejus.loha 397
        var dtable = $('#allPendingLoiForm').DataTable({
398
            "scrollX": true,
399
            "scrollY": "500px",
400
            scrollCollapse: true,
401
            "fixedHeader": true,
402
            fixedColumns: {
33845 tejus.loha 403
                leftColumns: 2
33617 tejus.loha 404
            }
33507 tejus.loha 405
 
33617 tejus.loha 406
        });
34085 tejus.loha 407
 
33617 tejus.loha 408
    });
409
 
34085 tejus.loha 410
    function getPaymentsDetails(loiId) {
411
        doGetAjaxRequestHandler(`${context}/paymentsDetail?loiId=` + loiId, function (response) {
412
            //handle response here
413
            $('#commonModalDiv #commonModalBody').html(response);
414
            $('#commonModalDiv').modal('show');
415
        });
416
    }
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
        ## });
33507 tejus.loha 460
</script>