mirror of
https://github.com/renee-png/acmcc.git
synced 2026-06-21 01:40:01 +00:00
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:
@@ -594,7 +594,7 @@ export default function UnitLedgerTransactionForm({ open, onOpenChange, unitId:
|
||||
<Label>Total Amount <span className="text-destructive">*</span></Label>
|
||||
<div className="relative">
|
||||
<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>
|
||||
{formData.type === "Charge" && formData.chargeType === "interest" && feeRules && (
|
||||
|
||||
Reference in New Issue
Block a user