Subversion Repositories SmartDukaan

Rev

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

Rev 32730 Rev 37823
Line 1... Line -...
1
 
-
 
-
 
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()">
2
<script>
4
    <div class="panel-heading clearfix">
3
 
-
 
4
 $("#newWarehousebutton").click(function(){
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"
5
        $("#newWarehouse").modal({backdrop: false});
9
                data-target="#new-warehouse-modal">New Warehouse
-
 
10
        </button>
6
    });
11
    </div>
-
 
12
    <table class="table table-striped table-condensed">
7
    
13
        <thead>
8
</script>
14
        <tr>
9
 
-
 
10
 
-
 
-
 
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>
11
<table class="table table-striped sellerwarehouse-container">
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>
12
<div>
25
        </tr>
-
 
26
        </thead>
13
 
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>
14
<h2>Seller Details</h2>
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>
15
 
68
    </table>
16
</div>
69
</div>
17
			<thead>
-
 
18
					 <tr>
-
 
19
						 <th>Label</th>
-
 
20
						 <th>Gst</th>
-
 
21
						 <th>Address</th>
-
 
22
					</tr>
-
 
23
					
-
 
24
			</thead>
-
 
25
							    
-
 
26
			<tbody>
-
 
27
					 <div class="row">  
-
 
28
			     <tr> 
-
 
29
			        
-
 
30
	                  <td>$seller.getLabel()</td>
-
 
31
                      <td>$seller.getGstin()</td>
-
 
32
                      <td>$seller.getAddress()</td>
-
 
33
			    </tr>
-
 
34
			</div>
-
 
35
					
-
 
36
		
-
 
37
					
-
 
38
			</tbody>
-
 
39
		</table>
-
 
40
 
-
 
41
 
-
 
42
 
-
 
43
 
-
 
44
 
-
 
45
 
70
 
46
 
-
 
47
<table class="table table-striped sellerwarehouse-container">
-
 
48
<div>
-
 
49
<h2>Warehouse Details</h2>
71
## New physical warehouse for this seller
50
	</div>		<thead>
-
 
51
					 <tr>
-
 
52
						 <th>Warehouse Id</th>
72
<div id="new-warehouse-modal" class="modal fade" role="dialog">
53
						 <th>Prefix</th>
-
 
54
						 <th>invoice Id</th>
-
 
55
						 <!--<th>Gst</th>-->
-
 
56
						  <th>Address</th>
-
 
57
					</tr>
-
 
58
					
-
 
59
			</thead>
-
 
60
							    
-
 
61
			<tbody>
-
 
62
					 <div class="row">  
73
    <div class="modal-dialog">
63
					   #foreach($sellerWarehouse in $sellerWarehouse)
-
 
64
					
-
 
65
			     <tr> 
-
 
66
			        
-
 
67
	                  <td>$sellerWarehouse.getWarehouseId()</td>
74
        <div class="modal-content">
68
                      <td>$sellerWarehouse.getPrefix()</td>
-
 
69
                     <td>$sellerWarehouse.getInvoiceSequence()</td>
-
 
70
                      <!--<td>$seller.get($sellerWarehouse.getSellerId()).getGstin()</td>-->
-
 
71
                      <td>$wam.get($sellerWarehouse.getWarehouseId()).getAddress()</td>
-
 
72
			    </tr>
-
 
73
			 #end	
-
 
74
					</div>
-
 
75
					
-
 
76
		<div class="col-lg-2">
75
            <div class="modal-header">
77
        <button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#newWarehouse"
76
                <button type="button" class="close" data-dismiss="modal">&times;</button>
78
                style="font-size:12px;">New Warehouse
77
                <h4 class="modal-title">New Warehouse &middot; $seller.getLabel()</h4>
79
        </button>
78
            </div>
80
        
-
 
81
        <div id="newWarehouse" class="modal fade" role="dialog">
-
 
82
            <div class="modal-dialog">
79
            <div class="modal-body">
83
                <!-- Modal content-->
80
                <form id="new-warehouse-form" autocomplete="off">
84
                <div class="modal-content"  style="width: 1050px;">
81
                    <div class="form-group">
85
                    <div class="modal-header">
82
                        <label for="new-warehouse-name">Warehouse name</label>
86
                        <button type="button" class="close" data-dismiss="modal">&times;</button>
83
                        <input type="text" class="form-control" id="new-warehouse-name" maxlength="128"
87
                        <h4 class="modal-title">Modal Header</h4>
84
                               placeholder="e.g. HR-NSSPL/DL">
88
                    </div>
85
                    </div>
89
             
-
 
90
          
-
 
91
                    <div class="modal-body"    style="height: 251px;">
-
 
92
                       <form id="add-warehouse-form">
-
 
93
                                        <div class="form-row">
-
 
94
                               
-
 
95
                        <div class="form-group col-md-6">
86
                    <div class="form-group">
96
                          <label for="warehouseName">Warehouse Name</label>
87
                        <label for="new-warehouse-prefix">Branch code</label>
97
                         <input type="text" class="form-control" id="warehouseName"  name="inputWarehouseName"  placeholder="Warehouse Name">
88
                        <input type="text" class="form-control text-uppercase" id="new-warehouse-prefix" maxlength="7"
98
                        </div>
-
 
99
                                                  
-
 
100
                             <div class="form-group col-md-6">
-
 
101
                                    <label for="prefix">Prefix</label>
89
                               placeholder="2 to 7 letters, e.g. NSHRDL">
102
                                    <input type="text" class="form-control" id="prefix"  name="inputPrefix"  placeholder="Prefix">
-
 
103
                               </div>
-
 
104
                         <div class="form-group col-md-6">
-
 
105
                          <label for="pin">Pin</label>
-
 
106
                        <input type="text" class="form-control" id="pinNumber"  name="inputPin"  placeholder="Pincode">
90
                        <p class="help-block">Starts every invoice, challan and note number. Cannot change once billed.</p>
107
                        </div>
-
 
108
                                
-
 
109
                   <div class="form-group col-md-6">
-
 
110
                    <label for="address">Address</label>
-
 
111
						   <select class="form-control input-sm" id = "addressWare"  placeholder="label">
-
 
112
						     <option value="" disabled selected>Address</option>
-
 
113
							  #foreach($allWhm in $allWhm)
-
 
114
		             		 <option value="$allWhm.getId()">$allWhm.getAddress()</option>
-
 
115
		             		#end
-
 
116
		             	</select>
-
 
117
					</div>
-
 
118
                       <div class="form-group col-md-2">
-
 
119
                            <button type="button" class="btn btn-primary" id="newWarehousebutton" data-dismiss="modal" style="margin: 22px;"
-
 
120
                                    data-backdrop='static' data-keyboard='false'>submit
-
 
121
                            </button>
-
 
122
                       </div>
-
 
123
                     </div>
-
 
124
                             </form>
-
 
125
                         </div>
-
 
126
          
-
 
127
                    <div class="modal-footer">
-
 
128
                        <button type="submit" class="btn btn-default" data-dismiss="modal">Close</button>
-
 
129
                    </div>
91
                    </div>
-
 
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>
130
                </div>
129
                </div>
-
 
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>
-
 
132
            </div>
-
 
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>
131
            </div>
136
            </div>
132
        </div>
137
        </div>
133
   
-
 
134
					</div>
138
    </div>
135
					
-
 
136
			</tbody>
-
 
137
		</table>
139
</div>