Subversion Repositories SmartDukaan

Rev

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

Rev 34971 Rev 35001
Line 24... Line 24...
24
        flex: 1 1 auto;
24
        flex: 1 1 auto;
25
        min-width: 300px;
25
        min-width: 300px;
26
    }
26
    }
27
 
27
 
28
 
28
 
29
    .legend {
-
 
30
        background: #f8f9fa;
-
 
31
        padding: 15px;
-
 
32
        border-radius: 8px;
-
 
33
        margin-bottom: 30px;
-
 
34
    }
-
 
35
 
29
 
36
    .status-badge {
-
 
37
        display: inline-block;
-
 
38
        padding: 6px 12px;
-
 
39
        border-radius: 20px;
-
 
40
        font-size: 12px;
-
 
41
        font-weight: 600;
-
 
42
        text-transform: uppercase;
-
 
43
        letter-spacing: 0.5px;
-
 
44
    }
-
 
45
 
30
 
46
    .status-ok {
31
    .status-ok {
47
        background-color: #d4edda;
-
 
48
        color: #155724;
32
        color: #155724;
49
        border: 1px solid #c3e6cb;
-
 
50
    }
-
 
51
 
-
 
52
    .status-not-ok {
-
 
53
        background-color: #f8d7da;
-
 
54
        color: #721c24;
-
 
55
        border: 1px solid #f5c6cb;
-
 
56
    }
-
 
57
 
-
 
58
    .brand-card {
-
 
59
        background: white;
-
 
60
        border: 1px solid #e9ecef;
-
 
61
        border-radius: 12px;
-
 
62
        padding: 20px;
33
        font-weight: 700;
63
        margin-bottom: 15px;
-
 
64
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
-
 
65
        transition: transform 0.2s ease, box-shadow 0.2s ease;
-
 
66
    }
-
 
67
 
-
 
68
    .brand-card:hover {
-
 
69
        transform: translateY(-2px);
-
 
70
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
-
 
71
    }
34
    }
72
 
35
 
73
    .brand-name {
36
    .brand-name {
74
        font-size: 1.5rem;
37
        font-size: 1.5rem;
75
        font-weight: 700;
38
        font-weight: 700;
76
        margin-bottom: 15px;
39
        margin-bottom: 15px;
77
        color: #2c3e50;
40
        color: #2c3e50;
78
    }
41
    }
79
 
42
 
80
    .quantity-row {
-
 
81
        display: flex;
-
 
82
        justify-content: space-between;
-
 
83
        align-items: center;
-
 
84
        padding: 8px 0;
-
 
85
        border-bottom: 1px solid #f1f3f4;
-
 
86
    }
-
 
87
 
-
 
88
    .quantity-row:last-child {
-
 
89
        border-bottom: none;
-
 
90
    }
-
 
91
 
43
 
92
    .quantity-label {
-
 
93
        font-weight: 500;
-
 
94
        color: #6c757d;
-
 
95
    }
-
 
96
 
44
 
97
    .quantity-value {
45
    .quantity-value {
98
        font-weight: 600;
46
        font-weight: 600;
99
        color: #2c3e50;
47
        color: #2c3e50;
100
    }
48
    }
101
 
49
 
102
    .left-panel {
-
 
103
        background: #f8f9fa;
-
 
104
        border-radius: 8px;
-
 
105
        padding: 20px;
-
 
106
    }
-
 
107
 
-
 
108
    .right-panel {
50
    .right-panel {
109
        background: white;
51
        background: white;
110
        border-radius: 8px;
52
        border-radius: 8px;
111
        padding: 20px;
53
        padding: 20px;
112
        border: 1px solid #e9ecef;
54
        border: 1px solid #e9ecef;
113
    }
55
    }
114
 
56
 
115
    .chart-legend {
-
 
116
        max-height: 400px;
-
 
117
        overflow-y: auto;
-
 
118
    }
-
 
119
 
-
 
120
    .legend-item {
-
 
121
        transition: transform 0.2s ease;
-
 
122
        margin-bottom: 10px;
-
 
123
 
-
 
124
    }
-
 
125
 
-
 
126
    .legend-item:hover {
-
 
127
        transform: translateX(5px) scale(1.02);
-
 
128
        z-index: 10;
-
 
129
    }
-
 
130
 
-
 
131
 
-
 
132
    .legend-color {
-
 
133
        width: 20px;
-
 
134
        height: 20px;
-
 
135
        border-radius: 6px;
-
 
136
        margin-right: 12px;
-
 
137
        flex-shrink: 0;
-
 
138
    }
-
 
139
 
-
 
140
    .legend-brand {
-
 
141
        font-weight: 750;
-
 
142
        color: #2d3748;
-
 
143
        font-size: 14px;
-
 
144
    }
-
 
145
 
-
 
146
    .legend-percentage {
-
 
147
        font-weight: 700;
-
 
148
        font-size: 14px;
-
 
149
        color: #4a5568;
-
 
150
    }
-
 
151
 
-
 
152
 
57
 
153
    @keyframes shimmer {
58
    @keyframes shimmer {
154
        0% {
59
        0% {
155
            left: -100%;
60
            left: -100%;
156
        }
61
        }
Line 158... Line 63...
158
            left: 100%;
63
            left: 100%;
159
        }
64
        }
160
    }
65
    }
161
 
66
 
162
 
67
 
163
    .brand-card {
-
 
164
        transition: all 0.2s ease;
-
 
165
        border: 1px solid #e9ecef;
-
 
166
    }
-
 
167
 
-
 
168
    .brand-card:hover {
-
 
169
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
-
 
170
        transform: translateY(-1px);
-
 
171
    }
-
 
172
 
68
 
173
    .brand-logo {
69
    .brand-logo {
174
        width: 80px;
70
        width: 80px;
175
        height: 80px;
71
        height: 80px;
176
        object-fit: contain;
72
        object-fit: contain;
177
        border-radius: 12px;
73
        border-radius: 12px;
178
        background-color: #f8f9fa;
74
        background-color: #f8f9fa;
179
        padding: 2px;
75
        padding: 2px;
180
    }
76
    }
181
 
77
 
182
    .brand-name {
-
 
183
        font-size: 13px;
-
 
184
        font-weight: 700;
-
 
185
        color: #212529;
-
 
186
        margin-bottom: 8px;
-
 
187
    }
-
 
188
 
78
 
189
    .status-badge {
-
 
190
        font-size: 12px;
-
 
191
        font-weight: 600;
-
 
192
        padding: 8px 16px;
-
 
193
        border-radius: 25px;
-
 
194
        border: none;
-
 
195
    }
-
 
196
 
-
 
197
    .legend {
-
 
198
        background-color: #f8f9fa;
-
 
199
        border-radius: 8px;
-
 
200
        padding: 12px;
-
 
201
        margin-bottom: 24px;
-
 
202
    }
-
 
203
 
79
 
204
    .modal-backdrop.in {
80
    .modal-backdrop.in {
205
        filter: alpha(opacity=50);
81
        filter: alpha(opacity=50);
206
        opacity: 0.35;
82
        opacity: 0.35;
207
        width: auto;
83
        width: auto;
Line 236... Line 112...
236
    }
112
    }
237
 
113
 
238
    .fs-5 {
114
    .fs-5 {
239
        font-size: 1.2rem !important;
115
        font-size: 1.2rem !important;
240
    }
116
    }
241
 
-
 
242
    .brand-btn {
117
    .brand-btn {
-
 
118
        background: #444;
-
 
119
        color: white;
-
 
120
        border: none;
-
 
121
        padding: 8px 16px;
-
 
122
        border-radius: 20px;
-
 
123
        cursor: pointer;
243
        transition: all 0.3s ease;
124
        transition: all 0.3s ease;
244
        font-weight: normal;
-
 
245
        border-radius: 25px;
-
 
246
        padding: 4px 10px;
-
 
247
        margin: 5px;
125
        margin: 2px;
248
        border: 2px solid #666;
-
 
249
    }
126
    }
250
 
127
 
251
    .brand-logo {
128
    .brand-btn:hover {
-
 
129
        background: #666;
-
 
130
        color: white;
-
 
131
    }
-
 
132
 
-
 
133
 
-
 
134
    .section-header {
-
 
135
        background: #7a7a7a;
-
 
136
        color: white;
252
        height: 40px;
137
        padding: 15px;
-
 
138
        margin: 20px 0 10px 0;
-
 
139
        border-radius: 8px;
253
        object-fit: contain;
140
        text-align: center;
-
 
141
        font-weight: bold;
-
 
142
        font-size: 1.2rem;
254
    }
143
    }
255
 
144
 
-
 
145
    .table thead th {
-
 
146
        background: #555;
-
 
147
        color: white;
-
 
148
        border: none;
-
 
149
        font-weight: bold;
-
 
150
        text-align: center;
-
 
151
        vertical-align: middle;
-
 
152
        padding: 15px 8px;
-
 
153
    }
-
 
154
 
-
 
155
    .table tbody td {
-
 
156
        text-align: center;
-
 
157
        vertical-align: middle;
-
 
158
        padding: 12px 8px;
-
 
159
        border: 1px solid #dee2e6;
-
 
160
    }
-
 
161
 
-
 
162
 
-
 
163
    .status-order {
-
 
164
        color: #17a2b8 !important;
-
 
165
        font-weight: bold;
-
 
166
    }
-
 
167
 
-
 
168
 
-
 
169
    .no-data-row {
-
 
170
        background: #f8f9fa;
-
 
171
        color: #6c757d;
-
 
172
        font-style: italic;
-
 
173
    }
256
 
174
 
257
    .curve {
175
    .curve {
258
        padding-left: 100px !important;
176
        padding-left: 100px !important;
259
        border-radius: 40px 0 0 40px !important;
177
        border-radius: 40px 0 0 40px !important;
260
        width: 250px !important;
178
        width: 250px !important;
Line 296... Line 214...
296
 
214
 
297
    .other-header {
215
    .other-header {
298
        color: #333;
216
        color: #333;
299
    }
217
    }
300
 
218
 
301
    .bg-orange {
-
 
302
        background-color: #FF6700 !important;
-
 
303
        color: white;
-
 
304
    }
-
 
305
 
-
 
306
    .bg-cryan {
-
 
307
        background-color: #004d51 !important;
-
 
308
        color: white;
-
 
309
    }
-
 
310
 
219
 
311
    .bg-dark-light {
220
    .bg-dark-light {
312
        background-color: #3e3e3e !important;
221
        background-color: #3e3e3e !important;
313
        color: white;
222
        color: white;
314
    }
223
    }
Line 327... Line 236...
327
 
236
 
328
    .currency::before {
237
    .currency::before {
329
        content: "\20B9";
238
        content: "\20B9";
330
    }
239
    }
331
 
240
 
332
 
-
 
333
    .table thead th {
-
 
334
        font-weight: 600;
-
 
335
        letter-spacing: 0.5px;
-
 
336
    }
-
 
337
 
-
 
338
    .table tbody td {
-
 
339
        font-weight: normal;
-
 
340
    }
-
 
341
 
-
 
342
    .fs-3, .fs-5 {
241
    .fs-3, .fs-5 {
343
        font-weight: normal;
242
        font-weight: normal;
344
    }
243
    }
345
 
244
 
346
    .fw-bold {
245
    .fw-bold {
Line 360... Line 259...
360
        align-items: center;
259
        align-items: center;
361
        justify-content: center;
260
        justify-content: center;
362
        transition: transform 0.3s ease;
261
        transition: transform 0.3s ease;
363
    }
262
    }
364
 
263
 
365
    .payment-content {
-
 
366
        text-align: center;
-
 
367
        color: white;
-
 
368
        padding: 20px;
-
 
369
    }
-
 
370
 
264
 
371
    .payment-amount {
265
    .payment-amount {
372
        font-size: 18px;
266
        font-size: 18px;
373
        font-weight: 700;
267
        font-weight: 700;
374
        margin-bottom: 10px;
268
        margin-bottom: 10px;
375
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
269
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
-
 
270
        color: white;
376
    }
271
    }
377
 
272
 
378
    .payment-label {
273
    .payment-label {
379
        font-size: 18px;
274
        font-size: 18px;
380
        line-height: 1.3;
275
        line-height: 1.3;
Line 687... Line 582...
687
                </div>
582
                </div>
688
            </div>
583
            </div>
689
 
584
 
690
 
585
 
691
            ##        -----------------------------------------------Fast Selling & HID model ------------------------------------------------
586
            ##        -----------------------------------------------Fast Selling & HID model ------------------------------------------------
-
 
587
            <div id="brand-table-section">
692
            <div class="container-fluid py-3">
588
            <div class="container-fluid py-3">
693
                <div class="card mb-4 p-5 ">
589
                <div class="card mb-4 p-4">
-
 
590
                    <!-- Main Header -->
694
                    <div class="row  justify-content-center ">
591
                    <div class="row justify-content-center">
695
                        <div class="col-10">
592
                        <div class="col-10">
696
                            <div class="bg-dark-light rounded-3 p-3 shadow rounded-corner">
593
                            <div class="bg-dark-light rounded-3 p-3 shadow rounded-corner">
697
                                <h3 class="text-white text-center mb-0  fw-bold py-2 fs-8">Fast Selling Models &
594
                                <h3 class="text-white text-center mb-0  fw-bold py-2 fs-8">Fast Selling Models &
698
                                    HID </h3>
595
                                    HID </h3>
699
                            </div>
596
                            </div>
700
                        </div>
597
                        </div>
701
                    </div>
598
                    </div>
702
 
599
 
703
                    <div class="card-body card shadow-lg rounded-5 p-3">
600
                    <div class="card-body">
704
                        <!-- Dynamic Brand Filters -->
601
                        <!-- Brand Filter Buttons -->
705
                        <div class="d-flex flex-wrap justify-content-center gap-2 p-1 border-bottom fs-5">
602
                        <div class="d-flex flex-wrap justify-content-center gap-2 p-3 border-bottom mb-4">
-
 
603
                            <!-- Velocity Template Loop for Brands -->
706
                            #foreach($brand in $brands)
604
                            #foreach($brand in $brands)
707
                                <button class="brand-btn" data-brand="$brand.toLowerCase()"
605
                                <button class="brand-btn" data-brand="$brand.toLowerCase()">$brand</button>
708
                                >
-
 
709
                                    $brand
-
 
710
                                </button>
-
 
711
                            #end
606
                            #end
712
                        </div>
607
                        </div>
713
 
608
 
-
 
609
                        <!-- HID Section -->
-
 
610
                        <div class="section-header">HID</div>
714
 
611
 
715
                        <div class="card-header text-center fw-bold ">
-
 
716
                            <h4>HID</h4>
-
 
717
                        </div>
-
 
718
 
-
 
719
 
-
 
720
                        <div class="row mx-0 mt-4">
612
                        <div class="table-responsive">
721
                            <div class="col-3 text-center">
613
                            <table class="table ">
722
                                <div class="p-1 py-3 rounded-top" style="background: #555; color: white;">
-
 
723
                                    <strong class="fs-4  fw-bold">Model </strong>
-
 
724
                                </div>
614
                                <thead>
725
                            </div>
615
                                <tr>
726
                            <div class="col-3 text-center">
616
                                    <th class="w-25">Model</th>
727
                                <div class="p-1 py-3 rounded-top" style="background: #d82c2c; color: white;">
-
 
728
                                    <strong class="fs-4  fw-bold">Suggested Qty</strong>
617
                                    <th class=" w-25">Suggested Qty</th>
729
                                </div>
-
 
730
                            </div>
-
 
731
                            <div class="col-3 text-center">
618
                                    <th class="w-25">My Stock + Pending Indent</th>
732
                                <div class="p-1 py-3 rounded-top" style="background: #555; color: white;">
-
 
733
                                    <strong class="fw-bold" style="font-size: 1.3rem !important;">My Stock + Pending
-
 
734
                                        Indent</strong>
619
                                    <th class="w-25">Remarks</th>
735
                                </div>
620
                                </tr>
736
                            </div>
621
                                </thead>
737
                            <div class="col-3 text-center">
-
 
738
                                <div class="p-1 py-3 rounded-top" style="background: #d82c2c; color: white;">
-
 
739
                                    <strong class="fs-4 fw-bold">Remarks</strong>
-
 
740
                                </div>
622
                                <tbody>
741
                            </div>
-
 
742
                        </div>
-
 
743
 
-
 
744
                        <!-- Data Rows -->
623
                                <!-- Velocity Template Loop for HID Data -->
745
                        #foreach($brand in $brands)
624
                                    #foreach($brand in $brands)
746
                            #if($hidAllocationModelBrandMap.containsKey($brand) && !$hidAllocationModelBrandMap.get($brand).isEmpty())
625
                                        #if($hidAllocationModelBrandMap.containsKey($brand) && !$hidAllocationModelBrandMap.get($brand).isEmpty())
747
                                #foreach($model in $hidAllocationModelBrandMap.get($brand))
626
                                            #foreach($model in $hidAllocationModelBrandMap.get($brand))
748
                                    <div class="brand-data" data-brand="$brand.toLowerCase()">
627
                                            <tr class="brand-data" data-brand="$brand.toLowerCase()">
749
                                        <div class="row mx-0">
-
 
750
                                            <div class="col-3 text-center">
-
 
751
                                                <div class="p-4 border border-light fs-5 trim"
-
 
752
                                                     style="background: #444; color: white;">
-
 
753
                                                    $model.getModelNumber()
628
                                                <td><strong>$model.getModelNumber()</strong></td>
754
                                                </div>
-
 
755
                                            </div>
-
 
756
                                            <div class="col-3 text-center">
-
 
757
                                                <div class="p-4 border border-light fs-5"
-
 
758
                                                     style="background: #b30606; color: white;">
-
 
759
                                                    $model.getHidAllocation()
629
                                                <td class="w-25"><strong>$model.getHidAllocation()</strong></td>
760
                                                </div>
-
 
761
                                            </div>
-
 
762
                                            <div class="col-3 text-center">
-
 
763
                                                <div class="p-4 border border-light fs-5"
-
 
764
                                                     style="background: #444; color: white;">
-
 
765
                                                    <strong>$model.getAvailableStock()</strong>
630
                                                <td><strong>$model.getAvailableStock()</strong></td>
766
                                                </div>
631
                                                <td class="w-25">
767
                                            </div>
-
 
768
                                            <div class="col-3 text-center">
-
 
769
 
-
 
770
                                                <div class="p-4 border border-light fs-5"
-
 
771
                                                     style="background: #b30606; color: white;">
-
 
772
                                                    <strong>#if($model.getAvailableStock() == 0)
632
                                                    #if($model.getAvailableStock() == 0)
773
                                                        <span class="fw-bold  p-4 w-full text-warning">Urgently Required</span>
633
                                                        <span class="text-danger fw-bold">Urgently Required</span>
774
                                                    #elseif($model.getAvailableStock() < $model.getHidAllocation())
634
                                                    #elseif($model.getAvailableStock() < $model.getHidAllocation())
775
                                                        <span class="fw-bold  p-4 text-info ">Need to Order</span>
635
                                                        <span class="status-order">Need to Order</span>
776
                                                    #else
636
                                                    #else
777
                                                        <span class=" fw-bold  p-4 text-success"
637
                                                        <span class="status-ok fw-bold">Stock OK</span>
778
                                                              style="color: rgb(61 251 163) !important;">Stock OK</span>
-
 
779
                                                    #end</strong>
638
                                                    #end
780
                                                </div>
639
                                                </td>
781
                                            </div>
640
                                            </tr>
782
                                        </div>
641
                                            #end
783
                                    </div>
642
                                        #else
784
                                #end
-
 
785
                            #else
-
 
786
                                <div class="brand-data" data-brand="$brand.toLowerCase()">
643
                                        <tr class="brand-data no-data-row" data-brand="$brand.toLowerCase()">
787
                                    <div class="row mx-0">
-
 
788
                                        <div class="col-12 text-center p-4 fs-5" style="background: #f8f9fa;">
-
 
789
                                            No Data Available
644
                                            <td colspan="4">No Data Available</td>
790
                                        </div>
645
                                        </tr>
791
                                    </div>
646
                                        #end
792
                                </div>
647
                                    #end
793
                            #end
648
                                </tbody>
794
                        #end
649
                            </table>
795
 
-
 
796
 
-
 
797
                        ##                    -----------------------------------Fast Selling Modal-------------------------------
-
 
798
                        <div class="card-header text-center fw-bold ">
-
 
799
                            <h4> Fast Selling Model</h4>
-
 
800
                        </div>
650
                        </div>
801
 
651
 
802
                        #if($brandwiseFastmoving && $brandwiseFastmoving.entrySet().size() > 0)
-
 
803
                            #foreach($brandEntry in $brandwiseFastmoving.entrySet())
-
 
804
                                #foreach($model in $brandEntry.value)
-
 
805
                                    <div class="brand-data col-12" data-brand="$brandEntry.key.toLowerCase()">
-
 
806
                                        <div class="row mx-0  ">
-
 
807
                                            <div class="col-3   text-center   ">
-
 
808
                                                <div class="p-4 border border-light fs-5 text-truncate"
-
 
809
                                                     style="background: #444; color: white;">
-
 
810
                                                    <strong>$model.modelNumber</strong>
-
 
811
                                                </div>
652
                        <!-- Fast Selling Models Section -->
812
                                            </div>
-
 
813
 
-
 
814
                                            <div class="col-3   text-center  ">
653
                        <div class="section-header">Fast Selling Model</div>
815
                                                <div class="p-4 border border-light fs-5"
-
 
816
                                                     style="background: #b30606; color: white;">
-
 
817
                                                    <strong>   #set($suggestedQty =  2)
-
 
818
 
654
 
-
 
655
                        <div class="table-responsive">
-
 
656
                            <table class="table  ">
-
 
657
                                <tbody>
-
 
658
                                <!-- Velocity Template Loop for Fast Selling Data -->
-
 
659
                                    #if($brandwiseFastmoving && $brandwiseFastmoving.entrySet().size() > 0)
-
 
660
                                        #foreach($brandEntry in $brandwiseFastmoving.entrySet())
-
 
661
                                            #foreach($model in $brandEntry.value)
-
 
662
                                                #set($processingQty = $processingOrderCatalogQtyMap.get($model.getCatalogId()))
819
                                            $suggestedQty
663
                                                #if(!$processingQty)
820
                                                    </strong>
664
                                                    #set($processingQty = 0)
821
                                                </div>
665
                                                #end
-
 
666
                                                #set($totalQty = $model.partnerCurrentQty + $processingQty)
822
                                            </div>
667
                                                #set($suggestedQty = 2)
823
 
668
 
824
                                            <div class="col-3   text-center   ">
669
                                            <tr class="brand-data" data-brand="$brandEntry.key.toLowerCase()">
-
 
670
                                                <td class="w-25"><strong>$model.modelNumber</strong></td>
-
 
671
                                                <td class="suggested-qty-col w-25"><strong>$suggestedQty</strong></td>
825
                                                <div class="p-4 border border-light fs-5 "
672
                                                <td class="w-25">
826
                                                     style="background: #444; color: white;">
673
                                                    <strong>
827
                                                    <strong> $model.partnerCurrentQty
674
                                                        $model.partnerCurrentQty
828
                                                        #if($processingOrderCatalogQtyMap.get($model.getCatalogId()))
675
                                                        #if($processingOrderCatalogQtyMap.get($model.getCatalogId()))
829
                                                            +  $processingOrderCatalogQtyMap.get($model.getCatalogId())
676
                                                            + $processingOrderCatalogQtyMap.get($model.getCatalogId())
830
                                                        #end
677
                                                        #end
831
                                                    </strong>
678
                                                    </strong>
832
                                                </div>
679
                                                </td>
833
                                            </div>
-
 
834
                                            #set($processingQty = $processingOrderCatalogQtyMap.get($model.getCatalogId()))
-
 
835
                                            #if(!$processingQty)
-
 
836
                                                #set($processingQty = 0)
-
 
837
                                            #end
-
 
838
                                            #set($totalQty = $model.partnerCurrentQty + $processingQty)
-
 
839
 
-
 
840
                                            <div class="col-3   text-center   ">
-
 
841
                                                <div class="p-4 border border-light fs-5"
680
                                                <td class="remarks-col w-25">
842
                                                     style="background: #b30606; color: white;">
-
 
843
                                                    <strong>#if($totalQty == 0)
681
                                                    #if($totalQty == 0)
844
                                                        <span class="fw-bold  p-4 w-full text-warning">Urgently Required</span>
682
                                                        <span class="text-danger fw-bold">Urgently Required</span>
845
                                                    #elseif($totalQty < 2)
683
                                                    #elseif($totalQty < 2)
846
                                                        <span class="fw-bold  p-4 text-info ">Need to Order</span>
684
                                                        <span class="status-order">Need to Order</span>
847
                                                    #else
685
                                                    #else
848
                                                        <span class=" fw-bold  p-4 text-success"
686
                                                        <span class="status-ok fw-bold">Stock OK</span>
849
                                                              style="color: rgb(61 251 163) !important;">Stock OK</span>
-
 
850
                                                    #end</strong>
687
                                                    #end
851
                                                </div>
688
                                                </td>
852
                                            </div>
689
                                            </tr>
853
                                        </div>
690
                                            #end
854
                                    </div>
691
                                        #end
855
                                #end
692
                                    #else
856
                            #end
-
 
857
                        #else
-
 
858
                            <div class="brand-data">
693
                                    <tr class="brand-data no-data-row">
859
                                <div class="row mx-0">
694
                                        <td colspan="4">No Data Available</td>
860
                                    <div class="col-12 text-center p-4 fs-5" style="background: #f8f9fa;">
-
 
861
                                        No Data Available
695
                                    </tr>
862
                                    </div>
696
                                    #end
863
                                </div>
697
                                </tbody>
864
                            </div>
698
                            </table>
865
                        #end
699
                        </div>
866
 
-
 
867
                    </div>
700
                    </div>
868
 
-
 
869
 
-
 
870
                </div>
701
                </div>
871
            </div>
702
            </div>
-
 
703
            </div>
872
            ##        -----------------------------------------------My Stock ------------------------------------------------
704
            ##        -----------------------------------------------My Stock ------------------------------------------------
873
            <div class="row mb-1 my-4 justify-content-center">
705
            <div class="row mb-1 my-4 justify-content-center">
874
                <div class="col-10">
706
                <div class="col-10">
875
                    <div class=" bg-dark-light rounded-3 p-3 shadow rounded-corner">
707
                    <div class=" bg-dark-light rounded-3 p-3 shadow rounded-corner">
876
                        <h1 class="text-center mb-0 fw-bold py-2 text-white fs-8">My Stock</h1>
708
                        <h1 class="text-center mb-0 fw-bold py-2 text-white fs-8">My Stock</h1>
Line 986... Line 818...
986
                    </div>
818
                    </div>
987
 
819
 
988
                    <div class="table-responsive rounded-5 p-5">
820
                    <div class="table-responsive rounded-5 p-5">
989
                        <table class="table table-bordered rounded-4" id="stockAgingTable">
821
                        <table class="table table-bordered rounded-4" id="stockAgingTable">
990
                            <thead>
822
                            <thead>
991
                            <tr class="text-center">
823
                            <tr class="text-center ">
992
                                <th></th>
824
                                <th></th>
993
                                <th class="align-middle bg-danger text-white fs-5 fw-bold" style="width: 180px;">
825
                                <th class="align-middle text-white fs-5 fw-bold" style="width: 180px;">
994
                                    Brands
826
                                    Brands
995
                                </th>
827
                                </th>
996
                                #set($intervals = ["Less Than 15 Days", "16 - 30 Days", "31 - 45 Days",
828
                                #set($intervals = ["Less Than 15 Days", "16 - 30 Days", "31 - 45 Days",
997
                                    "More Than 45 Days"])
829
                                    "More Than 45 Days"])
998
                                #set($bgColors = ["bg-success", "bg-cryan", "bg-orange", "bg-danger"])
-
 
999
                                #set($textColors = ["text-white", "text-white", "text-white", "text-white"])
-
 
1000
 
-
 
1001
                                #foreach($interval in $intervals)
830
                                #foreach($interval in $intervals)
1002
                                    <th class="align-middle fs-5 fw-bold $bgColors.get($foreach.index) text-wrap"
831
                                    <th class="align-middle fs-5 fw-bold  text-wrap"
1003
                                        style="width: 180px;height: 55px !important; word-wrap: break-word; white-space: normal;">
832
                                        style="width: 180px;height: 55px !important; word-wrap: break-word; white-space: normal;">
1004
                                        <span class="$textColors.get($foreach.index) text-wrap ">$interval</span>
833
                                        <span class="text-white  text-wrap ">$interval</span>
1005
                                    </th>
834
                                    </th>
1006
                                #end
835
                                #end
1007
                            </tr>
836
                            </tr>
1008
                            </thead>
837
                            </thead>
1009
                            <tbody>
838
                            <tbody>
Line 1023... Line 852...
1023
                                        #foreach($entry in $inventoryGroupedByBrand.entrySet())
852
                                        #foreach($entry in $inventoryGroupedByBrand.entrySet())
1024
                                            #if($entry.getKey().toLowerCase() == $brandKey)
853
                                            #if($entry.getKey().toLowerCase() == $brandKey)
1025
                                                #set($found = true)
854
                                                #set($found = true)
1026
                                            <tr>
855
                                            <tr>
1027
                                                <td class="brand-cell text-start p-0">
856
                                                <td class="brand-cell text-start p-0">
1028
                                                    <div class="p-3 bg-danger  #getBrandBgColor($entry.getKey())"
857
                                                    <div class="p-3 bg-white  #getBrandBgColor($entry.getKey())"
1029
                                                         style="height: 40px; display: flex; align-items: center; justify-content: start;">
858
                                                         style="height: 40px; display: flex; align-items: center; justify-content: start;">
1030
                                                    <span class="text-white fw-bold fs-5"><img
859
                                                    <span class="text-black fw-bold fs-5"><img
1031
                                                            src="$brandLogos.getOrDefault($entry.getKey(),
860
                                                            src="$brandLogos.getOrDefault($entry.getKey(),
1032
                                                                'https://static.vecteezy.com/system/resources/thumbnails/025/213/042/small_2x/mobile-phone-icon-in-black-circle-png.png')"
861
                                                                'https://static.vecteezy.com/system/resources/thumbnails/025/213/042/small_2x/mobile-phone-icon-in-black-circle-png.png')"
1033
                                                            alt="$entry.getKey() logo"
862
                                                            alt="$entry.getKey() logo"
1034
                                                            class="brand-logo rounded-circle me-3"
863
                                                            class="brand-logo rounded-circle me-3"
1035
                                                            style="width:35px;height:35px">$entry.getKey()</span>
864
                                                            style="width:35px;height:35px">$entry.getKey()</span>
Line 1045... Line 874...
1045
                                                                #set($qty = $math.add($qty, $item.getValues().get($i).getQuantity()))
874
                                                                #set($qty = $math.add($qty, $item.getValues().get($i).getQuantity()))
1046
                                                                #set($itemValue = $math.mul($item.getValues().get($i).getPrice(), $item.getValues().get($i).getQuantity()))
875
                                                                #set($itemValue = $math.mul($item.getValues().get($i).getPrice(), $item.getValues().get($i).getQuantity()))
1047
                                                                #set($value = $math.add($value, $itemValue))
876
                                                                #set($value = $math.add($value, $itemValue))
1048
                                                            #end
877
                                                            #end
1049
                                                        #end
878
                                                        #end
1050
                                                        <div class="volume-view fs-5 fw-bold text-white ">$qty</div>
879
                                                        <div class="volume-view fs-5 fw-bold text-black ">$qty</div>
1051
                                                        <div class="value-view currency fs-5 fw-bold text-white"
880
                                                        <div class="value-view currency fs-5 fw-bold text-black"
1052
                                                             style="display: none;"> $nf.format(  $value)</div>
881
                                                             style="display: none;"> $nf.format(  $value)</div>
1053
                                                    </td>
882
                                                    </td>
1054
                                                #end
883
                                                #end
1055
                                            </tr>
884
                                            </tr>
1056
                                            #end
885
                                            #end
1057
                                        #end
886
                                        #end
1058
 
887
 
1059
                                        #if(!$found)
888
                                        #if(!$found)
1060
                                        <tr>
889
                                        <tr>
1061
                                            <td class="brand-cell text-center p-0">
890
                                            <td class="brand-cell text-center p-0">
1062
                                                <div class="p-3 #getBrandBgColor($brandKey)"
891
                                                <div class="p-3 bg-white"
1063
                                                     style="height: 40px; display: flex; align-items: center; justify-content: center;">
892
                                                     style="height: 40px; display: flex; align-items: center; justify-content: center;">
1064
                                                    <span class="text-white fw-bold">$brandKey</span>
893
                                                    <span class="text-black fw-bold">$brandKey</span>
1065
                                                </div>
894
                                                </div>
1066
                                            </td>
895
                                            </td>
1067
                                            #foreach($i in [0..3])
896
                                            #foreach($i in [0..3])
1068
                                                <td class="text-center align-middle $bgColors.get($i)"
897
                                                <td class="text-center align-middle $bgColors.get($i)"
1069
                                                    style="opacity: 0.9;">
898
                                                    style="opacity: 0.9;">
1070
                                                    <div class="volume-view fs-5 fw-bold text-white">0</div>
899
                                                    <div class="volume-view fs-5 fw-bold text-black">0</div>
1071
                                                    <div class="value-view currency fs-5 fw-bold text-white"
900
                                                    <div class="value-view currency fs-5 fw-bold text-black"
1072
                                                         style="display: none;">0.00
901
                                                         style="display: none;">0.00
1073
                                                    </div>
902
                                                    </div>
1074
                                                </td>
903
                                                </td>
1075
                                            #end
904
                                            #end
1076
                                        </tr>
905
                                        </tr>
Line 1095... Line 924...
1095
                                        #end
924
                                        #end
1096
 
925
 
1097
                                        #if($isOtherBrand)
926
                                        #if($isOtherBrand)
1098
                                        <tr>
927
                                        <tr>
1099
                                            <td class="brand-cell text-start p-0">
928
                                            <td class="brand-cell text-start p-0">
1100
                                                <div class="p-3 bg-secondary #getBrandBgColor($entry.getKey())"
929
                                                <div class="p-3 text-black"
1101
                                                     style="height: 40px; display: flex; align-items: center; justify-content: start;">
930
                                                     style="height: 40px; display: flex; align-items: center; justify-content: start;">
1102
                                                <span class="text-white fw-bold fs-5  "><img
931
                                                <span class="text-black fw-bold fs-5  "><img
1103
                                                        src="$brandLogos.getOrDefault($entry.getKey(),
932
                                                        src="$brandLogos.getOrDefault($entry.getKey(),
1104
                                                            'https://static.vecteezy.com/system/resources/thumbnails/025/213/042/small_2x/mobile-phone-icon-in-black-circle-png.png')"
933
                                                            'https://static.vecteezy.com/system/resources/thumbnails/025/213/042/small_2x/mobile-phone-icon-in-black-circle-png.png')"
1105
                                                        alt="$entry.getKey() logo"
934
                                                        alt="$entry.getKey() logo"
1106
                                                        class="brand-logo rounded-circle me-3"
935
                                                        class="brand-logo rounded-circle me-3"
1107
                                                        style="width:35px;height:35px">$entry.getKey()</span>
936
                                                        style="width:35px;height:35px">$entry.getKey()</span>
Line 1117... Line 946...
1117
                                                            #set($qty = $math.add($qty, $item.getValues().get($i).getQuantity()))
946
                                                            #set($qty = $math.add($qty, $item.getValues().get($i).getQuantity()))
1118
                                                            #set($itemValue = $math.mul($item.getValues().get($i).getPrice(), $item.getValues().get($i).getQuantity()))
947
                                                            #set($itemValue = $math.mul($item.getValues().get($i).getPrice(), $item.getValues().get($i).getQuantity()))
1119
                                                            #set($value = $math.add($value, $itemValue))
948
                                                            #set($value = $math.add($value, $itemValue))
1120
                                                        #end
949
                                                        #end
1121
                                                    #end
950
                                                    #end
1122
                                                    <div class="volume-view fs-5 fw-bold text-white">$qty</div>
951
                                                    <div class="volume-view fs-5 fw-bold text-black">$qty</div>
1123
                                                    <div class="value-view currency fs-5 fw-bold text-white"
952
                                                    <div class="value-view currency fs-5 fw-bold text-black"
1124
                                                         style="display: none;"> $nf.format($value)</div>
953
                                                         style="display: none;"> $nf.format($value)</div>
1125
                                                </td>
954
                                                </td>
1126
                                            #end
955
                                            #end
1127
                                        </tr>
956
                                        </tr>
1128
                                        #end
957
                                        #end
Line 1144... Line 973...
1144
    </section>
973
    </section>
1145
</div>
974
</div>
1146
</body>
975
</body>
1147
<script>
976
<script>
1148
    var chart;
977
    var chart;
1149
    const brandColors = {
978
    var brandColors = {
1150
        'vivo': '#2196F3',
979
        'vivo': '#2196F3',
1151
        'oppo': '#006b35',
980
        'oppo': '#006b35',
1152
        'samsung': '#1428A0',
981
        'samsung': '#1428A0',
1153
        'realme': '#FFC107',
982
        'realme': '#FFC107',
1154
        'xiaomi': '#FF5722',
983
        'xiaomi': '#FF5722',
Line 1204... Line 1033...
1204
            $(".value-view").show();
1033
            $(".value-view").show();
1205
        });
1034
        });
1206
    });
1035
    });
1207
    document.querySelectorAll('.brand-btn').forEach(button => {
1036
    document.querySelectorAll('.brand-btn').forEach(button => {
1208
        button.addEventListener('click', function () {
1037
        button.addEventListener('click', function () {
1209
            const selectedBrand = this.getAttribute('data-brand');
1038
            const brand = this.getAttribute('data-brand');
-
 
1039
 
-
 
1040
            document.querySelectorAll('.brand-btn').forEach(btn => {
-
 
1041
                btn.style.backgroundColor = '';
-
 
1042
                btn.style.color = '';
-
 
1043
            });
-
 
1044
            this.style.backgroundColor = '#006b35';
-
 
1045
            this.style.color = 'white';
-
 
1046
 
1210
            document.querySelectorAll('.brand-data').forEach(row => {
1047
            document.querySelectorAll('.brand-data').forEach(item => {
1211
                row.style.display = (row.getAttribute('data-brand') === selectedBrand || selectedBrand === 'all') ? 'block' : 'none';
1048
                item.style.display = item.getAttribute('data-brand') === brand ? 'table-row' : 'none';
1212
            });
1049
            });
1213
        });
1050
        });
1214
    });
1051
    });
-
 
1052
    document.querySelector('.brand-btn')?.click();
1215
 
1053
 
1216
    function initializeBrandButtons() {
1054
    function initializeBrandButtons() {
1217
        const brandButtons = document.querySelectorAll('.brand-btn');
1055
        const brandButtons = document.querySelectorAll('.brand-btn');
1218
 
1056
 
1219
        brandButtons.forEach(button => {
1057
        brandButtons.forEach(button => {
Line 1228... Line 1066...
1228
        brandButtons.forEach(button => {
1066
        brandButtons.forEach(button => {
1229
            button.addEventListener('click', function () {
1067
            button.addEventListener('click', function () {
1230
                const selectedBrand = this.dataset.brand;
1068
                const selectedBrand = this.dataset.brand;
1231
 
1069
 
1232
                brandButtons.forEach(btn => {
1070
                brandButtons.forEach(btn => {
1233
                    const brandColor = brandColors[btn.dataset.brand] || '#666';
-
 
1234
                    btn.style.backgroundColor = '#fff';
1071
                    btn.style.backgroundColor = '#fff';
1235
                    btn.style.color = brandColor;
1072
                    btn.style.color = '#666';
1236
                });
1073
                });
1237
 
1074
 
1238
                this.style.backgroundColor = brandColors[selectedBrand] || '#666';
1075
                this.style.backgroundColor = brandColors[selectedBrand] || '#666';
1239
                this.style.color = '#fff';
1076
                this.style.color = '#fff';
1240
 
1077
 
1241
                document.querySelectorAll('.brand-data').forEach(row => {
1078
                document.querySelectorAll('.brand-data').forEach(row => {
1242
                    row.style.display = row.dataset.brand === selectedBrand ? 'block' : 'none';
1079
                    row.style.display = row.dataset.brand === selectedBrand ? 'inline-masonry' : 'none';
1243
                });
1080
                });
1244
            });
1081
            });
1245
        });
1082
        });
1246
        brandButtons[0]?.click();
1083
        brandButtons[0]?.click();
1247
    }
1084
    }
Line 1260... Line 1097...
1260
            });
1097
            });
1261
            this.style.backgroundColor = '#006b35';
1098
            this.style.backgroundColor = '#006b35';
1262
            this.style.color = 'white';
1099
            this.style.color = 'white';
1263
 
1100
 
1264
            document.querySelectorAll('.brand-data').forEach(item => {
1101
            document.querySelectorAll('.brand-data').forEach(item => {
1265
                item.style.display = item.getAttribute('data-brand') === brand ? 'block' : 'none';
1102
                item.style.display = item.getAttribute('data-brand') === brand ? 'inline-masonry' : 'none';
1266
            });
1103
            });
1267
        });
1104
        });
1268
    });
1105
    });
1269
    document.querySelector('.brand-btn')?.click();
1106
    document.querySelector('.brand-btn')?.click();
1270
</script>
1107
</script>