cost and price

This commit is contained in:
2026-03-14 23:23:43 -05:00
parent 9d233a0c3d
commit c21f7c2cee
10 changed files with 33 additions and 0 deletions

View File

@@ -71,6 +71,7 @@ export function InventoryFormPage({ mode }: InventoryFormPageProps) {
isSellable: item.isSellable,
isPurchasable: item.isPurchasable,
defaultCost: item.defaultCost,
defaultPrice: item.defaultPrice,
notes: item.notes,
bomLines: item.bomLines.map((line) => ({
componentItemId: line.componentItemId,
@@ -199,6 +200,17 @@ export function InventoryFormPage({ mode }: InventoryFormPageProps) {
className="w-full rounded-2xl border border-line/70 bg-page px-2 py-2 text-text outline-none transition focus:border-brand"
/>
</label>
<label className="block">
<span className="mb-2 block text-sm font-semibold text-text">Default price</span>
<input
type="number"
min={0}
step={0.01}
value={form.defaultPrice ?? ""}
onChange={(event) => updateField("defaultPrice", event.target.value === "" ? null : Number(event.target.value))}
className="w-full rounded-2xl border border-line/70 bg-page px-2 py-2 text-text outline-none transition focus:border-brand"
/>
</label>
</div>
<div className="grid gap-3 xl:grid-cols-4">
<label className="block">