Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
37823 amit 1
## Physical warehouses of one seller. A warehouse is active while its seller registration is; the other columns show
2
## whether the pieces billing and movements need are in place.
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>
16
            <th>Name</th>
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>
23
            <th>Status</th>
24
            <th></th>
25
        </tr>
26
        </thead>
27
        <tbody>
28
            #foreach($warehouse in $warehouses)
29
            <tr #if(!$warehouse.isActive()) class="text-muted" #end>
30
                <td>$warehouse.getWarehouseId()</td>
31
                <td>#if($warehouse.getName())$warehouse.getName()#end</td>
32
                <td>$warehouse.getPrefix()</td>
33
                <td>
34
                    #if($warehouse.getAddress())
35
                        #$warehouse.getAddress().getId() · #if($warehouse.getAddress().getCity())$warehouse.getAddress().getCity()#end
36
                        · $warehouse.getAddress().getPin()
37
                        #if(!$warehouse.getAddress().isActive())<span class="label label-default">inactive address</span>#end
38
                    #else
39
                        <span class="label label-danger">no address</span>
40
                    #end
41
                </td>
42
                <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>
43
                <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>
44
                <td>#if($warehouse.isHasDummy())<span class="text-success">&#10003;</span>#{else}<span class="label label-warning">missing</span>#end</td>
45
                <td>$warehouse.getInvoiceSequence() / $warehouse.getChallanSequence() / $warehouse.getCreditNoteSequence() / $warehouse.getDebitNoteSequence()</td>
46
                <td>
47
                    <button type="button"
48
                            class="btn btn-xs warehouse-active-toggle #if($warehouse.isActive()) btn-success #else btn-default #end"
49
                            data-warehouse-id="$warehouse.getWarehouseId()" data-active="$warehouse.isActive()">
50
                        #if($warehouse.isActive())Active#else Inactive#end
51
                    </button>
52
                </td>
53
                <td>
54
                    <button type="button" class="btn btn-default btn-xs warehouse-remap-open"
55
                            data-warehouse-id="$warehouse.getWarehouseId()"
56
                            data-address-id="#if($warehouse.getAddress())$warehouse.getAddress().getId()#end">
57
                        Change address
58
                    </button>
59
                </td>
60
            </tr>
61
            #end
62
            #if($warehouses.isEmpty())
63
            <tr>
64
                <td colspan="10" class="text-muted">No warehouses yet</td>
65
            </tr>
66
            #end
67
        </tbody>
68
    </table>
28300 tejbeer 69
</div>
70
 
37823 amit 71
## New physical warehouse for this seller
72
<div id="new-warehouse-modal" class="modal fade" role="dialog">
73
    <div class="modal-dialog">
74
        <div class="modal-content">
75
            <div class="modal-header">
76
                <button type="button" class="close" data-dismiss="modal">&times;</button>
77
                <h4 class="modal-title">New Warehouse &middot; $seller.getLabel()</h4>
78
            </div>
79
            <div class="modal-body">
80
                <form id="new-warehouse-form" autocomplete="off">
81
                    <div class="form-group">
82
                        <label for="new-warehouse-name">Warehouse name</label>
83
                        <input type="text" class="form-control" id="new-warehouse-name" maxlength="128"
84
                               placeholder="e.g. HR-NSSPL/DL">
28300 tejbeer 85
                    </div>
37823 amit 86
                    <div class="form-group">
87
                        <label for="new-warehouse-prefix">Branch code</label>
88
                        <input type="text" class="form-control text-uppercase" id="new-warehouse-prefix" maxlength="7"
89
                               placeholder="2 to 7 letters, e.g. NSHRDL">
90
                        <p class="help-block">Starts every invoice, challan and note number. Cannot change once billed.</p>
28300 tejbeer 91
                    </div>
37823 amit 92
                    <div class="form-group">
93
                        <label for="new-warehouse-address">Address</label>
94
                        <select class="form-control assignable-address" id="new-warehouse-address">
95
                            <option value="" selected disabled>Select address</option>
96
                            #foreach($address in $assignableAddresses)
97
                                <option value="$address.getId()">$address.getLabel()</option>
98
                            #end
99
                        </select>
100
                        <p class="help-block">Active addresses in the seller's state. Pin and state come from the address.</p>
101
                    </div>
102
                </form>
103
            </div>
104
            <div class="modal-footer">
105
                <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
106
                <button type="button" class="btn btn-primary" id="new-warehouse-submit">Create warehouse</button>
107
            </div>
108
        </div>
109
    </div>
110
</div>
111
 
112
## Point a warehouse at another address; its internal stores follow
113
<div id="remap-address-modal" class="modal fade" role="dialog">
114
    <div class="modal-dialog">
115
        <div class="modal-content">
116
            <div class="modal-header">
117
                <button type="button" class="close" data-dismiss="modal">&times;</button>
118
                <h4 class="modal-title">Change address &middot; warehouse <span id="remap-warehouse-id"></span></h4>
119
            </div>
120
            <div class="modal-body">
121
                <div class="form-group">
122
                    <label for="remap-address">New address</label>
123
                    <select class="form-control assignable-address" id="remap-address">
124
                        <option value="" selected disabled>Select address</option>
125
                        #foreach($address in $assignableAddresses)
126
                            <option value="$address.getId()">$address.getLabel()</option>
127
                        #end
128
                    </select>
28300 tejbeer 129
                </div>
37823 amit 130
                <p class="help-block">New invoices, e-way bills and notes print this address from now on, and the
131
                    warehouse's internal stores are moved to it. Already billed documents keep theirs.</p>
28300 tejbeer 132
            </div>
37823 amit 133
            <div class="modal-footer">
134
                <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
135
                <button type="button" class="btn btn-primary" id="remap-address-submit">Change address</button>
136
            </div>
28300 tejbeer 137
        </div>
37823 amit 138
    </div>
139
</div>