| Line 502... |
Line 502... |
| 502 |
ourRank = 999
|
502 |
ourRank = 999
|
| 503 |
|
503 |
|
| 504 |
|
504 |
|
| 505 |
print "Creating object am details",val.sku
|
505 |
print "Creating object am details",val.sku
|
| 506 |
amDetails = __AmazonDetails(sku, ourSp, ourRank, lowestSellerName,lowestSellerSp,secondLowestSellerName, secondLowestSellerSp, thirdLowestSellerName, thirdLowestSellerSp,len(scrapInfo),multipleListings)
|
506 |
amDetails = __AmazonDetails(sku, ourSp, ourRank, lowestSellerName,lowestSellerSp,secondLowestSellerName, secondLowestSellerSp, thirdLowestSellerName, thirdLowestSellerSp,len(scrapInfo),multipleListings)
|
| - |
|
507 |
print "am details obj created"
|
| 507 |
try:
|
508 |
try:
|
| - |
|
509 |
print "inside val getter"
|
| 508 |
val.vatRate = catalog_client.getVatPercentageForItem(int(val.sku[3:]), val.state_id, amDetails.ourSp)
|
510 |
val.vatRate = catalog_client.getVatPercentageForItem(int(val.sku[3:]), val.state_id, amDetails.ourSp)
|
| - |
|
511 |
print "vat fetched"
|
| 509 |
except:
|
512 |
except:
|
| - |
|
513 |
print "vat exception"
|
| 510 |
temp = []
|
514 |
temp = []
|
| 511 |
temp.append(val)
|
515 |
temp.append(val)
|
| 512 |
temp.append("Vat not available")
|
516 |
temp.append("Vat not available")
|
| 513 |
exceptionList.append(temp)
|
517 |
exceptionList.append(temp)
|
| - |
|
518 |
print "added in exception list"
|
| 514 |
continue
|
519 |
continue
|
| 515 |
|
520 |
|
| 516 |
ourTp = getOurTp(amDetails,val,val.sourcePercentage)
|
521 |
ourTp = getOurTp(amDetails,val,val.sourcePercentage)
|
| 517 |
lowestPossibleTp = getLowestPossibleTp(amDetails,val,val.sourcePercentage)
|
522 |
lowestPossibleTp = getLowestPossibleTp(amDetails,val,val.sourcePercentage)
|
| 518 |
lowestPossibleSp = getLowestPossibleSp(amDetails,val,val.sourcePercentage)
|
523 |
lowestPossibleSp = getLowestPossibleSp(amDetails,val,val.sourcePercentage)
|
| Line 563... |
Line 568... |
| 563 |
temp = []
|
568 |
temp = []
|
| 564 |
temp.append(val)
|
569 |
temp.append(val)
|
| 565 |
temp.append(amDetails)
|
570 |
temp.append(amDetails)
|
| 566 |
temp.append(amPricing)
|
571 |
temp.append(amPricing)
|
| 567 |
cantCompete.append(temp)
|
572 |
cantCompete.append(temp)
|
| 568 |
print "Created category..."
|
573 |
print "Created category..."
|
| 569 |
|
574 |
|
| 570 |
return exceptionList, negativeMargin, cheapest, amongCheapestAndCanCompete, canCompete, almostCompete, cantCompete
|
575 |
return exceptionList, negativeMargin, cheapest, amongCheapestAndCanCompete, canCompete, almostCompete, cantCompete
|
| 571 |
|
576 |
|
| 572 |
def getOurTp(amazonDetails,val,spm):
|
577 |
def getOurTp(amazonDetails,val,spm):
|
| 573 |
ourTp = amazonDetails.ourSp- amazonDetails.ourSp*(spm.commission/100+spm.emiFee/100)*(1+(spm.serviceTax/100))-(val.courierCost)*(1+(spm.serviceTax/100))*(1+(spm.serviceTax/100));
|
578 |
ourTp = amazonDetails.ourSp- amazonDetails.ourSp*(spm.commission/100+spm.emiFee/100)*(1+(spm.serviceTax/100))-(val.courierCost)*(1+(spm.serviceTax/100))*(1+(spm.serviceTax/100));
|