Subversion Repositories SmartDukaan

Rev

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

Rev 12280 Rev 12357
Line 7... Line 7...
7
    Warehouse, VendorItemPricing, Vendor, VendorItemMapping, StateInfo,\
7
    Warehouse, VendorItemPricing, Vendor, VendorItemMapping, StateInfo,\
8
    InventoryType, WarehouseType, IgnoredInventoryUpdateItems as TIgnoredinventoryupdateitems ,\
8
    InventoryType, WarehouseType, IgnoredInventoryUpdateItems as TIgnoredinventoryupdateitems ,\
9
    ItemStockPurchaseParams, OOSStatus, AmazonInventorySnapshot as TAmazonInventorySnapshot,\
9
    ItemStockPurchaseParams, OOSStatus, AmazonInventorySnapshot as TAmazonInventorySnapshot,\
10
    WarehouseLocation,AmazonFbaInventorySnapshot as TAmazonFbaInventorySnapshot,\
10
    WarehouseLocation,AmazonFbaInventorySnapshot as TAmazonFbaInventorySnapshot,\
11
    SnapdealInventoryItem as TSnapdealInventoryItem, HoldInventoryDetail as THoldInventoryDetail, \
11
    SnapdealInventoryItem as TSnapdealInventoryItem, HoldInventoryDetail as THoldInventoryDetail, \
12
    FlipkartInventorySnapshot as TFlipkartInventorySnapshot
12
    FlipkartInventorySnapshot as TFlipkartInventorySnapshot, StockWeightedNlcInfo as TStockWeightedNlcInfo
13
from shop2020.utils.Utils import to_java_date
13
from shop2020.utils.Utils import to_java_date
14
 
14
 
15
def to_t_item_inventory(item_inventory_list, item_id):
15
def to_t_item_inventory(item_inventory_list, item_id):
16
    t_item_inventory = ItemInventory()
16
    t_item_inventory = ItemInventory()
17
    t_item_inventory.id = item_id
17
    t_item_inventory.id = item_id
Line 48... Line 48...
48
        t_warehouse.vendorString = warehouse.vendorString
48
        t_warehouse.vendorString = warehouse.vendorString
49
    if warehouse.addedOn:
49
    if warehouse.addedOn:
50
        t_warehouse.addedOn = to_java_date(warehouse.addedOn)
50
        t_warehouse.addedOn = to_java_date(warehouse.addedOn)
51
    if warehouse.lastCheckedOn:
51
    if warehouse.lastCheckedOn:
52
        t_warehouse.lastCheckedOn = to_java_date(warehouse.lastCheckedOn)
52
        t_warehouse.lastCheckedOn = to_java_date(warehouse.lastCheckedOn)
-
 
53
    t_warehouse.source = warehouse.source
53
    return t_warehouse
54
    return t_warehouse
54
 
55
 
55
def to_t_itemidwarehouseid(iidwid):
56
def to_t_itemidwarehouseid(iidwid):
56
    t_iidwid = TIgnoredinventoryupdateitems()
57
    t_iidwid = TIgnoredinventoryupdateitems()
57
    t_iidwid.itemId = iidwid.item_id
58
    t_iidwid.itemId = iidwid.item_id
Line 152... Line 153...
152
    t_flipkart_inventory_snapshot.item_id = flipkartInventoryItem.item_id 
153
    t_flipkart_inventory_snapshot.item_id = flipkartInventoryItem.item_id 
153
    t_flipkart_inventory_snapshot.availability = flipkartInventoryItem.availability
154
    t_flipkart_inventory_snapshot.availability = flipkartInventoryItem.availability
154
    t_flipkart_inventory_snapshot.heldOrders = flipkartInventoryItem.heldOrders
155
    t_flipkart_inventory_snapshot.heldOrders = flipkartInventoryItem.heldOrders
155
    t_flipkart_inventory_snapshot.createdOrders = flipkartInventoryItem.createdOrders
156
    t_flipkart_inventory_snapshot.createdOrders = flipkartInventoryItem.createdOrders
156
    return t_flipkart_inventory_snapshot
157
    return t_flipkart_inventory_snapshot
-
 
158
 
-
 
159
def to_t_stock_weighted_nlc_info(stockWeightedNlcInfo):
-
 
160
    t_stock_weighted_nlc_info = TStockWeightedNlcInfo()
-
 
161
    t_stock_weighted_nlc_info.itemId = stockWeightedNlcInfo.itemId
-
 
162
    t_stock_weighted_nlc_info.source = stockWeightedNlcInfo.source
-
 
163
    t_stock_weighted_nlc_info.updatedTimestamp  = to_java_date(stockWeightedNlcInfo.updatedTimestamp)
-
 
164
    t_stock_weighted_nlc_info.stockQuantity = stockWeightedNlcInfo.stockQuantity
-
 
165
    t_stock_weighted_nlc_info.grnDetail = stockWeightedNlcInfo.grnDetail
-
 
166
    t_stock_weighted_nlc_info.avgWeightedNlc = stockWeightedNlcInfo.avgWeightedNlc
-
 
167
    return t_stock_weighted_nlc_info
157
        
168
        
158
169