diff --git a/front/src/routes/facturas/nueva/+page.svelte b/front/src/routes/facturas/nueva/+page.svelte index a1d8e83..3253dbb 100644 --- a/front/src/routes/facturas/nueva/+page.svelte +++ b/front/src/routes/facturas/nueva/+page.svelte @@ -4,6 +4,7 @@ Accordion, AccordionItem, Button, + Checkbox, InlineNotification, NumberInput, Select, @@ -48,6 +49,7 @@ id: number; repuestoId: number; cantidad: number; + bloqueado?: boolean; } let nextItemId = $state(1); let items = $state([{ id: 0, repuestoId: 0, cantidad: 1 }]); @@ -158,7 +160,7 @@ if (r.cliente_id) clienteId = r.cliente_id; if (r.almacen_id) almacenId = r.almacen_id; if (r.repuesto_id) { - items = [{ id: 0, repuestoId: r.repuesto_id, cantidad: r.cantidad || 1 }]; + items = [{ id: 0, repuestoId: r.repuesto_id, cantidad: r.cantidad || 1, bloqueado: true }]; } } @@ -275,10 +277,10 @@ : ''} class="min-w-64 flex-1 border-none bg-transparent px-3 py-2 text-sm focus:border-transparent focus:ring-0" /> - - +
@@ -307,7 +309,7 @@

Almacén

- {#each almacenes as a (a.id)} @@ -325,9 +327,9 @@ {#if cell.key === 'producto'} - + {:else if cell.key === 'cantidad'} - + {:else if cell.key === 'precioUnitario'} quitarItem(row.id)} + disabled={!!row.bloqueado} /> {/if} @@ -393,10 +396,7 @@
- +
@@ -404,10 +404,7 @@
- + {#if registrarPago}