Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
33507 tejus.loha 1
<style>
2
    .border-red {
3
        border: 1px solid red;
4
    }
5
 
6
    .border-green {
7
        border: 1px solid green;
8
    }
9
 
10
    .hide-textarea {
11
        display: none
12
    }
13
 
14
    .show-textarea {
15
        display: block
16
    }
33577 tejus.loha 17
 
18
    .hide-model {
19
        display: none
20
    }
21
 
22
    .show-model {
23
        display: block
24
    }
25
 
34107 tejus.loha 26
    .form-control {
27
        border-radius: 8px; /* Adjust the value for more or less rounding */
28
        border: 1px solid #ccc; /* Optional: Add a border */
29
    }
30
 
33507 tejus.loha 31
</style>
32
<section class="wrapper">
33
    <div class="row">
34
        <div class="col-lg-12">
34107 tejus.loha 35
            ##            Header - LOI FORM
36
            <h3 class="page-header" style="text-align: center ;color:green">loi form</h3>
33507 tejus.loha 37
            <ol class="breadcrumb">
34107 tejus.loha 38
                <li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard"></a></li>
33507 tejus.loha 39
                <li><i class="icon_document_alt"></i>LOI Form</li>
40
            </ol>
41
        </div>
42
    </div>
33658 tejus.loha 43
 
33507 tejus.loha 44
    <div class="col-md-12">
34107 tejus.loha 45
        ##        bg-success p-2 text-dark bg-opacity-10 - This is 10% opacity success background , colour - green
46
        <div class="container bg-success p-2 text-dark bg-opacity-10" style="border-radius: 25px">
33885 tejus.loha 47
            <form name="loi-form" id="loi-form" method="post" style="margin-top:40px;">
33507 tejus.loha 48
                <div class="row">
49
                    <div class="col-lg-3 form-group">
34107 tejus.loha 50
                        <label>Refer By(BGC Team)</label><span style="color:red ;font-size: 140%">*</span>
33749 tejus.loha 51
                        <select class="form-control type" name="referId" required>
33658 tejus.loha 52
 
34310 tejus.loha 53
                            <option selected disabled>
54
                                Select BGC
55
                            </option>
56
                            <option value="0">NA</option>
57
                            #foreach($authUsers in $authUsersList)
58
                                <option value=$authUsers.getId()>$authUsers.getFullName() </option>
59
                            #end
60
                        </select>
33658 tejus.loha 61
 
33507 tejus.loha 62
                    </div>
63
                    <div class="col-lg-3 form-group">
34107 tejus.loha 64
                        <label>State Head</label><span style="color:red ;font-size: 140%">*</span>
65
                        <select class="form-control type" name="stateHead" required>
33658 tejus.loha 66
 
34107 tejus.loha 67
                            <option selected disabled>
68
                                Select State Head
69
                            </option>
70
                            <option value="0">NA</option>
71
                            #foreach($stateHead in $stateHeadList)
72
                                <option value=$stateHead.getId()>$stateHead.getFullName() </option>
33749 tejus.loha 73
                            #end
74
                        </select>
33658 tejus.loha 75
 
33507 tejus.loha 76
                    </div>
33582 tejus.loha 77
                    <div class="col-lg-3 form-group">
34107 tejus.loha 78
                        <label>BDM</label>
79
                        <span style="color:red ;font-size: 140%">*</span>
80
                        <select class="form-control type" name="bdm" required>
81
                            <option selected disabled>
82
                                Select BDM
83
                            </option>
84
                            <option value="0">NA</option>
85
                            #foreach($bdm in $bdmList)
86
                                <option value=$bdm.getId()>$bdm.getFullName() </option>
87
                            #end
88
                        </select>
33582 tejus.loha 89
 
90
                    </div>
33507 tejus.loha 91
                </div>
92
                <div>
93
                    <h4>Personal Details</h4>
94
                </div>
95
                <div class="row">
96
                    <div class="col-md-4">
97
                        <!-- Owner Name -->
98
                        <div class="form-group">
33577 tejus.loha 99
                            <label>First Name </label><span
100
                                style="color:red ;font-size: 140%">*</span>
33749 tejus.loha 101
                            <input type="text" class="form-control" required name="firstName"
102
                                   placeholder="Enter first name">
33658 tejus.loha 103
 
33507 tejus.loha 104
                        </div>
105
                    </div>
106
                    <div class="col-md-4">
107
                        <!-- Owner Name -->
108
                        <div class="form-group">
33577 tejus.loha 109
                            <label>Last Name </label><span
110
                                style="color:red ;font-size: 140%">*</span>
33749 tejus.loha 111
                            <input type="text" class="form-control" required name="lastName"
112
                                   placeholder="Enter last name">
33507 tejus.loha 113
                        </div>
114
                    </div>
115
                    <div class="col-md-4">
116
                        <!-- Mobile No -->
117
                        <div class="form-group">
33577 tejus.loha 118
                            <label>Mobile No. </label><span
119
                                style="color:red ;font-size: 140%">*</span>
33507 tejus.loha 120
 
33749 tejus.loha 121
                            <input type="tel" class="form-control" required name="mobile"
122
                                   placeholder="10-digit Mobile"
123
                                   maxlength="10"
124
                                   minlength="10"
125
                                   pattern="[0-9]"
126
                                   pla
127
                                   value="">
33507 tejus.loha 128
 
129
                        </div>
130
                    </div>
131
                </div>
132
                <div class="row">
133
                    <div class="col-md-4">
134
                        <!-- Landline No -->
135
                        <div class="form-group">
33577 tejus.loha 136
                            <label>Alternative Mobile No.</label>
33749 tejus.loha 137
                            <input type="tel" class="form-control" name="landline"
138
                                   maxlength="10"
139
                                   minlength="10"
140
                                   pattern="[0-9]"
141
                                   placeholder="Enter Alternative mobile"
142
                                   value="">
33507 tejus.loha 143
 
144
 
145
                        </div>
146
                    </div>
147
                    <div class="col-lg-4"><!-- Email ID -->
148
                        <div class="form-group">
149
                            <label>Email ID </label>
33577 tejus.loha 150
                            <span
151
                                    style="color:red ;font-size: 140%">*</span>
33658 tejus.loha 152
 
33749 tejus.loha 153
                            <input type="email" class="form-control" required name="email" placeholder="Enter Email"
154
                                   value="">
33507 tejus.loha 155
 
156
                        </div>
157
                    </div>
158
                    <div class="col-lg-4"> <!-- DOB -->
159
                        <div class="form-group">
160
                            <label>DOB </label>
33577 tejus.loha 161
                            <span
162
                                    style="color:red ;font-size: 140%">*</span>
33658 tejus.loha 163
 
33749 tejus.loha 164
                            <input type="date" class="form-control" required name="dob" placeholder="Enter DOB">
33658 tejus.loha 165
 
33507 tejus.loha 166
                        </div>
167
                    </div>
168
                </div>
169
                <div class="row">
33577 tejus.loha 170
                    <div class="col-lg-3"> <!-- PAN No-->
33507 tejus.loha 171
                        <div class="form-group">
33577 tejus.loha 172
                            <label>PAN No</label><span
173
                                style="color:red ;font-size: 140%">*</span>
33749 tejus.loha 174
                            <input type="text" class="form-control" required name="panNo" placeholder="enter Pan No"
175
                                   minlength="10"
176
                                   maxlength="10">
33507 tejus.loha 177
 
33658 tejus.loha 178
 
33507 tejus.loha 179
                        </div>
180
                    </div>
33577 tejus.loha 181
                    <div class="col-lg-3"> <!-- Aadhar No-->
33507 tejus.loha 182
                        <div class="form-group">
33577 tejus.loha 183
                            <label>Aadhar No</label><span
184
                                style="color:red ;font-size: 140%">*</span>
33749 tejus.loha 185
                            <input type="tel" class="form-control" required name="adharNo"
186
                                   placeholder="Adhar Number"
187
                                   maxlength="12"
188
                                   minlength="12"
189
                                   pattern="[0-9]{12}">
33507 tejus.loha 190
 
191
                        </div>
192
                    </div>
33577 tejus.loha 193
                    <div class="col-lg-3"><!-- ANNIV DT- -->
194
                        <div class="form-group">
195
                            <label>Marital Status</label>
196
                            <span
197
                                    style="color:red ;font-size: 140%">*</span>
198
                            <select class="form-control" name="maritalStatus"
199
                                    placeholder="Marital Status" required id="maritalStatus">
34107 tejus.loha 200
                                <option disabled selected>Select Marital Status</option>
33577 tejus.loha 201
                                <option value="0">Single</option>
202
                                <option value="1">Married</option>
203
                            </select>
204
                        </div>
205
                    </div>
206
                    <div class="loiAnniversaryDate hide-model">
207
                        <div class="col-lg-3"><!-- ANNIV DT- -->
208
                            <div class="form-group">
209
                                <label>Anniversary Date </label>
210
                                <span
211
                                        style="color:red ;font-size: 140%">*</span>
33507 tejus.loha 212
 
33658 tejus.loha 213
                                <input type="date" class="form-control" name="anniversaryDate"
33749 tejus.loha 214
                                       placeholder="Enter Anniversary date" value=" ">
33577 tejus.loha 215
 
216
                            </div>
217
                        </div>
218
                    </div>
219
 
220
 
33507 tejus.loha 221
                </div>
222
 
223
                <h4>Business Detail</h4>
224
                <!-- GST No-->
225
                <div class="row">
34107 tejus.loha 226
                    <div class="col-lg-3 form-group">
227
                        <label>Business type</label><span
228
                            style="color:red ;font-size: 140%">*</span>
229
 
230
                        <select class="form-control" name="businessType"
231
                                placeholder="Business type" required>
232
                            <option value="$businessTypes.get(0)" selected>$businessTypes.get(0)</option>
233
                            #foreach($businessType in $businessTypes)
234
                                <option value=$businessType>$businessType</option>
235
                            #end
236
                        </select>
237
 
238
                    </div>
239
                    <!--Acquired Date-->
240
                    <div class="col-lg-3 form-group">
241
                        <label>Acquired Date</label><span
242
                            style="color:red ;font-size: 140%">*</span>
243
                        <input type="date" name="acquiredDate" class="form-control">
244
 
245
                    </div>
246
                </div>
247
                <div class="row">
33507 tejus.loha 248
                    <div class="col-lg-6">
249
                        <div class="form-group">
250
                            <label>GST No </label>
33577 tejus.loha 251
                            <span
252
                                    style="color:red ;font-size: 140%">*</span>
33658 tejus.loha 253
 
254
                            <input
33749 tejus.loha 255
                                    type="text"
256
                                    class="form-control gstNo"
257
                                    id="gstValidate"
258
                                    required
259
                                    name="gstNo"
260
                                    placeholder="Enter GST Reg No."
261
                                    minlength="15"
262
                                    maxlength="15" value="">
33507 tejus.loha 263
                        </div>
264
                    </div>
265
 
266
 
267
                    <div class="col-lg-6">
268
                        <div class="form-group">
269
                            <label for="gstName">Company Name:</label>
33577 tejus.loha 270
                            <span
271
                                    style="color:red ;font-size: 140%">*</span>
33658 tejus.loha 272
 
273
                            <input type="text" class="form-control" id="CompanyName" name="companyName" required
35322 aman 274
                                   value="" placeholder="Company Name">
33507 tejus.loha 275
                        </div>
276
                    </div>
277
                </div>
278
                <!-- GST Address -->
279
                <div class="row">
280
                    <div class="col-lg-3">
35336 aman 281
                        <label class="bold-details">PIN CODE</lebel>
33507 tejus.loha 282
 
33749 tejus.loha 283
                        <input
284
                                placeholder="Pin Code" id="gstPinCode"
35336 aman 285
                                name="gstPin" value=""
35322 aman 286
                                class="form-control input-sm">
33658 tejus.loha 287
 
33507 tejus.loha 288
                    </div>
289
 
290
                    <div class="col-lg-3">
291
                        <div class="form-group">
35336 aman 292
                            <label for="gstState">State</label>
33658 tejus.loha 293
 
294
                            <input placeholder="State"
35336 aman 295
                                   id="gstState" name="gstState"
33749 tejus.loha 296
                                   value="" class="form-control input-sm"
35322 aman 297
                                   style="font-weight: bold;">
33658 tejus.loha 298
 
33507 tejus.loha 299
                        </div>
300
                    </div>
301
 
302
                    <div class="col-lg-3">
303
                        <div class="form-group">
35336 aman 304
                            <label>City :</label>
33749 tejus.loha 305
                            <input placeholder="State"
35336 aman 306
                                   id="gstCity" name="gstCity"
33749 tejus.loha 307
                                   value="" class="form-control input-sm"
35322 aman 308
                                   style="font-weight: bold;">
33507 tejus.loha 309
 
310
                        </div>
311
                    </div>
312
                    <div class="col-lg-3">
313
                        <div class="form-group">
35336 aman 314
                            <label for="gstDistrict">District :</label>
33658 tejus.loha 315
 
35336 aman 316
                            <input placeholder="District" id="gstDistrict" name="gstDistrict"
317
                                   class="form-control input-sm"
35322 aman 318
                                   value="">
33658 tejus.loha 319
 
33507 tejus.loha 320
                        </div>
321
                    </div>
322
                </div>
323
                <div><h4>Addition Place of Business</h4></div>
34310 tejus.loha 324
                <div class="row" id="autoAddress">
33507 tejus.loha 325
                    <div class="col-lg-6">
326
                        <div class="form-group">
327
                            <label>Select Address</label>
34310 tejus.loha 328
                            <span style="color:red ;font-size: 140%">*</span>
33507 tejus.loha 329
                            <div id="addlist"></div>
330
                        </div>
331
                    </div>
332
                </div>
34310 tejus.loha 333
                <div class="row" id="manualAddress">
334
                </div>
33507 tejus.loha 335
                <div><h4>Bank Details :</h4></div>
336
                <div class="row">
337
                    <!-- Bank name-->
338
                    <div class="col-lg-4">
339
                        <div class="form-group">
33577 tejus.loha 340
                            <label>Bank name :</label><span
341
                                style="color:red ;font-size: 140%">*</span>
33507 tejus.loha 342
 
33658 tejus.loha 343
                            <input type="text" class="form-control" required name="bankName" placeholder="Bank Name"
33749 tejus.loha 344
                                   value="">
33507 tejus.loha 345
                        </div>
346
                    </div>
347
 
348
                    <!-- IFSC Code-->
349
                    <div class="col-lg-4">
350
                        <div class="form-group">
33577 tejus.loha 351
                            <label>IFSC Code :</label><span
352
                                style="color:red ;font-size: 140%">*</span>
33749 tejus.loha 353
                            <input type="text" class="form-control" required name="ifscCode" placeholder="IFSC Code"
354
                                   value="">
33507 tejus.loha 355
 
356
                        </div>
357
                    </div>
358
 
359
                    <!-- Account No.-->
360
                    <div class="col-lg-4">
361
                        <div class="form-group">
33577 tejus.loha 362
                            <label>Account No :</label><span
363
                                style="color:red ;font-size: 140%">*</span>
33749 tejus.loha 364
                            <input type="number" class="form-control" required name="accountNo"
365
                                   placeholder="Account Number" value="">
33507 tejus.loha 366
                        </div>
367
                    </div>
368
                </div>
369
                <!-- Agreed Minimum Wallet value (INR) -->
370
                <div><h4>Store Details </h4></div>
371
                <div class="row">
33909 tejus.loha 372
                    <div class="col-lg-3">
33507 tejus.loha 373
                        <div class="form-group" style="text-align: left;">
33577 tejus.loha 374
                            <label>Minimum Wallet value :</label><span
375
                                style="color:red ;font-size: 140%">*</span>
33658 tejus.loha 376
 
377
                            <select class="form-control" name="agreeWalletValue" required>
33749 tejus.loha 378
                                <option value="600000">600000</option>
379
                                <option value="700000">700000</option>
380
                                <option value="800000">800000</option>
381
                                <option value="900000">900000</option>
382
                                <option value="1000000">1000000</option>
383
                                <option value="1100000">1100000</option>
384
                                <option value="1200000">1200000</option>
385
                                <option value="1500000">1500000</option>
386
                                <option value="2000000">2000000</option>
387
                                <option value="2500000">2500000</option>
388
                                <option value="3000000">3000000</option>
389
                            </select>
33507 tejus.loha 390
                        </div>
391
 
392
                    </div>
393
                    <!-- Store area (sq ft) -->
33909 tejus.loha 394
                    <div class="col-lg-3">
33507 tejus.loha 395
                        <div class="form-group">
33577 tejus.loha 396
                            <label>Store area </label><span
397
                                style="color:red ;font-size: 140%">*</span>
33749 tejus.loha 398
                            <input type="number" class="form-control" id="storeArea" required
399
                                   name="storeArea" placeholder="in square feet" value="">
33658 tejus.loha 400
 
33507 tejus.loha 401
                        </div>
402
                    </div>
33909 tejus.loha 403
                    <div class="col-lg-3">
33507 tejus.loha 404
                        <!-- Store Potential -->
405
                        <div class="form-group">
33577 tejus.loha 406
                            <label>Store Potential</label><span
407
                                style="color:red ;font-size: 140%">*</span>
33749 tejus.loha 408
                            <input type="number" class="form-control" required name="storePotential"
409
                                   min="400000" id="storePotential"
410
                                   placeholder="Store Potential" value="">
33507 tejus.loha 411
                        </div>
412
                    </div>
35971 aman 413
                </div>
414
                <div class="row">
415
                    <div class="col-lg-12">
416
                        <h4>Finance Codes</h4>
417
                    </div>
418
                    #foreach($finOption in $paperFinanceOptions)
419
                        <div class="col-lg-3">
420
                            <div class="form-group">
421
                                <label>$finOption.getName()</label>
422
                                <input type="text" class="form-control finance-code-input"
423
                                       data-payment-option-id="$finOption.getId()"
424
                                       name="finCode_$finOption.getId()"
425
                                       placeholder="Finance code" value="">
426
                            </div>
33909 tejus.loha 427
                        </div>
35971 aman 428
                    #end
33507 tejus.loha 429
                </div>
35971 aman 430
                <h4>Brand Commitment (Qty)</h4>
34310 tejus.loha 431
                <div id="loiBrandCommitment form-contro" class="row">
33658 tejus.loha 432
                    #foreach($brandCommit in $brandCommits)
34316 tejus.loha 433
                        <div class="col-lg-3">
434
                            <div class="form-group">
35971 aman 435
                                <label>$brandCommit.getBrand() (Qty)</label><span
34316 tejus.loha 436
                                    style="color:red ;font-size: 140%">*</span>
437
                                <input type="number" class="form-control brand-commitment" required
35971 aman 438
                                       name="$brandCommit.getBrand()" min="0" max="1000" placeholder="0" value="">
33658 tejus.loha 439
                            </div>
34316 tejus.loha 440
                        </div>
33658 tejus.loha 441
                    #end
34310 tejus.loha 442
                    <div>
33658 tejus.loha 443
                        <div class="col-lg-3">
444
                            <div class="form-group">
35971 aman 445
                                <label>Accessories (Qty)</label><span
33658 tejus.loha 446
                                    style="color:red ;font-size: 140%">*</span>
447
                                <input type="number" class="form-control brand-commitment" required
35971 aman 448
                                       name="Accessories" min="0" max="1000" placeholder="0" value="">
33658 tejus.loha 449
                            </div>
450
                        </div>
451
                        <div class="col-lg-3">
452
                            <div class="form-group">
35971 aman 453
                                <label>Other (Qty)</label><span
33658 tejus.loha 454
                                    style="color:red ;font-size: 140%">*</span>
455
                                <input type="number" class="form-control brand-commitment" required
35971 aman 456
                                       name="Other" min="0" max="1000" placeholder="0" value="">
33658 tejus.loha 457
                            </div>
458
                        </div>
34310 tejus.loha 459
                        <div class="col-lg-3">
460
                            <div class="form-group">
35971 aman 461
                                <label>Total Qty</label>
34310 tejus.loha 462
                                <span style="font-size: 140%"></span>
463
                                <input type="number" class="form-control " name="totaCommitmentAmount" id="totalAmount"
464
                                       readonly required
35971 aman 465
                                       placeholder="Total Qty" value="">
34310 tejus.loha 466
                            </div>
467
                        </div>
33658 tejus.loha 468
                    </div>
35971 aman 469
                    <div id="lessCommitReasonSection" style="display: none;">
470
                        <div class="col-lg-12">
471
                            <div class="form-group">
472
                                <label>Reason for Less Commitment</label><span
473
                                    style="color:red ;font-size: 140%">*</span>
474
                                <textarea class="form-control" name="lessCommitReason" rows="2"
475
                                          placeholder="Please provide reason for commitment below 70% of store potential"></textarea>
476
                            </div>
33507 tejus.loha 477
                        </div>
478
                    </div>
479
                </div>
480
                ##                Agreed Brand fees (INR)
481
                <div class="row">
33885 tejus.loha 482
                    <div class="col-lg-4">
33507 tejus.loha 483
                        <div class="form-group">
33577 tejus.loha 484
                            <label>Agreed Brand fees</label><span
485
                                style="color:red ;font-size: 140%">*</span>
33749 tejus.loha 486
                            <select name="agreedBrandFees" class="form-control">
34107 tejus.loha 487
                                <option selected disabled>Select Brand Fee</option>
33749 tejus.loha 488
                                #foreach($storeTypeFeePair in $storeTypeFeePairs)
489
                                    #set($storeType1 =$storeTypeFeePair.getKey())
490
                                    #set($brandFee = $storeTypeFeePair.getValue())
491
                                    #if($brandFee.getFeeByStoreType($storeType1)>0)
33507 tejus.loha 492
                                        <option value="$storeTypeFeePair.getKey()-$brandFee.getFeeByStoreType($storeType1)-$brandFee.getId()"> $storeType1
493
                                            ($brandFee.getFeeByStoreType($storeType1))
494
                                        </option>
495
                                    #end
33749 tejus.loha 496
                                #end
497
                            </select>
33507 tejus.loha 498
                        </div>
499
                    </div>
500
 
501
                    <!-- Brand fees collected (INR) -->
33885 tejus.loha 502
                    <div class="col-lg-4">
33507 tejus.loha 503
                        <div class="form-group">
33577 tejus.loha 504
                            <label>Brand fees collected</label><span
505
                                style="color:red ;font-size: 140%">*</span>
33749 tejus.loha 506
                            <input type="number" class="form-control " id="brandFeesCollected" required
507
                                   name="brandFeesCollected" placeholder="500000">
33507 tejus.loha 508
                        </div>
509
                    </div>
510
                    <!-- Mode of Payment Online/Cheque/IMPS/NEFT/RTGS/Wallet -->
33885 tejus.loha 511
                    <div class="col-lg-4">
33507 tejus.loha 512
                        <div class="form-group">
33577 tejus.loha 513
                            <label>Mode of Payment</label><span
514
                                style="color:red ;font-size: 140%">*</span>
33749 tejus.loha 515
                            <select class="form-control" name="paymentMode" required>
516
                                <option value="">Select mode</option>
517
                                <option value="UPI">UPI</option>
518
                                <option value="Cheque">Cheque</option>
519
                                <option value="IMPS">IMPS</option>
520
                                <option value="NEFT">NEFT</option>
521
                                <option value="RTGS">RTGS</option>
522
                            </select>
33507 tejus.loha 523
                        </div>
524
                    </div>
33885 tejus.loha 525
                </div>
34026 tejus.loha 526
                <!-- Payment reference no -->
33885 tejus.loha 527
                <div class="row">
528
                    <div class="col-lg-4">
33507 tejus.loha 529
                        <div class="form-group">
33577 tejus.loha 530
                            <label>Payment Reference No</label><span
531
                                style="color:red ;font-size: 140%">*</span>
33749 tejus.loha 532
                            <input type="text" class="form-control" id="paymentReferenceNo" required
35971 aman 533
                                   name="paymentReferenceNo" placeholder="Payment Reference No">
33507 tejus.loha 534
                        </div>
535
                    </div>
33578 tejus.loha 536
                    <!-- fee collection date -->
33885 tejus.loha 537
                    <div class="col-lg-4">
33578 tejus.loha 538
                        <div class="form-group">
539
                            <label>Fee collecting Date</label><span
540
                                style="color:red ;font-size: 140%">*</span>
33749 tejus.loha 541
                            <input type="datetime-local" class="form-control " id="feeCollectingDate" required
542
                                   name="feeCollectingDate">
33578 tejus.loha 543
                        </div>
544
                    </div>
33885 tejus.loha 545
                    <div class="col-lg-4">
546
                        <div class="form-group">
547
                            <label>Attach Screenshot</label><span
548
                                style="color:red ;font-size: 140%">*</span>
549
                            <input type="hidden" id="payment-sc-docId" name="paymentAttachment">
37458 aman 550
                            <input type="file" class="form-control" id="payment-sc-doc" required
551
                                   accept=".jpg,.jpeg,.png,.pdf,image/jpeg,image/png,application/pdf">
552
                            <span id="payment-sc-status" class="help-block"></span>
33885 tejus.loha 553
                        </div>
554
                    </div>
33507 tejus.loha 555
                </div>
556
                <!-- Submit button-->
557
                <div class="form-group" style="text-align: center; margin-bottom:2px;">
33749 tejus.loha 558
                    <button type="button"
34107 tejus.loha 559
                            class="btn btn-success text-white font-semibold py-1 px-4 rounded background-red mk_submit_loi_form"
33749 tejus.loha 560
                            style="box-shadow:none;margin-bottom:2px;">
561
                        <span>Submit</span>
562
                    </button>
33507 tejus.loha 563
                </div>
564
            </form>
565
        </div>
566
    </div>
33658 tejus.loha 567
 
33507 tejus.loha 568
</section>
569
<script>
34085 tejus.loha 570
    $(document).on('blur', 'input[name="storePotential"]', function () {
34310 tejus.loha 571
        const walletValue = parseInt($('select[name="agreeWalletValue"]').val());
572
        const storePotantial = parseInt($('input[name="storePotential"]').val());
34314 tejus.loha 573
        if (walletValue > storePotantial) {
34085 tejus.loha 574
            alert("Store Potential must be greater than or equal to Wallet Value ")
575
            return false;
576
        }
33507 tejus.loha 577
 
34085 tejus.loha 578
    });
33507 tejus.loha 579
 
33658 tejus.loha 580
    $(".gstNo").change(function () {
581
        var inputGstNo = $(this).val();
582
        var gstinformat = new RegExp('^[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z]{1}[1-9A-Z]{1}Z[0-9A-Z]{1}$');
583
        if (gstinformat.test(inputGstNo)) {
584
            doGetAjaxRequestHandler(`${context}/gstValidate?gstNo=` + inputGstNo,
585
                    function (response) {
34316 tejus.loha 586
                        console.log("resType--", typeof response)
587
                        console.log("res----", response)
35322 aman 588
                        if (response && Object.keys(response).length > 0) {
34310 tejus.loha 589
                            if (response.sts === "Active") {
34316 tejus.loha 590
                                $('#manualAddress').empty();
591
                                $('#manualAddress').hide();
34310 tejus.loha 592
                                $("#autoAddress").show();
593
                                $("#CompanyName").val(response.tradeNam);
594
                                $("#gstPinCode").val(response.pradr.addr.pncd);
595
                                $("#gstState").val(response.pradr.addr.stcd);
596
                                $("#gstCity").val(response.pradr.addr.loc);
597
                                $("#gstDistrict").val(response.pradr.addr.dst);
598
                                var selectOptions = [];
599
                                var addresses = response.adadr;
600
                                selectOptions.push(`<select id="billingAddress" name="billingAddress" class="form-control">`);
601
                                addresses.forEach((pradr) => {
602
                                    var addrString = getAddressString(pradr.addr);
603
                                    var addrStringify = JSON.stringify(pradr.addr);
604
                                    selectOptions.push(`<option value='${addrStringify}'>
33507 tejus.loha 605
                                      ${addrString}
606
                                </option>`);
34310 tejus.loha 607
                                });
608
                                selectOptions.push(`</select>`);
609
                                $('#addlist').html(selectOptions.join(''));
610
                            } else {
611
                                alert("GSTIN - " + inputGstNo + " is not Active")
34316 tejus.loha 612
                                $('#addlist').html("");
34310 tejus.loha 613
                            }
35322 aman 614
                        } else {
615
                            alert("Unable to validate GST. Please check the GST number.");
616
                            $('#addlist').html("");
34026 tejus.loha 617
                        }
34616 tejus.loha 618
                        // else {
619
                        //     alert("Problem to fatching Details From GST , Please Enter manually")
620
                        //     $('#addlist').html("");
621
                        //     $("#CompanyName").removeAttr('readonly');
622
                        //     $("#CompanyName").val("");
623
                        //     const addrFieldData = {
624
                        //         "bno": "Building no",
625
                        //         "bnm": "Building Name",
626
                        //         "st": "Street",
627
                        //         "locality": "Locality",
628
                        //         "loc": "City",
629
                        //         "dst": "District",
630
                        //         "pncd": "Pincode",
631
                        //         "stcd": "State"
632
                        //     };
633
                        //     $('#manualAddress').show();
634
                        //     // Dynamically create input fields
635
                        //     Object.keys(addrFieldData).forEach(function (field) {
636
                        //         $('#manualAddress').append('<div class="address-field"><div class="col-md-3"><label for="' + field + '">' + addrFieldData[field] + ':</label><input class="form-control" id="' + field + '" name="' + field + '" placeholder="' + addrFieldData[field] + '"></div></div>');
637
                        //     });
638
                        //
639
                        //
640
                        // }
33658 tejus.loha 641
                    });
642
        } else {
643
            alert('Please Enter Valid GSTIN Number');
644
            $(".gstNo").val('');
645
            $(".gstNo").focus();
646
        }
33507 tejus.loha 647
    });
648
 
33658 tejus.loha 649
 
33507 tejus.loha 650
    function getAddressString(addr) {
651
        addrFields = ["bno", "bnm", "st", "locality", "loc", "pncd", "stcd"];
652
        addresArr = [];
653
        for (let i = 0; i < addrFields.length; i++) {
654
            if (addr.hasOwnProperty(addrFields[i]) && addr[addrFields[i]] !== "") {
655
                addresArr.push(addr[addrFields[i]]);
656
            }
657
        }
658
        return addresArr.join(", ");
659
    }
660
 
33658 tejus.loha 661
    $(document).ready(function () {
34310 tejus.loha 662
        $("#autoAddress").hide();
33658 tejus.loha 663
        var brandCommitmentInputs = document.querySelectorAll(".brand-commitment");
664
        var totalCommitmentAmount = 0;
665
        brandCommitmentInputs[brandCommitmentInputs.length - 1].addEventListener("blur", function () {
666
            updateTotalCommitmentAmount();
667
        });
668
 
669
        function updateTotalCommitmentAmount() {
35971 aman 670
            // Recalculate the total commitment qty
33658 tejus.loha 671
            totalCommitmentAmount = 0;
35971 aman 672
            var hasInvalidQty = false;
33658 tejus.loha 673
            brandCommitmentInputs.forEach(function (input) {
674
                var commitmentValue = parseInt(input.value);
675
                if (!isNaN(commitmentValue)) {
35971 aman 676
                    if (commitmentValue > 1000) {
677
                        hasInvalidQty = true;
678
                        input.classList.add('border-red');
679
                    } else {
680
                        input.classList.remove('border-red');
681
                        totalCommitmentAmount += commitmentValue;
682
                    }
33658 tejus.loha 683
                }
684
            });
685
 
35971 aman 686
            if (hasInvalidQty) {
687
                alert("Quantity per brand cannot exceed 1000. Please enter valid quantities.");
688
            }
689
 
33658 tejus.loha 690
            var totalCommitmentInput = document.getElementById("totalAmount");
691
            totalCommitmentInput.value = totalCommitmentAmount;
692
 
35971 aman 693
            // Check 70% validation: (totalQty × 20000) >= 70% of storePotential
694
            var storePotential = parseInt($('input[name="storePotential"]').val()) || 0;
695
            var estimatedValue = totalCommitmentAmount * 20000;
696
            var minRequired = 0.7 * storePotential;
697
            var lessCommitSection = document.getElementById("lessCommitReasonSection");
698
            if (estimatedValue < minRequired && storePotential > 0) {
699
                lessCommitSection.style.display = "block";
33658 tejus.loha 700
            } else {
35971 aman 701
                lessCommitSection.style.display = "none";
33658 tejus.loha 702
            }
703
        }
704
    });
34829 aman 705
    $(".gstNo").on("input", function () {
706
        this.value = this.value.toUpperCase();
707
    });
33507 tejus.loha 708
</script>