Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
37845 amit 1
package com.spice.profitmandi.dao.model.warehouse;
2
 
3
/**
4
 * What still ties a physical warehouse to operations: stock on its floor, orders billing from it, franchise stores
5
 * ordering into it and brand-mapping routes through it. Decides whether it may be suspended or closed.
6
 */
7
public class WarehouseUsage {
8
 
9
    private final int warehouseId;
10
    private final long stockUnits;
11
    private final long stockValue;
12
    private final long uncostedUnits;
13
    private final long openOrders;
14
    private final long franchiseStores;
15
    private final long brandMappingRows;
16
 
17
    public WarehouseUsage(int warehouseId, long stockUnits, long stockValue, long uncostedUnits, long openOrders,
18
                          long franchiseStores, long brandMappingRows) {
19
        this.warehouseId = warehouseId;
20
        this.stockUnits = stockUnits;
21
        this.stockValue = stockValue;
22
        this.uncostedUnits = uncostedUnits;
23
        this.openOrders = openOrders;
24
        this.franchiseStores = franchiseStores;
25
        this.brandMappingRows = brandMappingRows;
26
    }
27
 
28
    public static WarehouseUsage none(int warehouseId) {
29
        return new WarehouseUsage(warehouseId, 0, 0, 0, 0, 0, 0);
30
    }
31
 
32
    public int getWarehouseId() {
33
        return warehouseId;
34
    }
35
 
36
    public long getStockUnits() {
37
        return stockUnits;
38
    }
39
 
40
    /** Receipt cost of the units that carry one; see uncostedUnits for the rest. */
41
    public long getStockValue() {
42
        return stockValue;
43
    }
44
 
45
    public long getUncostedUnits() {
46
        return uncostedUnits;
47
    }
48
 
49
    /** Orders billing from it that have not shipped: submitted (3) or billed (7). */
50
    public long getOpenOrders() {
51
        return openOrders;
52
    }
53
 
54
    public long getFranchiseStores() {
55
        return franchiseStores;
56
    }
57
 
58
    public long getBrandMappingRows() {
59
        return brandMappingRows;
60
    }
61
}