Subversion Repositories SmartDukaan

Rev

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

Rev 7216 Rev 7410
Line 15... Line 15...
15
    DOA_REPLACED = 8,
15
    DOA_REPLACED = 8,
16
    LOST_IN_WAREHOUSE = 9,
16
    LOST_IN_WAREHOUSE = 9,
17
    MARKED_USED	= 10,
17
    MARKED_USED	= 10,
18
  	MARKED_BAD = 11,
18
  	MARKED_BAD = 11,
19
  	MARKED_GOOD = 12;
19
  	MARKED_GOOD = 12;
-
 
20
  	WAREHOUSE_TRANSFER_IN = 13;
-
 
21
  	WAREHOUSE_TRANSFER_OUT = 14;
-
 
22
}
-
 
23
 
-
 
24
enum TransferLotStatus {
-
 
25
	IN_TRANSIT = 1,
-
 
26
	PARTIAL_TRANSFER = 2,
-
 
27
	TRANSFER_COMPLETE = 3
-
 
28
}
-
 
29
 
-
 
30
enum TransferType {
-
 
31
	OURS_OURS = 1,
-
 
32
	OURS_THIRDPARTY = 2
20
}
33
}
21
 
34
 
22
struct InventoryItem {
35
struct InventoryItem {
23
    // primary fields
36
    // primary fields
24
    1:i64 id,
37
    1:i64 id,
Line 27... Line 40...
27
    4:string serialNumber,
40
    4:string serialNumber,
28
    5:i64 initialQuantity,
41
    5:i64 initialQuantity,
29
    6:i64 currentQuantity,
42
    6:i64 currentQuantity,
30
    7:i64 purchaseId,
43
    7:i64 purchaseId,
31
    8:i64 purchaseReturnId,
44
    8:i64 purchaseReturnId,
-
 
45
    9:i64 physicalWarehouseId,
-
 
46
    10:TransferLotStatus transferStatus,
32
    // derived fields for  efficient lookups
47
    // derived fields for  efficient lookups
33
    9:i64 supplierId,
48
    11:i64 supplierId,
34
    10:double unitPrice,
49
    12:double unitPrice,
35
    11:i64 currentWarehouseId,
50
    13:i64 currentWarehouseId,
36
    12:ScanType lastScanType
51
    14:ScanType lastScanType
37
}
52
}
38
 
53
 
39
struct Scan {
54
struct Scan {
40
    1:i64 id,
55
    1:i64 id,
41
    2:i64 inventoryItemId,
56
    2:i64 inventoryItemId,
42
    3:optional i64 quantity, // ignored in case of serialized items
57
    3:optional i64 quantity, // ignored in case of serialized items
43
    4:optional i64 orderId, // The order that was fulfilled with thin scan!
58
    4:optional i64 orderId, // The order that was fulfilled with this scan!
44
    5:i64 warehouseId,
59
    5:i64 warehouseId,
45
    6:ScanType type,
60
    6:ScanType type,
46
    7:i64 scannedAt,
61
    7:i64 scannedAt,
-
 
62
    8:i64 transferLotId,
47
    //8:string remarks
63
    9:string remarks
48
}
64
}
49
 
65
 
50
struct DetailedPurchaseScan {
66
struct DetailedPurchaseScan {
51
    1:i64 purchaseOrderId,
67
    1:i64 purchaseOrderId,
52
    2:i64 poCreatedAt,
68
    2:i64 poCreatedAt,
Line 107... Line 123...
107
   13:i64 ZeroPlusCost,
123
   13:i64 ZeroPlusCost,
108
   14:i64 OnePlusCost,
124
   14:i64 OnePlusCost,
109
   15:string category
125
   15:string category
110
}
126
}
111
 
127
 
-
 
128
struct PossibleWarehouseMovement {
-
 
129
	1:i64 fromWarehouseId,
-
 
130
	2:i64 toWarehouseId
-
 
131
}
-
 
132
 
-
 
133
struct TransferLot {
-
 
134
	1:i64 id,
-
 
135
	2:i64 originWarehouseId,
-
 
136
	3:i64 destinationWarehouseId,
-
 
137
	4:TransferLotStatus status,
-
 
138
	5:i64 transferDate,
-
 
139
	6:TransferType type,
-
 
140
	7:string transitCompletionReferenceNumber,
-
 
141
	8:i64 referenceUpdationDate
-
 
142
	9:string remarks,
-
 
143
}
-
 
144
 
112
exception WarehouseServiceException {
145
exception WarehouseServiceException {
113
    1:GenericService.ExceptionType exceptionType,
146
    1:GenericService.ExceptionType exceptionType,
114
    2:string message
147
    2:string message
115
}
148
}
116
 
149
 
Line 127... Line 160...
127
    InventoryItem getNonSeralizedInventoryItem(1:string itemNumber, 2:i64 itemId, 3:i64 fulfilmentWarehouseId) throws (1:WarehouseServiceException wex);
160
    InventoryItem getNonSeralizedInventoryItem(1:string itemNumber, 2:i64 itemId, 3:i64 fulfilmentWarehouseId) throws (1:WarehouseServiceException wex);
128
 
161
 
129
    /**
162
    /**
130
     * Scan non-serialized items.
163
     * Scan non-serialized items.
131
     */
164
     */
132
    void scan(1:InventoryItem inventoryItem, 2:ScanType type, 3:i64 quantity, 4:i64 billingWarehouseId) throws (1:WarehouseServiceException wex);
165
    void scan(1:InventoryItem inventoryItem, 2:ScanType type, 3:i64 quantity, 4:i64 billingWarehouseId, 5:i64 transferLotId) throws (1:WarehouseServiceException wex);
133
 
166
 
134
    /**
167
    /**
135
     * Scan serialized items linked with an order. Returns its price.
168
     * Scan serialized items linked with an order. Returns its price.
136
     */
169
     */
137
    InventoryItem scanSerializedItemForOrder(1:string serialNumber, 2:ScanType type, 3:i64 orderId, 4:i64 fulfilmentWarehouseId, 5:double quantity, 6:i64 billingWarehouseId) throws (1:WarehouseServiceException wex);
170
    InventoryItem scanSerializedItemForOrder(1:string serialNumber, 2:ScanType type, 3:i64 orderId, 4:i64 fulfilmentWarehouseId, 5:double quantity, 6:i64 billingWarehouseId) throws (1:WarehouseServiceException wex);
Line 198... Line 231...
198
     list<Scan> getInventoryScansForItem(1:i64 itemId, 2:i64 fromDate, 3:i64 toDate);
231
     list<Scan> getInventoryScansForItem(1:i64 itemId, 2:i64 fromDate, 3:i64 toDate);
199
     
232
     
200
     /**
233
     /**
201
      * Fetches the scanRecords for a given serialNumber for a given time interval 
234
      * Fetches the scanRecords for a given serialNumber for a given time interval 
202
      */
235
      */
203
     list<Scan> getScanRecordsForSerialNumber(1:i64 serialNumber);
236
     list<Scan> getScanRecordsForSerialNumber(1:string serialNumber);
204
     
237
     
205
     /**
238
     /**
206
      * Inserts outgoing scans for Returned Items and updates returnId in InventoryItems
239
      * Inserts outgoing scans for Returned Items and updates returnId in InventoryItems
207
      */
240
      */
208
     void scanForPurchaseReturn(1:list<InventoryItem> saleReturnItems, 2:i64 vendorId) throws (1:WarehouseServiceException ex);
241
     void scanForPurchaseReturn(1:list<InventoryItem> saleReturnItems, 2:i64 vendorId) throws (1:WarehouseServiceException ex);
Line 238... Line 271...
238
     InventoryItem scanForOursExternalSale(1:i64 itemId, 2:string serialNumber, 3:string itemNumber, 4:string invoiceNumber, 5:i64 warehouseId, 6:double unitPrice, 7: i64 orderId)throws (1:WarehouseServiceException ex);
271
     InventoryItem scanForOursExternalSale(1:i64 itemId, 2:string serialNumber, 3:string itemNumber, 4:string invoiceNumber, 5:i64 warehouseId, 6:double unitPrice, 7: i64 orderId)throws (1:WarehouseServiceException ex);
239
     
272
     
240
     /**
273
     /**
241
      * Insert Purchase_Ret/Sale_Ret Entries for product billed by Hotspot using OURS_EXTERNAL Billing
274
      * Insert Purchase_Ret/Sale_Ret Entries for product billed by Hotspot using OURS_EXTERNAL Billing
242
      */
275
      */
243
     void scanForOursExternalSaleReturn(1:i64 orderId, 2:double unitPrice);
276
     void scanForOursExternalSaleReturn(1:i64 orderId, 2:double unitPrice) throws (1:WarehouseServiceException ex);
244
     
277
     
245
     list<InventoryMovement> getMovementNonSerializedInventoryByScans(1:i64 startDate, 2:i64 endDate);
278
     list<InventoryMovement> getMovementNonSerializedInventoryByScans(1:i64 startDate, 2:i64 endDate);
246
     
279
     
247
     list<InventoryMovement> getMovementSerializedInventoryByScans(1:i64 startDate, 2:i64 endDate);
280
     list<InventoryMovement> getMovementSerializedInventoryByScans(1:i64 startDate, 2:i64 endDate);
248
     
281
     
Line 252... Line 285...
252
     
285
     
253
     InventoryItem scanfreebie(1:i64 orderId, 2:i64 freebieItemId, 3:i64 freebieWarehouseId, 4:ScanType scanType) throws (1:WarehouseServiceException wex);
286
     InventoryItem scanfreebie(1:i64 orderId, 2:i64 freebieItemId, 3:i64 freebieWarehouseId, 4:ScanType scanType) throws (1:WarehouseServiceException wex);
254
     
287
     
255
     void reshipfreebie(1:i64 oldOrderId, 2:i64 newOrderId, 3:i64 freebieItemId, 4:ScanType scanType) throws (1:WarehouseServiceException wex);
288
     void reshipfreebie(1:i64 oldOrderId, 2:i64 newOrderId, 3:i64 freebieItemId, 4:ScanType scanType) throws (1:WarehouseServiceException wex);
256
     
289
     
-
 
290
     bool isItemTransferAllowed(1:i64 warehouseId, 2:i64 transferWarehouseId);
-
 
291
     
-
 
292
     i64 createTransferLot(1:i64 originWarehouseId, 2:i64 destWarehouseId) throws (1:WarehouseServiceException wex);
-
 
293
     
-
 
294
     TransferLot getTransferLot(1:i64 transferLotId) throws (1:WarehouseServiceException wex);
-
 
295
 
-
 
296
	 void markTransferLotAsReceived(1:i64 id, 2:string remoteTransferRefNumber) throws (1:WarehouseServiceException wex);
-
 
297
	 
-
 
298
	 list<TransferLot> getTransferLotsByDate(1:i64 fromDate, 2:i64 toDate) throws (1:WarehouseServiceException wex);
-
 
299
	 
-
 
300
	 list<i64> getAllowedDestinationWarehousesForTransfer(1:i64 warehouseId);
-
 
301
	 
-
 
302
	 map<i64, i64> getItemsInTransferLot(1:i64 transferLotId);
-
 
303
	 
-
 
304
	 void markItemsAsReceivedForTransferLot(1:i64 id) throws (1:WarehouseServiceException wex);
-
 
305
	 
-
 
306
	 TransferLotStatus updateTransferLotAfterItemReceive(1:i64 id) throws (1:WarehouseServiceException wex);
-
 
307
	 
-
 
308
	 void scanForTransfer(1:list<InventoryItem> inventoryItems, 2:ScanType type, 3:i64 transferLotId) throws (1:WarehouseServiceException wex);
257
}
309
}
258
310