Subversion Repositories SmartDukaan

Rev

Rev 34616 | Rev 35322 | 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
33749 tejus.loha 274
                                   value="" readonly>
33507 tejus.loha 275
                        </div>
276
                    </div>
277
                </div>
278
                <!-- GST Address -->
279
                <div class="row">
280
                    <div class="col-lg-3">
33577 tejus.loha 281
                        ##                                        <label class="bold-details">PIN CODE</lebel>
33507 tejus.loha 282
 
33749 tejus.loha 283
                        <input
284
                                placeholder="Pin Code" id="gstPinCode"
285
                                name="gstPin" type="hidden" value=""
286
                                class="form-control input-sm" readonly>
33658 tejus.loha 287
 
33507 tejus.loha 288
                    </div>
289
 
290
                    <div class="col-lg-3">
291
                        <div class="form-group">
292
                            ##                                            <label for="gstState">State</label>
33658 tejus.loha 293
 
294
                            <input placeholder="State"
33749 tejus.loha 295
                                   id="gstState" name="gstState" type="hidden"
296
                                   value="" class="form-control input-sm"
297
                                   style="font-weight: bold;" readonly>
33658 tejus.loha 298
 
33507 tejus.loha 299
                        </div>
300
                    </div>
301
 
302
                    <div class="col-lg-3">
303
                        <div class="form-group">
33658 tejus.loha 304
                            ## <label>City :</label>
33749 tejus.loha 305
                            <input placeholder="State"
306
                                   id="gstCity" name="gstCity" type="hidden"
307
                                   value="" class="form-control input-sm"
308
                                   style="font-weight: bold;" readonly>
33507 tejus.loha 309
 
310
                        </div>
311
                    </div>
312
                    <div class="col-lg-3">
313
                        <div class="form-group">
314
                            ##                                            <label for="gstDistrict">District :</label>
33658 tejus.loha 315
 
316
                            <input id="gstDistrict" type="hidden" name="gstDistrict" class="form-control input-sm"
33749 tejus.loha 317
                                   value="" readonly>
33658 tejus.loha 318
 
33507 tejus.loha 319
                        </div>
320
                    </div>
321
                </div>
322
                <div><h4>Addition Place of Business</h4></div>
34310 tejus.loha 323
                <div class="row" id="autoAddress">
33507 tejus.loha 324
                    <div class="col-lg-6">
325
                        <div class="form-group">
326
                            <label>Select Address</label>
34310 tejus.loha 327
                            <span style="color:red ;font-size: 140%">*</span>
33507 tejus.loha 328
                            <div id="addlist"></div>
329
                        </div>
330
                    </div>
331
                </div>
34310 tejus.loha 332
                <div class="row" id="manualAddress">
333
                </div>
33507 tejus.loha 334
                <div><h4>Bank Details :</h4></div>
335
                <div class="row">
336
                    <!-- Bank name-->
337
                    <div class="col-lg-4">
338
                        <div class="form-group">
33577 tejus.loha 339
                            <label>Bank name :</label><span
340
                                style="color:red ;font-size: 140%">*</span>
33507 tejus.loha 341
 
33658 tejus.loha 342
                            <input type="text" class="form-control" required name="bankName" placeholder="Bank Name"
33749 tejus.loha 343
                                   value="">
33507 tejus.loha 344
                        </div>
345
                    </div>
346
 
347
                    <!-- IFSC Code-->
348
                    <div class="col-lg-4">
349
                        <div class="form-group">
33577 tejus.loha 350
                            <label>IFSC Code :</label><span
351
                                style="color:red ;font-size: 140%">*</span>
33749 tejus.loha 352
                            <input type="text" class="form-control" required name="ifscCode" placeholder="IFSC Code"
353
                                   value="">
33507 tejus.loha 354
 
355
                        </div>
356
                    </div>
357
 
358
                    <!-- Account No.-->
359
                    <div class="col-lg-4">
360
                        <div class="form-group">
33577 tejus.loha 361
                            <label>Account No :</label><span
362
                                style="color:red ;font-size: 140%">*</span>
33749 tejus.loha 363
                            <input type="number" class="form-control" required name="accountNo"
364
                                   placeholder="Account Number" value="">
33507 tejus.loha 365
                        </div>
366
                    </div>
367
                </div>
368
                <!-- Agreed Minimum Wallet value (INR) -->
369
                <div><h4>Store Details </h4></div>
370
                <div class="row">
33909 tejus.loha 371
                    <div class="col-lg-3">
33507 tejus.loha 372
                        <div class="form-group" style="text-align: left;">
33577 tejus.loha 373
                            <label>Minimum Wallet value :</label><span
374
                                style="color:red ;font-size: 140%">*</span>
33658 tejus.loha 375
 
376
                            <select class="form-control" name="agreeWalletValue" required>
33749 tejus.loha 377
                                <option value="600000">600000</option>
378
                                <option value="700000">700000</option>
379
                                <option value="800000">800000</option>
380
                                <option value="900000">900000</option>
381
                                <option value="1000000">1000000</option>
382
                                <option value="1100000">1100000</option>
383
                                <option value="1200000">1200000</option>
384
                                <option value="1500000">1500000</option>
385
                                <option value="2000000">2000000</option>
386
                                <option value="2500000">2500000</option>
387
                                <option value="3000000">3000000</option>
388
                            </select>
33507 tejus.loha 389
                        </div>
390
 
391
                    </div>
392
                    <!-- Store area (sq ft) -->
33909 tejus.loha 393
                    <div class="col-lg-3">
33507 tejus.loha 394
                        <div class="form-group">
33577 tejus.loha 395
                            <label>Store area </label><span
396
                                style="color:red ;font-size: 140%">*</span>
33749 tejus.loha 397
                            <input type="number" class="form-control" id="storeArea" required
398
                                   name="storeArea" placeholder="in square feet" value="">
33658 tejus.loha 399
 
33507 tejus.loha 400
                        </div>
401
                    </div>
33909 tejus.loha 402
                    <div class="col-lg-3">
33507 tejus.loha 403
                        <!-- Store Potential -->
404
                        <div class="form-group">
33577 tejus.loha 405
                            <label>Store Potential</label><span
406
                                style="color:red ;font-size: 140%">*</span>
33749 tejus.loha 407
                            <input type="number" class="form-control" required name="storePotential"
408
                                   min="400000" id="storePotential"
409
                                   placeholder="Store Potential" value="">
33507 tejus.loha 410
                        </div>
411
                    </div>
33909 tejus.loha 412
                    <div class="col-lg-3">
413
                        <!-- Finance Code -->
414
                        <div class="form-group">
415
                            <label>Finance Code</label>
416
                            <span style="color:red ;font-size: 140%"></span>
417
                            <input type="text" class="form-control" required name="finCode"
418
                                   id="mk_finance_Code"
419
                                   placeholder="Finance code" value="">
420
                        </div>
421
                    </div>
33507 tejus.loha 422
                </div>
423
                <h4>Brand Commitment</h4>
34310 tejus.loha 424
                <div id="loiBrandCommitment form-contro" class="row">
33658 tejus.loha 425
                    #foreach($brandCommit in $brandCommits)
34316 tejus.loha 426
                        <div class="col-lg-3">
427
                            <div class="form-group">
428
                                <label>$brandCommit.getBrand()</label><span
429
                                    style="color:red ;font-size: 140%">*</span>
430
                                <input type="number" class="form-control brand-commitment" required
431
                                       name="$brandCommit.getBrand()" value="">
33658 tejus.loha 432
                            </div>
34316 tejus.loha 433
                        </div>
33658 tejus.loha 434
                    #end
34310 tejus.loha 435
                    <div>
33658 tejus.loha 436
                        <div class="col-lg-3">
437
                            <div class="form-group">
438
                                <label>Accessories</label><span
439
                                    style="color:red ;font-size: 140%">*</span>
440
                                <input type="number" class="form-control brand-commitment" required
441
                                       name="Accessories" value="">
442
                            </div>
443
                        </div>
444
                        <div class="col-lg-3">
445
                            <div class="form-group">
446
                                <label>Other</label><span
447
                                    style="color:red ;font-size: 140%">*</span>
448
                                <input type="number" class="form-control brand-commitment" required
449
                                       name="Other" value="">
450
                            </div>
451
                        </div>
34310 tejus.loha 452
                        <div class="col-lg-3">
453
                            <div class="form-group">
454
                                <label>Total Commitment</label>
455
                                <span style="font-size: 140%"></span>
456
                                <input type="number" class="form-control " name="totaCommitmentAmount" id="totalAmount"
457
                                       readonly required
458
                                       placeholder="Total Commitment" value="">
459
                            </div>
460
                        </div>
33658 tejus.loha 461
                    </div>
462
                </div>
33507 tejus.loha 463
                <div class="row">
464
                    <div class="col-lg-4">
465
                        <div class="form-group hide-textarea" id="textArea">
33577 tejus.loha 466
                            <label>Reason for less Commit</label><span
467
                                style="color:red ;font-size: 140%">*</span>
33507 tejus.loha 468
                            <input type="text" class="form-control " name="lessCommitReason" id="lessCommitReason"
33525 tejus.loha 469
                                   placeholder="specify the reason"
33577 tejus.loha 470
                                   value="">
33507 tejus.loha 471
 
472
                        </div>
473
                    </div>
474
                </div>
475
                ##                Agreed Brand fees (INR)
476
                <div class="row">
33885 tejus.loha 477
                    <div class="col-lg-4">
33507 tejus.loha 478
                        <div class="form-group">
33577 tejus.loha 479
                            <label>Agreed Brand fees</label><span
480
                                style="color:red ;font-size: 140%">*</span>
33749 tejus.loha 481
                            <select name="agreedBrandFees" class="form-control">
34107 tejus.loha 482
                                <option selected disabled>Select Brand Fee</option>
33749 tejus.loha 483
                                #foreach($storeTypeFeePair in $storeTypeFeePairs)
484
                                    #set($storeType1 =$storeTypeFeePair.getKey())
485
                                    #set($brandFee = $storeTypeFeePair.getValue())
486
                                    #if($brandFee.getFeeByStoreType($storeType1)>0)
33507 tejus.loha 487
                                        <option value="$storeTypeFeePair.getKey()-$brandFee.getFeeByStoreType($storeType1)-$brandFee.getId()"> $storeType1
488
                                            ($brandFee.getFeeByStoreType($storeType1))
489
                                        </option>
490
                                    #end
33749 tejus.loha 491
                                #end
492
                            </select>
33507 tejus.loha 493
                        </div>
494
                    </div>
495
 
496
                    <!-- Brand fees collected (INR) -->
33885 tejus.loha 497
                    <div class="col-lg-4">
33507 tejus.loha 498
                        <div class="form-group">
33577 tejus.loha 499
                            <label>Brand fees collected</label><span
500
                                style="color:red ;font-size: 140%">*</span>
33749 tejus.loha 501
                            <input type="number" class="form-control " id="brandFeesCollected" required
502
                                   name="brandFeesCollected" placeholder="500000">
33507 tejus.loha 503
                        </div>
504
                    </div>
505
                    <!-- Mode of Payment Online/Cheque/IMPS/NEFT/RTGS/Wallet -->
33885 tejus.loha 506
                    <div class="col-lg-4">
33507 tejus.loha 507
                        <div class="form-group">
33577 tejus.loha 508
                            <label>Mode of Payment</label><span
509
                                style="color:red ;font-size: 140%">*</span>
33749 tejus.loha 510
                            <select class="form-control" name="paymentMode" required>
511
                                <option value="">Select mode</option>
512
                                <option value="UPI">UPI</option>
513
                                <option value="Cheque">Cheque</option>
514
                                <option value="IMPS">IMPS</option>
515
                                <option value="NEFT">NEFT</option>
516
                                <option value="RTGS">RTGS</option>
517
                            </select>
33507 tejus.loha 518
                        </div>
519
                    </div>
33885 tejus.loha 520
                </div>
34026 tejus.loha 521
                <!-- Payment reference no -->
33885 tejus.loha 522
                <div class="row">
523
                    <div class="col-lg-4">
33507 tejus.loha 524
                        <div class="form-group">
33577 tejus.loha 525
                            <label>Payment Reference No</label><span
526
                                style="color:red ;font-size: 140%">*</span>
33749 tejus.loha 527
                            <input type="text" class="form-control" id="paymentReferenceNo" required
528
                                   name="paymentReferenceNo" placeholder="">
33507 tejus.loha 529
                        </div>
530
                    </div>
33578 tejus.loha 531
                    <!-- fee collection date -->
33885 tejus.loha 532
                    <div class="col-lg-4">
33578 tejus.loha 533
                        <div class="form-group">
534
                            <label>Fee collecting Date</label><span
535
                                style="color:red ;font-size: 140%">*</span>
33749 tejus.loha 536
                            <input type="datetime-local" class="form-control " id="feeCollectingDate" required
537
                                   name="feeCollectingDate">
33578 tejus.loha 538
                        </div>
539
                    </div>
33885 tejus.loha 540
                    <div class="col-lg-4">
541
                        <div class="form-group">
542
                            <label>Attach Screenshot</label><span
543
                                style="color:red ;font-size: 140%">*</span>
544
                            <input type="hidden" id="payment-sc-docId" name="paymentAttachment">
545
                            <input type="file" class="form-control" id="payment-sc-doc" required>
546
                        </div>
547
                    </div>
33507 tejus.loha 548
                </div>
549
                <!-- Submit button-->
550
                <div class="form-group" style="text-align: center; margin-bottom:2px;">
33749 tejus.loha 551
                    <button type="button"
34107 tejus.loha 552
                            class="btn btn-success text-white font-semibold py-1 px-4 rounded background-red mk_submit_loi_form"
33749 tejus.loha 553
                            style="box-shadow:none;margin-bottom:2px;">
554
                        <span>Submit</span>
555
                    </button>
33507 tejus.loha 556
                </div>
557
            </form>
558
        </div>
559
    </div>
33658 tejus.loha 560
 
33507 tejus.loha 561
</section>
562
<script>
34085 tejus.loha 563
    $(document).on('blur', 'input[name="storePotential"]', function () {
34310 tejus.loha 564
        const walletValue = parseInt($('select[name="agreeWalletValue"]').val());
565
        const storePotantial = parseInt($('input[name="storePotential"]').val());
34314 tejus.loha 566
        if (walletValue > storePotantial) {
34085 tejus.loha 567
            alert("Store Potential must be greater than or equal to Wallet Value ")
568
            return false;
569
        }
33507 tejus.loha 570
 
34085 tejus.loha 571
    });
33507 tejus.loha 572
 
33658 tejus.loha 573
    $(".gstNo").change(function () {
574
        var inputGstNo = $(this).val();
575
        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}$');
576
        if (gstinformat.test(inputGstNo)) {
577
            doGetAjaxRequestHandler(`${context}/gstValidate?gstNo=` + inputGstNo,
578
                    function (response) {
34316 tejus.loha 579
                        console.log("resType--", typeof response)
580
                        console.log("res----", response)
34310 tejus.loha 581
                        if (response) {
582
                            if (response.sts === "Active") {
34316 tejus.loha 583
                                $('#manualAddress').empty();
584
                                $('#manualAddress').hide();
34310 tejus.loha 585
                                $("#autoAddress").show();
586
                                $("#CompanyName").val(response.tradeNam);
587
                                $("#gstPinCode").val(response.pradr.addr.pncd);
588
                                $("#gstState").val(response.pradr.addr.stcd);
589
                                $("#gstCity").val(response.pradr.addr.loc);
590
                                $("#gstDistrict").val(response.pradr.addr.dst);
591
                                var selectOptions = [];
592
                                var addresses = response.adadr;
593
                                selectOptions.push(`<select id="billingAddress" name="billingAddress" class="form-control">`);
594
                                addresses.forEach((pradr) => {
595
                                    var addrString = getAddressString(pradr.addr);
596
                                    var addrStringify = JSON.stringify(pradr.addr);
597
                                    selectOptions.push(`<option value='${addrStringify}'>
33507 tejus.loha 598
                                      ${addrString}
599
                                </option>`);
34310 tejus.loha 600
                                });
601
                                selectOptions.push(`</select>`);
602
                                $('#addlist').html(selectOptions.join(''));
603
                            } else {
604
                                alert("GSTIN - " + inputGstNo + " is not Active")
34316 tejus.loha 605
                                $('#addlist').html("");
34310 tejus.loha 606
                            }
34026 tejus.loha 607
                        }
34616 tejus.loha 608
                        // else {
609
                        //     alert("Problem to fatching Details From GST , Please Enter manually")
610
                        //     $('#addlist').html("");
611
                        //     $("#CompanyName").removeAttr('readonly');
612
                        //     $("#CompanyName").val("");
613
                        //     const addrFieldData = {
614
                        //         "bno": "Building no",
615
                        //         "bnm": "Building Name",
616
                        //         "st": "Street",
617
                        //         "locality": "Locality",
618
                        //         "loc": "City",
619
                        //         "dst": "District",
620
                        //         "pncd": "Pincode",
621
                        //         "stcd": "State"
622
                        //     };
623
                        //     $('#manualAddress').show();
624
                        //     // Dynamically create input fields
625
                        //     Object.keys(addrFieldData).forEach(function (field) {
626
                        //         $('#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>');
627
                        //     });
628
                        //
629
                        //
630
                        // }
33658 tejus.loha 631
                    });
632
        } else {
633
            alert('Please Enter Valid GSTIN Number');
634
            $(".gstNo").val('');
635
            $(".gstNo").focus();
636
        }
33507 tejus.loha 637
    });
638
 
33658 tejus.loha 639
 
33507 tejus.loha 640
    function getAddressString(addr) {
641
        addrFields = ["bno", "bnm", "st", "locality", "loc", "pncd", "stcd"];
642
        addresArr = [];
643
        for (let i = 0; i < addrFields.length; i++) {
644
            if (addr.hasOwnProperty(addrFields[i]) && addr[addrFields[i]] !== "") {
645
                addresArr.push(addr[addrFields[i]]);
646
            }
647
        }
648
        return addresArr.join(", ");
649
    }
650
 
33658 tejus.loha 651
    $(document).ready(function () {
34310 tejus.loha 652
        $("#autoAddress").hide();
33658 tejus.loha 653
        var brandCommitmentInputs = document.querySelectorAll(".brand-commitment");
654
        var totalCommitmentAmount = 0;
655
        brandCommitmentInputs[brandCommitmentInputs.length - 1].addEventListener("blur", function () {
656
            updateTotalCommitmentAmount();
657
        });
658
 
659
        function updateTotalCommitmentAmount() {
660
            // Recalculate the total commitment amount
661
            totalCommitmentAmount = 0;
662
            brandCommitmentInputs.forEach(function (input) {
663
                var commitmentValue = parseInt(input.value);
664
                if (!isNaN(commitmentValue)) {
665
                    totalCommitmentAmount += commitmentValue;
666
                }
667
            });
668
 
669
            var totalCommitmentInput = document.getElementById("totalAmount");
670
            totalCommitmentInput.value = totalCommitmentAmount;
671
 
672
            var storePotential = document.getElementById("storePotential").value;
673
            var minCommitLimit = storePotential * 0.7; // 70% of the store's potential
674
            if (totalCommitmentAmount >= minCommitLimit) {
675
                totalCommitmentInput.classList.remove('border-red');
676
                totalCommitmentInput.classList.add('border-green');
677
                document.getElementById("textArea").classList.remove('show-textarea');
678
                document.getElementById("textArea").classList.add('hide-textarea');
679
            } else {
680
                alert("Total commit amount should be greater than or equal to 70% of the store's potential. Specify the reason");
681
                totalCommitmentInput.classList.remove('border-green');
682
                totalCommitmentInput.classList.add('border-red');
683
                document.getElementById("textArea").classList.remove('hide-textarea');
684
                document.getElementById("textArea").classList.add('show-textarea');
685
                document.getElementById("textArea").focus();
686
            }
687
        }
688
    });
34829 aman 689
    $(".gstNo").on("input", function () {
690
        this.value = this.value.toUpperCase();
691
    });
33507 tejus.loha 692
</script>