Lender statement {st.lender ? "· " + st.lender : ""} · dated {st.date} · {st.units} unit{st.units === 1 ? "" : "s"} · {m$(st.totalCents)}
{st.fileName ? · {st.fileName} : null}
Matched {(cmp.counts || {}).matched || 0} unit{(cmp.counts || {}).matched === 1 ? "" : "s"}: K2B {m$(cmp.totals.matchedOursCents)} vs the lender {m$(cmp.totals.matchedStatementCents)}.
{sec("flooredFromStatement", "On the statement, NOT floored in K2B (cash in inventory the lender floors)", cmp.flooredFromStatement,
[stk, veh, { label: "Lender says owed", num: true, render: (r) => m$(r.statementCents) }, { label: "Cost", num: true, render: (r) => m$(r.costCents) }, why], "#8A4B00",
act && may && may.fromStatement ? (r) => r.canTake ?
setPick(Object.assign({}, pick, { [r.stock]: e.target.checked }))} /> take : null : null,
act && may && may.fromStatement && can.length ? (
{ const o = {}; can.forEach((x) => { o[x.stock] = true; }); setPick(o); }}>Pick all {can.length}
act.take(st.id, picked)}>Take the floored amounts from the statement ({picked.length})
No entry is posted — the books already carry the floorplan balance; the server refuses it if the list would be more than the books.
) : null)}
{sec("missingFromStatement", "Floored in K2B, NOT on the statement", cmp.missingFromStatement, [stk, veh, { label: "K2B owes", num: true, render: (r) => m$(r.owedCents) }, { label: "Lender", key: "lender" }, why], "#A02234")}
{sec("soldPayoffOwed", "Sold — the lender still carries it (payoff owed)", cmp.soldPayoffOwed, [stk, veh, { label: "Lender says owed", num: true, render: (r) => m$(r.statementCents) }, { label: "Sold", key: "soldDate" }, why], "#A02234",
act && may && may.payoff ? (r) => r.payoffCents ?
act.payoff(r.stock)}>Pay Off ▸ : null : null)}
{sec("soldPaid", "Sold and paid off in K2B — the lender still lists it", cmp.soldPaid, [stk, veh, { label: "Lender says owed", num: true, render: (r) => m$(r.statementCents) }, { label: "Paid", key: "paidDate" }, why])}
{sec("notInStock", "On the statement, not in K2B inventory", cmp.notInStock, [stk, { label: "VIN", key: "vin" }, veh, { label: "Lender says owed", num: true, render: (r) => m$(r.statementCents) }, why], "#A02234")}
{sec("amountDiff", "Amount differences", cmp.amountDiff, [stk, veh, { label: "K2B", num: true, render: (r) => m$(r.oursCents) }, { label: "Lender", num: true, render: (r) => m$(r.statementCents) }, { label: "Difference", num: true, render: (r) =>
{m$(r.diffCents)} }, why], "#A02234")}
{(cmp.counts || {}).otherLender ? sec("otherLender", "Floored with another lender (not on this statement)", cmp.otherLender, [stk, veh, { label: "Lender", key: "lender" }, { label: "K2B owes", num: true, render: (r) => m$(r.owedCents) }]) : null}
);
}
/* ═══════════════ the import review's floorplan section (rv.run.floorplan) ═══════════════ */
function FpReviewTie({ fp, go }) {
const narrow = useNarrow();
if (!fp) return null;
if (fp.error) return
As of { setAsOf(e.target.value); load(e.target.value, stmt); }} style={{ font: "inherit" }} />
Lender statement { setStmt(e.target.value); load(asOf, e.target.value); }} style={{ font: "inherit", maxWidth: narrow ? 200 : 360 }}>
the latest on file
none (books vs K2B only)
{stmts.map((s) => {s.date} · {s.lender || "lender"} · {s.units} units · {m$(s.totalCents)} )}
load(asOf, stmt)}>Refresh
go && go("uploadtool")}>Bring in a statement ▸
{err ?
{err}
: null}
{msg ?
{msg.text}
: null}
{!data && !err ?
Loading…
: null}
{data ? <>
{tile("Floored in stock", t.flooredCents, `${t.flooredUnits || 0} unit${t.flooredUnits === 1 ? "" : "s"}${t.curtailCents ? " · curtailments " + m$(t.curtailCents) : ""}`, null, "fp-t-floored")}
{tile("Sold — payoff owed", t.soldOwedCents, `${t.soldOwedUnits || 0} unit${t.soldOwedUnits === 1 ? "" : "s"}`, t.soldOwedUnits ? "#A02234" : null, "fp-t-sold")}
{tile("K2B floored list", t.listCents, "what K2B says is owed", null, "fp-t-list")}
{tile("Books (floorplan accounts)", t.glCents, "as of " + data.asOf, null, "fp-t-gl")}
{tile("Difference", t.diffCents, t.diffCents ? "books minus K2B's list" : "ties to the books", t.diffCents ? "#A02234" : "#176A38", "fp-t-diff")}
{tile("Not floored (cash)", t.notFlooredCostCents, `${t.notFlooredUnits || 0} unit${t.notFlooredUnits === 1 ? "" : "s"} at cost`, "#8A4B00", "fp-t-nf")}
The books vs K2B's floored list, by account
{(data.unreadable || []).length ?
Not readable (left out of the totals — correct them): {data.unreadable.map((u) => `${u.stock} ${u.what} "${u.value}"`).join("; ")}
: null}
{pay ? (
Pay off {pay.stock}
setPay(Object.assign({}, pay, { method: e.target.value }))} style={{ font: "inherit" }}>ACH Wire Check (printed in Check Writing)
{pay.method !== "check" ? setPay(Object.assign({}, pay, { ref: e.target.value }))} style={{ font: "inherit", width: 150 }} /> : null}
Pay the floored amount
setPay(null)}>Cancel
) : null}
{data.compare ?
: (
No lender statement {stmt === "none" ? "chosen" : "on file"}. Bring the lender's floorplan statement in with the Upload tool (destination "Floorplan statement" — the template is
Floorplan_Statement.csv ); after the owner approves it, this screen compares it unit by unit.
)}
Sold — payoff owed ({(data.soldOwed || []).length})
r.stock} empty="No payoff owed."
cols={[stk, { label: "Vehicle", key: "desc" }, { label: "Lender", key: "lender" }, { label: "Sold", key: "soldDate" }, { label: "Deal", key: "deal" }, { label: "Owed", num: true, render: (r) => m$(r.owedCents) }, { label: "Account", key: "acct" }]}
extra={data.may && data.may.payoff ? (r) => act.payoff(r.stock)}>Pay Off ▸ : null} />
Floored units in stock ({t.flooredUnits || 0})
r.stock} empty="No floored unit in stock."
cols={[stk, { label: "Vehicle", key: "desc" }, { label: "Lender", key: "lender" }, { label: "Floor date", key: "floorDate" }, { label: "Age", num: true, render: (r) => r.ageDays + "d" }, { label: "Floored", num: true, render: (r) => m$(r.advanceCents) },
{ label: "Curtailments", num: true, render: (r) => r.curtailCents ? m$(r.curtailCents) : "—" }, { label: "Owed", num: true, render: (r) => m$(r.owedCents) }, { label: "Account", key: "acct" }]} />
In stock, NOT floored — cash in inventory ({t.notFlooredUnits || 0} · {m$(t.notFlooredCostCents)} at cost)
r.stock} empty="Every unit in stock is floored."
cols={[stk, { label: "Vehicle", key: "desc" }, { label: "Type", key: "type" }, { label: "Age", num: true, render: (r) => r.ageDays + "d" }, { label: "Cost", num: true, render: (r) => m$(r.costCents) },
{ label: "Floor it", render: (r) => {data.compare && (data.compare.flooredFromStatement || []).some((x) => x.stock === r.stock) ? "the lender's statement lists it — take the amount above" : "ask your floorplan lender to advance on it"} }]} />
{data.truncated ? The longest lists show the first 400 units; every unit is in the totals.
: null}
> : null}
ESC-Close
go && go("deadmoney")}>Dead Money
go && go("reconcile")}>Reconcile Inventory
);
}
Object.assign(window, { FloorplanRecon, FpReviewTie, FpAccounts, FpCompare });
})();