feat: Implement general catalogs for INPC, Legends, Multi-Currency Types, Packages, Ports, Prevalidators, Signatures, Unit Conversions, and Units of Measure
- Added INPC management page with search functionality. - Created Legends management page with filters for code and description. - Implemented Multi-Currency Types management with search capabilities. - Developed Packages management page with filtering options. - Introduced Ports management page with authentication and data fetching. - Added Prevalidators management page with search filters. - Implemented Signatures management page with search by name and position. - Created Unit Conversions management page for conversion factors. - Developed Units of Measure management pages for ACE, American, and OMA with data tables and create/edit dialogs.
This commit is contained in:
@@ -19,12 +19,13 @@ class CodePedimentoRegimen(Base):
|
||||
["regimen_code"], ["public.pedimento_regimens.code"], name="fk_regimenped"
|
||||
),
|
||||
PrimaryKeyConstraint("id", name="clave_pedimento_regimens_pkey"),
|
||||
{"schema": "public"},
|
||||
{"schema": "public", "extend_existing": True},
|
||||
)
|
||||
|
||||
id: Mapped[int] = mapped_column(Integer)
|
||||
pedimento_code: Mapped[str] = mapped_column(String(3), nullable=False)
|
||||
regimen_code: Mapped[Optional[str]] = mapped_column(String(3), nullable=False)
|
||||
regimen_code: Mapped[Optional[str]] = mapped_column(
|
||||
String(3), nullable=False)
|
||||
type_code: Mapped[Optional[str]] = mapped_column(
|
||||
String(1)
|
||||
) # si aplica un tipo de relación
|
||||
|
||||
@@ -7,7 +7,7 @@ class Container(Base):
|
||||
__tablename__ = "containers" # GContenedores
|
||||
__table_args__ = (
|
||||
PrimaryKeyConstraint("key", name="containers_pkey"),
|
||||
{"schema": "public"}, # opcional
|
||||
{"schema": "public", "extend_existing": True}, # opcional
|
||||
)
|
||||
|
||||
key: Mapped[str] = mapped_column(
|
||||
|
||||
@@ -8,11 +8,13 @@ class Country(Base):
|
||||
__table_args__ = (
|
||||
PrimaryKeyConstraint("m3_key", name="countries_pkey"),
|
||||
Index("ak_country_ame", "ame_key", unique=True),
|
||||
{"schema": "public"}, # opcional
|
||||
{"schema": "public", "extend_existing": True}, # opcional
|
||||
)
|
||||
|
||||
m3_key: Mapped[str] = mapped_column(String(3), nullable=False) # clave M3
|
||||
mex_key: Mapped[str] = mapped_column(String(2), nullable=False) # clave país México
|
||||
m3_key: Mapped[str] = mapped_column(
|
||||
String(3), primary_key=True, nullable=False) # clave M3
|
||||
mex_key: Mapped[str] = mapped_column(
|
||||
String(2), nullable=False) # clave país México
|
||||
ame_key: Mapped[str] = mapped_column(
|
||||
String(2), nullable=False
|
||||
) # clave país América / regional
|
||||
|
||||
@@ -7,11 +7,11 @@ class CurrencyType(Base):
|
||||
__tablename__ = "currency_types" # GTiposMoneda
|
||||
__table_args__ = (
|
||||
PrimaryKeyConstraint("code", name="currency_types_pkey"),
|
||||
{"schema": "public"}, # opcional
|
||||
{"schema": "public", "extend_existing": True},
|
||||
)
|
||||
|
||||
code: Mapped[str] = mapped_column(
|
||||
String(3), nullable=False
|
||||
String(3), primary_key=True, nullable=False
|
||||
) # código ISO o clave de moneda
|
||||
currency_name: Mapped[str] = mapped_column(
|
||||
String(15), nullable=False
|
||||
|
||||
@@ -7,7 +7,7 @@ class CustomsSection(Base):
|
||||
__tablename__ = "customs_sections" # GAduanaSec
|
||||
__table_args__ = (
|
||||
PrimaryKeyConstraint("customs_code", name="customs_code_pkey"),
|
||||
{"schema": "public"},
|
||||
{"schema": "public", "extend_existing": True},
|
||||
)
|
||||
|
||||
customs_code = mapped_column(String(3), nullable=False)
|
||||
|
||||
@@ -7,11 +7,13 @@ class CustomsWarehouse(Base):
|
||||
__tablename__ = "customs_warehouses" # GRecintos
|
||||
__table_args__ = (
|
||||
PrimaryKeyConstraint("key", "customs", name="pk_customs_warehouse"),
|
||||
{"schema": "public"}, # opcional
|
||||
{"schema": "public", "extend_existing": True}, # opcional
|
||||
)
|
||||
|
||||
key: Mapped[str] = mapped_column(String(3), nullable=False) # clave del recinto
|
||||
customs: Mapped[str] = mapped_column(String(100), nullable=False) # aduana asociada
|
||||
key: Mapped[str] = mapped_column(
|
||||
String(3), nullable=False) # clave del recinto
|
||||
customs: Mapped[str] = mapped_column(
|
||||
String(100), nullable=False) # aduana asociada
|
||||
fiscalized_warehouse: Mapped[str] = mapped_column(
|
||||
String(1000)
|
||||
) # recintos fiscalizados (valor legal)
|
||||
|
||||
@@ -7,7 +7,7 @@ class Incoterm(Base):
|
||||
__tablename__ = "incoterms" # GIncoterm
|
||||
__table_args__ = (
|
||||
PrimaryKeyConstraint("code", name="incoterms_pkey"),
|
||||
{"schema": "public"},
|
||||
{"schema": "public", "extend_existing": True},
|
||||
)
|
||||
|
||||
code: Mapped[str] = mapped_column(String(5), nullable=False)
|
||||
|
||||
@@ -7,7 +7,7 @@ class InvoiceType(Base):
|
||||
__tablename__ = "invoice_types" # GTiposFactura
|
||||
__table_args__ = (
|
||||
PrimaryKeyConstraint("key", name="invoice_types_pkey"),
|
||||
{"schema": "public"}, # opcional
|
||||
{"schema": "public", "extend_existing": True}, # opcional
|
||||
)
|
||||
|
||||
key: Mapped[str] = mapped_column(
|
||||
@@ -16,7 +16,8 @@ class InvoiceType(Base):
|
||||
description: Mapped[str] = mapped_column(
|
||||
String(50), nullable=False
|
||||
) # descripción oficial (en español)
|
||||
note: Mapped[str] = mapped_column(String(500)) # observación o comentario adicional
|
||||
# observación o comentario adicional
|
||||
note: Mapped[str] = mapped_column(String(500))
|
||||
type: Mapped[str] = mapped_column(String(15)) # tipo
|
||||
|
||||
def __repr__(self):
|
||||
|
||||
@@ -7,10 +7,11 @@ class MaterialType(Base):
|
||||
__tablename__ = "material_types" # STipoMat QTipoActFijo
|
||||
__table_args__ = (
|
||||
PrimaryKeyConstraint("key", name="material_types_pkey"),
|
||||
{"schema": "public"},
|
||||
{"schema": "public", "extend_existing": True},
|
||||
)
|
||||
|
||||
key: Mapped[str] = mapped_column(String(10), nullable=False) # clave del material
|
||||
key: Mapped[str] = mapped_column(
|
||||
String(10), nullable=False) # clave del material
|
||||
type: Mapped[str] = mapped_column(String(15), nullable=False) # tipo
|
||||
description: Mapped[str] = mapped_column(
|
||||
String(256), nullable=False
|
||||
|
||||
@@ -7,7 +7,7 @@ class PaymentMethod(Base):
|
||||
__tablename__ = "payment_methods" # GFormaPago
|
||||
__table_args__ = (
|
||||
PrimaryKeyConstraint("key", name="payment_methods_pkey"),
|
||||
{"schema": "public"}, # opcional
|
||||
{"schema": "public", "extend_existing": True}, # opcional
|
||||
)
|
||||
|
||||
key: Mapped[str] = mapped_column(String(2), nullable=False)
|
||||
|
||||
@@ -12,7 +12,7 @@ class PedimentoCode(Base):
|
||||
__tablename__ = "pedimento_codes" # GClavePed
|
||||
__table_args__ = (
|
||||
PrimaryKeyConstraint("code", name="pedimento_codes_pkey"),
|
||||
{"schema": "public"}, # esquema del anexo 22
|
||||
{"schema": "public", "extend_existing": True}, # esquema del anexo 22
|
||||
)
|
||||
|
||||
code: Mapped[str] = mapped_column(String(3), nullable=False)
|
||||
|
||||
@@ -12,7 +12,7 @@ class RegimenPedimento(Base):
|
||||
__tablename__ = "pedimento_regimens" # GRegimenPed
|
||||
__table_args__ = (
|
||||
PrimaryKeyConstraint("code", name="pedimento_regimens_pkey"),
|
||||
{"schema": "public"},
|
||||
{"schema": "public", "extend_existing": True},
|
||||
)
|
||||
|
||||
code: Mapped[str] = mapped_column(
|
||||
|
||||
@@ -7,10 +7,11 @@ class Sector(Base):
|
||||
__tablename__ = "sectors" # GSectores
|
||||
__table_args__ = (
|
||||
PrimaryKeyConstraint("key", name="sectors_pkey"),
|
||||
{"schema": "public"}, # opcional
|
||||
{"schema": "public", "extend_existing": True}, # opcional
|
||||
)
|
||||
|
||||
key: Mapped[str] = mapped_column(String(8), nullable=False) # clave del sector
|
||||
key: Mapped[str] = mapped_column(
|
||||
String(8), nullable=False) # clave del sector
|
||||
description: Mapped[str] = mapped_column(
|
||||
String(150), nullable=False
|
||||
) # descripción oficial (en español)
|
||||
|
||||
@@ -9,7 +9,7 @@ class State(Base):
|
||||
__tablename__ = "states" # GEstados
|
||||
__table_args__ = (
|
||||
PrimaryKeyConstraint("m3_key", "description", name="states_pkey"),
|
||||
{"schema": "public"},
|
||||
{"schema": "public", "extend_existing": True},
|
||||
)
|
||||
|
||||
m3_key: Mapped[str] = mapped_column(String(3), nullable=False)
|
||||
|
||||
@@ -7,7 +7,7 @@ class TransportMode(Base):
|
||||
__tablename__ = "transport_modes" # GModTransporte
|
||||
__table_args__ = (
|
||||
PrimaryKeyConstraint("key", name="transport_modes_pkey"),
|
||||
{"schema": "public"}, # opcional
|
||||
{"schema": "public", "extend_existing": True}, # opcional
|
||||
)
|
||||
|
||||
key: Mapped[str] = mapped_column(String(3), nullable=False)
|
||||
|
||||
@@ -7,7 +7,7 @@ class TransportType(Base):
|
||||
__tablename__ = "transport_types" # GTiposTransporte
|
||||
__table_args__ = (
|
||||
PrimaryKeyConstraint("transport_code", name="transport_types_pkey"),
|
||||
{"schema": "public"},
|
||||
{"schema": "public", "extend_existing": True},
|
||||
)
|
||||
|
||||
transport_code: Mapped[str] = mapped_column(
|
||||
|
||||
@@ -7,7 +7,7 @@ class ValuationMethod(Base):
|
||||
__tablename__ = "valuation_methods" # GMetValor
|
||||
__table_args__ = (
|
||||
PrimaryKeyConstraint("key", name="valuation_methods_pkey"),
|
||||
{"schema": "public"},
|
||||
{"schema": "public", "extend_existing": True},
|
||||
)
|
||||
|
||||
key: Mapped[str] = mapped_column(String(2), nullable=False)
|
||||
|
||||
Reference in New Issue
Block a user