Total Sums are now colored on Summary Sheet. Made changes to Production cost and Adjustment columns in Summary Tab. Now pulls in Item cost from Item Detail tab and sums all production charges in the order. Adjustment is balance due - production - shipping. This matches the original SFU. Minus column widths not being autoset(I'm still researching this) it seems to be on par with the original version.

This commit is contained in:
Dan Dembinski
2019-06-28 11:21:49 -04:00
parent f58ccd9896
commit a287e7386f
2 changed files with 13 additions and 8 deletions

View File

@@ -159,15 +159,20 @@ def Run_Report(ticket, URL, HOST, REPORT_FIELDS, wb, ws, ws2, DETAIL_REPORT_FIEL
ws.cell(column=6, row=count+1, value=x)
count = count + 1
# Compute Production Charges and write to spreadsheet
# Production and Adjustment Charges
count = 1
for row in ws:
if count != 1:
value = "=H" + str(count) + "-G" + str(count) + "-F" + str(count)
# value = "=SUMIF(A:A,'Item Detail'!A:A,'Item Detail'!H:H)"
value = "=SUMIF('item Detail'!A:A,A" + str(count) + ",'Item Detail'!H:H)"
ws.cell(column=5, row=count, value=value)
value = "=H" + str(count) + "-E" + str(count) + "-F" + str(count)
ws.cell(column=7, row=count, value = value)
if count < ws.max_row:
count += 1
############# Order Details tab #############
print("Getting Item Detail")