Formula to automatically calculate late fees based on how overdue an invoice is

I am working on a rental event tracking platform for a venue that I manage. Coda is working brilliantly for everything that I’ve needed so far but I’m hung up on this one thing that is absolutely a “this would be nice to have but isn’t a deal-breaker” type thing: Calculating Late fees!

I have an invoices table where I track all invoices related to each event with fields such as, Due Date, Invoice Total, Processing Fee (For online payments), and Online Payment Total (which adds the processing fee to the total). My organization gives a seven day grace period after the due date before beginning to assess late fees of 0.43% of the total remaining per day. Can anyone think of a way to calculate the total late fee amount in another column based on how many days the payment is overdue?

We do invoicing through Quickbooks so it’s already automatically calculated there, but I was hoping to have a way to view that information right from Coda instead of having to log in to Quickbooks.

Thanks to this amazing community for making Coda so easily accessible and fun!!

:waving_hand: @Caitlyn_Fitzgerald

without your provision of a sample doc…
formula would be something like this:

SwitchIf((Today()-DueDate())>7, (InvoiceTotal*0.43) * (Today()-(DueDate+6)), InvoiceTotal)

In simple terms, it means If today subtract due date is greater than 7 (days), then multiply 0.43% of invoice total by number of days (i.e. Today less Due Date plus 6 days aka to start charging from), otherwise if its less than 7 days difference, show invoice total.
this formula is for example if due date is 1st, then start charging on 8th.

if you want if due date is 1st, then start charging on 7th, it would look something like this
SwitchIf((Today()-DueDate())>=7, (InvoiceTotal*0.43) * ((Today()-(DueDate+6))+1), InvoiceTotal)

the coda formula guide below is always handy :slight_smile:

hope this helps! and let us know how you go :slight_smile:
cheers!
Mel