diff --git a/App_Code/ClsClientes.vb b/App_Code/ClsClientes.vb
index d7c296145..2c54be51e 100644
--- a/App_Code/ClsClientes.vb
+++ b/App_Code/ClsClientes.vb
@@ -32,6 +32,7 @@ Public Class ClsClientes
Public Property CveCliente As Integer
Public Property Nombre As String
+ Public Property RegimenSociedad As String
Public Property NombreComercial As String
Public Property Direccion As String
Public Property NoExt As String
@@ -289,6 +290,7 @@ Public Class ClsClientes
If Data.Rows.Count > 0 Then
_CveCliente = Data.Rows(0)("CveCliente").ToString.ToEntero
_Nombre = Data.Rows(0)("Nombre").ToString
+ _RegimenSociedad = Data.Rows(0)("RegimenSociedad").ToString
_NombreComercial = Data.Rows(0)("NombreComercial").ToString
_Codigo = Data.Rows(0)("Codigo").ToString
_Direccion = Data.Rows(0)("Direccion").ToString
@@ -576,7 +578,7 @@ Public Class ClsClientes
Optional AplicaComercioExterior As Boolean = False, Optional CveTipoOperacion As Integer = -1, Optional CvePedimento As Integer = -1, Optional CveIncoterm As Integer = -1, Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveColonia As Integer = -1,
Optional CveMotivoTraslado As Integer = 0, Optional NumRegIdTrib As String = "", Optional ComExtEstado As String = "-1", Optional ComExtMunicipio As String = "-1", Optional ComExtColonia As String = "-1", Optional RequiereOC As Boolean = False,
Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0,
- Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1", Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional CveRegimenFiscal As Integer = 0) As Boolean
+ Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1", Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional CveRegimenFiscal As Integer = 0, Optional RegimenSociedad As String = "-1") As Boolean
Dim Retorno As Boolean = False
@@ -719,6 +721,9 @@ Public Class ClsClientes
.Add("@CveAdminTrayecto", SqlDbType.TinyInt).Value = CveAdminTrayecto
.Add("@CveRegimenFiscal", SqlDbType.TinyInt).Value = CveRegimenFiscal
+ .Add("@RegimenSociedad", SqlDbType.VarChar).Value = RegimenSociedad
+
+
End With
Try
SqlAdapter.Fill(Data)
@@ -766,7 +771,7 @@ Public Class ClsClientes
Optional CveMotivoTraslado As Integer = 0, Optional NumRegIdTrib As String = "-1", Optional ComExtEstado As String = "-1", Optional ComExtMunicipio As String = "-1", Optional ComExtColonia As String = "-1",
Optional ApellidoPaternoPF As String = "-1", Optional ApellidoMaternoPF As String = "-1", Optional NombresPF As String = "-1", Optional RequiereOC As Boolean = False,
Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1",
- Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional NoDesglosaIVA As Boolean = False, Optional CveRegimenFiscal As Integer = 0) As Boolean
+ Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional NoDesglosaIVA As Boolean = False, Optional CveRegimenFiscal As Integer = 0, Optional RegimenSociedad As String = "-1") As Boolean
Dim Retorno As Boolean = False
@@ -925,6 +930,8 @@ Public Class ClsClientes
.Add("@CveAdminTrayecto", SqlDbType.TinyInt).Value = CveAdminTrayecto
.Add("@CveRegimenFiscal", SqlDbType.TinyInt).Value = CveRegimenFiscal
+ .Add("@RegimenSociedad", SqlDbType.VarChar).Value = RegimenSociedad
+
End With
Try
SqlAdapter.Fill(Data)
diff --git a/App_Code/Timbres.vb b/App_Code/Timbres.vb
index d087b4392..4f8d15dc4 100644
--- a/App_Code/Timbres.vb
+++ b/App_Code/Timbres.vb
@@ -124,6 +124,8 @@ Public Class Timbres
Timbre.Receptor.RFC = drT("DestinatarioRFC").ToString
Timbre.Receptor.Nombre = drT("DestinatarioNombre").ToString
+ Timbre.Receptor.DomicilioFiscalReceptor = drT("DirDesCP").ToString
+ Timbre.Receptor.RegimenFiscalReceptor = drT("CodigoRegimenFiscalReceptor").ToString
CveMovimiento = drT("CveMovimientoAlmacen").ToString.ToEntero
FechaSalida = drT("FechaEntrega").ToString.ToDateTime
@@ -182,18 +184,6 @@ Public Class Timbres
CartaPorte.FiguraTransporte.AutoTransporte.Remolques.Add(Rem2)
End If
-
- If drT("ClaveTipoRemolque1").ToString <> "" Then
- Dim Rem1 As New CFDICartaPorteRemolque With {.SubTipoRemolque = drT("ClaveTipoRemolque1"), .Placa = drT("PlacaRemolque1")}
- CartaPorte.FiguraTransporte.AutoTransporte.Remolques.Add(Rem1)
- End If
-
- If drT("ClaveTipoRemolque2").ToString <> "" Then
- Dim Rem2 As New CFDICartaPorteRemolque With {.SubTipoRemolque = drT("ClaveTipoRemolque2"), .Placa = drT("PlacaRemolque2")}
- CartaPorte.FiguraTransporte.AutoTransporte.Remolques.Add(Rem2)
- End If
-
-
Dim DomOrigen As CFDICartaPorteDomicilio = Nothing
DomOrigen = New CFDICartaPorteDomicilio With {.Calle = drT("DirOriCalle").ToString,
.Colonia = drT("DirOriClaveSATColonia").ToString,
@@ -283,7 +273,7 @@ Public Class Timbres
.ClaveUnidad = drr("SATClaveUM").ToString,
.Unidad = drr("UM").ToString,
.Dimensiones = drr("Dimensiones").ToString,
- .PesoenKg = drr("PesoKg").ToString.ToDecimal,
+ .PesoenKg = drr("PesoKg").ToString.ToDecimal * drr("Cantidad").ToString.ToDecimal,
.MaterialPeligroso = If(drr("ClaveMaterialPeligroso").ToString <> "", "Sí", ""),
.ClaveMaterialPeligroso = drr("ClaveMaterialPeligroso").ToString,
.Embalaje = drr("ClaveEmbalaje").ToString,
@@ -294,7 +284,7 @@ Public Class Timbres
.UUIDComercioExt = ""
}
- Dim DetalleMercancia As New CFDICartaPorteMercanciaDetalleMercancia With {.PesoNeto = drr("PesoKg").ToString.ToDecimal, .NumPiezas = drr("Cantidad").ToString.ToDecimal}
+ Dim DetalleMercancia As New CFDICartaPorteMercanciaDetalleMercancia With {.PesoNeto = drr("PesoKg").ToString.ToDecimal * drr("Cantidad").ToString.ToDecimal, .NumPiezas = drr("Cantidad").ToString.ToDecimal}
conceptoCarta.DetalleMercancia = DetalleMercancia
Dim MercanciaTransporta As New CFDICartaPorteMercanciaTransporta With {.Cantidad = drr("Cantidad").ToString.ToDecimal, .IDOrigen = "OR000001", .IDDestino = "DE000001"}
diff --git a/Bancos/FluctuacionCambiaria.aspx b/Bancos/FluctuacionCambiaria.aspx
index c5b86d7a1..a32602080 100644
--- a/Bancos/FluctuacionCambiaria.aspx
+++ b/Bancos/FluctuacionCambiaria.aspx
@@ -240,7 +240,8 @@
+
+
-
+
+
-
+
+
@@ -558,7 +561,8 @@
+
+
@@ -610,7 +614,8 @@
@@ -659,7 +664,8 @@
diff --git a/Bancos/FluctuacionCambiaria.aspx.vb b/Bancos/FluctuacionCambiaria.aspx.vb
index df81c70c2..75982a281 100644
--- a/Bancos/FluctuacionCambiaria.aspx.vb
+++ b/Bancos/FluctuacionCambiaria.aspx.vb
@@ -126,6 +126,9 @@ Partial Class Bancos_FluctuacionCambiaria
Dim Final As Double = GanaciaAux - PerdidaAux
HdnProveedorCvePrePoliza.Value = ObjBancos.DtResultados.MAX("CvePrePoliza").ToString
HdnCveFluctuacionBitacora.Value = ObjBancos.DtResultados.MAX("CveFluctuacionBitacora").ToString
+
+ HplProveedorLiga.NavigateUrl = String.Format("/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}", ObjBancos.DtResultados.MAX("CvePrePoliza").ToString)
+ HplProveedorLiga.Visible = HdnProveedorCvePrePoliza.Value.ToEntero > 0
BtnProveedoresRemove.Visible = HdnProveedorCvePrePoliza.Value.ToEntero > 0
BtnGeneraCompras.Visible = Not HdnProveedorCvePrePoliza.Value.ToEntero > 0
@@ -165,6 +168,8 @@ Partial Class Bancos_FluctuacionCambiaria
HdnProveedorAntCvePrePoliza.Value = ObjBancos.DtResultados.MAX("CvePrePoliza").ToString
HdnCveFluctuacionBitacora.Value = ObjBancos.DtResultados.MAX("CveFluctuacionBitacora").ToString
BtnProveedoresAntRemove.Visible = HdnProveedorAntCvePrePoliza.Value.ToEntero > 0
+ HplProveedorAntLiga.Visible = HdnProveedorAntCvePrePoliza.Value.ToEntero > 0
+ HplProveedorAntLiga.NavigateUrl = String.Format("/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}", ObjBancos.DtResultados.MAX("CvePrePoliza").ToString)
BtnGeneraComprasAnt.Visible = Not HdnProveedorAntCvePrePoliza.Value.ToEntero > 0
IImagenResultado.Attributes("class") = If(Final > 0, "widget-thumb-icon bg-green-jungle fa fa-usd", "widget-thumb-icon bg-red fa fa-usd")
@@ -200,6 +205,9 @@ Partial Class Bancos_FluctuacionCambiaria
Dim Final As Double = GanaciaAux - PerdidaAux
HdnClienteCvePrePoliza.Value = ObjBancos.DtResultados.MAX("CvePrePoliza").ToString
HdnCveFluctuacionBitacora.Value = ObjBancos.DtResultados.MAX("CveFluctuacionBitacora").ToString
+
+ HplClientesLiga.NavigateUrl = String.Format("/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}", ObjBancos.DtResultados.MAX("CvePrePoliza").ToString)
+ HplClientesLiga.Visible = HdnClienteCvePrePoliza.Value.ToEntero > 0
BtnClientesRemove.Visible = HdnClienteCvePrePoliza.Value.ToEntero > 0
BtnGeneraVentas.Visible = Not HdnClienteCvePrePoliza.Value.ToEntero > 0
@@ -235,6 +243,8 @@ Partial Class Bancos_FluctuacionCambiaria
Dim Final As Double = GanaciaAux - PerdidaAux
HdnClienteAntCvePrePoliza.Value = ObjBancos.DtResultados.MAX("CvePrePoliza").ToString
HdnCveFluctuacionBitacora.Value = ObjBancos.DtResultados.MAX("CveFluctuacionBitacora").ToString
+ HplClientesAntLiga.Visible = HdnClienteAntCvePrePoliza.Value.ToEntero > 0
+ HplClientesAntLiga.NavigateUrl = String.Format("/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}", ObjBancos.DtResultados.MAX("CvePrePoliza").ToString)
BtnClientesAntRemove.Visible = HdnClienteAntCvePrePoliza.Value.ToEntero > 0
BtnClientesAnticipos.Visible = Not HdnClienteAntCvePrePoliza.Value.ToEntero > 0
@@ -266,6 +276,9 @@ Partial Class Bancos_FluctuacionCambiaria
HdnAcreedorCvePrePoliza.Value = ObjBancos.DtResultados.MAX("CvePrePoliza").ToString
BtnAcreedoresRemove.Visible = HdnAcreedorCvePrePoliza.Value.ToEntero > 0
BtnGeneraAcreedores.Visible = Not HdnAcreedorCvePrePoliza.Value.ToEntero > 0
+
+ HplAcreedorLiga.Visible = HdnAcreedorCvePrePoliza.Value.ToEntero > 0
+ HplAcreedorLiga.NavigateUrl = String.Format("/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}", ObjBancos.DtResultados.MAX("CvePrePoliza").ToString)
GvAcreedores.DataSource = ObjBancos.DtResultados
LblTotalAcreedores.Text = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero
Else
@@ -283,6 +296,9 @@ Partial Class Bancos_FluctuacionCambiaria
HdnAcreedorAntCvePrePoliza.Value = ObjBancos.DtResultados.MAX("CvePrePoliza").ToString
BtnAcreedoresAntRemove.Visible = HdnAcreedorAntCvePrePoliza.Value.ToEntero > 0
BtnGeneraAcreedoresAnt.Visible = Not HdnAcreedorAntCvePrePoliza.Value.ToEntero > 0
+
+ HplAcreedorAntLiga.Visible = HdnAcreedorCvePrePoliza.Value.ToEntero > 0
+ HplAcreedorAntLiga.NavigateUrl = String.Format("/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}", ObjBancos.DtResultados.MAX("CvePrePoliza").ToString)
GvAcreedoresAnt.DataSource = ObjBancos.DtResultados
LblTotalAcreedoresAnt.Text = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero
Else
diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb
index 35c9b14ff..61ecb326a 100644
--- a/Compras/PopUpVerFactura.aspx.vb
+++ b/Compras/PopUpVerFactura.aspx.vb
@@ -1271,6 +1271,11 @@ Partial Class PopUpVerFactura
DtOperadores.Columns.Add(New DataColumn("NumLicencia", GetType(String)))
DtOperadores.Columns.Add(New DataColumn("NombreOperador", GetType(String)))
+ Dim DTRelacionados As New DataTable()
+ DTRelacionados.Columns.Add(New DataColumn("Relacion", GetType(String)))
+ DTRelacionados.Columns.Add(New DataColumn("UUID", GetType(String)))
+
+
Dim XMLDoc As New XmlDocument
Dim Path As String = String.Format("{0}\{1}\{2}\{3}.{4}", UsuarioActual.Empresa.Ruta, "XML", TipoDocto, String.Format("{0}", SerieFolio), "xml")
Dim Archivo As New System.IO.FileInfo(Path)
@@ -1449,10 +1454,59 @@ Partial Class PopUpVerFactura
End If
-
DtUbicaciones.Rows.Add(Row)
Next
+
+
+ Dim nodeRelacion = XMLDoc.SelectSingleNode(String.Format("//{0}:CfdiRelacionados", Prefijo), namespaces)
+
+ If nodeRelacion IsNot Nothing Then
+ Dim RelacionCodigo As String = ValorXML(nodeRelacion, "TipoRelacion")
+ Dim Relacion As String = ""
+
+ Select Case RelacionCodigo
+ Case "01"
+ Relacion = "01 - Nota de crédito de los documentos relacionados"
+ Case "02"
+ Relacion = "02 - Nota de débito de los documentos relacionados"
+ Case "03"
+ Relacion = "03 - Devolución de mercancía sobre facturas o traslados previos"
+ Case "04"
+ Relacion = "04 - Sustitución de los CFDI previos"
+ Case "05"
+ Relacion = "05 - Traslados de mercancias facturados previamente"
+ Case "06"
+ Relacion = "06 - Factura generada por los traslados previos"
+ Case "07"
+ Relacion = "07 - CFDI por aplicación de anticipo"
+ Case "08"
+ Relacion = "08 - Factura generada por pagos en parcialidades"
+ Case "09"
+ Relacion = "09 - Factura generada por pagos diferidos"
+
+ End Select
+
+ Dim nodoDocumentosRealcionados = XMLDoc.SelectNodes(String.Format("//{0}:CfdiRelacionados", Prefijo), namespaces)
+ For Each node As XmlNode In nodoDocumentosRealcionados
+
+ Dim nRow As DataRow = DTRelacionados.NewRow
+ nRow("Relacion") = Relacion
+
+ Try
+ Dim nodoUUID = node.ChildNodes.Cast(Of XmlNode).FirstOrDefault(Function(x) x.Name = "cfdi:CfdiRelacionado")
+ nRow("UUID") = ValorXML(nodoUUID, "UUID", "")
+ Catch ex As Exception
+ nRow("UUID") = ""
+ End Try
+
+ DTRelacionados.Rows.Add(nRow)
+ Next
+ End If
+
+
+
+
Dim nodeTFD As XmlNode = nodeComp.SelectSingleNode(String.Format("//{0}:TimbreFiscalDigital", "tfd"), namespaces)
If nodeTFD IsNot Nothing Then
FolioFiscal = ValorXML(nodeTFD, "UUID", "")
@@ -1567,6 +1621,12 @@ Partial Class PopUpVerFactura
rds4.Value = DtOperadores
lrds.Add(rds4)
+
+ Dim rds5 As New ReportDataSource
+ rds5.Name = "DataSet5"
+ rds5.Value = DTRelacionados
+ lrds.Add(rds5)
+
ImprimirPDF("Empresas/Grales/Formatos/CartaPorteTimbrado.rdlc", lrds, params, SerieFolio)
End If
End If
diff --git a/Empresas/Grales/Formatos/CartaPorteTimbrado.rdlc b/Empresas/Grales/Formatos/CartaPorteTimbrado.rdlc
index 0c8dc838c..51e0dbc2b 100644
--- a/Empresas/Grales/Formatos/CartaPorteTimbrado.rdlc
+++ b/Empresas/Grales/Formatos/CartaPorteTimbrado.rdlc
@@ -1739,7 +1739,7 @@
Textbox45
- 6.14767in
+ 6.89767in
0.41187cm
3.03416cm
15.44579cm
@@ -1758,7 +1758,7 @@
External
=Parameters!QR.Value
FitProportional
- 6.03582in
+ 6.78582in
6.18415in
1.2939in
1.53682in
@@ -2255,16 +2255,16 @@
- 3.00921cm
+ 3.03118cm
- 8.91467cm
+ 8.93664cm
- 2.35479cm
+ 2.37676cm
- 2.95015cm
+ 2.97212cm
@@ -2618,7 +2618,7 @@
- 1.86551cm
+ 1.88748cm
true
@@ -2673,10 +2673,10 @@
true
true
DataSet1
- 11.84512cm
+ 13.75012cm
0.33883cm
1.12062cm
- 19.09433cm
+ 19.20418cm
13
+
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ RELACIÓN
+
+
+
+
+
+
+ Textbox62
+
+
+ #4f81bd
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ UUID
+
+
+
+
+
+
+ Textbox69
+
+
+
+
+
+ #4f81bd
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+
+
+ 0.90553cm
+
+
+
+
+ 0.6cm
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ UM
+
+
+
+
+
+
+
+
+
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+
+
+
+
+ 0.52062cm
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ Textbox40
+
+
+ #4f81bd
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+
+
+
+
+ =Fields!Relacion.Value
+
+
+
+
+ =Fields!Relacion.Value
+
+
+
+ 9.19562cm
+
+
+ true
+ true
+
+
+
+
+ =Fields!Relacion.Value
+
+
+
+
+
+
+ Relacion
+
+ 2pt
+
+
+
+
+
+ 1pt
+
+
+ 1pt
+
+
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+ =Fields!UUID.Value
+
+
+
+
+ =Fields!UUID.Value
+
+
+
+ 8.99524cm
+
+
+ true
+ true
+
+
+
+
+ =Fields!UUID.Value
+
+
+
+
+
+
+ UUID
+
+ 2pt
+
+
+
+
+
+ 1pt
+
+
+
+ 1pt
+
+
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ true
+ DataSet5
+ 0.50301cm
+ 0.08761cm
+ 1.12062cm
+ 19.0964cm
+
+
+
+
+
+ true
+ true
+
+
+
+
+ FOLIOS RELACIONADOS
+
+
+
+
+
+
+ Textbox3
+ 0.02618cm
+ 0.5cm
+ 7.52776in
+ 1
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ 11.30856cm
+ 0.31265cm
+ 1.71919cm
+ 19.23572cm
+ 24
+
+ =IIf(CountRows("DataSet5") = 0, True, False)
+
+
+
+
+
- 7.34222in
+ 8.09222in