Subversion Repositories SmartDukaan

Rev

Rev 33711 | Rev 33845 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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