Opening cash is US$150,000 and the reserve is US$50,000. Committed weekly flows net confirmed collections against payroll, rent, taxes and loan service. The US$64,000 receipt sits in week 2 unless you move it. Late fees, the staging fee, the premium for ordering later and credit interest are paid in cash in the week they apply, so they lower closing cash; the early-payment discount reduces that week's payment. The one cost that is not a cash payment is an estimate of the margin lost by deferring the order beyond week six.
Method. The six weeks form a chain. Between weeks Qelly carries the closing cash and which decisions are still open. Multiplying the weekly constraint tables once with ordinary arithmetic counts every plan that never dips below the reserve; doing it again in min-plus arithmetic returns the cheapest one. An independent replay then re-adds the chosen plan week by week. This is dynamic programming written as a tensor-network contraction, so the same instance also exports to MILP, QUBO, Ising and CQM formats for other solvers.