Skip to content

Commit

Permalink
MAJOR CHANGE: Split storage billing into Base Storage and Additional …
Browse files Browse the repository at this point in the history
…Storage. BASE_STORAGE_SIZE global added to billing_common.py.

Moved function rowcol_to_a1_cell() from gen_notifs.py to billing_common.py.
Started to remove some commented-out code from the xlrd library
  • Loading branch information
bettingr committed Mar 5, 2024
1 parent 406f763 commit 5eac007
Show file tree
Hide file tree
Showing 3 changed files with 431 additions and 249 deletions.
18 changes: 17 additions & 1 deletion billing_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@
# What is the discount rate for travel hours?
CONSULTING_TRAVEL_RATE_DISCOUNT = 0.5

# Storage: How much space does the base storage rate give you, in TB?
BASE_STORAGE_SIZE = 10

#=====
#
Expand Down Expand Up @@ -456,4 +458,18 @@ def get_subdirectory(billing_root, year, month, subdir, create_if_nec=False):
print("get_subdirectory: Can't find %s" % full_subdir, file=sys.stderr)
return None

return full_subdir
return full_subdir


# This function converts a row, column pair into an Excel coordinate
def rowcol_to_a1_cell(row, col, row_absolute=False, col_absolute=False):
# return xl_rowcol_to_cell(row, col, row_absolute, col_absolute)

colstr = openpyxl.utils.cell.get_column_letter(col)
if col_absolute:
colstr = "$" + colstr
rowstr = str(row)
if row_absolute:
rowstr = "$" + rowstr

return colstr + rowstr
Loading

0 comments on commit 5eac007

Please sign in to comment.