Unit ledger: let amount input accept $0.00

The amount field had min="0.01", so the browser's native form validation
blocked a $0.00 charge before the JS check ran. Lower to min="0" so a $0.00
charge/note can be submitted; the JS still restricts $0 to charge-type
entries (payments require a positive amount).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-07 17:22:07 -04:00
parent 3f39bfbd70
commit 6932c5acbb
@@ -594,7 +594,7 @@ export default function UnitLedgerTransactionForm({ open, onOpenChange, unitId:
<Label>Total Amount <span className="text-destructive">*</span></Label> <Label>Total Amount <span className="text-destructive">*</span></Label>
<div className="relative"> <div className="relative">
<DollarSign className="absolute left-3 top-2.5 h-4 w-4 text-muted-foreground" /> <DollarSign className="absolute left-3 top-2.5 h-4 w-4 text-muted-foreground" />
<Input name="amount" type="number" step="0.01" min="0.01" required placeholder="0.00" value={formData.amount} onChange={handleChange} disabled={fieldsDisabled} className="pl-8 h-10 font-mono" /> <Input name="amount" type="number" step="0.01" min="0" required placeholder="0.00" value={formData.amount} onChange={handleChange} disabled={fieldsDisabled} className="pl-8 h-10 font-mono" />
</div> </div>
</div> </div>
{formData.type === "Charge" && formData.chargeType === "interest" && feeRules && ( {formData.type === "Charge" && formData.chargeType === "interest" && feeRules && (