-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgold-calculator-bak.html
1016 lines (960 loc) · 67.7 KB
/
gold-calculator-bak.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" sizes="57x57" href="apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
<link rel="manifest" href="manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<title>Gold Calculator - Azizi J</title>
<style>
.bg-style {
background: linear-gradient(125deg, #ECFCFF 0%, #ECFCFF 40%, #B2FCFF calc(40% + 1px), #B2FCFF 60%, #5EDFFF calc(60% + 1px), #5EDFFF 72%, #3E64FF calc(72% + 1px), #3E64FF 100%);
}
.gold-bg {
/* background-image: url('https://images.pexels.com/photos/321452/pexels-photo-321452.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1'); */
background-image: url(bg-img.jpeg);
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}
h1 span,
h1 a {
font-weight: 700 !important;
text-shadow: #000 0px 0px 15px;
}
.parallax {
/* Create the parallax scrolling effect */
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
</style>
</head>
<body onload="lastCalculate();">
<header class="parallax gold-bg py-5">
<div class="container">
<div class="row">
<div class="col-12">
<h1 class="text-center text-white">
<span class="display-3 font-bolder">Gold Calculator</span>
<br>
<span class="lead p">by</span>
<br>
<a class="lead text-white" style="text-decoration: none;"
href="https://sites.google.com/moe-dl.edu.my/cikguemas/">CikguEmas.Com</a>
</h1>
</div>
</div>
</div>
</header>
<section style="margin-top: -50px;">
<div class="container">
<div class="row">
<div class="col-12">
<div class="card shadow">
<div class="card-body">
<form>
<div class="row">
<div class="col-auto">
<div class="mb-3">
<label class="form-label">LME / QM buy value [RM]</label>
<input type="number" class="form-control shadow-none" id="buy_val"
value="250" placeholder="0">
</div>
</div>
<div class="col-auto">
<div class="mb-3">
<label class="form-label">GSM QM sell value [RM]</label>
<input type="number" disabled class="form-control shadow-none" id="sell_val"
value="0" placeholder="0">
</div>
</div>
<div class="col-auto">
<div class="mb-3">
<label class="form-label">Increment Estimation / Year [%]</label>
<input type="number" min="0" max="5000" class="form-control shadow-none"
id="incr_est" value="7" placeholder="0">
</div>
</div>
<div class="col-auto">
<hr class="border border-white">
<button type="button" onclick="firstCalculate()"
class="btn btn-primary shadow-none">Submit</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</section>
<section>
<div class="container mt-5">
<div class="row">
<div class="col-lg-6 col-12">
<div class="card shadow">
<div class="card-body">
<table class="table table-small mt-2">
<thead>
<tr>
<th>Expences</th>
<th class="text-center">Value [RM]</th>
<th class="text-end">Gold</th>
</tr>
</thead>
<tbody>
<tr>
<td class="py-0">
<input type="text" id="exp_1" placeholder="Project 1"
class="form-control shadow-none border-0 py-1 my-0">
</td>
<td class="py-0">
<input type="number" id="val_1" value="3000"
class="form-control text-center shadow-none border-0 py-1 my-0">
</td>
<td id="weight_1" class="text-end py-1 my-0">0</td>
</tr>
<tr>
<td class="py-0">
<input type="text" id="exp_2" placeholder="Project 2"
class="form-control shadow-none border-0 py-1 my-0">
</td>
<td class="py-0">
<input type="number" id="val_2" value="0"
class="form-control text-center shadow-none border-0 py-1 my-0">
</td>
<td id="weight_2" class="text-end py-1 my-0">0</td>
</tr>
<tr>
<td class="py-0">
<input type="text" id="exp_3" placeholder="Project 3"
class="form-control shadow-none border-0 py-1 my-0">
</td>
<td class="py-0">
<input type="number" id="val_3" value="0"
class="form-control text-center shadow-none border-0 py-1 my-0">
</td>
<td id="weight_3" class="text-end py-1 my-0">0</td>
</tr>
<tr>
<td class="py-0">
<input type="text" id="exp_4" placeholder="Project 4"
class="form-control shadow-none border-0 py-1 my-0">
</td>
<td class="py-0">
<input type="number" id="val_4" value="0"
class="form-control text-center shadow-none border-0 py-1 my-0">
</td>
<td id="weight_4" class="text-end py-1 my-0">0</td>
</tr>
<tr>
<td class="py-0">
<input type="text" id="exp_5" placeholder="Project 5"
class="form-control shadow-none border-0 py-1 my-0">
</td>
<td class="py-0">
<input type="number" id="val_5" value="0"
class="form-control text-center shadow-none border-0 py-1 my-0">
</td>
<td id="weight_5" class="text-end py-1 my-0">0</td>
</tr>
<tr>
<td class="py-0">
<input type="text" id="exp_6" placeholder="Project 6"
class="form-control shadow-none border-0 py-1 my-0">
</td>
<td class="py-0">
<input type="number" id="val_6" value="0"
class="form-control text-center shadow-none border-0 py-1 my-0">
</td>
<td id="weight_6" class="text-end py-1 my-0">0</td>
</tr>
<tr>
<td class="py-0">
<input type="text" id="exp_7" placeholder="Project 7"
class="form-control shadow-none border-0 py-1 my-0">
</td>
<td class="py-0">
<input type="number" id="val_7" value="0"
class="form-control text-center shadow-none border-0 py-1 my-0">
</td>
<td id="weight_7" class="text-end py-1 my-0">0</td>
</tr>
<tr>
<td class="py-0">
<input type="text" id="exp_8" placeholder="Project 8"
class="form-control shadow-none border-0 py-1 my-0">
</td>
<td class="py-0">
<input type="number" id="val_8" value="0"
class="form-control text-center shadow-none border-0 py-1 my-0">
</td>
<td id="weight_8" class="text-end py-1 my-0">0</td>
</tr>
<tr>
<td class="py-0">
<input type="text" id="exp_9" placeholder="Project 9"
class="form-control shadow-none border-0 py-1 my-0">
</td>
<td class="py-0">
<input type="number" id="val_9" value="0"
class="form-control text-center shadow-none border-0 py-1 my-0">
</td>
<td id="weight_9" class="text-end py-1 my-0">0</td>
</tr>
<tr>
<td class="py-0">
<input type="text" id="exp_10" placeholder="Project 10"
class="form-control shadow-none border-0 py-1 my-0">
</td>
<td class="py-0">
<input type="number" id="val_10" value="0"
class="form-control text-center shadow-none border-0 py-1 my-0">
</td>
<td id="weight_10" class="text-end py-1 my-0">0</td>
</tr>
<tr>
<td class="py-0">
<input type="text" id="exp_11" placeholder="Project 11"
class="form-control shadow-none border-0 py-1 my-0">
</td>
<td class="py-0">
<input type="number" id="val_11" value="0"
class="form-control text-center shadow-none border-0 py-1 my-0">
</td>
<td id="weight_11" class="text-end py-1 my-0">0</td>
</tr>
<tr>
<td class="py-0">
<input type="text" id="exp_12" placeholder="Project 12"
class="form-control shadow-none border-0 py-1 my-0">
</td>
<td class="py-0">
<input type="number" id="val_12" value="0"
class="form-control text-center shadow-none border-0 py-1 my-0">
</td>
<td id="weight_12" class="text-end py-1 my-0">0</td>
</tr>
</tbody>
</table>
<button type="button" onclick="getCalculate()"
class="btn btn-block btn-primary shadow-none my-0 px-5">Submit</button>
</div>
</div>
</div>
<div class="col-lg-6 col-12">
<div class="card shadow">
<div class="card-body">
<canvas id="myChart" class="w-100 my-4"></canvas>
<table class="table my-4">
<thead>
<tr>
<th scope="col">Total</th>
<th scope="col">Cash</th>
<th scope="col">Gold</th>
</tr>
</thead>
<tbody>
<tr>
<td>Total Expenses</td>
<td id="total_cash">0</td>
<td id="total_gold">0</td>
</tr>
<tr>
<td>GCA 85%</td>
<td id="gca_cash">0</td>
<td id="gca_gold">0</td>
</tr>
<tr>
<td>Lock 15%</td>
<td id="lock_cash">0</td>
<td id="lock_gold">0</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</section>
<section>
<div class="container my-5">
<div class="row">
<div class="col-12">
<div class="card shadow">
<div class="card-body">
<table class="table">
<thead class="text-center">
<tr>
<th scope="col" colspan="4">Termination Value 15% Net cash value</th>
</tr>
</thead>
<tbody class="text-center">
<tr>
<th scope="row">After 5 Years</th>
<th scope="row">After 10 Years</th>
<th scope="row">After 15 Years</th>
<th scope="row">After 20 Years</th>
</tr>
<tr>
<th id="5years">0</th>
<th id="10years">0</th>
<th id="15years">0</th>
<th id="20years">0</th>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="my-5">
<div class="container">
<div class="row">
<div class="col-12">
<!-- <div class="collapse" id="collapseExample">
<div class="card card-body"> -->
<div class="table-responsive">
<table class="table text-center">
<thead>
<tr>
<th scope="col">Spread +7% QM Sell</th>
<th scope="col">Number of years saved</th>
<th scope="col">Qm Buy / LME if</th>
<th scope="col">Estimated Price of 15% Gold in Holding Inventory
</th>
<th scope="col">GAIN / LOSS 100% Gram Price Difference Gold Value in
the
CURRENT
year <minus>Previous</th>
<th scope="col">3.5% MF for 85% Received</th>
<th scope="col">Termination Value 15% Net cash value</th>
<th scope="col">Year</th>
</tr>
</thead>
<tbody>
<tr>
<td id="row1_col1">0</td>
<th id="row1_col2">1</th>
<td id="row1_col3">0</td>
<td id="row1_col4">0</td>
<td id="row1_col5">0</td>
<td id="row1_col6">0</td>
<td id="row1_col7">0</td>
<td id="row1_col8">2023</td>
</tr>
<tr>
<td id="row2_col1">0</td>
<th id="row2_col2">2</th>
<td id="row2_col3">0</td>
<td id="row2_col4">0</td>
<td id="row2_col5">0</td>
<td id="row2_col6">0</td>
<td id="row2_col7">0</td>
<td id="row2_col8">2024</td>
</tr>
<tr>
<td id="row3_col1">0</td>
<th id="row3_col2">3</th>
<td id="row3_col3">0</td>
<td id="row3_col4">0</td>
<td id="row3_col5">0</td>
<td id="row3_col6">0</td>
<td id="row3_col7">0</td>
<td id="row3_col8">2025</td>
</tr>
<tr>
<td id="row4_col1">0</td>
<th id="row4_col2">4</th>
<td id="row4_col3">0</td>
<td id="row4_col4">0</td>
<td id="row4_col5">0</td>
<td id="row4_col6">0</td>
<td id="row4_col7">0</td>
<td id="row4_col8">2026</td>
</tr>
<tr class="bg-warning">
<td id="row5_col1">0</td>
<th id="row5_col2">5</th>
<td id="row5_col3">0</td>
<td id="row5_col4">0</td>
<td id="row5_col5">0</td>
<td id="row5_col6">0</td>
<td id="row5_col7">0</td>
<td id="row5_col8">2027</td>
</tr>
<tr>
<td id="row6_col1">0</td>
<th id="row6_col2">6</th>
<td id="row6_col3">0</td>
<td id="row6_col4">0</td>
<td id="row6_col5">0</td>
<td id="row6_col6">0</td>
<td id="row6_col7">0</td>
<td id="row6_col8">2028</td>
</tr>
<tr>
<td id="row7_col1">0</td>
<th id="row7_col2">7</th>
<td id="row7_col3">0</td>
<td id="row7_col4">0</td>
<td id="row7_col5">0</td>
<td id="row7_col6">0</td>
<td id="row7_col7">0</td>
<td id="row7_col8">2029</td>
</tr>
<tr>
<td id="row8_col1">0</td>
<th id="row8_col2">8</th>
<td id="row8_col3">0</td>
<td id="row8_col4">0</td>
<td id="row8_col5">0</td>
<td id="row8_col6">0</td>
<td id="row8_col7">0</td>
<td id="row8_col8">2030</td>
</tr>
<tr>
<td id="row9_col1">0</td>
<th id="row9_col2">9</th>
<td id="row9_col3">0</td>
<td id="row9_col4">0</td>
<td id="row9_col5">0</td>
<td id="row9_col6">0</td>
<td id="row9_col7">0</td>
<td id="row9_col8">2031</td>
</tr>
<tr class="bg-warning">
<td id="row10_col1">0</td>
<th id="row10_col2">10</th>
<td id="row10_col3">0</td>
<td id="row10_col4">0</td>
<td id="row10_col5">0</td>
<td id="row10_col6">0</td>
<td id="row10_col7">0</td>
<td id="row10_col8">2032</td>
</tr>
<tr>
<td id="row11_col1">0</td>
<th id="row11_col2">11</th>
<td id="row11_col3">0</td>
<td id="row11_col4">0</td>
<td id="row11_col5">0</td>
<td id="row11_col6">0</td>
<td id="row11_col7">0</td>
<td id="row11_col8">2033</td>
</tr>
<tr>
<td id="row12_col1">0</td>
<th id="row12_col2">12</th>
<td id="row12_col3">0</td>
<td id="row12_col4">0</td>
<td id="row12_col5">0</td>
<td id="row12_col6">0</td>
<td id="row12_col7">0</td>
<td id="row12_col8">2034</td>
</tr>
<tr>
<td id="row13_col1">0</td>
<th id="row13_col2">13</th>
<td id="row13_col3">0</td>
<td id="row13_col4">0</td>
<td id="row13_col5">0</td>
<td id="row13_col6">0</td>
<td id="row13_col7">0</td>
<td id="row13_col8">2035</td>
</tr>
<tr>
<td id="row14_col1">0</td>
<th id="row14_col2">14</th>
<td id="row14_col3">0</td>
<td id="row14_col4">0</td>
<td id="row14_col5">0</td>
<td id="row14_col6">0</td>
<td id="row14_col7">0</td>
<td id="row14_col8">2036</td>
</tr>
<tr class="bg-warning">
<td id="row15_col1">0</td>
<th id="row15_col2">15</th>
<td id="row15_col3">0</td>
<td id="row15_col4">0</td>
<td id="row15_col5">0</td>
<td id="row15_col6">0</td>
<td id="row15_col7">0</td>
<td id="row15_col8">2037</td>
</tr>
<tr>
<td id="row16_col1">0</td>
<th id="row16_col2">16</th>
<td id="row16_col3">0</td>
<td id="row16_col4">0</td>
<td id="row16_col5">0</td>
<td id="row16_col6">0</td>
<td id="row16_col7">0</td>
<td id="row16_col8">2038</td>
</tr>
<tr>
<td id="row17_col1">0</td>
<th id="row17_col2">17</th>
<td id="row17_col3">0</td>
<td id="row17_col4">0</td>
<td id="row17_col5">0</td>
<td id="row17_col6">0</td>
<td id="row17_col7">0</td>
<td id="row17_col8">2039</td>
</tr>
<tr>
<td id="row18_col1">0</td>
<th id="row18_col2">18</th>
<td id="row18_col3">0</td>
<td id="row18_col4">0</td>
<td id="row18_col5">0</td>
<td id="row18_col6">0</td>
<td id="row18_col7">0</td>
<td id="row18_col8">2040</td>
</tr>
<tr>
<td id="row19_col1">0</td>
<th id="row19_col2">19</th>
<td id="row19_col3">0</td>
<td id="row19_col4">0</td>
<td id="row19_col5">0</td>
<td id="row19_col6">0</td>
<td id="row19_col7">0</td>
<td id="row19_col8">2041</td>
</tr>
<tr class="bg-warning">
<td id="row20_col1">0</td>
<th id="row20_col2">20</th>
<td id="row20_col3">0</td>
<td id="row20_col4">0</td>
<td id="row20_col5">0</td>
<td id="row20_col6">0</td>
<td id="row20_col7"></td>
<td id="row20_col8">2042</td>
</tr>
</tbody>
</table>
<!-- </div>
</div> -->
</div>
</div>
</div>
</div>
</section>
<footer class="bg-dark mt-5">
<div class="container">
<div class="row">
<div class="col-12">
<p class="text-center mt-3">
<span class="btn rounded-pill text-white px-5">2022 © by <a
href="http://https://anupammondal.in">Anupam M</a></span>
</p>
</div>
</div>
</div>
</footer>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.5.0/Chart.min.js"></script>
<script>
const firstCalculate = () => {
let buy_val = document.getElementById("buy_val").value;
let incr_est = document.getElementById("incr_est").value;
let sell_val = document.getElementById("sell_val").value = parseFloat(buy_val * 1.07).toFixed(2);
}
const lastCalculate = () => {
let buy_val = document.getElementById("buy_val").value;
let incr_est = document.getElementById("incr_est").value;
let sell_val = document.getElementById("sell_val").value = parseFloat(buy_val * 1.07).toFixed(2);
const val_rm = [];
val_rm[0] = document.getElementById("val_1").value;
val_rm[1] = document.getElementById("val_2").value;
val_rm[2] = document.getElementById("val_3").value;
val_rm[3] = document.getElementById("val_4").value;
val_rm[4] = document.getElementById("val_5").value;
val_rm[5] = document.getElementById("val_6").value;
val_rm[6] = document.getElementById("val_7").value;
val_rm[7] = document.getElementById("val_8").value;
val_rm[8] = document.getElementById("val_9").value;
val_rm[9] = document.getElementById("val_10").value;
val_rm[10] = document.getElementById("val_11").value;
val_rm[11] = document.getElementById("val_12").value;
const gold_g = [];
gold_g[0] = ((val_rm[0] / sell_val).toFixed(4))
gold_g[1] = ((val_rm[1] / sell_val).toFixed(4))
gold_g[2] = ((val_rm[2] / sell_val).toFixed(4))
gold_g[3] = ((val_rm[3] / sell_val).toFixed(4))
gold_g[4] = ((val_rm[4] / sell_val).toFixed(4))
gold_g[5] = ((val_rm[5] / sell_val).toFixed(4))
gold_g[6] = ((val_rm[6] / sell_val).toFixed(4))
gold_g[7] = ((val_rm[7] / sell_val).toFixed(4))
gold_g[8] = ((val_rm[8] / sell_val).toFixed(4))
gold_g[9] = ((val_rm[9] / sell_val).toFixed(4))
gold_g[10] = ((val_rm[10] / sell_val).toFixed(4))
gold_g[11] = ((val_rm[11] / sell_val).toFixed(4))
let total_cash = 0;
for (let i = 0; i < val_rm.length; i++) {
total_cash += parseInt(val_rm[i]);
}
document.getElementById("total_cash").innerHTML = total_cash;
document.getElementById("gca_cash").innerHTML = parseInt(total_cash * 0.85);
document.getElementById("lock_cash").innerHTML = parseInt(total_cash * 0.15);
let total_gold = 0;
for (let i = 0; i < gold_g.length; i++) {
total_gold += parseFloat(gold_g[i]);
}
document.getElementById("total_gold").innerHTML = total_gold;
document.getElementById("gca_gold").innerHTML = parseFloat(total_gold * 0.85).toFixed(4);
const lock_gold = parseFloat(total_gold * 0.15).toFixed(4);
document.getElementById("lock_gold").innerHTML = lock_gold;
document.getElementById("weight_1").innerHTML = gold_g[0];
document.getElementById("weight_2").innerHTML = gold_g[1];
document.getElementById("weight_3").innerHTML = gold_g[2];
document.getElementById("weight_4").innerHTML = gold_g[3];
document.getElementById("weight_5").innerHTML = gold_g[4];
document.getElementById("weight_6").innerHTML = gold_g[5];
document.getElementById("weight_7").innerHTML = gold_g[6];
document.getElementById("weight_8").innerHTML = gold_g[7];
document.getElementById("weight_9").innerHTML = gold_g[8];
document.getElementById("weight_10").innerHTML = gold_g[9];
document.getElementById("weight_11").innerHTML = gold_g[10];
document.getElementById("weight_12").innerHTML = gold_g[11];
const i_rate = (incr_est / 100);
const col3_data = [];
let temp_col3 = buy_val;
const col4_data = [];
let temp_col4;
const col5_data = [];
let temp_col5;
for (let i = 0; i < 20; i++) {
col3_data[i] = (parseFloat(temp_col3) + (parseFloat(temp_col3) * i_rate)).toFixed(2);
temp_col3 = col3_data[i];
col4_data[i] = (col3_data[i] * lock_gold).toFixed(2);
col5_data[i] = ((total_gold * col3_data[i])-(total_gold * buy_val)).toFixed(2);
console.log(col5_data[i]);
}
// Col-3 data on 20 years table
document.getElementById("row1_col3").innerHTML = col3_data[0];
document.getElementById("row2_col3").innerHTML = col3_data[1];
document.getElementById("row3_col3").innerHTML = col3_data[2];
document.getElementById("row4_col3").innerHTML = col3_data[3];
document.getElementById("row5_col3").innerHTML = col3_data[4];
document.getElementById("row6_col3").innerHTML = col3_data[5];
document.getElementById("row7_col3").innerHTML = col3_data[6];
document.getElementById("row8_col3").innerHTML = col3_data[7];
document.getElementById("row9_col3").innerHTML = col3_data[8];
document.getElementById("row10_col3").innerHTML = col3_data[9];
document.getElementById("row11_col3").innerHTML = col3_data[10];
document.getElementById("row12_col3").innerHTML = col3_data[11];
document.getElementById("row13_col3").innerHTML = col3_data[12];
document.getElementById("row14_col3").innerHTML = col3_data[13];
document.getElementById("row15_col3").innerHTML = col3_data[14];
document.getElementById("row16_col3").innerHTML = col3_data[15];
document.getElementById("row17_col3").innerHTML = col3_data[16];
document.getElementById("row18_col3").innerHTML = col3_data[17];
document.getElementById("row19_col3").innerHTML = col3_data[18];
document.getElementById("row20_col3").innerHTML = col3_data[19];
// Col-4 data on 20 years table
document.getElementById("row1_col4").innerHTML = col4_data[0];
document.getElementById("row2_col4").innerHTML = col4_data[1];
document.getElementById("row3_col4").innerHTML = col4_data[2];
document.getElementById("row4_col4").innerHTML = col4_data[3];
document.getElementById("row5_col4").innerHTML = col4_data[4];
document.getElementById("row6_col4").innerHTML = col4_data[5];
document.getElementById("row7_col4").innerHTML = col4_data[6];
document.getElementById("row8_col4").innerHTML = col4_data[7];
document.getElementById("row9_col4").innerHTML = col4_data[8];
document.getElementById("row10_col4").innerHTML = col4_data[9];
document.getElementById("row11_col4").innerHTML = col4_data[10];
document.getElementById("row12_col4").innerHTML = col4_data[11];
document.getElementById("row13_col4").innerHTML = col4_data[12];
document.getElementById("row14_col4").innerHTML = col4_data[13];
document.getElementById("row15_col4").innerHTML = col4_data[14];
document.getElementById("row16_col4").innerHTML = col4_data[15];
document.getElementById("row17_col4").innerHTML = col4_data[16];
document.getElementById("row18_col4").innerHTML = col4_data[17];
document.getElementById("row19_col4").innerHTML = col4_data[18];
document.getElementById("row20_col4").innerHTML = col4_data[19];
// Col-5 data on 20 years table
document.getElementById("row1_col4").innerHTML = col5_data[0];
document.getElementById("row2_col4").innerHTML = col5_data[1];
document.getElementById("row3_col4").innerHTML = col5_data[2];
document.getElementById("row4_col4").innerHTML = col5_data[3];
document.getElementById("row5_col4").innerHTML = col5_data[4];
document.getElementById("row6_col4").innerHTML = col5_data[5];
document.getElementById("row7_col4").innerHTML = col5_data[6];
document.getElementById("row8_col4").innerHTML = col5_data[7];
document.getElementById("row9_col4").innerHTML = col5_data[8];
document.getElementById("row10_col4").innerHTML = col5_data[9];
document.getElementById("row11_col4").innerHTML = col5_data[10];
document.getElementById("row12_col4").innerHTML = col5_data[11];
document.getElementById("row13_col4").innerHTML = col5_data[12];
document.getElementById("row14_col4").innerHTML = col5_data[13];
document.getElementById("row15_col4").innerHTML = col5_data[14];
document.getElementById("row16_col4").innerHTML = col5_data[15];
document.getElementById("row17_col4").innerHTML = col5_data[16];
document.getElementById("row18_col4").innerHTML = col5_data[17];
document.getElementById("row19_col4").innerHTML = col5_data[18];
document.getElementById("row20_col4").innerHTML = col5_data[19];
// console.log(i_rate);
}
const getCalculate = () => {
let gsa_val = document.getElementById("sell_val").value;
let exp_1 = document.getElementById("exp_1").value;
let val_1 = parseInt(document.getElementById("val_1").value);
document.getElementById("weight_1").innerHTML = (val_1 / gsa_val).toFixed(4);
let exp_2 = document.getElementById("exp_2").value;
let val_2 = parseInt(document.getElementById("val_2").value);
document.getElementById("weight_2").innerHTML = (val_2 / gsa_val).toFixed(4);
let exp_3 = document.getElementById("exp_3").value;
let val_3 = parseInt(document.getElementById("val_3").value);
document.getElementById("weight_3").innerHTML = (val_3 / gsa_val).toFixed(4);
let exp_4 = document.getElementById("exp_4").value;
let val_4 = parseInt(document.getElementById("val_4").value);
document.getElementById("weight_4").innerHTML = (val_4 / gsa_val).toFixed(4);
let exp_5 = document.getElementById("exp_5").value;
let val_5 = parseInt(document.getElementById("val_5").value);
document.getElementById("weight_5").innerHTML = (val_5 / gsa_val).toFixed(4);
let exp_6 = document.getElementById("exp_6").value;
let val_6 = parseInt(document.getElementById("val_6").value);
document.getElementById("weight_6").innerHTML = (val_6 / gsa_val).toFixed(4);
let exp_7 = document.getElementById("exp_7").value;
let val_7 = parseInt(document.getElementById("val_7").value);
document.getElementById("weight_7").innerHTML = (val_7 / gsa_val).toFixed(4);
let exp_8 = document.getElementById("exp_8").value;
let val_8 = parseInt(document.getElementById("val_8").value);
document.getElementById("weight_8").innerHTML = (val_8 / gsa_val).toFixed(4);
let exp_9 = document.getElementById("exp_9").value;
let val_9 = parseInt(document.getElementById("val_9").value);
document.getElementById("weight_9").innerHTML = (val_9 / gsa_val).toFixed(4);
let exp_10 = document.getElementById("exp_10").value;
let val_10 = parseInt(document.getElementById("val_10").value);
document.getElementById("weight_10").innerHTML = (val_10 / gsa_val).toFixed(4);
let exp_11 = document.getElementById("exp_11").value;
let val_11 = parseInt(document.getElementById("val_11").value);
document.getElementById("weight_11").innerHTML = (val_11 / gsa_val).toFixed(4);
let exp_12 = document.getElementById("exp_12").value;
let val_12 = parseInt(document.getElementById("val_12").value);
document.getElementById("weight_12").innerHTML = (val_12 / gsa_val).toFixed(4);
document.getElementById("total_cash").innerHTML = (val_1 + val_2 + val_3 + val_4 + val_5 + val_6 + val_7 + val_8 + val_9 + val_10 + val_11 + val_12);
document.getElementById("total_gold").innerHTML = (((val_1 / gsa_val)) + ((val_2 / gsa_val)) + ((val_3 / gsa_val)) + ((val_4 / gsa_val)) + ((val_5 / gsa_val)) + ((val_6 / gsa_val)) + ((val_7 / gsa_val)) + ((val_8 / gsa_val)) + ((val_9 / gsa_val)) + ((val_10 / gsa_val)) + ((val_11 / gsa_val)) + ((val_12 / gsa_val))).toFixed(4);
document.getElementById("gca_cash").innerHTML = ((val_1 + val_2 + val_3 + val_4 + val_5 + val_6 + val_7 + val_8 + val_9 + val_10 + val_11 + val_12)) * 0.85;
document.getElementById("gca_gold").innerHTML = (((((val_1 / gsa_val)) + ((val_2 / gsa_val)) + ((val_3 / gsa_val)) + ((val_4 / gsa_val)) + ((val_5 / gsa_val)) + ((val_6 / gsa_val)) + ((val_7 / gsa_val)) + ((val_8 / gsa_val)) + ((val_9 / gsa_val)) + ((val_10 / gsa_val)) + ((val_11 / gsa_val)) + ((val_12 / gsa_val))) * 0.85).toFixed(4));
document.getElementById("lock_cash").innerHTML = ((val_1 + val_2 + val_3 + val_4 + val_5 + val_6 + val_7 + val_8 + val_9 + val_10 + val_11 + val_12)) * 0.15;
document.getElementById("lock_gold").innerHTML = (((((val_1 / gsa_val)) + ((val_2 / gsa_val)) + ((val_3 / gsa_val)) + ((val_4 / gsa_val)) + ((val_5 / gsa_val)) + ((val_6 / gsa_val)) + ((val_7 / gsa_val)) + ((val_8 / gsa_val)) + ((val_9 / gsa_val)) + ((val_10 / gsa_val)) + ((val_11 / gsa_val)) + ((val_12 / gsa_val))) * 0.15).toFixed(4));
console.log();
}
const putCalculate = () => {
let gsa_val = document.getElementById("buy_val").value;
let incr_est = parseInt(document.getElementById("incr_est").value);
let buy_val = parseFloat(document.getElementById("buy_val").value);
let rate = parseFloat(incr_est / 100).toFixed(2);
let sell_val = document.getElementById("sell_val").value = parseFloat(buy_val * 1.07).toFixed(2);
let lockgold = (document.getElementById("lock_gold").innerHTML);
let totalgold = (document.getElementById("total_gold").innerHTML);
let gcacash = (document.getElementById("gca_cash").innerHTML);
let row1_col2 = document.getElementById("row1_col2").innerHTML = 1;
let row1_col3 = document.getElementById("row1_col3").innerHTML = (parseFloat(gsa_val) + (parseFloat(gsa_val) * parseFloat(rate))).toFixed(2);
let row1_col1 = document.getElementById("row1_col1").innerHTML = parseFloat((row1_col3 * 1.07)).toFixed(2);
let row1_col4 = document.getElementById("row1_col4").innerHTML = (row1_col3 * lockgold).toFixed(2);
let row1_col5 = document.getElementById("row1_col5").innerHTML = ((parseFloat(totalgold) * parseFloat(row1_col3)) - (parseFloat(totalgold) * parseFloat(gsa_val))).toFixed(2);
let row1_col6 = document.getElementById("row1_col6").innerHTML = parseFloat(gcacash * 0.035).toFixed(2);
let row1_col7 = document.getElementById("row1_col7").innerHTML = (((parseFloat(row1_col4)) + (parseFloat(row1_col5))) - (parseFloat(row1_col6))).toFixed(2);
let row2_col2 = document.getElementById("row2_col2").innerHTML = 2;
let row2_col3 = document.getElementById("row2_col3").innerHTML = (parseFloat(row1_col3) + (parseFloat(row1_col3) * parseFloat(rate))).toFixed(2);
let row2_col1 = document.getElementById("row2_col1").innerHTML = parseFloat((row2_col3 * 1.07)).toFixed(2);
let row2_col4 = document.getElementById("row2_col4").innerHTML = (row2_col3 * lockgold).toFixed(2);
let row2_col5 = document.getElementById("row2_col5").innerHTML = ((parseFloat(totalgold) * parseFloat(row2_col3)) - (parseFloat(totalgold) * parseFloat(gsa_val))).toFixed(2);
let row2_col6 = document.getElementById("row2_col6").innerHTML = parseFloat((gcacash * 0.035) * row2_col2).toFixed(2);
let row2_col7 = document.getElementById("row2_col7").innerHTML = (((parseFloat(row2_col4)) + (parseFloat(row2_col5))) - (parseFloat(row2_col6))).toFixed(2);
let row3_col2 = document.getElementById("row3_col2").innerHTML = 3;
let row3_col3 = document.getElementById("row3_col3").innerHTML = (parseFloat(row2_col3) + (parseFloat(row2_col3) * parseFloat(rate))).toFixed(2);
let row3_col1 = document.getElementById("row3_col1").innerHTML = parseFloat((row3_col3 * 1.07)).toFixed(2);
let row3_col4 = document.getElementById("row3_col4").innerHTML = (row3_col3 * lockgold).toFixed(2);
let row3_col5 = document.getElementById("row3_col5").innerHTML = ((parseFloat(totalgold) * parseFloat(row3_col3)) - (parseFloat(totalgold) * parseFloat(gsa_val))).toFixed(2);
let row3_col6 = document.getElementById("row3_col6").innerHTML = parseFloat((gcacash * 0.035) * row3_col2).toFixed(2);
let row3_col7 = document.getElementById("row3_col7").innerHTML = (((parseFloat(row3_col4)) + (parseFloat(row3_col5))) - (parseFloat(row3_col6))).toFixed(2);
let row4_col2 = document.getElementById("row4_col2").innerHTML = 4;
let row4_col3 = document.getElementById("row4_col3").innerHTML = (parseFloat(row3_col3) + (parseFloat(row3_col3) * parseFloat(rate))).toFixed(2);
let row4_col1 = document.getElementById("row4_col1").innerHTML = parseFloat((row4_col3 * 1.07)).toFixed(2);
let row4_col4 = document.getElementById("row4_col4").innerHTML = (row4_col3 * lockgold).toFixed(2);
let row4_col5 = document.getElementById("row4_col5").innerHTML = ((parseFloat(totalgold) * parseFloat(row4_col3)) - (parseFloat(totalgold) * parseFloat(gsa_val))).toFixed(2);
let row4_col6 = document.getElementById("row4_col6").innerHTML = parseFloat((gcacash * 0.035) * row4_col2).toFixed(2);
let row4_col7 = document.getElementById("row4_col7").innerHTML = (((parseFloat(row4_col4)) + (parseFloat(row4_col5))) - (parseFloat(row4_col6))).toFixed(2);
let row5_col2 = document.getElementById("row5_col2").innerHTML = 5;
let row5_col3 = document.getElementById("row5_col3").innerHTML = (parseFloat(row4_col3) + (parseFloat(row4_col3) * parseFloat(rate))).toFixed(2);
let row5_col1 = document.getElementById("row5_col1").innerHTML = parseFloat((row5_col3 * 1.07)).toFixed(2);
let row5_col4 = document.getElementById("row5_col4").innerHTML = (row5_col3 * lockgold).toFixed(2);
let row5_col5 = document.getElementById("row5_col5").innerHTML = ((parseFloat(totalgold) * parseFloat(row5_col3)) - (parseFloat(totalgold) * parseFloat(gsa_val))).toFixed(2);
let row5_col6 = document.getElementById("row5_col6").innerHTML = parseFloat((gcacash * 0.035) * row5_col2).toFixed(2);
let row5_col7 = document.getElementById("row5_col7").innerHTML = (((parseFloat(row5_col4)) + (parseFloat(row5_col5))) - (parseFloat(row5_col6))).toFixed(2);
let row6_col2 = document.getElementById("row6_col2").innerHTML = 6;
let row6_col3 = document.getElementById("row6_col3").innerHTML = (parseFloat(row5_col3) + (parseFloat(row5_col3) * parseFloat(rate))).toFixed(2);
let row6_col1 = document.getElementById("row6_col1").innerHTML = parseFloat((row6_col3 * 1.07)).toFixed(2);
let row6_col4 = document.getElementById("row6_col4").innerHTML = (row6_col3 * lockgold).toFixed(2);
let row6_col5 = document.getElementById("row6_col5").innerHTML = ((parseFloat(totalgold) * parseFloat(row6_col3)) - (parseFloat(totalgold) * parseFloat(gsa_val))).toFixed(2);
let row6_col6 = document.getElementById("row6_col6").innerHTML = parseFloat((gcacash * 0.035) * row6_col2).toFixed(2);
let row6_col7 = document.getElementById("row6_col7").innerHTML = (((parseFloat(row6_col4)) + (parseFloat(row6_col5))) - (parseFloat(row6_col6))).toFixed(2);
let row7_col2 = document.getElementById("row7_col2").innerHTML = 7;
let row7_col3 = document.getElementById("row7_col3").innerHTML = (parseFloat(row6_col3) + (parseFloat(row6_col3) * parseFloat(rate))).toFixed(2);
let row7_col1 = document.getElementById("row7_col1").innerHTML = parseFloat((row7_col3 * 1.07)).toFixed(2);
let row7_col4 = document.getElementById("row7_col4").innerHTML = (row7_col3 * lockgold).toFixed(2);
let row7_col5 = document.getElementById("row7_col5").innerHTML = ((parseFloat(totalgold) * parseFloat(row7_col3)) - (parseFloat(totalgold) * parseFloat(gsa_val))).toFixed(2);
let row7_col6 = document.getElementById("row7_col6").innerHTML = parseFloat((gcacash * 0.035) * row7_col2).toFixed(2);
let row7_col7 = document.getElementById("row7_col7").innerHTML = (((parseFloat(row7_col4)) + (parseFloat(row7_col5))) - (parseFloat(row7_col6))).toFixed(2);
let row8_col2 = document.getElementById("row8_col2").innerHTML = 8;
let row8_col3 = document.getElementById("row8_col3").innerHTML = (parseFloat(row7_col3) + (parseFloat(row7_col3) * parseFloat(rate))).toFixed(2);
let row8_col1 = document.getElementById("row8_col1").innerHTML = parseFloat((row8_col3 * 1.07)).toFixed(2);
let row8_col4 = document.getElementById("row8_col4").innerHTML = (row8_col3 * lockgold).toFixed(2);
let row8_col5 = document.getElementById("row8_col5").innerHTML = ((parseFloat(totalgold) * parseFloat(row8_col3)) - (parseFloat(totalgold) * parseFloat(gsa_val))).toFixed(2);
let row8_col6 = document.getElementById("row8_col6").innerHTML = parseFloat((gcacash * 0.035) * row8_col2).toFixed(2);
let row8_col7 = document.getElementById("row8_col7").innerHTML = (((parseFloat(row8_col4)) + (parseFloat(row8_col5))) - (parseFloat(row8_col6))).toFixed(2);
let row9_col2 = document.getElementById("row9_col2").innerHTML = 9;
let row9_col3 = document.getElementById("row9_col3").innerHTML = (parseFloat(row8_col3) + (parseFloat(row8_col3) * parseFloat(rate))).toFixed(2);
let row9_col1 = document.getElementById("row9_col1").innerHTML = parseFloat((row9_col3 * 1.07)).toFixed(2);
let row9_col4 = document.getElementById("row9_col4").innerHTML = (row9_col3 * lockgold).toFixed(2);
let row9_col5 = document.getElementById("row9_col5").innerHTML = ((parseFloat(totalgold) * parseFloat(row9_col3)) - (parseFloat(totalgold) * parseFloat(gsa_val))).toFixed(2);
let row9_col6 = document.getElementById("row9_col6").innerHTML = parseFloat((gcacash * 0.035) * row9_col2).toFixed(2);
let row9_col7 = document.getElementById("row9_col7").innerHTML = (((parseFloat(row9_col4)) + (parseFloat(row9_col5))) - (parseFloat(row9_col6))).toFixed(2);
let row10_col2 = document.getElementById("row10_col2").innerHTML = 10;
let row10_col3 = document.getElementById("row10_col3").innerHTML = (parseFloat(row9_col3) + (parseFloat(row9_col3) * parseFloat(rate))).toFixed(2);
let row10_col1 = document.getElementById("row10_col1").innerHTML = parseFloat((row10_col3 * 1.07)).toFixed(2);
let row10_col4 = document.getElementById("row10_col4").innerHTML = (row10_col3 * lockgold).toFixed(2);
let row10_col5 = document.getElementById("row10_col5").innerHTML = ((parseFloat(totalgold) * parseFloat(row10_col3)) - (parseFloat(totalgold) * parseFloat(gsa_val))).toFixed(2);
let row10_col6 = document.getElementById("row10_col6").innerHTML = parseFloat((gcacash * 0.035) * row10_col2).toFixed(2);
let row10_col7 = document.getElementById("row10_col7").innerHTML = (((parseFloat(row10_col4)) + (parseFloat(row10_col5))) - (parseFloat(row10_col6))).toFixed(2);
let row11_col2 = document.getElementById("row11_col2").innerHTML = 11;
let row11_col3 = document.getElementById("row11_col3").innerHTML = (parseFloat(row10_col3) + (parseFloat(row10_col3) * parseFloat(rate))).toFixed(2);
let row11_col1 = document.getElementById("row11_col1").innerHTML = parseFloat((row11_col3 * 1.07)).toFixed(2);
let row11_col4 = document.getElementById("row11_col4").innerHTML = (row11_col3 * lockgold).toFixed(2);
let row11_col5 = document.getElementById("row11_col5").innerHTML = ((parseFloat(totalgold) * parseFloat(row11_col3)) - (parseFloat(totalgold) * parseFloat(gsa_val))).toFixed(2);
let row11_col6 = document.getElementById("row11_col6").innerHTML = parseFloat((gcacash * 0.035) * row11_col2).toFixed(2);
let row11_col7 = document.getElementById("row11_col7").innerHTML = (((parseFloat(row11_col4)) + (parseFloat(row11_col5))) - (parseFloat(row11_col6))).toFixed(2);
let row12_col2 = document.getElementById("row12_col2").innerHTML = 12;
let row12_col3 = document.getElementById("row12_col3").innerHTML = (parseFloat(row11_col3) + (parseFloat(row11_col3) * parseFloat(rate))).toFixed(2);
let row12_col1 = document.getElementById("row12_col1").innerHTML = parseFloat((row12_col3 * 1.07)).toFixed(2);
let row12_col4 = document.getElementById("row12_col4").innerHTML = (row12_col3 * lockgold).toFixed(2);
let row12_col5 = document.getElementById("row12_col5").innerHTML = ((parseFloat(totalgold) * parseFloat(row12_col3)) - (parseFloat(totalgold) * parseFloat(gsa_val))).toFixed(2);
let row12_col6 = document.getElementById("row12_col6").innerHTML = parseFloat((gcacash * 0.035) * row12_col2).toFixed(2);
let row12_col7 = document.getElementById("row12_col7").innerHTML = (((parseFloat(row12_col4)) + (parseFloat(row12_col5))) - (parseFloat(row12_col6))).toFixed(2);
let row13_col2 = document.getElementById("row13_col2").innerHTML = 13;
let row13_col3 = document.getElementById("row13_col3").innerHTML = (parseFloat(row12_col3) + (parseFloat(row12_col3) * parseFloat(rate))).toFixed(2);
let row13_col1 = document.getElementById("row13_col1").innerHTML = parseFloat((row13_col3 * 1.07)).toFixed(2);
let row13_col4 = document.getElementById("row13_col4").innerHTML = (row13_col3 * lockgold).toFixed(2);
let row13_col5 = document.getElementById("row13_col5").innerHTML = ((parseFloat(totalgold) * parseFloat(row13_col3)) - (parseFloat(totalgold) * parseFloat(gsa_val))).toFixed(2);
let row13_col6 = document.getElementById("row13_col6").innerHTML = parseFloat((gcacash * 0.035) * row13_col2).toFixed(2);
let row13_col7 = document.getElementById("row13_col7").innerHTML = (((parseFloat(row13_col4)) + (parseFloat(row13_col5))) - (parseFloat(row13_col6))).toFixed(2);
let row14_col2 = document.getElementById("row14_col2").innerHTML = 14;
let row14_col3 = document.getElementById("row14_col3").innerHTML = (parseFloat(row13_col3) + (parseFloat(row13_col3) * parseFloat(rate))).toFixed(2);
let row14_col1 = document.getElementById("row14_col1").innerHTML = parseFloat((row14_col3 * 1.07)).toFixed(2);
let row14_col4 = document.getElementById("row14_col4").innerHTML = (row14_col3 * lockgold).toFixed(2);
let row14_col5 = document.getElementById("row14_col5").innerHTML = ((parseFloat(totalgold) * parseFloat(row14_col3)) - (parseFloat(totalgold) * parseFloat(gsa_val))).toFixed(2);
let row14_col6 = document.getElementById("row14_col6").innerHTML = parseFloat((gcacash * 0.035) * row14_col2).toFixed(2);
let row14_col7 = document.getElementById("row14_col7").innerHTML = (((parseFloat(row14_col4)) + (parseFloat(row14_col5))) - (parseFloat(row14_col6))).toFixed(2);
let row15_col2 = document.getElementById("row15_col2").innerHTML = 15;
let row15_col3 = document.getElementById("row15_col3").innerHTML = (parseFloat(row14_col3) + (parseFloat(row14_col3) * parseFloat(rate))).toFixed(2);
let row15_col1 = document.getElementById("row15_col1").innerHTML = parseFloat((row15_col3 * 1.07)).toFixed(2);
let row15_col4 = document.getElementById("row15_col4").innerHTML = (row15_col3 * lockgold).toFixed(2);
let row15_col5 = document.getElementById("row15_col5").innerHTML = ((parseFloat(totalgold) * parseFloat(row15_col3)) - (parseFloat(totalgold) * parseFloat(gsa_val))).toFixed(2);
let row15_col6 = document.getElementById("row15_col6").innerHTML = parseFloat((gcacash * 0.035) * row15_col2).toFixed(2);
let row15_col7 = document.getElementById("row15_col7").innerHTML = (((parseFloat(row15_col4)) + (parseFloat(row15_col5))) - (parseFloat(row15_col6))).toFixed(2);
let row16_col2 = document.getElementById("row16_col2").innerHTML = 16;
let row16_col3 = document.getElementById("row16_col3").innerHTML = (parseFloat(row15_col3) + (parseFloat(row15_col3) * parseFloat(rate))).toFixed(2);
let row16_col1 = document.getElementById("row16_col1").innerHTML = parseFloat((row16_col3 * 1.07)).toFixed(2);
let row16_col4 = document.getElementById("row16_col4").innerHTML = (row16_col3 * lockgold).toFixed(2);
let row16_col5 = document.getElementById("row16_col5").innerHTML = ((parseFloat(totalgold) * parseFloat(row16_col3)) - (parseFloat(totalgold) * parseFloat(gsa_val))).toFixed(2);
let row16_col6 = document.getElementById("row16_col6").innerHTML = parseFloat((gcacash * 0.035) * row16_col2).toFixed(2);
let row16_col7 = document.getElementById("row16_col7").innerHTML = (((parseFloat(row16_col4)) + (parseFloat(row16_col5))) - (parseFloat(row16_col6))).toFixed(2);
let row17_col2 = document.getElementById("row17_col2").innerHTML = 17;
let row17_col3 = document.getElementById("row17_col3").innerHTML = (parseFloat(row16_col3) + (parseFloat(row16_col3) * parseFloat(rate))).toFixed(2);
let row17_col1 = document.getElementById("row17_col1").innerHTML = parseFloat((row17_col3 * 1.07)).toFixed(2);
let row17_col4 = document.getElementById("row17_col4").innerHTML = (row17_col3 * lockgold).toFixed(2);
let row17_col5 = document.getElementById("row17_col5").innerHTML = ((parseFloat(totalgold) * parseFloat(row17_col3)) - (parseFloat(totalgold) * parseFloat(gsa_val))).toFixed(2);
let row17_col6 = document.getElementById("row17_col6").innerHTML = parseFloat((gcacash * 0.035) * row17_col2).toFixed(2);
let row17_col7 = document.getElementById("row17_col7").innerHTML = (((parseFloat(row17_col4)) + (parseFloat(row17_col5))) - (parseFloat(row17_col6))).toFixed(2);
let row18_col2 = document.getElementById("row18_col2").innerHTML = 18;
let row18_col3 = document.getElementById("row18_col3").innerHTML = (parseFloat(row17_col3) + (parseFloat(row17_col3) * parseFloat(rate))).toFixed(2);
let row18_col1 = document.getElementById("row18_col1").innerHTML = parseFloat((row18_col3 * 1.07)).toFixed(2);
let row18_col4 = document.getElementById("row18_col4").innerHTML = (row18_col3 * lockgold).toFixed(2);
let row18_col5 = document.getElementById("row18_col5").innerHTML = ((parseFloat(totalgold) * parseFloat(row18_col3)) - (parseFloat(totalgold) * parseFloat(gsa_val))).toFixed(2);
let row18_col6 = document.getElementById("row18_col6").innerHTML = parseFloat((gcacash * 0.035) * row18_col2).toFixed(2);
let row18_col7 = document.getElementById("row18_col7").innerHTML = (((parseFloat(row18_col4)) + (parseFloat(row18_col5))) - (parseFloat(row18_col6))).toFixed(2);
let row19_col2 = document.getElementById("row19_col2").innerHTML = 19;
let row19_col3 = document.getElementById("row19_col3").innerHTML = (parseFloat(row18_col3) + (parseFloat(row18_col3) * parseFloat(rate))).toFixed(2);
let row19_col1 = document.getElementById("row19_col1").innerHTML = parseFloat((row19_col3 * 1.07)).toFixed(2);
let row19_col4 = document.getElementById("row19_col4").innerHTML = (row19_col3 * lockgold).toFixed(2);
let row19_col5 = document.getElementById("row19_col5").innerHTML = ((parseFloat(totalgold) * parseFloat(row19_col3)) - (parseFloat(totalgold) * parseFloat(gsa_val))).toFixed(2);
let row19_col6 = document.getElementById("row19_col6").innerHTML = parseFloat((gcacash * 0.035) * row19_col2).toFixed(2);
let row19_col7 = document.getElementById("row19_col7").innerHTML = (((parseFloat(row19_col4)) + (parseFloat(row19_col5))) - (parseFloat(row19_col6))).toFixed(2);
let row20_col2 = document.getElementById("row20_col2").innerHTML = 20;
let row20_col3 = document.getElementById("row20_col3").innerHTML = (parseFloat(row19_col3) + (parseFloat(row19_col3) * parseFloat(rate))).toFixed(2);
let row20_col1 = document.getElementById("row20_col1").innerHTML = parseFloat((row20_col3 * 1.07)).toFixed(2);
let row20_col4 = document.getElementById("row20_col4").innerHTML = (row20_col3 * lockgold).toFixed(2);
let row20_col5 = document.getElementById("row20_col5").innerHTML = ((parseFloat(totalgold) * parseFloat(row20_col3)) - (parseFloat(totalgold) * parseFloat(gsa_val))).toFixed(2);
let row20_col6 = document.getElementById("row20_col6").innerHTML = parseFloat((gcacash * 0.035) * row20_col2).toFixed(2);
let row20_col7 = document.getElementById("row20_col7").innerHTML = (((parseFloat(row20_col4)) + (parseFloat(row20_col5))) - (parseFloat(row20_col6))).toFixed(2);
document.getElementById("5years").innerHTML = row5_col7;
document.getElementById("10years").innerHTML = row10_col7;
document.getElementById("15years").innerHTML = row15_col7;
document.getElementById("20years").innerHTML = row20_col7;
var collapseElementList = [].slice.call(document.querySelectorAll('.collapse'))
var collapseList = collapseElementList.map(function (collapseEl) {
return new bootstrap.Collapse(collapseEl)
})
console.log();
}
var xValues = [2023, 2027, 2037, 2042];
new Chart("myChart", {
type: "line",
data: {
labels: xValues,
datasets: [{
data: [937.13, 4685.63, 9371.25, 14056.88, 18742.50],
borderColor: "blue",
fill: false
}, {
data: [6187.18, 15619.17, 34281.41, 63897.82, 109614.40],
borderColor: "red",
fill: false
}]
},
options: {
legend: { display: false }
}
});
</script>
<!-- Optional JavaScript; choose one of the two! -->