/* eslint-disable */ /* © 2026 K2B NETWORK SOLUTIONS LLC. All rights reserved. Proprietary and confidential. Unauthorized copying, distribution, or use of this file, via any medium, is strictly prohibited. Original work product. */ // JBREWS DMS — Cash Command Center. // Live operating-cash forecast from the ledger: today's bank cash, expected // inflows (CIT, warranty, factory, A/R) vs. committed outflows (payoffs, A/P, // floorplan, commissions), a 7/14/30-day net position, a "safe to spend" meter, // and a "Why did cash change?" breakdown of recent bank movement by source. const ccMoney = (n) => "$" + (Number(n) || 0).toLocaleString("en-US", { minimumFractionDigits: 0, maximumFractionDigits: 0 }); const ccMoney2 = (n) => (n < 0 ? "-$" : "$") + Math.abs(Number(n) || 0).toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 }); const CashCommand = ({ onClose, go }) => { const D = window.DMS; const [, force] = React.useReducer(n => n + 1, 0); React.useEffect(() => (D && D.subscribe) ? D.subscribe(force) : undefined, []); const [moveDays, setMoveDays] = React.useState(1); if (!D || !D.cashCommand) return null; const cc = D.cashCommand(); const mv = D.cashMovement(moveDays); const toneColor = { green: "#0E7A37", yellow: "#9A6700", red: "#B23A2E" }[cc.tone] || "#0E7A37"; const toneBg = { green: "linear-gradient(160deg,#0E7A37,#0B5C2A)", yellow: "linear-gradient(160deg,#B8860B,#8A6400)", red: "linear-gradient(160deg,#B23A2E,#8A1C1C)" }[cc.tone]; const toneWord = { green: "SAFE TO SPEND", yellow: "SPEND TIGHT", red: "DO NOT SPEND" }[cc.tone]; const Bar = ({ label, value, color }) => (