Merge pull request 'feature/production' (#40) from feature/production into development
Reviewed-on: ADUANASOFT/anexo76#40
This commit is contained in:
@@ -24,7 +24,7 @@ class PedimentoDatesBase(BaseModel):
|
||||
class PedimentoDatesCreate(BaseModel):
|
||||
"""Schema for creating a new Pedimento Dates - pedimento_id and tenant_id are set by backend"""
|
||||
|
||||
entry_date: Optional[datetime] = Field(None, description="Entry date")
|
||||
entry_date: datetime = Field(..., description="Entry date")
|
||||
pedimento_date: Optional[datetime] = Field(None, description="Pedimento date")
|
||||
payment_date: datetime = Field(..., description="Payment date")
|
||||
rectification_payment_date: Optional[datetime] = Field(None, description="Rectification payment date")
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
from typing import TYPE_CHECKING
|
||||
from typing import TYPE_CHECKING, Optional
|
||||
|
||||
from api.v1.common.base_models import TenantScopedMixin, TimestampMixin
|
||||
from core.database import Base
|
||||
from sqlalchemy import (
|
||||
Boolean,
|
||||
ForeignKeyConstraint,
|
||||
Integer,
|
||||
PrimaryKeyConstraint,
|
||||
SmallInteger,
|
||||
String,
|
||||
UniqueConstraint,
|
||||
)
|
||||
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
||||
@@ -38,12 +37,12 @@ class PedimentoConfigAdditional(Base, TenantScopedMixin, TimestampMixin):
|
||||
id: Mapped[int] = mapped_column(Integer)
|
||||
pedimento_id: Mapped[int] = mapped_column(Integer, nullable=False)
|
||||
|
||||
add_po_identifier: Mapped[int] = mapped_column(SmallInteger)
|
||||
do_not_exempt_norms_complement_x: Mapped[int] = mapped_column(SmallInteger)
|
||||
manual_pedimento_year: Mapped[str] = mapped_column(String(2))
|
||||
enable_import_invoice_recipient: Mapped[int] = mapped_column(SmallInteger)
|
||||
send_502_validation_file_for_consolidated: Mapped[int] = mapped_column(SmallInteger)
|
||||
add_remove_norms: Mapped[int] = mapped_column(SmallInteger)
|
||||
add_po_identifier: Mapped[bool] = mapped_column(Boolean)
|
||||
do_not_exempt_norms_complement_x: Mapped[bool] = mapped_column(Boolean)
|
||||
manual_pedimento_year: Mapped[Optional[int]] = mapped_column(Integer)
|
||||
enable_import_invoice_recipient: Mapped[bool] = mapped_column(Boolean)
|
||||
send_502_validation_file_for_consolidated: Mapped[bool] = mapped_column(Boolean)
|
||||
add_remove_norms: Mapped[bool] = mapped_column(Boolean)
|
||||
|
||||
pedimento: Mapped["Pedimentos"] = relationship(
|
||||
"Pedimentos", back_populates="pedimento_config_additional"
|
||||
|
||||
@@ -3,6 +3,7 @@ from typing import TYPE_CHECKING
|
||||
from api.v1.common.base_models import TenantScopedMixin, TimestampMixin
|
||||
from core.database import Base
|
||||
from sqlalchemy import (
|
||||
Boolean,
|
||||
ForeignKeyConstraint,
|
||||
Integer,
|
||||
PrimaryKeyConstraint,
|
||||
@@ -37,12 +38,12 @@ class PedimentoConfigSurcharges(Base, TenantScopedMixin, TimestampMixin):
|
||||
id: Mapped[int] = mapped_column(Integer)
|
||||
pedimento_id: Mapped[int] = mapped_column(Integer, nullable=False)
|
||||
|
||||
surcharge_igi: Mapped[int] = mapped_column(SmallInteger)
|
||||
surcharge_dta: Mapped[int] = mapped_column(SmallInteger)
|
||||
surcharge_vat: Mapped[int] = mapped_column(SmallInteger)
|
||||
surcharge_isan: Mapped[int] = mapped_column(SmallInteger)
|
||||
surcharge_ieps: Mapped[int] = mapped_column(SmallInteger)
|
||||
surcharge_cc: Mapped[int] = mapped_column(SmallInteger)
|
||||
surcharge_igi: Mapped[bool] = mapped_column(Boolean)
|
||||
surcharge_dta: Mapped[bool] = mapped_column(Boolean)
|
||||
surcharge_vat: Mapped[bool] = mapped_column(Boolean)
|
||||
surcharge_isan: Mapped[bool] = mapped_column(Boolean)
|
||||
surcharge_ieps: Mapped[bool] = mapped_column(Boolean)
|
||||
surcharge_cc: Mapped[bool] = mapped_column(Boolean)
|
||||
|
||||
pedimento: Mapped["Pedimentos"] = relationship(
|
||||
"Pedimentos", back_populates="pedimento_config_surcharges"
|
||||
|
||||
Reference in New Issue
Block a user