{formData.fecha_captura}
-
+
{formData.hora_captura}
@@ -401,8 +422,10 @@
-
-
+
+
Año *
@@ -418,22 +441,22 @@
-
-
+
-
Aduana *
-
formData.customs_office = v ?? ''}
+ onValueChange={(v: string) => (formData.customs_office = v ?? '')}
>
{formData.customs_office ? formData.customs_office.substring(0, 2) : 'Sel...'}
-
+
{#if customsSections.length === 0}
No hay aduanas disponibles
@@ -441,7 +464,10 @@
{:else}
{#each customsSections as section}
-
+
{section.customs_code} - {section.section_name}
@@ -452,23 +478,23 @@
- -
+ -
Patente *
-
formData.license = v || null}
+ onValueChange={(v: string | undefined) => (formData.license = v || null)}
>
{formData.license || 'Sel...'}
-
- {@const validBrokers = customsBrokers.filter(b => b.license)}
+
+ {@const validBrokers = customsBrokers.filter((b) => b.license)}
{#if customsBrokers.length === 0}
No hay agentes aduanales registrados
@@ -481,7 +507,10 @@
{#each validBrokers as broker}
{@const displayName = broker.name || broker.broker_key || ''}
-
+
{displayName ? `${displayName} - ${broker.license}` : broker.license}
@@ -492,11 +521,13 @@
- -
+ -
- Número de Pedimento *
+ Número de Pedimento *
-
+
Clave *
-
formData.pedimento_code = v ?? ''}
+ onValueChange={(v: string) => (formData.pedimento_code = v ?? '')}
>
- {pedimentoCodes.find(o => o.code === formData.pedimento_code)?.code || 'Sel...'}
+ {pedimentoCodes.find((o) => o.code === formData.pedimento_code)?.code || 'Sel...'}
-
+
{#each pedimentoCodes as code}
@@ -552,13 +583,14 @@
Tipo de Operación *
-
formData.operation_type = v || null}
+ onValueChange={(v: string) => (formData.operation_type = v || null)}
>
- {operationOptions.find(o => o.value === formData.operation_type)?.label || 'Seleccionar...'}
+ {operationOptions.find((o) => o.value === formData.operation_type)?.label ||
+ 'Seleccionar...'}
{#each filteredOperationTypes as option}
@@ -571,11 +603,11 @@
Régimen *
- {#if hasMultipleRegimens}
- formData.regime = v ?? ''}
+ onValueChange={(v: string) => (formData.regime = v ?? '')}
>
@@ -583,9 +615,12 @@
- {#each filteredRegimens as regimen}
+ {#each filteredRegimens as regimen}
-
+
{regimen.code}
@@ -605,18 +640,18 @@
-
+
Cliente *
-
formData.client_id = v ? Number(v) : null}
+ onValueChange={(v: string) => (formData.client_id = v ? Number(v) : null)}
>
- {clients.find(c => c.id === formData.client_id)?.name || 'Seleccionar cliente...'}
+ {clients.find((c) => c.id === formData.client_id)?.name || 'Seleccionar cliente...'}
@@ -627,7 +662,10 @@
{:else}
{#each clients as client}
-
+
{client.name}
@@ -640,13 +678,14 @@
Tipo de Pedimento *
- formData.pedimento_type = v ?? ''}
+ onValueChange={(v: string) => (formData.pedimento_type = v ?? '')}
>
- {pedimentoTypeOptions.find(o => o.value === formData.pedimento_type)?.label || 'Seleccionar...'}
+ {pedimentoTypeOptions.find((o) => o.value === formData.pedimento_type)?.label ||
+ 'Seleccionar...'}
{#each pedimentoTypeOptions as option}
@@ -655,12 +694,9 @@
-
-
-
-
+
-
-
-
activeSection = 'fechas'}
- data-state={activeSection === 'fechas' ? 'active' : ''}
- class="inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 cursor-pointer hover:bg-background/50 data-[state=active]:border data-[state=active]:border-white/60 data-[state=active]:text-foreground"
+
+
- Fechas
-
- activeSection = 'incrementables'}
- data-state={activeSection === 'incrementables' ? 'active' : ''}
- class="inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 cursor-pointer hover:bg-background/50 data-[state=active]:border data-[state=active]:border-white/60 data-[state=active]:text-foreground"
- >
- Incrementables
-
- activeSection = 'identificadores'}
- data-state={activeSection === 'identificadores' ? 'active' : ''}
- class="inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 cursor-pointer hover:bg-background/50 data-[state=active]:border data-[state=active]:border-white/60 data-[state=active]:text-foreground"
- >
- Identificadores
-
- activeSection = 'indices'}
- data-state={activeSection === 'indices' ? 'active' : ''}
- class="inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 cursor-pointer hover:bg-background/50 data-[state=active]:border data-[state=active]:border-white/60 data-[state=active]:text-foreground"
- >
- Indices
-
- activeSection = 'adicional'}
- data-state={activeSection === 'adicional' ? 'active' : ''}
- class="inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 cursor-pointer hover:bg-background/50 data-[state=active]:border data-[state=active]:border-white/60 data-[state=active]:text-foreground"
- >
- Adicional
-
- activeSection = 'decrementable'}
- data-state={activeSection === 'decrementable' ? 'active' : ''}
- class="inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 cursor-pointer hover:bg-background/50 data-[state=active]:border data-[state=active]:border-white/60 data-[state=active]:text-foreground"
- >
- Decrementable
-
+ (activeSection = 'fechas')}
+ data-state={activeSection === 'fechas' ? 'active' : ''}
+ class="inline-flex cursor-pointer items-center justify-center rounded-sm px-3 py-1.5 text-sm font-medium whitespace-nowrap ring-offset-background transition-all hover:bg-background/50 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:outline-none data-[state=active]:border data-[state=active]:border-white/60 data-[state=active]:text-foreground"
+ >
+ Fechas
+
+ (activeSection = 'incrementables')}
+ data-state={activeSection === 'incrementables' ? 'active' : ''}
+ class="inline-flex cursor-pointer items-center justify-center rounded-sm px-3 py-1.5 text-sm font-medium whitespace-nowrap ring-offset-background transition-all hover:bg-background/50 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:outline-none data-[state=active]:border data-[state=active]:border-white/60 data-[state=active]:text-foreground"
+ >
+ Incrementables
+
+ (activeSection = 'identificadores')}
+ data-state={activeSection === 'identificadores' ? 'active' : ''}
+ class="inline-flex cursor-pointer items-center justify-center rounded-sm px-3 py-1.5 text-sm font-medium whitespace-nowrap ring-offset-background transition-all hover:bg-background/50 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:outline-none data-[state=active]:border data-[state=active]:border-white/60 data-[state=active]:text-foreground"
+ >
+ Identificadores
+
+ (activeSection = 'indices')}
+ data-state={activeSection === 'indices' ? 'active' : ''}
+ class="inline-flex cursor-pointer items-center justify-center rounded-sm px-3 py-1.5 text-sm font-medium whitespace-nowrap ring-offset-background transition-all hover:bg-background/50 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:outline-none data-[state=active]:border data-[state=active]:border-white/60 data-[state=active]:text-foreground"
+ >
+ Indices
+
+ (activeSection = 'adicional')}
+ data-state={activeSection === 'adicional' ? 'active' : ''}
+ class="inline-flex cursor-pointer items-center justify-center rounded-sm px-3 py-1.5 text-sm font-medium whitespace-nowrap ring-offset-background transition-all hover:bg-background/50 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:outline-none data-[state=active]:border data-[state=active]:border-white/60 data-[state=active]:text-foreground"
+ >
+ Adicional
+
+ (activeSection = 'decrementable')}
+ data-state={activeSection === 'decrementable' ? 'active' : ''}
+ class="inline-flex cursor-pointer items-center justify-center rounded-sm px-3 py-1.5 text-sm font-medium whitespace-nowrap ring-offset-background transition-all hover:bg-background/50 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:outline-none data-[state=active]:border data-[state=active]:border-white/60 data-[state=active]:text-foreground"
+ >
+ Decrementable
+
+
-
{#if activeSection === 'fechas'}
-
{:else if activeSection === 'incrementables'}
-
- Factor: 1.00000
-
+
Factor: 1.00000
-
-
-
- Valor Seguro
-
-
-
-
-
- Embalajes
-
-
-
-
-
- Fletes
-
-
-
-
-
- Deducibles
-
-
-
-
-
- Moneda
-
-
-
-
-
{:else if activeSection === 'identificadores'}
{:else if activeSection === 'indices'}
-
+
Tipo de Factor a Actualizar
-
formData.tipo_factor = v ?? ''}
+ onValueChange={(v: string) => (formData.tipo_factor = v ?? '')}
>
- {formData.tipo_factor === 'INPC' ? 'I.N.P.C' : formData.tipo_factor === 'variacion_cambiaria' ? 'Variación Cambiaria' : 'Seleccionar'}
+ {formData.tipo_factor === 'INPC'
+ ? 'I.N.P.C'
+ : formData.tipo_factor === 'variacion_cambiaria'
+ ? 'Variación Cambiaria'
+ : 'Seleccionar'}
@@ -998,7 +994,7 @@
Checkbox
-
+
{:else if activeSection === 'adicional'}
-
+
Año para la Impresión del Pedimento
@@ -1023,14 +1019,14 @@
bind:value={formData.anio_impresion}
placeholder="25"
maxlength={2}
- class="text-center w-40 focus-visible:ring-0 focus-visible:ring-offset-0"
+ class="w-40 text-center focus-visible:ring-0 focus-visible:ring-offset-0"
/>