diff --git a/App_Code/CFDITimbre.vb b/App_Code/CFDITimbre.vb index 6600b448e..ddd73483a 100644 --- a/App_Code/CFDITimbre.vb +++ b/App_Code/CFDITimbre.vb @@ -235,7 +235,9 @@ End Class Public Class CFDIComplementos + Public Property ComercioExterior11 As CFDIComercioExterior11 + Public Property CartaPorte As CFDICartaPorte Sub New() ComercioExterior11 = New CFDIComercioExterior11 @@ -568,4 +570,151 @@ Public Class CFDIComercioExterior11MercanciasDescripcionesEspecificas Public Property Modelo As String = "" Public Property SubModelo As String = "" Public Property NumeroSerie As String = "" -End Class \ No newline at end of file +End Class + + + +Public Class CFDICartaPorte + Public Property TranspInternac As String = "" + Public Property EntradaSalidaMercancia As String = "" + Public Property ViaEntradaSalida As String = "" + Public Property TotalDistanciaRecorrida As Double = 0 + Public Property Ubicaciones As New List(Of CFDICartaPorteUbicaciones) + Public Property Mercancias As New CFDICartaPorteMercancias + Public Property FiguraTransporte As New CFDICartaPorteFiguraTransporte +End Class + + +Public Class CFDICartaPorteUbicaciones + Public Property TipoEstacion As String = "" + Public Property DistanciaRecorrida As Double = 0 + 'Public Property Ubicacion As New CFDICartaPorteUbicacion + Public Property Origen As New CFDICartaPorteUbicacionOrigen + Public Property Destino As New CFDICartaPorteUbicacionDestino +End Class + + + +Public Class CFDICartaPorteAutoTransporteFederal + Public Property PermSCT As String = "" + Public Property NumPermisoSCT As String = "" + Public Property NombreAseg As String = "" + Public Property NumPolizaSeguro As String = "" + Public Property Vehiculo As New CFDICartaPorteIdentificacionVehicular + Public Property Remolques As New List(Of CFDICartaPorteRemolque) + +End Class + + +Public Class CFDICartaPorteUbicacionOrigen + Public Property IDOrigen As String = "" + Public Property RFCRemitente As String = "" + Public Property NombreRemitente As String = "" + Public Property NumRegIdTrib As String = "" + Public Property ResidenciaFiscal As String = "" + Public Property NumEstacion As String = "" + Public Property NombreEstacion As String = "" + Public Property NavegacionTrafico As String = "" + Public Property FechaHoraSalida As String = "" + Public Property Domicilio As New CFDICartaPorteDomicilio +End Class + + +Public Class CFDICartaPorteUbicacionDestino + Public Property IDDestino As String = "" + Public Property RFCDestinatario As String = "" + Public Property NombreDestinatario As String = "" + Public Property NumRegIdTrib As String = "" + Public Property ResidenciaFiscal As String + Public Property NumEstacion As String + Public Property NombreEstacion As String + Public Property NavegacionTrafico As String + Public Property FechaHoraProgLlegada As String + Public Property Domicilio As New CFDICartaPorteDomicilio +End Class + + +Public Class CFDICartaPorteDomicilio + Public Property Calle As String = "" + Public Property NumeroExterior As String = "" + Public Property NumeroInterior As String = "" + Public Property Colonia As String = "" + Public Property Localidad As String = "" + Public Property Referencia As String = "" + Public Property Municipio As String = "" + Public Property Estado As String = "" + Public Property Pais As String = "" + Public Property CP As String = "" +End Class + + +Public Class CFDICartaPorteMercancias + Public Property PesoBrutoTotal As Double = 0 + Public Property UnidadPeso As String = "" + Public ReadOnly Property PesoNetoTotal As Double + Get + Return Mercancias.Sum(Function(item) item.PesoenKg) + End Get + End Property + + Public ReadOnly Property NumTotalMercancias As Integer + Get + 'Return Mercancias.Sum(Function(item) item.Cantidad).ToEntero + Return Mercancias.Count + End Get + End Property + Public Property CargoporTasacion As Double = 0 + Public Property Mercancias As New List(Of CFDICartaPorteMercancia) +End Class + + +Public Class CFDICartaPorteMercancia + Public Property BienesTransp As String = "" + Public Property ClaveSTCC As String = "" + Public Property Descripción As String = "" + Public Property Cantidad As Decimal = 0 + Public Property ClaveUnidad As String = "" + Public Property Unidad As String = "" + Public Property Dimensiones As String = "" + Public Property ClaveMaterialPeligroso As String = "" + Public Property MaterialPeligroso As String = "" + Public Property Embalaje As String = "" + Public Property DescripEmbalaje As String = "" + Public Property PesoenKg As Double + Public Property ValorMercancia As Double + Public Property Moneda As String = "" + Public Property FraccionArrancelaria As String = "" + Public Property UUIDComercioExt As String = "" + +End Class + + +Public Class CFDICartaPorteIdentificacionVehicular + Public Property ConfigVehicular As String = "" + Public Property PlacaVM As String = "" + Public Property AnioModeloVM As Integer = 0 +End Class + + +Public Class CFDICartaPorteRemolque + Public Property SubTipoRemolque As String = "" + Public Property Placa As String = "" + Public Property AnioModeloVM As String = "" +End Class + + +Public Class CFDICartaPorteFiguraTransporte + Public Property ClaveTransporte As String = "01" + Public Property AutoTransporteFederal As New CFDICartaPorteAutoTransporteFederal + Public Property Operadores As New List(Of CFDICartaPorteOperador) +End Class + + +Public Class CFDICartaPorteOperador + Public Property RFCOperador As String = "" + Public Property NumLicencia As String = "" + Public Property NombreOperador As String = "" + Public Property NumRegidTribOperador As String = "" + Public Property ResidenciaFiscalOperador As String = "" + Public Property Domicilio As New CFDICartaPorteDomicilio +End Class diff --git a/App_Code/ClsAcarreos.vb b/App_Code/ClsAcarreos.vb index 6ec08daaa..6c42c9419 100644 --- a/App_Code/ClsAcarreos.vb +++ b/App_Code/ClsAcarreos.vb @@ -109,7 +109,8 @@ Public Class ClsAcarreos #Region "Choferes" - Public Function AddChofer(Chofer As String, CveUsuario As Integer, CveEmpresa As Integer, CveTransportista As Integer, Identificacion As String, Domicilio As String, Telefono As String, Ciudad As String, Licencia As String) As Boolean + Public Function AddChofer(Chofer As String, CveUsuario As Integer, CveEmpresa As Integer, CveTransportista As Integer, Identificacion As String, Telefono As String, Licencia As String, RFC As String, Domicilio As String, + Optional NumeroExterior As String = "", Optional NumeroInterior As String = "", Optional Colonia As String = "", Optional Ciudad As String = "", Optional Estado As String = "", Optional CP As String = "") As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Acar_ChoferesAdd") With SqlAdapter.SelectCommand.Parameters @@ -118,10 +119,16 @@ Public Class ClsAcarreos .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveTransportista", SqlDbType.Int).Value = CveTransportista .Add("@Identificacion", SqlDbType.VarChar).Value = Identificacion - .Add("@Domicilio", SqlDbType.VarChar).Value = Domicilio .Add("@Telefono", SqlDbType.VarChar).Value = Telefono - .Add("@Ciudad", SqlDbType.VarChar).Value = Ciudad .Add("@Licencia", SqlDbType.VarChar).Value = Licencia + .Add("@RFC", SqlDbType.VarChar).Value = RFC + .Add("@Domicilio", SqlDbType.VarChar).Value = Domicilio + .Add("@NumeroExterior", SqlDbType.VarChar).Value = NumeroExterior + .Add("@NumeroInterior", SqlDbType.VarChar).Value = NumeroInterior + .Add("@Colonia", SqlDbType.VarChar).Value = Colonia + .Add("@Ciudad", SqlDbType.VarChar).Value = Ciudad + .Add("@Estado", SqlDbType.VarChar).Value = Estado + .Add("@CP", SqlDbType.VarChar).Value = CP End With Try SqlAdapter.Fill(Data) @@ -133,7 +140,8 @@ Public Class ClsAcarreos Return Retorno End Function - Public Function UpdateChofer(CveChofer As Integer, Chofer As String, CveUsuario As Integer, CveEmpresa As Integer, Estatus As Integer, CveTransportista As Integer, Identificacion As String, Domicilio As String, Telefono As String, Ciudad As String, Licencia As String) As Boolean + Public Function UpdateChofer(CveChofer As Integer, Chofer As String, CveUsuario As Integer, CveEmpresa As Integer, Estatus As Integer, CveTransportista As Integer, Identificacion As String, Telefono As String, Licencia As String, RFC As String, Domicilio As String, + Optional NumeroExterior As String = "", Optional NumeroInterior As String = "", Optional Colonia As String = "", Optional Ciudad As String = "", Optional Estado As String = "", Optional CP As String = "") As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Acar_ChoferesUpdate") With SqlAdapter.SelectCommand.Parameters @@ -141,13 +149,19 @@ Public Class ClsAcarreos .Add("@Chofer", SqlDbType.VarChar).Value = Chofer .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - .Add("@Estatus", SqlDbType.Int).Value = Estatus .Add("@CveTransportista", SqlDbType.Int).Value = CveTransportista .Add("@Identificacion", SqlDbType.VarChar).Value = Identificacion - .Add("@Domicilio", SqlDbType.VarChar).Value = Domicilio .Add("@Telefono", SqlDbType.VarChar).Value = Telefono - .Add("@Ciudad", SqlDbType.VarChar).Value = Ciudad .Add("@Licencia", SqlDbType.VarChar).Value = Licencia + .Add("@RFC", SqlDbType.VarChar).Value = RFC + .Add("@Domicilio", SqlDbType.VarChar).Value = Domicilio + .Add("@NumeroExterior", SqlDbType.VarChar).Value = NumeroExterior + .Add("@NumeroInterior", SqlDbType.VarChar).Value = NumeroInterior + .Add("@Colonia", SqlDbType.VarChar).Value = Colonia + .Add("@Ciudad", SqlDbType.VarChar).Value = Ciudad + .Add("@Estado", SqlDbType.VarChar).Value = Estado + .Add("@CP", SqlDbType.VarChar).Value = CP + .Add("@Estatus", SqlDbType.Int).Value = Estatus End With Try SqlAdapter.Fill(Data) diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index 1a7713d2c..266a9a71c 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -5774,7 +5774,7 @@ Public Class ClsContabilidad Public Function AddCuentasAsignaciones(Optional CveConceptoContable As Integer = -1, Optional CveEmpresa As Integer = -1, Optional CveCuenta As Integer = -1, Optional IdCtaContable As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveClasificacion As Integer = -1, Optional CveAlmacen As Integer = -1, Optional PorcentajeIVA As Decimal = -1, Optional CveConceptoNomina As Decimal = -1, Optional CveBancoCuenta As Integer = -1, - Optional CveSubProyecto As Integer = -1) As Boolean + Optional CveSubProyecto As Integer = -1, Optional CveActivoFijo As Integer = -1) As Boolean Dim Retorno = False DataAdapter("PA_Conta_CuentasAsignacionesAdd") @@ -5793,6 +5793,7 @@ Public Class ClsContabilidad .Add("@CveConceptoNomina", SqlDbType.Decimal).Value = CveConceptoNomina .Add("@CveBancoCuenta", SqlDbType.Int).Value = CveBancoCuenta .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo End With Try @@ -5828,7 +5829,7 @@ Public Class ClsContabilidad Optional IdCtaContable As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveClasificacion As Integer = -1, Optional CveAlmacen As Integer = -1, Optional PorcentajeIVA As Decimal = -1, Optional CveConceptoNomina As Decimal = -1, Optional CveBancoCuenta As Integer = -1, - Optional CveSubProyecto As Integer = -1) As Boolean + Optional CveSubProyecto As Integer = -1, Optional CveActivoFijo As Integer = -1) As Boolean Dim Retorno = False DataAdapter("PA_Conta_CuentasAsignacionesUpdate") @@ -5847,6 +5848,7 @@ Public Class ClsContabilidad .Add("@CveConceptoNomina", SqlDbType.Decimal).Value = CveConceptoNomina .Add("@CveBancoCuenta", SqlDbType.Int).Value = CveBancoCuenta .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo End With Try diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb index 9acc9375e..56b39138a 100644 --- a/App_Code/ClsGenerales.vb +++ b/App_Code/ClsGenerales.vb @@ -2525,7 +2525,7 @@ Public Class ClsGenerales Public Function GetHistorialBitacora(CveAcarreo As Integer, CveOrdenCompra As Integer, CveActivoFijo As Integer, CveOS As Integer, CvePS As Integer, CveCompra As Integer, CveIE As Integer, CveEmpresa As Integer, Optional CveUsuario As Integer = -1, Optional CvePersonal As Integer = -1, - Optional IdPoliza As Integer = -1, Optional CvePrePoliza As Integer = -1, Optional CvePeriodo As Integer = -1, Optional CveConceptoNomina As Integer = -1) As Boolean + Optional IdPoliza As Integer = -1, Optional CvePrePoliza As Integer = -1, Optional CvePeriodo As Integer = -1, Optional CveConceptoNomina As Integer = -1, Optional CvePromocion As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Gral_HistorialBitacoraGet") @@ -2544,6 +2544,7 @@ Public Class ClsGenerales .Add("@IdPoliza", SqlDbType.Int).Value = IdPoliza .Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo .Add("@CveConceptoNomina", SqlDbType.Int).Value = CveConceptoNomina + .Add("@CvePromocion", SqlDbType.Int).Value = CvePromocion @@ -2586,7 +2587,7 @@ Public Class ClsGenerales CveActivoFijo As Integer, CveOS As Integer, CvePS As Integer, CveCompra As Integer, CveIE As Integer, Actual As String, Anterior As String, CveUsuario As Integer, CveEmpresa As Integer, SeElimino As Integer, Descripcion As String, Tipo As String, - Id_Clave As String, Optional IdPoliza As Integer = -1) As Boolean + Id_Clave As String, Optional IdPoliza As Integer = -1, Optional CvePromocion As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Gral_HistorialBitacoraAdd") @@ -2608,6 +2609,7 @@ Public Class ClsGenerales .Add("@Tipo", SqlDbType.VarChar).Value = Tipo .Add("@Id_Clave", SqlDbType.VarChar, 100).Value = Id_Clave .Add("@IdPoliza", SqlDbType.Int).Value = IdPoliza + .Add("@CvePromocion", SqlDbType.Int).Value = CvePromocion End With 'SqlTypes.SqlDateTime.Null diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index a15ada6c8..43eab1487 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -2877,12 +2877,13 @@ Public Class ClsInventarios #End Region #Region "I N V E N T A R I O - F I S I C O - R E S U L T A D O" - Public Function AddInventarioFisicoResultados(CveInventarioFisico As Integer, CveUsuario As Integer) As Boolean + Public Function AddInventarioFisicoResultados(CveInventarioFisico As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_InventarioFisicoResultadoAdd") With SqlAdapter.SelectCommand.Parameters .Add("@CveInventarioFisico", SqlDbType.Int).Value = CveInventarioFisico .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With Try SqlAdapter.Fill(Data) @@ -5488,12 +5489,18 @@ Public Class ClsInventarios End Try Return Retorno End Function - Public Function AddCamiones(Placa As String, Especificacion As String, CveEmpresa As Integer) As Boolean + Public Function AddCamiones(Placa As String, Especificacion As String, CveEmpresa As Integer, Optional ConfigCartaPorte As String = "", Optional Anio As Integer = 0, Optional TipoPermisoSCT As String = "", Optional NumPermisoSCT As String = "", Optional NombreAseguradora As String = "", Optional NumPolizaSeguro As String = "") As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_CamionesAdd") With SqlAdapter.SelectCommand.Parameters .Add("@Placa", SqlDbType.VarChar).Value = Placa .Add("@Especificacion", SqlDbType.VarChar).Value = Especificacion + .Add("@ConfigCartaPorte", SqlDbType.VarChar).Value = ConfigCartaPorte + .Add("@Anio", SqlDbType.Int).Value = Anio + .Add("@TipoPermisoSCT", SqlDbType.VarChar).Value = TipoPermisoSCT + .Add("@NumPermisoSCT", SqlDbType.VarChar).Value = NumPermisoSCT + .Add("@NombreAseguradora", SqlDbType.VarChar).Value = NombreAseguradora + .Add("@NumPolizaSeguro", SqlDbType.VarChar).Value = NumPolizaSeguro .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With Try @@ -5518,13 +5525,19 @@ Public Class ClsInventarios End Try Return Retorno End Function - Public Function UpdateCamiones(CveCamion As Integer, Placa As String, Especificacion As String) As Boolean + Public Function UpdateCamiones(CveCamion As Integer, Placa As String, Especificacion As String, Optional ConfigCartaPorte As String = "", Optional Anio As Integer = 0, Optional TipoPermisoSCT As String = "", Optional NumPermisoSCT As String = "", Optional NombreAseguradora As String = "", Optional NumPolizaSeguro As String = "") As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_CamionesUpdate") With SqlAdapter.SelectCommand.Parameters .Add("@CveCamion", SqlDbType.Int).Value = CveCamion .Add("@Placa", SqlDbType.VarChar).Value = Placa .Add("@Especificacion", SqlDbType.VarChar).Value = Especificacion + .Add("@ConfigCartaPorte", SqlDbType.VarChar).Value = ConfigCartaPorte + .Add("@Anio", SqlDbType.Int).Value = Anio + .Add("@TipoPermisoSCT", SqlDbType.VarChar).Value = TipoPermisoSCT + .Add("@NumPermisoSCT", SqlDbType.VarChar).Value = NumPermisoSCT + .Add("@NombreAseguradora", SqlDbType.VarChar).Value = NombreAseguradora + .Add("@NumPolizaSeguro", SqlDbType.VarChar).Value = NumPolizaSeguro End With Try SqlAdapter.Fill(Data) diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index c0ca015c2..c8a9c42e7 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -1273,7 +1273,7 @@ Public Class ClsVentas Return Retorno End Function - Public Function UpdateVentaDetalleRemision(CveVenta As Integer, CvePS As Integer, Cantidad As Decimal, PU As Decimal, IEPS As Decimal, PorcentajeIEPS As Decimal, IVA As Decimal, PorcentajeIVA As Decimal, Observaciones As String, Optional CveUsuarioModifico As Integer = -1) As Boolean + Public Function UpdateVentaDetalleRemision(CveVenta As Integer, CvePS As Integer, Cantidad As Decimal, PU As Decimal, IEPS As Decimal, PorcentajeIEPS As Decimal, IVA As Decimal, PorcentajeIVA As Decimal, Descuento As Decimal, Observaciones As String, Optional CveUsuarioModifico As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_VentasDetalleRemisionUpdate") @@ -1286,6 +1286,7 @@ Public Class ClsVentas .Add("@PorcentajeIEPS", SqlDbType.Decimal).Value = PorcentajeIEPS .Add("@IVA", SqlDbType.Decimal).Value = IVA .Add("@PorcentajeIVA", SqlDbType.Decimal).Value = PorcentajeIVA + .Add("@Descuento", SqlDbType.Decimal).Value = Descuento .Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones .Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico End With @@ -2561,13 +2562,13 @@ Public Class ClsVentas #End Region #Region " I M P U E S T O S L O C A L E S" - Public Function AddImpuestosLocales(ImpuestoLocal As String, Porcentaje As Double, Orden As Integer, TipoImpuesto As Integer, Estatus As Integer, IdCtaContable As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean + Public Function AddImpuestosLocales(ImpuestoLocal As String, Porcentaje As Decimal, Orden As Integer, TipoImpuesto As Integer, Estatus As Integer, IdCtaContable As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_ImpuestosLocalesAdd") With SqlAdapter.SelectCommand.Parameters .Add("@ImpuestoLocal", SqlDbType.VarChar).Value = ImpuestoLocal - .Add("@Porcentaje", SqlDbType.SmallMoney).Value = Porcentaje + .Add("@Porcentaje", SqlDbType.Decimal).Value = Porcentaje .Add("@Orden", SqlDbType.Int).Value = Orden .Add("@TipoImpuesto", SqlDbType.Int).Value = TipoImpuesto .Add("@Estatus", SqlDbType.Bit).Value = Estatus @@ -2603,14 +2604,14 @@ Public Class ClsVentas Return Retorno End Function - Public Function UpdateImpuestosLocales(CveImpuestoLocal As Integer, ImpuestoLocal As String, Porcentaje As Double, Orden As Integer, TipoImpuesto As Integer, Estatus As Integer, IdCtaContable As Integer) As Boolean + Public Function UpdateImpuestosLocales(CveImpuestoLocal As Integer, ImpuestoLocal As String, Porcentaje As Decimal, Orden As Integer, TipoImpuesto As Integer, Estatus As Integer, IdCtaContable As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_ImpuestosLocalesUpdate") With SqlAdapter.SelectCommand.Parameters .Add("@CveImpuestoLocal", SqlDbType.Int).Value = CveImpuestoLocal .Add("@ImpuestoLocal", SqlDbType.VarChar).Value = ImpuestoLocal - .Add("@Porcentaje", SqlDbType.SmallMoney).Value = Porcentaje + .Add("@Porcentaje", SqlDbType.Decimal).Value = Porcentaje .Add("@TipoImpuesto", SqlDbType.Int).Value = TipoImpuesto .Add("@Orden", SqlDbType.Int).Value = Orden .Add("@Estatus", SqlDbType.Bit).Value = Estatus diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index b36f28a44..7bd11e2fc 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -4615,10 +4615,6 @@ Namespace Modelos '1 NORMAL, 2 CON PAGOS Dim ModalidadRefacturacion As Integer = UsuarioActual.Empresa.Funcionalidad(586).ToEntero() - If UsuarioActual.CveUsuario = 1719 Then - ModalidadRefacturacion = 2 - End If - If EsRefacturacion AndAlso ModalidadRefacturacion <= 0 Then Retorno.Mensaje = "La factura no se puede refacturar debido a que la empresa no tiene asignada una modalidad de refacturación." Retorno.TipoMensaje = TipoMensaje.MsgAdvertencia @@ -9902,6 +9898,7 @@ Namespace Modelos Public Property EsDistribuidor As Boolean Public Property CorreoCotizacion As String Public Property ImprimeNombreSucursal As Integer + Public Property CobranzaCorreo As String End Class diff --git a/App_Code/Timbrado.vb b/App_Code/Timbrado.vb index 25ac07be4..aa405c7f4 100644 --- a/App_Code/Timbrado.vb +++ b/App_Code/Timbrado.vb @@ -1723,7 +1723,7 @@ Public Class Timbrado If Ventas.CveVenta > 0 Then Dim ObjVentas As New ClsVentas() - If ObjVentas.UpdateEstatusFactura(3, FolioFiscal, "", ObjCFDITimbre.Comprobante.Fecha, Ventas.CveVenta, CvePAC:=UsuarioActual.Empresa.CvePAC) Then + If ObjVentas.UpdateEstatusFactura(3, FolioFiscal, "", ObjCFDITimbre.Comprobante.Fecha, Ventas.CveVenta, CvePAC:=UsuarioActual.Empresa.CvePAC, RFCReceptor:=ObjCFDITimbre.Receptor.RFC) Then Retorno = "" Else Retorno = "Error" @@ -2125,6 +2125,77 @@ Public Class Timbrado End If + + +#Region "C O M P L E M E N T O C A R T A P O R T E" + + If ObjCFDITimbre.Complementos.CartaPorte IsNot Nothing Then + If ObjCFDITimbre.Complementos.CartaPorte IsNot Nothing Then + + Dim Carta As CFDICartaPorte = ObjCFDITimbre.Complementos.CartaPorte + + ''DATOS GENERALES + cfdi.CartaPorte(Carta.TranspInternac, Carta.EntradaSalidaMercancia, Carta.ViaEntradaSalida, Carta.TotalDistanciaRecorrida) + + 'UBICACIONES + If Carta.Ubicaciones IsNot Nothing AndAlso Carta.Ubicaciones.Count > 0 Then + For Each ubica As CFDICartaPorteUbicaciones In Carta.Ubicaciones + 'origen + cfdi.CartaPorteUbicacion(ubica.TipoEstacion, ubica.DistanciaRecorrida) + cfdi.CartaPorteOrigen(ubica.Origen.IDOrigen, ubica.Origen.RFCRemitente, ubica.Origen.NombreRemitente, ubica.Origen.NumRegIdTrib, ubica.Origen.ResidenciaFiscal, ubica.Origen.NumEstacion, ubica.Origen.NombreEstacion, ubica.Origen.NavegacionTrafico, ubica.Origen.FechaHoraSalida) + cfdi.CartaPorteDomicilio(ubica.Origen.Domicilio.Calle, ubica.Origen.Domicilio.NumeroExterior, ubica.Origen.Domicilio.NumeroInterior, ubica.Origen.Domicilio.Colonia, ubica.Origen.Domicilio.Localidad, ubica.Origen.Domicilio.Referencia, ubica.Origen.Domicilio.Municipio, ubica.Origen.Domicilio.Estado, ubica.Origen.Domicilio.Pais, ubica.Origen.Domicilio.CP) + 'destino + cfdi.CartaPorteUbicacion(ubica.TipoEstacion, ubica.DistanciaRecorrida) + cfdi.CartaPorteDestino(ubica.Destino.IDDestino, ubica.Destino.RFCDestinatario, ubica.Destino.NombreDestinatario, ubica.Destino.NumRegIdTrib, ubica.Destino.ResidenciaFiscal, ubica.Destino.NumEstacion, ubica.Destino.NombreEstacion, ubica.Destino.NavegacionTrafico, ubica.Destino.FechaHoraProgLlegada) + cfdi.CartaPorteDomicilio(ubica.Destino.Domicilio.Calle, ubica.Destino.Domicilio.NumeroExterior, ubica.Destino.Domicilio.NumeroInterior, ubica.Destino.Domicilio.Colonia, ubica.Destino.Domicilio.Localidad, ubica.Destino.Domicilio.Referencia, ubica.Destino.Domicilio.Municipio, ubica.Destino.Domicilio.Estado, ubica.Destino.Domicilio.Pais, ubica.Destino.Domicilio.CP) + Next + + End If + + 'MERCANCIAS + If Carta.Mercancias IsNot Nothing Then + cfdi.CartaPorteMercancias(Carta.Mercancias.PesoBrutoTotal, Carta.Mercancias.UnidadPeso, Carta.Mercancias.PesoNetoTotal, Carta.Mercancias.NumTotalMercancias, Carta.Mercancias.CargoporTasacion) + If Carta.Mercancias IsNot Nothing AndAlso Carta.Mercancias.Mercancias.Count > 0 Then + For Each concep As CFDICartaPorteMercancia In Carta.Mercancias.Mercancias + cfdi.CartaPorteMercancia(concep.BienesTransp, concep.ClaveSTCC, concep.Descripción, concep.Cantidad, concep.ClaveUnidad, concep.Unidad, concep.Dimensiones, concep.MaterialPeligroso, concep.ClaveMaterialPeligroso, concep.Embalaje, concep.DescripEmbalaje, concep.PesoenKg, concep.ValorMercancia, concep.Moneda, concep.FraccionArrancelaria, concep.UUIDComercioExt) + Next + End If + End If + + ' + If Carta.FiguraTransporte IsNot Nothing Then + + If Carta.FiguraTransporte.AutoTransporteFederal IsNot Nothing Then + + cfdi.CartaPorteAutotransporteFederal(Carta.FiguraTransporte.AutoTransporteFederal.PermSCT, Carta.FiguraTransporte.AutoTransporteFederal.NumPermisoSCT, Carta.FiguraTransporte.AutoTransporteFederal.NombreAseg, Carta.FiguraTransporte.AutoTransporteFederal.NumPolizaSeguro) + + cfdi.CartaPorteIdentificacionVehicular(Carta.FiguraTransporte.AutoTransporteFederal.Vehiculo.ConfigVehicular, Carta.FiguraTransporte.AutoTransporteFederal.Vehiculo.PlacaVM, Carta.FiguraTransporte.AutoTransporteFederal.Vehiculo.AnioModeloVM) + + If Carta.FiguraTransporte.AutoTransporteFederal.Remolques IsNot Nothing AndAlso Carta.FiguraTransporte.AutoTransporteFederal.Remolques.Count > 0 Then + For Each concep As CFDICartaPorteRemolque In Carta.FiguraTransporte.AutoTransporteFederal.Remolques + cfdi.CartaPorteRemolque(concep.SubTipoRemolque, concep.Placa) + Next + + End If + End If + + cfdi.CartaPorteFiguraTransporte(Carta.FiguraTransporte.ClaveTransporte) + + If Carta.FiguraTransporte.Operadores IsNot Nothing AndAlso Carta.FiguraTransporte.Operadores.Count > 0 Then + For Each concep As CFDICartaPorteOperador In Carta.FiguraTransporte.Operadores + cfdi.CartaPorteOperador(concep.RFCOperador, concep.NumLicencia, concep.NombreOperador, concep.NumRegidTribOperador, concep.ResidenciaFiscalOperador) + Next + End If + + End If + + End If + + End If + +#End Region + + #Region "Complemento Pago" If ObjCFDITimbre.Comprobante.TipoComprobante = "P" Then @@ -2344,7 +2415,7 @@ Public Class Timbrado Using ObjVentas As New ClsVentas() - If ObjVentas.UpdateEstatusFactura(3, FolioFiscal, "", ObjCFDITimbre.Comprobante.Fecha, Ventas.CveVenta, CvePAC:=CvePACEspecial) Then + If ObjVentas.UpdateEstatusFactura(3, FolioFiscal, "", ObjCFDITimbre.Comprobante.Fecha, Ventas.CveVenta, CvePAC:=CvePACEspecial, RFCReceptor:=ObjCFDITimbre.Receptor.RFC) Then Retorno = "" Else Retorno = "Error" @@ -3132,6 +3203,7 @@ Public Class Timbrado Dim NombreArchivoXML As String = $"{ObjCFDITimbre.Comprobante.SerieFolio}" Dim SubTotal As Decimal = 0 Dim AmbienteProductivo As Boolean = True + Dim NumDecimalesImporte As Integer = 2 If Not Directory.Exists(RutaArchivo) Then Directory.CreateDirectory(RutaArchivo) If Not UsuarioActual.Empresa.FacturaProduccion OrElse UsuarioActual.CveEmpresa = 1 Then @@ -3220,19 +3292,19 @@ Public Class Timbrado comprobante.Version = "3.3" comprobante.Fecha = ObjCFDITimbre.Comprobante.Fecha comprobante.FormaPago = ObjCFDITimbre.Comprobante.FormadePago - If ObjCFDITimbre.Comprobante.TipoComprobante <> "P" Then comprobante.CondicionesDePago = ObjCFDITimbre.Comprobante.CondicionesdePago + If ObjCFDITimbre.Comprobante.TipoComprobante.Contiene("I", "E", "N") Then comprobante.CondicionesDePago = ObjCFDITimbre.Comprobante.CondicionesdePago - comprobante.SubTotal = ObjCFDITimbre.Comprobante.Subtotal - If ObjCFDITimbre.Comprobante.TipoComprobante <> "P" Then + comprobante.SubTotal = ObjCFDITimbre.Comprobante.Subtotal.RoundSQL(NumDecimalesImporte) + If ObjCFDITimbre.Comprobante.TipoComprobante.Contiene("I", "E", "N") Then If ObjCFDITimbre.Comprobante.Descuentos > 0 Then comprobante.DescuentoSpecified = True - comprobante.Descuento = ObjCFDITimbre.Comprobante.Descuentos + comprobante.Descuento = ObjCFDITimbre.Comprobante.Descuentos.RoundSQL(NumDecimalesImporte) End If End If comprobante.Moneda = ObjCFDITimbre.Comprobante.Moneda comprobante.TipoCambio = ObjCFDITimbre.Comprobante.TipoCambio.ToDecimal comprobante.TipoCambioSpecified = If(ObjCFDITimbre.Comprobante.Moneda <> "XXX", True, False) - comprobante.Total = ObjCFDITimbre.Comprobante.Total + comprobante.Total = ObjCFDITimbre.Comprobante.Total.RoundSQL(NumDecimalesImporte) comprobante.TipoDeComprobante = ObjCFDITimbre.Comprobante.TipoComprobante comprobante.FormaPagoSpecified = If(ObjCFDITimbre.Comprobante.FormadePago <> "", True, False) comprobante.MetodoPago = ObjCFDITimbre.Comprobante.MetodoPago @@ -3274,7 +3346,7 @@ Public Class Timbrado comprobante.Conceptos(i).ClaveUnidad = concep.ClaveUnidad comprobante.Conceptos(i).Descripcion = concep.Descripcion comprobante.Conceptos(i).ValorUnitario = concep.ValorUnitario - comprobante.Conceptos(i).Importe = concep.Importe + comprobante.Conceptos(i).Importe = concep.Importe.RoundSQL(NumDecimalesImporte) comprobante.Conceptos(i).ClaveProdServ = concep.ClaveProdServ If ObjCFDITimbre.Comprobante.TipoComprobante <> "P" Then @@ -3310,7 +3382,7 @@ Public Class Timbrado comprobante.Conceptos(i).Impuestos.Traslados(j).Base = imp.Base comprobante.Conceptos(i).Impuestos.Traslados(j).Impuesto = imp.Impuesto comprobante.Conceptos(i).Impuestos.Traslados(j).TipoFactor = imp.TipoFactor - comprobante.Conceptos(i).Impuestos.Traslados(j).Importe = imp.Importe + comprobante.Conceptos(i).Impuestos.Traslados(j).Importe = imp.Importe.RoundSQL(NumDecimalesImporte) comprobante.Conceptos(i).Impuestos.Traslados(j).ImporteSpecified = True comprobante.Conceptos(i).Impuestos.Traslados(j).TasaOCuota = imp.TasaOCuota.FormatoNumero(6) comprobante.Conceptos(i).Impuestos.Traslados(j).TasaOCuotaSpecified = True @@ -3320,7 +3392,7 @@ Public Class Timbrado comprobante.Conceptos(i).Impuestos.Retenciones(k).Base = imp.Base comprobante.Conceptos(i).Impuestos.Retenciones(k).Impuesto = imp.Impuesto comprobante.Conceptos(i).Impuestos.Retenciones(k).TipoFactor = imp.TipoFactor - comprobante.Conceptos(i).Impuestos.Retenciones(k).Importe = imp.Importe + comprobante.Conceptos(i).Impuestos.Retenciones(k).Importe = imp.Importe.RoundSQL(NumDecimalesImporte) comprobante.Conceptos(i).Impuestos.Retenciones(k).TasaOCuota = imp.TasaOCuota.ToString.ToDecimal k += 1 End If @@ -3597,7 +3669,7 @@ Public Class Timbrado ComPag.Pago(0).FechaPago = ObjCFDITimbre.ComplementoPagos.FechaPago.ToString("yyyy-MM-ddTHH:mm:ss").ToDate() ComPag.Pago(0).FormaDePagoP = ObjCFDITimbre.ComplementoPagos.FormaDePagoP ComPag.Pago(0).MonedaP = ObjCFDITimbre.ComplementoPagos.MonedaP - ComPag.Pago(0).TipoCadPagoSpecified = If(ObjCFDITimbre.ComplementoPagos.MonedaP = "MXN", False, True) + ComPag.Pago(0).TipoCambioPSpecified = If(ObjCFDITimbre.ComplementoPagos.MonedaP = "MXN", False, True) ComPag.Pago(0).TipoCambioP = ObjCFDITimbre.ComplementoPagos.TipoCambioP.ToDecimal ComPag.Pago(0).Monto = ObjCFDITimbre.ComplementoPagos.Monto.ToDecimal If ObjCFDITimbre.ComplementoPagos.NumOperacion <> "" Then @@ -3618,7 +3690,11 @@ Public Class Timbrado If ObjCFDITimbre.ComplementoPagos.CtaBeneficiario <> "" Then ComPag.Pago(0).CtaBeneficiario = ObjCFDITimbre.ComplementoPagos.CtaBeneficiario End If - ComPag.Pago(0).TipoCadPago = ObjCFDITimbre.ComplementoPagos.TipoCadPago + If ObjCFDITimbre.ComplementoPagos.TipoCadPago <> "" Then + ComPag.Pago(0).TipoCadPagoSpecified = True + ComPag.Pago(0).TipoCadPago = ObjCFDITimbre.ComplementoPagos.TipoCadPago + End If + If ObjCFDITimbre.ComplementoPagos.CertPago <> "" Then ComPag.Pago(0).CertPago = System.Text.Encoding.Default.GetBytes(ObjCFDITimbre.ComplementoPagos.CertPago).ToString End If @@ -3868,191 +3944,191 @@ Public Class Timbrado #End Region -#Region "Detallista" - If Ventas.Cliente.AplicaDetallista Then - Dim detallista As Profact.TimbraCFDI33.Complementos.Detallista.detallista = New Profact.TimbraCFDI33.Complementos.Detallista.detallista - detallista.type = "SimpleInvoiceType" - detallista.contentVersion = "1.3.1" - detallista.documentStructureVersion = "AMC8.1" - detallista.documentStatus = Profact.TimbraCFDI33.Complementos.Detallista.detallistaDocumentStatus.ORIGINAL + '#Region "Detallista" + ' If Ventas.Cliente.AplicaDetallista Then + ' Dim detallista As Profact.TimbraCFDI33.Complementos.Detallista.detallista = New Profact.TimbraCFDI33.Complementos.Detallista.detallista + ' detallista.type = "SimpleInvoiceType" + ' detallista.contentVersion = "1.3.1" + ' detallista.documentStructureVersion = "AMC8.1" + ' detallista.documentStatus = Profact.TimbraCFDI33.Complementos.Detallista.detallistaDocumentStatus.ORIGINAL - detallista.DeliveryNote = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaDeliveryNote - detallista.DeliveryNote.referenceIdentification = New String((1)) {} - detallista.DeliveryNote.referenceIdentification(0) = "1" - detallista.DeliveryNote.ReferenceDate = New DateTime - detallista.DeliveryNote.ReferenceDate = comprobante.Fecha - detallista.DeliveryNote.ReferenceDateSpecified = True + ' detallista.DeliveryNote = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaDeliveryNote + ' detallista.DeliveryNote.referenceIdentification = New String((1)) {} + ' detallista.DeliveryNote.referenceIdentification(0) = "1" + ' detallista.DeliveryNote.ReferenceDate = New DateTime + ' detallista.DeliveryNote.ReferenceDate = comprobante.Fecha + ' detallista.DeliveryNote.ReferenceDateSpecified = True - detallista.requestForPaymentIdentification = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaRequestForPaymentIdentification - detallista.requestForPaymentIdentification.entityType = Profact.TimbraCFDI33.Complementos.Detallista.detallistaRequestForPaymentIdentificationEntityType.INVOICE + ' detallista.requestForPaymentIdentification = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaRequestForPaymentIdentification + ' detallista.requestForPaymentIdentification.entityType = Profact.TimbraCFDI33.Complementos.Detallista.detallistaRequestForPaymentIdentificationEntityType.INVOICE - detallista.specialInstruction = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaSpecialInstruction((1)) {} - detallista.specialInstruction(0) = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaSpecialInstruction - detallista.specialInstruction(0).code = Profact.TimbraCFDI33.Complementos.Detallista.detallistaSpecialInstructionCode.ZZZ - Dim TotalTexto = New String() {Ventas.TotalTC.ToString.ToDouble.Texto2Letras.ToUpper()} - Dim propertyInfo = detallista.specialInstruction(0).GetType().GetProperty("text") - propertyInfo.SetValue(detallista.specialInstruction(0), Convert.ChangeType(TotalTexto, propertyInfo.PropertyType), Nothing) + ' detallista.specialInstruction = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaSpecialInstruction((1)) {} + ' detallista.specialInstruction(0) = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaSpecialInstruction + ' detallista.specialInstruction(0).code = Profact.TimbraCFDI33.Complementos.Detallista.detallistaSpecialInstructionCode.ZZZ + ' Dim TotalTexto = New String() {Ventas.TotalTC.ToString.ToDouble.Texto2Letras.ToUpper()} + ' Dim propertyInfo = detallista.specialInstruction(0).GetType().GetProperty("text") + ' propertyInfo.SetValue(detallista.specialInstruction(0), Convert.ChangeType(TotalTexto, propertyInfo.PropertyType), Nothing) - detallista.orderIdentification = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaOrderIdentification - detallista.orderIdentification.referenceIdentification = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaOrderIdentificationReferenceIdentification((1)) {} - detallista.orderIdentification.referenceIdentification(0) = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaOrderIdentificationReferenceIdentification - detallista.orderIdentification.referenceIdentification(0).type = Profact.TimbraCFDI33.Complementos.Detallista.detallistaOrderIdentificationReferenceIdentificationType.ON - detallista.orderIdentification.referenceIdentification(0).Value = Ventas.Det_OrdenCompra - detallista.orderIdentification.ReferenceDateSpecified = True - detallista.orderIdentification.ReferenceDate = Ventas.Det_FechaOrdenCompra.ToDate() + ' detallista.orderIdentification = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaOrderIdentification + ' detallista.orderIdentification.referenceIdentification = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaOrderIdentificationReferenceIdentification((1)) {} + ' detallista.orderIdentification.referenceIdentification(0) = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaOrderIdentificationReferenceIdentification + ' detallista.orderIdentification.referenceIdentification(0).type = Profact.TimbraCFDI33.Complementos.Detallista.detallistaOrderIdentificationReferenceIdentificationType.ON + ' detallista.orderIdentification.referenceIdentification(0).Value = Ventas.Det_OrdenCompra + ' detallista.orderIdentification.ReferenceDateSpecified = True + ' detallista.orderIdentification.ReferenceDate = Ventas.Det_FechaOrdenCompra.ToDate() - detallista.AdditionalInformation = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaReferenceIdentification((1)) {} - detallista.AdditionalInformation(0) = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaReferenceIdentification - detallista.AdditionalInformation(0).type = Profact.TimbraCFDI33.Complementos.Detallista.detallistaReferenceIdentificationType.ATZ - detallista.AdditionalInformation(0).Value = Ventas.Det_ContraRecibo + ' detallista.AdditionalInformation = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaReferenceIdentification((1)) {} + ' detallista.AdditionalInformation(0) = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaReferenceIdentification + ' detallista.AdditionalInformation(0).type = Profact.TimbraCFDI33.Complementos.Detallista.detallistaReferenceIdentificationType.ATZ + ' detallista.AdditionalInformation(0).Value = Ventas.Det_ContraRecibo - detallista.DeliveryNote = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaDeliveryNote - detallista.DeliveryNote.ReferenceDate = Ventas.Det_FechaOrdenCompra.ToDate - detallista.DeliveryNote.referenceIdentification = New String((1)) {} - detallista.DeliveryNote.referenceIdentification(0) = Ventas.Det_ContraRecibo + ' detallista.DeliveryNote = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaDeliveryNote + ' detallista.DeliveryNote.ReferenceDate = Ventas.Det_FechaOrdenCompra.ToDate + ' detallista.DeliveryNote.referenceIdentification = New String((1)) {} + ' detallista.DeliveryNote.referenceIdentification(0) = Ventas.Det_ContraRecibo - detallista.buyer = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaBuyer - detallista.buyer.gln = Ventas.Cliente.Detallista_GLNComprador - detallista.buyer.contactInformation = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaBuyerContactInformation - detallista.buyer.contactInformation.personOrDepartmentName = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaBuyerContactInformationPersonOrDepartmentName - detallista.buyer.contactInformation.personOrDepartmentName.text = Ventas.Cliente.Detallista_Departamento + ' detallista.buyer = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaBuyer + ' detallista.buyer.gln = Ventas.Cliente.Detallista_GLNComprador + ' detallista.buyer.contactInformation = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaBuyerContactInformation + ' detallista.buyer.contactInformation.personOrDepartmentName = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaBuyerContactInformationPersonOrDepartmentName + ' detallista.buyer.contactInformation.personOrDepartmentName.text = Ventas.Cliente.Detallista_Departamento - detallista.seller = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaSeller - detallista.seller.gln = Ventas.Cliente.Detallista_GLNVendedor - detallista.seller.alternatePartyIdentification = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaSellerAlternatePartyIdentification - detallista.seller.alternatePartyIdentification.type = Profact.TimbraCFDI33.Complementos.Detallista.detallistaSellerAlternatePartyIdentificationType.SELLER_ASSIGNED_IDENTIFIER_FOR_A_PARTY - detallista.seller.alternatePartyIdentification.Value = Ventas.Cliente.Detallista_NumProveedor + ' detallista.seller = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaSeller + ' detallista.seller.gln = Ventas.Cliente.Detallista_GLNVendedor + ' detallista.seller.alternatePartyIdentification = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaSellerAlternatePartyIdentification + ' detallista.seller.alternatePartyIdentification.type = Profact.TimbraCFDI33.Complementos.Detallista.detallistaSellerAlternatePartyIdentificationType.SELLER_ASSIGNED_IDENTIFIER_FOR_A_PARTY + ' detallista.seller.alternatePartyIdentification.Value = Ventas.Cliente.Detallista_NumProveedor - 'detallista.shipTo = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaShipTo - 'detallista.shipTo.gln = "0000000000000" - 'detallista.shipTo.nameAndAddress = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaShipToNameAndAddress - 'detallista.shipTo.nameAndAddress.name = New String((1)) {} - 'detallista.shipTo.nameAndAddress.name(0) = Ventas.Cliente.Direccion - 'detallista.shipTo.nameAndAddress.streetAddressOne = New String((1)) {} - 'detallista.shipTo.nameAndAddress.streetAddressOne(0) = Ventas.Cliente.NoInt - 'detallista.shipTo.nameAndAddress.city = New String((1)) {} - 'detallista.shipTo.nameAndAddress.city(0) = Ventas.Cliente.Ciudad - 'detallista.shipTo.nameAndAddress.postalCode = New String((1)) {} - 'detallista.shipTo.nameAndAddress.postalCode(0) = Ventas.Cliente.CP + ' 'detallista.shipTo = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaShipTo + ' 'detallista.shipTo.gln = "0000000000000" + ' 'detallista.shipTo.nameAndAddress = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaShipToNameAndAddress + ' 'detallista.shipTo.nameAndAddress.name = New String((1)) {} + ' 'detallista.shipTo.nameAndAddress.name(0) = Ventas.Cliente.Direccion + ' 'detallista.shipTo.nameAndAddress.streetAddressOne = New String((1)) {} + ' 'detallista.shipTo.nameAndAddress.streetAddressOne(0) = Ventas.Cliente.NoInt + ' 'detallista.shipTo.nameAndAddress.city = New String((1)) {} + ' 'detallista.shipTo.nameAndAddress.city(0) = Ventas.Cliente.Ciudad + ' 'detallista.shipTo.nameAndAddress.postalCode = New String((1)) {} + ' 'detallista.shipTo.nameAndAddress.postalCode(0) = Ventas.Cliente.CP - detallista.paymentTerms = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaPaymentTerms - detallista.paymentTerms.netPayment = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaPaymentTermsNetPayment - detallista.paymentTerms.netPayment.paymentTimePeriod = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaPaymentTermsNetPaymentPaymentTimePeriod - detallista.paymentTerms.netPayment.paymentTimePeriod.timePeriodDue = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaPaymentTermsNetPaymentPaymentTimePeriodTimePeriodDue - detallista.paymentTerms.netPayment.paymentTimePeriod.timePeriodDue.timePeriod = Profact.TimbraCFDI33.Complementos.Detallista.detallistaPaymentTermsNetPaymentPaymentTimePeriodTimePeriodDueTimePeriod.DAYS - detallista.paymentTerms.netPayment.paymentTimePeriod.timePeriodDue.value = "0" + ' detallista.paymentTerms = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaPaymentTerms + ' detallista.paymentTerms.netPayment = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaPaymentTermsNetPayment + ' detallista.paymentTerms.netPayment.paymentTimePeriod = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaPaymentTermsNetPaymentPaymentTimePeriod + ' detallista.paymentTerms.netPayment.paymentTimePeriod.timePeriodDue = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaPaymentTermsNetPaymentPaymentTimePeriodTimePeriodDue + ' detallista.paymentTerms.netPayment.paymentTimePeriod.timePeriodDue.timePeriod = Profact.TimbraCFDI33.Complementos.Detallista.detallistaPaymentTermsNetPaymentPaymentTimePeriodTimePeriodDueTimePeriod.DAYS + ' detallista.paymentTerms.netPayment.paymentTimePeriod.timePeriodDue.value = "0" - detallista.paymentTerms.discountPayment = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaPaymentTermsDiscountPayment - detallista.paymentTerms.discountPayment.percentage = If(Ventas.DescuentoTC > 0 AndAlso Ventas.SubTotalTC > 0, (Ventas.DescuentoTC * 100) / Ventas.SubTotalTC, 0).ToString().FormatoNumero() + ' detallista.paymentTerms.discountPayment = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaPaymentTermsDiscountPayment + ' detallista.paymentTerms.discountPayment.percentage = If(Ventas.DescuentoTC > 0 AndAlso Ventas.SubTotalTC > 0, (Ventas.DescuentoTC * 100) / Ventas.SubTotalTC, 0).ToString().FormatoNumero() - detallista.currency = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaCurrency((1)) {} - detallista.currency(0) = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaCurrency - detallista.currency(0).currencyISOCode = If(Ventas.CveMoneda = 1, Profact.TimbraCFDI33.Complementos.Detallista.detallistaCurrencyCurrencyISOCode.MXN, Profact.TimbraCFDI33.Complementos.Detallista.detallistaCurrencyCurrencyISOCode.USD) - detallista.currency(0).currencyFunction = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaCurrencyCurrencyFunction((1)) {} - detallista.currency(0).currencyFunction(0) = Profact.TimbraCFDI33.Complementos.Detallista.detallistaCurrencyCurrencyFunction.BILLING_CURRENCY - detallista.currency(0).rateOfChangeSpecified = True - detallista.currency(0).rateOfChange = 1 + ' detallista.currency = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaCurrency((1)) {} + ' detallista.currency(0) = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaCurrency + ' detallista.currency(0).currencyISOCode = If(Ventas.CveMoneda = 1, Profact.TimbraCFDI33.Complementos.Detallista.detallistaCurrencyCurrencyISOCode.MXN, Profact.TimbraCFDI33.Complementos.Detallista.detallistaCurrencyCurrencyISOCode.USD) + ' detallista.currency(0).currencyFunction = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaCurrencyCurrencyFunction((1)) {} + ' detallista.currency(0).currencyFunction(0) = Profact.TimbraCFDI33.Complementos.Detallista.detallistaCurrencyCurrencyFunction.BILLING_CURRENCY + ' detallista.currency(0).rateOfChangeSpecified = True + ' detallista.currency(0).rateOfChange = 1 - detallista.allowanceCharge = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaAllowanceCharge(1) {} - detallista.allowanceCharge(0) = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaAllowanceCharge - detallista.allowanceCharge(0).monetaryAmountOrPercentage = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaAllowanceChargeMonetaryAmountOrPercentage - detallista.allowanceCharge(0).monetaryAmountOrPercentage.rate = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaAllowanceChargeMonetaryAmountOrPercentageRate - detallista.allowanceCharge(0).monetaryAmountOrPercentage.rate.base = Profact.TimbraCFDI33.Complementos.Detallista.detallistaAllowanceChargeMonetaryAmountOrPercentageRateBase.INVOICE_VALUE - detallista.allowanceCharge(0).monetaryAmountOrPercentage.rate.percentage = If(Ventas.DescuentoTC > 0 AndAlso Ventas.SubTotalTC > 0, (Ventas.DescuentoTC * 100) / Ventas.SubTotalTC, 0) + ' detallista.allowanceCharge = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaAllowanceCharge(1) {} + ' detallista.allowanceCharge(0) = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaAllowanceCharge + ' detallista.allowanceCharge(0).monetaryAmountOrPercentage = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaAllowanceChargeMonetaryAmountOrPercentage + ' detallista.allowanceCharge(0).monetaryAmountOrPercentage.rate = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaAllowanceChargeMonetaryAmountOrPercentageRate + ' detallista.allowanceCharge(0).monetaryAmountOrPercentage.rate.base = Profact.TimbraCFDI33.Complementos.Detallista.detallistaAllowanceChargeMonetaryAmountOrPercentageRateBase.INVOICE_VALUE + ' detallista.allowanceCharge(0).monetaryAmountOrPercentage.rate.percentage = If(Ventas.DescuentoTC > 0 AndAlso Ventas.SubTotalTC > 0, (Ventas.DescuentoTC * 100) / Ventas.SubTotalTC, 0) - Dim articuloCounter As Integer = 0 - For Each concepto As Profact.TimbraCFDI33.ComprobanteConcepto In comprobante.Conceptos - articuloCounter = (articuloCounter + 1) - Next - detallista.lineItem = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItem((articuloCounter)) {} - Dim counter As Integer = 0 - For Each concepto As Profact.TimbraCFDI33.ComprobanteConcepto In comprobante.Conceptos - detallista.lineItem(counter) = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItem - detallista.lineItem(counter).type = "SimpleInvoiceLineItemType" - detallista.lineItem(counter).number = (counter + 1).ToString - detallista.lineItem(counter).tradeItemIdentification = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemTradeItemIdentification - detallista.lineItem(counter).tradeItemIdentification.gtin = comprobante.Conceptos(counter).NoIdentificacion - detallista.lineItem(counter).alternateTradeItemIdentification = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemAlternateTradeItemIdentification(1) {} - detallista.lineItem(counter).alternateTradeItemIdentification(0) = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemAlternateTradeItemIdentification - detallista.lineItem(counter).alternateTradeItemIdentification(0).type = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemAlternateTradeItemIdentificationType - detallista.lineItem(counter).alternateTradeItemIdentification(0).type = Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemAlternateTradeItemIdentificationType.BUYER_ASSIGNED - detallista.lineItem(counter).tradeItemDescriptionInformation = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemTradeItemDescriptionInformation - If (comprobante.Conceptos(counter).Descripcion.Length > 34) Then - detallista.lineItem(counter).tradeItemDescriptionInformation.longText = comprobante.Conceptos(counter).Descripcion.Substring(0, 34) - Else - detallista.lineItem(counter).tradeItemDescriptionInformation.longText = comprobante.Conceptos(counter).Descripcion - End If - detallista.lineItem(counter).invoicedQuantity = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemInvoicedQuantity - detallista.lineItem(counter).invoicedQuantity.unitOfMeasure = comprobante.Conceptos(counter).Unidad - detallista.lineItem(counter).invoicedQuantity.Text = New String((1)) {} - detallista.lineItem(counter).invoicedQuantity.Text(0) = comprobante.Conceptos(counter).Cantidad.ToString + ' Dim articuloCounter As Integer = 0 + ' For Each concepto As Profact.TimbraCFDI33.ComprobanteConcepto In comprobante.Conceptos + ' articuloCounter = (articuloCounter + 1) + ' Next + ' detallista.lineItem = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItem((articuloCounter)) {} + ' Dim counter As Integer = 0 + ' For Each concepto As Profact.TimbraCFDI33.ComprobanteConcepto In comprobante.Conceptos + ' detallista.lineItem(counter) = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItem + ' detallista.lineItem(counter).type = "SimpleInvoiceLineItemType" + ' detallista.lineItem(counter).number = (counter + 1).ToString + ' detallista.lineItem(counter).tradeItemIdentification = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemTradeItemIdentification + ' detallista.lineItem(counter).tradeItemIdentification.gtin = comprobante.Conceptos(counter).NoIdentificacion + ' detallista.lineItem(counter).alternateTradeItemIdentification = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemAlternateTradeItemIdentification(1) {} + ' detallista.lineItem(counter).alternateTradeItemIdentification(0) = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemAlternateTradeItemIdentification + ' detallista.lineItem(counter).alternateTradeItemIdentification(0).type = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemAlternateTradeItemIdentificationType + ' detallista.lineItem(counter).alternateTradeItemIdentification(0).type = Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemAlternateTradeItemIdentificationType.BUYER_ASSIGNED + ' detallista.lineItem(counter).tradeItemDescriptionInformation = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemTradeItemDescriptionInformation + ' If (comprobante.Conceptos(counter).Descripcion.Length > 34) Then + ' detallista.lineItem(counter).tradeItemDescriptionInformation.longText = comprobante.Conceptos(counter).Descripcion.Substring(0, 34) + ' Else + ' detallista.lineItem(counter).tradeItemDescriptionInformation.longText = comprobante.Conceptos(counter).Descripcion + ' End If + ' detallista.lineItem(counter).invoicedQuantity = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemInvoicedQuantity + ' detallista.lineItem(counter).invoicedQuantity.unitOfMeasure = comprobante.Conceptos(counter).Unidad + ' detallista.lineItem(counter).invoicedQuantity.Text = New String((1)) {} + ' detallista.lineItem(counter).invoicedQuantity.Text(0) = comprobante.Conceptos(counter).Cantidad.ToString - detallista.lineItem(counter).aditionalQuantity = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemAditionalQuantity(1) {} - detallista.lineItem(counter).aditionalQuantity(0) = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemAditionalQuantity - detallista.lineItem(counter).aditionalQuantity(0).QuantityType = Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemAditionalQuantityQuantityType.NUM_CONSUMER_UNITS - detallista.lineItem(counter).aditionalQuantity(0).Text = New String((1)) {} - detallista.lineItem(counter).aditionalQuantity(0).Text(0) = "1" + ' detallista.lineItem(counter).aditionalQuantity = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemAditionalQuantity(1) {} + ' detallista.lineItem(counter).aditionalQuantity(0) = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemAditionalQuantity + ' detallista.lineItem(counter).aditionalQuantity(0).QuantityType = Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemAditionalQuantityQuantityType.NUM_CONSUMER_UNITS + ' detallista.lineItem(counter).aditionalQuantity(0).Text = New String((1)) {} + ' detallista.lineItem(counter).aditionalQuantity(0).Text(0) = "1" - detallista.lineItem(counter).grossPrice = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemGrossPrice - detallista.lineItem(counter).grossPrice.Amount = comprobante.Conceptos(counter).ValorUnitario + ' detallista.lineItem(counter).grossPrice = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemGrossPrice + ' detallista.lineItem(counter).grossPrice.Amount = comprobante.Conceptos(counter).ValorUnitario - detallista.lineItem(counter).netPrice = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemNetPrice - detallista.lineItem(counter).netPrice.Amount = comprobante.Conceptos(counter).ValorUnitario + ' detallista.lineItem(counter).netPrice = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemNetPrice + ' detallista.lineItem(counter).netPrice.Amount = comprobante.Conceptos(counter).ValorUnitario - detallista.lineItem(counter).AdditionalInformation = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemAdditionalInformation - detallista.lineItem(counter).AdditionalInformation.referenceIdentification = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemAdditionalInformationReferenceIdentification - detallista.lineItem(counter).AdditionalInformation.referenceIdentification.type = Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemAdditionalInformationReferenceIdentificationType.ON - detallista.lineItem(counter).AdditionalInformation.referenceIdentification.Value = "1587" - 'Impuestos - Dim tasa As Decimal = 0 - Dim importeImp As Decimal = 0 - Try - If (Not (comprobante.Impuestos.Traslados) Is Nothing) Then - For Each traslado As Profact.TimbraCFDI33.ComprobanteImpuestosTraslado In comprobante.Impuestos.Traslados - tasa = Decimal.Parse(traslado.TasaOCuota) - importeImp = (comprobante.Conceptos(counter).Importe * (tasa / 100)) - Next - End If + ' detallista.lineItem(counter).AdditionalInformation = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemAdditionalInformation + ' detallista.lineItem(counter).AdditionalInformation.referenceIdentification = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemAdditionalInformationReferenceIdentification + ' detallista.lineItem(counter).AdditionalInformation.referenceIdentification.type = Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemAdditionalInformationReferenceIdentificationType.ON + ' detallista.lineItem(counter).AdditionalInformation.referenceIdentification.Value = "1587" + ' 'Impuestos + ' Dim tasa As Decimal = 0 + ' Dim importeImp As Decimal = 0 + ' Try + ' If (Not (comprobante.Impuestos.Traslados) Is Nothing) Then + ' For Each traslado As Profact.TimbraCFDI33.ComprobanteImpuestosTraslado In comprobante.Impuestos.Traslados + ' tasa = Decimal.Parse(traslado.TasaOCuota) + ' importeImp = (comprobante.Conceptos(counter).Importe * (tasa / 100)) + ' Next + ' End If - Catch ex As System.Exception + ' Catch ex As System.Exception - End Try + ' End Try - detallista.lineItem(counter).tradeItemTaxInformation = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemTradeItemTaxInformation(1) {} - detallista.lineItem(counter).tradeItemTaxInformation(0) = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemTradeItemTaxInformation - detallista.lineItem(counter).tradeItemTaxInformation(0).taxTypeDescription = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemTradeItemTaxInformationTaxTypeDescription - detallista.lineItem(counter).tradeItemTaxInformation(0).taxTypeDescription = Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemTradeItemTaxInformationTaxTypeDescription.VAT - detallista.lineItem(counter).tradeItemTaxInformation(0).tradeItemTaxAmount = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemTradeItemTaxInformationTradeItemTaxAmount - detallista.lineItem(counter).tradeItemTaxInformation(0).tradeItemTaxAmount.taxPercentage = tasa - detallista.lineItem(counter).tradeItemTaxInformation(0).tradeItemTaxAmount.taxAmount = importeImp + ' detallista.lineItem(counter).tradeItemTaxInformation = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemTradeItemTaxInformation(1) {} + ' detallista.lineItem(counter).tradeItemTaxInformation(0) = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemTradeItemTaxInformation + ' detallista.lineItem(counter).tradeItemTaxInformation(0).taxTypeDescription = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemTradeItemTaxInformationTaxTypeDescription + ' detallista.lineItem(counter).tradeItemTaxInformation(0).taxTypeDescription = Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemTradeItemTaxInformationTaxTypeDescription.VAT + ' detallista.lineItem(counter).tradeItemTaxInformation(0).tradeItemTaxAmount = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemTradeItemTaxInformationTradeItemTaxAmount + ' detallista.lineItem(counter).tradeItemTaxInformation(0).tradeItemTaxAmount.taxPercentage = tasa + ' detallista.lineItem(counter).tradeItemTaxInformation(0).tradeItemTaxAmount.taxAmount = importeImp - detallista.lineItem(counter).totalLineAmount = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemTotalLineAmount - detallista.lineItem(counter).totalLineAmount.grossAmount = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemTotalLineAmountGrossAmount - detallista.lineItem(counter).totalLineAmount.grossAmount.Amount = comprobante.Conceptos(counter).Importe - detallista.lineItem(counter).totalLineAmount.netAmount = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemTotalLineAmountNetAmount - detallista.lineItem(counter).totalLineAmount.netAmount.Amount = comprobante.Conceptos(counter).Importe - counter = (counter + 1) - Next - detallista.totalAmount = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaTotalAmount - detallista.totalAmount.Amount = comprobante.SubTotal + ' detallista.lineItem(counter).totalLineAmount = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemTotalLineAmount + ' detallista.lineItem(counter).totalLineAmount.grossAmount = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemTotalLineAmountGrossAmount + ' detallista.lineItem(counter).totalLineAmount.grossAmount.Amount = comprobante.Conceptos(counter).Importe + ' detallista.lineItem(counter).totalLineAmount.netAmount = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaLineItemTotalLineAmountNetAmount + ' detallista.lineItem(counter).totalLineAmount.netAmount.Amount = comprobante.Conceptos(counter).Importe + ' counter = (counter + 1) + ' Next + ' detallista.totalAmount = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaTotalAmount + ' detallista.totalAmount.Amount = comprobante.SubTotal - detallista.TotalAllowanceCharge = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaTotalAllowanceCharge(1) {} - detallista.TotalAllowanceCharge(0) = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaTotalAllowanceCharge - detallista.TotalAllowanceCharge(0).allowanceOrChargeType = Profact.TimbraCFDI33.Complementos.Detallista.detallistaTotalAllowanceChargeAllowanceOrChargeType.ALLOWANCE - detallista.TotalAllowanceCharge(0).Amount = Ventas.DescuentoTC + ' detallista.TotalAllowanceCharge = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaTotalAllowanceCharge(1) {} + ' detallista.TotalAllowanceCharge(0) = New Profact.TimbraCFDI33.Complementos.Detallista.detallistaTotalAllowanceCharge + ' detallista.TotalAllowanceCharge(0).allowanceOrChargeType = Profact.TimbraCFDI33.Complementos.Detallista.detallistaTotalAllowanceChargeAllowanceOrChargeType.ALLOWANCE + ' detallista.TotalAllowanceCharge(0).Amount = Ventas.DescuentoTC - Dim nombres As System.Xml.Serialization.XmlSerializerNamespaces = New System.Xml.Serialization.XmlSerializerNamespaces - nombres.Add("detallista", "http://www.sat.gob.mx/detallista") - Dim xmlDetallista As String = Profact.TimbraCFDI.XMLUtilerias.SerializaObjeto(detallista, GetType(Profact.TimbraCFDI33.Complementos.Detallista.detallista), nombres) + ' Dim nombres As System.Xml.Serialization.XmlSerializerNamespaces = New System.Xml.Serialization.XmlSerializerNamespaces + ' nombres.Add("detallista", "http://www.sat.gob.mx/detallista") + ' Dim xmlDetallista As String = Profact.TimbraCFDI.XMLUtilerias.SerializaObjeto(detallista, GetType(Profact.TimbraCFDI33.Complementos.Detallista.detallista), nombres) - Dim docDetallista As XmlDocument = New XmlDocument - docDetallista.LoadXml(xmlDetallista) - comprobante.DetallistaSpecified = True - LXmlComplementos.Add(docDetallista.DocumentElement) + ' Dim docDetallista As XmlDocument = New XmlDocument + ' docDetallista.LoadXml(xmlDetallista) + ' comprobante.DetallistaSpecified = True + ' LXmlComplementos.Add(docDetallista.DocumentElement) - TieneComplemento = True - End If -#End Region + ' TieneComplemento = True + ' End If + '#End Region If TieneComplemento Then comprobante.Complemento = New Profact.TimbraCFDI33.ComprobanteComplemento @@ -4109,7 +4185,7 @@ Public Class Timbrado Dim ObjVentas As New ClsVentas() - If ObjVentas.UpdateEstatusFactura(3, FolioFiscal, "", Now, Ventas.CveVenta, CvePAC:=UsuarioActual.Empresa.CvePAC) Then + If ObjVentas.UpdateEstatusFactura(3, FolioFiscal, "", Now, Ventas.CveVenta, CvePAC:=UsuarioActual.Empresa.CvePAC, RFCReceptor:=ObjCFDITimbre.Receptor.RFC) Then Retorno = "" Else Retorno = "Error" @@ -4133,7 +4209,7 @@ Public Class Timbrado resultadoTimbre.GuardaCodigoBidimensional(RutaCBB, NombreCBB) 'Genero la addenda Ford - If Ventas.Cliente.Ford_GSDB <> "" Then + If Ventas.Cliente IsNot Nothing AndAlso Ventas.Cliente.Ford_GSDB <> "" Then Dim RutaCadena As String = String.Format("{0}{1}.xml", RutaArchivo, NombreArchivoXML) 'If(UsuarioActual.Empresa.FacturaProduccion, String.Format("{0}XML\{1}\{2}.xml", Ruta, Ventas.SerieFolio), String.Format("{0}XML\{1}\{2}.xml", Ruta, Ventas.TipoDocto, Ventas.SerieFolio)) diff --git a/Ashx/TareasProgramadas.ashx b/Ashx/TareasProgramadas.ashx index e7168ab56..8171b5431 100644 --- a/Ashx/TareasProgramadas.ashx +++ b/Ashx/TareasProgramadas.ashx @@ -20,10 +20,12 @@ Public Class TareasProgramadas : Implements IHttpHandler Dim retorno As String = "no se encontro la variable" Try Dim metodo As String = "" + If context.Request("var") IsNot Nothing Then URLParametros = Parametros(context.Request("var")) metodo = URLParametros("metodo") - ElseIf context.Request.Headers("Content-Type") IsNot Nothing AndAlso context.Request.Headers("Content-Type").Contains("json") AndAlso context.Request.InputStream IsNot Nothing Then + 'SI TRAE UN JSON COMO PARAMETRO + ElseIf context.Request.Headers("Content-Type") IsNot Nothing AndAlso context.Request.Headers("Content-Type").Contains("json") AndAlso context.Request.InputStream IsNot Nothing AndAlso (context.Request("var") Is Nothing AndAlso context.Request("metodo") IsNot Nothing) Then context.Response.ContentType = "application/json" Using reader As New StreamReader(context.Request.InputStream) Dim json = reader.ReadToEnd() @@ -32,6 +34,8 @@ Public Class TareasProgramadas : Implements IHttpHandler metodo = JsonRequest("Metodo").ToString End If End Using + ElseIf context.Request("metodo") IsNot Nothing Then + metodo = context.Request("metodo").ToString() End If Select Case metodo @@ -282,9 +286,13 @@ Public Class TareasProgramadas : Implements IHttpHandler Retorno.Add(obj) Next + + DtEmpresas.Dispose() End If - context.Response.Write(Retorno.ToString()) + GuardaLogEdoCuenta(Retorno.ToString()) + + context.Response.Write("True") End Sub @@ -324,7 +332,8 @@ Public Class TareasProgramadas : Implements IHttpHandler Private Function EjecutarEnvioEstadoCuenta(UsuarioActual As Usuario, Optional pCveCliente As Integer = -1) As JObject - Dim ClientesSinEnviar As New JArray() + Dim ClientesSinEnviar As New JArray() + Dim ClientesEdoEnviado As New JArray() Dim Json As New JObject( New JProperty("Empresa", UsuarioActual.Empresa.Empresa), @@ -333,37 +342,80 @@ Public Class TareasProgramadas : Implements IHttpHandler ) Dim DTClientes As DataTable = Nothing - Using ObjCliente As New ClsClientes - If ObjCliente.GetClientes(pCveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, TipoCliente:=-1, Estatus:=1) Then - If ObjCliente.DtResultados.Rows.Count > 0 Then - DTClientes = ObjCliente.DtResultados.Copy() - End If + 'Using ObjCliente As New ClsClientes + ' If ObjCliente.GetClientes(pCveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, TipoCliente:=-1, Estatus:=1) Then + ' If ObjCliente.DtResultados.Rows.Count > 0 Then + ' DTClientes = ObjCliente.DtResultados.Copy() + ' End If + ' End If + 'End Using + + Using ObjMov As New ClsMovimientos + Dim FechaI As String = "-1" + Dim FechaF As String = "-1" + Dim FechaVI As String = "-1" + Dim FechaVF As String = "-1" + Dim TCEspecifico = -1 + + Dim CveCobranzaEstatus As Integer = -1 + Dim CveClienteClasificacion As Integer = -1 + Dim CveCliente As Integer = -1 + Dim AplicaAnticipos As Integer = 0 + + Dim CveSubProyecto As Integer = -1 + Dim CveVendedor As Integer = -1 + Dim Grupo As Integer = 5 + Dim TipoCambio As Integer = 1 + Dim TipoDocto As String = "-1" + Dim FechaCorte As DateTime = New DateTime(Now.Year, 12, 31) + + If ObjMov.GetCxC(FechaI, FechaF, CveCliente, CveSubProyecto, CveVendedor, -1, -1, "-1", UsuarioActual.CveEmpresa, Grupo, -1, TipoCambio, TCEspecifico, TipoDocto, FechaVI, FechaVF, FechaCorte:=FechaCorte, + EstatusCliente:=1, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveCobranzaEstatus:=CveCobranzaEstatus, CveClienteClasificacion:=-1, TipoCliente:=-1, AplicaAnticiposPagados:=AplicaAnticipos) Then + DTClientes = ObjMov.DtResultados.FiltraParametros("CveCliente > 0", DistinctColumns:={"CveCliente"}) End If + End Using If DTClientes IsNot Nothing Then - For Each RowCliente As DataRow In DTClientes.Rows - Dim CveCliente As Integer = RowCliente("CveCliente").ToString().ToEntero() - Dim Correo As String = RowCliente("CobranzaCorreo").ToString() + 'DTClientes = DTClientes.FiltraParametros("CveCliente IN (227289,227429,227733,227838,228181,228544,229176,229481,230029,230432,230860,230911,230918,231197,231576,232173,232185,233055,233295,233357,233588,236379,236460,237161,237635,238285,238530,238622,238724,239033,239099,239865,239895,239903,240202,240235,240236,240238,240303,240340,262404,262517,264765,264806,264825,264848,264930,265063,265180,265213,265214,265236,265344,265492,265555,265669,265797,265952,265963,266156,266182,268346,268396,268488,268535,268539,268558,268562,268706,268726,268787,268868,268889,268910,268925,269023,269081,269089,272066,272070,272657,273080,273084,275627,276259,276587,281115,283110,284664,285392,287653,288711,291374,292444,295578,296375,296598,302728,303936,306897,307183,311007,320060,320685,320800,323520,323772,325237,326996,327801,330630,331741,332118,337105,340502,341796,342807,343858,355862,358123,365794,371524,375391,377122,377948,378267,380167,381210,381878,383098,383250,383339,383650,384472,385321,385585,386630,387114,388987,396341,396405,396541,401995,404175,408306,416386,416819,420275,438732,447566,447636,450284,464150,464376,468051,475172,475932,476984,477997,478426)") + + For Each RowCliente As DataRow In DTClientes.Rows + + Dim CveCliente As Integer = RowCliente("CveCliente").ToString().ToEntero() Dim Cliente As New Modelos.ClienteModel(CveCliente, UsuarioActual.CveEmpresa) - Dim Envio = EnviarEstadoCuenta(UsuarioActual, Correo, Cliente) + If Cliente IsNot Nothing Then + Dim Correo As String = Cliente.CobranzaCorreo '"japmx95@gmail.com" 'RowCliente("CobranzaCorreo").ToString() - If Envio Then - Using ObjBitacora As New ClsOIEventos - ObjBitacora.AddEventoBitacora("Se envió correo con el estado de cuenta del cliente", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCliente:=Cliente.CveCliente) - End Using - Else - ClientesSinEnviar.Add(New JObject( - New JProperty("CveCliente", Cliente.CveCliente), - New JProperty("Cliente", Cliente.Nombre) - )) - End If + Dim Envio As Boolean = False + If Not String.IsNullOrEmpty(Correo) Then + Envio = EnviarEstadoCuenta(UsuarioActual, Correo, Cliente) + End If + + If Envio Then + + ClientesEdoEnviado.Add(New JObject( + New JProperty("CveCliente", Cliente.CveCliente), + New JProperty("Cliente", Cliente.Nombre) + )) + + Using ObjBitacora As New ClsOIEventos + ObjBitacora.AddEventoBitacora("Se envió correo con el estado de cuenta del cliente", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCliente:=Cliente.CveCliente) + End Using + Else + ClientesSinEnviar.Add(New JObject( + New JProperty("CveCliente", Cliente.CveCliente), + New JProperty("Cliente", Cliente.Nombre) + )) + End If + End If + Next DTClientes.Dispose() End If - Json.Add(New JProperty("ClientesSinEnviar", ClientesSinEnviar)) + Json.Add(New JProperty("ClientesSinEnviar", ClientesSinEnviar)) + Json.Add(New JProperty("ClientesEdoEnviado", ClientesEdoEnviado)) Return Json End Function @@ -616,10 +668,12 @@ Public Class TareasProgramadas : Implements IHttpHandler
ESTE CORREO SE GENERO EN FORMA AUTOMATICA.", Cliente.NombreComercial, UsuarioActual.Empresa.Empresa) - Retorno = MandaCorreo(ArchivoPDF, Correo, $"Estado Actual de Cartera {UsuarioActual.Empresa.Empresa}", Cuerpo) + Dim Hilo As New System.Threading.Thread(Sub() MandaCorreo(ArchivoPDF, Correo, $"Estado Actual de Cartera {UsuarioActual.Empresa.Empresa}", Cuerpo)) + Hilo.Start() + Retorno = True Catch ex As Exception Retorno = False - OnError("Ocurrió un error al enviar el correo", ex) + OnError("Ocurrió error al mandar el correo de estado de cuenta", ex) End Try Else Retorno = False @@ -683,17 +737,47 @@ Public Class TareasProgramadas : Implements IHttpHandler Return Bytes End Function - Private Function MandaCorreo(File As Byte(), Para As String, Asunto As String, Body As String) As Boolean + Private Function MandaCorreo(File As Byte(), Para As String, Asunto As String, Body As String) As Boolean + 'Para = "japmx95@gmail.com" + Try + Dim a As String = String.Format("{0} -- {1} ---- -->", Asunto, Para) + 'a.GuardaLog() + Dim Mail As New ClsSisMail() + + Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail) + LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.ArchivoBinario = File, .NombreArchivo = "EstadoDeCuenta.pdf"}) + + Return Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body, Archivos:=LSRutasMail) + Catch ex As Exception + OnError("Ocurrió un error al enviar el correo de edo cuenta", ex) + Return False + End Try - Dim a As String = String.Format("{0} -- {1} ---- -->", Asunto, Para) - 'a.GuardaLog() - Dim Mail As New ClsSisMail() - - Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail) - LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.ArchivoBinario = File, .NombreArchivo = "EstadoDeCuenta.pdf"}) - - Return Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body, Archivos:=LSRutasMail) End Function + + Public Sub GuardaLogEdoCuenta(Str As String) + Dim ArchivoW As StreamWriter + Dim strLineaTMP As String + + ' strLineaTMP = Chr(13) & Chr(10) & Day(Now) & "/" & Month(Now) & "/" & Year(Now) & " " & Hour(Now) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10) + strLineaTMP = String.Format("{0}{1}Log: {2}{3}:{4}", Chr(13), Chr(10), Str, DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString) + Try + ArchivoW = New StreamWriter(String.Format("{0}\Log\LogEdoCuenta.txt", ModExtensiones.DirectorioBaseEmpresas), True, System.Text.Encoding.UTF8) + Catch ex As UnauthorizedAccessException + 'Alert("No hay permisos para guardar en el Log.", Extensiones.TipoMensaje.MsgError) + Exit Sub + Catch ex As Exception + Exit Sub + End Try + + Try + ArchivoW.WriteLine(strLineaTMP) + Catch + End Try + + ArchivoW.Close() + ArchivoW.Dispose() + End Sub #End Region End Class \ No newline at end of file diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index 8ad8491f4..a5a1fb0a0 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -304,17 +304,20 @@ Partial Class Bancos_DepositosCaja End If 'Asignamos la cuenta Deposito - If Not OcurrioError AndAlso Not ObjBancos.UpdateBancos_IECuentaDeposito(CveIEDestino, CveIE) Then + If Not OcurrioError AndAlso Not ObjBancos.UpdateBancos_IECuentaDeposito(CveIEOrigen, CveIE) Then OcurrioError = True Exit For - End If - Dim StrEncript As String = Encripta($"OP=DC&CveIE={CveIEDestino}&CuentaCaja={DdlCajaChica.SelectedItem.Text}&CuentaDepo={DdlCuentaDeposito.SelectedItem.Text}") - - 'documentos += String.Format("Imprimir {1}

", StrEncript, SerieFolio) + End If + + End If - Next - + Next + + Dim StrEncript As String = Encripta($"OP=DC&CveIE={CveIEOrigen}&CuentaCaja={DdlCajaChica.SelectedItem.Text}&CuentaDepo={DdlCuentaDeposito.SelectedItem.Text}") + + + documentos += String.Format("
Imprimir {1}

", StrEncript, "Depósito Bancario") If OcurrioError Then ObjContabilidad.RollBack() diff --git a/Bancos/IE.aspx b/Bancos/IE.aspx index ecc119d3f..6a8e7f9bd 100644 --- a/Bancos/IE.aspx +++ b/Bancos/IE.aspx @@ -44,7 +44,7 @@ Cheque Devuelto
  • - Cancelar Movimiento + Cancelar Movimiento
  • Eliminar Movimiento @@ -53,7 +53,7 @@ Refacturar Complemento
  • - Cancelar + Cancelar Movimiento y Complemento <%-- data-original-title="¿Está seguro que desea cancelar el documento?" data-btn-ok-label="si" Style="color: #686868;"> diff --git a/Bancos/PopIEVentas.aspx.vb b/Bancos/PopIEVentas.aspx.vb index c0ec85953..330068893 100644 --- a/Bancos/PopIEVentas.aspx.vb +++ b/Bancos/PopIEVentas.aspx.vb @@ -709,9 +709,10 @@ Partial Class Bancos_PopIEVentas End If Else 'no se pudo validar, pero ya tuvo la primera vuelta de validacion - Alert("La factura no se pudo validar.") + Alert("La factura no se pudo validar.", TipoMensaje.MsgAdvertencia) Validada = False - BtnGuardar.Visible = False + BtnGuardar.Enabled = False + BtnGuardar.ToolTip = "La factura no se pudo validar" End If Valida.Dispose() Else diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 3f4ef0686..bb6625d18 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -12413,8 +12413,9 @@ Partial Class Compras_Compras dr1("Cantidad") = (dr1("Cantidad").ToString.ToDouble - Cantidad.ToDouble) dr1("Total") = dr1("PU").ToString.ToDouble * dr1("Cantidad").ToString.ToDecimal - dr1("Importe") = dr1("Total") + dr1("IVA") = Math.Round(dr1("IVAPorcentaje").ToString.ToDecimal * dr1("Total").ToString.ToDecimal, 6) + dr1("IEPSPS") = Math.Round(dr1("IEPSPSPorcentaje").ToString.ToDecimal * dr1("Total").ToString.ToDecimal, 6) TmpDT.AcceptChanges() @@ -12423,8 +12424,9 @@ Partial Class Compras_Compras dr("CodAF") = "" dr("Cantidad") = Cantidad.ToDecimal dr("Total") = dr("PU").ToString.ToDecimal * Cantidad.ToDecimal - dr("Importe") = dr("Total") + 'dr("Importe") = dr("Total") dr("IVA") = Math.Round(dr("IVAPorcentaje").ToString.ToDecimal * dr("Total").ToString.ToDecimal, 6) + dr("IEPSPS") = Math.Round(dr("IEPSPSPorcentaje").ToString.ToDecimal * dr("Total").ToString.ToDecimal, 6) TmpDT.Rows.InsertAt(dr, Index + 1) diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 53ad84d4f..7bf565dd8 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -2448,7 +2448,11 @@ Partial Class PopUpVerFactura Dim ClienteNombre = "", EnvioContacto = "", EnvioDireccion = "", EnvioColonia = "", EnvioCiudad = "", EnvioEstado = "", ClientePais = "", EnvioCP = "", Contrato = "", Paqueteria = "", NumContrato = "", Guia = "" - Dim CveContrato As Integer = DtMovimientos(0)("CveContrato").ToString.ToEntero + Dim CveContrato As Integer = 0 + If DtMovimientos IsNot Nothing AndAlso DtMovimientos.Rows.Count > 0 Then + CveContrato = DtMovimientos(0)("CveContrato").ToString.ToEntero + End If + If CveContrato > 0 Then Contrato = GlobalDTContratos(UsuarioActual.CveEmpresa).FiltroPrimeroValor("DescripcionContrato", $"CveContrato={CveContrato} AND CveEmpresa = {UsuarioActual.CveEmpresa}") NumContrato = GlobalDTContratos(UsuarioActual.CveEmpresa).FiltroPrimeroValor("NumeroContrato", $"CveContrato={CveContrato} AND CveEmpresa = {UsuarioActual.CveEmpresa}") diff --git a/Contratos/ContratoAvance.aspx b/Contratos/ContratoAvance.aspx index f96d770f8..6a421e1a4 100644 --- a/Contratos/ContratoAvance.aspx +++ b/Contratos/ContratoAvance.aspx @@ -93,9 +93,9 @@ - - - + + + @@ -132,7 +132,7 @@ - + <%# Eval("Abreviatura")%> @@ -356,7 +356,7 @@ var cantidad = parseFloat(txtCantidad.val()); - + debugger; if (!Math.round10) { Math.round10 = function (value, exp) { @@ -364,13 +364,14 @@ }; } - if (opcion == 2) { + if (opcion == 2) { //editar importe if (txtimporte.val().toString().length > 0) { var importe = parseFloat(txtimporte.val()); cantidad = parseFloat(importe / pu); txtCantidad.val(cantidad); + txtPorcentaje.val(Math.round10(cantidad * 100 / max, -2)); }else{ cantidad = 0.0 @@ -379,12 +380,13 @@ } } - if (opcion == 3) { + if (opcion == 3) { //editar porcentaje if (txtPorcentaje.val().toString().length > 0) { var porcentaje = parseFloat(txtPorcentaje.val()); cantidad = (porcentaje * max / 100); txtCantidad.val(cantidad); + txtimporte.val((cantidad * pu).toFixed(2)); } else { cantidad = 0; txtCantidad.val(''); @@ -401,13 +403,13 @@ } - if (cantidad > 0) { - txtimporte.val(cantidad * pu); - txtPorcentaje.val(Math.round10(cantidad * 100 / max, -2)); - } else { - txtimporte.val(''); - txtPorcentaje.val(''); - } + //if (cantidad > 0) { + // txtimporte.val((cantidad * pu).toFixed(2)); + // txtPorcentaje.val(Math.round10(cantidad * 100 / max, -2)); + //} else { + // txtimporte.val(''); + // txtPorcentaje.val(''); + //} } diff --git a/Empresas/Grales/Formatos/RepVentasUtilidadPadre.rdlc b/Empresas/Grales/Formatos/RepVentasUtilidadPadre.rdlc index 5e314ec69..49340acb0 100644 --- a/Empresas/Grales/Formatos/RepVentasUtilidadPadre.rdlc +++ b/Empresas/Grales/Formatos/RepVentasUtilidadPadre.rdlc @@ -1,1638 +1,1589 @@ - - - - - - - - - - - - true - true - - - - - Grupo - - - - - - - Textbox28 - - - - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - 1.78756cm - - - 1.7468cm - - - 1.87995cm - - - 1.75936cm - - - 1.99234cm - - - 0.7279cm - - - 2.03612cm - - - 0.67438cm - - - 1.94909cm - - - 0.5862cm - - - 1.38875cm - - - - - 0.46771cm - - - - - true - true - - - - - =Fields!Ventas.Value - - - - - - - Ventas - - - =IIF(Fields!GPO.Value="", "CornflowerBlue", "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Descuento.Value - - - - - - - Descuento - - - =IIF(Fields!GPO.Value="", "CornflowerBlue", "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Bonificacion.Value - - - - - - - Bonificacion - - - =IIF(Fields!GPO.Value="", "CornflowerBlue", "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Costo.Value - - - - - - - Costo - - - =IIF(Fields!GPO.Value="", "CornflowerBlue", "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Utilidad.Value - - - - - - - Utilidad - - - =IIF(Fields!GPO.Value="", "CornflowerBlue", "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!PorUtilidad.Value - - - - - - - PorUtilidad - - - =IIF(Fields!GPO.Value="", "CornflowerBlue", "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Perdida.Value - - - - - - - Perdida - - - =IIF(Fields!GPO.Value="", "CornflowerBlue", "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!PorPerdida.Value - - - - - - - PorPerdida - - - =IIF(Fields!GPO.Value="", "CornflowerBlue", "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Neto.Value - - - - - - - Neto - - - =IIF(Fields!GPO.Value="", "CornflowerBlue", "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!PorNeto.Value - - - - - - - PorNeto - - - =IIF(Fields!GPO.Value="", "CornflowerBlue", "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Rentabilidad.Value - - - - - - - Rentabilidad - - - =IIF(Fields!GPO.Value="", "CornflowerBlue", "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - 0.46771cm - - - true - true - - - - - Ventas - - - - - - - Textbox18 - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - true - true - - - - - Descuento - - - - - - - Textbox25 - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - true - true - - - - - Bonificacion - - - - - - - Textbox20 - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - true - true - - - - - Costo - - - - - - - Textbox17 - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - true - true - - - - - Utilidad - - - - - - - Textbox6 - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - true - true - - - - - % - - - - - - - Textbox14 - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - true - true - - - - - Perdida - - - - - - - Textbox4 - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - true - true - - - - - % - - - - - - - Textbox16 - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - true - true - - - - - Neto - - - - - - - Textbox15 - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - true - true - - - - - % - - - - - - - Textbox19 - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - true - true - - - - - % Rent. - - - - - - - Textbox21 - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - 3.0587cm - - - true - true - - - - - =iif(Fields!GPO.Value="","Total",Fields!GPO.Value) - - - - - - - GPO - - - =IIF(Fields!GPO.Value="", "CornflowerBlue", "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - DataSet1 - 3.29875cm - 0.06614cm - 0.93542cm - 19.58715cm - - - - - - true - true - - - - - =Parameters!Filtros.Value - HTML - - - - - - - Textbox1 - 0.07056cm - 0.06614cm - 0.58236cm - 19.58715cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =iif(CDbl(Parameters!Neto.Value) > 0,"UTILIDAD","PERDIDA") - HTML - - - - - - - Textbox1 - 1.01452cm - 5.03122cm - 1.73771cm - 5.11444cm - 2 - - - =iif(CDbl(Parameters!Neto.Value) > 0,"SeaGreen","Maroon") - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Neto.Value - HTML - - - - - - - Textbox1 - 1.85236cm - 5.34872cm - 0.58236cm - 2.59949cm - 3 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!PorNeto.Value - HTML - - - - - - - Textbox1 - 1.85236cm - 8.14257cm - 0.58236cm - 1.68559cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - = "RENTABILIDAD" - HTML - - - - - - - Textbox1 - 1.01452cm - 10.71594cm - 1.73771cm - 5.11444cm - 5 - - - SeaGreen - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Rentabilidad.Value - HTML - - - - - - - Textbox1 - 1.85236cm - 12.93844cm - 0.58236cm - 2.59949cm - 6 - - - 2pt - 2pt - 2pt - 2pt - - - - 1.667in - - - - - - - Textbox1 - 2.43857cm - 0.6cm - 14.68354cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - REPORTE DE UTILIDAD O PÉRDIDA SOBRE VENTAS - - - - - - - - - - - - - - - - Textbox2 - 0.6cm - 2.40329cm - 0.52945cm - 14.68354cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - External - =Parameters!LogoPath.Value - FitProportional - 0.06614cm - 2.22362cm - 2.33715cm - 2 - - - - - - - - - - - 1.08126cm - true - true - - - true - true - - - - - ="Página " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox3 - 0.40041cm - 16.97887cm - 0.68085cm - 2.06587cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =iif(Globals.PageNumber = Globals.TotalPages, "Usuario: ", "") - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =iif(Globals.PageNumber = Globals.TotalPages, Parameters!UsuarioImprimio.Value, "") - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =iif(Globals.PageNumber = Globals.TotalPages, "Fecha Impresión: ", "") - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =iif(Globals.PageNumber = Globals.TotalPages, Parameters!FechaImpresion.Value, "") - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 29.7cm - 21cm - 0.5cm - 0.5cm - 1cm - 1cm - 0.13cm - + + + + + + + + + HTML + + + + + + + + + =Parameters!Rentabilidad.Value + HTML + + + + + + + Textbox1 + 1.01452cm + 10.29851cm + 1.73771cm + 5.43074cm + + + SeaGreen + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + true + true + + + + + Grupo + + + + + + + Textbox28 + + + + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + 1.78756cm + + + 1.7468cm + + + 1.87995cm + + + 1.75936cm + + + 1.99234cm + + + 0.7279cm + + + 2.03612cm + + + 0.67438cm + + + 1.94909cm + + + 0.5862cm + + + 1.38875cm + + + + + 0.46771cm + + + + + true + true + + + + + =Fields!Ventas.Value + + + + + + + Ventas + + + =IIF(Fields!GPO.Value="", "CornflowerBlue", "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Descuento.Value + + + + + + + Descuento + + + =IIF(Fields!GPO.Value="", "CornflowerBlue", "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Bonificacion.Value + + + + + + + Bonificacion + + + =IIF(Fields!GPO.Value="", "CornflowerBlue", "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Costo.Value + + + + + + + Costo + + + =IIF(Fields!GPO.Value="", "CornflowerBlue", "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Utilidad.Value + + + + + + + Utilidad + + + =IIF(Fields!GPO.Value="", "CornflowerBlue", "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PorUtilidad.Value + + + + + + + PorUtilidad + + + =IIF(Fields!GPO.Value="", "CornflowerBlue", "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Perdida.Value + + + + + + + Perdida + + + =IIF(Fields!GPO.Value="", "CornflowerBlue", "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PorPerdida.Value + + + + + + + PorPerdida + + + =IIF(Fields!GPO.Value="", "CornflowerBlue", "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Neto.Value + + + + + + + Neto + + + =IIF(Fields!GPO.Value="", "CornflowerBlue", "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PorNeto.Value + + + + + + + PorNeto + + + =IIF(Fields!GPO.Value="", "CornflowerBlue", "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Rentabilidad.Value + + + + + + + Rentabilidad + + + =IIF(Fields!GPO.Value="", "CornflowerBlue", "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + 0.46771cm + + + true + true + + + + + Ventas + + + + + + + Textbox18 + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.46771cm + + + true + true + + + + + Descuento + + + + + + + Textbox25 + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.46771cm + + + true + true + + + + + Bonificacion + + + + + + + Textbox20 + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.46771cm + + + true + true + + + + + Costo + + + + + + + Textbox17 + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.46771cm + + + true + true + + + + + Utilidad + + + + + + + Textbox6 + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.46771cm + + + true + true + + + + + % + + + + + + + Textbox14 + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.46771cm + + + true + true + + + + + Perdida + + + + + + + Textbox4 + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.46771cm + + + true + true + + + + + % + + + + + + + Textbox16 + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.46771cm + + + true + true + + + + + Neto + + + + + + + Textbox15 + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.46771cm + + + true + true + + + + + % + + + + + + + Textbox19 + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.46771cm + + + true + true + + + + + % Rent. + + + + + + + Textbox21 + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + 3.0587cm + + + true + true + + + + + =iif(Fields!GPO.Value="","Total",Fields!GPO.Value) + + + + + + + GPO + + + =IIF(Fields!GPO.Value="", "CornflowerBlue", "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + DataSet1 + 3.29875cm + 0.06614cm + 0.93542cm + 19.58715cm + 1 + + + + + + true + true + + + + + =Parameters!Filtros.Value + HTML + + + + + + + Textbox1 + 0.07056cm + 0.06614cm + 0.58236cm + 19.58715cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + = "UTILIDAD" + HTML + + + + + + + + + + HTML + + + + + + + + + = ("$" + Parameters!Neto.Value + " &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp " + Parameters!PorNeto.Value) + HTML + + + + + + + Textbox1 + 1.01452cm + 3.09309cm + 1.73771cm + 5.43074cm + 3 + + + SeaGreen + 2pt + 2pt + 2pt + 2pt + + + + 1.667in + + + + + + + Textbox1 + 2.43857cm + 0.6cm + 14.68354cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + REPORTE DE UTILIDAD O PÉRDIDA SOBRE VENTAS + + + + + + + + + + + + + + + + Textbox2 + 0.6cm + 2.40329cm + 0.52945cm + 14.68354cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!LogoPath.Value + FitProportional + 0.06614cm + 2.22362cm + 2.33715cm + 2 + + + + + + + + + + + 1.08126cm + true + true + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 0.40041cm + 16.97887cm + 0.68085cm + 2.06587cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =iif(Globals.PageNumber = Globals.TotalPages, "Usuario: ", "") + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =iif(Globals.PageNumber = Globals.TotalPages, Parameters!UsuarioImprimio.Value, "") + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =iif(Globals.PageNumber = Globals.TotalPages, "Fecha Impresión: ", "") + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =iif(Globals.PageNumber = Globals.TotalPages, Parameters!FechaImpresion.Value, "") + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 29.7cm + 21cm + 0.5cm + 0.5cm + 1cm + 1cm + 0.13cm +