{intro}
{op === "refund" &&
{fld("amount", "Amount to pay back", { money: true, ph: (held / 100).toFixed(2) })}{fld("date", "Date", { date: true })}
{fld("method", "How", { options: (D.RECEIPT_METHODS || ["Cash", "Check", "Card", "Wire / ACH", "Other"]).map(m => [m, m === "Check" ? "Check (Check Writing)" : m]) })}
{f.method !== "Check" && fld("ref", "Reference", { ph: "optional" })}
}
{op === "product-cancel" && <>
{fld("productId", "Product", { flex: 2, options: prods.length ? prods.map(p => [p.id, `${p.name} — price ${dcx$(p.priceCents)}, cost ${dcx$(p.costCents)}`]) : [["", "No product left to cancel"]] })}
{fld("cancelDate", "Cancelled on", { date: true })}
{fld("customerRefund", "Customer refund (from the provider's form)", { money: true, ph: "0.00" })}
{fld("chargebackToDealer", "Dealer chargeback (our share)", { money: true, ph: "0.00" })}
The refund goes to
{!dcxIsCash(d) && }
>}
{op === "fund-reverse" &&
{fld("fundingId", "Funding to reverse", { options: funds.length ? funds.map(x => [x.jeId, `${x.jeId} — ${dcxD$(x.amount)}${x.ref ? " · ref " + x.ref : ""}${x.date ? " · " + x.date : ""}`]) : [["", "No lender funding on this deal"]] })}
}
{pv && !pv.overrideOnly && (
The server will do exactly this:
{(pv.steps || []).map((s, i) => - {s}
)}
{(pv.warnings || []).length > 0 &&
⚠ {pv.warnings.join(" ")}
}
{(pv.journals || []).length > 0 && (
| Entry | Account | Debit | Credit |
{pv.journals.map(j => (j.lines || []).map((l, i) => (
| {i === 0 ? j.id + (j.reverses ? " (reverses " + j.reverses + ")" : "") : ""} |
{l.acct} {l.desc || ""} |
{+l.dr ? dcxD$(l.dr) : ""} |
{+l.cr ? dcxD$(l.cr) : ""} |
)))}
)}
)}