diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 36a31158b..17eb43f04 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -6960,8 +6960,11 @@ Public Class ClsPaginas End If params.Add(New ReportParameter("CFDIVersion", Vta.Version)) - If Vta.Cliente.CodigoRegimenFiscal.ToString.Length > 0 Then - params.Add(New ReportParameter("RegimenFiscalCodigo", $"{Vta.Cliente.CodigoRegimenFiscal}-{Vta.Cliente.RegimenFiscal}")) + + If Vta.Cliente IsNot Nothing Then + If Vta.Cliente.CodigoRegimenFiscal.ToString.Length > 0 Then + params.Add(New ReportParameter("RegimenFiscalCodigo", $"{Vta.Cliente.CodigoRegimenFiscal}-{Vta.Cliente.RegimenFiscal}")) + End If End If 'CLIENTE @@ -9499,7 +9502,9 @@ Public Class ClsPaginas ImporteMovimiento = (PorcentajePago * VentaActual.IVA).RoundSQL ImporteMN = (ImporteMovimiento * VentaActual.TC).RoundSQL If VentaActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 13, VentaActual.SerieFolio, Concepto, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, PorcentajeImpuesto:=VentaActual.PorcentajeIVA, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto, CveCompra:=Pago.CveCompraRelacionada) Then ErrorMovtos = True + 'si tiene funcionalidad para tomar el TC de pago. se recalcula el importe If FuncionalidadFluctuacionImpuestos Then ImporteMN = (ImporteMovimiento * TCValuacionPago).RoundSQL If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 61, VentaActual.SerieFolio, Concepto, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, PorcentajeImpuesto:=VentaActual.PorcentajeIVA, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto, CveCompra:=Pago.CveCompraRelacionada) Then ErrorMovtos = True @@ -9537,6 +9542,39 @@ Public Class ClsPaginas End If End If + If Pago.AplicaConceptoImpuestoPendiente Then + 'si tiene iva y su proporcion + If Not ErrorMovtos AndAlso VentaActual.IVA <> 0 Then + ImporteMovimiento = (PorcentajePago * VentaActual.IVA).RoundSQL + ImporteMN = (ImporteMovimiento * VentaActual.TC).RoundSQL + If VentaActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento + + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 13, VentaActual.SerieFolio, Concepto, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, PorcentajeImpuesto:=VentaActual.PorcentajeIVA, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto, CveCompra:=Pago.CveCompraRelacionada) Then ErrorMovtos = True + End If + 'si tiene RET IVA y su proporcion + If Not ErrorMovtos AndAlso VentaActual.RetIVA > 0 Then + ImporteMovimiento = (PorcentajePago * VentaActual.RetIVA).RoundSQL + ImporteMN = (ImporteMovimiento * VentaActual.TC).RoundSQL + If VentaActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 8, VentaActual.SerieFolio, Concepto, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto, CveCompra:=Pago.CveCompraRelacionada) Then ErrorMovtos = True + End If + 'si tiene Ret ISR y su proporcion + If Not ErrorMovtos AndAlso VentaActual.RetISR > 0 Then + ImporteMovimiento = (PorcentajePago * VentaActual.RetISR).RoundSQL + ImporteMN = (ImporteMovimiento * VentaActual.TC).RoundSQL + If VentaActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 9, VentaActual.SerieFolio, Concepto, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto, CveCompra:=Pago.CveCompraRelacionada) Then ErrorMovtos = True + End If + 'si tiene IEPS y su proporcion + If Not ErrorMovtos AndAlso VentaActual.IEPS > 0 Then + ImporteMovimiento = (PorcentajePago * VentaActual.IEPS).RoundSQL + ImporteMN = (ImporteMovimiento * VentaActual.TC).RoundSQL + If VentaActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento + Dim Ret As New ConceptosRetenciones + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 38, VentaActual.SerieFolio, Concepto, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto, CveCompra:=Pago.CveCompraRelacionada) Then ErrorMovtos = True + End If + End If + 'concepto pago If Pago.TipoPago = "B" AndAlso Not ErrorMovtos AndAlso AplicarConceptoAplicacion Then ' B A N C O S Concepto = String.Format("{0} NC:{1}", VentaActual.ClienteNombre, Pago.Referencia) @@ -9680,6 +9718,7 @@ Public Class ClsPaginas Public Property CveClientePago As Integer = -1 Public Property ImporteFluctuacionAdicional As Decimal = 0 Public Property ValorMultiplicador As Decimal = 1 + Public Property AplicaConceptoImpuestoPendiente As Boolean = False End Class Public Class Venta @@ -10919,6 +10958,7 @@ Public Class ClsPaginas PaginaDict.Add("/Ventas/CatPSSubProyectosVendedores.aspx".ToUpper(), 787) PaginaDict.Add("/Ventas/CatMotivosCancelacion.aspx".ToUpper(), 788) PaginaDict.Add("/Ventas/CatSelectivas.aspx".ToUpper(), 897) + PaginaDict.Add("/Ventas/DashboardVentas.aspx".ToUpper(), 789) #End Region #Region "VIA" diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb index 511e9125e..96195d57a 100644 --- a/App_Code/ClsProductosServicios.vb +++ b/App_Code/ClsProductosServicios.vb @@ -537,7 +537,21 @@ Public Class ClsProductosServicios If Ex1.Message.Contains("Número: 2627;") Then Alert("El Nuevo Producto o Servicio no se guardo debido a que actualmente se encuentra registrado", TipoMensaje.MsgAdvertencia) ElseIf Ex1.Message.Contains("Número: 2601;") Then - Alert("El Nuevo Producto o Servicio tiene Codigo duplicado:" & Codigo, TipoMensaje.MsgAdvertencia) + + If Ex1.Message.Contains("UK_ProductosServicios_Codigo_Empresa") Then + Alert("El Nuevo Producto o Servicio tiene Codigo duplicado:" & Codigo, TipoMensaje.MsgAdvertencia) + ElseIf Ex1.Message.Contains("UK_ProductosServicios_CveEmpresa_CodigoBarras") Then + Alert("El Nuevo Producto o Servicio tiene Codigo de barras duplicado:" & CodigoBarras, TipoMensaje.MsgAdvertencia) + ElseIf Ex1.Message.Contains("UK_ProductosServicios_CveEmpresa_NumeroParte") Then + Alert("El Nuevo Producto o Servicio tiene Numero de Parte duplicado:" & NumeroParte, TipoMensaje.MsgAdvertencia) + ElseIf Ex1.Message.Contains("UK_ProductosServicios_EmpresaNumeroParte") Then + Alert("El Nuevo Producto o Servicio tiene Numero de Parte duplicado:" & NumeroParte, TipoMensaje.MsgAdvertencia) + Else + Alert("El Nuevo Producto o Servicio tiene un valor duplicado(ND):" & NumeroParte, TipoMensaje.MsgAdvertencia) + End If + + + Else Me.OnError("Ocurrió un error al guardar el nuevo Producto o Servicio.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End If diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 58e6691f6..c01821bed 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -7464,6 +7464,26 @@ Public Class ClsVentas Return Retorno End Function + Public Function GetDashboardVentasGet(CveEmpresa As Integer, CveSubProyecto As Integer, Agrupador As Integer) As Boolean + + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_DashboardVentasGet") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@Agrupador", SqlDbType.Int).Value = Agrupador + End With + Try + Dataset = New DataSet() + SqlAdapter.Fill(Dataset) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener el dashboard de ventas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return Retorno + + End Function + #Region "PRODUCTOS/SERVICIOS, SUBPROYECTOS Y VENDEDORES" Public Function GetPSSubProyectosVendedores(CveEmpresa As Integer) As Boolean diff --git a/App_Code/Timbrado.vb b/App_Code/Timbrado.vb index c926a33b8..224d790b2 100644 --- a/App_Code/Timbrado.vb +++ b/App_Code/Timbrado.vb @@ -2886,6 +2886,13 @@ concep.DescripcionesEspecificas.NumeroSerie) ArchivoLLave = $"{Extensiones.ModExtensiones.DirectorioEmpresas}\1\Certificados\EKU9003173C9.key" ArchivoCertificado = $"{Extensiones.ModExtensiones.DirectorioEmpresas}\1\Certificados\EKU9003173C9.cer" + If Ventas.Timbre.Comprobante.TipoComprobante = "T" Then + Ventas.Timbre.Receptor.RFC = "EKU9003173C9" + Ventas.Timbre.Receptor.Nombre = "ESCUELA KEMPER URGATE" + Ventas.Timbre.Receptor.DomicilioFiscalReceptor = "42501" + Ventas.Timbre.Receptor.RegimenFiscalReceptor = "601" + End If + Clave = "12345678a" TimbraProduccion = False UsuarioServicio = "UserTest" @@ -3124,6 +3131,13 @@ concep.DescripcionesEspecificas.NumeroSerie) Clave = "12345678a" TimbraProduccion = False + If Ventas.Timbre.Comprobante.TipoComprobante = "T" Then + Ventas.Timbre.Receptor.RFC = "EKU9003173C9" + Ventas.Timbre.Receptor.Nombre = "ESCUELA KEMPER URGATE" + Ventas.Timbre.Receptor.DomicilioFiscalReceptor = "42501" + Ventas.Timbre.Receptor.RegimenFiscalReceptor = "601" + End If + End If #Region "Valida" diff --git a/App_Code/Timbres.vb b/App_Code/Timbres.vb index 10e58f4e2..d634088ea 100644 --- a/App_Code/Timbres.vb +++ b/App_Code/Timbres.vb @@ -395,6 +395,10 @@ Public Class Timbres _MsgError.AppendLine("timbrado son detalle de productos") End If + If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then + Timbre.Receptor.UsoCFDI = "CP01" + End If + End If Else diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx index abf6c7d0f..0a205a1e2 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -1305,9 +1305,11 @@ - + <%--0--%> Aplica
@@ -1318,6 +1320,7 @@
+ <%--1--%> @@ -1329,9 +1332,20 @@ - + <%--2--%> + + + Unidad + + + + + + <%--3--%> + <%--4--%> + <%--5--%> @@ -1341,6 +1355,7 @@ + <%--6--%> @@ -1349,11 +1364,31 @@ - <%-- - - - - --%> + <%--7--%> + + + + + + <%--8--%> + + + +
+ + + + + + + + + +
+ +
+
+ <%--9--%> Almacén Consignación
@@ -1362,7 +1397,8 @@ -
+ + <%--10--%> @@ -1375,11 +1411,7 @@ - <%-- - - - - --%> +
@@ -1472,7 +1504,7 @@
- + @@ -5630,7 +5662,6 @@ -