Subversion Repositories SmartDukaan

Rev

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

Rev 4541 Rev 4555
Line 8... Line 8...
8
    2:string displayName,
8
    2:string displayName,
9
    3:string location
9
    3:string location
10
}
10
}
11
 
11
 
12
struct InventoryItem {
12
struct InventoryItem {
-
 
13
    // fields in db
13
    1:i64 id,
14
    1:i64 id,
14
    2:i64 itemId,
15
    2:i64 itemId,
15
    3:string itemNumber,
16
    3:string itemNumber,
16
    4:string serialNumber,
17
    4:string serialNumber,
17
    5:i64 initialQuantity,
18
    5:i64 initialQuantity,
18
    6:i64 currentQuantity,
19
    6:i64 currentQuantity,
19
    7:i64 purchaseId
20
    7:i64 purchaseId,
-
 
21
 
-
 
22
    // derived fields for  efficient lookups
-
 
23
    8:i64 supplierId,
-
 
24
    9:double unitPrice
20
}
25
}
21
 
26
 
22
enum ScanType {
27
enum ScanType {
23
    PURCHASE = 0,   // Scan-in at the time of purchase
28
    PURCHASE = 0,   // Scan-in at the time of purchase
24
    SALE = 1,       // Scan-out for sale
29
    SALE = 1,       // Scan-out for sale
Line 45... Line 50...
45
 
50
 
46
service WarehouseService extends GenericService.GenericService {
51
service WarehouseService extends GenericService.GenericService {
47
    /**
52
    /**
48
     * Creating inventory for a serialized item
53
     * Creating inventory for a serialized item
49
     */
54
     */
50
    i64 createSerializedInventoryItem(1:i64 itemId, 2:string serialNumber, 3:i64 purchaseId) throws (1:WarehouseServiceException wex);
55
    InventoryItem createSerializedInventoryItem(1:i64 itemId, 2:string serialNumber, 3:i64 purchaseId) throws (1:WarehouseServiceException wex);
51
 
56
 
52
    /**
57
    /**
53
     * Creating inventory for a serialized item using item number
58
     * Creating inventory for a serialized item using item number
54
     */
59
     */
55
    i64 createSerializedInventoryItemFromItemNumber(1:string itemNumber, 2:string serialNumber, 3:i64 purchaseId) throws (1:WarehouseServiceException wex);
60
    InventoryItem createSerializedInventoryItemFromItemNumber(1:string itemNumber, 2:string serialNumber, 3:i64 purchaseId) throws (1:WarehouseServiceException wex);
56
 
61
 
57
    /**
62
    /**
58
     * Creates inventory for an unserailized item
63
     * Creates inventory for an unserailized item
59
     */
64
     */
60
    i64 createInventoryItem(1:i64 itemId, 2:i64 quantity, 3:i64 purchaseId) throws (1:WarehouseServiceException wex);
65
    InventoryItem createInventoryItem(1:i64 itemId, 2:i64 quantity, 3:i64 purchaseId) throws (1:WarehouseServiceException wex);
61
 
66
 
62
    /**
67
    /**
63
     * Retrieves serialized inventory item given a serial number
68
     * Retrieves serialized inventory item given a serial number
64
     */
69
     */
65
    InventoryItem getInventoryItem(1:string serialNumber) throws (1:WarehouseServiceException wex);
70
    InventoryItem getInventoryItem(1:string serialNumber) throws (1:WarehouseServiceException wex);
Line 95... Line 100...
95
    void scan(1:i64 inventoryItemId, 2:ScanType type, 3:i64 quantity, 4:i64 warehouseId) throws (1:WarehouseServiceException wex);
100
    void scan(1:i64 inventoryItemId, 2:ScanType type, 3:i64 quantity, 4:i64 warehouseId) throws (1:WarehouseServiceException wex);
96
 
101
 
97
    /**
102
    /**
98
     * Scan serialized items linked with an order. Returns its price.
103
     * Scan serialized items linked with an order. Returns its price.
99
     */
104
     */
100
    i64 scanSerializedItemForOrder(1:i64 inventoryItemId, 2:ScanType type, 3:i64 orderId, 4:i64 warehouseId) throws (1:WarehouseServiceException wex);
105
    InventoryItem scanSerializedItemForOrder(1:string serialNumber, 2:ScanType type, 3:i64 orderId, 4:i64 warehouseId) throws (1:WarehouseServiceException wex);
101
 
106
 
102
    /**
107
    /**
103
     * Scan non-serialized items linked with an order.
108
     * Scan non-serialized items linked with an order.
104
     */
109
     */
105
    void scanForOrder(1:i64 inventoryItemId, 2:ScanType type, 3:i64 quantity, 4:i64 orderId, 5:i64 warehouseId) throws (1:WarehouseServiceException wex);
110
    void scanForOrder(1:i64 inventoryItemId, 2:ScanType type, 3:i64 quantity, 4:i64 orderId, 5:i64 warehouseId) throws (1:WarehouseServiceException wex);