Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<!-- Coordenadas del proyecto -->
<groupId>com.fiscalapi</groupId>
<artifactId>fiscalapi</artifactId>
<version>4.0.360</version>
<version>4.0.372</version>
<name>${project.groupId}:${project.artifactId}</name>
<description>Genera facturas CFDI válidas ante el SAT consumiendo la API de https://www.fiscalapi.com</description>
<url>https://www.fiscalapi.com</url>
Expand Down
3,739 changes: 3,739 additions & 0 deletions src/main/java/com/fiscalapi/examples/EjemplosCartaPorteReferencias.java

Large diffs are not rendered by default.

3,826 changes: 3,826 additions & 0 deletions src/main/java/com/fiscalapi/examples/EjemplosCartaPorteValores.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fiscalapi;
package com.fiscalapi.examples;

//package com.fiscalapi;
//
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/com/fiscalapi/models/invoicing/Complement.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.fiscalapi.models.invoicing;

import com.fiscalapi.models.invoicing.billOfLading.CartaPorte;
import com.fiscalapi.models.invoicing.localTaxes.LocalTaxes;
import com.fiscalapi.models.invoicing.paymentComplement.InvoicePayment;
import com.fiscalapi.models.invoicing.payroll.Payroll;
Expand All @@ -8,6 +9,7 @@ public class Complement {
private Payroll payroll;
private InvoicePayment payment;
private LocalTaxes localTaxes;
private CartaPorte cartaPorte;

public Payroll getPayroll() {
return payroll;
Expand All @@ -32,4 +34,12 @@ public LocalTaxes getLocalTaxes() {
public void setLocalTaxes(LocalTaxes localTaxes) {
this.localTaxes = localTaxes;
}

public CartaPorte getCartaPorte() {
return cartaPorte;
}

public void setCartaPorte(CartaPorte cartaPorte) {
this.cartaPorte = cartaPorte;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
package com.fiscalapi.models.invoicing.billOfLading;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fiscalapi.serialization.BigDecimalSerializer;

import java.math.BigDecimal;
import java.util.List;

public class Autotransporte {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Autotransporte must extend the project DTO base hierarchy.

Line 9 defines a model DTO without inheriting from the required DTO chain.

As per coding guidelines **/models/**/*.java: All DTOs must extend the DTO hierarchy: SerializableDtoAuditableDto (with createdAt, updatedAt fields) → BaseDto (with id field).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@src/main/java/com/fiscalapi/models/invoicing/billOfLading/Autotransporte.java`
at line 9, The Autotransporte DTO currently doesn't inherit the project DTO
hierarchy; update its declaration so it extends the project's DTO base (e.g.,
change class Autotransporte to extend BaseDto from the
SerializableDto→AuditableDto→BaseDto chain) and add the necessary import(s) for
BaseDto (and any serialVersionUID if required by SerializableDto); ensure the
class therefore inherits id (from BaseDto) and createdAt/updatedAt (from
AuditableDto) as required by the project's DTO convention.

private String permSCTId;
private String numPermisoSCT;
private String configVehicularId;

@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal pesoBrutoVehicular;

private String placaVM;
private int anioModeloVM;
private String aseguraRespCivil;
private String polizaRespCivil;
private List<Remolque> remolques;

public String getPermSCTId() {
return permSCTId;
}

public void setPermSCTId(String permSCTId) {
this.permSCTId = permSCTId;
}

public String getNumPermisoSCT() {
return numPermisoSCT;
}

public void setNumPermisoSCT(String numPermisoSCT) {
this.numPermisoSCT = numPermisoSCT;
}

public String getConfigVehicularId() {
return configVehicularId;
}

public void setConfigVehicularId(String configVehicularId) {
this.configVehicularId = configVehicularId;
}

public BigDecimal getPesoBrutoVehicular() {
return pesoBrutoVehicular;
}

public void setPesoBrutoVehicular(BigDecimal pesoBrutoVehicular) {
this.pesoBrutoVehicular = pesoBrutoVehicular;
}

public String getPlacaVM() {
return placaVM;
}

public void setPlacaVM(String placaVM) {
this.placaVM = placaVM;
}

public int getAnioModeloVM() {
return anioModeloVM;
}

public void setAnioModeloVM(int anioModeloVM) {
this.anioModeloVM = anioModeloVM;
}

public String getAseguraRespCivil() {
return aseguraRespCivil;
}

public void setAseguraRespCivil(String aseguraRespCivil) {
this.aseguraRespCivil = aseguraRespCivil;
}

public String getPolizaRespCivil() {
return polizaRespCivil;
}

public void setPolizaRespCivil(String polizaRespCivil) {
this.polizaRespCivil = polizaRespCivil;
}

public List<Remolque> getRemolques() {
return remolques;
}

public void setRemolques(List<Remolque> remolques) {
this.remolques = remolques;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package com.fiscalapi.models.invoicing.billOfLading;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fiscalapi.serialization.BigDecimalSerializer;

import java.math.BigDecimal;

public class CantidadTransporta {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

CantidadTransporta should inherit from the required DTO hierarchy.

Line 8 declares this DTO as a standalone POJO instead of extending the project DTO base chain.

As per coding guidelines **/models/**/*.java: All DTOs must extend the DTO hierarchy: SerializableDtoAuditableDto (with createdAt, updatedAt fields) → BaseDto (with id field).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@src/main/java/com/fiscalapi/models/invoicing/billOfLading/CantidadTransporta.java`
at line 8, The CantidadTransporta DTO is declared as a plain POJO; update its
declaration to extend the project DTO hierarchy by making CantidadTransporta
extend BaseDto (which inherits AuditableDto and SerializableDto in the project),
add the necessary import for BaseDto, and add any required serialVersionUID or
constructors if other DTOs in the hierarchy require them; ensure the class
signature uses "public class CantidadTransporta extends BaseDto" (and remove any
duplicate id/createdAt/updatedAt fields if present).

@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal cantidad;

private String idOrigen;
private String idDestino;
private String cvesTransporteId;

public BigDecimal getCantidad() {
return cantidad;
}

public void setCantidad(BigDecimal cantidad) {
this.cantidad = cantidad;
}

public String getIdOrigen() {
return idOrigen;
}

public void setIdOrigen(String idOrigen) {
this.idOrigen = idOrigen;
}

public String getIdDestino() {
return idDestino;
}

public void setIdDestino(String idDestino) {
this.idDestino = idDestino;
}

public String getCvesTransporteId() {
return cvesTransporteId;
}

public void setCvesTransporteId(String cvesTransporteId) {
this.cvesTransporteId = cvesTransporteId;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
package com.fiscalapi.models.invoicing.billOfLading;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fiscalapi.serialization.BigDecimalSerializer;

import java.math.BigDecimal;
import java.util.List;

public class CartaPorte {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

CartaPorte also needs to inherit from the DTO base chain.

Line 9 defines the class without the required SerializableDto → AuditableDto → BaseDto inheritance structure.

As per coding guidelines: "**/models/**/*.java: All DTOs must extend the DTO hierarchy: SerializableDtoAuditableDto (with createdAt, updatedAt fields) → BaseDto (with id field)".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/main/java/com/fiscalapi/models/invoicing/billOfLading/CartaPorte.java` at
line 9, CartaPorte is missing the required DTO inheritance chain; update the
class declaration for CartaPorte so it extends the DTO base chain
(SerializableDto → AuditableDto → BaseDto) by making it extend SerializableDto
(which in turn inherits AuditableDto and BaseDto), ensure the appropriate
imports for SerializableDto/AuditableDto/BaseDto are added, and remove any
duplicate id/createdAt/updatedAt fields if present so the class relies on the
inherited fields and behavior.

private String transpInternacId;
private String entradaSalidaMercId;
private String paisOrigenDestinoId;
private String viaEntradaSalidaId;

@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal totalDistRec;

@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal pesoNetoTotal;

private String registroISTMOId;
private String ubicacionPoloOrigenId;
private String ubicacionPoloDestinoId;
private String unidadPesoId;
private String logisticaInversaRecoleccionDevolucionId;
private List<RegimenAduanero> regimenAduaneros;
private List<Ubicacion> ubicaciones;
private List<Mercancia> mercancias;
private Autotransporte autotransporte;
private TransporteMaritimo transporteMaritimo;
private TransporteAereo transporteAereo;
private TransporteFerroviario transporteFerroviario;
private List<TipoFigura> tiposFigura;

public String getTranspInternacId() {
return transpInternacId;
}

public void setTranspInternacId(String transpInternacId) {
this.transpInternacId = transpInternacId;
}

public String getEntradaSalidaMercId() {
return entradaSalidaMercId;
}

public void setEntradaSalidaMercId(String entradaSalidaMercId) {
this.entradaSalidaMercId = entradaSalidaMercId;
}

public String getPaisOrigenDestinoId() {
return paisOrigenDestinoId;
}

public void setPaisOrigenDestinoId(String paisOrigenDestinoId) {
this.paisOrigenDestinoId = paisOrigenDestinoId;
}

public String getViaEntradaSalidaId() {
return viaEntradaSalidaId;
}

public void setViaEntradaSalidaId(String viaEntradaSalidaId) {
this.viaEntradaSalidaId = viaEntradaSalidaId;
}

public BigDecimal getTotalDistRec() {
return totalDistRec;
}

public void setTotalDistRec(BigDecimal totalDistRec) {
this.totalDistRec = totalDistRec;
}

public BigDecimal getPesoNetoTotal() {
return pesoNetoTotal;
}

public void setPesoNetoTotal(BigDecimal pesoNetoTotal) {
this.pesoNetoTotal = pesoNetoTotal;
}

public String getRegistroISTMOId() {
return registroISTMOId;
}

public void setRegistroISTMOId(String registroISTMOId) {
this.registroISTMOId = registroISTMOId;
}

public String getUbicacionPoloOrigenId() {
return ubicacionPoloOrigenId;
}

public void setUbicacionPoloOrigenId(String ubicacionPoloOrigenId) {
this.ubicacionPoloOrigenId = ubicacionPoloOrigenId;
}

public String getUbicacionPoloDestinoId() {
return ubicacionPoloDestinoId;
}

public void setUbicacionPoloDestinoId(String ubicacionPoloDestinoId) {
this.ubicacionPoloDestinoId = ubicacionPoloDestinoId;
}

public String getUnidadPesoId() {
return unidadPesoId;
}

public void setUnidadPesoId(String unidadPesoId) {
this.unidadPesoId = unidadPesoId;
}

public String getLogisticaInversaRecoleccionDevolucionId() {
return logisticaInversaRecoleccionDevolucionId;
}

public void setLogisticaInversaRecoleccionDevolucionId(String logisticaInversaRecoleccionDevolucionId) {
this.logisticaInversaRecoleccionDevolucionId = logisticaInversaRecoleccionDevolucionId;
}

public List<RegimenAduanero> getRegimenAduaneros() {
return regimenAduaneros;
}

public void setRegimenAduaneros(List<RegimenAduanero> regimenAduaneros) {
this.regimenAduaneros = regimenAduaneros;
}

public List<Ubicacion> getUbicaciones() {
return ubicaciones;
}

public void setUbicaciones(List<Ubicacion> ubicaciones) {
this.ubicaciones = ubicaciones;
}

public List<Mercancia> getMercancias() {
return mercancias;
}

public void setMercancias(List<Mercancia> mercancias) {
this.mercancias = mercancias;
}

public Autotransporte getAutotransporte() {
return autotransporte;
}

public void setAutotransporte(Autotransporte autotransporte) {
this.autotransporte = autotransporte;
}

public TransporteMaritimo getTransporteMaritimo() {
return transporteMaritimo;
}

public void setTransporteMaritimo(TransporteMaritimo transporteMaritimo) {
this.transporteMaritimo = transporteMaritimo;
}

public TransporteAereo getTransporteAereo() {
return transporteAereo;
}

public void setTransporteAereo(TransporteAereo transporteAereo) {
this.transporteAereo = transporteAereo;
}

public TransporteFerroviario getTransporteFerroviario() {
return transporteFerroviario;
}

public void setTransporteFerroviario(TransporteFerroviario transporteFerroviario) {
this.transporteFerroviario = transporteFerroviario;
}

public List<TipoFigura> getTiposFigura() {
return tiposFigura;
}

public void setTiposFigura(List<TipoFigura> tiposFigura) {
this.tiposFigura = tiposFigura;
}
}
Loading