| Line 1494... |
Line 1494... |
| 1494 |
sheet.write(0, 44, "Sales History", heading_xf)
|
1494 |
sheet.write(0, 44, "Sales History", heading_xf)
|
| 1495 |
sheet.write(0, 45, "Last 30 days sale", heading_xf)
|
1495 |
sheet.write(0, 45, "Last 30 days sale", heading_xf)
|
| 1496 |
sheet.write(0, 46, "No of days InStock in last 30 days", heading_xf)
|
1496 |
sheet.write(0, 46, "No of days InStock in last 30 days", heading_xf)
|
| 1497 |
sheet.write(0, 47, "Avg 30 Days Sale", heading_xf)
|
1497 |
sheet.write(0, 47, "Avg 30 Days Sale", heading_xf)
|
| 1498 |
sheet.write(0, 48, "Last OOS Date", heading_xf)
|
1498 |
sheet.write(0, 48, "Last OOS Date", heading_xf)
|
| 1499 |
sheet.write(0, 49, "Total Days Since InStock (Excluding Today)", heading_xf)
|
1499 |
sheet.write(0, 49, "Total Sale Since InStock (Excluding Today)", heading_xf)
|
| 1500 |
sheet.write(0, 50, "Total Sale Since InStock (Excluding Today)", heading_xf)
|
1500 |
sheet.write(0, 50, "Total Days Since InStock (Excluding Today)", heading_xf)
|
| 1501 |
sheet.write(0, 51, "Avg Sale Since InStock (Excluding Today)", heading_xf)
|
1501 |
sheet.write(0, 51, "Avg Sale Since InStock (Excluding Today)", heading_xf)
|
| 1502 |
sheet.write(0, 52, "Todays Sale Snapshot Time", heading_xf)
|
1502 |
sheet.write(0, 52, "Todays Sale Snapshot Time", heading_xf)
|
| 1503 |
sheet.write(0, 53, "Todays Sale", heading_xf)
|
1503 |
sheet.write(0, 53, "Todays Sale", heading_xf)
|
| 1504 |
sheet.write(0, 54, "Decision", heading_xf)
|
1504 |
sheet.write(0, 54, "Decision", heading_xf)
|
| 1505 |
sheet.write(0, 55, "Reason", heading_xf)
|
1505 |
sheet.write(0, 55, "Reason", heading_xf)
|
| Line 1727... |
Line 1727... |
| 1727 |
sheet.write(sheet_iterator, 48, 'No History available')
|
1727 |
sheet.write(sheet_iterator, 48, 'No History available')
|
| 1728 |
else:
|
1728 |
else:
|
| 1729 |
sheet.write(sheet_iterator, 48, str(to_py_date(inStockStats[0].dateOfSale).date()))
|
1729 |
sheet.write(sheet_iterator, 48, str(to_py_date(inStockStats[0].dateOfSale).date()))
|
| 1730 |
sheet.write(sheet_iterator, 49, str(inStockStats[1]))
|
1730 |
sheet.write(sheet_iterator, 49, str(inStockStats[1]))
|
| 1731 |
sheet.write(sheet_iterator, 50, str(inStockStats[2]))
|
1731 |
sheet.write(sheet_iterator, 50, str(inStockStats[2]))
|
| 1732 |
sheet.write(sheet_iterator, 51, getAvgSale(inStockStats[1], inStockStats[2]))
|
1732 |
sheet.write(sheet_iterator, 51, getAvgSale(inStockStats[2], inStockStats[1]))
|
| 1733 |
toDaysSale = getTodaysSale(sku)
|
1733 |
toDaysSale = getTodaysSale(sku)
|
| 1734 |
sheet.write(sheet_iterator, 52, toDaysSale[0])
|
1734 |
sheet.write(sheet_iterator, 52, toDaysSale[0])
|
| 1735 |
sheet.write(sheet_iterator, 53, str(toDaysSale[1]))
|
1735 |
sheet.write(sheet_iterator, 53, str(toDaysSale[1]))
|
| 1736 |
|
1736 |
|
| 1737 |
#sheet.write(sheet_iterator, 44, round(amScraping.proposedSp - getNewLowestPossibleSp(amScraping,12.36,getNewVatRate(amScraping.item_id,amScraping.warehouseLocation,amScraping.proposedSp))))
|
1737 |
#sheet.write(sheet_iterator, 44, round(amScraping.proposedSp - getNewLowestPossibleSp(amScraping,12.36,getNewVatRate(amScraping.item_id,amScraping.warehouseLocation,amScraping.proposedSp))))
|
| Line 1822... |
Line 1822... |
| 1822 |
sheet.write(sheet_iterator, 48, 'No History available')
|
1822 |
sheet.write(sheet_iterator, 48, 'No History available')
|
| 1823 |
else:
|
1823 |
else:
|
| 1824 |
sheet.write(sheet_iterator, 48, str(to_py_date(inStockStats[0].dateOfSale).date()))
|
1824 |
sheet.write(sheet_iterator, 48, str(to_py_date(inStockStats[0].dateOfSale).date()))
|
| 1825 |
sheet.write(sheet_iterator, 49, str(inStockStats[1]))
|
1825 |
sheet.write(sheet_iterator, 49, str(inStockStats[1]))
|
| 1826 |
sheet.write(sheet_iterator, 50, str(inStockStats[2]))
|
1826 |
sheet.write(sheet_iterator, 50, str(inStockStats[2]))
|
| 1827 |
sheet.write(sheet_iterator, 51, getAvgSale(inStockStats[1], inStockStats[2]))
|
1827 |
sheet.write(sheet_iterator, 51, getAvgSale(inStockStats[2], inStockStats[1]))
|
| 1828 |
toDaysSale = getTodaysSale(sku)
|
1828 |
toDaysSale = getTodaysSale(sku)
|
| 1829 |
sheet.write(sheet_iterator, 52, toDaysSale[0])
|
1829 |
sheet.write(sheet_iterator, 52, toDaysSale[0])
|
| 1830 |
sheet.write(sheet_iterator, 53, str(toDaysSale[1]))
|
1830 |
sheet.write(sheet_iterator, 53, str(toDaysSale[1]))
|
| 1831 |
if amScraping.decision is None:
|
1831 |
if amScraping.decision is None:
|
| 1832 |
sheet.write(sheet_iterator, 54, 'Auto Pricing Inactive')
|
1832 |
sheet.write(sheet_iterator, 54, 'Auto Pricing Inactive')
|
| Line 1928... |
Line 1928... |
| 1928 |
sheet.write(sheet_iterator, 48, 'No History available')
|
1928 |
sheet.write(sheet_iterator, 48, 'No History available')
|
| 1929 |
else:
|
1929 |
else:
|
| 1930 |
sheet.write(sheet_iterator, 48, str(to_py_date(inStockStats[0].dateOfSale).date()))
|
1930 |
sheet.write(sheet_iterator, 48, str(to_py_date(inStockStats[0].dateOfSale).date()))
|
| 1931 |
sheet.write(sheet_iterator, 49, str(inStockStats[1]))
|
1931 |
sheet.write(sheet_iterator, 49, str(inStockStats[1]))
|
| 1932 |
sheet.write(sheet_iterator, 50, str(inStockStats[2]))
|
1932 |
sheet.write(sheet_iterator, 50, str(inStockStats[2]))
|
| 1933 |
sheet.write(sheet_iterator, 51, getAvgSale(inStockStats[1], inStockStats[2]))
|
1933 |
sheet.write(sheet_iterator, 51, getAvgSale(inStockStats[2], inStockStats[1]))
|
| 1934 |
toDaysSale = getTodaysSale(sku)
|
1934 |
toDaysSale = getTodaysSale(sku)
|
| 1935 |
sheet.write(sheet_iterator, 52, toDaysSale[0])
|
1935 |
sheet.write(sheet_iterator, 52, toDaysSale[0])
|
| 1936 |
sheet.write(sheet_iterator, 53, str(toDaysSale[1]))
|
1936 |
sheet.write(sheet_iterator, 53, str(toDaysSale[1]))
|
| 1937 |
if amScraping.decision is None:
|
1937 |
if amScraping.decision is None:
|
| 1938 |
sheet.write(sheet_iterator, 54, 'Auto Pricing Inactive')
|
1938 |
sheet.write(sheet_iterator, 54, 'Auto Pricing Inactive')
|
| Line 2034... |
Line 2034... |
| 2034 |
sheet.write(sheet_iterator, 48, 'No History available')
|
2034 |
sheet.write(sheet_iterator, 48, 'No History available')
|
| 2035 |
else:
|
2035 |
else:
|
| 2036 |
sheet.write(sheet_iterator, 48, str(to_py_date(inStockStats[0].dateOfSale).date()))
|
2036 |
sheet.write(sheet_iterator, 48, str(to_py_date(inStockStats[0].dateOfSale).date()))
|
| 2037 |
sheet.write(sheet_iterator, 49, str(inStockStats[1]))
|
2037 |
sheet.write(sheet_iterator, 49, str(inStockStats[1]))
|
| 2038 |
sheet.write(sheet_iterator, 50, str(inStockStats[2]))
|
2038 |
sheet.write(sheet_iterator, 50, str(inStockStats[2]))
|
| 2039 |
sheet.write(sheet_iterator, 51, getAvgSale(inStockStats[1], inStockStats[2]))
|
2039 |
sheet.write(sheet_iterator, 51, getAvgSale(inStockStats[2], inStockStats[1]))
|
| 2040 |
toDaysSale = getTodaysSale(sku)
|
2040 |
toDaysSale = getTodaysSale(sku)
|
| 2041 |
sheet.write(sheet_iterator, 52, toDaysSale[0])
|
2041 |
sheet.write(sheet_iterator, 52, toDaysSale[0])
|
| 2042 |
sheet.write(sheet_iterator, 53, str(toDaysSale[1]))
|
2042 |
sheet.write(sheet_iterator, 53, str(toDaysSale[1]))
|
| 2043 |
if amScraping.decision is None:
|
2043 |
if amScraping.decision is None:
|
| 2044 |
sheet.write(sheet_iterator, 54, 'Auto Pricing Inactive')
|
2044 |
sheet.write(sheet_iterator, 54, 'Auto Pricing Inactive')
|
| Line 2187... |
Line 2187... |
| 2187 |
sheet.write(sheet_iterator, 48, 'No History available')
|
2187 |
sheet.write(sheet_iterator, 48, 'No History available')
|
| 2188 |
else:
|
2188 |
else:
|
| 2189 |
sheet.write(sheet_iterator, 48, str(to_py_date(inStockStats[0].dateOfSale).date()))
|
2189 |
sheet.write(sheet_iterator, 48, str(to_py_date(inStockStats[0].dateOfSale).date()))
|
| 2190 |
sheet.write(sheet_iterator, 49, str(inStockStats[1]))
|
2190 |
sheet.write(sheet_iterator, 49, str(inStockStats[1]))
|
| 2191 |
sheet.write(sheet_iterator, 50, str(inStockStats[2]))
|
2191 |
sheet.write(sheet_iterator, 50, str(inStockStats[2]))
|
| 2192 |
sheet.write(sheet_iterator, 51, getAvgSale(inStockStats[1], inStockStats[2]))
|
2192 |
sheet.write(sheet_iterator, 51, getAvgSale(inStockStats[2], inStockStats[1]))
|
| 2193 |
toDaysSale = getTodaysSale(sku)
|
2193 |
toDaysSale = getTodaysSale(sku)
|
| 2194 |
sheet.write(sheet_iterator, 52, toDaysSale[0])
|
2194 |
sheet.write(sheet_iterator, 52, toDaysSale[0])
|
| 2195 |
sheet.write(sheet_iterator, 53, str(toDaysSale[1]))
|
2195 |
sheet.write(sheet_iterator, 53, str(toDaysSale[1]))
|
| 2196 |
if amScraping.decision is None:
|
2196 |
if amScraping.decision is None:
|
| 2197 |
sheet.write(sheet_iterator, 54, 'Auto Pricing Inactive')
|
2197 |
sheet.write(sheet_iterator, 54, 'Auto Pricing Inactive')
|
| Line 2295... |
Line 2295... |
| 2295 |
sheet.write(sheet_iterator, 48, 'No History available')
|
2295 |
sheet.write(sheet_iterator, 48, 'No History available')
|
| 2296 |
else:
|
2296 |
else:
|
| 2297 |
sheet.write(sheet_iterator, 48, str(to_py_date(inStockStats[0].dateOfSale).date()))
|
2297 |
sheet.write(sheet_iterator, 48, str(to_py_date(inStockStats[0].dateOfSale).date()))
|
| 2298 |
sheet.write(sheet_iterator, 49, str(inStockStats[1]))
|
2298 |
sheet.write(sheet_iterator, 49, str(inStockStats[1]))
|
| 2299 |
sheet.write(sheet_iterator, 50, str(inStockStats[2]))
|
2299 |
sheet.write(sheet_iterator, 50, str(inStockStats[2]))
|
| 2300 |
sheet.write(sheet_iterator, 51, getAvgSale(inStockStats[1], inStockStats[2]))
|
2300 |
sheet.write(sheet_iterator, 51, getAvgSale(inStockStats[2], inStockStats[1]))
|
| 2301 |
toDaysSale = getTodaysSale(sku)
|
2301 |
toDaysSale = getTodaysSale(sku)
|
| 2302 |
sheet.write(sheet_iterator, 52, toDaysSale[0])
|
2302 |
sheet.write(sheet_iterator, 52, toDaysSale[0])
|
| 2303 |
sheet.write(sheet_iterator, 53, str(toDaysSale[1]))
|
2303 |
sheet.write(sheet_iterator, 53, str(toDaysSale[1]))
|
| 2304 |
sheet.write(sheet_iterator, 54, 'AUTO_INCREMENT_FAILED')
|
2304 |
sheet.write(sheet_iterator, 54, 'AUTO_INCREMENT_FAILED')
|
| 2305 |
if amScraping.exceptionType==3:
|
2305 |
if amScraping.exceptionType==3:
|
| Line 2436... |
Line 2436... |
| 2436 |
sheet.write(sheet_iterator, 48, 'No History available')
|
2436 |
sheet.write(sheet_iterator, 48, 'No History available')
|
| 2437 |
else:
|
2437 |
else:
|
| 2438 |
sheet.write(sheet_iterator, 48, str(to_py_date(inStockStats[0].dateOfSale).date()))
|
2438 |
sheet.write(sheet_iterator, 48, str(to_py_date(inStockStats[0].dateOfSale).date()))
|
| 2439 |
sheet.write(sheet_iterator, 49, str(inStockStats[1]))
|
2439 |
sheet.write(sheet_iterator, 49, str(inStockStats[1]))
|
| 2440 |
sheet.write(sheet_iterator, 50, str(inStockStats[2]))
|
2440 |
sheet.write(sheet_iterator, 50, str(inStockStats[2]))
|
| 2441 |
sheet.write(sheet_iterator, 51, getAvgSale(inStockStats[1], inStockStats[2]))
|
2441 |
sheet.write(sheet_iterator, 51, getAvgSale(inStockStats[2], inStockStats[1]))
|
| 2442 |
toDaysSale = getTodaysSale(sku)
|
2442 |
toDaysSale = getTodaysSale(sku)
|
| 2443 |
sheet.write(sheet_iterator, 52, toDaysSale[0])
|
2443 |
sheet.write(sheet_iterator, 52, toDaysSale[0])
|
| 2444 |
sheet.write(sheet_iterator, 53, str(toDaysSale[1]))
|
2444 |
sheet.write(sheet_iterator, 53, str(toDaysSale[1]))
|
| 2445 |
sheet.write(sheet_iterator, 56, getInventoryMovementStatus(amScraping))
|
2445 |
sheet.write(sheet_iterator, 56, getInventoryMovementStatus(amScraping))
|
| 2446 |
sheet_iterator+=1
|
2446 |
sheet_iterator+=1
|
| Line 2528... |
Line 2528... |
| 2528 |
sheet.write(sheet_iterator, 18, 'No History available')
|
2528 |
sheet.write(sheet_iterator, 18, 'No History available')
|
| 2529 |
else:
|
2529 |
else:
|
| 2530 |
sheet.write(sheet_iterator, 18, str(to_py_date(inStockStats[0].dateOfSale).date()))
|
2530 |
sheet.write(sheet_iterator, 18, str(to_py_date(inStockStats[0].dateOfSale).date()))
|
| 2531 |
sheet.write(sheet_iterator, 19, str(inStockStats[1]))
|
2531 |
sheet.write(sheet_iterator, 19, str(inStockStats[1]))
|
| 2532 |
sheet.write(sheet_iterator, 20, str(inStockStats[2]))
|
2532 |
sheet.write(sheet_iterator, 20, str(inStockStats[2]))
|
| 2533 |
sheet.write(sheet_iterator, 21, getAvgSale(inStockStats[1], inStockStats[2]))
|
2533 |
sheet.write(sheet_iterator, 21, getAvgSale(inStockStats[2], inStockStats[1]))
|
| 2534 |
toDaysSale = getTodaysSale(sku)
|
2534 |
toDaysSale = getTodaysSale(sku)
|
| 2535 |
sheet.write(sheet_iterator, 22, toDaysSale[0])
|
2535 |
sheet.write(sheet_iterator, 22, toDaysSale[0])
|
| 2536 |
sheet.write(sheet_iterator, 23, str(toDaysSale[1]))
|
2536 |
sheet.write(sheet_iterator, 23, str(toDaysSale[1]))
|
| 2537 |
sheet.write(sheet_iterator, 24, getInventoryMovementStatus(amScraping))
|
2537 |
sheet.write(sheet_iterator, 24, getInventoryMovementStatus(amScraping))
|
| 2538 |
sheet.write(sheet_iterator, 25, amScraping.reason)
|
2538 |
sheet.write(sheet_iterator, 25, amScraping.reason)
|