Subversion Repositories SmartDukaan

Rev

Rev 33578 | Rev 33617 | 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
        }
33507 tejus.loha 23
    </style>
33559 tejus.loha 24
    <div class="row ">
25
        <div class="col-lg-12">
26
            <h3 class="page-header"><i class="icon_document_alt"></i>PENDING LOI</h3>
27
            <ol class="breadcrumb">
28
                <li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
29
                <li><i class="icon_document_alt"></i>Pending LOI Forms</li>
30
            </ol>
31
        </div>
32
    </div>
33507 tejus.loha 33
    <div class="dataTables_scrollBody">
34
        <table class="table table-bordered " style="width: 100%">
35
            <thead>
36
            <tr>
37
 
38
                <th>Owner name</th>
39
                <th>Company Name</th>
40
                <th>Billing City</th>
41
                <th>Total Commitment</th>
42
                <th>Brand Type</th>
43
                <th>Brand Fee</th>
44
                <th>Total collection</th>
33582 tejus.loha 45
                <th>Document Verified</th>
46
                <th>Brand Fee Completed</th>
33507 tejus.loha 47
                <th>Action</th>
48
 
49
 
50
            </tr>
51
            </thead>
52
            <tbody>
53
                #foreach($data in $pendingFormList)
54
                <tr>
55
                    <input type="hidden" value="$data.getId()">
56
                    <td>$data.getOwnerName()</td>
57
                    <td>$data.getCompanyName()</td>
58
                    <td>$data.getCity()</td>
59
                    <td class="currency">$data.getTotalCommitment()</td>
60
                    <td>$data.getBrandType()</td>
61
                    <td class="currency">$data.getBrandFee()</td>
33525 tejus.loha 62
                    <td class="currency" class="btn btn-primary" id="paymentDetail"
63
                        onclick="getPaymentsDetails($data.getId())" data-toggle="modal"
64
                        data-target="#commonModalDiv"> $data.getTotalFeeCollection()
65
                    </td>
33582 tejus.loha 66
                    #if($data.isDocVerified().equals(true))
67
                        <td style="background-color: #2ac845" class="mk_docVerified">Yes</td>
68
                    #elseif($data.isDocVerified().equals(false))
69
                        <td style="background-color: red" class="mk_docVerified">No</td>
70
                    #else
71
                        <td>--</td>
72
                    #end
73
                    #if($data.getBrandFee()==$data.getTotalFeeCollection())
74
                        <td style="background-color: #2ac845" class="mk_feeCompleted">Yes</td>
75
                    #else
76
                        <td style="background-color: red" class="mk_feeCompleted">No</td>
77
                    #end
78
 
33525 tejus.loha 79
                    #if(!$data.isPaymentApprover())
80
                        <td>
81
                            #if(!$data.isLoiOtpPresent() &&  $data.isDocVerified() && $data.getTotalFeeCollection()!=0.0 && !$data.isDocApprover())
82
                                <button type="button" class="btn-primary generateLoi" value="$data.getId()">Generate LOI
33507 tejus.loha 83
                                </button>
33525 tejus.loha 84
                            #else
85
                                #if(!$data.isLoiOtpPresent() && !$data.isDocApprover())
86
                                    <button type="button" value="$data.getId()"
87
                                            onclick="alert('Once all documents and at least 1st payment verified then you able to generate LOI')">
88
                                        Generate LOI
89
                                    </button>
90
                                #end
33507 tejus.loha 91
                            #end
92
 
33525 tejus.loha 93
                            #if($data.getBrandFee()>$data.getTotalFeeCollection() && !$data.isDocApprover())
94
                                <button type="button" class="btn-primary payModelBtn" value="$data.getId()"
95
                                        data-toggle="modal" data-target="#brandFeeCollectionModel">Add payment
96
                                </button>
97
                            #end
33577 tejus.loha 98
                            ##                            #if($data.getLoiDoc()==0 && $data.isSalesTeam() && !$data.isLoiOtpPresent() && !$data.isDocApprover())
99
                            ##                                <button type="button" class="btn-primary updateOnboardingForm" value="$data.getId()"
100
                            ##                                        style="width: 100px">Update
101
                            ##                                </button>
102
                            ##                            #end
33525 tejus.loha 103
                            #if(!$data.isDocVerified() && $data.isSalesTeam()&& !$data.isDocApprover())
104
                                <button class="upload-document-form btn-primary" value="$data.getId()">Upload Document
105
                                </button>
106
                            #else
33577 tejus.loha 107
                                #if($data.isDocApprover())
108
                                    #if($data.isDocApprover() && !$data.isDocVerified())
109
                                        <button class="upload-document-form btn-primary" value="$data.getId()">Approve
110
                                            Document
111
                                        </button>
112
                                    #else
113
                                        <p>Document verified</p>
114
                                    #end
115
                                #end
33525 tejus.loha 116
                            #end
117
                        </td>
118
                    #else
119
                        <td>
120
                            <button id="paymentDetail"
121
                                    onclick="getPaymentsDetails($data.getId())" data-toggle="modal"
33577 tejus.loha 122
                                    data-target="#commonModalDiv">View Payments
33507 tejus.loha 123
                            </button>
33525 tejus.loha 124
                        </td>
125
                    #end
33507 tejus.loha 126
                </tr>
127
                #end
128
            </tbody>
129
        </table>
130
    </div>
131
 
132
 
133
    <div class="modal fade" id="brandFeeCollectionModel" role="dialog">
33578 tejus.loha 134
        <div class="modal-dialog modal-lg">
33507 tejus.loha 135
 
136
            <!-- Modal content-->
137
            <div class="modal-content">
138
                <div class="modal-header">
139
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
140
                    <h4 class="modal-title">Brand Fee Collection Form</h4>
141
                </div>
142
                <div class="modal-body" style="max-height: 500px;overflow-y: auto;">
143
                    <form name="brandFeeCollectionForm" id="brandFeeCollectionForm" style="align-content: center"
144
                          method="post">
145
                        <div class="row">
33578 tejus.loha 146
 
147
                            <div class="col-lg-2">
33507 tejus.loha 148
                                <div class="form-group">
33578 tejus.loha 149
                                    <label>Amount:</label>
33507 tejus.loha 150
                                    <input type="number" name="collectedAmount" class="form-control" required></div>
151
                            </div>
33578 tejus.loha 152
                            <div class="col-lg-2">
33507 tejus.loha 153
                                <div class="form-group">
33578 tejus.loha 154
                                    <label>Payment Mode:</label>
33507 tejus.loha 155
                                    <select class="form-control" name="paymentMode" required>
156
                                        <option selected>Select mode</option>
157
                                        <option value="UPI">UPI</option>
158
                                        <option value="Cheque">Cheque</option>
159
                                        <option value="IMPS">IMPS</option>
160
                                        <option value="NEFT">NEFT</option>
161
                                        <option value="RTGS">RTGS</option>
162
                                    </select>
163
                                </div>
164
                            </div>
33578 tejus.loha 165
                            <div class="col-lg-2">
33507 tejus.loha 166
                                <div class="form-group">
33578 tejus.loha 167
                                    <label>Reference No:</label>
33507 tejus.loha 168
                                    <input type="text" name="paymentReferenceNo" class="form-control" required>
169
                                </div>
170
                            </div>
33578 tejus.loha 171
                            <div class="col-lg-4">
33507 tejus.loha 172
                                <div class="form-group">
33578 tejus.loha 173
                                    <label>Collecting Date:</label>
174
                                    <input type="datetime-local" name="feeCollectingTimeStamp" class="form-control"
175
                                           required>
176
                                </div>
177
                            </div>
178
                            <div class="col-lg-2">
179
                                <div class="form-group">
33507 tejus.loha 180
                                    <button type="button" class="btn-primary " id="addBrandFeePayment" value=""
181
                                            data-dismiss="modal"
182
                                            style="margin-top:28px;">Add
183
                                    </button>
184
                                </div>
185
 
186
                            </div>
187
                        </div>
188
                    </form>
189
                </div>
190
                <div class="modal-footer">
191
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
192
                </div>
193
            </div>
194
 
195
        </div>
196
    </div>
197
    <div class="modal fade" id="commonModalDiv" role="dialog">
33578 tejus.loha 198
        <div class="modal-dialog modal-lg">
33507 tejus.loha 199
 
200
            <!-- Modal content-->
201
            <div class="modal-content">
202
                <div class="modal-header">
203
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
204
                </div>
205
                <div class="modal-body" style="width: 100%">
206
                    <div id="commonModalBody">
207
                        ## dynemic model bodies
208
                    </div>
209
                </div>
210
                <div class="modal-footer">
211
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
212
                </div>
213
            </div>
214
 
215
        </div>
216
    </div>
217
 
218
 
219
</section>
220
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.2/jspdf.min.js"></script>
221
<script>
222
    $(document).ready(function () {
223
        $('.payModelBtn').click(function () {
224
            let loiId = $(this).val();
225
            addBrandFeePayment.value = loiId;
226
        });
227
    });
228
 
229
    function getPaymentsDetails(loiId) {
230
        doGetAjaxRequestHandler(`${context}/paymentsDetail?loiId=` + loiId, function (response) {
231
            //handle response here
232
            $('#commonModalDiv #commonModalBody').html(response);
233
        });
234
    }
235
 
236
 
237
</script>
238
<style>
239
    #paymentDetail.hover {
240
        color: #2b669a;
241
    }
242
</style>