From 98a51e8202f4ca9aa5745e8729c191781502404c Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 4 Apr 2024 13:13:07 -0700 Subject: [PATCH 01/14] -- mejora --- Transportes/RepContratosCalendario.aspx | 18 ++++++++---------- Transportes/RepContratosCalendario.aspx.vb | 12 +++++++++--- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/Transportes/RepContratosCalendario.aspx b/Transportes/RepContratosCalendario.aspx index e66c9fddb..685c6b7ea 100644 --- a/Transportes/RepContratosCalendario.aspx +++ b/Transportes/RepContratosCalendario.aspx @@ -92,7 +92,7 @@ <%-- Filtro Visible - Consulta --%>
- +
@@ -290,14 +290,14 @@
- +
- +
@@ -314,8 +314,7 @@
+ Rows="2" >
@@ -323,15 +322,14 @@
+ Rows="2" >
- +
@@ -339,7 +337,7 @@
+ Width="100%">
@@ -348,7 +346,7 @@
+ Width="100%">
diff --git a/Transportes/RepContratosCalendario.aspx.vb b/Transportes/RepContratosCalendario.aspx.vb index e6d9bd88d..589ba314d 100644 --- a/Transportes/RepContratosCalendario.aspx.vb +++ b/Transportes/RepContratosCalendario.aspx.vb @@ -20,7 +20,7 @@ Partial Class RepContratosCalendario Public Property Contrato As String Get - Return ViewState("Contrato").ToString() + Return IfNull(ViewState("Contrato"), "").ToString() End Get Set(value As String) ViewState("Contrato") = value @@ -29,10 +29,11 @@ Partial Class RepContratosCalendario #End Region Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load - txtFechaI.Text = DateTime.Now.AddMonths(-1).ToShortDateString - txtFechaF.Text = DateTime.Now.AddDays(7).ToShortDateString + If Not IsPostBack Then + txtFechaI.Text = DateTime.Now.AddMonths(-1).ToShortDateString + txtFechaF.Text = DateTime.Now.AddDays(7).ToShortDateString InicializaCombos() InicializaCalendar() CargaDatos() @@ -54,6 +55,7 @@ Partial Class RepContratosCalendario ObjContratos.Dispose() GvContratos.DataBind() + UpTitulos.Update() End Sub Private Sub InicializaCalendar() @@ -122,6 +124,7 @@ Partial Class RepContratosCalendario Dim ObjContratos As New ClsContratos ObjContratos.IniciaTransacSQL() + If Contrato.ToEntero <= 0 Then Contrato = CveContrato.Value If ObjContratos.UpdateContratos(Contrato.ToEntero, TxtFolio.Text, TxtDescripcion.Text, "", -1, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=34, CveContratosEstatus:=DdlEstatusContrato.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero, CveChofer2:=DdlChofer2.SelectedValue.ToEntero, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveAF:=DdlAF.SelectedValue.ToEntero, CantidadPasajeros:=TxtCantidadPasajeros.Text.ToEntero) Then ObjContratos.Commit() Alert("Actualizado Correctamente.") @@ -185,4 +188,7 @@ Partial Class RepContratosCalendario ObjContratos.Dispose() End Sub + Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) + CargaDatos() + End Sub End Class From b01c0e2519773c6843e7ef920541b273048f7d0a Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 4 Apr 2024 13:13:24 -0700 Subject: [PATCH 02/14] =?UTF-8?q?--=20mejora=20en=20validaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CxC/RepCxCDetalle.aspx.vb | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/CxC/RepCxCDetalle.aspx.vb b/CxC/RepCxCDetalle.aspx.vb index a89e8f4dc..a22dcc01e 100644 --- a/CxC/RepCxCDetalle.aspx.vb +++ b/CxC/RepCxCDetalle.aspx.vb @@ -765,7 +765,6 @@ Partial Class RepCxCDetalle logouri = String.Format("file://{0}", Imagen.FullName) End If - Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("FechaInicio", FechaI)) @@ -774,20 +773,24 @@ Partial Class RepCxCDetalle params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("AgrupadoPor", $"{Cliente}{Sucursal}{Grupo}{Vendedor}{FechaIn}{FechaFn}{Registro}{Responsable}{TipoDocto}{EstatusCob}{FVI}{FVF}{ClasificacionCli}{CorteA}")) params.Add(New ReportParameter("TituloReporte", TituloReporte)) - params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - Dim lrds As New List(Of ReportDataSource) Dim DSDatos As DataSet = CargaDatos() - - Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = DSDatos.Tables(0)} + Dim dtt1 As DataTable = Nothing + Dim dtt2 As DataTable = Nothing + + If DSDatos IsNot Nothing AndAlso DSDatos.Tables.Count >= 1 Then + dtt1 = DSDatos.Tables(0) + If DSDatos.Tables.Count >= 2 Then dtt2 = DSDatos.Tables(1) + End If + + Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = dtt1} lrds.Add(rds) - If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then - Dim rdsCartera As New ReportDataSource With {.Name = "DSCartera", .Value = DSDatos.Tables(1)} + Dim rdsCartera As New ReportDataSource With {.Name = "DSCartera", .Value = dtt2} lrds.Add(rdsCartera) Else Dim DTCartera As New DataTable @@ -800,7 +803,6 @@ Partial Class RepCxCDetalle End If - Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/RepCxCDetalle.rdlc", UsuarioActual.Empresa.Ruta)) If Archivo.Exists Then ImprimirPDF(String.Format("{0}Formatos/RepCxCDetalle.rdlc", UsuarioActual.Empresa.Ruta), lrds, params, "ReporteCxCDetalle", TipoImpresion) @@ -808,8 +810,6 @@ Partial Class RepCxCDetalle ImprimirPDF("Empresas/Grales/Formatos/RepCxCDetalle.rdlc", lrds, params, "ReporteCxCDetalle", TipoImpresion) End If - - End Sub Protected Sub ImgImprimir_Click(sender As Object, e As EventArgs) Handles ImgImprimir.Click GenerarImpresion("PDF") From 8df181eae774603534957bd42b5034cb0c932300 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 4 Apr 2024 13:13:45 -0700 Subject: [PATCH 03/14] - redirect --- Contabilidad/CatCuentas.aspx.vb | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Contabilidad/CatCuentas.aspx.vb b/Contabilidad/CatCuentas.aspx.vb index 36f391f24..2fe4e638d 100644 --- a/Contabilidad/CatCuentas.aspx.vb +++ b/Contabilidad/CatCuentas.aspx.vb @@ -28,22 +28,22 @@ Partial Class Contabilidad_CatCuentas Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then - 'If Not UsuarioActual.CveEmpresa.Contiene(13, 83) AndAlso EsProduccion Then - ' Response.Redirect("/Contabilidad2/CatCuentas.aspx") - ' Exit Sub - 'End If - - If UsuarioActual.Empresa.UsaContabilidad Then - CargaMonedas() - CargaAgrupadorSAT() - CargaDatos() - Else - Alert("Este módulo requiere el uso de Contabilidad.", TipoMensaje.MsgAdvertencia) - MEECuenta.Enabled = False - LnkPdf.Visible = False + If UsuarioActual.Empresa.TipoContabilizacion = 1 Then + Response.Redirect("/Contabilidad2/CatCuentas.aspx") + Exit Sub End If - End If + If UsuarioActual.Empresa.UsaContabilidad Then + CargaMonedas() + CargaAgrupadorSAT() + CargaDatos() + Else + Alert("Este módulo requiere el uso de Contabilidad.", TipoMensaje.MsgAdvertencia) + MEECuenta.Enabled = False + LnkPdf.Visible = False + End If + + End If End Sub Private Sub CargaMonedas() From 305ed85da83fdef0313e4d88cfd7bb41fed8c9fd Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 4 Apr 2024 13:14:31 -0700 Subject: [PATCH 04/14] =?UTF-8?q?--=20=20cambio=20en=20tipo=20de=20p=C3=B3?= =?UTF-8?q?liza=20y=20plantilla=20prepoliza?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/PVCobranza.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ventas/PVCobranza.aspx.vb b/Ventas/PVCobranza.aspx.vb index 7062626f0..556c2c13e 100644 --- a/Ventas/PVCobranza.aspx.vb +++ b/Ventas/PVCobranza.aspx.vb @@ -353,7 +353,7 @@ Partial Class Ventas_PVCobranza Dim ObjIE As New ClsBancos(ObjConta.IniciaTransacSQL()) Dim ObjVentas2 As New ClsVentas(ObjConta.IniciaTransacSQL()) Try - CvePrePoliza = ObjConta.AddPrePolizas("PVCobranza", 11, 0, 0, 1, Fecha, $"Pago {VentaActual.SerieFolio}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + CvePrePoliza = ObjConta.AddPrePolizas("PVCobranza", 11, 0, 0, 1, Fecha, $"Pago {VentaActual.SerieFolio}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=3) If CvePrePoliza > 0 Then From e63f9c394a56769e83c4bca0ecc55c59cc3a2672 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 4 Apr 2024 13:14:59 -0700 Subject: [PATCH 05/14] - mejora --- General/SaldosIniciales.aspx.vb | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index 607b43dc6..76b6e6e28 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -1802,19 +1802,28 @@ Partial Class General_SaldosIniciales Dim CveUnidadMedida As Integer = drr("CveUnidadMedida").ToString().ToEntero() Dim CveClasificacion As Integer = drr("CveClasificacion").ToString().ToEntero() - - If Not CvePS > 0 Then Alert(String.Format("No se encontró el Producto Servicio"), TipoMensaje.MsgError) : ErrorVentas = True ' If Not CveSucursal > 0 Then Alert("No se encontró la sucursal.", TipoMensaje.MsgError) : ErrorVentas = True If Not CveUnidadMedida > 0 Then Alert(String.Format("No se encontró la Unidad de Medida."), TipoMensaje.MsgError) : ErrorVentas = True Dim dtsubp As DataTable = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa) + 'For Each drt As DataRow In dt.FiltraParametros("RFC <> ''", DistinctColumns:={"RFC"}).Rows + ' Dim RFC As String = drt("RFC").ToString().Trim.Replace("-", "").Replace(" ", "") + ' Dim CveCliente As Integer = DtClientes.FiltroPrimeroValor("CveCliente", $"RFC = '{RFC}'").ToString().ToEntero() + ' If CveCliente <= 0 Then + ' Dim OBJ As New ClsClientes + ' OBJ.AgregarClienteNoFrecuente(RFC, RFC, "", "", "", "", "", 26, RFC, "", "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", -1, -1) + ' OBJ.Dispose() + ' End If + 'Next + 'GlobalDTCliente(UsuarioActual.CveEmpresa) = Nothing + 'DtClientes = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1) Dim CountRow As Integer = 1 For Each Row As DataRow In dt.FiltraParametros("RFC <> ''").Rows Dim Sucursal As String = dtsubp.FiltroPrimeroValor("CveSubProyecto", $"SubProyecto = '{Row("Sucursal").ToString()}'") Dim TipoDocto As String = Row("Tipo Documento").ToString().Trim - Dim RFC As String = Row("RFC").ToString().Trim - Dim Serie As String = Row("Serie").ToString() + Dim RFC As String = Row("RFC").ToString().Trim.Replace("-", "").Replace(" ", "") + Dim Serie As String = Row("Serie").ToString().Trim Dim Folio As Integer = Row("Folio").ToString().ToEntero() Dim Fecha As Date = Row("Fecha").ToString().ToDate Dim FechaVencimiento As Date = Row("Fecha Vencimiento").ToString().ToDate @@ -1839,14 +1848,11 @@ Partial Class General_SaldosIniciales IEPS = Row("IEPS").ToString().ToDecimal End If - - Dim CveClienteSucursal As Integer = 0 'Row("CveClienteSucursal").ToString().ToEntero() Dim FolioFiscal As String = If(dt.Columns.Contains("Folio Fiscal"), Row("Folio Fiscal").ToString(), "") Dim PorcentajeIVA As Decimal = If(dt.Columns.Contains("PorcentajeIVA"), Round(Row("PorcentajeIVA").ToString().ToDecimal, 4), 0) Dim PorcentajeRetIVA As Decimal = If(dt.Columns.Contains("PorcentajeRetIVA"), Round(Row("PorcentajeRetIVA").ToString().ToDecimal, 4), 0) Dim PorcentajeRetISR As Decimal = If(dt.Columns.Contains("PorcentajeRetISR"), Round(Row("PorcentajeRetISR").ToString().ToDecimal, 4), 0) - Dim PedidoContrato As String = If(dt.Columns.Contains("Pedido"), Row("Pedido").ToString(), "") GuardaLog(Sucursal + "-" + Row("Folio").ToString()) @@ -1855,7 +1861,6 @@ Partial Class General_SaldosIniciales Dim Folio2 As String = "" ' Row("Folio2").ToString() Dim CodCliente As String = "" 'Row("CodCliente2").ToString() - Dim IEPSDetalle As Decimal = 0 Dim CantidadDetalle As Decimal = 0 Dim PUDetalle As Decimal = 0 @@ -1880,13 +1885,11 @@ Partial Class General_SaldosIniciales Alert($"El código del producto no se encontro, error en registro {CountRow}") ErrorVentas = True End If - Else Alert($"El código es requerido, error en registro {CountRow}") ErrorVentas = True End If - IEPSDetalle = Row("IEPS").ToString.ToDecimal CantidadDetalle = Row("Cantidad").ToString.ToDecimal PUDetalle = Row("PU").ToString.ToDecimal @@ -1913,7 +1916,7 @@ Partial Class General_SaldosIniciales 'If Not CveCliente > 0 Then Alert(String.Format("No se encontró el cliente con el RFC: {0}", {RFC}), TipoMensaje.MsgError) : ErrorVentas = True : RFC.GuardaLog : Exit For - TipoDocto = IIf(TipoDocto.ToUpper.Contiene("INGRESO", "INGRESOS", "ING"), "Ing", IIf(TipoDocto.ToUpper.Contiene("EGRESO", "EGRESOS", "EGS"), "Egs", "Rem")).ToString() + TipoDocto = IIf(TipoDocto.ToUpper.Contiene("INGRESO", "INGRESOS", "ING", "FACTURA", "FACTURAS"), "Ing", IIf(TipoDocto.ToUpper.Contiene("EGRESO", "EGRESOS", "EGS"), "Egs", "Rem")).ToString() 'PrePóliza Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Venta/SaldoInicial", 1, Total, Total, 1, Fecha, String.Format("{0}-{1}", Serie, Folio), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) From 9f5cfcb6f0ae3a38e4ef6374681c2a238854d915 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 4 Apr 2024 17:35:48 -0700 Subject: [PATCH 06/14] =?UTF-8?q?--=20aumento=20de=20longitud=20de=20tama?= =?UTF-8?q?=C3=B1o=20de=20nombre=20de=20cliente=20--=20se=20ocult=C3=B3=20?= =?UTF-8?q?=C3=ADcono=20de=20descuentos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/Ventas.aspx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 9f12d88c4..4ff4f66e6 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -1077,7 +1077,7 @@ - P.U.  + P.U.  Desc Predial @@ -8000,7 +8000,7 @@
- +
From 2ed4bac6a1887e6b1407c56a0f7c951e0ef32515 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Fri, 5 Apr 2024 15:39:31 -0700 Subject: [PATCH 07/14] =?UTF-8?q?Compras=20ProntoPago=20Generar=20Remision?= =?UTF-8?q?es=20notas=20de=20cr=C3=A9dito=20con=20Iva?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Compras/Compras.aspx.vb | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 3e9fc7d9b..26d4b1869 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -7606,7 +7606,7 @@ Partial Class Compras_Compras If Not ErrorPrepoliza AndAlso Not ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=4, AutoConta:=AutoConta) Then TieneError = True 'If ObjConta.ValorPolizaDescuadre > 0 Then - ' GuardaLogAD($"Compras/Compras-Guardar | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") + ' Alert($"{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia}", TipoMensaje.MsgError) ' ErrorPrepolizaDescuadre = True 'End If End If @@ -14492,7 +14492,7 @@ Partial Class Compras_Compras End Sub Protected Sub BtnVincularOC_Click(sender As Object, e As EventArgs) - VincularOcProntoPago = False + 'VincularOcProntoPago = False AjusteProntoPagoPorcentajeIVA = 0D AjusteProntoPagoConIVA = 0D AjusteProntoPagoSinIVA = 0D @@ -20849,6 +20849,7 @@ Partial Class Compras_Compras Public Function GeneraRemisionsNotadeCredito(ByRef trasaccion As SqlTransaction, CveCompraRegistrada As Integer) As Boolean Dim respuesta As Boolean = True + Dim PorcentajeIVA As Decimal = TmpDT.MAX("IVAPorcentaje").ToDecimal Dim CvePS_RNC As Integer = UsuarioActual.Empresa.Funcionalidad(580).ToEntero Dim PSRow As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS_RNC).FiltroPrimero("") @@ -20898,8 +20899,10 @@ Partial Class Compras_Compras Dim PS As String = PSRow("PS").ToString Dim CveUM As Integer = PSRow("CveUnidadMedida").ToString.ToEntero Dim UM As String = PSRow("UnidadMedida").ToString + Dim IVARNC As Decimal = (ImporteRNC * PorcentajeIVA).RoundSQL(2) - CompraRNC.ConfiguraRegistroRapidoRNC(CvePS_RNC, CveUM, UM, CveClasificacion, Clasificacion, PS, CveSubProyectoPrincipal, SubProyecto, ImporteRNC, ImporteRNC) + + CompraRNC.ConfiguraRegistroRapidoRNC(CvePS_RNC, CveUM, UM, CveClasificacion, Clasificacion, PS, CveSubProyectoPrincipal, SubProyecto, ImporteRNC, (ImporteRNC + IVARNC), IVARNC) If Not CompraRNC.AddCompraRNC(trasaccion) Then respuesta = False End If @@ -20920,8 +20923,9 @@ Partial Class Compras_Compras CompraRNCProntoPAgo.Serie = $"{TxtSerie.Text}_P" CompraRNCProntoPAgo.Folio = $"{TxtFolio.Text}_P" CompraRNCProntoPAgo.CveCompraAmortizacion = CveCompraRegistrada + Dim IVARNCProntoPago As Decimal = (ImporteRNC * PorcentajeIVA).RoundSQL(2) - CompraRNCProntoPAgo.ConfiguraRegistroRapidoRNC(CvePS_RNC, CveUM, UM, CveClasificacion, Clasificacion, PS, CveSubProyectoPrincipal, SubProyecto, ImporteRNCProntoPago, ImporteRNCProntoPago) + CompraRNCProntoPAgo.ConfiguraRegistroRapidoRNC(CvePS_RNC, CveUM, UM, CveClasificacion, Clasificacion, PS, CveSubProyectoPrincipal, SubProyecto, ImporteRNCProntoPago, (ImporteRNCProntoPago + IVARNCProntoPago), IVARNCProntoPago) If Not CompraRNCProntoPAgo.AddCompraRNC(trasaccion) Then respuesta = False End If @@ -20956,7 +20960,7 @@ Partial Class Compras_Compras Else If ImporteRNCProntoPago > 0 Then - LblModalConfirmaVinculacionProntoPago.Text = $"Existe una diferencia de ${(ImporteRNC + ImporteRNCProntoPago).ToString("###,###,###.00")} entre la compra y la Orden de Compra, se generararan dos Remisiones de Nota de Crédito una por descuento de ${ImporteRNC.ToString("###,###,###.00")} y otra por pronto pago de ${ImporteRNCProntoPago.ToString("###,###,###.00")}" + LblModalConfirmaVinculacionProntoPago.Text = $"Existe una diferencia de ${(ImporteRNC + ImporteRNCProntoPago).ToString("###,###,###.00")} entre la compra y la Orden de Compra, se generaran dos Remisiones de Nota de Crédito una por descuento de ${ImporteRNC.ToString("###,###,###.00")} y otra por pronto pago de ${ImporteRNCProntoPago.ToString("###,###,###.00")}" Else LblModalConfirmaVinculacionProntoPago.Text = $"Existe una diferencia de ${(ImporteRNC).ToString("###,###,###.00")} entre la compra y la Orden de Compra, se generara una Remision de Nota de Crédito una por descuento de ${ImporteRNC.ToString("###,###,###.00")}" End If @@ -21630,7 +21634,7 @@ Public Class ClsCompraManagerCompras End Function Public Function ConfiguraRegistroRapidoRNC(CvePS As Integer, CveUM As Integer, UM As String, CveClasificacion As Integer, Clasificacion As String, PS As String, CveSubProyecto As Integer, SubProyecto As String, - SubTotal As Decimal, Total As Decimal) As Boolean + SubTotal As Decimal, Total As Decimal, IVA As Decimal) As Boolean Dim respuesta As Boolean = True Me.CveSubProyecto = CveSubProyecto @@ -21642,6 +21646,7 @@ Public Class ClsCompraManagerCompras Me.CveTipoPoliza = 3 Me.NumeroReembolso = "" Me.SubTotal = SubTotal + Me.IVA = IVA Me.Total = Total From c55f5b35d24ad434b1ec2a153a8d32092479e72e Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 6 Apr 2024 06:27:15 -0700 Subject: [PATCH 08/14] - cveempresa en sucursales --- App_Code/ClsClientes.vb | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/App_Code/ClsClientes.vb b/App_Code/ClsClientes.vb index bd5384c25..e3d47be18 100644 --- a/App_Code/ClsClientes.vb +++ b/App_Code/ClsClientes.vb @@ -3,11 +3,8 @@ Option Strict On Imports System.Data Imports System.Data.SqlClient -Imports AjaxControlToolkit Imports Extensiones -Imports iText.StyledXmlParser.Css.Resolve.Shorthand.Impl -Imports Modelos -Imports Stimulsoft.Report.Func + Public Class ClsClientes Implements IDisposable @@ -980,13 +977,13 @@ Public Class ClsClientes Return Retorno End Function - - Public Function GetSucursales(CveCliente As Integer, Optional CveClienteSucursal As Integer = -1) As Boolean + Public Function GetSucursales(CveCliente As Integer, Optional CveClienteSucursal As Integer = -1, Optional CveEmpresa As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_SucursalClienteGet") SqlAdapter.SelectCommand.Parameters.Add("@CveCliente", SqlDbType.Int).Value = CveCliente SqlAdapter.SelectCommand.Parameters.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal + SqlAdapter.SelectCommand.Parameters.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa Try SqlAdapter.Fill(Data) Retorno = True @@ -2159,7 +2156,7 @@ Public Class ClsClientes #End Region #Region "A P L I C A C I O N" - Public Function AddClienteApp(Cliente As MCliente) As Boolean + Public Function AddClienteApp(Cliente As Modelos.MCliente) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_ClientesAppAdd") From e73bf4caea54cb1582219c0c0fe72c9793e378fd Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 6 Apr 2024 06:27:25 -0700 Subject: [PATCH 09/14] %IVA para cortes --- App_Code/ClsVentas.vb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 9f00eb8e9..86a6c8e41 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -3445,6 +3445,28 @@ Public Class ClsVentas Return Retorno End Function + Public Function GetCortesDetalleVentasResumenIVA(CveCorte As Integer, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_Vta_CortesDetalleVentasResumenIVAGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveCorte", SqlDbType.Int).Value = CveCorte + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Try + SqlAdapter.Fill(Data) + + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener los detalle de cortes", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + #End Region #Region " CANCELAR ANTE SAT " From f3caee4c221c48de1ddad0c8d1cee6d0d74e9aea Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 6 Apr 2024 06:30:02 -0700 Subject: [PATCH 10/14] --cambio en getsucursales --- App_Code/ClsPaginas.vb | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 6a15b925d..dffad93a2 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -2251,7 +2251,7 @@ Public Class ClsPaginas Dim AppNombre As String = $"GlobalDTClientesSucursales-{CveEmpresa}" If HttpContext.Current.Application(AppNombre) Is Nothing Then Dim ObjClientes As New ClsClientes - If ObjClientes.GetClienteSucursales(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjClientes.DtResultados.Copy() + If ObjClientes.GetSucursales(-1, -1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjClientes.DtResultados.Copy() ObjClientes.Dispose() End If Dim filtros As New List(Of String) @@ -9451,7 +9451,6 @@ Public Class ClsPaginas End If If Pago.TipoPago = "A" AndAlso Not ErrorMovtos AndAlso AplicarConceptoAplicacion Then ' A N T I C I P O Concepto = String.Format("{0} Ant:{1}", VentaActual.ClienteNombre, Pago.Referencia) - Dim Ret As New ConceptosRetenciones 'Dim ConPreP As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(6, VentaActual.CveMoneda, True, 1) If Pago.CveMonedaPago > 1 Then 'Agregamos la Extranjera @@ -9465,7 +9464,6 @@ Public Class ClsPaginas End If If Pago.TipoPago = "NC" AndAlso Not ErrorMovtos AndAlso AplicarConceptoAplicacion Then ' N O T A D E C R E D I T O Concepto = String.Format("{0} NC:{1}", VentaActual.ClienteNombre, Pago.Referencia) - Dim Ret As New ConceptosRetenciones Dim ConPrePNC As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(6, Pago.CveMonedaPago, True, 2) If Pago.CveMonedaPago > 1 Then 'Agregamos la Extranjera @@ -9479,7 +9477,6 @@ Public Class ClsPaginas End If If Pago.TipoPago = "I" AndAlso Not ErrorMovtos AndAlso AplicarConceptoAplicacion Then ' I N G R E S O S X C O M P R O B A R Concepto = String.Format("{0} IxC:{1}", VentaActual.ClienteNombre, Pago.Referencia) - Dim Ret As New ConceptosRetenciones If VentaActual.UsuarioActual.Empresa.TipoContabilidad = 2 Then 'If Pago.CveMonedaPago > 1 AndAlso ObjConta.GetRetCuenta(207, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContablexAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero If VentaActual.UsuarioActual.CveEmpresa.Contiene(119) Then @@ -9501,6 +9498,14 @@ Public Class ClsPaginas If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 92, Pago.Referencia, Concepto, CveVenta:=VentaActual.CveVenta, CveCliente:=Pago.CveClientePago, CveIE:=Pago.CveIE, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True End If End If + + If Pago.TipoPago = "FyE" AndAlso Not ErrorMovtos Then ' F U N C I O N A R I O S Y E M P L E A D O S + Concepto = String.Format("{0} - {1}", VentaActual.ClienteNombre, Pago.Referencia) + + 'Agregamos Nacional + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 29, Pago.Referencia, Concepto, CveVenta:=VentaActual.CveVenta, CveCliente:=Pago.CveClientePago, CveIE:=Pago.CveIE, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True + + End If 'si tiene otros gastos/ingresos If Not ErrorMovtos AndAlso Pago.OtroGastoIngreso <> 0 Then From b172be620692c53885a328414f44fd3e92f8c552 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 6 Apr 2024 06:31:03 -0700 Subject: [PATCH 11/14] - %IVA --- Bancos/RepCortes.aspx | 30 +++++++++++++++++++++--------- Bancos/RepCortes.aspx.vb | 5 +++++ 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/Bancos/RepCortes.aspx b/Bancos/RepCortes.aspx index 9f69bd02b..f48407e9a 100644 --- a/Bancos/RepCortes.aspx +++ b/Bancos/RepCortes.aspx @@ -341,15 +341,27 @@
-
-
- Detalles del Corte - - - - - - +
+
+
+ Detalles del Corte + + + + + + +
+
+ + + + + + + +
+
diff --git a/Bancos/RepCortes.aspx.vb b/Bancos/RepCortes.aspx.vb index d1354db5b..41d2ada37 100644 --- a/Bancos/RepCortes.aspx.vb +++ b/Bancos/RepCortes.aspx.vb @@ -174,6 +174,10 @@ Partial Class Bancos_RepCortes GvP.DataSource = Vn.DtResultados DtCortesVentasResumen = Vn.DtResultados End If + If Vn.GetCortesDetalleVentasResumenIVA(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then + GvPorIVA.DataSource = Vn.DtResultados + End If + If Vent.GetCortesDetalleVentas(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 2) Then GvD.DataSource = Vent.DtResultados DtCortesVentas = Vent.DtResultados @@ -192,6 +196,7 @@ Partial Class Bancos_RepCortes Vent.Dispose() GvD.DataBind() GvP.DataBind() + GvPorIVA.DataBind() UPPDetalle.Update() UpAcciones.Update() End Sub From 1f442fbe7f221c00ebbf63035edbd2f0a16a6900 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 6 Apr 2024 06:31:14 -0700 Subject: [PATCH 12/14] subproyecto TODOS --- Inventarios/RepMovimientosSalida.aspx.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Inventarios/RepMovimientosSalida.aspx.cs b/Inventarios/RepMovimientosSalida.aspx.cs index 21dbae15b..2c487d18f 100644 --- a/Inventarios/RepMovimientosSalida.aspx.cs +++ b/Inventarios/RepMovimientosSalida.aspx.cs @@ -18,6 +18,7 @@ public partial class Inventarios_RepMovimientosSalida : ClsPaginas txtFechaF.Text = NowADS().ToShortDateString(); DdlSubProyecto.DataSource = get_GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa); DdlSubProyecto.DataBind(); + DdlSubProyecto.Items.Insert(0, new ListItem("Todos", "-1")); //Cargo Clasificaciones DdlClasificacion.DataSource = get_GlobalDTClasificaciones(UsuarioActual.CveEmpresa); From 6d1e64a9a9d90be68afc23b85a81be1d0755c57d Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 6 Apr 2024 06:32:11 -0700 Subject: [PATCH 13/14] =?UTF-8?q?-=20limitar=20a=20los=20t=C3=A9nicos=20so?= =?UTF-8?q?lo=20su=20visi=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OS/RepOSMedicas.aspx.vb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OS/RepOSMedicas.aspx.vb b/OS/RepOSMedicas.aspx.vb index e26d6ac2a..49a8885bc 100644 --- a/OS/RepOSMedicas.aspx.vb +++ b/OS/RepOSMedicas.aspx.vb @@ -42,6 +42,12 @@ Partial Class OS_RepOSMedicas DdlTecnico.Items.Insert(0, New ListItem("Todos", "-1")) DdlTecnico.Items.Insert(1, New ListItem("Sin Asignar", "-2")) + '376 + If UsuarioActual.TienePermisoProceso(376) Then + DdlTecnico.Enabled = False + DdlTecnico.SelectedValueExist(UsuarioActual.CveUsuario) + End If + If IfNull(Request("CveUsuarioTecnico"), 0).ToString.ToEntero > 0 Then DdlTecnico.SelectedValueExist(Request("CveUsuarioTecnico").ToString) From 7c1d4d14e53c9297475aca3abccaf285d98534f1 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 6 Apr 2024 06:34:36 -0700 Subject: [PATCH 14/14] -- permitir que se use el usocfdi: s01, en cualquier RFC --- Ventas/Ventas.aspx.vb | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index df645373f..e4527b0af 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -6446,6 +6446,7 @@ Partial Class Ventas Private Sub CargaUsoCFDI() DdlUsoCFDI.Items.Clear() DdlSucursalUsoCFDI.Items.Clear() + DdlUsoCFDI.ClearSelection() Dim EsPersonaMoral As Boolean = (TipoPersona = True) @@ -6780,7 +6781,7 @@ Partial Class Ventas ViewState("CliPais") = ObjCliente.Pais ImprimeNombreSucursal = ObjCliente.ImprimeNombreSucursal - RegimenFiscalCliente = ObjCliente.DtResultados(0)("CodigoRegimenFiscal").ToString() + RegimenFiscalCliente = If(ObjCliente.CveRegimenFiscal > 0, ObjCliente.DtResultados(0)("CodigoRegimenFiscal").ToString(), "") RegimenSociedad = ObjCliente.DtResultados(0)("RegimenSociedad").ToString() TipoPersona = CBool(ObjCliente.DtResultados(0)("TipoPersona")) CargaUsoCFDI() @@ -24050,20 +24051,20 @@ Partial Class Ventas Exit Sub End If - 'If TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlUsoCFDICliente.SelectedValue <> "23" Then - ' Alert("El uso cfdi del cliente debe ser 'S01 - Sin efectos fiscales' cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia) - ' Exit Sub - 'End If + If TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlUsoCFDICliente.SelectedValue <> "23" Then + Alert("El uso cfdi del cliente debe ser 'S01 - Sin efectos fiscales' cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia) + Exit Sub + End If If Not TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlRegimenFiscalCliente.SelectedValue = "11" Then Alert("El Regimen fiscal del cliente no puede ser '616 - Sin obligaciones fiscales' si no se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia) Exit Sub End If - If Not TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlUsoCFDICliente.SelectedValue = "23" Then - Alert("El uso cfdi del cliente no puede ser 'S01 - Sin efectos fiscales' si no se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia) - Exit Sub - End If + 'If Not TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlUsoCFDICliente.SelectedValue = "23" Then + ' Alert("El uso cfdi del cliente no puede ser 'S01 - Sin efectos fiscales' si no se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia) + ' Exit Sub + 'End If Dim EsPersonaMoral As Boolean = (RdTipoPersona.SelectedValue = "1") Dim DtUsosCFDI As DataTable = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente).FiltraParametros($"CveUsoCFDI = {CveUsoCFDI}")