From eaf22b2cad009695c1fe8578944cc4ba7f3bcfea Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 8 May 2023 15:48:58 -0700 Subject: [PATCH 01/24] =?UTF-8?q?--=20que=20tome=20la=20hh:mm:ss=20en=20au?= =?UTF-8?q?tom=C3=A1tico?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Inventarios/RecepcionUsados.aspx | 10 +--------- Inventarios/RecepcionUsados.aspx.vb | 4 ++-- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/Inventarios/RecepcionUsados.aspx b/Inventarios/RecepcionUsados.aspx index 59852eb64..daad91109 100644 --- a/Inventarios/RecepcionUsados.aspx +++ b/Inventarios/RecepcionUsados.aspx @@ -191,15 +191,7 @@ - - - +
diff --git a/Inventarios/RecepcionUsados.aspx.vb b/Inventarios/RecepcionUsados.aspx.vb index 371b2dad7..7283cea80 100644 --- a/Inventarios/RecepcionUsados.aspx.vb +++ b/Inventarios/RecepcionUsados.aspx.vb @@ -1031,7 +1031,7 @@ Partial Class Inventarios_RecepcionUsados #Region " AGREGAR - GUARDAR " Private Function GetExistencias(CvePS As Integer, CveUnidadMedida As Integer, CveEmpresa As Integer, CveAlmacen As Integer, Optional Serie As String = "-1", Optional Lote As String = "-1", Optional FechaCaducidad As Date = MinFecha) As Double Dim Inv As New ClsInventarios - Dim Existencia As Double = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, CveEmpresa, CveAlmacen, -1, FechaMovto:=String.Format("{0} {1}", TxtFecha.Text.ToDate.ToString("yyyy/MM/dd"), TxtHoraInicio.PostedTime), Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad) + Dim Existencia As Double = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, CveEmpresa, CveAlmacen, -1, FechaMovto:=String.Format("{0} {1}", TxtFecha.Text.ToDate.ToString("yyyy/MM/dd"), Now.ToShortTimeString), Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad) Inv.Dispose() Return Existencia End Function @@ -1240,7 +1240,7 @@ Partial Class Inventarios_RecepcionUsados If CveMovimiento > 0 Then Else - Dim Fecha = String.Format("{0} {1}", TxtFecha.Text.ToDate.ToString("yyyy/MM/dd"), TxtHoraInicio.PostedTime).ToDate + Dim Fecha = String.Format("{0}", TxtFecha.Text.ToDate.ToString("yyyy/MM/dd")).ToDate Dim CveCliente As Integer = CInt(IIf((DdlClientes.SelectedValue.ToEntero <= 0), -1, DdlClientes.SelectedValue.ToEntero)) Dim CveClienteSucursal As Integer = CInt(IIf((DdlClientesSucursales.SelectedValue.ToEntero <= 0), -1, DdlClientesSucursales.SelectedValue.ToEntero)) From 74fd7fc335a4f11c0050c795118fd5829b2e9b78 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 8 May 2023 15:49:58 -0700 Subject: [PATCH 02/24] -- filtro solo las lineas vigentes de una factura ya registrada. --- Ventas/Ventas.aspx.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 20312ddfb..7bb812f7d 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -18856,7 +18856,7 @@ Partial Class Ventas If ObjVentas.GetLineasAdicionalesSaldo(-1, CveCliente, -1, -1, UsuarioActual.CveEmpresa, TipoCambioConsulta:=TCConsulta, ConSaldo:=-1, FechaVencimientoConsulta:=MinFecha) Then If ObjVentas.DtResultados.Rows.Count > 0 Then TrLineaAdicional.Visible = True - DdlLineaAdicional.DataSource = ObjVentas.DtResultados.FiltraParametros($"(Saldo > 0 AND FechaVencimiento <= '{Now.ToString("dd/MM/yyyy")}') OR CveLineaAdicional = {Me.CveLineaAdicionalVenta}") + DdlLineaAdicional.DataSource = ObjVentas.DtResultados.FiltraParametros($"(Saldo > 0 AND FechaVencimiento >= '{Now.ToString("yyyy/MM/dd")}') OR CveLineaAdicional = {Me.CveLineaAdicionalVenta}") End If End If Else @@ -36672,7 +36672,7 @@ Partial Class Ventas End If Using ObjVentas As New ClsVentas - If ObjVentas.UpdateVentaLineaAdicional(DdlLineaAdicional.SelectedValue.ToEntero(), CveVenta, "", -1, UsuarioActual.CveEmpresa) Then + If ObjVentas.UpdateVentaLineaAdicional(DdlLineaAdicional.SelectedValue.ToEntero(), CveVenta, "", 1, UsuarioActual.CveEmpresa) Then Alert("Se actualizó la linea adicional de crédito de la venta") End If End Using From 785948a8cf5c2b6540d89e84b407b31f459b9c18 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 9 May 2023 14:27:08 -0700 Subject: [PATCH 03/24] - mejora en ligas para bancos --- Bancos/FluctuacionCambiaria.aspx | 4 ++ Bancos/FluctuacionCambiaria.aspx.vb | 82 ++++++++++++++++------------- 2 files changed, 49 insertions(+), 37 deletions(-) diff --git a/Bancos/FluctuacionCambiaria.aspx b/Bancos/FluctuacionCambiaria.aspx index db024ed8d..d222aa756 100644 --- a/Bancos/FluctuacionCambiaria.aspx +++ b/Bancos/FluctuacionCambiaria.aspx @@ -732,6 +732,10 @@
+ + +
+ diff --git a/Bancos/FluctuacionCambiaria.aspx.vb b/Bancos/FluctuacionCambiaria.aspx.vb index ec1245098..48bb923cc 100644 --- a/Bancos/FluctuacionCambiaria.aspx.vb +++ b/Bancos/FluctuacionCambiaria.aspx.vb @@ -314,37 +314,16 @@ Partial Class Bancos_FluctuacionCambiaria If ObjBancos.GetFluctuaciones(FechaUltimoDiaMes, 77, UsuarioActual.CveEmpresa) Then Dim DtTemp As DataTable = ObjBancos.DtResultados.Copy Dim TCCierreFluctuacion As Decimal = LtTipoCambioActual.Text.ToDecimal - Dim TotAcumulado As Decimal = ObjBancos.DtResultados.SUMD("Fluctuacion") - 'Dim Conta As New ClsContabilidad - 'For Each Dr As DataRow In DtTemp.Rows - ' Dim Total As Decimal = 0 - ' Dim CveCuentaExtranjera As Integer = Dr("CveCuentaExtranjera").ToString.ToEntero - ' If CveCuentaExtranjera > 0 Then - ' If Conta.GetMovimientosAuxiliaresCatalogo(CveCuentaExtranjera, MinFecha, FechaUltimoDiaMes, 2, -1, -1, UsuarioActual.CveEmpresa, "1") Then - ' If Conta.DtResultados.Rows.Count > 1 Then - ' Total = Conta.DtResultados.Rows(1)("SaldoActual").ToString.ToDecimal - ' End If - ' End If - ' End If - ' Dr("Saldo") = Total - ' Total = Total * TCCierreFluctuacion - Total - ' Dim SaldoActualContabilidad As Decimal = 0 - ' Dim CveCuentaComplementaria As Integer = Dr("CveCuentaComplementaria").ToString.ToEntero - ' If CveCuentaComplementaria > 0 Then - ' If Conta.GetMovimientosAuxiliaresCatalogo(CveCuentaComplementaria, MinFecha, FechaUltimoDiaMes, 2, -1, -1, UsuarioActual.CveEmpresa, "1") Then - ' If Conta.DtResultados.Rows.Count > 1 Then - ' SaldoActualContabilidad = Conta.DtResultados.Rows(1)("SaldoActual").ToString.ToDecimal - ' End If - ' End If - ' End If - - ' Total = Total - SaldoActualContabilidad - ' TotAcumulado += Math.Round(Total, 2) - ' Dr("Fluctuacion") = Total - 'Next - 'DtTemp.AcceptChanges() - 'Conta.Dispose() - + Dim TotAcumulado As Decimal = ObjBancos.DtResultados.SUMD("Fluctuacion") + + HdnCveFluctuacionBitacora.Value = ObjBancos.DtResultados.MAX("CveFluctuacionBitacora").ToString + HdnBancoCvePrePoliza.Value = ObjBancos.DtResultados.MAX("CvePrePoliza").ToString + BtnBancosRemove.Visible = HdnBancoCvePrePoliza.Value.ToEntero > 0 + BtnGeneraBancos.Visible = Not HdnBancoCvePrePoliza.Value.ToEntero > 0 + + HplBancosLiga.Visible = HdnBancoCvePrePoliza.Value.ToEntero > 0 + HplBancosLiga.NavigateUrl = String.Format("/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}", ObjBancos.DtResultados.MAX("CvePrePoliza").ToString) + GvCuentas.DataSource = DtTemp LblTotalBancos.Text = TotAcumulado.FormatoNumero Else @@ -938,8 +917,8 @@ Partial Class Bancos_FluctuacionCambiaria Protected Sub BtnGeneraBancos_Click(sender As Object, e As EventArgs) Dim Total As Decimal = 0 - Dim Conta As New ClsContabilidad - Conta.IniciaTransacSQL() + Dim Conta As New ClsContabilidad + Dim Banco As New ClsBancos(Conta.IniciaTransacSQL()) 'Dim ObjContPaq As New ClsContPAQi(UsuarioActual.Empresa) 'ObjContPaq.IniciaTransacSQL() Dim idCta As Integer = 0 @@ -961,6 +940,15 @@ Partial Class Bancos_FluctuacionCambiaria Dim CveConconceptoBancos As Integer = 204 + If HdnCveFluctuacionBitacora.Value.ToEntero <= 0 Then + HdnCveFluctuacionBitacora.Value = Banco.AddFluctuacionesBitacora(-1, FechaUltimoDiaMes, 1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa).ToString + If HdnCveFluctuacionBitacora.Value.ToEntero <= 0 Then + ErrorRegistrar = True + End If + End If + + + 'saco las cuentas de pérdida y ganancia For Each gvr As GridViewRow In GvCuentas.Rows Dim cb As CheckBox = gvr.FCCheckBox("ChkGenerarBancos") @@ -1009,10 +997,16 @@ Partial Class Bancos_FluctuacionCambiaria If Not ErrorRegistrar Then - Conta.Commit() - ' ObjContPaq.Commit() - Alert(String.Format("La Fluctuación se ha generado
Ver PrePóliza", CvePrePoliza), TipoMensaje.MsgInformacion) - CargaDatosBancosCuentas() + If Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 7, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then + ErrorRegistrar = True + End If + + If Not ErrorRegistrar Then + Conta.Commit() + ' ObjContPaq.Commit() + Alert(String.Format("La Fluctuación se ha generado
Ver PrePóliza", CvePrePoliza), TipoMensaje.MsgInformacion) + CargaDatosBancosCuentas() + End If Else Conta.RollBack() ' ObjContPaq.Dispose() @@ -1429,4 +1423,18 @@ Partial Class Bancos_FluctuacionCambiaria End If Banco.Dispose() End Sub + + Protected Sub BtnBancosRemove_Click(sender As Object, e As EventArgs) + Dim Banco As New ClsBancos + Banco.IniciaTransacSQL() + + If Banco.FluctuacionesBitacoraPrePolizaRemove(HdnBancoCvePrePoliza.Value.ToEntero, 7, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then + Banco.Commit() + BtnBancosRemove.Visible = False + Alert("Fluctuación eliminada.") + Else + Banco.RollBack() + End If + Banco.Dispose() + End Sub End Class From ce1117194792319f393d4b5a55821fd617bb01ee Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 9 May 2023 14:27:24 -0700 Subject: [PATCH 04/24] -- parametro en PS, objetoimpuesto --- General/SaldosIniciales.aspx.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index 3b858e92f..7cd9f2e00 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -855,7 +855,7 @@ Partial Class General_SaldosIniciales If CvePS > 0 Then If Not ObjPS.UpdatePS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, Precio, -1, RetIVA, False, -1, True, True, True, UsuarioActual.CveUsuario, CvePS, -1, -1, CveSATPS, CveTipoPS:=CveTipoPS, CveMarca:=CveMarca, CveMedida:=CveMedida, CveRinTamaño:=CveRinTamaño, - CveModelo:=CveModelo, Litraje:=Litraje, IEPSPorcentaje:=IEPS, CveClasificacion2:=CveClasificacion2, CveTamaño:=CveTamaño, AplicaSerie:=AplicaSerie) Then + CveModelo:=CveModelo, Litraje:=Litraje, IEPSPorcentaje:=IEPS, CveClasificacion2:=CveClasificacion2, CveTamaño:=CveTamaño, AplicaSerie:=AplicaSerie, CveObjetoImpuesto:=2) Then 'If Not ObjPS.UpdatePS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, 0, 1, 1, False, 0, True, True, True, UsuarioActual.CveUsuario, CvePS, -1, -1, CveSATPS, ' CveTipoPS:=CveTipoPS, CveMarca:=CveMarca, CveTamaño:=CveTamaño, CveMedida:=CveMedida) Then ErrorPS = True @@ -871,7 +871,7 @@ Partial Class General_SaldosIniciales If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, Precio, -1, RetIVA, False, 0, False, True, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1, CveTipoPS:=CveTipoPS, CveSATPS:=CveSATPS, CveMarca:=CveMarca, CveTamaño:=CveTamaño, CveMedida:=CveMedida, CveRinTamaño:=CveRinTamaño, - CveModelo:=CveModelo, Litraje:=Litraje, IEPSPorcentaje:=IEPS, CveClasificacion2:=CveClasificacion2, CveClasificacionDetalle:=CveClasificacionDetalle, AplicaSerie:=AplicaSerie) <= 0 Then + CveModelo:=CveModelo, Litraje:=Litraje, IEPSPorcentaje:=IEPS, CveClasificacion2:=CveClasificacion2, CveClasificacionDetalle:=CveClasificacionDetalle, AplicaSerie:=AplicaSerie, CveObjetoImpuesto:=2) <= 0 Then 'If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", "", Descripcion, 0, 0, 0, False, 0, False, True, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1, ' CveTipoPS:=CveTipoPS, CveSATPS:=CveSATPS, CveMarca:=CveMarca, CveTamaño:=CveTamaño, CveMedida:=CveMedida) <= 0 Then ErrorPS = True From b38a7390a70060ad3a77bbb0dd1e1764a98f4179 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 9 May 2023 15:18:51 -0700 Subject: [PATCH 05/24] - timbrado en apoyos logisticos --- Inventarios/EntradasSalidas.aspx.vb | 44 ++++++++++------------------- 1 file changed, 15 insertions(+), 29 deletions(-) diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb index 5c74dc695..700cef5ba 100644 --- a/Inventarios/EntradasSalidas.aspx.vb +++ b/Inventarios/EntradasSalidas.aspx.vb @@ -372,12 +372,6 @@ Partial Class Inventarios_EntradasSalidas Exit Sub End If - - If IfNull(Request("AL"), "").ToString = "1" Then - DivEmitirTransitorio.Visible = True - EsApoyoLogistico = True - End If - CveMovimiento = -1 CveMovimientoRelacionado = -1 TieneRelacionado = -1 @@ -403,6 +397,12 @@ Partial Class Inventarios_EntradasSalidas IndexSeccionAlmacen = 0 Tipo = 0 + If IfNull(Request("AL"), "").ToString = "1" Then + DivEmitirTransitorio.Visible = True + EsApoyoLogistico = True + DivCliente.Visible = True + End If + 'si viene una parámetro para cargar un movimiento lo hacemos dentro del procedimiento cargadatos Select Case UsuarioActual.Empresa.Funcionalidad(103) Case "1" @@ -893,14 +893,14 @@ Partial Class Inventarios_EntradasSalidas If drM("CveEstatusTimbrado").ToString.ToEntero > 0 Then HplDescargaXml.Visible = True - HplDescargaXml.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=DesXmlTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", CveMovimiento, "XML", drM("TimbreSerieFolio"), "Tra"))) + HplDescargaXml.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=DesXmlTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", CveMovimiento, "XML", drM("TimbreSerieFolio"), drM("TimbreTipoDocto")))) If drM("AplicaCP").ToString = "True" Then HplCartaPorteTimbre.Visible = True HplCartaPorteTimbre.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CARPOTIMBRE&CVEMOV={0}&CVETIMBRE={1}", CveMovimiento, drM("CveTimbre")))) Else HplDescargaPdf.Visible = True - HplDescargaPdf.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=DesPdfTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}&CVETIMBRE={4}", CveMovimiento, "PDF", drM("TimbreSerieFolio"), "Tra", drM("CveTimbre")))) + HplDescargaPdf.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=DesPdfTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}&CVETIMBRE={4}", CveMovimiento, "PDF", drM("TimbreSerieFolio"), drM("TimbreTipoDocto"), drM("CveTimbre")))) HplCartaPorte.Visible = True HplCartaPorte.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CARPO&CVEMOV={0}", CveMovimiento))) @@ -2054,11 +2054,10 @@ Partial Class Inventarios_EntradasSalidas ErrorMovInv = RetornoVirtual.TieneError End If - - Dim SerieInsertadaTimbre As String = "" Dim FolioInsertadoTimbre As Integer = -1 Dim CveTimbre As Integer = -1 + Dim tTimbreTipoDocto As String = "Tra" If Not ErrorAC And Not ErrorMovInv Then @@ -2075,12 +2074,12 @@ Partial Class Inventarios_EntradasSalidas Dim CveSubProyectoTimbre As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveAlmacen = {DdlAlmacen.SelectedValue}").Rows(0)("CveSubProyecto").ToString.ToEntero Dim Fechallegada As DateTime = (TxtFechaLlegada.Text & " 23:59:59").ToDateTime - Dim CveEntregaAlmacen As Integer = ObjGral.AddInvEntregaAlmacenRuta(CveSubProyectoTimbre, -1, DdlDireccionEnvio.SelectedValue.ToEntero, CveMovimiento, DdlChofer.SelectedValue.ToEntero, DdlUnidadCamion.SelectedValue.ToEntero, TxtFechaEntrega.Text.ToDate, TxtFechaLlegada.Text.ToDate, "T", "", "", MinFecha, 1, 1, TxtDistancia.Text.ToEntero, + Dim CveEntregaAlmacen As Integer = ObjGral.AddInvEntregaAlmacenRuta(CveSubProyectoTimbre, -1, DdlDireccionEnvio.SelectedValue.ToEntero, CveMovimiento, DdlChofer.SelectedValue.ToEntero, DdlUnidadCamion.SelectedValue.ToEntero, TxtFechaEntrega.Text.ToDate, TxtFechaLlegada.Text.ToDateTime, "T", "", "", MinFecha, 1, 1, TxtDistancia.Text.ToEntero, CveConfigAutoTransporte:=DdlConfigAuto.SelectedValue.ToEntero, CveCamionRemolque1:=DdlRemolque1.SelectedValue.ToEntero, CveCamionRemolque2:=DdlRemolque2.SelectedValue.ToEntero, CveCliente:=DdlClientes.SelectedValue.ToEntero) + If EsApoyoLogistico Then tTimbreTipoDocto = "Ent" If CveEntregaAlmacen > 0 Then - CveTimbre = ObjGral.AddGralTimbre("Tra", CveSubProyectoTimbre, TxtFechaEntrega.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen:=CveEntregaAlmacen, AplicaCP:=ChkEmitirCartaPorte.Checked) - + CveTimbre = ObjGral.AddGralTimbre(tTimbreTipoDocto, CveSubProyectoTimbre, TxtFechaEntrega.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen:=CveEntregaAlmacen, AplicaCP:=ChkEmitirCartaPorte.Checked) If CveTimbre > 0 Then SerieInsertadaTimbre = ObjGral.SerieInsertada FolioInsertadoTimbre = ObjGral.FolioInsertado @@ -2090,13 +2089,9 @@ Partial Class Inventarios_EntradasSalidas Else ErrorMovInv = True End If - End If End If - - - If Not ErrorAC And Not ErrorMovInv Then Dim Msg As New StringBuilder @@ -2115,10 +2110,9 @@ Partial Class Inventarios_EntradasSalidas ObjInventario.Commit() ' aplica los movimientos insertados If ObjContaAC IsNot Nothing Then ObjContaAC.Commit() - If ChkEmitirTimbrado.Checked Then CveMovimientoTimbrado = CveMovimiento - EmitirTimbrado(CveTimbre, CveMovimientoTimbrado, Msg) + EmitirTimbrado(CveTimbre, tTimbreTipoDocto, CveMovimientoTimbrado, Msg) End If Alert(Msg.ToString, TipoMensaje.MsgInformacion) @@ -2128,10 +2122,8 @@ Partial Class Inventarios_EntradasSalidas DdlSubProyecto.SelectedValueExist("-1") UPEncabezado.Update() End If - UPDatos.Update() - If UsuarioActual.TienePermisoProceso(139) Then CargaDatos(CveMovimiento) Else @@ -2146,8 +2138,6 @@ Partial Class Inventarios_EntradasSalidas Alert(Mensaje, TipoMensaje.MsgError) RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") End If - - Else ObjInventario.RollBack() 'deshace lo insertado CveMovimiento = 0 @@ -2155,14 +2145,10 @@ Partial Class Inventarios_EntradasSalidas Alert("ocurrió un Error al registrar los movimientos", TipoMensaje.MsgError) RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") End If - End If - CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' ")) - End If - Catch ex As Exception Try 'por si ya le habian dado rollback o commit ObjInventario.RollBack() 'deshace lo insertad @@ -5933,9 +5919,9 @@ Partial Class Inventarios_EntradasSalidas End Sub - Private Sub EmitirTimbrado(CveTimbre As Integer, CveMovimientoTimbrado As Integer, ByRef MensajeAlert As StringBuilder) + Private Sub EmitirTimbrado(CveTimbre As Integer, TipoDocto As String, CveMovimientoTimbrado As Integer, ByRef MensajeAlert As StringBuilder) - Dim ObjTimbres As New Timbres("Tra", CveTimbre, UsuarioActual) + Dim ObjTimbres As New Timbres(TipoDocto, CveTimbre, UsuarioActual) MensajeAlert.Append("

") From 0ef424be2fbe123c02198f8cf834fe700d15e811 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 10 May 2023 10:28:53 -0700 Subject: [PATCH 06/24] -- no mandar llamar info del contpaq --- Ventas/Clientes.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index e706f9aca..dcd7ee0ba 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -1752,7 +1752,7 @@ Partial Class Clientes TxtExtOtro.Text = ObjClientes.ExtOtros - If UsuarioActual.CveEmpresa.Contiene(119, 4, 7, 11, 12, 122, 145) Then + If UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122, 145) Then If ObjClientes.IdCtaContClientes > 0 Then DdlCtaContableClientes.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaContClientes), ObjClientes.IdCtaContClientes.ToString())) : DdlCtaContableClientes.SelectedValue = ObjClientes.IdCtaContClientes.ToString() If ObjClientes.IdCtaContAnticipos > 0 Then From f43042312efddaa5279d0a33710a426f7bb56692 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 10 May 2023 10:48:34 -0700 Subject: [PATCH 07/24] Limpieza de funcionalidad 520 --- App_Code/ClsBancos.vb | 6 +----- Bancos/IE.aspx.vb | 5 +---- Compras/Proveedores.aspx.vb | 5 +---- Inventarios/TraspasoAlmacen.aspx.vb | 18 ------------------ 4 files changed, 3 insertions(+), 31 deletions(-) diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index ca61f5bd1..8a261bc7b 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -4843,11 +4843,7 @@ Public Class ClsBancos 'MOVIMIENTOS CHEQUE If GetBancosIEMovimientos(CveIENotificar, UsuarioActual.CveEmpresa) Then - Dim Textov33 As String = "" - If UsuarioActual.Empresa.Funcionalidad(520) = "1" Then - Textov33 = "Favor de emitir complemento de pago de los siguientes documentos" - End If - + Dim Textov33 As String = "Favor de emitir complemento de pago de los siguientes documentos" strBody.AppendFormat("
") strBody.AppendFormat(" ") diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index 583fafb2d..a37c92bf4 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -6223,10 +6223,7 @@ Partial Class Bancos_IE 'MOVIMIENTOS CHEQUE If objIE.GetBancosIEMovimientos(CveIE, UsuarioActual.CveEmpresa) Then - Dim Textov33 As String = "" - If UsuarioActual.Empresa.Funcionalidad(520) = "1" Then - Textov33 = "Favor de emitir complemento de pago de los siguientes documentos" - End If + Dim Textov33 As String = "Favor de emitir complemento de pago de los siguientes documentos" strBody.AppendFormat("
") strBody.AppendFormat("
") diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb index ccfb2ae94..18574cc43 100644 --- a/Compras/Proveedores.aspx.vb +++ b/Compras/Proveedores.aspx.vb @@ -5898,10 +5898,7 @@ Partial Class Compras_Proveedores 'MOVIMIENTOS CHEQUE If objIE.GetBancosIEMovimientos(CveIE, UsuarioActual.CveEmpresa) Then - Dim Textov33 As String = "" - If UsuarioActual.Empresa.Funcionalidad(520) = "1" Then - Textov33 = "Favor de emitir complemento de pago de los siguientes documentos" - End If + Dim Textov33 As String = "Favor de emitir complemento de pago de los siguientes documentos" strBody.AppendFormat("
") strBody.AppendFormat("
") diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb index 11e1f5e05..352045248 100644 --- a/Inventarios/TraspasoAlmacen.aspx.vb +++ b/Inventarios/TraspasoAlmacen.aspx.vb @@ -2624,14 +2624,6 @@ Partial Class Inventarios_TraspasoAlmacen strBody.AppendFormat(" ") strBody.AppendFormat(" ", ObjInventario.Observaciones) strBody.AppendFormat(" ") - 'strBody.AppendFormat(" ") - 'strBody.AppendFormat(" ") - 'strBody.AppendFormat(" ", objIE.Importe.FormatoNumero, objIE.Moneda) - 'strBody.AppendFormat(" ") - 'strBody.AppendFormat(" ") - 'strBody.AppendFormat(" ") - 'strBody.AppendFormat(" ", objIE.Observaciones) - 'strBody.AppendFormat(" ") strBody.AppendFormat(" ") strBody.AppendFormat("
Observaciones:{0}
Importe:$ {0} {1}
Observaciones:{0}
") strBody.AppendFormat("
") @@ -2644,12 +2636,6 @@ Partial Class Inventarios_TraspasoAlmacen strBody.AppendFormat("
") strBody.AppendFormat("
") - - 'MOVIMIENTOS CHEQUE - 'Dim Textov33 As String = "" - 'If UsuarioActual.Empresa.Funcionalidad(520) = "1" Then - ' Textov33 = "Favor de emitir complemento de pago de los siguientes documentos" - 'End If If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then strBody.AppendFormat("
") strBody.AppendFormat(" ") @@ -2662,8 +2648,6 @@ Partial Class Inventarios_TraspasoAlmacen strBody.AppendFormat(" ") strBody.AppendFormat(" ") strBody.AppendFormat(" ") - 'strBody.AppendFormat(" ") - 'strBody.AppendFormat(" ") strBody.AppendFormat(" ") @@ -2672,8 +2656,6 @@ Partial Class Inventarios_TraspasoAlmacen strBody.AppendFormat(" ", dr("Cantidad").ToString.FormatoNumero) strBody.AppendFormat(" ", dr("UnidadMedida").ToString) strBody.AppendFormat(" ", dr("CodigoPS").ToString) - 'strBody.AppendFormat(" ", dr("FolioFiscal")) - 'strBody.AppendFormat(" ", dr("ImporteNC").ToString.FormatoNumero) strBody.AppendFormat(" ") Next From 05706a1fc5575e47f177aca1ec7fe8d3b8967d63 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 10 May 2023 13:04:57 -0700 Subject: [PATCH 08/24] =?UTF-8?q?nueva=20secci=C3=B3n=20de=20Retenci=C3=B3?= =?UTF-8?q?n=20de=20IVA=20para=20Proveedores?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Contabilidad/RepIVA.aspx | 123 ++++++++++++++++++++---------------- Contabilidad/RepIVA.aspx.cs | 14 ++-- 2 files changed, 78 insertions(+), 59 deletions(-) diff --git a/Contabilidad/RepIVA.aspx b/Contabilidad/RepIVA.aspx index 04c247251..b91c9303e 100644 --- a/Contabilidad/RepIVA.aspx +++ b/Contabilidad/RepIVA.aspx @@ -200,68 +200,81 @@ -

IVA Acreditable

- - - - - - - - - - - - - - - - - - - RetIVA
Hon/Ser.Prof.
-
- - - -
- - - - - - - - - - - - - - - <%-- - - - --%> - - - - - -
-
-
-

IVA por Porcentaje

- +

IVA Acreditable

+ + - + + + + + + + + - + + + + + + + RetIVA
Hon/Ser.Prof.
+
+ + + +
+ + + + + + + + + + + + + + <%-- + + + --%> + + + + +
+
+
+

IVA por Porcentaje

+ + + + + + + +
+
+

Ret IVA

+ + + + + + + + +
+
diff --git a/Contabilidad/RepIVA.aspx.cs b/Contabilidad/RepIVA.aspx.cs index 61cdc8e9e..00758acb9 100644 --- a/Contabilidad/RepIVA.aspx.cs +++ b/Contabilidad/RepIVA.aspx.cs @@ -65,7 +65,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas TCEspecifico = -1; DateTime FF = DateTime.Now.AddMonths(-1); txtFechaI.Text = $"01/{FF.Month}/{FF.Year}"; - txtFechaF.Text = FF.ToShortDateString(); + txtFechaF.Text = FF.LastDayOfMonth().ToShortDateString(); LnkAccionesDIOT.Visible = true; @@ -109,13 +109,18 @@ public partial class Contabilidad_RepIVA : ClsPaginas GvA.Columns[11].Visible = DtIVAAcreditable.SUM("valorActosImp1516") > 0; // sino tiene valor la columna de importación de oculta - if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 3, DdlCuenta.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)) { GvIVA2.DataSource = ObjCont.DtResultados; } - + if (UsuarioActual.CveEmpresa == 119) + { + if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 4, DdlCuenta.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)) + { + GvRetIVA.DataSource = ObjCont.DtResultados; + } + } } ObjCont.Dispose(); GvT.DataBind(); @@ -123,6 +128,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas GvIEPSA.DataBind(); GvIVAA.DataBind(); GvIVA2.DataBind(); + GvRetIVA.DataBind(); UpDatos.Update(); String Str = "Se Consultó el Reporte de IVA. - " + UsuarioActual.Usuario; @@ -162,7 +168,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas { Decimal SubTotal = (e.Row.DBCampo("SubTotal16").ToDecimal() != 0 ? e.Row.DBCampo("SubTotal16").ToDecimal() : (e.Row.DBCampo("SubTotal8").ToDecimal() != 0 ? e.Row.DBCampo("SubTotal8").ToDecimal() : (Decimal)0.0)); - Decimal dif = Math.Round(SubTotal * e.Row.DBCampo("PorcentajeIVA").ToDecimal(), 2) - Math.Round(e.Row.DBCampo("IVA").ToDecimal() + Math.Round(e.Row.DBCampo("IVANoDeducible").ToDecimal()), 2); + Decimal dif = Math.Round(SubTotal * e.Row.DBCampo("PorcentajeIVA").ToDecimal(), 2) - Math.Round(e.Row.DBCampo("IVA").ToDecimal(), 2); if (Math.Abs(dif) > 1) { e.Row.ForeColor = System.Drawing.Color.Red; From a8ae87fdacaa92c7cfed86bd772bbf371c9f6109 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 10 May 2023 13:11:27 -0700 Subject: [PATCH 09/24] =?UTF-8?q?--=20visualizaci=C3=B3n=20divRetIVA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Contabilidad/RepIVA.aspx | 2 +- Contabilidad/RepIVA.aspx.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Contabilidad/RepIVA.aspx b/Contabilidad/RepIVA.aspx index b91c9303e..7940e288e 100644 --- a/Contabilidad/RepIVA.aspx +++ b/Contabilidad/RepIVA.aspx @@ -263,7 +263,7 @@ -
+

Ret IVA

diff --git a/Contabilidad/RepIVA.aspx.cs b/Contabilidad/RepIVA.aspx.cs index 00758acb9..f8c0f1cde 100644 --- a/Contabilidad/RepIVA.aspx.cs +++ b/Contabilidad/RepIVA.aspx.cs @@ -116,6 +116,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas if (UsuarioActual.CveEmpresa == 119) { + divRetIVA.Visible=true; if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 4, DdlCuenta.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)) { GvRetIVA.DataSource = ObjCont.DtResultados; From 29686e8c9cf9153b5e77e4afe0bb8cf8a36e9fcf Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Thu, 11 May 2023 09:59:16 -0700 Subject: [PATCH 10/24] --- App_Code/Empresa.vb | 2 +- RH/Asistencias.aspx | 110 ++++++++++++++++++++--------------------- RH/Asistencias.aspx.vb | 6 ++- RH/CalculoSBC.aspx.cs | 4 +- 4 files changed, 62 insertions(+), 60 deletions(-) diff --git a/App_Code/Empresa.vb b/App_Code/Empresa.vb index de0648139..89710bc9b 100644 --- a/App_Code/Empresa.vb +++ b/App_Code/Empresa.vb @@ -97,7 +97,7 @@ Public Class Empresa Public Property Soporte_PWD As String Public Property Soporte_Tipo As String Public Property Timbres As Integer - Public Property RutaArchivos As String + Private Property RutaArchivos As String Public ReadOnly Property Ruta As String Get If Not String.IsNullOrEmpty(RutaArchivos) AndAlso ClsPaginas.EsProduccion Then diff --git a/RH/Asistencias.aspx b/RH/Asistencias.aspx index 7bb6c6fa3..98ae354cd 100644 --- a/RH/Asistencias.aspx +++ b/RH/Asistencias.aspx @@ -10,7 +10,7 @@ Registro de Asistencias - +
  • Lista asistencia
  • @@ -21,13 +21,13 @@
    - + -
    -
    +
    +
    "><%--class="expand"--%> @@ -36,73 +36,71 @@
    -
    +
    Cliente: -
    -
    +
    +
    -
    +
    Proyecto: -
    -
    - - - +
    + + + +
    -
    +
    SubProyecto: -
    -
    - - - -
    - - -
    +
    + + + +
    +
    +
    Turno: -
    -
    +
    - - - + + + +
    -
    +
    +
    + + + + + +
    + +
    - - - - - -
    - - -
    F. Asistencia: -
    -
    -
    - - - - +
    +
    + + + + - - - - - - + + + + + + +
    @@ -113,12 +111,12 @@
    > -
    +
    - + @@ -146,14 +144,14 @@ - + Cliente - + Asistencia diff --git a/RH/Asistencias.aspx.vb b/RH/Asistencias.aspx.vb index 38a03b877..613a70fcd 100644 --- a/RH/Asistencias.aspx.vb +++ b/RH/Asistencias.aspx.vb @@ -167,7 +167,11 @@ Partial Class RH_Asistencias lrds.Add(rds) '"Empresas/Grales/Formatos/EquiposGPS.rdlc" '"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc" - Dim rutardlc = "GPS/Asistencia.rdlc" + 'Dim rutardlc = "GPS/Asistencia.rdlc" + Dim rutardlc As String = UsuarioActual.Empresa.Ruta & "Formatos/Asistencia.rdlc" + If Not System.IO.File.Exists(rutardlc) Then + rutardlc = "Empresas/Grales/Formatos/Asistencia.rdlc" + End If ImprimirPDF(rutardlc, lrds, params, "Lista de asistencia") End Sub diff --git a/RH/CalculoSBC.aspx.cs b/RH/CalculoSBC.aspx.cs index d031bbd75..edd3a2586 100644 --- a/RH/CalculoSBC.aspx.cs +++ b/RH/CalculoSBC.aspx.cs @@ -698,7 +698,7 @@ public partial class RH_CalculoSBC : ClsPaginas } - string rutarchivos = string.Format("{0}modificacionsalarios\\", UsuarioActual.Empresa.RutaArchivos); + string rutarchivos = string.Format("{0}modificacionsalarios\\", UsuarioActual.Empresa.Ruta); if (!System.IO.Directory.Exists(rutarchivos)) { System.IO.Directory.CreateDirectory(rutarchivos); @@ -900,7 +900,7 @@ public partial class RH_CalculoSBC : ClsPaginas protected void Lnkmostrararchivos_Click(object sender, EventArgs e) { - string rutarchivos = string.Format("{0}\\modificacionsalarios\\", UsuarioActual.Empresa.RutaArchivos); + string rutarchivos = string.Format("{0}\\modificacionsalarios\\", UsuarioActual.Empresa.Ruta); List lisaarchivos = new List(); foreach (var urfile in System.IO.Directory.GetFiles(rutarchivos, "*")) { From 427b68bd1fa9c77355b347392103f8920cf6187b Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 11 May 2023 10:00:25 -0700 Subject: [PATCH 11/24] -- agergar validacion prepoliza --- Bancos/DepositosCaja.aspx.vb | 39 +++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index 55497f36b..3718fdb04 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -182,8 +182,8 @@ Partial Class Bancos_DepositosCaja End If Dim OcurrioError As Boolean = False - Dim ObjContabilidad As New ClsContabilidad() - Dim ObjBancos As New ClsBancos(ObjContabilidad.IniciaTransacSQL()) + Dim ObjConta As New ClsContabilidad() + Dim ObjBancos As New ClsBancos(ObjConta.IniciaTransacSQL()) Dim CveIEOrigen As Integer 'CajaChica Dim CveIEDestino As Integer 'Banco @@ -222,7 +222,7 @@ Partial Class Bancos_DepositosCaja IdCuentaBancariaDestino = drDestino("IdCtaContable").ToString.ToEntero End If - NuevaCvePrePoliza = ObjContabilidad.AddPrePolizas("DepCaja", 13, TotalImportePrePoliza, TotalImportePrePoliza, CveMoneda, Fecha, "Depósito Bancario", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=1) + NuevaCvePrePoliza = ObjConta.AddPrePolizas("DepCaja", 13, TotalImportePrePoliza, TotalImportePrePoliza, CveMoneda, Fecha, "Depósito Bancario", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=1) If ChkIntermediario.Checked Then @@ -232,21 +232,21 @@ Partial Class Bancos_DepositosCaja CveProveedorIntermediario = DdlProveedorIntermediario.SelectedValue.ToEntero - If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, DdlClasificacionIntermediario.SelectedItem.Text, 95, DdlClasificacionIntermediario.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario, ImporteMX:=TotalImporte, CveProveedor:=CveProveedorIntermediario, CveCuenta:=57619) Then + If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, DdlClasificacionIntermediario.SelectedItem.Text, 95, DdlClasificacionIntermediario.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario, ImporteMX:=TotalImporte, CveProveedor:=CveProveedorIntermediario, CveCuenta:=57619) Then OcurrioError = True End If - If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, TotalImporte, DdlClasificacionIntermediario.SelectedItem.Text, 95, DdlClasificacionIntermediario.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario, ImporteMX:=TotalImporte, CveProveedor:=CveProveedorIntermediario, CveCuenta:=57619) Then + If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, TotalImporte, DdlClasificacionIntermediario.SelectedItem.Text, 95, DdlClasificacionIntermediario.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario, ImporteMX:=TotalImporte, CveProveedor:=CveProveedorIntermediario, CveCuenta:=57619) Then OcurrioError = True End If - If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, ImporteInter, DdlClasificacionIntermediario.SelectedItem.Text, 51, DdlClasificacionIntermediario.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario, ImporteMX:=ImporteInter) Then + If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, ImporteInter, DdlClasificacionIntermediario.SelectedItem.Text, 51, DdlClasificacionIntermediario.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario, ImporteMX:=ImporteInter) Then OcurrioError = True End If If IVA <> 0 Then - If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, IVA, DdlClasificacionIntermediario.SelectedItem.Text, 14, DdlClasificacionIntermediario.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario, ImporteMX:=IVA, PorcentajeImpuesto:=0.16D) Then + If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, IVA, DdlClasificacionIntermediario.SelectedItem.Text, 14, DdlClasificacionIntermediario.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario, ImporteMX:=IVA, PorcentajeImpuesto:=0.16D) Then OcurrioError = True End If End If @@ -285,13 +285,13 @@ Partial Class Bancos_DepositosCaja documentos += String.Format("Depósito: {1}    
    ", CveIEOrigen, FolioIE) - If ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio) Then + If ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio) Then If ChkFaltante.Checked Then CveSubProyectoComision = DdlSubProyectoDeposito.SelectedValue.ToEntero CveClasificacionComision = DdlClasificacion.SelectedValue.ToEntero If Comision <> 0 Then - If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Comision, DdlClasificacion.SelectedItem.Text, 78, DdlClasificacion.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionComision, CveSubProyecto:=CveSubProyectoComision, ImporteMX:=Comision * TipoCambio) Then + If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Comision, DdlClasificacion.SelectedItem.Text, 78, DdlClasificacion.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionComision, CveSubProyecto:=CveSubProyectoComision, ImporteMX:=Comision * TipoCambio) Then OcurrioError = True End If End If @@ -301,7 +301,7 @@ Partial Class Bancos_DepositosCaja CveSubProyectoDescuento = DdlSubProyectoDescuento.SelectedValue.ToEntero CveClasificacionDescuento = DdlClasificacionDescuento.SelectedValue.ToEntero - If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, Descuento, DdlClasificacionDescuento.SelectedItem.Text, 51, DdlClasificacionDescuento.SelectedItem.Text & " " & DdlPersonal.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionDescuento, CveSubProyecto:=CveSubProyectoDescuento, ImporteMX:=Descuento * TipoCambio, CvePersonal:=DdlPersonal.SelectedValue.ToEntero) Then + If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, Descuento, DdlClasificacionDescuento.SelectedItem.Text, 51, DdlClasificacionDescuento.SelectedItem.Text & " " & DdlPersonal.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionDescuento, CveSubProyecto:=CveSubProyectoDescuento, ImporteMX:=Descuento * TipoCambio, CvePersonal:=DdlPersonal.SelectedValue.ToEntero) Then OcurrioError = True End If End If @@ -322,7 +322,6 @@ Partial Class Bancos_DepositosCaja 'Datos de las Prepolizas A Cancelar Dim CveIE As Integer = Gvr.DataKey("CveIE").ToEntero Dim CveVenta As Integer = Gvr.DataKey("CveVenta").ToEntero - Dim CvePrePoliza As Integer = Gvr.DataKey("CvePrePoliza").ToEntero Dim CveCuentaBancaria As Integer = Gvr.DataKey("CveCuenta").ToEntero Dim tCveSubProyecto As Integer = Gvr.DataKey("CveSubProyecto").ToEntero @@ -334,7 +333,7 @@ Partial Class Bancos_DepositosCaja CveIEDestino = ObjBancos.AddBancos_IE(CveCuentaBancaria, 2, Fecha, FolioIE.ToString, String.Format("Depósito Bancario: {0}", SerieFolio), Importe, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, SerieFolio, 30, String.Format("Depósito Bancario: {0}", SerieFolio), Fecha, IdCuentaBancariaDestino, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=tCveSubProyecto, CveVenta:=CveVenta, CveIE:=CveIEDestino, ImporteMX:=Importe * TipoCambio) Then + If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, SerieFolio, 30, String.Format("Depósito Bancario: {0}", SerieFolio), Fecha, IdCuentaBancariaDestino, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=tCveSubProyecto, CveVenta:=CveVenta, CveIE:=CveIEDestino, ImporteMX:=Importe * TipoCambio) Then OcurrioError = True Exit For End If @@ -355,11 +354,19 @@ Partial Class Bancos_DepositosCaja End If + If Not OcurrioError AndAlso ObjConta.ValidacionPrePolizaCuadre(NuevaCvePrePoliza, 1) Then + If ObjConta.ValorPolizaDescuadre > 0 Then + GuardaLogAD($"Bancos/DepositoCaja | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{NuevaCvePrePoliza}", "LogPrePolizas") + OcurrioError = True + End If + End If + If OcurrioError Then - ObjContabilidad.RollBack() + ObjConta.RollBack() Alert("Ocurrio un error al realizar los depositos", TipoMensaje.MsgError) - Else - ObjContabilidad.Commit() + Else + + ObjConta.Commit() documentos += String.Format("Prepóliza

    ", NuevaCvePrePoliza) Alert(documentos.ToString) @@ -373,7 +380,7 @@ Partial Class Bancos_DepositosCaja lblValorTotal.Text = "0.0" lblValorTotalSeleccionado.Text = "0.0" CargaDatos() - ObjContabilidad.Dispose() + ObjConta.Dispose() End Sub Private Sub ObtenerTotalImporta() From 55c3cdd2b846baa83158d537fd3aa699c008b530 Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Thu, 11 May 2023 10:50:00 -0700 Subject: [PATCH 12/24] --- App_Code/ClsPaginas.vb | 4 ++-- App_Code/ClsSisEmpresas.vb | 2 +- App_Code/Empresa.vb | 8 ++++++-- Ashx/E140.ashx | 4 ++-- Ashx/TareasProgramadas.ashx | 2 +- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 908445a59..7a35200eb 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -4640,7 +4640,7 @@ Public Class ClsPaginas If Context.Session("UsuarioSIG") IsNot Nothing Then CveUsuario = UsuarioActual.CveUsuario CveEmpresa = UsuarioActual.CveEmpresa - RutaEmpresa = UsuarioActual.Empresa.RutaArchivos + RutaEmpresa = UsuarioActual.Empresa.Ruta End If Dim bdir As String = If(RutaReporte.Contains("Empresas"), ModExtensiones.DirectorioBaseEmpresas, AppDomain.CurrentDomain.BaseDirectory) 'TOMAR LA RUTA BASE PARA EL DIRECTORIO DE LA EMPRESA @@ -6458,7 +6458,7 @@ Public Class ClsPaginas If Context.Session("UsuarioSIG") IsNot Nothing Then CveUsuario = UsuarioActual.CveUsuario CveEmpresa = UsuarioActual.CveEmpresa - RutaEmpresa = UsuarioActual.Empresa.RutaArchivos + RutaEmpresa = UsuarioActual.Empresa.Ruta End If Dim bdir As String = If(RutaReporte.Contains("Empresas"), ModExtensiones.DirectorioBaseEmpresas, AppDomain.CurrentDomain.BaseDirectory) 'TOMAR LA RUTA BASE PARA EL DIRECTORIO DE LA EMPRESA diff --git a/App_Code/ClsSisEmpresas.vb b/App_Code/ClsSisEmpresas.vb index 97542eac4..e35e18d35 100644 --- a/App_Code/ClsSisEmpresas.vb +++ b/App_Code/ClsSisEmpresas.vb @@ -465,7 +465,7 @@ Public Class ClsSisEmpresas _Empresa.FielPassword = Data.Rows(0)("FielPassword").ToString _Empresa.FielPFX = Data.Rows(0)("FielPFX").ToString - _Empresa.RutaArchivos = Data.Rows(0)("RutaArchivos").ToString + _Empresa.Ruta = Data.Rows(0)("RutaArchivos").ToString Else 'Alert("No se encontró la Empresa solicitada.", TipoMensaje.MsgAdvertencia) diff --git a/App_Code/Empresa.vb b/App_Code/Empresa.vb index 89710bc9b..d88769d36 100644 --- a/App_Code/Empresa.vb +++ b/App_Code/Empresa.vb @@ -97,8 +97,9 @@ Public Class Empresa Public Property Soporte_PWD As String Public Property Soporte_Tipo As String Public Property Timbres As Integer - Private Property RutaArchivos As String - Public ReadOnly Property Ruta As String + Private Property RutaArchivos As String + + Public Property Ruta As String Get If Not String.IsNullOrEmpty(RutaArchivos) AndAlso ClsPaginas.EsProduccion Then Return RutaArchivos @@ -106,6 +107,9 @@ Public Class Empresa Return String.Format("{0}\{1}\", Extensiones.ModExtensiones.DirectorioEmpresas, Me.CveEmpresa) End If End Get + Set(ByVal value As String) + RutaArchivos = value + End Set End Property 'Public Property IdCuentaIVAxTrasladar As Integer 'Public Property IdCuentaIVATrasladado As Integer diff --git a/Ashx/E140.ashx b/Ashx/E140.ashx index b1e309b3d..063ecb33c 100644 --- a/Ashx/E140.ashx +++ b/Ashx/E140.ashx @@ -36,8 +36,8 @@ Public Class E140 : Implements IHttpHandler, IRequiresSessionState If ObjEmpresa.GetEmpresas(CveEmpresa, "-1", "-1", "-1", "-1") Then End If - If ObjEmpresa.Empresa.RutaArchivos.Trim.Length > 0 Then - RutaEmpresa = ObjEmpresa.Empresa.RutaArchivos.Trim + If ObjEmpresa.Empresa.Ruta.Trim.Length > 0 Then + RutaEmpresa = ObjEmpresa.Empresa.Ruta.Trim End If ObjEmpresa.Dispose() diff --git a/Ashx/TareasProgramadas.ashx b/Ashx/TareasProgramadas.ashx index b8c6648dc..c8f9322a3 100644 --- a/Ashx/TareasProgramadas.ashx +++ b/Ashx/TareasProgramadas.ashx @@ -1192,7 +1192,7 @@ Public Class TareasProgramadas : Implements IHttpHandler If UsuarioActual IsNot Nothing Then CveUsuario = UsuarioActual.CveUsuario CveEmpresa = UsuarioActual.CveEmpresa - RutaEmpresa = UsuarioActual.Empresa.RutaArchivos + RutaEmpresa = UsuarioActual.Empresa.Ruta End If Dim bdir As String = If(RutaReporte.Contains("Empresas"), ModExtensiones.DirectorioBaseEmpresas, AppDomain.CurrentDomain.BaseDirectory) From 6a2d7efa3e3b9e645e6612b0dc25b82cd977420f Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Thu, 11 May 2023 10:50:03 -0700 Subject: [PATCH 13/24] opcion para consumo interno --- Inventarios/EntradasSalidas.aspx.vb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb index 5c74dc695..7c5b0a4a4 100644 --- a/Inventarios/EntradasSalidas.aspx.vb +++ b/Inventarios/EntradasSalidas.aspx.vb @@ -1950,8 +1950,13 @@ Partial Class Inventarios_EntradasSalidas End If If Not ErrorMovInv Then + Dim OpcionPrePoliza As Integer = -1 + 'SI ES CONSUMO INTERNO + If DdlConcepto.SelectedValue = "30" Then + OpcionPrePoliza = 11 + End If - If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then + If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, OpcionPrePoliza) Then If ObjConta.ValorPolizaDescuadre > 0 Then ErrorMovInv = True GuardaLogAD($"Inv/ES | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") From ba9aaf5e08837aed33226fc37ff5e188d2443c9d Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Thu, 11 May 2023 11:03:47 -0700 Subject: [PATCH 14/24] =?UTF-8?q?Tama=C3=B1o=20de=20txt=20de=20PU=20en=20v?= =?UTF-8?q?entas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/Ventas.aspx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 10fd4987a..5541ff8c2 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -1065,7 +1065,7 @@ -
    CantidadUnidadProducto / ServicioFolio FiscalNC Aplicadas
    {0}{0}{0}{0}{0}
    +
    From 09fbd611be0b8644fb25725a1e72fb6a1d08e4a2 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Thu, 11 May 2023 11:28:32 -0700 Subject: [PATCH 15/24] cambiar funcionalidad 570 por la 702 --- Ventas/Ventas.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 1afe33093..add3b72e4 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -7070,7 +7070,7 @@ Partial Class Ventas Dim ValorAutorizacion As String = UsuarioActual.Empresa.Funcionalidad(595) 'OBLIGAR PAGO DE CONTADO SI EL CLIENTE NO PERMITE CREDITO - If Me.PermiteCredito = False AndAlso ((DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem") AndAlso CveVenta < 1) OrElse (DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "Cot", "PA") AndAlso EsCreaApartirDe) OrElse (DdlTipoComprobante.SelectedValue.Contiene("Cot") AndAlso CveVenta > 0)) Then + If (Not UsuarioActual.Empresa.Funcionalidad(702).Contiene("1", "2")) AndAlso Me.PermiteCredito = False AndAlso ((DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem") AndAlso CveVenta < 1) OrElse (DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "Cot", "PA") AndAlso EsCreaApartirDe) OrElse (DdlTipoComprobante.SelectedValue.Contiene("Cot") AndAlso CveVenta > 0)) Then RBLPago.SelectedValue = "2" RBLPago.Items(0).Enabled = False RBLPago_SelectedIndexChanged(Nothing, Nothing) From 4e880913a294c258582a946048d0e79a099ef69b Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 11 May 2023 12:33:06 -0700 Subject: [PATCH 16/24] =?UTF-8?q?--=20quitar=20alineaci=C3=B3n=20a=20la=20?= =?UTF-8?q?derecha=20en=20observaciones?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Inventarios/EntradasSalidas.aspx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Inventarios/EntradasSalidas.aspx b/Inventarios/EntradasSalidas.aspx index e66bfc7f7..bf150f70b 100644 --- a/Inventarios/EntradasSalidas.aspx +++ b/Inventarios/EntradasSalidas.aspx @@ -901,15 +901,12 @@ - - - - + - - + + From fcee8fcdd602e2ee0b09bd5b44b2390c8e8dbb48 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 11 May 2023 12:39:43 -0700 Subject: [PATCH 17/24] -- cambios visuales por acomodo de filtros --- RH/Asistencias.aspx | 110 ++++++++++++++++------------------------- RH/Asistencias.aspx.vb | 32 +++--------- 2 files changed, 48 insertions(+), 94 deletions(-) diff --git a/RH/Asistencias.aspx b/RH/Asistencias.aspx index 98ae354cd..114706a68 100644 --- a/RH/Asistencias.aspx +++ b/RH/Asistencias.aspx @@ -25,103 +25,77 @@ - -
    -
    +
    +
    - "><%--class="expand"--%> - +
    -
    - Cliente: -
    - -
    -
    - -
    - Proyecto: -
    + + Cliente: +
    + +
    + Proyecto: +
    -
    -
    - -
    - SubProyecto: - -
    +
    + SubProyecto: +
    -
    -
    -
    - Turno: -
    - - - - -
    -
    - -
    - -
    - - - - - -
    -
    - - -
    - F. Asistencia: -
    +
    + F. Asistencia: +
    - - + -
    -
    -
    - - - +
    + +
    +
    + + + + + +
    +
    -
    -
    > +
    + +
    +
    - - - - - - - diff --git a/RH/Asistencias.aspx.vb b/RH/Asistencias.aspx.vb index 613a70fcd..e6ccc247a 100644 --- a/RH/Asistencias.aspx.vb +++ b/RH/Asistencias.aspx.vb @@ -13,7 +13,11 @@ Partial Class RH_Asistencias CargaSuperioresOrganigrama() CargaProyecto() CargaTurnos() - TxtFechaAsistencia.Text = Now.ToShortDateString + If UsuarioActual.Empresa.Funcionalidad(267) = "1" Then ' emp citricola + divCliente.Visible = False + LblCliente.Visible = False + End If + txtFechaAsistencia.Text = Now.ToShortDateString If UsuarioActual.CveRol = 1 OrElse UsuarioActual.CveUsuario = 2343 Then PnlMasivo.Visible = True CargaTiposPeriodo() @@ -44,36 +48,13 @@ Partial Class RH_Asistencias End Sub #End Region - 'Private Sub CargaClientes() - ' Dim ObjClientes As New ClsClientes - ' If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1) Then - ' DdlCliente.DataSource = ObjClientes.DtResultados - ' Else - ' DdlCliente.DataSource = Nothing - ' End If - ' ObjClientes.Dispose() - ' 'Application("GlobalDTResponsable") - ' DdlCliente.DataBind() - 'End Sub - 'Protected Sub BtnCargarClientes_Click(sender As Object, e As System.EventArgs) Handles BtnCargarClientes.Click - ' 'CargaClientes() - ' 'DdlCliente.Attributes.Remove("onclick") - 'End Sub Private Sub CargaProyecto() - 'DdlProyecto.DataSource = GlobalDTProyectos(UsuarioActual.Empresa.CveEmpresa).FiltraParametros("", DistinctColumns:={"CveProyecto", "Proyecto"}) - 'DdlProyecto.DataBind() - CargarCentrosDeCosto(DdlProyecto, DdlProyecto, LblProyectoAsignado, LblSubProyectoAsignado) - DivProyectosAsignado1.Visible = LblProyectoAsignado.Visible - DivProyectosAsignado2.Visible = LblProyectoAsignado.Visible + CargarCentrosDeCosto(DdlProyecto, DdlProyecto, LblProyectoAsignado, LblSubProyectoAsignado, divProyecto:=DivProyectosAsignado1) - - DdlSubProyecto.DataSource = If(Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1)) - DdlSubProyecto.DataBind() - DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1")) End Sub Private Sub CargaSubProyecto() @@ -103,7 +84,6 @@ Partial Class RH_Asistencias dt = dt.FiltraParametros(String.Format("CvePersonalPadre = {0}", DdlSupervisorOrganigrama.SelectedValue.ToEntero())) ElseIf DdlSupervisorOrganigrama.SelectedValue.ToEntero() = -2 Then dt = dt.FiltraParametros("CvePersonalPadre IS NULL") - Else End If From 5c3c57288f5617854e31292cf2a3dc847b225edb Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 11 May 2023 13:39:51 -0700 Subject: [PATCH 18/24] - --- RH/Asistencias.aspx | 4 ++-- RH/Asistencias.aspx.vb | 15 ++------------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/RH/Asistencias.aspx b/RH/Asistencias.aspx index 114706a68..c22c41f78 100644 --- a/RH/Asistencias.aspx +++ b/RH/Asistencias.aspx @@ -41,13 +41,13 @@ Proyecto:
    - +
    SubProyecto:
    - +
    diff --git a/RH/Asistencias.aspx.vb b/RH/Asistencias.aspx.vb index e6ccc247a..decb15779 100644 --- a/RH/Asistencias.aspx.vb +++ b/RH/Asistencias.aspx.vb @@ -29,15 +29,7 @@ Partial Class RH_Asistencias #Region " ORGANIGRAMA " Private Sub CargaSuperioresOrganigrama() - 'Dim ObjRH As New ClsRH - 'If ObjRH.GetPersonal(-1, UsuarioActual.CveEmpresa) Then - ' DdlSupervisorOrganigrama.DataSource = ObjRH.DtResultados - 'Else - ' DdlSupervisorOrganigrama.DataSource = Nothing - ' Alert("Ocurrió un error al cargar el catálogo de Jefes Inmediatos") - 'End If - 'ObjRH.Dispose() Using objbase As New ClsRH() If (objbase.SupervisorOrganigramaGet(UsuarioActual.CveEmpresa)) Then DdlSupervisorOrganigrama.DataSource = objbase.DtResultados @@ -45,21 +37,18 @@ Partial Class RH_Asistencias End If End Using - End Sub #End Region - - Private Sub CargaProyecto() - CargarCentrosDeCosto(DdlProyecto, DdlProyecto, LblProyectoAsignado, LblSubProyectoAsignado, divProyecto:=DivProyectosAsignado1) + CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyectoAsignado, LblSubProyectoAsignado, divProyecto:=DivProyectosAsignado1) End Sub Private Sub CargaSubProyecto() DdlSubProyecto.Items.Clear() - DdlSubProyecto.DataSource = GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero) + DdlSubProyecto.DataSource = GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa) DdlSubProyecto.DataBind() DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1")) End Sub From b2f2f1e389a7bd83354fd5ff1e23be314dcfd5e5 Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Fri, 12 May 2023 00:25:57 -0700 Subject: [PATCH 19/24] --- App_Code/LogicNominas.vb | 42 ++++++++++++++++++++++++++++------------ Nomina/Nomina.aspx | 3 +++ Nomina/Nomina.aspx.cs | 5 +++++ 3 files changed, 38 insertions(+), 12 deletions(-) diff --git a/App_Code/LogicNominas.vb b/App_Code/LogicNominas.vb index 7033ba0c5..a6894c55c 100644 --- a/App_Code/LogicNominas.vb +++ b/App_Code/LogicNominas.vb @@ -97,7 +97,7 @@ Public Class LogicNominas Dim DtDeducciones As Data.DataTable = Nothing Dim DtOtrosPagos As Data.DataTable = Nothing - Dim DtHorasExtras As Data.DataTable = Nothing + 'Dim DtHorasExtras As Data.DataTable = Nothing Dim TotalPercepciones As Decimal = 0 Dim TotalDeducciones As Decimal = 0 Dim TotalOtrosPagos As Decimal = 0 @@ -253,13 +253,13 @@ Public Class LogicNominas continuar = False End If If Not TimbreIndemnizacion Then - If continuar AndAlso objNomina.GetHorasExtras(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa) Then - DtHorasExtras = objNomina.DtResultados - Else - continuar = False - End If + 'If continuar AndAlso objNomina.GetHorasExtras(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa) Then + ' DtHorasExtras = objNomina.DtResultados + 'Else + ' continuar = False + 'End If Else - DtHorasExtras = New DataTable() + 'DtHorasExtras = New DataTable() End If If continuar AndAlso objNomina.GetPeriodos(-1, UsuarioActual.CveEmpresa, -1, -1, CvePeriodo) AndAlso objNomina.DtResultados.Rows().Count > 0 Then Dim DrPeriodo As DataRow = objNomina.DtResultados.Rows(0) @@ -350,14 +350,32 @@ Public Class LogicNominas .ImporteGravado = Row("ImporteGravado").ToString().ToDecimal(), .ImporteExento = Row("ImporteExento").ToString().ToDecimal()}) End If 'RMF, falta poner el numero de horas pagadas - If Row("SATCveConcepto").ToString().ToEntero() = 19 AndAlso DtHorasExtras IsNot Nothing Then 'cuando son horas extras + If Row("SATCveConcepto").ToString().ToEntero() = 19 Then 'cuando son horas extras 'Obtengo el desglose de horas extras - Dim dr As DataRow = DtHorasExtras.FiltroPrimero("") - If dr IsNot Nothing Then - If dr("HorasDobles").ToString().ToDouble > 0 And Row("CveSistema").ToString().ToEntero() = 12 Then ObjHorasExtras.Add(New CFDINominaHorasExtras With {.Dias = dr("DiasHorasDobles").ToString().ToEntero().ToString(), .TipoHoras = "01", .HorasExtra = dr("HorasDobles").ToString().ToEntero(), .ImportePagado = Row("Importe").ToString().ToDecimal}) - If dr("HorasTriples").ToString().ToDouble > 0 And Row("CveSistema").ToString().ToEntero() = 13 Then ObjHorasExtras.Add(New CFDINominaHorasExtras With {.Dias = dr("DiasHorasTriples").ToString().ToEntero().ToString(), .TipoHoras = "02", .HorasExtra = dr("HorasTriples").ToString().ToEntero(), .ImportePagado = Row("Importe").ToString().ToDecimal}) + 'Dim dr As DataRow = DtHorasExtras.FiltroPrimero("") + 'If dr IsNot Nothing Then + ' If dr("HorasDobles").ToString().ToDouble > 0 And Row("CveSistema").ToString().ToEntero() = 12 Then + ' ObjHorasExtras.Add(New CFDINominaHorasExtras With {.Dias = dr("DiasHorasDobles").ToString().ToEntero().ToString(), + ' .TipoHoras = "01", .HorasExtra = dr("HorasDobles").ToString().ToEntero(), .ImportePagado = Row("Importe").ToString().ToDecimal()}) + ' End If + ' If dr("HorasTriples").ToString().ToDouble > 0 And Row("CveSistema").ToString().ToEntero() = 13 Then + ' ObjHorasExtras.Add(New CFDINominaHorasExtras With {.Dias = dr("DiasHorasTriples").ToString().ToEntero().ToString(), + ' .TipoHoras = "02", .HorasExtra = dr("HorasTriples").ToString().ToEntero(), .ImportePagado = Row("Importe").ToString().ToDecimal}) + ' End If + 'End If + Dim horasextra As Integer = If(Row("ImporteValor").ToString().Replace("-", "").ToEntero() > 0, Row("ImporteValor").ToString().Replace("-", "").ToEntero(), 1) + + Dim diasextra As Integer = (horasextra / 3).ToString().ToEntero() + If Row("CveSistema").ToString().ToEntero() = 12 Then + ObjHorasExtras.Add(New CFDINominaHorasExtras With {.Dias = diasextra.ToString(), + .TipoHoras = "01", .HorasExtra = horasextra, .ImportePagado = Row("Importe").ToString().ToDecimal()}) End If + If Row("CveSistema").ToString().ToEntero() = 13 Then + ObjHorasExtras.Add(New CFDINominaHorasExtras With {.Dias = diasextra.ToString(), + .TipoHoras = "02", .HorasExtra = horasextra, .ImportePagado = Row("Importe").ToString().ToDecimal}) + End If + End If 'subsidio al empleo If Row("SATCveConcepto").ToString().ToEntero().ToEntero() = 17 AndAlso Row("Importe").ToString().ToDecimal > 0 Then 'Subsidio diff --git a/Nomina/Nomina.aspx b/Nomina/Nomina.aspx index 736b74e64..2fb2225db 100644 --- a/Nomina/Nomina.aspx +++ b/Nomina/Nomina.aspx @@ -774,6 +774,9 @@
    +
    +
    +
    diff --git a/Nomina/Nomina.aspx.cs b/Nomina/Nomina.aspx.cs index e68a5393f..ec6bea2a6 100644 --- a/Nomina/Nomina.aspx.cs +++ b/Nomina/Nomina.aspx.cs @@ -7082,6 +7082,11 @@ public partial class Nomina_Nomina2 : ClsPaginas } } + + if (chkAistenciaRecalcular.Checked) + { + cargaDatos(true); + } } protected void btnasis_Click(object sender, EventArgs e) From 4e0bf2629ff66bf23aa4a20c0eab40292af219fc Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 12 May 2023 19:41:31 -0700 Subject: [PATCH 20/24] -- parametro empresa para indidencias --- App_Code/ClsRH.vb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/App_Code/ClsRH.vb b/App_Code/ClsRH.vb index ee95fedd3..03d71dc26 100644 --- a/App_Code/ClsRH.vb +++ b/App_Code/ClsRH.vb @@ -314,11 +314,13 @@ Public Class ClsRH #End Region #Region "ClsRHAsistenciasInasistencias" - Public Function GetAsistenciasInasistencias() As Boolean + Public Function GetAsistenciasInasistencias(CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_RH_AsistenciasInasistenciasGet") - + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With Try SqlAdapter.Fill(Data) Retorno = True From 8663069c8549b661b5592009542080f37dba5a87 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 12 May 2023 19:43:21 -0700 Subject: [PATCH 21/24] =?UTF-8?q?--=20recepc=C3=B3n=20-=20columnas=20obser?= =?UTF-8?q?vaciones?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Inventarios/TraspasoAlmacen.aspx | 42 +++++++++-------------------- Inventarios/TraspasoAlmacen.aspx.vb | 11 +++----- 2 files changed, 17 insertions(+), 36 deletions(-) diff --git a/Inventarios/TraspasoAlmacen.aspx b/Inventarios/TraspasoAlmacen.aspx index 74565624e..4943e8b9c 100644 --- a/Inventarios/TraspasoAlmacen.aspx +++ b/Inventarios/TraspasoAlmacen.aspx @@ -615,30 +615,17 @@
    - - - + - - -
    - + +
        -
    - - - - -
    - - - - +
    +
    -
    - + @@ -679,25 +666,22 @@ - - <%-- - - --%> + - + - - - - - <%----%> + + + + + diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb index 11e1f5e05..716fcf3c0 100644 --- a/Inventarios/TraspasoAlmacen.aspx.vb +++ b/Inventarios/TraspasoAlmacen.aspx.vb @@ -1491,16 +1491,14 @@ Partial Class Inventarios_TraspasoAlmacen End If CveAlmacenDestino = DdlAlmacenRecepcion.SelectedValue.ToEntero - 'CveUsuarioResponsable = DdlResponsableRecepcion.SelectedValue.ToEntero - GvDatosRecepcion.DataSource = Dtt GvDatosRecepcion.DataBind() 'GvDatosRecepcion.Columns(6).Visible = Dtt.MAX("Serie") <> "" - GvDatosRecepcion.Columns(6).Visible = Dtt.MAX("AplicaSerie") = "True" - GvDatosRecepcion.Columns(7).Visible = Dtt.MAX("AplicaLote").ToEntero > 0 'Dtt.MAX("Lote") <> "" - GvDatosRecepcion.Columns(8).Visible = Dtt.MAX("AplicaCaducidad").ToEntero > 0 'Dtt.MAX("FechaCaducidad").ToDate > MinFecha - GvDatosRecepcion.Columns(9).Visible = Dtt.MAX("CveSeccionAlmacen").ToEntero > 0 + GvDatosRecepcion.Columns(7).Visible = Dtt.MAX("AplicaSerie") = "True" + GvDatosRecepcion.Columns(8).Visible = Dtt.MAX("AplicaLote").ToEntero > 0 'Dtt.MAX("Lote") <> "" + GvDatosRecepcion.Columns(9).Visible = Dtt.MAX("AplicaCaducidad").ToEntero > 0 'Dtt.MAX("FechaCaducidad").ToDate > MinFecha + GvDatosRecepcion.Columns(10).Visible = Dtt.MAX("CveSeccionAlmacen").ToEntero > 0 'Dt.Dispose() End If @@ -1517,7 +1515,6 @@ Partial Class Inventarios_TraspasoAlmacen DivRealizarDevolucion.Visible = True End If - If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then HplImprimirRecepcion.Visible = True HplImprimirRecepcion.NavigateUrl = $"/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=Alm&CveMovimiento={CveMovimientoTraspaso}&EsTransitorio=True&CveAlmacenRecepcion={DdlAlmacenRecepcion.SelectedValue.ToEntero}&CveAlmacenTransitorioRecepcion={DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero}&FolioBusquedaTrasitorio={FolioBusqueda}")}" From 69b2a7af7471609263f5dce971a12c15e6d374e9 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 13 May 2023 12:46:37 -0700 Subject: [PATCH 22/24] -- cambio en globaldtAsistencias, parametro cveempresa --- App_Code/ClsPaginas.vb | 15 +++-- RH/Asistencias.aspx | 79 ++++++++++++-------------- RH/Asistencias.aspx.vb | 23 ++++---- RH/CatAsistenciasInasistencias.aspx.vb | 11 ++-- RH/ListaAsistenciaRH.aspx.vb | 4 +- RH/RepChecadorPreAsistencia.aspx | 2 +- RH/RepChecadorPreAsistencia.aspx.vb | 18 +++--- 7 files changed, 71 insertions(+), 81 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 908445a59..4816e439d 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -3537,19 +3537,18 @@ Public Class ClsPaginas Application(AppNombre) = value End Set End Property - Property GlobalDTAsistenciasInasistencias() As DataTable + Property GlobalDTAsistenciasInasistencias(CveEmpresa As Integer) As DataTable Get - Dim AppNombre As String = "GlobalDTAsistenciasInasistencias" - 'sino existe, recarga los datos + Dim AppNombre As String = $"GlobalDTAsistenciasInasistencias-{CveEmpresa}" If Application(AppNombre) Is Nothing Then Dim ObjPersonal As New ClsRH - If ObjPersonal.GetAsistenciasInasistencias() Then Application(AppNombre) = ObjPersonal.DtResultados + If ObjPersonal.GetAsistenciasInasistencias(CveEmpresa) Then Application(AppNombre) = ObjPersonal.DtResultados ObjPersonal.Dispose() End If GlobalDTAsistenciasInasistencias = DirectCast(Application(AppNombre), DataTable) End Get Set(value As DataTable) - Dim AppNombre As String = "GlobalDTAsistenciasInasistencias" + Dim AppNombre As String = $"GlobalDTAsistenciasInasistencias-{CveEmpresa}" Application(AppNombre) = value End Set End Property @@ -8231,12 +8230,12 @@ Public Class ClsPaginas If Pago.CveMonedaPago > 1 Then 'Agregamos la Extranjera - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, 295, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteAnticipoExtranjera, CveVenta:=Pago.CveVentaAmortizacion, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, 295, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteAnticipoExtranjera, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, ImporteMN, 227, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteAnticipoComplementaria, CveVenta:=Pago.CveVentaAmortizacion, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, ImporteMN, 227, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteAnticipoComplementaria, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True Else 'Agregamos Nacional - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, 3, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteAnticipo, CveVenta:=Pago.CveVentaAmortizacion, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, 3, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteAnticipo, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago) Then ErrorMovtos = True End If If Not ErrorMovtos AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 95, VentaActual.SerieFolio, VentaActual.SerieFolio, IdCtaContable, CveIE:=Pago.CveIE, CveVenta:=VentaActual.CveVenta, CveSubProyecto:=VentaActual.CveSubProyecto, CveCliente:=VentaActual.CveCliente, TipoCambio:=TCValuacionVenta, TipoCambioPago:=Pago.TCPago, PorcentajeImpuesto:=VentaActual.PorcentajeIVA, Contabilizable:=False) Then diff --git a/RH/Asistencias.aspx b/RH/Asistencias.aspx index c22c41f78..4aae019e5 100644 --- a/RH/Asistencias.aspx +++ b/RH/Asistencias.aspx @@ -98,70 +98,65 @@ -
    - - - - -
    + - + - + N° - + Personal - - + Cliente - + - - - + Asistencia - + - + % de Pago - + Hrs Dobles - + Hrs Triples - + Motivo H. Extras - + Obs. - + @@ -171,35 +166,31 @@
    + + + + + + + + + + + + + + + + + + + +
    # Notación
    1  Sin registrar asistencia
    2  Se registró asistencia
    3  Se registró asistencia y fue modificada
    -
    - - - - - - - - - - - - - - - - - - - -
    # Notación
    1  Sin registrar asistencia
    2  Se registró asistencia
    3  Se registró asistencia y fue modificada
    -
    +