Subversion Repositories SmartDukaan

Rev

Rev 33848 | Rev 33885 | 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>
3
        #paymentDetail:hover {
33582 tejus.loha 4
            background-color: #9acfea;
33507 tejus.loha 5
        }
33525 tejus.loha 6
 
7
        #paymentDetail {
8
            background-color: gainsboro;
9
        }
33578 tejus.loha 10
 
11
        .padd-lr {
12
            padding-left: 10px;
13
            padding-right: 10px;
14
        }
33582 tejus.loha 15
 
16
        .mk_docVerified {
17
            width: 40px;
18
        }
19
 
20
        .mk_feeCompleted {
21
            width: 40px;
22
        }
33617 tejus.loha 23
 
24
        #allPendingLoiForm td, #allPendingLoiForm th {
25
            min-width: 95px;
26
        }
33507 tejus.loha 27
    </style>
33559 tejus.loha 28
    <div class="row ">
29
        <div class="col-lg-12">
30
            <h3 class="page-header"><i class="icon_document_alt"></i>PENDING LOI</h3>
31
            <ol class="breadcrumb">
32
                <li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
33
                <li><i class="icon_document_alt"></i>Pending LOI Forms</li>
33711 tejus.loha 34
                #if($isAuthUser ||$isDocApprover)
33617 tejus.loha 35
                    <div style="float:right;margin-bottom: 1%">
36
                        From:
37
                        <input type="date" name="from" placeholder="Form">
38
                        To:
39
                        <input type="date" name="to" placeholder="To">
40
                        <button id="downloadAllLoiForm">
41
                            Downlod
42
                        </button>
43
                    </div>
44
                #end
33559 tejus.loha 45
            </ol>
46
        </div>
47
    </div>
33617 tejus.loha 48
    <div>
49
        <div class="col-lg-12">
50
            <table class="table table-border table-condensed table-bordered" id="allPendingLoiForm" style="width:100%">
51
                <thead class="row htable">
52
                <tr>
33845 tejus.loha 53
                    <th>Id</th>
54
                    <th>Company Name</th>
33848 tejus.loha 55
                    <th>Filled By</th>
33845 tejus.loha 56
                    <th>Owner name</th>
57
                    <th>Mobile</th>
58
                    <th>Email</th>
33617 tejus.loha 59
                    <th>Billing City</th>
60
                    <th>Total Commit</th>
61
                    <th>Brand Type</th>
62
                    <th>Brand Fee</th>
63
                    <th>Total collection</th>
33845 tejus.loha 64
                    <th>Status</th>
33617 tejus.loha 65
                    <th>Document Verified</th>
66
                    <th>Brand Fee Completed</th>
67
                    <th>Action</th>
68
                </tr>
69
                </thead>
70
                <tbody>
71
                    #foreach($data in $pendingFormList)
72
                    <tr>
73
                        <input type="hidden" value="$data.getId()">
33845 tejus.loha 74
                        <td>$data.getId()</td>
75
                        <td>$data.getCompanyName()</td>
33848 tejus.loha 76
                        <td>$data.getLoiFormFilledBy()</td>
33845 tejus.loha 77
                        <td>$data.getOwnerName()</td>
78
                        <td>$data.getMobile()</td>
79
                        <td>$data.getEmail()</td>
33617 tejus.loha 80
                        <td>$data.getCity()</td>
81
                        <td class="currency">$data.getTotalCommitment()</td>
82
                        <td>$data.getBrandType()</td>
33710 tejus.loha 83
                        #if($isAgreedBrandFeeChanger)
84
                            <td><input name="brandFee" value="$data.getBrandFee()">
85
                                <div align="right">
86
                                    <button type="button" class="save_agree_brand_fee btn-success"
87
                                            value="$data.getId()">Save
88
                                    </button>
89
                                </div>
90
                            </td>
91
 
92
                        #else
93
                            <td class="currency">$data.getBrandFee()</td>
94
                        #end
33617 tejus.loha 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>
33845 tejus.loha 99
                            <td>$data.getStatus()</td>
33617 tejus.loha 100
                        #if($data.isDocVerified().equals(true))
101
                            <td style="background-color: #2ac845" class="mk_docVerified">Yes</td>
102
                        #elseif($data.isDocVerified().equals(false))
103
                            <td style="background-color: red" class="mk_docVerified">No</td>
104
                        #else
105
                            <td>--</td>
106
                        #end
107
                        #if($data.getBrandFee()==$data.getTotalFeeCollection())
108
                            <td style="background-color: #2ac845" class="mk_feeCompleted">Yes</td>
109
                        #else
110
                            <td style="background-color: red" class="mk_feeCompleted">No</td>
111
                        #end
33507 tejus.loha 112
 
33617 tejus.loha 113
                        #if(!$data.isPaymentApprover())
114
                            <td>
33848 tejus.loha 115
                                #if(!$data.isLoiOtpPresent() &&  $data.isDocVerified() && $data.getTotalFeeCollection()!=0.0 && !$data.isDocApprover() && $data.isLoiApproved())
33617 tejus.loha 116
                                    <button type="button" class="btn-primary generateLoi" value="$data.getId()">Generate
117
                                        LOI
118
                                    </button>
33712 tejus.loha 119
 
33617 tejus.loha 120
                                #end
33848 tejus.loha 121
                                #if(!($data.getLoiFillerEmail().equals($data.getLoginEmail())) && !$data.isDocApprover() && !$data.isLoiApproved())
33845 tejus.loha 122
                                    <button type="button" class="btn-danger mk-approve-loi" value="$data.getId()"
123
                                            data-company="$data.getCompanyName()" data-flag="0">Reject Loi
33712 tejus.loha 124
                                    </button>
33845 tejus.loha 125
                                    <button type="button" class="btn-success mk-approve-loi" value="$data.getId()"
126
                                            data-company="$data.getCompanyName()" data-flag="1">
127
                                        Approve Loi
128
                                    </button>
33712 tejus.loha 129
                                #end
33507 tejus.loha 130
 
33617 tejus.loha 131
                                #if($data.getBrandFee()>$data.getTotalFeeCollection() && !$data.isDocApprover())
132
                                    <button type="button" class="btn-primary payModelBtn" value="$data.getId()"
133
                                            data-toggle="modal" data-target="#brandFeeCollectionModel">Add payment
33525 tejus.loha 134
                                    </button>
135
                                #end
33658 tejus.loha 136
                                #if($data.getLoiDoc()==0 && $data.isSalesTeam() && !$data.isLoiOtpPresent() && !$data.isDocApprover())
137
                                    <button type="button" class="btn-primary updateLoiForm" value="$data.getId()"
138
                                            style="width: 100px">Update
139
                                    </button>
140
                                #end
33617 tejus.loha 141
                                #if(!$data.isDocVerified() && $data.isSalesTeam()&& !$data.isDocApprover())
33658 tejus.loha 142
                                    <button type="button" class="upload-document-form btn-primary"
143
                                            value="$data.getId()">Upload
33617 tejus.loha 144
                                        Document
145
                                    </button>
146
                                #else
147
                                    #if($data.isDocApprover())
148
                                        #if($data.isDocApprover() && !$data.isDocVerified())
149
                                            <button class="upload-document-form btn-primary" value="$data.getId()">
150
                                                Approve
151
                                                Document
152
                                            </button>
153
                                        #else
154
                                            <p>Document verified</p>
155
                                        #end
33577 tejus.loha 156
                                    #end
157
                                #end
33617 tejus.loha 158
                            </td>
159
                        #else
160
                            <td>
161
                                <button id="paymentDetail"
162
                                        onclick="getPaymentsDetails($data.getId())" data-toggle="modal"
163
                                        data-target="#commonModalDiv">View Payments
164
                                </button>
165
                            </td>
166
                        #end
167
                    </tr>
33525 tejus.loha 168
                    #end
33617 tejus.loha 169
                </tbody>
170
            </table>
171
        </div>
33507 tejus.loha 172
    </div>
173
 
174
 
175
    <div class="modal fade" id="brandFeeCollectionModel" role="dialog">
33578 tejus.loha 176
        <div class="modal-dialog modal-lg">
33507 tejus.loha 177
 
178
            <!-- Modal content-->
179
            <div class="modal-content">
180
                <div class="modal-header">
181
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
182
                    <h4 class="modal-title">Brand Fee Collection Form</h4>
183
                </div>
184
                <div class="modal-body" style="max-height: 500px;overflow-y: auto;">
185
                    <form name="brandFeeCollectionForm" id="brandFeeCollectionForm" style="align-content: center"
186
                          method="post">
187
                        <div class="row">
33578 tejus.loha 188
 
189
                            <div class="col-lg-2">
33507 tejus.loha 190
                                <div class="form-group">
33578 tejus.loha 191
                                    <label>Amount:</label>
33507 tejus.loha 192
                                    <input type="number" name="collectedAmount" class="form-control" required></div>
193
                            </div>
33578 tejus.loha 194
                            <div class="col-lg-2">
33507 tejus.loha 195
                                <div class="form-group">
33578 tejus.loha 196
                                    <label>Payment Mode:</label>
33507 tejus.loha 197
                                    <select class="form-control" name="paymentMode" required>
198
                                        <option selected>Select mode</option>
199
                                        <option value="UPI">UPI</option>
200
                                        <option value="Cheque">Cheque</option>
201
                                        <option value="IMPS">IMPS</option>
202
                                        <option value="NEFT">NEFT</option>
203
                                        <option value="RTGS">RTGS</option>
204
                                    </select>
205
                                </div>
206
                            </div>
33578 tejus.loha 207
                            <div class="col-lg-2">
33507 tejus.loha 208
                                <div class="form-group">
33578 tejus.loha 209
                                    <label>Reference No:</label>
33507 tejus.loha 210
                                    <input type="text" name="paymentReferenceNo" class="form-control" required>
211
                                </div>
212
                            </div>
33578 tejus.loha 213
                            <div class="col-lg-4">
33507 tejus.loha 214
                                <div class="form-group">
33578 tejus.loha 215
                                    <label>Collecting Date:</label>
216
                                    <input type="datetime-local" name="feeCollectingTimeStamp" class="form-control"
217
                                           required>
218
                                </div>
219
                            </div>
220
                            <div class="col-lg-2">
221
                                <div class="form-group">
33507 tejus.loha 222
                                    <button type="button" class="btn-primary " id="addBrandFeePayment" value=""
223
                                            data-dismiss="modal"
224
                                            style="margin-top:28px;">Add
225
                                    </button>
226
                                </div>
227
 
228
                            </div>
229
                        </div>
230
                    </form>
231
                </div>
232
                <div class="modal-footer">
233
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
234
                </div>
235
            </div>
236
 
237
        </div>
238
    </div>
239
    <div class="modal fade" id="commonModalDiv" role="dialog">
33658 tejus.loha 240
        <div class="modal-dialog modal-lg" style="width:1000px;">
33507 tejus.loha 241
 
242
            <!-- Modal content-->
243
            <div class="modal-content">
244
                <div class="modal-header">
245
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
246
                </div>
33658 tejus.loha 247
                <div class="modal-body" style="width: 100% ;align-items: center">
33507 tejus.loha 248
                    <div id="commonModalBody">
249
                        ## dynemic model bodies
250
                    </div>
251
                </div>
252
                <div class="modal-footer">
253
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
254
                </div>
255
            </div>
256
 
257
        </div>
258
    </div>
259
 
260
 
261
</section>
262
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.2/jspdf.min.js"></script>
263
<script>
264
    $(document).ready(function () {
265
        $('.payModelBtn').click(function () {
266
            let loiId = $(this).val();
267
            addBrandFeePayment.value = loiId;
268
        });
269
    });
270
 
271
    function getPaymentsDetails(loiId) {
272
        doGetAjaxRequestHandler(`${context}/paymentsDetail?loiId=` + loiId, function (response) {
273
            //handle response here
274
            $('#commonModalDiv #commonModalBody').html(response);
275
        });
276
    }
277
 
33617 tejus.loha 278
    $(document).ready(function () {
279
        var dtable = $('#allPendingLoiForm').DataTable({
280
            "scrollX": true,
281
            "scrollY": "500px",
282
            scrollCollapse: true,
283
            "fixedHeader": true,
284
            fixedColumns: {
33845 tejus.loha 285
                leftColumns: 2
33617 tejus.loha 286
            }
33507 tejus.loha 287
 
33617 tejus.loha 288
        });
289
    });
290
 
33507 tejus.loha 291
</script>
292
<style>
293
    #paymentDetail.hover {
294
        color: #2b669a;
295
    }
296
</style>