Subversion Repositories SmartDukaan

Rev

Rev 37823 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
37846 amit 1
## Physical warehouses of one seller: status and label (sellerwarehouse), and whether the pieces billing and movements
2
## need are in place.
37823 amit 3
<div class="panel panel-info seller-warehouses" data-seller-id="$seller.getId()">
4
    <div class="panel-heading clearfix">
5
        <strong>$seller.getLabel()</strong>
6
        &nbsp;#if($seller.getGstin())$seller.getGstin()#end
7
        &nbsp;#if($stateNames.get($seller.getStateId()))<span class="text-muted">$stateNames.get($seller.getStateId())</span>#end
8
        <button type="button" class="btn btn-primary btn-sm pull-right" data-toggle="modal"
9
                data-target="#new-warehouse-modal">New Warehouse
10
        </button>
11
    </div>
12
    <table class="table table-striped table-condensed">
13
        <thead>
14
        <tr>
15
            <th>Id</th>
37846 amit 16
            <th>Label</th>
37823 amit 17
            <th>Branch code</th>
18
            <th>Address</th>
19
            <th>Internal store</th>
20
            <th>Internal supplier</th>
21
            <th title="Dummy/GOOD warehouse for phantom allocation">Dummy</th>
22
            <th title="Last invoice / challan / credit note / debit note number">Inv / DC / CN / DN</th>
37846 amit 23
            <th style="width: 140px;">Status</th>
37823 amit 24
            <th></th>
25
        </tr>
26
        </thead>
27
        <tbody>
28
            #foreach($warehouse in $warehouses)
37846 amit 29
            <tr #if($warehouse.getStatus().name() == "INACTIVE") class="text-muted" #end>
37823 amit 30
                <td>$warehouse.getWarehouseId()</td>
37846 amit 31
                <td>
32
                    <strong>#if($warehouse.getDisplayName())$warehouse.getDisplayName()#end</strong>
33
                    <button type="button" class="btn btn-link btn-xs warehouse-rename" title="Rename"
34
                            data-warehouse-id="$warehouse.getWarehouseId()"
35
                            data-display-name="#if($warehouse.getDisplayName())$warehouse.getDisplayName()#end">
36
                        <i class="fa fa-pencil"></i></button>
37
                    #if($warehouse.getName())<br><small class="text-muted">$warehouse.getName()</small>#end
38
                </td>
37823 amit 39
                <td>$warehouse.getPrefix()</td>
40
                <td>
41
                    #if($warehouse.getAddress())
42
                        #$warehouse.getAddress().getId() · #if($warehouse.getAddress().getCity())$warehouse.getAddress().getCity()#end
43
                        · $warehouse.getAddress().getPin()
44
                        #if(!$warehouse.getAddress().isActive())<span class="label label-default">inactive address</span>#end
45
                    #else
46
                        <span class="label label-danger">no address</span>
47
                    #end
48
                </td>
49
                <td>#if($warehouse.getInternalStores().isEmpty())<span class="label label-warning">none</span>#{else}#foreach($store in $warehouse.getInternalStores())$store#if($foreach.hasNext), #end#end#end</td>
50
                <td>#if($warehouse.getInternalSuppliers().isEmpty())<span class="label label-default">none</span>#{else}#foreach($supplier in $warehouse.getInternalSuppliers())$supplier#if($foreach.hasNext)<br>#end#end#end</td>
51
                <td>#if($warehouse.isHasDummy())<span class="text-success">&#10003;</span>#{else}<span class="label label-warning">missing</span>#end</td>
52
                <td>$warehouse.getInvoiceSequence() / $warehouse.getChallanSequence() / $warehouse.getCreditNoteSequence() / $warehouse.getDebitNoteSequence()</td>
53
                <td>
37846 amit 54
                    <select class="form-control input-sm warehouse-status" data-warehouse-id="$warehouse.getWarehouseId()"
55
                            data-current="$warehouse.getStatus()">
56
                        #foreach($status in $statuses)
57
                            <option value="$status" #if($status == $warehouse.getStatus()) selected #end>$status</option>
58
                        #end
59
                    </select>
37823 amit 60
                </td>
61
                <td>
62
                    <button type="button" class="btn btn-default btn-xs warehouse-remap-open"
63
                            data-warehouse-id="$warehouse.getWarehouseId()"
64
                            data-address-id="#if($warehouse.getAddress())$warehouse.getAddress().getId()#end">
65
                        Change address
66
                    </button>
67
                </td>
68
            </tr>
69
            #end
70
            #if($warehouses.isEmpty())
71
            <tr>
72
                <td colspan="10" class="text-muted">No warehouses yet</td>
73
            </tr>
74
            #end
75
        </tbody>
76
    </table>
28300 tejbeer 77
</div>
78
 
37823 amit 79
## New physical warehouse for this seller
80
<div id="new-warehouse-modal" class="modal fade" role="dialog">
81
    <div class="modal-dialog">
82
        <div class="modal-content">
83
            <div class="modal-header">
84
                <button type="button" class="close" data-dismiss="modal">&times;</button>
85
                <h4 class="modal-title">New Warehouse &middot; $seller.getLabel()</h4>
86
            </div>
87
            <div class="modal-body">
88
                <form id="new-warehouse-form" autocomplete="off">
89
                    <div class="form-group">
90
                        <label for="new-warehouse-name">Warehouse name</label>
37846 amit 91
                        <input type="text" class="form-control" id="new-warehouse-name" maxlength="64"
37823 amit 92
                               placeholder="e.g. HR-NSSPL/DL">
37846 amit 93
                    <p class="help-block">Also its label on dashboards and dropdowns; it can be renamed later. New
94
                        warehouses start active.</p>
28300 tejbeer 95
                    </div>
37823 amit 96
                    <div class="form-group">
97
                        <label for="new-warehouse-prefix">Branch code</label>
98
                        <input type="text" class="form-control text-uppercase" id="new-warehouse-prefix" maxlength="7"
99
                               placeholder="2 to 7 letters, e.g. NSHRDL">
100
                        <p class="help-block">Starts every invoice, challan and note number. Cannot change once billed.</p>
28300 tejbeer 101
                    </div>
37823 amit 102
                    <div class="form-group">
103
                        <label for="new-warehouse-address">Address</label>
104
                        <select class="form-control assignable-address" id="new-warehouse-address">
105
                            <option value="" selected disabled>Select address</option>
106
                            #foreach($address in $assignableAddresses)
107
                                <option value="$address.getId()">$address.getLabel()</option>
108
                            #end
109
                        </select>
110
                        <p class="help-block">Active addresses in the seller's state. Pin and state come from the address.</p>
111
                    </div>
112
                </form>
113
            </div>
114
            <div class="modal-footer">
115
                <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
116
                <button type="button" class="btn btn-primary" id="new-warehouse-submit">Create warehouse</button>
117
            </div>
118
        </div>
119
    </div>
120
</div>
121
 
122
## Point a warehouse at another address; its internal stores follow
123
<div id="remap-address-modal" class="modal fade" role="dialog">
124
    <div class="modal-dialog">
125
        <div class="modal-content">
126
            <div class="modal-header">
127
                <button type="button" class="close" data-dismiss="modal">&times;</button>
128
                <h4 class="modal-title">Change address &middot; warehouse <span id="remap-warehouse-id"></span></h4>
129
            </div>
130
            <div class="modal-body">
131
                <div class="form-group">
132
                    <label for="remap-address">New address</label>
133
                    <select class="form-control assignable-address" id="remap-address">
134
                        <option value="" selected disabled>Select address</option>
135
                        #foreach($address in $assignableAddresses)
136
                            <option value="$address.getId()">$address.getLabel()</option>
137
                        #end
138
                    </select>
28300 tejbeer 139
                </div>
37823 amit 140
                <p class="help-block">New invoices, e-way bills and notes print this address from now on, and the
141
                    warehouse's internal stores are moved to it. Already billed documents keep theirs.</p>
28300 tejbeer 142
            </div>
37823 amit 143
            <div class="modal-footer">
144
                <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
145
                <button type="button" class="btn btn-primary" id="remap-address-submit">Change address</button>
146
            </div>
28300 tejbeer 147
        </div>
37823 amit 148
    </div>
149
</div>