Subversion Repositories SmartDukaan

Rev

Rev 35336 | 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">
550
                            <input type="file" class="form-control" id="payment-sc-doc" required>
551
                        </div>
552
                    </div>
33507 tejus.loha 553
                </div>
554
                <!-- Submit button-->
555
                <div class="form-group" style="text-align: center; margin-bottom:2px;">
33749 tejus.loha 556
                    <button type="button"
34107 tejus.loha 557
                            class="btn btn-success text-white font-semibold py-1 px-4 rounded background-red mk_submit_loi_form"
33749 tejus.loha 558
                            style="box-shadow:none;margin-bottom:2px;">
559
                        <span>Submit</span>
560
                    </button>
33507 tejus.loha 561
                </div>
562
            </form>
563
        </div>
564
    </div>
33658 tejus.loha 565
 
33507 tejus.loha 566
</section>
567
<script>
34085 tejus.loha 568
    $(document).on('blur', 'input[name="storePotential"]', function () {
34310 tejus.loha 569
        const walletValue = parseInt($('select[name="agreeWalletValue"]').val());
570
        const storePotantial = parseInt($('input[name="storePotential"]').val());
34314 tejus.loha 571
        if (walletValue > storePotantial) {
34085 tejus.loha 572
            alert("Store Potential must be greater than or equal to Wallet Value ")
573
            return false;
574
        }
33507 tejus.loha 575
 
34085 tejus.loha 576
    });
33507 tejus.loha 577
 
33658 tejus.loha 578
    $(".gstNo").change(function () {
579
        var inputGstNo = $(this).val();
580
        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}$');
581
        if (gstinformat.test(inputGstNo)) {
582
            doGetAjaxRequestHandler(`${context}/gstValidate?gstNo=` + inputGstNo,
583
                    function (response) {
34316 tejus.loha 584
                        console.log("resType--", typeof response)
585
                        console.log("res----", response)
35322 aman 586
                        if (response && Object.keys(response).length > 0) {
34310 tejus.loha 587
                            if (response.sts === "Active") {
34316 tejus.loha 588
                                $('#manualAddress').empty();
589
                                $('#manualAddress').hide();
34310 tejus.loha 590
                                $("#autoAddress").show();
591
                                $("#CompanyName").val(response.tradeNam);
592
                                $("#gstPinCode").val(response.pradr.addr.pncd);
593
                                $("#gstState").val(response.pradr.addr.stcd);
594
                                $("#gstCity").val(response.pradr.addr.loc);
595
                                $("#gstDistrict").val(response.pradr.addr.dst);
596
                                var selectOptions = [];
597
                                var addresses = response.adadr;
598
                                selectOptions.push(`<select id="billingAddress" name="billingAddress" class="form-control">`);
599
                                addresses.forEach((pradr) => {
600
                                    var addrString = getAddressString(pradr.addr);
601
                                    var addrStringify = JSON.stringify(pradr.addr);
602
                                    selectOptions.push(`<option value='${addrStringify}'>
33507 tejus.loha 603
                                      ${addrString}
604
                                </option>`);
34310 tejus.loha 605
                                });
606
                                selectOptions.push(`</select>`);
607
                                $('#addlist').html(selectOptions.join(''));
608
                            } else {
609
                                alert("GSTIN - " + inputGstNo + " is not Active")
34316 tejus.loha 610
                                $('#addlist').html("");
34310 tejus.loha 611
                            }
35322 aman 612
                        } else {
613
                            alert("Unable to validate GST. Please check the GST number.");
614
                            $('#addlist').html("");
34026 tejus.loha 615
                        }
34616 tejus.loha 616
                        // else {
617
                        //     alert("Problem to fatching Details From GST , Please Enter manually")
618
                        //     $('#addlist').html("");
619
                        //     $("#CompanyName").removeAttr('readonly');
620
                        //     $("#CompanyName").val("");
621
                        //     const addrFieldData = {
622
                        //         "bno": "Building no",
623
                        //         "bnm": "Building Name",
624
                        //         "st": "Street",
625
                        //         "locality": "Locality",
626
                        //         "loc": "City",
627
                        //         "dst": "District",
628
                        //         "pncd": "Pincode",
629
                        //         "stcd": "State"
630
                        //     };
631
                        //     $('#manualAddress').show();
632
                        //     // Dynamically create input fields
633
                        //     Object.keys(addrFieldData).forEach(function (field) {
634
                        //         $('#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>');
635
                        //     });
636
                        //
637
                        //
638
                        // }
33658 tejus.loha 639
                    });
640
        } else {
641
            alert('Please Enter Valid GSTIN Number');
642
            $(".gstNo").val('');
643
            $(".gstNo").focus();
644
        }
33507 tejus.loha 645
    });
646
 
33658 tejus.loha 647
 
33507 tejus.loha 648
    function getAddressString(addr) {
649
        addrFields = ["bno", "bnm", "st", "locality", "loc", "pncd", "stcd"];
650
        addresArr = [];
651
        for (let i = 0; i < addrFields.length; i++) {
652
            if (addr.hasOwnProperty(addrFields[i]) && addr[addrFields[i]] !== "") {
653
                addresArr.push(addr[addrFields[i]]);
654
            }
655
        }
656
        return addresArr.join(", ");
657
    }
658
 
33658 tejus.loha 659
    $(document).ready(function () {
34310 tejus.loha 660
        $("#autoAddress").hide();
33658 tejus.loha 661
        var brandCommitmentInputs = document.querySelectorAll(".brand-commitment");
662
        var totalCommitmentAmount = 0;
663
        brandCommitmentInputs[brandCommitmentInputs.length - 1].addEventListener("blur", function () {
664
            updateTotalCommitmentAmount();
665
        });
666
 
667
        function updateTotalCommitmentAmount() {
35971 aman 668
            // Recalculate the total commitment qty
33658 tejus.loha 669
            totalCommitmentAmount = 0;
35971 aman 670
            var hasInvalidQty = false;
33658 tejus.loha 671
            brandCommitmentInputs.forEach(function (input) {
672
                var commitmentValue = parseInt(input.value);
673
                if (!isNaN(commitmentValue)) {
35971 aman 674
                    if (commitmentValue > 1000) {
675
                        hasInvalidQty = true;
676
                        input.classList.add('border-red');
677
                    } else {
678
                        input.classList.remove('border-red');
679
                        totalCommitmentAmount += commitmentValue;
680
                    }
33658 tejus.loha 681
                }
682
            });
683
 
35971 aman 684
            if (hasInvalidQty) {
685
                alert("Quantity per brand cannot exceed 1000. Please enter valid quantities.");
686
            }
687
 
33658 tejus.loha 688
            var totalCommitmentInput = document.getElementById("totalAmount");
689
            totalCommitmentInput.value = totalCommitmentAmount;
690
 
35971 aman 691
            // Check 70% validation: (totalQty × 20000) >= 70% of storePotential
692
            var storePotential = parseInt($('input[name="storePotential"]').val()) || 0;
693
            var estimatedValue = totalCommitmentAmount * 20000;
694
            var minRequired = 0.7 * storePotential;
695
            var lessCommitSection = document.getElementById("lessCommitReasonSection");
696
            if (estimatedValue < minRequired && storePotential > 0) {
697
                lessCommitSection.style.display = "block";
33658 tejus.loha 698
            } else {
35971 aman 699
                lessCommitSection.style.display = "none";
33658 tejus.loha 700
            }
701
        }
702
    });
34829 aman 703
    $(".gstNo").on("input", function () {
704
        this.value = this.value.toUpperCase();
705
    });
33507 tejus.loha 706
</script>