| Line 369... |
Line 369... |
| 369 |
inventory_client = InventoryClient().get_client()
|
369 |
inventory_client = InventoryClient().get_client()
|
| 370 |
fbaAvailableInventorySnapshot = inventory_client.getAllAvailableAmazonFbaItemInventory()
|
370 |
fbaAvailableInventorySnapshot = inventory_client.getAllAvailableAmazonFbaItemInventory()
|
| 371 |
if runType=='FAVOURITE':
|
371 |
if runType=='FAVOURITE':
|
| 372 |
favourites = session.query(Amazonlisted.itemId).filter(or_(Amazonlisted.autoFavourite==True, Amazonlisted.manualFavourite==True)).all()
|
372 |
favourites = session.query(Amazonlisted.itemId).filter(or_(Amazonlisted.autoFavourite==True, Amazonlisted.manualFavourite==True)).all()
|
| 373 |
for fbaInventoryItem in fbaAvailableInventorySnapshot:
|
373 |
for fbaInventoryItem in fbaAvailableInventorySnapshot:
|
| - |
|
374 |
if fbaInventoryItem!=12248:
|
| - |
|
375 |
continue
|
| 374 |
if runType=='FAVOURITE':
|
376 |
if runType=='FAVOURITE':
|
| 375 |
if not (fbaInventoryItem.item_id in favourites):
|
377 |
if not (fbaInventoryItem.item_id in favourites):
|
| 376 |
continue
|
378 |
continue
|
| 377 |
d_amazon_listed = Amazonlisted.get_by(itemId=fbaInventoryItem.item_id)
|
379 |
d_amazon_listed = Amazonlisted.get_by(itemId=fbaInventoryItem.item_id)
|
| 378 |
if d_amazon_listed is None:
|
380 |
if d_amazon_listed is None:
|
| Line 618... |
Line 620... |
| 618 |
print val.otherCost
|
620 |
print val.otherCost
|
| 619 |
print spm.commission
|
621 |
print spm.commission
|
| 620 |
print spm.emiFee
|
622 |
print spm.emiFee
|
| 621 |
print spm.returnProvision
|
623 |
print spm.returnProvision
|
| 622 |
lowestPossibleSp = (val.nlc+(val.courierCost)*(1+(spm.serviceTax/100))*(1+(val.vatRate/100))+(15.0+val.otherCost)*(1+(val.vatRate)/100))/(1-(spm.commission/100+spm.emiFee/100)*(1+(spm.serviceTax/100))*(1+(val.vatRate)/100)-(spm.returnProvision/100)*(1+(val.vatRate)/100));
|
624 |
lowestPossibleSp = (val.nlc+(val.courierCost)*(1+(spm.serviceTax/100))*(1+(val.vatRate/100))+(15.0+val.otherCost)*(1+(val.vatRate)/100))/(1-(spm.commission/100+spm.emiFee/100)*(1+(spm.serviceTax/100))*(1+(val.vatRate)/100)-(spm.returnProvision/100)*(1+(val.vatRate)/100));
|
| - |
|
625 |
print (val.courierCost)*(1+(spm.serviceTax/100))
|
| - |
|
626 |
print (1+(val.vatRate/100))
|
| - |
|
627 |
print (val.courierCost)*(1+(spm.serviceTax/100))*(1+(val.vatRate/100))
|
| - |
|
628 |
print (15.0+val.otherCost)*(1+(val.vatRate)/100)
|
| - |
|
629 |
|
| 623 |
if val.isPromo:
|
630 |
if val.isPromo:
|
| 624 |
if amazonLongTermActivePromotions.has_key(val.sku):
|
631 |
if amazonLongTermActivePromotions.has_key(val.sku):
|
| 625 |
subsidy = (amazonLongTermActivePromotions.get(val.sku)).subsidy
|
632 |
subsidy = (amazonLongTermActivePromotions.get(val.sku)).subsidy
|
| 626 |
else:
|
633 |
else:
|
| 627 |
subsidy = (amazonShortTermActivePromotions.get(val.sku)).subsidy
|
634 |
subsidy = (amazonShortTermActivePromotions.get(val.sku)).subsidy
|