Subversion Repositories SmartDukaan

Rev

Rev 33749 | Rev 33869 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 33749 Rev 33845
Line 44... Line 44...
44
                        </P>
44
                        </P>
45
                    </div>
45
                    </div>
46
                </td>
46
                </td>
47
                <td style="text-align:right;">
47
                <td style="text-align:right;">
48
                    <div style="text-align:right">
48
                    <div style="text-align:right">
49
                        <P>Date :- $loiForm.getAcquiredDate().format($dateFormatter)</P>
49
                        <P>Date :- $loiForm.getLoiGeneratedOn().format($dateFormatter)</P>
50
                    </div>
50
                    </div>
51
                </td>
51
                </td>
52
            </table>
52
            </table>
53
        </div>
53
        </div>
54
        <div style="margin-top:2px; margin-left: 8%; margin-right: 8%;">
54
        <div style="margin-top:2px; margin-left: 8%; margin-right: 8%;">
Line 244... Line 244...
244
                    </tr>
244
                    </tr>
245
                    <tr>
245
                    <tr>
246
                        <td>Our charges including GST</td>
246
                        <td>Our charges including GST</td>
247
                        #if($loiForm.getBrandType()!="SPECIAL")
247
                        #if($loiForm.getBrandType()!="SPECIAL")
248
 
248
 
249
                        #if($loiForm.getBrandType()=="STUDIO")
249
                            #if($loiForm.getBrandType()=="STUDIO")
250
                            <td><b>
250
                                <td><b>
251
                                <del>
251
                                    <del>
252
                                    $brandFee.getStudio()</del>
252
                                        $brandFee.getStudio()</del>
253
                            </b></td>
253
                                </b></td>
254
                        #else
254
                            #else
255
                            <td><b>$brandFee.getStudio()</b></td>
255
                                <td><b>$brandFee.getStudio()</b></td>
256
                        #end
256
                            #end
257
                        #if($loiForm.getBrandType()=="ARCADE")
257
                            #if($loiForm.getBrandType()=="ARCADE")
258
                            <td><b>
258
                                <td><b>
259
                                <del>$brandFee.getArcade()</del>
259
                                    <del>$brandFee.getArcade()</del>
260
                            </b></td>
260
                                </b></td>
261
                        #else
261
                            #else
262
                            <td><b>$brandFee.getArcade()</b></td>
262
                                <td><b>$brandFee.getArcade()</b></td>
263
                        #end
263
                            #end
264
 
264
 
265
                        #if($loiForm.getBrandType()=="PLAZA")
265
                            #if($loiForm.getBrandType()=="PLAZA")
266
                            <td><b>
266
                                <td><b>
267
                                <del>$brandFee.getPlaza()</del>
267
                                    <del>$brandFee.getPlaza()</del>
268
                            </b></td>
268
                                </b></td>
269
                        #else
269
                            #else
270
                            <td><b>$brandFee.getPlaza()</b></td>
270
                                <td><b>$brandFee.getPlaza()</b></td>
271
                        #end
271
                            #end
272
                        #else
272
                        #else
273
                            <td><b>
273
                            <td><b>
274
                                <del>
274
                                <del>
275
                                    $brandFee.getStudio()</del>
275
                                    $brandFee.getStudio()</del>
276
                            </b></td>
276
                            </b></td>
Line 284... Line 284...
284
                    </tr>
284
                    </tr>
285
                    <tr>
285
                    <tr>
286
 
286
 
287
                        <td>You pay</td>
287
                        <td>You pay</td>
288
                        #if($loiForm.getBrandType()!="SPECIAL")
288
                        #if($loiForm.getBrandType()!="SPECIAL")
289
                        #if($loiForm.getBrandType()=="STUDIO")
289
                            #if($loiForm.getBrandType()=="STUDIO")
290
                            <td><b>$loiForm.getAgreedBrandFees()</b></td>
290
                                <td><b>$loiForm.getAgreedBrandFees()</b></td>
291
                        #else
291
                            #else
292
                            <td><b>--</b></td>
292
                                <td><b>--</b></td>
293
                        #end
293
                            #end
294
 
294
 
295
 
295
 
296
                        #if($loiForm.getBrandType()=="ARCADE")
296
                            #if($loiForm.getBrandType()=="ARCADE")
297
                            <td><b>$loiForm.getAgreedBrandFees()</b></td>
297
                                <td><b>$loiForm.getAgreedBrandFees()</b></td>
298
                        #else
298
                            #else
299
                            <td><b>--</b></td>
299
                                <td><b>--</b></td>
300
                        #end
300
                            #end
301
                        #if($loiForm.getBrandType()=="PLAZA")
301
                            #if($loiForm.getBrandType()=="PLAZA")
302
                            <td><b>$loiForm.getAgreedBrandFees()</b></td>
302
                                <td><b>$loiForm.getAgreedBrandFees()</b></td>
303
                        #else
303
                            #else
304
                            <td><b>--</b></td>
304
                                <td><b>--</b></td>
305
                        #end
305
                            #end
306
                        #else
306
                        #else
307
                            <td><b>SPECIAL OFFER - $loiForm.getAgreedBrandFees()</b></td>
307
                            <td><b>SPECIAL OFFER - $loiForm.getAgreedBrandFees()</b></td>
308
                        #end
308
                        #end
309
                    </tr>
309
                    </tr>
310
                    </tbody>
310
                    </tbody>
Line 447... Line 447...
447
        </div>
447
        </div>
448
    </div>
448
    </div>
449
</div>
449
</div>
450
</body>
450
</body>
451
<div align="center">
451
<div align="center">
-
 
452
    #if($loiForm.getLoiDoc()>0||$loiForm.getLoiSignOtp()>0)
-
 
453
        <button onclick="printDiv()" class="btn-success">Print & Save</button>
-
 
454
    #end
452
    <button value="$loiForm.getId()" id="LOI_otp" class="btn-success">Send OTP</button>
455
    <button value="$loiForm.getId()" id="LOI_otp" class="btn-success">Send OTP</button>
453
    <button type="button" value="$loiForm.getId()" id="confirmSign" class="btn-success">Confirm Sign</button>
456
    <button type="button" value="$loiForm.getId()" id="confirmSign" class="btn-success">Confirm Sign</button>
454
 
457
 
455
 
458
 
456
</div>
459
</div>
Line 488... Line 491...
488
            alert('Enter received OTP and Try again')
491
            alert('Enter received OTP and Try again')
489
        }
492
        }
490
 
493
 
491
    }
494
    }
492
 
495
 
493
    document.getElementById('confirmSign').addEventListener('click', function () {
496
    $(document).on('click', "#confirmSign", function () {
494
        let loiId = $(this).val();
497
        let loiId = $(this).val();
495
        let otp = validateOTP();
498
        let otp = validateOTP();
496
        console.log("loiId-", loiId, ",otp-", otp);
499
        console.log("loiId-", loiId, ",otp-", otp);
497
        let validateOtpUrl = `${context}/validateLoiOtp?loiId=${loiId}&provideOtp=${otp}`;
500
        let validateOtpUrl = `${context}/validateLoiOtp?loiId=${loiId}&provideOtp=${otp}`;
498
        if (otp != undefined) {
501
        if (otp != undefined) {
Line 511... Line 514...
511
                    html2pdf().from(element).set(opt).outputPdf("arraybuffer").then(function (pdf) {
514
                    html2pdf().from(element).set(opt).outputPdf("arraybuffer").then(function (pdf) {
512
                        console.log("pdf- ", pdf);
515
                        console.log("pdf- ", pdf);
513
                        const file = new Blob([pdf], {type: 'application/pdf'});
516
                        const file = new Blob([pdf], {type: 'application/pdf'});
514
                        uploadDocument(file, function (documentId) {
517
                        uploadDocument(file, function (documentId) {
515
                            console.log("documentIdddd-", documentId);
518
                            console.log("documentIdddd-", documentId);
-
 
519
                            if (documentId > 0) {
516
                            saveLoiDoc(loiId, documentId);
520
                                saveLoiDoc(loiId, documentId);
517
                            doGetAjaxRequestHandler(`${context}/pendingLoiForm`,
521
                                pendingLoiForm("main-content");
518
                                    function (response) {
522
                            } else {
519
                                        $('#' + 'main-content').html(response);
523
                                alert("Something went wrong , please again to confirm otp")
520
                                    });
524
                            }
521
                        });
525
                        });
522
                    });
526
                    });
523
                    alert("OTP verified successfully ");
-
 
524
                } else {
-
 
525
                    alert("OTP not verified,Please try again");
-
 
526
                }
527
                }
527
            });
528
            });
528
        }
529
        }
529
    });
530
    });
530
 
531
 
531
    function saveLoiDoc(loiId, documentId) {
532
    function saveLoiDoc(loiId, documentId) {
532
        let saveLoiDocUrl = `${context}/saveLoiDoc?loiId=` + loiId + `&loiDocId=` + documentId
533
        let saveLoiDocUrl = `${context}/saveLoiDoc?loiId=` + loiId + `&loiDocId=` + documentId
533
        doPostAjaxRequestHandler(saveLoiDocUrl, function (response) {
534
        doPostAjaxRequestHandler(saveLoiDocUrl, function (response) {
-
 
535
            if (response) {
-
 
536
                alert("LOI has been signed successfully and sent to the registered email. Please check your email.");
-
 
537
            } else {
-
 
538
                alert("Something went wrong , Please try again to generate Loi and Validate otp");
-
 
539
 
-
 
540
            }
534
        });
541
        });
535
    }
542
    }
536
</script>
543
</script>
537
 
544
 
538
</script>
545
</script>
539
546