| Line 2381... |
Line 2381... |
| 2381 |
mp_item = get_marketplace_details_for_item(sku,source_id)
|
2381 |
mp_item = get_marketplace_details_for_item(sku,source_id)
|
| 2382 |
if mp_item is not None:
|
2382 |
if mp_item is not None:
|
| 2383 |
mp_item.lastCheckedTimestamp = to_py_date(timestamp)
|
2383 |
mp_item.lastCheckedTimestamp = to_py_date(timestamp)
|
| 2384 |
session.commit()
|
2384 |
session.commit()
|
| 2385 |
|
2385 |
|
| - |
|
2386 |
def update_item_hold_inventory(itemHoldMap):
|
| - |
|
2387 |
items = get_all_alive_items()
|
| - |
|
2388 |
for item in items:
|
| - |
|
2389 |
if item.holdOverride:
|
| - |
|
2390 |
continue
|
| - |
|
2391 |
if itemHoldMap.__contains__(item.id):
|
| - |
|
2392 |
item.holdInventory = itemHoldMap[item.id]
|
| - |
|
2393 |
else:
|
| - |
|
2394 |
item.holdInventory = 1
|
| - |
|
2395 |
session.commit()
|
| - |
|
2396 |
|
| 2386 |
def update_nlc_at_marketplaces(itemid,vendor_id,nlc):
|
2397 |
def update_nlc_at_marketplaces(itemid,vendor_id,nlc):
|
| 2387 |
try:
|
2398 |
try:
|
| 2388 |
item = SnapdealItem.get_by(item_id=itemid)
|
2399 |
item = SnapdealItem.get_by(item_id=itemid)
|
| 2389 |
if item is not None:
|
2400 |
if item is not None:
|
| 2390 |
marketplaceitem = MarketplaceItems.get_by(itemId=itemid,source=7)
|
2401 |
marketplaceitem = MarketplaceItems.get_by(itemId=itemid,source=7)
|
| Line 2397... |
Line 2408... |
| 2397 |
inHouseCost = 15 + vat + (marketplaceitem.returnProvision/100)*item.sellingPrice + marketplaceitem.otherCost
|
2408 |
inHouseCost = 15 + vat + (marketplaceitem.returnProvision/100)*item.sellingPrice + marketplaceitem.otherCost
|
| 2398 |
marketplaceitem.minimumPossibleTp = nlc + inHouseCost
|
2409 |
marketplaceitem.minimumPossibleTp = nlc + inHouseCost
|
| 2399 |
marketplaceitem.minimumPossibleSp = (nlc+(item.courierCost+marketplaceitem.closingFee)*(1+(marketplaceitem.serviceTax/100))*(1+(marketplaceitem.vat/100))+(15+marketplaceitem.otherCost)*(1+(marketplaceitem.vat)/100))/(1-(marketplaceitem.commission/100+marketplaceitem.emiFee/100)*(1+(marketplaceitem.serviceTax/100))*(1+(marketplaceitem.vat)/100)-(marketplaceitem.returnProvision/100)*(1+(marketplaceitem.vat)/100))
|
2410 |
marketplaceitem.minimumPossibleSp = (nlc+(item.courierCost+marketplaceitem.closingFee)*(1+(marketplaceitem.serviceTax/100))*(1+(marketplaceitem.vat/100))+(15+marketplaceitem.otherCost)*(1+(marketplaceitem.vat)/100))/(1-(marketplaceitem.commission/100+marketplaceitem.emiFee/100)*(1+(marketplaceitem.serviceTax/100))*(1+(marketplaceitem.vat)/100)-(marketplaceitem.returnProvision/100)*(1+(marketplaceitem.vat)/100))
|
| 2400 |
session.commit()
|
2411 |
session.commit()
|
| 2401 |
finally:
|
2412 |
finally:
|
| 2402 |
close_session()
|
- |
|
| 2403 |
|
2413 |
close_session()
|
| - |
|
2414 |
|
| 2404 |
|
2415 |
|