Menu

Scheduling a supplier payment run against a cash reserve: a small search problem
📰

Scheduling a supplier payment run against a cash reserve: a small search problem

DEV Community: productivity·Tidy Cents·about 13 hours ago
#bk7FpyYi
#devtoproductivity#devto#dev#payment#date
Reading 0:00
15s threshold

PAID tool ($29 one-time), FREE DEMO with fictional data: https://gettidycents.com/product/supplier-bills-payment-run-planner

A payment run looks like a list: pay each bill by its due date. In practice it is a small constrained search:

each bill has a due date, maybe an early-payment discount until an earlier date, maybe a late penalty;

each payment has a transfer fee;

the bank balance must never drop below a reserve on any day;

receipts arrive on known (or only expected) days.

State and objective

// all money in integer cents const bill = { id : 'BB-2291' , amount : 210_790 , due : '2026-11-25' , discount : { until : '2026-11-10' , cents : 3_210 } , fee : 250 } ;

// objective, in order: // 1) never break the reserve on any day // 2) pay the least in total (amount - discounts kept + penalties + fees) // 3) among equal totals, keep more cash for longer

Enter fullscreen mode

Exit fullscreen mode

For each bill the candidate days are few (discount deadline, due date, the day after a receipt), so the…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.