From a76219e708aa808ff353517c418072e98d2ba702 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 24 Mar 2021 10:28:22 -0700 Subject: [PATCH 01/17] ajam --- Compras/ReembolsosComprobaciones.aspx.vb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb index 8e2fedf24..baafd9844 100644 --- a/Compras/ReembolsosComprobaciones.aspx.vb +++ b/Compras/ReembolsosComprobaciones.aspx.vb @@ -425,7 +425,7 @@ Partial Class Compras_ReembolsosComprobaciones End If Dim UsaSimplificacionCajaChica As Boolean = False - If UsuarioActual.CveEmpresa = 119 Then UsaSimplificacionCajaChica = True + If UsuarioActual.CveEmpresa.Contiene(119, 158) Then UsaSimplificacionCajaChica = True @@ -446,7 +446,7 @@ Partial Class Compras_ReembolsosComprobaciones CveIERegistrado = DDlCheques.SelectedValue.ToEntero - If UsuarioActual.CveEmpresa.Contiene(119) Then + If UsuarioActual.CveEmpresa.Contiene(119, 158) Then CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones1", 9, TxtImporteVinculado.Text.ToDecimal, TxtImporteVinculado.Text.ToDecimal, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) If CveCajaChica > 0 Then @@ -710,7 +710,7 @@ Partial Class Compras_ReembolsosComprobaciones If gvr.DataKey("Original").ToDecimal > 0 Then PorcentajePago = (ImporteMovto / gvr.DataKey("Original").ToDecimal) Else PorcentajePago = 1 - If Not ChkReembolsarSinBancos.Checked AndAlso (Not HdnCheque.Value.ToEntero > 0 Or Not UsuarioActual.CveEmpresa.Contiene(119)) Then + If Not ChkReembolsarSinBancos.Checked AndAlso (Not HdnCheque.Value.ToEntero > 0 Or Not UsuarioActual.CveEmpresa.Contiene(119, 158)) Then 'Si es caja chica metemos el concepto 30, si es funcionario metemos 29 If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, ImporteMovto, Referencia, If(CveCajaChica > 0, 30, 29), ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(CveCajaChica > 0, IdCuentaBancaria, IdCtaPersonal), -1, CveIE:=CveIEPago, CveIEDevolucion:=If(CveCajaChica > 0, DDlCheques.SelectedValue.ToEntero, -1), CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteMovto), ImporteMX:=ImporteMovto * tipoCambio, CveCuenta:=CveCuentaPersonal, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, Contabilizable:=If(CveCajaChica > 0 Or CvePersonal > 0, Not UsaSimplificacionCajaChica, True)) Then MsgError = "Detalle" From 2880037cdaeee31652f7a3534ede821ee582207b Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 24 Mar 2021 10:29:12 -0700 Subject: [PATCH 02/17] tipo ing, permitido en ventas --- General/SaldosIniciales.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index 0afefdaef..b204119d5 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -1398,7 +1398,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.Contiene("INGRESO", "INGRESOS"), "Ing", IIf(TipoDocto.Contiene("EGRESO", "EGRESOS"), "Egs", "Rem")).ToString + TipoDocto = IIf(TipoDocto.ToUpper.Contiene("INGRESO", "INGRESOS", "ING"), "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 494198cae6d88d3f0e8a2eb9f6723f772ad0c1f8 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 24 Mar 2021 10:29:29 -0700 Subject: [PATCH 03/17] mejora en lote/caducidad --- Inventarios/TraspasoAlmacen.aspx.vb | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb index bde85fdbb..5e886bbf8 100644 --- a/Inventarios/TraspasoAlmacen.aspx.vb +++ b/Inventarios/TraspasoAlmacen.aspx.vb @@ -608,12 +608,12 @@ Partial Class Inventarios_TraspasoAlmacen If Existencia > 0 Then 'la primera vez valida, que la existencia global, cumpla, considerando lo pendiente por surtir 'las segunda consulta, que tenga existencia, ya con los parametros especificos - If (FechaCaducidad > MinFecha OrElse Serie <> "" OrElse Lote <> "") Then + If (FechaCaducidad > MinFecha OrElse Not Serie.Contiene("", "-1") OrElse Not Lote.Contiene("", "-1")) Then ExistenciaEspecificada = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, PendientePorSurtir:=-1) Dim StrB As New stringbuilder StrB.appendformat("CvePS = {0} AND CveUM = {1} ", CvePS, CveUnidadMedida) - If Serie <> "" Then StrB.appendformat(" AND Serie = '{0}' ", Serie) - If Lote <> "" Then StrB.appendformat(" AND Lote = '{0}' ", Lote) + If Not Serie.Contiene("", "-1") Then StrB.appendformat(" AND Serie = '{0}' ", Serie) + If Not Lote.Contiene("", "-1") Then StrB.appendformat(" AND Lote = '{0}' ", Lote) If FechaCaducidad.ToDate > MinFecha Then StrB.appendformat(" AND FechaCaducidad = '{0}' ", FechaCaducidad.ToShortDateString) Dim CantidadEspecificaEnGrid As Decimal = DtMovimientos.SUMD("Cantidad", StrB.tostring) @@ -2891,23 +2891,21 @@ Partial Class Inventarios_TraspasoAlmacen Dim Cantidad As Double = RowExcel("Cantidad").ToString().ToDecimal() Dim Serie As String = RowExcel("Serie").ToString() - Dim Lote As String = If(RowExcel("Lote").ToString() = "", "-1", RowExcel("Lote").ToString()) - Dim FechaCaducidad As Date = If(RowExcel("FechaCaducidad").ToString <> "", MinFecha, RowExcel("FechaCaducidad").ToString.ToDate) + Dim Lote As String = RowExcel("Lote").ToString() + Dim FechaCaducidad As Date = If(RowExcel("FechaCaducidad").ToString = "", MinFecha, RowExcel("FechaCaducidad").ToString.ToDate) Dim Observaciones As String = RowExcel("Observaciones").ToString() If CveProducto > 0 Then Dim Valido As Boolean = True - Dim CveMetodoInventario As Integer = RowPS("Inv_CveMetodoInventario").ToString().ToEntero() - - If CveMetodoInventario = 5 And (String.IsNullOrEmpty(Serie.Trim()) OrElse Serie = "-1") Then + If RowPS("AplicaSerie").ToString() = "True" And (String.IsNullOrEmpty(Serie.Trim()) OrElse Serie = "-1") Then Valido = False Alert($"El producto '{RowPS("PS")}' requiere 'Serie'", TipoMensaje.MsgAdvertencia) ProductosNoCargados.AppendFormat("{0},", RowPS("PS").ToString()) End If - If CveMetodoInventario = 5 AndAlso Not String.IsNullOrEmpty(Serie.Trim()) Then + If RowPS("AplicaSerie").ToString() = "True" AndAlso Not String.IsNullOrEmpty(Serie.Trim()) Then NoPSConSerie = NoPSConSerie + 1 End If @@ -2919,7 +2917,7 @@ Partial Class Inventarios_TraspasoAlmacen End If If Valido Then - Valido = ValidaExistencia(Cantidad, CveProducto, CveUnidadMedida, -1, If(Not String.IsNullOrEmpty(Serie), Serie, "-1"), Lote, FechaCaducidad) + Valido = ValidaExistencia(Cantidad, CveProducto, CveUnidadMedida, -1, If(Not String.IsNullOrEmpty(Serie), Serie, "-1"), If(Not String.IsNullOrEmpty(Lote), Lote, "-1"), FechaCaducidad) End If If Valido Then From 340cf0140396b1bd0fac40ea45bfb24709fa62f0 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 24 Mar 2021 10:29:47 -0700 Subject: [PATCH 04/17] siempre visible, modalidad contable --- Ventas/RepVentas.aspx.vb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Ventas/RepVentas.aspx.vb b/Ventas/RepVentas.aspx.vb index e6d31ad7c..d0062637d 100644 --- a/Ventas/RepVentas.aspx.vb +++ b/Ventas/RepVentas.aspx.vb @@ -96,12 +96,12 @@ Partial Class Ventas_RepVentas If UsuarioActual.CveEmpresa = 72 AndAlso UsuarioActual.CveUsuario.Contiene(100, 1614, 1517) Then liRepHP.Visible = True - End If - - 'SI ES EL USUARIO SISTEMA MOSTRAR LA MODALIDAD CONTABLE (TEMPORAL) - If UsuarioActual.CveUsuario = 100 Then - divModalidadcontable.Visible = True - End If + End If + + 'SI ES EL USUARIO SISTEMA MOSTRAR LA MODALIDAD CONTABLE (TEMPORAL) + 'If UsuarioActual.CveUsuario = 100 Then + divModalidadcontable.Visible = True + 'End If 'Modalidad Cotizacion If Opcion = "Cot" Then From fd65ad46a8af88ffff6b7ac9f7d142e286caeadd Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 24 Mar 2021 10:30:38 -0700 Subject: [PATCH 05/17] mejora en contrato arrendamiento --- Contratos/Contrato.aspx.vb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Contratos/Contrato.aspx.vb b/Contratos/Contrato.aspx.vb index cc658606f..992646e1b 100644 --- a/Contratos/Contrato.aspx.vb +++ b/Contratos/Contrato.aspx.vb @@ -693,7 +693,7 @@ Partial Class Contratos_Default CargaConvenioPrecioFijo() End If - If UsuarioActual.CveEmpresa = 72 And DdlTipoContrato.SelectedValue.Contiene("7", "8", "10", "13", "28") Then + If UsuarioActual.CveEmpresa = 72 And DdlTipoContrato.SelectedValue.Contiene("7", "8", "9", "10", "13", "28") Then GetNoContratoNuevo() End If @@ -4446,8 +4446,8 @@ Partial Class Contratos_Default Dim TipoContrato As Integer = DdlTipoContrato.SelectedValue.ToEntero() - Dim SufijoContrato As String = "" - + Dim SufijoContrato As String = "" + Select Case TipoContrato Case 7 'Contrato Comodato SufijoContrato = "COMODATO" From 2146e5c156975659a16df641b6594ae9cd99a595 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 25 Mar 2021 07:44:07 -0700 Subject: [PATCH 06/17] -- parametro empresaCRM --- App_Code/ClsPaginas.vb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 95e161692..8c0d666d9 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -6624,6 +6624,13 @@ Public Class ClsPaginas params.Add(New ReportParameter("ClienteLugar", ClienteLugar)) params.Add(New ReportParameter("ClienteRFC", Vta.Cliente.RFC)) End If + If Vta.CveEmpresaCRM.ToEntero > 0 Then + params.Add(New ReportParameter("ClienteCodigo", Vta.Cliente.Codigo)) + params.Add(New ReportParameter("ClienteNombre", Vta.Cliente.Nombre)) + params.Add(New ReportParameter("ClienteDireccion", ClienteDireccion)) + params.Add(New ReportParameter("ClienteLugar", ClienteLugar)) + params.Add(New ReportParameter("ClienteRFC", Vta.Cliente.RFC)) + End If 'TOTALES params.Add(New ReportParameter("SubTotal", Vta.SubTotal.ToString.FormatoNumero(2))) From eb5fe704988e1e2ebef415460f93f9ade61906d9 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 25 Mar 2021 07:44:40 -0700 Subject: [PATCH 07/17] =?UTF-8?q?folio=20de=20garant=C3=ADa,=20filtro=20su?= =?UTF-8?q?bproyecto?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsAcumuladores.vb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/App_Code/ClsAcumuladores.vb b/App_Code/ClsAcumuladores.vb index 940bf0817..cd29409c4 100644 --- a/App_Code/ClsAcumuladores.vb +++ b/App_Code/ClsAcumuladores.vb @@ -485,7 +485,7 @@ Public Class ClsAcumuladores #Region " FOLIOS GARANTÍA " - Public Function FoliosGarantiaGet(CveFolioGarantia As Integer, CveEmpresa As Integer, Optional Estatus As Integer = -1, Optional TipoFolio As String = "-1", Optional Area As Integer = 1) As Boolean + Public Function FoliosGarantiaGet(CveFolioGarantia As Integer, CveEmpresa As Integer, Optional Estatus As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional TipoFolio As String = "-1", Optional Area As Integer = 1) As Boolean Dim Retorno As Boolean = False 'Data = New DataTable @@ -495,6 +495,7 @@ Public Class ClsAcumuladores .Add("@CveFolioGarantia", SqlDbType.Int).Value = CveFolioGarantia .Add("@Estatus", SqlDbType.Int).Value = Estatus .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@tipoFolio", SqlDbType.VarChar).Value = TipoFolio .Add("@Area", SqlDbType.Int).Value = Area End With From 46773d3dbf391667cbdf7f308849b78376088030 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 25 Mar 2021 07:44:56 -0700 Subject: [PATCH 08/17] complementarias --- Bancos/PagoAcreedor.aspx.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Bancos/PagoAcreedor.aspx.cs b/Bancos/PagoAcreedor.aspx.cs index bf115dfad..fc91d55d9 100644 --- a/Bancos/PagoAcreedor.aspx.cs +++ b/Bancos/PagoAcreedor.aspx.cs @@ -114,9 +114,8 @@ public partial class Bancos_PagoAcreedor : ClsPaginas { if (!IsPostBack) { - UsaComplementaria = false; - CveMonedaCuentaPago = 0; - if (UsuarioActual.CveEmpresa.Contiene(1, 119)) { UsaComplementaria = true; } + UsaComplementaria = true; + CveMonedaCuentaPago = 0; rowComisiones.Visible = UsuarioActual.CveEmpresa.Contiene(1, 4, 5, 7, 11, 12, 72, 80, 126, 119, 122); CargaTipoTransaccion(); From 62d439eff283af09cfcd4a576b2bd1c14ee9f297 Mon Sep 17 00:00:00 2001 From: HECTOR RODRIGUEZ Date: Thu, 25 Mar 2021 09:48:33 -0700 Subject: [PATCH 09/17] Quitar la parte de tareas --- Inicio.aspx | 4 ++-- Inicio.aspx.vb | 64 +++++++++++++++++++++++++------------------------- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/Inicio.aspx b/Inicio.aspx index 20d7705e5..297d22aa2 100644 --- a/Inicio.aspx +++ b/Inicio.aspx @@ -483,7 +483,7 @@ -
+ <%--
@@ -534,7 +534,7 @@ -
+
--%> <%--
diff --git a/Inicio.aspx.vb b/Inicio.aspx.vb index d3b03624b..49cc60cf1 100644 --- a/Inicio.aspx.vb +++ b/Inicio.aspx.vb @@ -178,7 +178,7 @@ Partial Class Inicio CargaGraficas() End If - CargaTareas() + 'CargaTareas() If UsuarioActual.CveRol = 1 Then divInd.Visible = True CargaSubProyectos() @@ -463,39 +463,39 @@ Partial Class Inicio End Sub - Private Sub CargaTareas() - Dim ObjProspectos As New ClsOIEventos + 'Private Sub CargaTareas() + ' Dim ObjProspectos As New ClsOIEventos - Dim FechaI, FechaF As DateTime - Dim CveEventoEstatus As Integer = -1 - FechaI = Now.AddDays(-180) - FechaF = Now - If ObjProspectos.GetRepEventos(-1, 1, -1, "-1", "-1", -1, -1, -1, 1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FechaI, FechaF) Then + ' Dim FechaI, FechaF As DateTime + ' Dim CveEventoEstatus As Integer = -1 + ' FechaI = Now.AddDays(-180) + ' FechaF = Now + ' If ObjProspectos.GetRepEventos(-1, 1, -1, "-1", "-1", -1, -1, -1, 1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FechaI, FechaF) Then - Dim DT As DataTable = ObjProspectos.DtResultados.Clone + ' Dim DT As DataTable = ObjProspectos.DtResultados.Clone - If ChkOIPorHacer.Checked Then DT.Merge(ObjProspectos.DtResultados.FiltraParametros(String.Format("CveUsuarioPara = {0} ", UsuarioActual.CveUsuario))) - If ChkOIAsigne.Checked Then DT.Merge(ObjProspectos.DtResultados.FiltraParametros(String.Format("CveUsuarioDe = {0} ", UsuarioActual.CveUsuario))) + ' If ChkOIPorHacer.Checked Then DT.Merge(ObjProspectos.DtResultados.FiltraParametros(String.Format("CveUsuarioPara = {0} ", UsuarioActual.CveUsuario))) + ' If ChkOIAsigne.Checked Then DT.Merge(ObjProspectos.DtResultados.FiltraParametros(String.Format("CveUsuarioDe = {0} ", UsuarioActual.CveUsuario))) - GvT.DataSource = DT - End If + ' GvT.DataSource = DT + ' End If - ObjProspectos.Dispose() - GvT.DataBind() - End Sub - Protected Sub GvT_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvT.RowDataBound - If e.Row.RowType = DataControlRowType.DataRow Then - Select Case UsuarioActual.CveUsuario.ToString - Case e.Row.DBCampo("CveUsuarioPara") - 'etiqueta de 'asignado' - e.Row.FCLabel("LblTipo").CssClass = "label label-sm label-warning " - e.Row.FCLabel("LblTipo").Text = "por hacer " - Case e.Row.DBCampo("CveUsuarioDe") - e.Row.FCLabel("LblTipo").CssClass = "label label-sm label-success" - e.Row.FCLabel("LblTipo").Text = "Asigné" - End Select - End If - End Sub + ' ObjProspectos.Dispose() + ' GvT.DataBind() + 'End Sub + 'Protected Sub GvT_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvT.RowDataBound + ' If e.Row.RowType = DataControlRowType.DataRow Then + ' Select Case UsuarioActual.CveUsuario.ToString + ' Case e.Row.DBCampo("CveUsuarioPara") + ' 'etiqueta de 'asignado' + ' e.Row.FCLabel("LblTipo").CssClass = "label label-sm label-warning " + ' e.Row.FCLabel("LblTipo").Text = "por hacer " + ' Case e.Row.DBCampo("CveUsuarioDe") + ' e.Row.FCLabel("LblTipo").CssClass = "label label-sm label-success" + ' e.Row.FCLabel("LblTipo").Text = "Asigné" + ' End Select + ' End If + 'End Sub Private Sub MuestraIndicador(DIV As HtmlGenericControl, Color As String, Icono As String, Titulo As String, Comentario As String, Link As String, TitleComentario As String) Dim htmldiv As New StringBuilder htmldiv.AppendFormat("{0}
", DIV.InnerHtml, Color, Icono) @@ -844,9 +844,9 @@ Partial Class Inicio End Sub #End Region - Protected Sub ChkOIAsigne_CheckedChanged(sender As Object, e As EventArgs) Handles ChkOIAsigne.CheckedChanged, ChkOIPorHacer.CheckedChanged - CargaTareas() - End Sub + 'Protected Sub ChkOIAsigne_CheckedChanged(sender As Object, e As EventArgs) Handles ChkOIAsigne.CheckedChanged, ChkOIPorHacer.CheckedChanged + ' CargaTareas() + 'End Sub Protected Sub DdlFiltroIndicador_SelectedIndexChanged(sender As Object, e As EventArgs) End Sub From 9c1fc41e2a46aca817ed3cb53abe01a59cb24d27 Mon Sep 17 00:00:00 2001 From: HECTOR RODRIGUEZ Date: Thu, 25 Mar 2021 10:00:22 -0700 Subject: [PATCH 10/17] Cambio para visualizacion de reporte --- Acumuladores/EntradasUsadosResumenRep.aspx.vb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Acumuladores/EntradasUsadosResumenRep.aspx.vb b/Acumuladores/EntradasUsadosResumenRep.aspx.vb index 8e389cde6..c49ff177d 100644 --- a/Acumuladores/EntradasUsadosResumenRep.aspx.vb +++ b/Acumuladores/EntradasUsadosResumenRep.aspx.vb @@ -70,14 +70,15 @@ Partial Class Acumuladores_RepEntradasUsados Dim Mes As String = {"enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}(Month(Today) - 1) Dim FechaConFormato As String = String.Format("{0}, {1} de {2} de {3}", Dia, Day(Today), Mes, Year(Today)) - + Dim Direccion As String = String.Format("{0} {1}", UsuarioActual.Empresa.Direccion.ToString, UsuarioActual.Empresa.NoExt.ToString) Dim params As New List(Of ReportParameter) - params.Add(New ReportParameter("Direccion", "dirección")) - params.Add(New ReportParameter("FechaConFormato", FechaConFormato)) + params.Add(New ReportParameter("Direccion", Direccion)) + params.Add(New ReportParameter("FechaConFormato", Date.Now.ToString)) params.Add(New ReportParameter("FechaInicial", txtFechaI.Text)) params.Add(New ReportParameter("FechaFinal", txtFechaF.Text)) params.Add(New ReportParameter("Sucursal", "Sucursal")) + params.Add(New ReportParameter("Almacen", DdlAlmacenes.SelectedItem.ToString)) Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = DatosEntradasUsados} From 6050c2b9cc2012abb443eda68fb6836cc78603ab Mon Sep 17 00:00:00 2001 From: HECTOR RODRIGUEZ Date: Thu, 25 Mar 2021 10:01:15 -0700 Subject: [PATCH 11/17] Cambio para poder mostrar el nombre de empresaCRM en reporte de cotizacion --- App_Code/ClsPaginas.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 990a3e2f5..ccf04fdcb 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -6617,7 +6617,7 @@ Public Class ClsPaginas 'CLIENTE - If Vta.CveCliente.ToEntero > 0 Then + If Vta.CveCliente.ToEntero > 0 Or Vta.CveEmpresaCRM.ToEntero > 0 Then params.Add(New ReportParameter("ClienteCodigo", Vta.Cliente.Codigo)) params.Add(New ReportParameter("ClienteNombre", If(Vta.ClienteSucursal.ImprimeNombreSucursal = "True", If(Vta.CveClienteSucursal > 0, Vta.ClienteSucursal.Sucursal, Vta.Cliente.Nombre), If(Vta.AtencionA <> "" AndAlso Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.RFC = "XAXX010101000", $"{Vta.Cliente.Nombre}({Vta.AtencionA})", Vta.Cliente.Nombre)))) params.Add(New ReportParameter("ClienteDireccion", ClienteDireccion)) From e62b0c722eea2d2a35074089d3ac69c72adf505c Mon Sep 17 00:00:00 2001 From: HECTOR RODRIGUEZ Date: Thu, 25 Mar 2021 10:01:52 -0700 Subject: [PATCH 12/17] Cambios en reportes --- Empresas/140/Formatos/RepEntradasUsados.rdlc | 2316 ++++++++--------- .../Grales/Formatos/RepSolicitudAnticipo.rdlc | 7 +- 2 files changed, 1162 insertions(+), 1161 deletions(-) diff --git a/Empresas/140/Formatos/RepEntradasUsados.rdlc b/Empresas/140/Formatos/RepEntradasUsados.rdlc index 22e6dba92..c93143748 100644 --- a/Empresas/140/Formatos/RepEntradasUsados.rdlc +++ b/Empresas/140/Formatos/RepEntradasUsados.rdlc @@ -1,1160 +1,5 @@ - - - - - - - - 2.6528cm - - - 1.31753cm - - - 2.31753cm - - - 1.58961cm - - - 1.60315cm - - - 2.31753cm - - - 1.37304cm - - - 1.5767cm - - - 2.05295cm - - - 1.49732cm - - - 2.31753cm - - - - - 0.62959cm - - - - - true - true - - - - - Grupo - - - - - - - Textbox9 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Inicial - - - - - - - Textbox1 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - E.Alm - - - - - - - Textbox29 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - E.Pub - - - - - - - Textbox13 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - E.Tras - - - - - - - Textbox27 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - E.Compras - - - - - - - Textbox15 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Otrs. - - - - - - - Textbox17 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - S.Alm - - - - - - - Textbox5 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - S.Trasp - - - - - - - Textbox8 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Otrs - - - - - - - Textbox11 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Exist Actual - - - - - - - Textbox41 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.58521cm - - - - - true - true - - - - - =Fields!Codigo.Value - - - - - - - Codigo - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - 0 - - - - - - - TipoAgrupador - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!E_Almacen.Value - - - - - - - E_Almacen - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - 0 - - - - - - - Paqueteria1 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!E_Traspaso.Value - - - - - - - E_Traspaso - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!E_Compra.Value - - - - - - - E_Compra - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - 0 - - - - - - - Fecha - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!S_Almacen.Value - - - - - - - S_Almacen - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!S_Traspaso.Value - - - - - - - S_Traspaso - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - 0 - - - - - - - Textbox16 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - 0 - - - - - - - Textbox42 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - - - - - - - After - - - - - - - DataSet1 - 0.95278cm - 0.08377cm - 1.2148cm - 20.61569cm - - - - - - true - true - - - - - Entradas - - - - - - - Textbox37 - 0.17639cm - 3.02491cm - 0.6cm - 10.33589cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Salidas - - - - - - - Textbox38 - 0.17639cm - 13.43136cm - 0.6cm - 7.2681cm - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - 0.9799in - - - - - 8.2362in - - - 3.1764cm - true - true - - - Embedded - Logo - Fit - 0.09927in - 0.10752in - 0.99993in - 1.6045in - - - - - - true - true - - - - - BDH BATERÍAS DISTRIBUCIONES DE - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Tarjeta de Almacén Del - - - - =Parameters!FechaInicial.Value - - - - Al - - - - =Parameters!FechaFinal.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!FechaConFormato.Value - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Globals!PageNumber - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - 0.727cm - true - true - - - 0.127cm - 0.01325cm - 0cm - 20.90669cm - - - - - - - - - - 27.94cm - 21.59cm - 0.5cm - 0cm - 0.5cm - 1cm - 0.13cm - + + + + + + Textbox9 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Inicial + + + + + + + Textbox1 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + E.Alm + + + + + + + Textbox29 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + E.Pub + + + + + + + Textbox13 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + E.Tras + + + + + + + Textbox27 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + E.Compras + + + + + + + Textbox15 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Otrs. + + + + + + + Textbox17 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + S.Alm + + + + + + + Textbox5 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + S.Trasp + + + + + + + Textbox8 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Otrs + + + + + + + Textbox11 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Exist Actual + + + + + + + Textbox41 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.58521cm + + + + + true + true + + + + + =Fields!CodigoPS.Value + + + + + + + CodigoPS + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + 0 + + + + + + + TipoAgrupador + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!E_Almacen.Value + + + + + + + E_Almacen + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + 0 + + + + + + + Paqueteria1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!E_Traspaso.Value + + + + + + + E_Traspaso + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!E_Compra.Value + + + + + + + E_Compra + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + 0 + + + + + + + Fecha + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!S_Almacen.Value + + + + + + + S_Almacen + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!S_Traspaso.Value + + + + + + + S_Traspaso + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + 0 + + + + + + + Textbox16 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + 0 + + + + + + + Textbox42 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DataSet1 + 0.10583cm + 0.08377cm + 1.2148cm + 20.80089cm + + + + + + 0.51993in + + + + + 8.2362in + + + 3.54682cm + true + true + + + Embedded + Logo + Fit + 0.09927in + 0.10752in + 0.99993in + 1.6045in + + + + + + true + + + + + BDH BATERÍAS DISTRIBUCIONES DE + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Tarjeta de Almacén Del + + + + =Parameters!FechaInicial.Value + + + + Al + + + + =Parameters!FechaFinal.Value + + + + + + + Textbox4 + 2.84098cm + 5.75736cm + 0.6cm + 10.1061cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FechaConFormato.Value + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Globals!PageNumber + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Almacen.Value + + + + + + + Textbox4 + 2.09987cm + 5.75736cm + 0.6cm + 10.1061cm + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Direccion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + 0.727cm + true + true + + + 0.12697cm + 0.01325cm + 0cm + 20.90669cm + + + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0cm + 0.5cm + 1cm + 0.13cm + @@ -837,7 +837,7 @@ 0.79506in - - true - true - - - - - =Parameters!FechaConFormato.Value - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Globals!PageNumber - - - 2pt - 2pt - 2pt - 2pt - - true true @@ -1117,7 +1057,7 @@ 5.75736cm 0.6cm 10.1061cm - 5 + 3 @@ -1149,7 +1089,7 @@ 4.45435cm 0.54708cm 6.51432cm - 6 + 4 @@ -1168,12 +1108,12 @@ - 0.727cm + 1.01804cm true true - 0.12697cm + 0.12694cm 0.01325cm 0cm 20.90669cm @@ -1183,6 +1123,119 @@ + + true + true + + + + + Usuario imprimio: + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha impresión: + + + + =Parameters!FechaConFormato.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Pagina: + + + + =Globals!PageNumber + + + + PageNumber + 0.30333cm + 16.84241cm + 0.6cm + 4.00442cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + - - true - true - - - - - =Parameters!AgrupadoPor.Value - HTML - - - - - - - Textbox1 - 0.07056cm - 0.06614cm - 0.58236cm - 19.58715cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - 0.79506in + 0.45131in @@ -912,7 +876,7 @@ 0.63528cm 2.40329cm 0.52945cm - 14.68354cm + 15.70187cm 1 + + true + true + + + + + =Parameters!AgrupadoPor.Value + HTML + + + + + + + Textbox3 + 2.31154cm + 0.06614cm + 0.6cm + 18.03902cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + - Textbox3 + Textbox31 0.40041cm 16.97887cm 0.68085cm @@ -1209,7 +1209,6 @@ ReportParameter1 - es-MX Cm 40c94aad-a12a-44fb-ab0d-ea36a9656792 diff --git a/OC/RepSolicitudesAnticipo.aspx.cs b/OC/RepSolicitudesAnticipo.aspx.cs index 036073a1b..bed783754 100644 --- a/OC/RepSolicitudesAnticipo.aspx.cs +++ b/OC/RepSolicitudesAnticipo.aspx.cs @@ -161,7 +161,7 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas String FechaF; if (txtFechaF.Text == "" || txtFechaF.Text == "__/__/____") { FechaF = ""; } else { FechaF = $" Fecha Final: {txtFechaF.Text}"; } String Proveedor; - if (DdlProveedores.SelectedValue != "-1") { Proveedor = $" Proveedor: {DdlProveedores.ddl.SelectedItem.Text}"; } else { Proveedor = ""; } + if (DdlProveedores.SelectedValue != "-1") { Proveedor = $" Proveedor: {DdlProveedores.SelectedText}"; } else { Proveedor = ""; } String Estatus; if (DdlEstatus.SelectedValue != "1") { Estatus = $" Estatus: {DdlEstatus.SelectedItem.Text}"; } else { Estatus = ""; } String Usuario; @@ -178,7 +178,7 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); para.Add(new ReportParameter("Estatus", DdlEstatus.SelectedValue)); String Agrupadores = $"{Proveedor}{FechaI}{FechaF}{Estatus}{Usuario}{SubProyectos}"; - para.Add(new ReportParameter("AgrupadoPor", (Agrupadores == "" ? "": $" {Agrupadores}"))); + para.Add(new ReportParameter("AgrupadoPor", (Agrupadores == "" ? "": $" {Agrupadores}"))); if (Imagen.Exists) { para.Add(new ReportParameter("LogoPath", logouri)); diff --git a/OI/TareaDetalle.aspx.cs b/OI/TareaDetalle.aspx.cs index 2527b77db..58b263e8c 100644 --- a/OI/TareaDetalle.aspx.cs +++ b/OI/TareaDetalle.aspx.cs @@ -139,7 +139,7 @@ public partial class OI_TareaDetalle : ClsPaginas } private void Setpermisos() { - bool permisedestatus = (CveEventoEstatus > 1 && CveEventoEstatus < 4); + bool permisedestatus = (CveEventoEstatus < 4); bool esmiembro = UsuarioActual.CveUsuario.Contiene(LCveUsuarioCCP.ToArray()); bool esdeel = UsuarioActual.CveUsuario == CveUsuarioDe; bool esPara = UsuarioActual.CveUsuario == CveUsuarioPara; @@ -467,7 +467,7 @@ public partial class OI_TareaDetalle : ClsPaginas int CveOS = drow["CveOS"].ToString().ToEntero(); int CveOC = drow["CveOC"].ToString().ToEntero(); int CveContrato = drow["CveContrato"].ToString().ToEntero(); - //int CveSubProyecto = drow["CveSubProyecto"].ToString().ToEntero(); + int CveSubProyecto = drow["CveSubProyecto"].ToString().ToEntero(); int CveMovimientoAlmacen = drow["CveMovimientoAlmacen"].ToString().ToEntero(); //int = drow[""].ToString().ToEntero(); @@ -534,11 +534,11 @@ public partial class OI_TareaDetalle : ClsPaginas titulo = "Contrato"; link = string.Format("{0} ", drow["Contrato"], CveContrato); } - //else if (CveSubProyecto > 0) - //{ - // titulo = "Sub Proyecto"; - // link = string.Format("{0} ", drow["SubProyecto"], CveSubProyecto); - //} + else if (CveSubProyecto > 0) + { + titulo = "Sub Proyecto"; + link = string.Format("{0} ", drow["SubProyecto"], CveSubProyecto); + } else if (CveMovimientoAlmacen > 0) { titulo = "Almacen"; From 2d76ea3ea43df2f93d936acba9b56c11867a8cf0 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 27 Mar 2021 16:50:24 -0700 Subject: [PATCH 17/17] cambios en redondeo --- Ventas/Ventas.aspx.vb | 55 ++++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index f5ace049e..f8fc340de 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -16730,6 +16730,7 @@ Partial Class Ventas Dim TotalCalculableImpuestos As Decimal = 0 Dim TotalCalculableImpuestosIVA As Decimal = 0 PU = PU.RoundSQL(6) ' el precio unitario puede llevar hasta 6 decimales permitidos + Descuento = Descuento.RoundSQL(NumeroDecimales) If Not TmpDT.Columns.Contains("RetIVA") Then TmpDT.Columns.Add("RetIVA", GetType(Decimal)) @@ -16994,7 +16995,7 @@ Partial Class Ventas If PrecioSugerido > 0 Then PU = PrecioSugerido End If - PU = Math.Round(PU, 6) + PU = PU.RoundSQL(6) DrPoliza("PU") = PU TotalCalculableImpuestos = (DrPoliza("Cantidad").ToString().ToDecimal * (PU)) @@ -17004,18 +17005,18 @@ Partial Class Ventas DrPoliza("PorcentajeIVA") = DrPSAdicional("IVA") End If DrPoliza("IVA") = DrPoliza("PorcentajeIVA") - DrPoliza("ImporteIVA") = Math.Round(DrPoliza("PorcentajeIVA").ToString().ToDecimal * TotalCalculableImpuestos, NumeroDecimales) - DrPoliza("ImporteRetIVA") = Math.Round(ClienteRetIVA * TotalCalculableImpuestos, NumeroDecimales) - DrPoliza("ImporteRetISR") = Math.Round(ClienteRetISR * TotalCalculableImpuestos, NumeroDecimales) + DrPoliza("ImporteIVA") = (DrPoliza("PorcentajeIVA").ToString().ToDecimal * TotalCalculableImpuestos).RoundSQL(NumeroDecimales) + DrPoliza("ImporteRetIVA") = (ClienteRetIVA * TotalCalculableImpuestos).RoundSQL(NumeroDecimales) + DrPoliza("ImporteRetISR") = (ClienteRetISR * TotalCalculableImpuestos).RoundSQL(NumeroDecimales) DrPoliza("PorcentajeRetIVA") = ClienteRetIVA DrPoliza("PorcentajeRetISR") = ClienteRetISR DrPoliza("PorcentajeIEPS") = DrPSAdicional("IEPSPorcentaje") - DrPoliza("ImporteIEPS") = Math.Round(DrPSAdicional("IEPSPorcentaje").ToString().ToDecimal * TotalCalculableImpuestos, NumeroDecimales) + DrPoliza("ImporteIEPS") = (DrPSAdicional("IEPSPorcentaje").ToString().ToDecimal * TotalCalculableImpuestos).RoundSQL(NumeroDecimales) DrPoliza("IEPS") = DrPoliza("ImporteIEPS") DrPoliza("Descuento") = 0 ' Descuento DrPoliza("TipoDescuento") = HdnTipoDescuento.Value DrPoliza("Total") = (DrPoliza("Cantidad").ToString().ToDecimal * PU) - DrPoliza("TotalImporte") = Math.Round(DrPoliza("Cantidad").ToString().ToDecimal * PU, NumeroDecimales) + DrPoliza("TotalImporte") = (DrPoliza("Cantidad").ToString().ToDecimal * PU).RoundSQL(NumeroDecimales) DrPoliza("SATClaveProdServ") = DrPSAdicional("SATClavePS") DrPoliza("SATClaveUM") = DrPSAdicional("SATClaveUnidadMedida") @@ -17554,13 +17555,13 @@ Partial Class Ventas End Sub Private Sub CalculaTotalesVenta(Optional RecalculaImpuestosLocales As Boolean = True, Optional NCDescuento As Boolean = False) - Dim TotalSubTotal As Decimal = TmpDT.SUM("TotalImporte").ToDecimal - Dim TotalDescuentos As Decimal = TmpDT.SUM("Descuento").ToDecimal + Dim TotalSubTotal As Decimal = TmpDT.SUMD("TotalImporte") + Dim TotalDescuentos As Decimal = TmpDT.SUMD("Descuento") Dim TotalAmortizacion As Decimal = LblAmortizacion.Text.ToDecimal - Dim TotalIVA As Decimal = TmpDT.SUM("ImporteIVA").ToDecimal - Dim TotalIEPS As Decimal = TmpDT.SUM("ImporteIEPS").ToDecimal - Dim TotalRetIVA As Decimal = TmpDT.SUM("ImporteRetIVA").ToDecimal - Dim TotalRetISR As Decimal = TmpDT.SUM("ImporteRetISR").ToDecimal + Dim TotalIVA As Decimal = TmpDT.SUMD("ImporteIVA") + Dim TotalIEPS As Decimal = TmpDT.SUMD("ImporteIEPS") + Dim TotalRetIVA As Decimal = TmpDT.SUMD("ImporteRetIVA") + Dim TotalRetISR As Decimal = TmpDT.SUMD("ImporteRetISR") Dim Total As Decimal = 0 Dim TotalImpuestosLocales As Decimal = 0 @@ -17580,11 +17581,11 @@ Partial Class Ventas End If TmpDT.AcceptChanges() - TotalIVA = TmpDT.SUM("ImporteIVA").ToDecimal - TotalIEPS = TmpDT.SUM("ImporteIEPS").ToDecimal - TotalRetIVA = TmpDT.SUM("ImporteRetIVA").ToDecimal - TotalRetISR = TmpDT.SUM("ImporteRetISR").ToDecimal - TotalImpuestosLocales = TmpDTImpuestos.SUM("Importe").ToDecimal + TotalIVA = TmpDT.SUMD("ImporteIVA") + TotalIEPS = TmpDT.SUMD("ImporteIEPS") + TotalRetIVA = TmpDT.SUMD("ImporteRetIVA") + TotalRetISR = TmpDT.SUMD("ImporteRetISR") + TotalImpuestosLocales = TmpDTImpuestos.SUMD("Importe") End If End If @@ -25118,8 +25119,8 @@ Partial Class Ventas For Each Dr As DataRow In DtImpuestos.Rows AgregaTempDT(TmpDTDescNC, DrPS("CvePS").ToString().ToEntero(), DrPS("PS").ToString(), DrPS("Codigo").ToString(), DrPS("PSCodigo").ToString(), DrPS("CveTipoPS").ToString().ToEntero(), DrPS("Inv_CveMetodoInventario").ToString().ToEntero(), DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto, - TxtNCObservaciones.Text.Trim, 1, Dr("ImportePU").ToString().ToDecimal, Dr("PorcentajeIVA").ToString().ToDecimal, Dr("ImporteIVA").ToString().ToDecimal, Dr("PorcentajeRetIVA").ToString().ToDecimal, Dr("ImporteRetIVA").ToString().ToDecimal, - Dr("PorcentajeRetISR").ToString().ToDecimal, Dr("ImporteRetISR").ToString().ToDecimal, Dr("PorcentajeIEPS").ToString().ToDecimal, Dr("ImporteIEPS").ToString().ToDecimal, -1, 0.0, Dr("ImporteTotal").ToString().ToDecimal, "", "", -1, -1, + TxtNCObservaciones.Text.Trim, 1, Dr("ImportePU").ToString.ToDecimal, Dr("PorcentajeIVA").ToString.ToDecimal, Dr("ImporteIVA").ToString.ToDecimal, Dr("PorcentajeRetIVA").ToString().ToDecimal, Dr("ImporteRetIVA").ToString().ToDecimal, + Dr("PorcentajeRetISR").ToString().ToDecimal, Dr("ImporteRetISR").ToString().ToDecimal, Dr("PorcentajeIEPS").ToString().ToDecimal, Dr("ImporteIEPS").ToString().ToDecimal, -1, 0, Dr("ImporteTotal").ToString().ToDecimal, "", "", -1, -1, DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1) Next End If @@ -25178,7 +25179,7 @@ Partial Class Ventas AgregaTempDT(TmpDT, DrPS("CvePS").ToString().ToEntero(), DrPS("PS").ToString(), DrPS("Codigo").ToString(), DrPS("PSCodigo").ToString(), DrPS("CveTipoPS").ToString().ToEntero(), DrPS("Inv_CveMetodoInventario").ToString().ToEntero(), DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto, TxtNCObservaciones.Text.Trim, 1, Dr("ImportePU").ToString().ToDecimal + Ajuste, Dr("PorcentajeIVA").ToString().ToDecimal, Dr("ImporteIVA").ToString().ToDecimal, Dr("PorcentajeRetIVA").ToString().ToDecimal, Dr("ImporteRetIVA").ToString().ToDecimal, - Dr("PorcentajeRetISR").ToString().ToDecimal, Dr("ImporteRetISR").ToString().ToDecimal, Dr("PorcentajeIEPS").ToString().ToDecimal, Dr("ImporteIEPS").ToString().ToDecimal, -1, 0.0, Dr("ImporteTotal").ToString().ToDecimal(), "", "", -1, -1, + Dr("PorcentajeRetISR").ToString().ToDecimal, Dr("ImporteRetISR").ToString().ToDecimal, Dr("PorcentajeIEPS").ToString().ToDecimal, Dr("ImporteIEPS").ToString().ToDecimal, -1, 0, Dr("ImporteTotal").ToString().ToDecimal(), "", "", -1, -1, DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1) Next @@ -25291,7 +25292,7 @@ Partial Class Ventas AgregaTempDT(TmpDTCargo, DrPS("CvePS").ToString().ToEntero(), DrPS("PS").ToString(), DrPS("Codigo").ToString(), DrPS("PSCodigo").ToString(), DrPS("CveTipoPS").ToString().ToEntero(), DrPS("Inv_CveMetodoInventario").ToString().ToEntero(), DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto, Obs, Cantidad, ImportePU, RowUsado("PorcentajeIVA").ToString().ToDecimal, ImporteIVA, RowUsado("PorcentajeRetIVA").ToString().ToDecimal, ImporteRetIVA, - RowUsado("PorcentajeRetISR").ToString().ToDecimal, ImporteRetISR, RowUsado("PorcentajeIEPS").ToString().ToDecimal, ImporteIEPS, -1, 0.0, ImporteTotal, "", "", -1, -1, + RowUsado("PorcentajeRetISR").ToString().ToDecimal, ImporteRetISR, RowUsado("PorcentajeIEPS").ToString().ToDecimal, ImporteIEPS, -1, 0, ImporteTotal, "", "", -1, -1, DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CveVentaDetalleRNC:=RowUsado("CveVentaDetalle").ToString().ToEntero()) If Terminar Then @@ -25374,7 +25375,7 @@ Partial Class Ventas AgregaTempDT(TmpDTCargo, DrPS("CvePS").ToString().ToEntero(), DrPS("PS").ToString(), DrPS("Codigo").ToString(), DrPS("PSCodigo").ToString(), DrPS("CveTipoPS").ToString().ToEntero(), DrPS("Inv_CveMetodoInventario").ToString().ToEntero(), DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto, Obs, Cantidad, ImportePU, RowUsado("PorcentajeIVA").ToString().ToDecimal, ImporteIVA, 0, ImporteRetIVA, - 0, ImporteRetISR, 0, ImporteIEPS, -1, 0.0, ImporteTotal, "", "", -1, -1, + 0, ImporteRetISR, 0, ImporteIEPS, -1, 0, ImporteTotal, "", "", -1, -1, DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CveVentaDetalleRNC:=RowUsado("CveVentaDetalleRNC").ToString().ToEntero()) If Terminar Then @@ -25463,7 +25464,7 @@ Partial Class Ventas AgregaTempDT(TmpDTDescNCBonificacion, DrPS("CvePS").ToString().ToEntero(), DrPS("PS").ToString(), DrPS("Codigo").ToString(), DrPS("PSCodigo").ToString(), DrPS("CveTipoPS").ToString().ToEntero(), DrPS("Inv_CveMetodoInventario").ToString().ToEntero(), DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto, Obs, Cantidad, ImportePU, RowCargo("PorcentajeIVA").ToString().ToDecimal, ImporteIVA, RowCargo("PorcentajeRetIVA").ToString().ToDecimal, ImporteRetIVA, - RowCargo("PorcentajeRetISR").ToString().ToDecimal, ImporteRetISR, RowCargo("PorcentajeIEPS").ToString().ToDecimal, ImporteIEPS, -1, 0.0, ImporteTotal, "", "", -1, -1, + RowCargo("PorcentajeRetISR").ToString().ToDecimal, ImporteRetISR, RowCargo("PorcentajeIEPS").ToString().ToDecimal, ImporteIEPS, -1, 0, ImporteTotal, "", "", -1, -1, DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1) Next @@ -25580,9 +25581,9 @@ Partial Class Ventas End Function Private Sub AgregaTempDT(ByRef TmpDT As DataTable, CvePS As Integer, PS As String, Codigo As String, CodigoPS As String, CveTipoPS As Integer, CveTipoInvPS As Integer, CveUM As Integer, UM As String, CveClasificacion As Integer, Clasificacion As String, CveProyecto As Integer, Proyecto As String, CveSubProyecto As Integer, SubProyecto As String, - Obs As String, Cantidad As Double, PU As Double, PorcentajeIVA As Double, ImporteIVA As Double, PorcentajeRetIVA As Double, ImporteRetIVA As Double, - PorcentajeRetISR As Double, ImporteRetISR As Double, PorcentajeIEPS As Double, ImporteIEPS As Double, TipoDescuento As Integer, Descuento As Double, - Total As Double, Serie As String, TiempoEntrega As String, CvePresupuestoIngreso As Integer, EntregaDirecta As Integer, SATClaveProdServ As String, + Obs As String, Cantidad As Decimal, PU As Decimal, PorcentajeIVA As Decimal, ImporteIVA As Decimal, PorcentajeRetIVA As Decimal, ImporteRetIVA As Decimal, + PorcentajeRetISR As Decimal, ImporteRetISR As Decimal, PorcentajeIEPS As Decimal, ImporteIEPS As Decimal, TipoDescuento As Integer, Descuento As Decimal, + Total As Decimal, Serie As String, TiempoEntrega As String, CvePresupuestoIngreso As Integer, EntregaDirecta As Integer, SATClaveProdServ As String, SATClaveUM As String, CveContratoDetalle As Integer, CveVentaDetalle As Integer, CveMovimientoDetallePedido As Integer, CveOrdenCompraDetalle As Integer, CveVentaDetalleRemision As Integer, CveVentaDetalleCotizacion As Integer, Optional CveTamaño As Integer = -1, Optional CveVentaDetalleRNC As Integer = -1) @@ -25611,7 +25612,7 @@ Partial Class Ventas Row("Obs") = Obs Row("Cantidad") = Cantidad - Row("PU") = Math.Round(PU, 6) + Row("PU") = PU.RoundSQL(6) Row("PorcentajeIVA") = PorcentajeIVA Row("IVA") = PorcentajeIVA Row("ImporteIVA") = Math.Round(ImporteIVA, NumeroDecimales)