Subversion Repositories SmartDukaan

Rev

Rev 33617 | Rev 33710 | 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>
33617 tejus.loha 36
                #if($isAuthUser)
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>
79
                        <td class="currency">$data.getBrandFee()</td>
80
                        <td class="currency" class="btn btn-primary" id="paymentDetail"
81
                            onclick="getPaymentsDetails($data.getId())" data-toggle="modal"
82
                            data-target="#commonModalDiv"> $data.getTotalFeeCollection()
83
                        </td>
84
                        #if($data.isDocVerified().equals(true))
85
                            <td style="background-color: #2ac845" class="mk_docVerified">Yes</td>
86
                        #elseif($data.isDocVerified().equals(false))
87
                            <td style="background-color: red" class="mk_docVerified">No</td>
88
                        #else
89
                            <td>--</td>
90
                        #end
91
                        #if($data.getBrandFee()==$data.getTotalFeeCollection())
92
                            <td style="background-color: #2ac845" class="mk_feeCompleted">Yes</td>
93
                        #else
94
                            <td style="background-color: red" class="mk_feeCompleted">No</td>
95
                        #end
33507 tejus.loha 96
 
33617 tejus.loha 97
                        #if(!$data.isPaymentApprover())
98
                            <td>
99
                                #if(!$data.isLoiOtpPresent() &&  $data.isDocVerified() && $data.getTotalFeeCollection()!=0.0 && !$data.isDocApprover())
100
                                    <button type="button" class="btn-primary generateLoi" value="$data.getId()">Generate
101
                                        LOI
102
                                    </button>
103
                                #else
104
                                    #if(!$data.isLoiOtpPresent() && !$data.isDocApprover())
105
                                        <button type="button" value="$data.getId()"
106
                                                onclick="alert('Once all documents and at least 1st payment verified then you able to generate LOI')">
107
                                            Generate LOI
108
                                        </button>
109
                                    #end
110
                                #end
33507 tejus.loha 111
 
33617 tejus.loha 112
                                #if($data.getBrandFee()>$data.getTotalFeeCollection() && !$data.isDocApprover())
113
                                    <button type="button" class="btn-primary payModelBtn" value="$data.getId()"
114
                                            data-toggle="modal" data-target="#brandFeeCollectionModel">Add payment
33525 tejus.loha 115
                                    </button>
116
                                #end
33658 tejus.loha 117
                                #if($data.getLoiDoc()==0 && $data.isSalesTeam() && !$data.isLoiOtpPresent() && !$data.isDocApprover())
118
                                    <button type="button" class="btn-primary updateLoiForm" value="$data.getId()"
119
                                            style="width: 100px">Update
120
                                    </button>
121
                                #end
33617 tejus.loha 122
                                #if(!$data.isDocVerified() && $data.isSalesTeam()&& !$data.isDocApprover())
33658 tejus.loha 123
                                    <button type="button" class="upload-document-form btn-primary"
124
                                            value="$data.getId()">Upload
33617 tejus.loha 125
                                        Document
126
                                    </button>
127
                                #else
128
                                    #if($data.isDocApprover())
129
                                        #if($data.isDocApprover() && !$data.isDocVerified())
130
                                            <button class="upload-document-form btn-primary" value="$data.getId()">
131
                                                Approve
132
                                                Document
133
                                            </button>
134
                                        #else
135
                                            <p>Document verified</p>
136
                                        #end
33577 tejus.loha 137
                                    #end
138
                                #end
33617 tejus.loha 139
                            </td>
140
                        #else
141
                            <td>
142
                                <button id="paymentDetail"
143
                                        onclick="getPaymentsDetails($data.getId())" data-toggle="modal"
144
                                        data-target="#commonModalDiv">View Payments
145
                                </button>
146
                            </td>
147
                        #end
148
                    </tr>
33525 tejus.loha 149
                    #end
33617 tejus.loha 150
                </tbody>
151
            </table>
152
        </div>
33507 tejus.loha 153
    </div>
154
 
155
 
156
    <div class="modal fade" id="brandFeeCollectionModel" role="dialog">
33578 tejus.loha 157
        <div class="modal-dialog modal-lg">
33507 tejus.loha 158
 
159
            <!-- Modal content-->
160
            <div class="modal-content">
161
                <div class="modal-header">
162
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
163
                    <h4 class="modal-title">Brand Fee Collection Form</h4>
164
                </div>
165
                <div class="modal-body" style="max-height: 500px;overflow-y: auto;">
166
                    <form name="brandFeeCollectionForm" id="brandFeeCollectionForm" style="align-content: center"
167
                          method="post">
168
                        <div class="row">
33578 tejus.loha 169
 
170
                            <div class="col-lg-2">
33507 tejus.loha 171
                                <div class="form-group">
33578 tejus.loha 172
                                    <label>Amount:</label>
33507 tejus.loha 173
                                    <input type="number" name="collectedAmount" class="form-control" required></div>
174
                            </div>
33578 tejus.loha 175
                            <div class="col-lg-2">
33507 tejus.loha 176
                                <div class="form-group">
33578 tejus.loha 177
                                    <label>Payment Mode:</label>
33507 tejus.loha 178
                                    <select class="form-control" name="paymentMode" required>
179
                                        <option selected>Select mode</option>
180
                                        <option value="UPI">UPI</option>
181
                                        <option value="Cheque">Cheque</option>
182
                                        <option value="IMPS">IMPS</option>
183
                                        <option value="NEFT">NEFT</option>
184
                                        <option value="RTGS">RTGS</option>
185
                                    </select>
186
                                </div>
187
                            </div>
33578 tejus.loha 188
                            <div class="col-lg-2">
33507 tejus.loha 189
                                <div class="form-group">
33578 tejus.loha 190
                                    <label>Reference No:</label>
33507 tejus.loha 191
                                    <input type="text" name="paymentReferenceNo" class="form-control" required>
192
                                </div>
193
                            </div>
33578 tejus.loha 194
                            <div class="col-lg-4">
33507 tejus.loha 195
                                <div class="form-group">
33578 tejus.loha 196
                                    <label>Collecting Date:</label>
197
                                    <input type="datetime-local" name="feeCollectingTimeStamp" class="form-control"
198
                                           required>
199
                                </div>
200
                            </div>
201
                            <div class="col-lg-2">
202
                                <div class="form-group">
33507 tejus.loha 203
                                    <button type="button" class="btn-primary " id="addBrandFeePayment" value=""
204
                                            data-dismiss="modal"
205
                                            style="margin-top:28px;">Add
206
                                    </button>
207
                                </div>
208
 
209
                            </div>
210
                        </div>
211
                    </form>
212
                </div>
213
                <div class="modal-footer">
214
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
215
                </div>
216
            </div>
217
 
218
        </div>
219
    </div>
220
    <div class="modal fade" id="commonModalDiv" role="dialog">
33658 tejus.loha 221
        <div class="modal-dialog modal-lg" style="width:1000px;">
33507 tejus.loha 222
 
223
            <!-- Modal content-->
224
            <div class="modal-content">
225
                <div class="modal-header">
226
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
227
                </div>
33658 tejus.loha 228
                <div class="modal-body" style="width: 100% ;align-items: center">
33507 tejus.loha 229
                    <div id="commonModalBody">
230
                        ## dynemic model bodies
231
                    </div>
232
                </div>
233
                <div class="modal-footer">
234
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
235
                </div>
236
            </div>
237
 
238
        </div>
239
    </div>
240
 
241
 
242
</section>
243
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.2/jspdf.min.js"></script>
244
<script>
245
    $(document).ready(function () {
246
        $('.payModelBtn').click(function () {
247
            let loiId = $(this).val();
248
            addBrandFeePayment.value = loiId;
249
        });
250
    });
251
 
252
    function getPaymentsDetails(loiId) {
253
        doGetAjaxRequestHandler(`${context}/paymentsDetail?loiId=` + loiId, function (response) {
254
            //handle response here
255
            $('#commonModalDiv #commonModalBody').html(response);
256
        });
257
    }
258
 
33617 tejus.loha 259
    $(document).ready(function () {
260
        var dtable = $('#allPendingLoiForm').DataTable({
261
            "scrollX": true,
262
            "scrollY": "500px",
263
            scrollCollapse: true,
264
            "fixedHeader": true,
265
            fixedColumns: {
266
                leftColumns: 1
267
            }
33507 tejus.loha 268
 
33617 tejus.loha 269
        });
270
    });
271
 
33507 tejus.loha 272
</script>
273
<style>
274
    #paymentDetail.hover {
275
        color: #2b669a;
276
    }
277
</style>