| Line 1367... |
Line 1367... |
| 1367 |
def getCategory(data):
|
1367 |
def getCategory(data):
|
| 1368 |
return categoryMap[data.category]
|
1368 |
return categoryMap[data.category]
|
| 1369 |
|
1369 |
|
| 1370 |
def writeReport(timestamp,autoDecreaseItems,autoIncreaseItems,previousAutoFav,nowAutoFav,runType):
|
1370 |
def writeReport(timestamp,autoDecreaseItems,autoIncreaseItems,previousAutoFav,nowAutoFav,runType):
|
| 1371 |
wbk = xlwt.Workbook()
|
1371 |
wbk = xlwt.Workbook()
|
| 1372 |
sheet = wbk.add_sheet('Can\'t Compete')
|
1372 |
sheet = wbk.add_sheet('Competiton Det.')
|
| 1373 |
xstr = lambda s: s or ""
|
1373 |
xstr = lambda s: s or ""
|
| 1374 |
heading_xf = xlwt.easyxf('font: bold on; align: wrap off, vert centre, horiz center')
|
1374 |
heading_xf = xlwt.easyxf('font: bold on; align: wrap off, vert centre, horiz center')
|
| 1375 |
|
1375 |
|
| 1376 |
excel_integer_format = '0'
|
1376 |
excel_integer_format = '0'
|
| 1377 |
integer_style = xlwt.XFStyle()
|
1377 |
integer_style = xlwt.XFStyle()
|
| Line 1462... |
Line 1462... |
| 1462 |
sheet.write(sheet_iterator, 27, amScraping.lowestFbaOffer)
|
1462 |
sheet.write(sheet_iterator, 27, amScraping.lowestFbaOffer)
|
| 1463 |
sheet.write(sheet_iterator, 28, amScraping.competitivePrice)
|
1463 |
sheet.write(sheet_iterator, 28, amScraping.competitivePrice)
|
| 1464 |
sheet.write(sheet_iterator, 29, amScraping.otherCost)
|
1464 |
sheet.write(sheet_iterator, 29, amScraping.otherCost)
|
| 1465 |
sheet.write(sheet_iterator, 30, amScraping.wanlc)
|
1465 |
sheet.write(sheet_iterator, 30, amScraping.wanlc)
|
| 1466 |
sheet.write(sheet_iterator, 31, amScraping.subsidy)
|
1466 |
sheet.write(sheet_iterator, 31, amScraping.subsidy)
|
| 1467 |
if amScraping.promotion:
|
1467 |
if amScraping.isPromotion:
|
| 1468 |
sheet.write(sheet_iterator, 32, getMsp(amScraping.item_id,amScraping.warehouseLocation))
|
1468 |
sheet.write(sheet_iterator, 32, getMsp(amScraping.item_id,amScraping.warehouseLocation))
|
| 1469 |
else:
|
1469 |
else:
|
| 1470 |
sheet.write(sheet_iterator, 32, 0.0)
|
1470 |
sheet.write(sheet_iterator, 32, 0.0)
|
| 1471 |
sheet.write(sheet_iterator, 33, amScraping.commission)
|
1471 |
sheet.write(sheet_iterator, 33, amScraping.commission)
|
| 1472 |
sheet.write(sheet_iterator, 34, amScraping.competitorCommission)
|
1472 |
sheet.write(sheet_iterator, 34, amScraping.competitorCommission)
|
| Line 1534... |
Line 1534... |
| 1534 |
sheet.write(sheet_iterator, 27, amScraping.lowestFbaOffer)
|
1534 |
sheet.write(sheet_iterator, 27, amScraping.lowestFbaOffer)
|
| 1535 |
sheet.write(sheet_iterator, 28, amScraping.competitivePrice)
|
1535 |
sheet.write(sheet_iterator, 28, amScraping.competitivePrice)
|
| 1536 |
sheet.write(sheet_iterator, 29, amScraping.otherCost)
|
1536 |
sheet.write(sheet_iterator, 29, amScraping.otherCost)
|
| 1537 |
sheet.write(sheet_iterator, 30, amScraping.wanlc)
|
1537 |
sheet.write(sheet_iterator, 30, amScraping.wanlc)
|
| 1538 |
sheet.write(sheet_iterator, 31, amScraping.subsidy)
|
1538 |
sheet.write(sheet_iterator, 31, amScraping.subsidy)
|
| 1539 |
if amScraping.promotion:
|
1539 |
if amScraping.isPromotion:
|
| 1540 |
sheet.write(sheet_iterator, 32, getMsp(amScraping.item_id,amScraping.warehouseLocation))
|
1540 |
sheet.write(sheet_iterator, 32, getMsp(amScraping.item_id,amScraping.warehouseLocation))
|
| 1541 |
else:
|
1541 |
else:
|
| 1542 |
sheet.write(sheet_iterator, 32, 0.0)
|
1542 |
sheet.write(sheet_iterator, 32, 0.0)
|
| 1543 |
sheet.write(sheet_iterator, 33, amScraping.commission)
|
1543 |
sheet.write(sheet_iterator, 33, amScraping.commission)
|
| 1544 |
sheet.write(sheet_iterator, 34, amScraping.competitorCommission)
|
1544 |
sheet.write(sheet_iterator, 34, amScraping.competitorCommission)
|
| Line 1618... |
Line 1618... |
| 1618 |
sheet.write(sheet_iterator, 27, amScraping.lowestFbaOffer)
|
1618 |
sheet.write(sheet_iterator, 27, amScraping.lowestFbaOffer)
|
| 1619 |
sheet.write(sheet_iterator, 28, amScraping.competitivePrice)
|
1619 |
sheet.write(sheet_iterator, 28, amScraping.competitivePrice)
|
| 1620 |
sheet.write(sheet_iterator, 29, amScraping.otherCost)
|
1620 |
sheet.write(sheet_iterator, 29, amScraping.otherCost)
|
| 1621 |
sheet.write(sheet_iterator, 30, amScraping.wanlc)
|
1621 |
sheet.write(sheet_iterator, 30, amScraping.wanlc)
|
| 1622 |
sheet.write(sheet_iterator, 31, amScraping.subsidy)
|
1622 |
sheet.write(sheet_iterator, 31, amScraping.subsidy)
|
| 1623 |
if amScraping.promotion:
|
1623 |
if amScraping.isPromotion:
|
| 1624 |
sheet.write(sheet_iterator, 32, getMsp(amScraping.item_id,amScraping.warehouseLocation))
|
1624 |
sheet.write(sheet_iterator, 32, getMsp(amScraping.item_id,amScraping.warehouseLocation))
|
| 1625 |
else:
|
1625 |
else:
|
| 1626 |
sheet.write(sheet_iterator, 32, 0.0)
|
1626 |
sheet.write(sheet_iterator, 32, 0.0)
|
| 1627 |
sheet.write(sheet_iterator, 33, amScraping.commission)
|
1627 |
sheet.write(sheet_iterator, 33, amScraping.commission)
|
| 1628 |
sheet.write(sheet_iterator, 34, amScraping.competitorCommission)
|
1628 |
sheet.write(sheet_iterator, 34, amScraping.competitorCommission)
|
| Line 1702... |
Line 1702... |
| 1702 |
sheet.write(sheet_iterator, 27, amScraping.lowestFbaOffer)
|
1702 |
sheet.write(sheet_iterator, 27, amScraping.lowestFbaOffer)
|
| 1703 |
sheet.write(sheet_iterator, 28, amScraping.competitivePrice)
|
1703 |
sheet.write(sheet_iterator, 28, amScraping.competitivePrice)
|
| 1704 |
sheet.write(sheet_iterator, 29, amScraping.otherCost)
|
1704 |
sheet.write(sheet_iterator, 29, amScraping.otherCost)
|
| 1705 |
sheet.write(sheet_iterator, 30, amScraping.wanlc)
|
1705 |
sheet.write(sheet_iterator, 30, amScraping.wanlc)
|
| 1706 |
sheet.write(sheet_iterator, 31, amScraping.subsidy)
|
1706 |
sheet.write(sheet_iterator, 31, amScraping.subsidy)
|
| 1707 |
if amScraping.promotion:
|
1707 |
if amScraping.isPromotion:
|
| 1708 |
sheet.write(sheet_iterator, 32, getMsp(amScraping.item_id,amScraping.warehouseLocation))
|
1708 |
sheet.write(sheet_iterator, 32, getMsp(amScraping.item_id,amScraping.warehouseLocation))
|
| 1709 |
else:
|
1709 |
else:
|
| 1710 |
sheet.write(sheet_iterator, 32, 0.0)
|
1710 |
sheet.write(sheet_iterator, 32, 0.0)
|
| 1711 |
sheet.write(sheet_iterator, 33, amScraping.commission)
|
1711 |
sheet.write(sheet_iterator, 33, amScraping.commission)
|
| 1712 |
sheet.write(sheet_iterator, 34, amScraping.competitorCommission)
|
1712 |
sheet.write(sheet_iterator, 34, amScraping.competitorCommission)
|
| Line 1832... |
Line 1832... |
| 1832 |
sheet.write(sheet_iterator, 27, '')
|
1832 |
sheet.write(sheet_iterator, 27, '')
|
| 1833 |
sheet.write(sheet_iterator, 28, '')
|
1833 |
sheet.write(sheet_iterator, 28, '')
|
| 1834 |
sheet.write(sheet_iterator, 29, amScraping.otherCost)
|
1834 |
sheet.write(sheet_iterator, 29, amScraping.otherCost)
|
| 1835 |
sheet.write(sheet_iterator, 30, amScraping.wanlc)
|
1835 |
sheet.write(sheet_iterator, 30, amScraping.wanlc)
|
| 1836 |
sheet.write(sheet_iterator, 31, amScraping.subsidy)
|
1836 |
sheet.write(sheet_iterator, 31, amScraping.subsidy)
|
| 1837 |
if amScraping.promotion:
|
1837 |
if amScraping.isPromotion:
|
| 1838 |
sheet.write(sheet_iterator, 32, getMsp(amScraping.item_id,amScraping.warehouseLocation))
|
1838 |
sheet.write(sheet_iterator, 32, getMsp(amScraping.item_id,amScraping.warehouseLocation))
|
| 1839 |
else:
|
1839 |
else:
|
| 1840 |
sheet.write(sheet_iterator, 32, 0.0)
|
1840 |
sheet.write(sheet_iterator, 32, 0.0)
|
| 1841 |
sheet.write(sheet_iterator, 33, amScraping.commission)
|
1841 |
sheet.write(sheet_iterator, 33, amScraping.commission)
|
| 1842 |
sheet.write(sheet_iterator, 34, amScraping.competitorCommission)
|
1842 |
sheet.write(sheet_iterator, 34, amScraping.competitorCommission)
|
| Line 1959... |
Line 1959... |
| 1959 |
sheet.write(sheet_iterator, 27, '')
|
1959 |
sheet.write(sheet_iterator, 27, '')
|
| 1960 |
sheet.write(sheet_iterator, 28, '')
|
1960 |
sheet.write(sheet_iterator, 28, '')
|
| 1961 |
sheet.write(sheet_iterator, 29, amScraping.otherCost)
|
1961 |
sheet.write(sheet_iterator, 29, amScraping.otherCost)
|
| 1962 |
sheet.write(sheet_iterator, 30, amScraping.wanlc)
|
1962 |
sheet.write(sheet_iterator, 30, amScraping.wanlc)
|
| 1963 |
sheet.write(sheet_iterator, 31, amScraping.subsidy)
|
1963 |
sheet.write(sheet_iterator, 31, amScraping.subsidy)
|
| 1964 |
if amScraping.promotion:
|
1964 |
if amScraping.isPromotion:
|
| 1965 |
sheet.write(sheet_iterator, 32, getMsp(amScraping.item_id,amScraping.warehouseLocation))
|
1965 |
sheet.write(sheet_iterator, 32, getMsp(amScraping.item_id,amScraping.warehouseLocation))
|
| 1966 |
else:
|
1966 |
else:
|
| 1967 |
sheet.write(sheet_iterator, 32, 0.0)
|
1967 |
sheet.write(sheet_iterator, 32, 0.0)
|
| 1968 |
sheet.write(sheet_iterator, 33, amScraping.commission)
|
1968 |
sheet.write(sheet_iterator, 33, amScraping.commission)
|
| 1969 |
sheet.write(sheet_iterator, 34, amScraping.competitorCommission)
|
1969 |
sheet.write(sheet_iterator, 34, amScraping.competitorCommission)
|