diff --git a/backend/Dockerfile b/backend/Dockerfile index f6253da3..6f6a9c20 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -2,12 +2,6 @@ FROM python:3.11-slim WORKDIR /app -# ======================================== -# ARG para recibir la versión desde CI/CD -# ======================================== -ARG APP_VERSION="dev" -ENV APP_VERSION=${APP_VERSION} - # Instalar dependencias del sistema RUN apt-get update && apt-get install -y \ gcc \ @@ -32,7 +26,9 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* # Instalar wkhtmltopdf binario oficial con soporte para footers/headers -RUN curl -k -L -o /tmp/wkhtmltox.deb https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.bookworm_amd64.deb \ +# TARGETARCH permite amd64 y arm64 (Apple Silicon) +ARG TARGETARCH +RUN curl -k -L -o /tmp/wkhtmltox.deb "https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.bookworm_${TARGETARCH}.deb" \ && apt-get update \ && apt-get install -y /tmp/wkhtmltox.deb \ && rm /tmp/wkhtmltox.deb \ diff --git a/backend/api/v1/modules/a76/parts/models.py b/backend/api/v1/modules/a76/parts/models.py index 3fd9bd1e..27ba357f 100644 --- a/backend/api/v1/modules/a76/parts/models.py +++ b/backend/api/v1/modules/a76/parts/models.py @@ -26,6 +26,7 @@ from api.v1.modules.public.reference_data.currency_types.models import CurrencyT from api.v1.modules.a24.fa.fa_parts.models import FaPart from api.v1.modules.a24.inv.inv_parts.models import InvPart from api.v1.modules.a24.inv.bom.models import BillOfMaterial +from api.v1.modules.a24.inv.part_countries.models import PartCountry if TYPE_CHECKING: @@ -33,7 +34,6 @@ if TYPE_CHECKING: from api.v1.modules.a76.general_catalogs.units_of_measure.models import ( UnitOfMeasure, ) - from api.v1.modules.a24.inv.part_countries.models import PartCountry class Part(Base, TenantScopedMixin, TimestampMixin): diff --git a/frontend/src/lib/api/dashboard/a76/parts.ts b/frontend/src/lib/api/dashboard/a76/parts.ts index 88ab372f..ece9c57b 100644 --- a/frontend/src/lib/api/dashboard/a76/parts.ts +++ b/frontend/src/lib/api/dashboard/a76/parts.ts @@ -66,6 +66,12 @@ export interface InvData { use_rule_8?: boolean | null; fraction_9801?: string | null; + immex_type?: string | null; + disable_movements?: boolean | null; + pga_program_code?: string | null; + non_discharge_clients?: unknown[] | null; + bom_items?: unknown[] | null; + countries?: unknown[] | null; fraction_type?: string | null; use_alternate_quantity?: boolean | null; repair_unit_cost?: number | null; diff --git a/frontend/src/lib/components/dashboard/goods/parts/partForm.svelte b/frontend/src/lib/components/dashboard/goods/parts/partForm.svelte index b989941b..9c7876a2 100644 --- a/frontend/src/lib/components/dashboard/goods/parts/partForm.svelte +++ b/frontend/src/lib/components/dashboard/goods/parts/partForm.svelte @@ -87,7 +87,7 @@ // --- PROPS --- let { partId = null, - formType = $bindable('inv') + formType = $bindable('fa') }: { partId?: number | null; formType?: 'inv' | 'fa' | 'both' } = $props(); // --- LÓGICA DE ESTADO --- @@ -552,7 +552,7 @@ mex_packing: Number(d.inv_data?.mex_packing) || 0, sales_order: d.inv_data?.sales_order || '', use_rule_8: d.inv_data?.use_rule_8 || false, - non_discharge_clients: d.inv_data?.non_discharge_clients || [] + non_discharge_clients: (d.inv_data?.non_discharge_clients || []) as { client_id: number; name: string; is_active: boolean }[] }; // Relaciones BOM / Paises @@ -1911,7 +1911,7 @@ {#if relationData.length === 0}