Subversion Repositories SmartDukaan

Rev

Rev 32348 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
37823 amit 1
<section class="wrapper seller-setup">
2
    <div class="row">
3
        <div class="col-lg-12">
4
            <h3 class="page-header"><i class="icon_document_alt"></i>Sellers &amp; Warehouses</h3>
5
            <ol class="breadcrumb">
6
                <li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
7
                <li><i class="icon_document_alt"></i> Sellers &amp; Warehouses</li>
8
            </ol>
9
        </div>
10
    </div>
28300 tejbeer 11
 
37823 amit 12
    ## Sellers: one row per GST registration
13
    <div class="panel panel-default">
14
        <div class="panel-heading clearfix">
15
            <strong>Sellers</strong>
16
            <button type="button" class="btn btn-primary btn-sm pull-right" data-toggle="modal"
17
                    data-target="#new-seller-modal">New Seller
18
            </button>
19
        </div>
20
        <table class="table table-striped table-condensed">
21
            <thead>
22
            <tr>
23
                <th>Label</th>
24
                <th>GSTIN</th>
25
                <th>State</th>
26
                <th>Warehouses</th>
27
                <th></th>
28
            </tr>
29
            </thead>
30
            <tbody>
31
                #foreach($seller in $sellers)
32
                <tr>
33
                    <td>$seller.getLabel()</td>
34
                    <td>#if($seller.getGstin())$seller.getGstin()#end</td>
35
                    <td>#if($stateNames.get($seller.getStateId()))$stateNames.get($seller.getStateId())#end</td>
36
                    <td>#if($warehouseCounts.get($seller.getId()))$warehouseCounts.get($seller.getId())#else 0#end</td>
37
                    <td class="text-right">
38
                        <button type="button" class="btn btn-default btn-xs seller-open"
39
                                data-seller-id="$seller.getId()">Warehouses
40
                        </button>
41
                    </td>
42
                </tr>
43
                #end
44
            </tbody>
45
        </table>
46
    </div>
47
 
48
    <div class="warehouse-container"></div>
49
 
50
    ## Address masters: what a warehouse prints as the seller address
51
    <div class="panel panel-default">
52
        <div class="panel-heading clearfix">
53
            <strong>Addresses</strong>
54
            <small class="text-muted">&nbsp;Only active addresses can be assigned to a warehouse</small>
55
            <button type="button" class="btn btn-primary btn-sm pull-right" data-toggle="modal"
56
                    data-target="#new-address-modal">New Address
57
            </button>
58
        </div>
59
        <table class="table table-striped table-condensed">
60
            <thead>
61
            <tr>
62
                <th>#</th>
63
                <th>Address</th>
64
                <th>City</th>
65
                <th>Pin</th>
66
                <th>State</th>
67
                <th>Contact</th>
68
                <th>Used by</th>
69
                <th>Status</th>
70
            </tr>
71
            </thead>
72
            <tbody>
73
                #foreach($address in $addresses)
74
                <tr #if(!$address.isActive()) class="text-muted" #end>
75
                    <td>$address.getId()</td>
76
                    <td>$address.getAddress()</td>
77
                    <td>#if($address.getCity())$address.getCity()#end</td>
78
                    <td>$address.getPin()</td>
79
                    <td>#if($address.getStateName())$address.getStateName()#end</td>
80
                    <td>#if($address.getContactPerson())$address.getContactPerson()#end
81
                        #if($address.getContactNumber())<br><small>$address.getContactNumber()</small>#end</td>
82
                    <td>#foreach($warehouseId in $address.getUsedByWarehouseIds())$warehouseId#if($foreach.hasNext), #end#end</td>
83
                    <td>
84
                        <button type="button"
85
                                class="btn btn-xs address-active-toggle #if($address.isActive()) btn-success #else btn-default #end"
86
                                data-address-id="$address.getId()" data-active="$address.isActive()">
87
                            #if($address.isActive())Active#else Inactive#end
88
                        </button>
89
                    </td>
90
                </tr>
91
                #end
92
            </tbody>
93
        </table>
94
    </div>
95
 
96
    ## New seller
97
    <div id="new-seller-modal" class="modal fade" role="dialog">
98
        <div class="modal-dialog">
99
            <div class="modal-content">
100
                <div class="modal-header">
101
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
102
                    <h4 class="modal-title">New Seller</h4>
28300 tejbeer 103
                </div>
37823 amit 104
                <div class="modal-body">
105
                    <form id="new-seller-form" autocomplete="off">
106
                        <div class="form-group">
107
                            <label for="new-seller-label">Label</label>
108
                            <input type="text" class="form-control" id="new-seller-label" maxlength="31"
109
                                   placeholder="e.g. NSSPL-HR-GGN">
110
                        </div>
111
                        <div class="form-group">
112
                            <label for="new-seller-gstin">GSTIN</label>
113
                            <input type="text" class="form-control text-uppercase" id="new-seller-gstin" maxlength="15"
114
                                   placeholder="15 characters">
115
                            <p class="help-block" id="new-seller-gstin-hint">State and PAN are read from the GSTIN.</p>
116
                        </div>
117
                        <div class="form-group">
118
                            <label for="new-seller-address">Registered address</label>
119
                            <input type="text" class="form-control" id="new-seller-address" maxlength="255">
120
                        </div>
121
                    </form>
122
                </div>
123
                <div class="modal-footer">
124
                    <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
125
                    <button type="button" class="btn btn-primary" id="new-seller-submit">Create seller</button>
126
                </div>
28300 tejbeer 127
            </div>
128
        </div>
129
    </div>
37823 amit 130
 
131
    ## New address
132
    <div id="new-address-modal" class="modal fade" role="dialog">
133
        <div class="modal-dialog">
134
            <div class="modal-content">
135
                <div class="modal-header">
136
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
137
                    <h4 class="modal-title">New Address</h4>
28300 tejbeer 138
                </div>
37823 amit 139
                <div class="modal-body">
140
                    <form id="new-address-form" autocomplete="off">
141
                        <div class="form-group">
142
                            <label for="new-address-address">Address</label>
143
                            <input type="text" class="form-control address-preview-source" id="new-address-address"
144
                                   maxlength="230" placeholder="Building, plot, street, area">
145
                        </div>
146
                        <div class="row">
147
                            <div class="form-group col-sm-6">
148
                                <label for="new-address-city">City</label>
149
                                <input type="text" class="form-control address-preview-source" id="new-address-city"
150
                                       maxlength="50" placeholder="Printed as the city on invoices">
151
                            </div>
152
                            <div class="form-group col-sm-6">
153
                                <label for="new-address-pin">Pin</label>
154
                                <input type="text" class="form-control address-preview-source" id="new-address-pin"
155
                                       maxlength="6" inputmode="numeric" placeholder="6 digits">
156
                            </div>
157
                        </div>
158
                        <div class="row">
159
                            <div class="form-group col-sm-6">
160
                                <label for="new-address-state">State</label>
161
                                <select class="form-control address-preview-source" id="new-address-state">
162
                                    <option value="" selected disabled>Select state</option>
163
                                    #foreach($state in $states)
164
                                        <option value="$state.getId()">$state.getName()</option>
165
                                    #end
166
                                </select>
167
                            </div>
168
                        </div>
169
                        <div class="row">
170
                            <div class="form-group col-sm-6">
171
                                <label for="new-address-contact-person">Contact person</label>
172
                                <input type="text" class="form-control" id="new-address-contact-person" maxlength="127">
173
                            </div>
174
                            <div class="form-group col-sm-6">
175
                                <label for="new-address-contact-number">Contact number</label>
176
                                <input type="text" class="form-control" id="new-address-contact-number" maxlength="15"
177
                                       inputmode="numeric" placeholder="10 to 15 digits, one number">
178
                            </div>
179
                        </div>
180
                        <div class="well well-sm">
181
                            <small class="text-muted">Invoice will print</small>
182
                            <div id="new-address-preview" class="text-muted">-</div>
183
                        </div>
184
                    </form>
185
                </div>
186
                <div class="modal-footer">
187
                    <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
188
                    <button type="button" class="btn btn-primary" id="new-address-submit">Create address</button>
189
                </div>
28300 tejbeer 190
            </div>
191
        </div>
37823 amit 192
    </div>
28300 tejbeer 193
</section>