diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index ec1c98082..eccfb731a 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -5935,7 +5935,7 @@ Public Class ClsPaginas Dim bdir As String = If(RutaReporte.Contains("Empresas"), ModExtensiones.DirectorioBaseEmpresas, AppDomain.CurrentDomain.BaseDirectory) 'TOMAR LA RUTA BASE PARA EL DIRECTORIO DE LA EMPRESA - If Not String.IsNullOrEmpty(RutaEmpresa) AndAlso Not RutaReporte.Contains("Grales") Then + If Not String.IsNullOrEmpty(RutaEmpresa) AndAlso Not RutaReporte.Contains("Grales") AndAlso Not RutaReporte.Contains("Contabilidad/Reportes/") Then bdir = RutaEmpresa.Replace($"{CveEmpresa}/", "") End If diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index e36ba295e..fe1026c75 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -242,13 +242,14 @@ Public Class ClsVentas Return Retorno End Function - Public Function GetVentasPendientesCancelacion(CveEmpresa As Integer, CveUsuarioConsulta As Integer) As Boolean + Public Function GetVentasPendientesCancelacion(CveEmpresa As Integer, CveUsuarioConsulta As Integer, Optional CveVenta As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_VentasPendientesCancelacionGet") With SqlAdapter.SelectCommand.Parameters .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta + .Add("@CveVenta", SqlDbType.Int).Value = CveVenta End With Try @@ -5270,15 +5271,17 @@ Public Class ClsVentas Return Retorno End Function - Public Function GetAutorizacionLimite(CveEmpresa As Integer, CveCliente As Integer, CveVendedor As Integer, TipoDocumento As String, Optional CveEstatus As Integer = -1) As Boolean + Public Function GetAutorizacionLimite(CveEmpresa As Integer, CveCliente As Integer, CveVendedor As Integer, TipoDocumento As String, Optional CveEstatus As Integer = -1, Optional FechaI As DateTime = MinFecha, Optional FechaF As DateTime = MaxFecha) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_AutorizacionLimitesGet") With SqlAdapter.SelectCommand.Parameters .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor - .Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus + .Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus .Add("@TipoDocumento", SqlDbType.VarChar).Value = TipoDocumento + .Add("@FechaI", SqlDbType.Date).Value = FechaI + .Add("@FechaF", SqlDbType.Date).Value = FechaF End With Try SqlAdapter.Fill(Data) diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index cef14b36e..367c2a669 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -2155,18 +2155,21 @@ Namespace Modelos End If 'si es selectedvalue = 42, es entrada ,3 -salida - Dim CveConceptoUsados As Integer = If(factura.CveConceptoMovimiento = 42, 1, 2) + If Not factura.EsGarantia Then + Dim CveConceptoUsados As Integer = If(factura.CveConceptoMovimiento = 42, 1, 2) - If factura.Cliente.EsDistribuidor AndAlso factura.CveConceptoMovimiento = 42 AndAlso Dr("CveTamaño").ToString.ToEntero > 0 Then + If factura.Cliente.EsDistribuidor AndAlso factura.CveConceptoMovimiento = 42 AndAlso Dr("CveTamaño").ToString.ToEntero > 0 Then + + If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Dr("Cantidad").ToString.ToDecimal(), Dr("CveTamaño").ToString.ToEntero, CveConceptoUsados, CveVenta, UsuarioActual.CveUsuario, + UsuarioActual.CveEmpresa, 0, Dr("Observaciones").ToString, factura.Fecha, CveMovimiento:=CveMovimiento) Then + ' Mensaje = "Error al guardar Movimientos de distribuidor" + Resultado = False + Exit For + End If - If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Dr("Cantidad").ToString.ToDecimal(), Dr("CveTamaño").ToString.ToEntero, CveConceptoUsados, CveVenta, UsuarioActual.CveUsuario, - UsuarioActual.CveEmpresa, 0, Dr("Observaciones").ToString, factura.Fecha, CveMovimiento:=CveMovimiento) Then - ' Mensaje = "Error al guardar Movimientos de distribuidor" - Resultado = False - Exit For End If - End If + Next End If @@ -2183,6 +2186,40 @@ Namespace Modelos Return Resultado End Function + + Private Function CancelarInventarioUsado(factura As Modelos.Factura, CveAlmacenUsado As Integer, CveMovimientoEntrada As Integer, ByRef ObjInventario As ClsInventarios) As Integer + Dim CveMovimiento As Integer = -1 + Try + Dim CveConceptoSalidaUsado As Integer = 45 + CveMovimiento = ObjInventario.AddMovimiento(CveAlmacenUsado, CveConceptoSalidaUsado, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, factura.CveVenta, + factura.CveSubProyecto, CveActivoFijo:=-1, Guia:="", Observaciones:="", CvePersonal:=-1, CveCliente:=factura.CveCliente, CveClienteSucursal:=-1, Modulo:="M/CU") + If CveMovimiento <= 0 Then + CveMovimiento = -1 + Else + Dim DtMovimientosEntrada As DataTable = Nothing + If ObjInventario.GetMovimientosDetalle(CveMovimientoEntrada, factura.CveEmpresa) Then + DtMovimientosEntrada = ObjInventario.DtResultados.Copy() + End If + + If DtMovimientosEntrada IsNot Nothing Then + For Each Dr As DataRow In DtMovimientosEntrada.Rows + If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, Observaciones:=Dr("Observaciones").ToString, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then + CveMovimiento = -1 + Exit For + End If + Next + + DtMovimientosEntrada.Dispose() + DtMovimientosEntrada = Nothing + End If + End If + Catch ex As Exception + OnError("Ocurrió un erro al cancelar el movimiento de usado", ex) + CveMovimiento = -1 + End Try + + Return CveMovimiento + End Function Private Function GuardarPolizasVirtuales(SqlTransaccion As SqlClient.SqlTransaction, ObjFactura As Modelos.Factura) As Boolean Dim Resultado As Boolean = True @@ -2406,17 +2443,25 @@ Namespace Modelos 'VERIFICA SI TIENE MOVIMIENTO DE ENTRADA DE USADO If CveMovimiento > 0 AndAlso CveAlmacen > 0 Then + Dim CveMovimientoReferencia As Integer = -1 + Dim TipoMovto68 = TipoMovimiento + 'SI ES CANCELACION DEBE GENERAR EL MOVIMIENTO DE SALIDA DE USADOS + If ValorMultiplicador = -1 Then + CveMovimientoReferencia = CancelarInventarioUsado(ObjFactura, CveAlmacen, CveMovimiento, ObjInventario) + Else + CveMovimientoReferencia = CveMovimiento + End If - If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then - Dim Importe68 As Decimal = ObjInventario.DtResultados.SUMD("Total").RoundSQL + If ObjInventario.GetMovimientosDetalle(CveMovimientoReferencia, UsuarioActual.CveEmpresa) Then + Dim Importe68 As Decimal = ObjInventario.DtResultados.SUMD("Total").RoundSQL * ValorMultiplicador Dim IdCtaContable68 = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={CveAlmacen}").ToEntero - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, Importe68, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable68, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=Importe68, Contabilizable:=False) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovto68, Importe68, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable68, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoReferencia, ImporteMX:=Importe68, Contabilizable:=False) Then ErrorPrepoliza = True End If - Dim Importe318 As Decimal = importeMovimiento - Importe68 + Dim Importe318 As Decimal = (Math.Abs(importeMovimiento) - Math.Abs(Importe68)) * ValorMultiplicador If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, Importe318, Referencia, 318, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=Importe318, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then ErrorPrepoliza = True @@ -2429,7 +2474,6 @@ Namespace Modelos Else ErrorPrepoliza = True End If - Else If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 277, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 278, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then @@ -6495,7 +6539,7 @@ Namespace Modelos End Property Public Property MotivoDescuento As String = "" - Public Property EsGarantia As Boolean + Public Property EsGarantia As Boolean = False #Region "Totales" diff --git a/App_Code/Timbrado.vb b/App_Code/Timbrado.vb index 2bcc5fbfd..2af43a2fd 100644 --- a/App_Code/Timbrado.vb +++ b/App_Code/Timbrado.vb @@ -51,6 +51,83 @@ Public Class Timbrado #End Region + Public Function ObtenerAcuse(CveVenta As Integer, UsuarioActual As Usuario) As Boolean + Dim Retorno As Boolean = False + Try + Dim RowVentas As DataRow = Nothing + Dim RFCEmisor = UsuarioActual.Empresa.RFC + Dim RFCReceptor As String = "" + Dim FolioFiscal As String = "" + Dim FolioSustitucion As String = "" + Dim CvePACCancelacion As Integer = -1 + Dim CveSATMotivoCancelacion As Integer = -1 + Dim CveMotivoCancelacion As Integer = -1 + Dim TotalT As Decimal = 0 + + Using ObjVentas As New ClsVentas + If ObjVentas.GetVentasPendientesCancelacion(UsuarioActual.CveEmpresa, 100, CveVenta) AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then + RowVentas = ObjVentas.DtResultados.Rows(0) + End If + End Using + + If RowVentas IsNot Nothing Then + FolioFiscal = RowVentas("FolioFiscal").ToString() + RFCReceptor = RowVentas("RFCReceptor").ToString() + CvePACCancelacion = RowVentas("CvePAC").ToString().ToEntero() + CveMotivoCancelacion = RowVentas("CveMotivoCancelacion").ToString().ToEntero() + TotalT = RowVentas("Total").ToString().ToDecimal() + FolioSustitucion = RowVentas("FolioFiscalSustitucion").ToString() + End If + + If CveMotivoCancelacion > 0 Then + Dim Row As DataRow = ClsPaginas.GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa, CveMotivoCancelacion:=CveMotivoCancelacion).FiltroPrimero("") + If Row IsNot Nothing Then + CveSATMotivoCancelacion = Row("CveSATMotivoCancelacion").ToString().ToEntero() + End If + End If + + + If CvePACCancelacion = 4 Then + Dim solicitud As New WSGF.Service1SoapClient + Dim resp As New WSGF.StructXml() + resp = solicitud.GetAcuse(RFCEmisor, "rene.molina@adsistemas.mx", "rene2018", FolioFiscal) + If (resp.Estado = 0) Then + + Dim xmlDoc As New System.Xml.XmlDocument() + xmlDoc.LoadXml(Encoding.UTF8.GetString(Convert.FromBase64String(resp.CfdiB64))) + Dim xpath As String = "Acuse/Folios" + Dim nodes = xmlDoc.SelectNodes(xpath) + CancelacionState = xmlDoc.GetElementsByTagName("EstatusUUID")(0).InnerText.ToEntero + + xpath = "Acuse/Signature" + nodes = xmlDoc.SelectNodes(xpath) + + Me.CancelacionAcuse = xmlDoc.GetElementsByTagName("SignatureValue")(0).InnerText + Me.CancelacionFecha = xmlDoc.SelectSingleNode("Acuse").Attributes("Fecha").Value.ToDate + Retorno = True + Else + CancelacionAcuse = resp.Descripcion + Retorno = False + End If + solicitud = Nothing + Else + If CFDICancelar(UsuarioActual.Empresa, FolioFiscal, TotalT, RFCReceptor, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion, FolioSustitucion:=FolioSustitucion) Then + 'GENERAMOS EL ACUSE Y MANDAMOS MAIL DE CON EL ACUSE DE CANCELACIÓN + CancelacionFecha = Me.CancelacionFecha + CancelacionAcuse = Me.CancelacionAcuse + Retorno = True + End If + End If + + Catch ex As Exception + OnError("Ocurrió un error al intentar obtener el acuse", ex) + Retorno = False + End Try + + Return Retorno + End Function + + Public Shared Function VerificarVigenciaSAT(uuid As String, emisor As String, receptor As String, total As String, produccion As Boolean) As AcuseCancelacionSAT Dim Retorno As AcuseCancelacionSAT = Nothing Dim resp As Cancelacion2022.AcuseSat = New Cancelacion2022.AcuseSat() @@ -2084,7 +2161,7 @@ Public Class Timbrado #Region "Impuestos" 'SI NO ES FACTURA EN 0 AGREGA LOS IMPUESTOS - If Ventas.Total <> 0 OrElse (ObjCFDITimbre.TotalImpuestosRetenidos > 0 OrElse ObjCFDITimbre.TotalImpuestosTrasladados > 0) Then + If Ventas.Total <> 0 And (ObjCFDITimbre.TotalImpuestosRetenidos > 0 OrElse ObjCFDITimbre.TotalImpuestosTrasladados > 0) Then cfdi.Impuestos(ObjCFDITimbre.TotalImpuestosRetenidos, ObjCFDITimbre.TotalImpuestosTrasladados) End If #End Region @@ -2098,55 +2175,59 @@ Public Class Timbrado Next End If - ''se acumulan los importes - For Each Tras In ObjCFDITimbre.Traslados - cfdi.Traslado(Tras.Impuesto, Tras.TipoFactor, Tras.TasaOCuota, Tras.Importe) - Next + + If ObjCFDITimbre.Traslados.Sum(Function(x) x.Importe) > 0 Then + ''se acumulan los importes + For Each Tras In ObjCFDITimbre.Traslados + cfdi.Traslado(Tras.Impuesto, Tras.TipoFactor, Tras.TasaOCuota, Tras.Importe) + Next + End If + #End Region #Region "Impuestos Locales" If ObjCFDITimbre.RetencionesLocales.Sum(Function(x) x.Importe) > 0 OrElse ObjCFDITimbre.TrasladosLocales.Sum(Function(x) x.Importe) > 0 Then - cfdi.ImpuestosLocales(ObjCFDITimbre.RetencionesLocales.Sum(Function(x) x.Importe), ObjCFDITimbre.TrasladosLocales.Sum(Function(x) x.Importe)) + cfdi.ImpuestosLocales(ObjCFDITimbre.RetencionesLocales.Sum(Function(x) x.Importe), ObjCFDITimbre.TrasladosLocales.Sum(Function(x) x.Importe)) - For Each ret As CFDIRetencionesLocales In ObjCFDITimbre.RetencionesLocales - If ret.Importe > 0 Then - cfdi.RetencionLocal(ret.ImpuestoLocalRetenido, ret.TasaRetencion, ret.Importe) - End If - Next + For Each ret As CFDIRetencionesLocales In ObjCFDITimbre.RetencionesLocales + If ret.Importe > 0 Then + cfdi.RetencionLocal(ret.ImpuestoLocalRetenido, ret.TasaRetencion, ret.Importe) + End If + Next - For Each ret As CFDITrasladosLocales In ObjCFDITimbre.TrasladosLocales - If ret.Importe > 0 Then - cfdi.TrasladoLocal(ret.ImpuestoLocalTraslado, ret.TasaTraslado, ret.Importe) - End If - Next - End If + For Each ret As CFDITrasladosLocales In ObjCFDITimbre.TrasladosLocales + If ret.Importe > 0 Then + cfdi.TrasladoLocal(ret.ImpuestoLocalTraslado, ret.TasaTraslado, ret.Importe) + End If + Next + End If - If Ventas.CveComplementoTimbrado > 0 Then + If Ventas.CveComplementoTimbrado > 0 Then - Select Case Ventas.CveComplementoTimbrado - Case 5 'INE Proceso Ordinario Directivo Estatal" - cfdi.Ine11("Ordinario", "Directivo Estatal", "0") + Select Case Ventas.CveComplementoTimbrado + Case 5 'INE Proceso Ordinario Directivo Estatal" + cfdi.Ine11("Ordinario", "Directivo Estatal", "0") - cfdi.IneEntidad(Ventas.ComplementoINE.INEEntidad, "") - cfdi.IneContabilidad(Ventas.ComplementoINE.INEIdContabilidad) - Case 6 'INE Proceso Ordinario Ejecutivo Estatal" - cfdi.Ine11("Ordinario", "Ejecutivo Estatal", "0") + cfdi.IneEntidad(Ventas.ComplementoINE.INEEntidad, "") + cfdi.IneContabilidad(Ventas.ComplementoINE.INEIdContabilidad) + Case 6 'INE Proceso Ordinario Ejecutivo Estatal" + cfdi.Ine11("Ordinario", "Ejecutivo Estatal", "0") - cfdi.IneEntidad(Ventas.ComplementoINE.INEEntidad, "") - cfdi.IneContabilidad(Ventas.ComplementoINE.INEIdContabilidad) - Case 7 'INE Proceso Ordinario Ejecutivo Nacional" + cfdi.IneEntidad(Ventas.ComplementoINE.INEEntidad, "") + cfdi.IneContabilidad(Ventas.ComplementoINE.INEIdContabilidad) + Case 7 'INE Proceso Ordinario Ejecutivo Nacional" - cfdi.Ine11("Ordinario", "Ejecutivo Nacional", Ventas.ComplementoINE.INEIdContabilidad.ToString) - Case 8 'INE PreCampaña - cfdi.Ine11(Ventas.ComplementoINE.INETipoProceso, "", "0") + cfdi.Ine11("Ordinario", "Ejecutivo Nacional", Ventas.ComplementoINE.INEIdContabilidad.ToString) + Case 8 'INE PreCampaña + cfdi.Ine11(Ventas.ComplementoINE.INETipoProceso, "", "0") - cfdi.IneEntidad(Ventas.ComplementoINE.INEEntidad, Ventas.ComplementoINE.INETipoComite) - cfdi.IneContabilidad(Ventas.ComplementoINE.INEIdContabilidad) - End Select + cfdi.IneEntidad(Ventas.ComplementoINE.INEEntidad, Ventas.ComplementoINE.INETipoComite) + cfdi.IneContabilidad(Ventas.ComplementoINE.INEIdContabilidad) + End Select - End If + End If @@ -2155,11 +2236,11 @@ Public Class Timbrado #Region "Comercio Exterior" - If Ventas.Cliente.AplicaComercioExterior And ObjCFDITimbre.Complementos.ComercioExterior11.AplicaComercioExteriorSubProyecto Then - If ObjCFDITimbre.Complementos.ComercioExterior11 IsNot Nothing Then + If Ventas.Cliente.AplicaComercioExterior And ObjCFDITimbre.Complementos.ComercioExterior11.AplicaComercioExteriorSubProyecto Then + If ObjCFDITimbre.Complementos.ComercioExterior11 IsNot Nothing Then - 'DATOS GENERALES - cfdi.ComercioExterior11(ObjCFDITimbre.Complementos.ComercioExterior11.MotivoTraslado, + 'DATOS GENERALES + cfdi.ComercioExterior11(ObjCFDITimbre.Complementos.ComercioExterior11.MotivoTraslado, ObjCFDITimbre.Complementos.ComercioExterior11.TipoOperacion, ObjCFDITimbre.Complementos.ComercioExterior11.ClavedePedimento, ObjCFDITimbre.Complementos.ComercioExterior11.CertificadoOrigen, @@ -2170,9 +2251,9 @@ Public Class Timbrado ObjCFDITimbre.Complementos.ComercioExterior11.Observaciones, ObjCFDITimbre.Complementos.ComercioExterior11.TipoCambioUSD, ObjCFDITimbre.Complementos.ComercioExterior11.TotalUSD) - 'EMISOR - cfdi.ComercioExterior11Emisor(If(EmisorRFC.Length >= 12, "", ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.CURP)) - cfdi.ComercioExterior11Domicilio(ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Calle, + 'EMISOR + cfdi.ComercioExterior11Emisor(If(EmisorRFC.Length >= 12, "", ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.CURP)) + cfdi.ComercioExterior11Domicilio(ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Calle, ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.NumeroExterior, ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.NumeroInterior, ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Colonia, @@ -2182,9 +2263,9 @@ Public Class Timbrado ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Estado, ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Pais, ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.CP) - 'RECEPTOR - cfdi.ComercioExterior11Receptor(ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumRegIdTrib) - cfdi.ComercioExterior11DomicilioReceptor(ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Calle, + 'RECEPTOR + cfdi.ComercioExterior11Receptor(ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumRegIdTrib) + cfdi.ComercioExterior11DomicilioReceptor(ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Calle, ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumeroExterior, ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumeroInterior, ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Colonia, @@ -2194,7 +2275,7 @@ Public Class Timbrado ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Estado, ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Pais, ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.CP) - cfdi.ComercioExterior11Destinatario(ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.NumRegIdTrib, + cfdi.ComercioExterior11Destinatario(ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.NumRegIdTrib, ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Nombre, ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Calle, ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.NumeroExterior, @@ -2206,35 +2287,35 @@ Public Class Timbrado ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Estado, ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Pais, ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.CP) - 'MERCANCIAS - If ObjCFDITimbre.Complementos.ComercioExterior11.Mercancias IsNot Nothing AndAlso ObjCFDITimbre.Complementos.ComercioExterior11.Mercancias.Count > 0 Then - For Each concep As CFDIComercioExterior11Mercancias In ObjCFDITimbre.Complementos.ComercioExterior11.Mercancias - cfdi.ComercioExterior11Mercancia(concep.NoIdentificacion, concep.FraccionArancelaria, concep.CantidadAduana, concep.UnidadAduana, concep.ValorUnitarioAduana, concep.ValorDolares) - If concep.DescripcionesEspecificas.Marca <> "" Then - cfdi.ComercioExterior11MercanciaDescripcionesEspeciales(concep.DescripcionesEspecificas.Marca, + 'MERCANCIAS + If ObjCFDITimbre.Complementos.ComercioExterior11.Mercancias IsNot Nothing AndAlso ObjCFDITimbre.Complementos.ComercioExterior11.Mercancias.Count > 0 Then + For Each concep As CFDIComercioExterior11Mercancias In ObjCFDITimbre.Complementos.ComercioExterior11.Mercancias + cfdi.ComercioExterior11Mercancia(concep.NoIdentificacion, concep.FraccionArancelaria, concep.CantidadAduana, concep.UnidadAduana, concep.ValorUnitarioAduana, concep.ValorDolares) + If concep.DescripcionesEspecificas.Marca <> "" Then + cfdi.ComercioExterior11MercanciaDescripcionesEspeciales(concep.DescripcionesEspecificas.Marca, concep.DescripcionesEspecificas.Modelo, concep.DescripcionesEspecificas.SubModelo, concep.DescripcionesEspecificas.NumeroSerie) - End If - Next + End If + Next + + End If + End If - - End If - End If #End Region - End If + 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 diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index ea531cdb6..291b351fa 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1118,7 +1118,7 @@ Partial Class Compras_Compras CargaDatosAgregarPS() TieneAnticiposXML = False Modalidad = "" - Version = "3.3" + Version = "4.0" CveMetodoPago = -1 RFCProv = "" CargaDdlTipoGasto() @@ -1638,7 +1638,7 @@ Partial Class Compras_Compras End Sub Private Sub ValidaIVA() - If Version <> "3.3" And CveCompra <= 0 Then + If (Version <> "3.3" And Version <> "4.0") And CveCompra <= 0 Then Dim ImporteIVAXML As Double = (TxtSubTotal.Text.Trim.ToDouble - TxtDescuento.Text.Trim.ToDouble - TxtIEPS.Text.Trim.ToDouble) * 0.16 If Math.Abs(TxtIVA.Text.Trim.ToDouble - ImporteIVAXML) >= 1 Then Alert("El IVA del CFDi no tiene un comportamiento normal, por favor verifique que sea correcto.

NOTA: Esta advertencia no aplica en casos de conceptos(alimentos, combustibles o servicios de comunicación) exentos de IVA o causantes de IEPS.", TipoMensaje.MsgAdvertencia) @@ -1743,15 +1743,29 @@ Partial Class Compras_Compras CargaComprobanteXML(XMLDoc) - If NuevaValidacionXML = 1 Or Version = "3.3" Then + If NuevaValidacionXML = 1 Or (Version = "3.3" Or Version = "4.0") Then Dim Xml As New StringBuilder Dim nodo As XmlNode = XMLDoc.DocumentElement Dim Version = ValorXML(nodo, "version") + + Dim Prefijo As String = If(XMLDoc.DocumentElement.Prefix = "", "cfd", XMLDoc.DocumentElement.Prefix) - Dim cfdVer As String = "http://www.sat.gob.mx/cfd/3" + Dim cfdVer As String = "" Dim namespaces As New XmlNamespaceManager(XMLDoc.NameTable) - If Prefijo.ToLower <> "cfdi" Then cfdVer = "http://www.sat.gob.mx/cfd/2" + + If Version = "3.2" Then + Prefijo = "cfd" + cfdVer = "http://www.sat.gob.mx/cfd/2" + ElseIf Version = "3.3" Then + cfdVer = "http://www.sat.gob.mx/cfd/3" + + Else ' se considera que es la version 4.0 + cfdVer = "http://www.sat.gob.mx/cfd/4" + End If + + 'If Prefijo.ToLower <> "cfdi" Then cfdVer = "http://www.sat.gob.mx/cfd/2" + namespaces.AddNamespace(Prefijo, cfdVer) namespaces.AddNamespace("tfd", "http://www.sat.gob.mx/TimbreFiscalDigital") namespaces.AddNamespace("implocal", "http://www.sat.gob.mx/implocal") @@ -1759,7 +1773,8 @@ Partial Class Compras_Compras Dim nodeconceptos As XmlNode = XMLDoc.SelectSingleNode(String.Format("//{0}:Conceptos", Prefijo), namespaces) - Xml.Append(Replace(Replace(Replace(nodeconceptos.OuterXml, " "cfdi" Then cfdVer = "http://www.sat.gob.mx/cfd/2" + Dim nodo As XmlNode = XMLDoc.DocumentElement + Dim VersionCFDI As String = ValorXML(nodo, "version") + + Dim Prefijo As String = If(XMLDoc.DocumentElement.Prefix = "", "cfd", XMLDoc.DocumentElement.Prefix) + Dim cfdVer As String = "" + + If VersionCFDI = "3.2" Then + Prefijo = "cfd" + cfdVer = "http://www.sat.gob.mx/cfd/2" + ElseIf VersionCFDI = "3.3" Then + cfdVer = "http://www.sat.gob.mx/cfd/3" + + Else ' se considera que es la version 4.0 + cfdVer = "http://www.sat.gob.mx/cfd/4" + End If + namespaces.AddNamespace(Prefijo, cfdVer) namespaces.AddNamespace("tfd", "http://www.sat.gob.mx/TimbreFiscalDigital") namespaces.AddNamespace("implocal", "http://www.sat.gob.mx/implocal") @@ -3714,7 +3743,7 @@ Partial Class Compras_Compras 'Alert(ValorXML(node, "ClaveProdServ").Trim) - If Version = "3.3" Then + If Version = "3.3" Or Version = "4.0" Then If node IsNot Nothing AndAlso node.ChildNodes.Count > 0 Then 'OBTENER TRASLADOS POR DETALLES Dim ContadorTraslado = 0 @@ -5171,7 +5200,7 @@ Partial Class Compras_Compras End If 'ACTUALIZAR PRODUCTO/SERVICIO SAT - If Version = "3.3" Then + If Version = "3.3" Or Version = "4.0" Then If Row("CveSATPSActualizado").ToString().ToEntero() = 1 Then If Not ObjProductosServicios.UpdateProductosServiciosSAT(Row("CvePS").ToString().ToEntero(), Row("CveSATPS").ToString().ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then ErrorSATPS = True @@ -10833,7 +10862,7 @@ Partial Class Compras_Compras - If Version = "3.3" Then + If Version = "3.3" Or Version = "4.0" Then Dim drm As DataRow = GlobalDTVtaMetodoPago.FiltroPrimero(String.Format("ClaveMetodoPagoSAT = '{0}'", ValorXML(nodo, "MetodoPago"))) If drm IsNot Nothing Then CveMetodoPago = drm("CveMetodoPago").ToString.ToEntero @@ -10842,11 +10871,28 @@ Partial Class Compras_Compras End If - Dim Prefijo As String = If(XMLDoc.DocumentElement.Prefix = "", "cfd", XMLDoc.DocumentElement.Prefix) - Dim cfdVer As String = "http://www.sat.gob.mx/cfd/3" Dim namespaces As New XmlNamespaceManager(XMLDoc.NameTable) - If Prefijo.ToLower <> "cfdi" Then cfdVer = "http://www.sat.gob.mx/cfd/2" + + + + + Dim Prefijo As String = If(XMLDoc.DocumentElement.Prefix = "", "cfd", XMLDoc.DocumentElement.Prefix) + Dim cfdVer As String = "" + + If Version = "3.2" Then + Prefijo = "cfd" + cfdVer = "http://www.sat.gob.mx/cfd/2" + ElseIf Version = "3.3" Then + cfdVer = "http://www.sat.gob.mx/cfd/3" + + Else ' se considera que es la version 4.0 + cfdVer = "http://www.sat.gob.mx/cfd/4" + End If + + + + 'If Prefijo.ToLower <> "cfdi" Then cfdVer = "http://www.sat.gob.mx/cfd/2" namespaces.AddNamespace(Prefijo, cfdVer) namespaces.AddNamespace("tfd", "http://www.sat.gob.mx/TimbreFiscalDigital") namespaces.AddNamespace("implocal", "http://www.sat.gob.mx/implocal") @@ -10889,7 +10935,7 @@ Partial Class Compras_Compras TotalRetenciones = ValorXML(node, "totalImpuestosRetenidos", "0").ToDecimal - If Version = "3.3" Then + If Version = "3.3" Or Version = "4.0" Then For Each retencion As XmlNode In nodeRetenciones If retencion.Attributes("Impuesto").Value = "002" Then @@ -10920,7 +10966,7 @@ Partial Class Compras_Compras TotalTraslados = ValorXML(node, "totalImpuestosTrasladados", "0").ToDecimal Dim nodeTraslados As XmlNodeList = XMLDoc.SelectNodes(String.Format("//{0}:Comprobante/{0}:Impuestos/{0}:Traslados/{0}:Traslado", Prefijo), namespaces) - If Version = "3.3" Then + If Version = "3.3" Or Version = "4.0" Then For Each traslado As XmlNode In nodeTraslados If traslado.Attributes("Impuesto").Value = "002" Then @@ -15639,7 +15685,7 @@ Partial Class Compras_Compras e.Row.FCLabel("LbEstatusInv").Text = "NA" End If - If Version = "3.3" Then + If Version = "3.3" Or Version = "4.0" Then CargaPSSAT(e.Row.FCDropDownLost("DdlSATPS")) If e.Row.DBCampo("CveSATPS").ToEntero > 0 Then e.Row.FCDropDownLost("DdlSATPS").SelectedValue = e.Row.DBCampo("CveSATPS") @@ -18305,7 +18351,7 @@ Partial Class Compras_Compras Row("Consec") = TmpDT.Rows.Count + 1 End If - If Version = "3.3" And CveSATPS > 0 Then + If (Version = "3.3" Or Version = "4.0") And CveSATPS > 0 Then Dim DrPSSAT As DataRow = Nothing If CargaXml Then DrPSSAT = GlobalDTPSATPS("-1", CveSATPS.ToString).FiltroPrimero("") @@ -18362,7 +18408,7 @@ Partial Class Compras_Compras Row("NoDeducible") = NoDeducible Row("PU") = Math.Round(PU, DecimalesPermitidos) - If CargaXml And Version = "3.3" Then + If CargaXml And (Version = "3.3" Or Version = "4.0") Then Row("IVA") = Math.Round(IVA, DecimalesPermitidos) Row("IVAPorcentaje") = PorcentajeIVA Row("RetIVA") = Math.Round(RetIVA, DecimalesPermitidos) diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index c6f5f8713..d660ba9ab 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -14,6 +14,8 @@ Imports Stimulsoft.Report.Components Imports Stimulsoft.Report.Dictionary Imports Stimulsoft.Report.Web Imports Newtonsoft.Json.Linq +Imports System +Imports Microsoft.VisualBasic Partial Class PopUpVerFactura Inherits ClsPaginas @@ -4166,6 +4168,11 @@ Partial Class PopUpVerFactura 'ImprimirPDF(String.Format("Empresas/{0}/Formatos/Salidas.rdlc", 72), DtMovimientos, params, "ReporteSalidas", RDSName:="DsInventarios") ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Salidas.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios") Else + If UsuarioActual.CveEmpresa = 140 Then + params.Add(New ReportParameter("Concepto", ConceptoReporte)) + params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("UsuarioRegistro", UsuarioRegistro)) + End If params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("Fecha", Fecha)) params.Add(New ReportParameter("Almacen", Almacen)) @@ -4830,6 +4837,19 @@ Partial Class PopUpVerFactura Dim Titulo As String = "Acuse de cancelación de CFDI" Dim EstadoCFDI As String = "Cancelado" + + 'SI NO TIENE EL SELLO BUSCA OBTNERLO DE NUEVO + If String.IsNullOrEmpty(SelloCancelacion) Then + Dim ObjCancelacion As New Timbrado + If ObjCancelacion.ObtenerAcuse(CveVenta, UsuarioActual) Then + SelloCancelacion = ObjCancelacion.CancelacionAcuse + + If FechaCancelacion = Nothing OrElse FechaCancelacion = MinFecha Then + FechaCancelacion = ObjCancelacion.CancelacionFecha + End If + End If + End If + If CveEstatusFactura = 20 Then Titulo = "Acuse de solicitud de cancelación de CFDI" EstadoCFDI = "Vigente" diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb index a1d01875f..bb3a00671 100644 --- a/Compras/eFacturas.aspx.vb +++ b/Compras/eFacturas.aspx.vb @@ -2845,6 +2845,8 @@ Partial Class Compras_eFacturas Dim XMLDoc As New XmlDocument Dim Archivo As String = String.Format("{0}Compras\{1}\{2}", UsuarioActual.Empresa.Ruta, gvRow.DataKey("RFCDe"), gvRow.DataKey("XML")) + + Dim Prefijo As String = "" If IO.File.Exists(Archivo) Then @@ -2855,12 +2857,27 @@ Partial Class Compras_eFacturas XMLDoc.LoadXml(SXML) Dim Xml As New StringBuilder + + Dim namespaces As New XmlNamespaceManager(XMLDoc.NameTable) - namespaces.AddNamespace(XMLDoc.DocumentElement.Prefix, "http://www.sat.gob.mx/cfd/3") + Dim RootDocumento As XmlElement = XMLDoc.DocumentElement + Dim VersionCFDI As String = ValorXML(RootDocumento, "version") + + If VersionCFDI = "3.3" Then + Prefijo = "pago10" + namespaces.AddNamespace("pago10", "http://www.sat.gob.mx/Pagos") + namespaces.AddNamespace(XMLDoc.DocumentElement.Prefix, "http://www.sat.gob.mx/cfd/3") + ElseIf VersionCFDI = "4.0" Then + Prefijo = "pago20" + namespaces.AddNamespace("pago20", "http://www.sat.gob.mx/Pagos20") + namespaces.AddNamespace(XMLDoc.DocumentElement.Prefix, "http://www.sat.gob.mx/cfd/4") + End If + + namespaces.AddNamespace("tfd", "http://www.sat.gob.mx/TimbreFiscalDigital") - ' namespaces.AddNamespace("pago10", "http://www.sat.gob.mx/Pagos") + nodeComp = XMLDoc.SelectSingleNode(String.Format("//{0}:Complemento", XMLDoc.DocumentElement.Prefix), namespaces) @@ -2868,20 +2885,20 @@ Partial Class Compras_eFacturas nodeTFD = nodeComp.SelectSingleNode(String.Format("//{0}:TimbreFiscalDigital", "tfd"), namespaces) - Dim PrefijoPagos As String = "" + 'Dim PrefijoPagos As String = "" - For Each nodoPrefijo As XmlNode In nodeComp.ChildNodes - If nodoPrefijo.Prefix <> "tfd" And nodoPrefijo.Prefix.ToUpper.Contains("PAGO") Then - PrefijoPagos = nodoPrefijo.Prefix - End If - Next + 'For Each nodoPrefijo As XmlNode In nodeComp.ChildNodes + ' If nodoPrefijo.Prefix <> "tfd" And nodoPrefijo.Prefix.ToUpper.Contains("PAGO") Then + ' PrefijoPagos = nodoPrefijo.Prefix + ' End If + 'Next - namespaces.AddNamespace(PrefijoPagos, "http://www.sat.gob.mx/Pagos") + 'namespaces.AddNamespace(PrefijoPagos, "http://www.sat.gob.mx/Pagos") nodeComp = XMLDoc.SelectSingleNode(String.Format("//{0}:Complemento", XMLDoc.DocumentElement.Prefix), namespaces) - nodePagos = nodeComp.SelectSingleNode(String.Format("//{0}:Pagos/{0}:Pago", PrefijoPagos), namespaces) - nodePagos2 = nodeComp.SelectSingleNode(String.Format("//{0}:Pagos", PrefijoPagos), namespaces) + nodePagos = nodeComp.SelectSingleNode(String.Format("//{0}:Pagos/{0}:Pago", Prefijo), namespaces) + nodePagos2 = nodeComp.SelectSingleNode(String.Format("//{0}:Pagos", Prefijo), namespaces) @@ -2923,7 +2940,7 @@ Partial Class Compras_eFacturas Dim nodePagosN As XmlNodeList - nodePagosN = nodeComp.SelectNodes(String.Format("//{0}:Pagos", PrefijoPagos), namespaces) + nodePagosN = nodeComp.SelectNodes(String.Format("//{0}:Pagos", Prefijo), namespaces) For Each NodosPagos As XmlNode In nodePagosN @@ -2964,7 +2981,7 @@ Partial Class Compras_eFacturas MontoPago = Monto Dim ObjCompraFolios As New ClsCompras - If ObjCompraFolios.GetCompararComplementoPago(gvRow.DataKey("CveProveedor").ToEntero, Monto, nodePagos2.InnerXml.Replace($"{PrefijoPagos}:", ""), UsuarioActual.CveEmpresa, OP:=If(CveComplementoPagoCompra > 0, 2, 1), CveFactura:=CveFacturaComplemento) Then + If ObjCompraFolios.GetCompararComplementoPago(gvRow.DataKey("CveProveedor").ToEntero, Monto, nodePagos2.InnerXml.Replace($"{Prefijo}:", ""), UsuarioActual.CveEmpresa, OP:=If(CveComplementoPagoCompra > 0, 2, 1), CveFactura:=CveFacturaComplemento) Then ' '.GetCompararComplementoPago(gvRow.DataKey("CveProveedor").ToEntero, Monto, nodePagos2.InnerXml.Replace("pago10:", ""), UsuarioActual.CveEmpresa) Then If ObjCompraFolios.DtResultados.Rows.Count > 0 Then diff --git a/Contabilidad/RepBalanceGeneral.aspx.vb b/Contabilidad/RepBalanceGeneral.aspx.vb index 063f02588..4ca08cb36 100644 --- a/Contabilidad/RepBalanceGeneral.aspx.vb +++ b/Contabilidad/RepBalanceGeneral.aspx.vb @@ -1091,7 +1091,12 @@ Partial Class Contabilidad_RepBalanceGeneral 'parametros a enviar al reporte Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa)) - params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri)) + + 'LogoRuta = String.Format("file://{0}Formatos\Suc{1}.png", UsuarioActual.Empresa.Ruta, Vta.CveSucursal) + + Dim RutaLogo As String = String.Format("file://{0}Logo.png", UsuarioActual.Empresa.Ruta) + params.Add(New ReportParameter("pImg", RutaLogo)) + params.Add(New ReportParameter("pFirma1", "")) params.Add(New ReportParameter("pFirma2", "")) params.Add(New ReportParameter("pFechaFin", FechaF)) @@ -1125,7 +1130,10 @@ Partial Class Contabilidad_RepBalanceGeneral 'parametros a enviar al reporte Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa)) - params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri)) + + Dim RutaLogo As String = String.Format("file://{0}Logo.png", UsuarioActual.Empresa.Ruta) + params.Add(New ReportParameter("pImg", RutaLogo)) + 'params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri)) params.Add(New ReportParameter("pFechaFin", FechaF)) params.Add(New ReportParameter("pSubtotal", DdlSubtotales.SelectedValue.ToString)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario)) @@ -1148,7 +1156,9 @@ Partial Class Contabilidad_RepBalanceGeneral 'parametros a enviar al reporte Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa)) - params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri)) + Dim RutaLogo As String = String.Format("file://{0}Logo.png", UsuarioActual.Empresa.Ruta) + params.Add(New ReportParameter("pImg", RutaLogo)) + 'params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri)) params.Add(New ReportParameter("pFechaI", DdlEjercicio.SelectedValue)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario)) params.Add(New ReportParameter("FechaImpresion", Now.ToShortDateString)) diff --git a/Empresas/140/Formatos/Factura.rdlc b/Empresas/140/Formatos/Factura.rdlc index f4d1e0625..7520029be 100644 --- a/Empresas/140/Formatos/Factura.rdlc +++ b/Empresas/140/Formatos/Factura.rdlc @@ -2,541 +2,6 @@ - - - - true - true - - - - - Serie: - - - - - - - - =Parameters!Serie.Value - - - - - - - - Folio: - - - - =Parameters!Folio.Value - - - - - - - Textbox81 - 0.36804in - 4.70028in - 0.18682in - 2.8585in - - - 2pt - 2pt - 2pt - 2pt - - - - Embedded - Logo - Fit - 0.23694in - 2.38455cm - 3.48217cm - 1 - - - - - - true - true - - - - - Cliente: - - - - =Parameters!ClienteCodigo.Value - - - - - - - - - =Parameters!ClienteNombre.Value - - - - - - - - - =Parameters!ClienteRFC.Value - - - - - - - - - Domicilio: - - - - =Parameters!ClienteDireccion.Value - - - - , - - - - =Parameters!ClienteCiudad.Value - - - - , - - - - =Parameters!ClienteEstado.Value - - - - - - - Textbox36 - 1.83775cm - 4.3204cm - 0.96667cm - 14.87889cm - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - 3.08165cm - 0.635cm - 0cm - 18.56429cm - 3 - - - - - - true - true - - - - - POR ESTE - - - - PAGARÉ - - - - PROMETO(EMOS), Y ME (NOS) OBLIGO (AMOS) A PAGAR INCONDICIONALMENTE A LA ORDEN DE - - - - BDH BATERIAS DISTRIBUCIONES DE HERMOSILLO SA DE CV - - - - , EN LA CIUDAD DE HERMOSILLO, SONORA, O CUALQUIER OTRA CIUDAD QUE DESIGNE EL TITULAR DEL DOCUMENTO, LA CANTIDAD DE - - - - $ - - - - - - - - =Parameters!Total.Value - - - - *** - - - - SON - - - - =Microsoft.VisualBasic.Strings.UCase(Parameters!ImporteLetra.Value) - - - - *** VALOR QUE RECONOZCO (EMOS) ADEUDARLE OBLIGÁNDOME (NOS) A CUBRIR A SU VENCIMIENTO - - - - =Parameters!Vencimiento.Value - - - - , DE NO PAGARSE CAUSARÍA UN - - - - INTERÉS MORATORIO - - - - DEL 10% POR CIENTO MENSUAL, POR EL TIEMPO QUE PERMANEZCA INSOLUTO EL ADEUDO EXISTENTE, QUEDANDO EXPRESAMENTE CONVENIDO QUE LA FALTA DE PAGO OPORTUNO OCASIONA AL DEUDOR GASTOS DE COBRO JUDICIALES O EXTRAJUDICIALES Y LOS QUE SE OCASIONEN, RENUNCIANDO EL DEUDOR AL FUERO DE SU DOMICILIO QUE PUDIERA CORRESPONDERLE, ESTE PAGARÉ ES MERCANTIL Y ESTÁ PROTEGIDO POR LA LEY GENERAL DE TÍTULOS Y OPERACIONES DE CRÉDITO. - - - - - - - 8.35197cm - 6.8587cm - 0cm - 6.65396cm - 5 - - - - - - true - true - - - - - ACEPTO (AMOS) DE CONFORMIDAD - - - - - - - Textbox39 - 8.52836cm - 6.8587cm - 0.6cm - 6.65396cm - 6 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Obligado - - - - - - - Textbox38 - 6.90569cm - 6.8587cm - 0.67938cm - 6.65396cm - 7 - - - 2pt - 2pt - 2pt - 2pt - - - - - Start - - true - 7.49312in - 0.20879in - 3.59384in - 7.78795in - - =iif(Parameters!AplicaPagare.Value="0",True,False) - - - - - true true @@ -824,7 +289,6 @@ 4.36025cm 1.28875in 3.20861in - 1 @@ -1062,7 +526,7 @@ 0.05395in 1.21305in 8.22763in - 2 + 1 @@ -1131,7 +595,7 @@ 0.13011cm 2.1447cm 4.08234cm - 3 + 2 @@ -1432,7 +896,7 @@ 5.03983in 1.62345in 3.24175in - 4 + 3 @@ -1544,7 +1008,7 @@ 13.31398cm 1.42163cm 7.72123cm - 5 + 4 @@ -2203,7 +1667,7 @@ 0.05854in 0.34081in 8.22304in - 6 + 5 @@ -2229,7 +1693,7 @@ 0.14868cm 0.14316cm 20.88652cm - 7 + 6 @@ -2260,7 +1724,7 @@ 15.09838cm 0.14316cm 5.93682cm - 8 + 7 @@ -2297,7 +1761,7 @@ 2.30237in 0.18861in 5.97921in - 9 + 8 @@ -2327,7 +1791,7 @@ 0.13011cm 0.1cm 20.88652cm - 10 + 9 @@ -2358,7 +1822,7 @@ 0.18043cm 0.14316cm 20.85477cm - 11 + 10 @@ -2392,7 +1856,7 @@ 5.62203cm 0.34219cm 9.30316cm - 12 + 11 @@ -2510,7 +1974,7 @@ 15.09838cm 0.48004cm 5.93682cm - 13 + 12 @@ -3004,11 +2468,11 @@ true - 15.53176cm + 14.89676cm 0.13702cm 2.97096cm 20.89818cm - 14 + 13 =Microsoft.VisualBasic.Interaction.IIF(First(Fields!SerieFolio.Value, "DataSet4") <> "", False, True) @@ -3283,7 +2747,7 @@ 0.05854in 0.34081in 2.08542in - 15 + 14 @@ -3329,7 +2793,7 @@ 8.39473cm 1.07794cm 20.85477cm - 16 + 15 @@ -3348,7 +2812,7 @@ 0.15969cm 2.38455cm 3.48217cm - 17 + 16 @@ -3437,7 +2901,7 @@ 4.38884cm 2.05902cm 8.12128cm - 18 + 17 @@ -3449,11 +2913,11 @@ - 14.70114cm + 14.16139cm 14.38124cm 0cm 6.65396cm - 19 + 18 @@ -3480,11 +2944,11 @@ Textbox39 - 14.87753cm + 14.33778cm 14.38124cm - 0.6cm + 0.47784cm 6.65396cm - 20 + 19 @@ -3521,9 +2985,9 @@ Textbox38 13.25486cm 14.38124cm - 0.67938cm + 0.4148cm 6.65396cm - 21 + 20 @@ -3572,7 +3036,7 @@ 0.13011cm 1.21002cm 4.23014cm - 22 + 21 @@ -3583,8 +3047,587 @@ 2pt + + + + + 20.4cm + + + + + 5cm + + + + + + + true + true + + + + + Serie: + + + + + + + + =Parameters!Serie.Value + + + + + + + + Folio: + + + + =Parameters!Folio.Value + + + + + + + Textbox81 + 0.01788in + 4.70028in + 0.18682in + 2.8585in + + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + Logo + Fit + 0.23694in + 1.40934cm + 2.57947cm + 1 + + + + + + true + true + + + + + + + + + Cliente: + + + + =Parameters!ClienteCodigo.Value + + + + - + + + + =Parameters!ClienteNombre.Value + + + + - + + + + =Parameters!ClienteRFC.Value + + + + + + + + + Domicilio: + + + + =Parameters!ClienteDireccion.Value + + + + , + + + + =Parameters!ClienteCiudad.Value + + + + , + + + + =Parameters!ClienteEstado.Value + + + + + + + Textbox36 + 0.55521cm + 3.35769cm + 0.85414cm + 14.87889cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + 1.44462cm + 0cm + 20.4cm + 3 + + + + + + true + true + + + + + POR ESTE + + + + PAGARÉ + + + + PROMETO(EMOS), Y ME (NOS) OBLIGO (AMOS) A PAGAR INCONDICIONALMENTE A LA ORDEN DE + + + + BDH BATERIAS DISTRIBUCIONES DE HERMOSILLO SA DE CV + + + + , EN LA CIUDAD DE HERMOSILLO, SONORA, O CUALQUIER OTRA CIUDAD QUE DESIGNE EL TITULAR DEL DOCUMENTO, LA CANTIDAD DE + + + + $ + + + + + + + + =Parameters!Total.Value + + + + *** + + + + SON + + + + =Microsoft.VisualBasic.Strings.UCase(Parameters!ImporteLetra.Value) + + + + *** VALOR QUE RECONOZCO (EMOS) ADEUDARLE OBLIGÁNDOME (NOS) A CUBRIR A SU VENCIMIENTO + + + + =Parameters!Vencimiento.Value + + + + , DE NO PAGARSE CAUSARÍA UN + + + + INTERÉS MORATORIO + + + + DEL 10% POR CIENTO MENSUAL, POR EL TIEMPO QUE PERMANEZCA INSOLUTO EL ADEUDO EXISTENTE, QUEDANDO EXPRESAMENTE CONVENIDO QUE LA FALTA DE PAGO OPORTUNO OCASIONA AL DEUDOR GASTOS DE COBRO JUDICIALES O EXTRAJUDICIALES Y LOS QUE SE OCASIONEN, RENUNCIANDO EL DEUDOR AL FUERO DE SU DOMICILIO QUE PUDIERA CORRESPONDERLE, ESTE PAGARÉ ES MERCANTIL Y ESTÁ PROTEGIDO POR LA LEY GENERAL DE TÍTULOS Y OPERACIONES DE CRÉDITO. + + + + + + + 4.51022cm + 6.8587cm + 0cm + 6.65396cm + 5 + + + + + + true + true + + + + + ACEPTO (AMOS) DE CONFORMIDAD + + + + + + + Textbox39 + 4.43261cm + 6.8587cm + 0.46771cm + 6.65396cm + 6 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Obligado + + + + + + + Textbox38 + 3.66719cm + 6.8587cm + 0.54709cm + 6.65396cm + 7 + + + 2pt + 2pt + 2pt + 2pt + + + + + Start + + true + + =iif(Parameters!AplicaPagare.Value="0",True,False) + + + + + + + + + + + + + + + + + + + + + + DsOC + 17.9352cm + 0.34808cm + 5cm + 20.4cm + 22 + + + 10pt + + - 28.16088cm + 22.9352cm @@ -3594,7 +3637,7 @@ 21.1673cm - 0.63499cm + 0.5327cm true true diff --git a/Empresas/140/Formatos/Salidas.rdlc b/Empresas/140/Formatos/Salidas.rdlc index 647555d66..781193cf7 100644 --- a/Empresas/140/Formatos/Salidas.rdlc +++ b/Empresas/140/Formatos/Salidas.rdlc @@ -253,12 +253,11 @@ - 0.69042cm + 0.47875cm - true true @@ -291,7 +290,6 @@ - true true @@ -323,7 +321,6 @@ - true true @@ -353,7 +350,6 @@ - true true @@ -383,7 +379,6 @@ - true true @@ -443,7 +438,7 @@ DsInventarios 0.17639cm 0.22456cm - 1.11096cm + 0.89929cm 20.39972cm - - - - - 2pt - 2pt - 2pt - 2pt - - true true @@ -629,15 +592,15 @@ - Textbox34 - 1.02789cm - 4.37211cm - 0.95277cm - 8.10916cm - 1 + 1.71608cm + 0.67239cm + 20.62428cm @@ -648,21 +611,6 @@ 2pt - - External - =Parameters!LogoPath.Value - FitProportional - 0.3175cm - 0.19987cm - 1.66316cm - 3.43141cm - 2 - - - - true true @@ -682,11 +630,11 @@ Textbox15 - 2.34504cm - 2.45652cm - 0.6cm - 9.54145cm - 3 + 2.68428cm + 10.74503cm + 0.56824cm + 9.56615cm + 1 @@ -711,11 +659,11 @@ Textbox18 - 3.11789cm - 2.43182cm + 3.42537cm + 10.74503cm 0.6cm - 9.54145cm - 4 + 9.56615cm + 2 @@ -743,11 +691,11 @@ Textbox16 - 3.097cm - 0.26872cm - 0.6cm + 3.43623cm + 8.61368cm + 0.57827cm 2.11724cm - 5 + 3 =IIF(Parameters!FacturadoA.Value = "", True, False) @@ -778,11 +726,11 @@ Textbox14 - 2.34504cm - 0.25631cm - 0.6cm + 2.68428cm + 8.60127cm + 0.56824cm 2.12965cm - 6 + 4 =IIF(Parameters!FacturaProveedor.Value = "", True, False) @@ -820,7 +768,7 @@ 13.63291cm 0.89103cm 4.09693cm - 7 + 5 @@ -856,7 +804,7 @@ 17.72984cm 0.9263cm 2.57165cm - 8 + 6 @@ -884,11 +832,11 @@ Textbox4 - 3.09701cm - 12.65424cm + 3.42537cm + 0.32995cm 0.59999cm 1.80326cm - 9 + 7 @@ -906,9 +854,11 @@ =Parameters!Almacen.Value - + @@ -941,7 +891,6 @@ =Parameters!Fecha.Value @@ -952,11 +901,11 @@ Textbox32 - 3.12876cm - 14.4575cm + 3.42537cm + 2.13321cm 0.58913cm - 5.9022cm - 11 + 6.43631cm + 9 @@ -984,11 +933,11 @@ Textbox3 - 2.34505cm - 12.65424cm - 0.59999cm + 2.70516cm + 0.32995cm + 0.54736cm 1.80326cm - 12 + 10 @@ -1018,11 +967,11 @@ Textbox3 - 1.27306cm + 1.20956cm 13.63291cm 0.47477cm 4.09693cm - 13 + 11 =IIF(Parameters!FolioRelacionado.Value = "",true,false) @@ -1055,11 +1004,11 @@ Textbox31 - 1.27306cm + 1.20956cm 17.72984cm 0.47477cm 2.57165cm - 14 + 12 =IIF(Parameters!FolioRelacionado.Value = "",true,false) @@ -1073,6 +1022,53 @@ 2pt + + Embedded + Logo2 + Fit + 0.1299in + 0.61281in + 1.32508in + 13 + + + + + + true + true + + + + + BDH BATERÍAS DISTRIBUCIONES DE HERMOSILLO S.A. DE C.V. + + + + + + + Textbox2 + 3.83674cm + 1.55733cm + 9.26108cm + 14 + + + 2pt + 2pt + 2pt + 2pt + + + + . + + + + + + + true + true + + + + + Sucursal Matriz + + + + + + + + + Beneficiario: ELECTRICA SERVEC S DE RL DE CV + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Sucursal Tijuana + + + + + + + + + Beneficiario: ELECTRICA SERVEC S DE RL DE CV + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + Embedded - LOGOSERVECENJPG + RFIRMAELECTRONICAEDITABLE FitProportional - 0.71626cm - 0.25136cm - 1.23542cm - 3.86912cm - 19 + 0.28346cm + 0.51012cm + 1.73059cm + 3.63914cm + 21 + + true + true + + + + + Cuentas Bancarias + + + + Textbox3 + 7.75847cm + 0.25136cm + 0.53798cm + 18.6975cm + 22 + + + 2pt + 2pt + 2pt + 2pt + + + + + + true + true + + + + + Tipo Relación: + + + + + + + Textbox29 + 0.69848cm + 2.57101cm + 0.41981cm + 6.35221cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!TipoRelacionTexto.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 2.63922cm + + + 2.27051cm + + + 3.25097cm + + + 7.7847cm + + + + + 0.44125cm + + + + + true + true + + + + + Folio + + + + + + + Textbox10 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Fecha + + + + + + + Textbox12 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Importe + + + + + + + Textbox21 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Folio Fiscal + + + + + + + Textbox11 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.41479cm + + + + + true + true + + + + + =Fields!SerieFolio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Fecha.Value + + + + + + + Fecha + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Importe1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!FolioFiscal.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + After + + + + + + + DataSet4 + 1.22386cm + 2.57101cm + 0.85604cm + 15.9454cm + 2 + + + + + + true + true + + + + + VERSION 3.3 + + + + + + + Textbox5 + 2.15724cm + 17.53151cm + 0.52063cm + 3.32021cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + CFDI Relacionados + + + + + + + Textbox5 + 0.03101cm + 0.54004cm + 20.79183cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + 16.79845cm + 0.15747cm + 2.67787cm + 20.85172cm + 23 + + =Microsoft.VisualBasic.Interaction.IIF(First(Fields!SerieFolio.Value, "DataSet4") <> "", False, True) + + + + + - 15.2621cm + 19.47632cm + + . + + + + + - 18.23806cm + 18.23807cm - - - Entrega Almacén (Surtir Mercancia) - - - - -
  • -   -
  • -
    - - - - <%--FILTROS--%> - - - -
    -
    -
    -
      -
    • Cliente: - - - - - - - - - <%----%> -
    • -
    • Serie-Folio: - - - - - - - - - - -
    • -
    -
    -
    - - <%----%> -
    -
    - -
    -
    -
    -
    - - - -
    - -
    - - <%--DATOS DE LA VENTA--%> -
    - - -
    -
    -
    -
    - - Venta a surtir -
    -
    -
    -
    -
    -
    - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - -
    Cliente: - -
    Folio: - - <%----%> -
    Observaciones Grales: - -
    Observaciones Almacén: - -
    Dirección Envío: - - -
    -
    -
    -
    -
    -
    -
    - - - <%--DATOS DEL MOVIMIENTO--%> -
    - - -
    -
    -
    -
    - - Datos del movimiento -
    -
    -
    -
    -
    -
    - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Almacén: - - - -
    Fecha: -
    -
    - - - - - - - - - - - - -
    -
    -
    Guía: - -
    Observaciones: - -
    Transitorio: - -
    - -
    - -
    - -
    - - - -
    -
    - - - - - - - ver detalle de entrega - -
    -
    -
    -
    -
    -
    -
    - -
    - - - - - - - -
    -
    - - <%--PENDIENTES DE SURTIR--%> -
    -
    -
    -
    - - Ventas por surtir -
    -
    -
    -
    -
    -
    - - - - -   - - - - - - - - Sucursal: - - - - - - - - - - - - - - - - - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    - - - <%--ADVERTENCIA--%> -
    -
    -
    - - Información: - -
    -
    -
    - <%--ADVERTENCIA--%> -
    -
    -
    - - Información: - -
    -
    -
    -
    - - - - - - - - - - - - - - -
    - - <%--PERSONAL ENTREGA--%> -
    -
    -
    -
    - - PERSONAL AUTORIZADO PARA ENTREGAS EN ALMACÉN: -
    -
    -
    - - - - - - <%----%> - <%-- - - - - - --%> - - - - - -
    - -
    -
    -
    -
    -
    -
    - -
    - - - -
    -
    -
    - - Salida de Inventario -
    -
    -
    -
    -
    -
    - -
    -
    -
    - - <%--AGREGAR POR CODIGO DE BARRAS--%> - - -
    - -
    -
    - -
    -
    -
    - - - - - - -
    - - - - - - - -
    -
    -
    -
    -
    - - - <%--GV DATOS--%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - - - - - - -
    -
    -
    - - - - - - -
    -
    - -
    -
    - -
    -
    - - - <%--BOTON GUARDAR--%> - - -
    - -
    -
    - -
    -
    -
    - - - <%--AGREGA POR SERIE--%> - - - - - - - - <%--CANTIDAD ESPECIAL--%> - - - - - - - - - - - <%--CANTIDAD ESPECIAL 2--%> - - - - - - - <%--NUMERO DE GUIA--%> - - - - - - - - - - - -
    - - - - - - - +<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="EntregaAlmacen.aspx.vb" Inherits="Inventarios_EntregaAlmacen" EnableEventValidation="false" %> + + + + + + + + Entrega Almacén (Surtir Mercancia) + + + + +
  • +   +
  • +
    + + + + <%--FILTROS--%> + + + +
    +
    +
    +
      +
    • Cliente: + + + + + + + + + + + + + + + + + <%----%> +
    • +
    • Serie-Folio: + + + + + + + + + + + + + + + + + + +
    • +
    +
    +
    + + <%----%> +
    +
    + +
    +
    +
    +
    + + + +
    + +
    + + <%--DATOS DE LA VENTA--%> +
    + + +
    +
    +
    +
    + + Venta a surtir +
    +
    +
    +
    +
    +
    + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + +
    Cliente: + +
    Folio: + + <%----%> +
    Observaciones Grales: + +
    Observaciones Almacén: + +
    Dirección Envío: + + +
    +
    +
    +
    +
    +
    +
    + + + <%--DATOS DEL MOVIMIENTO--%> +
    + + +
    +
    +
    +
    + + Datos del movimiento +
    +
    +
    +
    +
    +
    + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Almacén: + + + +
    Fecha: +
    +
    + + + + + + + + + + + + +
    +
    +
    Guía: + +
    Observaciones: + +
    Transitorio: + +
    + +
    + +
    + +
    + + + +
    +
    + + + + + + + ver detalle de entrega + +
    +
    +
    +
    +
    +
    +
    + +
    + + + + + + + +
    +
    + + <%--PENDIENTES DE SURTIR--%> +
    +
    +
    +
    + + Ventas por surtir +
    +
    +
    +
    +
    +
    + + + + + +   + " style="display: inline-block; margin-right: -20px; width: 70px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +   + <%--
    +
    +
    +
    + " style="display: inline-block; margin-right: -20px; width: 100px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    +
    --%> + Sucursal: + + + + + + + + + + + + + + + + +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + + + <%--ADVERTENCIA--%> +
    +
    +
    + + Información: + +
    +
    +
    + <%--ADVERTENCIA--%> +
    +
    +
    + + Información: + +
    +
    +
    +
    + + + + + + + + + + + + + + +
    + + <%--PERSONAL ENTREGA--%> +
    +
    +
    +
    + + PERSONAL AUTORIZADO PARA ENTREGAS EN ALMACÉN: +
    +
    +
    + + + + + + <%----%> + <%-- + + + + + --%> + + + + + +
    + +
    +
    +
    +
    +
    +
    + +
    + + + +
    +
    +
    + + Salida de Inventario +
    +
    +
    +
    +
    +
    + +
    +
    +
    + + <%--AGREGAR POR CODIGO DE BARRAS--%> + + +
    + +
    +
    + +
    +
    +
    + + + + + + +
    + + + + + + + +
    +
    +
    +
    +
    + + + <%--GV DATOS--%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + +
    +
    +
    + + + + + + +
    +
    + +
    +
    + +
    +
    + + + <%--BOTON GUARDAR--%> + + +
    + +
    +
    + +
    +
    +
    + + + <%--AGREGA POR SERIE--%> + + + + + + + + <%--CANTIDAD ESPECIAL--%> + + + + + + + + + + + <%--CANTIDAD ESPECIAL 2--%> + + + + + + + <%--NUMERO DE GUIA--%> + + + + + + + + + + + +
    + + + + + + + diff --git a/Inventarios/RecepcionUsados.aspx.vb b/Inventarios/RecepcionUsados.aspx.vb index b280bf19c..ec3e16af1 100644 --- a/Inventarios/RecepcionUsados.aspx.vb +++ b/Inventarios/RecepcionUsados.aspx.vb @@ -2400,6 +2400,9 @@ Partial Class Inventarios_RecepcionUsados 'GUARDAR AJUSTES Me.ObjRemisionNC.DtAjustes = TmpDTAjustes + If Me.ObjRemisionNC.DtAjustes IsNot Nothing AndAlso Me.ObjRemisionNC.DtAjustes.Rows.Count > 0 Then + Me.ObjRemisionNC.EsGarantia = True + End If 'VALIDA PROMOCIONES Y EXISTENCIAS Dim ObjVentas As New ClsVentas diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb index d6fc3c6b7..a35765415 100644 --- a/Inventarios/TraspasoAlmacen.aspx.vb +++ b/Inventarios/TraspasoAlmacen.aspx.vb @@ -567,7 +567,7 @@ Partial Class Inventarios_TraspasoAlmacen If CveProducto > 0 Then If TxtnSerie.Visible Then Cantidad = 1 - If TxtnSerie.Text = "" Then + If String.IsNullOrEmpty(TxtnSerie.Text.Trim()) OrElse String.IsNullOrWhiteSpace(TxtnSerie.Text.Trim()) Then Alert("Serie es necesario", TipoMensaje.MsgAdvertencia) RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')") Exit Sub diff --git a/Ventas/CatAutorizacionLimites.aspx b/Ventas/CatAutorizacionLimites.aspx index 1b989eed8..5bc99ff65 100644 --- a/Ventas/CatAutorizacionLimites.aspx +++ b/Ventas/CatAutorizacionLimites.aspx @@ -31,14 +31,16 @@ -
    -
    +
    +
    +
    -
    -
      -
    • Estatus: +
      +
      + +
      @@ -46,16 +48,51 @@ -
    • -
    • Cliente: - +
    + +
    - -
  • Vendedor: +
  • + +
    - - +
    +
    +
    +
    +
    diff --git a/Ventas/CatAutorizacionLimites.aspx.vb b/Ventas/CatAutorizacionLimites.aspx.vb index bcf73786a..217082324 100644 --- a/Ventas/CatAutorizacionLimites.aspx.vb +++ b/Ventas/CatAutorizacionLimites.aspx.vb @@ -1,5 +1,4 @@ - -Imports Extensiones +Imports Extensiones Partial Class Ventas_CatAutorizacionLimites Inherits ClsPaginas @@ -24,6 +23,8 @@ Partial Class Ventas_CatAutorizacionLimites #Region "CARGAS" Private Sub CargaCombos() + txtFechaI.Text = Now.AddDays(-1).ToString("dd/MM/yyyy") + txtFechaI.Text = Now.ToString("dd/MM/yyyy") DdlCliente.setEsWebService(True) DdlClienteFiltro.setEsWebService(True) @@ -63,8 +64,12 @@ Partial Class Ventas_CatAutorizacionLimites CveCliente = DdlClienteFiltro.SelectedValue.ToEntero() End If + Dim FechaI, FechaF As Date + FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim.ToDate, MinFecha) + FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim.ToDate, MaxFecha) + Dim ObjGral As New ClsVentas - If ObjGral.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, DdlVendedorFiltro.SelectedValue.ToEntero(), "-1", CveEstatus:=DdlEstatus.SelectedValue.ToEntero()) Then + If ObjGral.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, DdlVendedorFiltro.SelectedValue.ToEntero(), "-1", CveEstatus:=DdlEstatus.SelectedValue.ToEntero(), FechaI:=FechaI, FechaF:=FechaF) Then GvDatos.DataSource = ObjGral.DtResultados End If ObjGral.Dispose() diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index 20fa8f6e1..fc434b7e5 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -1,4 +1,4 @@ -<%@ Page Title="Ventas - Clientes" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="Clientes.aspx.vb" Inherits="Clientes" %> +<%@ Page Title="Ventas - Clientes" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="Clientes.aspx.vb" Inherits="Clientes" ValidateRequest="false" %> <%@ Register Assembly="TimePicker" Namespace="MKB.TimePicker" TagPrefix="cc1" %> <%@ Register Assembly="eWorld.UI" Namespace="eWorld.UI" TagPrefix="ew" %> diff --git a/Ventas/PV.aspx b/Ventas/PV.aspx index e26c3d98f..ad071e15d 100644 --- a/Ventas/PV.aspx +++ b/Ventas/PV.aspx @@ -1891,12 +1891,89 @@