From f1b600842405796a1b5c50631a2e050a0c48aafc Mon Sep 17 00:00:00 2001 From: Rene Molina Date: Sun, 9 Feb 2020 16:24:40 -0700 Subject: [PATCH 01/25] foliopoliza --- Ventas/ClientesAbonar.aspx.vb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index a6a8b87f1..8f01ade50 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -2793,7 +2793,7 @@ Partial Class Ventas_ClientesAbonar 'CANCELA IE If Not ErrorCancelar Then - If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIESustitucion, True, IdPolizaNueva, TxtFechaDocumento.Text.ToDate) Then + If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIESustitucion, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaDocumento.Text.ToDate) Then ErrorCancelar = True End If End If @@ -2820,7 +2820,7 @@ Partial Class Ventas_ClientesAbonar 'CANCELA IE If Not ErrorCancelar Then - If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIESustitucion, False, IdPolizaNueva, TxtFechaDocumento.Text.ToDate) Then + If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIESustitucion, False, IdPolizaNueva, FolioPolizaNueva, TxtFechaDocumento.Text.ToDate) Then ErrorCancelar = True End If End If @@ -2833,12 +2833,12 @@ Partial Class Ventas_ClientesAbonar If FechaCorteIE.Month < TxtFechaDocumento.Text.ToDate.Month Or FechaCorteIE.Year < TxtFechaDocumento.Text.ToDate.Year Then 'CANCELA IE MES ANTERIOR - If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIESustitucion, True, IdPolizaNueva, TxtFechaDocumento.Text.ToDate) Then + If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIESustitucion, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaDocumento.Text.ToDate) Then ErrorCancelar = True End If Else 'CANCELA IE MES ACTUAL - If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIESustitucion, False, IdPolizaNueva, TxtFechaDocumento.Text.ToDate) Then + If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIESustitucion, False, IdPolizaNueva, FolioPolizaNueva, TxtFechaDocumento.Text.ToDate) Then ErrorCancelar = True End If End If From 2f6944facd09628a29135114bf4d641ee4428000 Mon Sep 17 00:00:00 2001 From: Rene Molina Date: Mon, 10 Feb 2020 16:04:23 -0700 Subject: [PATCH 02/25] - liga servidor --- App_Code/ClsContPAQi.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/App_Code/ClsContPAQi.vb b/App_Code/ClsContPAQi.vb index 0c1a2d1b9..860bd5889 100644 --- a/App_Code/ClsContPAQi.vb +++ b/App_Code/ClsContPAQi.vb @@ -1074,7 +1074,7 @@ Public Class ClsContPAQi StrSQL.AppendLine(" INNER JOIN Polizas p ON mp.IdPoliza = p.Id ") StrSQL.AppendLine(" INNER JOIN Cuentas c ON c.Id = mp.IdCuenta ") StrSQL.AppendLine(" INNER JOIN TiposPolizas t ON mp.TipoPol = t.Codigo ") - StrSQL.AppendLine(" LEFT JOIN SIG_Resp_OIC.dbo.Usuarios U ON U.CveUsuario = P.IdUsuario ") + StrSQL.AppendLine(" LEFT JOIN SERVIDOR.Ventas.dbo.Usuarios U ON U.CveUsuario = P.IdUsuario ") StrSQL.AppendLine(" LEFT JOIN SegmentosNegocio s ON mp.IdSegNeg = s.id ") StrSQL.AppendLine(" WHERE (@IdPoliza = -1 OR mp.IdPoliza = @IdPoliza) ") StrSQL.AppendLine(" AND (@Eje = -1 OR mp.Ejercicio = @Eje) ") From 526207d0c5e4edf9eab1601dd9e164b350c83e0e Mon Sep 17 00:00:00 2001 From: Rene Molina Date: Mon, 17 Feb 2020 10:25:15 -0700 Subject: [PATCH 03/25] - traspasos, cambios en prepolizas e importemn --- Inventarios/TraspasoAlmacen.aspx.vb | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb index 3f4a50835..d206c81a1 100644 --- a/Inventarios/TraspasoAlmacen.aspx.vb +++ b/Inventarios/TraspasoAlmacen.aspx.vb @@ -907,9 +907,11 @@ Partial Class Inventarios_TraspasoAlmacen ErrorMovInv = True End If End If + Dim Concepto As String = TxtObservaciones.Text + If Concepto = "" Then Concepto = "Traspaso" 'AGREGAMOS PREPOLIZAS TRASPASO DIRECTO: If Not ErrorMovInv Then - Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/TraspasoAlmacen", 53, 0, 0, 1, Fecha, TxtObservaciones.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/TraspasoAlmacen", 53, 0, 0, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then Dim resultado As DataTable = ObjInventario.DtResultados @@ -920,11 +922,11 @@ Partial Class Inventarios_TraspasoAlmacen If IdCtaContableSalida = IdCtaContableEntrada Then Contabilizable = False - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContableSalida, -1, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=Contabilizable) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContableSalida, -1, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=Contabilizable, ImporteMX:=importe) Then ErrorMovInv = True End If - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContableEntrada, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, Contabilizable:=Contabilizable) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContableEntrada, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, Contabilizable:=Contabilizable, ImporteMX:=importe) Then ErrorMovInv = True End If End If @@ -932,18 +934,20 @@ Partial Class Inventarios_TraspasoAlmacen End If Else If Not ErrorMovInv Then - Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/TraspasoAlmacen", 53, 0, 0, 1, Fecha, TxtObservaciones.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + Dim Concepto As String = TxtObservaciones.Text + If Concepto = "" Then Concepto = "Traspaso" + Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/TraspasoAlmacen", 53, 0, 0, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then Dim resultado As DataTable = ObjInventario.DtResultados Dim importe As Decimal = resultado.SUM("Total").ToDecimal Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorio.SelectedValue.ToEntero)).ToEntero - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=importe, Contabilizable:=False) Then ErrorMovInv = True End If - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, 289, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 289, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=importe, Contabilizable:=False) Then ErrorMovInv = True End If End If @@ -1668,18 +1672,20 @@ Partial Class Inventarios_TraspasoAlmacen Cont += 1 Next If Not ErrorMovInv Then - Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/TraspasoAlmacen", 53, 0, 0, 1, Fecha, TxtObservacionesRecepcion.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + Dim Concepto As String = TxtObservacionesRecepcion.Text + If Concepto = "" Then Concepto = "Recepción Traspaso" + Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/TraspasoAlmacen", 53, 0, 0, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then Dim resultado As DataTable = ObjInventario.DtResultados Dim importe As Decimal = resultado.SUM("Total").ToDecimal Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero)).ToEntero - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 289, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, 289, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=importe, Contabilizable:=False) Then ErrorMovInv = True End If - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=importe, Contabilizable:=False) Then ErrorMovInv = True End If End If From a77f16989224dfc0983327f2e7ea2e2544b4152f Mon Sep 17 00:00:00 2001 From: Rene Molina Date: Mon, 17 Feb 2020 10:26:12 -0700 Subject: [PATCH 04/25] - varios de global - clientes abonar. funcionalidad --- Ventas/CatUnidadesMedida.aspx.vb | 6 +++--- Ventas/ClientesAbonar.aspx.vb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Ventas/CatUnidadesMedida.aspx.vb b/Ventas/CatUnidadesMedida.aspx.vb index 6f6318edc..259a38460 100644 --- a/Ventas/CatUnidadesMedida.aspx.vb +++ b/Ventas/CatUnidadesMedida.aspx.vb @@ -51,7 +51,7 @@ Partial Class CatUnidadesMedida TxtAlias.Text = "" Alert("El nueva Alias Unidad de Medida se guardó correctamente.", TipoMensaje.MsgInformacion) UpDatosAlias.Update() - GlobalDTUnidadesMedidaAlias = ObjUnidadesMedida.DtResultados + GlobalDTUnidadesMedidaAlias(UsuarioActual.CveEmpresa) = Nothing ViewState("DTUnidadesMedidaAlias") = ObjUnidadesMedida.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa).FiltraParametros("CveUnidadMedida = " & cve) End If CargaGridAlias() @@ -281,7 +281,7 @@ Partial Class CatUnidadesMedida TxtAbreviatura.Text = "" Alert("La nueva Unidad de Medida se guardó correctamente.", TipoMensaje.MsgInformacion) UpAddUnidadMedida.Update() - GlobalDTUnidadesMedida = ObjUnidadesMedida.DtResultados + GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa) = Nothing ViewState("DTUnidadesMedida") = ObjUnidadesMedida.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) If ViewState("Orden").ToString() <> String.Empty Then CargaGrid() @@ -344,7 +344,7 @@ Partial Class CatUnidadesMedida UpDatos.Update() If ObjUnidadesMedida.RemoveUnidadMedida(HdnID.Value.ToEntero) Then GvDatos.EditIndex = -1 - GlobalDTUnidadesMedida = ObjUnidadesMedida.DtResultados + GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa) = Nothing ViewState("DTUnidadesMedida") = ObjUnidadesMedida.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) Alert("La Unidad de Medida se eliminó correctamente.", TipoMensaje.MsgInformacion) End If diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index 8f01ade50..e6545ee13 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -2492,7 +2492,7 @@ Partial Class Ventas_ClientesAbonar If CveConceptoDeduccion = 255 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.Funcionalidad(266).ToEntero If CveConceptoDeduccion = 211 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.Funcionalidad(559).ToEntero If CveConceptoDeduccion = 263 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.Funcionalidad(537).ToEntero - If CveConceptoDeduccion = 252 Then IdCuentaContableNoDeducible = 0 + If CveConceptoDeduccion = 252 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.Funcionalidad(581).ToEntero If CveConceptoDeduccion = 78 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.IdCuentaOtrosIngresos If UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122) Then From ce90f26df25f349735ae504820d4deda9b1744ff Mon Sep 17 00:00:00 2001 From: Rene Molina Date: Mon, 17 Feb 2020 10:26:49 -0700 Subject: [PATCH 05/25] - redondeo iva y pago personal --- Bancos/PopIECompras.aspx.vb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Bancos/PopIECompras.aspx.vb b/Bancos/PopIECompras.aspx.vb index 1ce79752d..83386cb47 100644 --- a/Bancos/PopIECompras.aspx.vb +++ b/Bancos/PopIECompras.aspx.vb @@ -617,8 +617,8 @@ Partial Class Bancos_PopIECompras MovimientoPagar = New IEMovimiento MovimientoPagar.SubTotal = dr("SubTotal").ToString.ToDecimal MovimientoPagar.IVA = dr("IVA").ToString.ToDecimal - MovimientoPagar.IVADeducible = dr("IVADeducible").ToString.ToDecimal - MovimientoPagar.IVANoDeducible = dr("IVANoDeducible").ToString.ToDecimal + MovimientoPagar.IVADeducible = dr("IVADeducible").ToString.ToDecimal.RoundSQL + MovimientoPagar.IVANoDeducible = dr("IVANoDeducible").ToString.ToDecimal.RoundSQL MovimientoPagar.RetIVA = dr("RetIVA").ToString.ToDecimal MovimientoPagar.RetISR = dr("RetISR").ToString.ToDecimal MovimientoPagar.Total = dr("Total").ToString.ToDecimal @@ -2280,7 +2280,7 @@ Partial Class Bancos_PopIECompras Else If CveMoneda = 1 AndAlso CveMonedaCompra = 1 Then - ImporteMovimiento = MovimientoPagar.IVADeducible * PorcentajePago + ImporteMovimiento = (MovimientoPagar.IVADeducible * PorcentajePago).RoundSQL ImporteMX = ImporteMovimiento ElseIf CveMoneda = 1 AndAlso CveMonedaCompra = 2 Then ImporteMovimiento = (MovimientoPagar.IVADeducible * PorcentajePago) @@ -2675,6 +2675,8 @@ Partial Class Bancos_PopIECompras ImporteMovimiento = Math.Round(ImporteMovimiento, 2) ImporteMX = Math.Round(ImporteMX, 2) TimpocambioGeneral = tipoCambioPago + IdCtaContable = GlobalDTRHPersonal(UsuarioActual.CveEmpresa, CvePersonal:=CvePersonal).FiltroPrimeroValor("IdCtaContPersonal", "").ToEntero + Else ImporteMovimiento = 0 End If @@ -3146,7 +3148,7 @@ Partial Class Bancos_PopIECompras If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 5) Then If ObjMov.ValorPolizaDescuadre > 0 Then - 'MsgError = ObjMov.MensajePolizaDescuadre + MsgError = ObjMov.MensajePolizaDescuadre GuardaLogAD($"Bancos/PopIECompras | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") End If End If From e77832c237254841101217859ae4f0b1744b1717 Mon Sep 17 00:00:00 2001 From: Rene Molina Date: Mon, 17 Feb 2020 10:27:18 -0700 Subject: [PATCH 06/25] -textos modulos prepolizas --- Compras/ReembolsosComprobaciones.aspx.vb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb index a630bed96..b8638b6db 100644 --- a/Compras/ReembolsosComprobaciones.aspx.vb +++ b/Compras/ReembolsosComprobaciones.aspx.vb @@ -424,7 +424,7 @@ Partial Class Compras_ReembolsosComprobaciones If UsuarioActual.CveEmpresa.Contiene(119) Then - CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones", 9, TxtImporteVinculado.Text.ToDecimal, TxtImporteVinculado.Text.ToDecimal, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + 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 If ObjMov.GetRetCuenta(30, CveCajaChica) Then @@ -448,7 +448,7 @@ Partial Class Compras_ReembolsosComprobaciones Else If drp IsNot Nothing Then If drp("IdPoliza").ToString.ToEntero > 0 Then - CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones", 9, TxtImporteVinculado.Text.ToDecimal, TxtImporteVinculado.Text.ToDecimal, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones2", 9, TxtImporteVinculado.Text.ToDecimal, TxtImporteVinculado.Text.ToDecimal, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) IdPoliza = drp("IdPoliza").ToString.ToEntero Else CvePrePolizaIERegistrado = drp("CvePrePoliza").ToString.ToEntero @@ -464,14 +464,14 @@ Partial Class Compras_ReembolsosComprobaciones End If If ChkChequeExcedente.Checked Then - CvePrePolizaExcedente = ObjMov.AddPrePolizas("Compras/Comprobaciones", 9, TxtImporte.Text.ToDecimal, TxtImporte.Text.ToDecimal, CveMoneda, TxtFechaDocumento.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + CvePrePolizaExcedente = ObjMov.AddPrePolizas("Compras/Comprobaciones3", 9, TxtImporte.Text.ToDecimal, TxtImporte.Text.ToDecimal, CveMoneda, TxtFechaDocumento.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) CveIEExcedente = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.ToDate, TxtFolio.Text.Trim, TxtAboneA.Text, TxtImporte.Text.ToDecimal, CveMoneda, 0.0, TxtObservaciones.Text, "", ChkAbonoCuenta.Checked, True, -1, CvePrePolizaExcedente, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked, True, False)) If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, True, TxtImporte.Text.ToDecimal, TxtObservaciones.Text, If(CveCajaChica > 0, 30, 29), TxtObservaciones.Text, TxtFechaDocumento.Text.ToDate, If(CveCajaChica > 0, IdCuentaBancaria, IdCtaPersonal), -1, CveIE:=CveIEExcedente, CvePersonal:=CvePersonal, CveCompra:=-1, CveProveedor:=-1, ImporteME:=If(tipoCambio = 1, 0, TxtImporte.Text.ToDecimal), ImporteMX:=TxtImporte.Text.ToDecimal * tipoCambio) Then MsgError = "Error al registrar detalle de concepto bancario" End If End If ElseIf Not ChkReembolsarSinBancos.Checked Then - CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones", 9, TxtImporte.Text.ToDecimal, TxtImporte.Text.ToDecimal, CveMoneda, TxtFechaDocumento.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones4", 9, TxtImporte.Text.ToDecimal, TxtImporte.Text.ToDecimal, CveMoneda, TxtFechaDocumento.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) CveIERegistrado = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.ToDate, TxtFolio.Text.Trim, TxtAboneA.Text, TxtImporte.Text.ToDecimal, CveMoneda, 0.0, TxtObservaciones.Text, "", ChkAbonoCuenta.Checked, True, -1, CvePrePolizaIERegistrado, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked, True, False)) 'AGREGO PREPOLIZA IE BANCOS @@ -506,7 +506,7 @@ Partial Class Compras_ReembolsosComprobaciones End If Else - CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones", 9, TxtImporte.Text.ToDecimal, TxtImporte.Text.ToDecimal, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones5", 9, TxtImporte.Text.ToDecimal, TxtImporte.Text.ToDecimal, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) 'SI ES CAJA CHICA REGISTRO IE CAJA CHICA If CveCajaChica > 0 Then @@ -635,7 +635,7 @@ Partial Class Compras_ReembolsosComprobaciones CvePrePolizaPago = CvePrePolizaIERegistrado 'SE USARA PARA PODER ELIMINAR UNA COMPROBACION - CvePrePolizaPagoOriginal = ObjMov.AddPrePolizas("Compras/Comprobaciones", 9, ImporteMovto, ImporteMovto, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", $"Compra: { gvr.DataKey("SerieFolio").ToString }", TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + CvePrePolizaPagoOriginal = ObjMov.AddPrePolizas("Compras/Comprobaciones6", 9, ImporteMovto, ImporteMovto, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", $"Compra: { gvr.DataKey("SerieFolio").ToString }", TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) 'registramos el nuevo IE @@ -979,7 +979,7 @@ Partial Class Compras_ReembolsosComprobaciones ImporteMovto = ImportePagar If ImportePagar = ImporteOriginal Then - CvePrePolizaPago = ObjMov.AddPrePolizas("Compras/Comprobaciones", 9, ImporteMovto, ImporteMovto, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", $"Compra: { gvr.DataKey("SerieFolio").ToString }", TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + CvePrePolizaPago = ObjMov.AddPrePolizas("Compras/Comprobaciones7", 9, ImporteMovto, ImporteMovto, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", $"Compra: { gvr.DataKey("SerieFolio").ToString }", TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) 'registramos el nuevo IE If CveCajaChica > 0 Then CveIEPago = 0 From 7f0ad74b505ca230d1caf821a9e199d6becb7a53 Mon Sep 17 00:00:00 2001 From: Rene Molina Date: Mon, 17 Feb 2020 13:26:48 -0700 Subject: [PATCH 07/25] -- vinculacion con anticipos, sobre descuentos --- Compras/Compras.aspx.vb | 87 ++++++++++++++++++++++++++--------------- 1 file changed, 55 insertions(+), 32 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 14fe93b5f..9bda25dce 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1406,6 +1406,10 @@ Partial Class Compras_Compras 'SI ES UNA COMPRA NUEVA SE PONE EL TOTAL, SI NO EL SALDO LblSaldoFactura.Text = If(CveCompra > 0, Saldo.FormatoNumero, TxtTotal.Text.FormatoNumero) + 'cuando es factura con amortizacion, el importe a descontar es el saldo que se debe de aplicar para la amortizacion + If ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 Then + LblSaldoFactura.Text = TmpDT.SUMD("Descuento").ToString + End If If UsuarioActual.CveEmpresa = 126 And CveCompra > 0 Then @@ -4402,12 +4406,19 @@ Partial Class Compras_Compras CveEstatusFactura = 6 End If 'hay amortización directa como descuento. RMF Temporal - If UsuarioActual.CveEmpresa = 119 Then - If LblAmortizacion.Text.ToDouble > 0 AndAlso TxtDescuento.Text.ToDouble = 0 Then - TxtDescuento.Text = LblAmortizacion.Text - LblAmortizacion.Text = "0.00" - End If - End If + 'If UsuarioActual.CveEmpresa = 119 Then + ' If LblAmortizacion.Text.ToDouble > 0 AndAlso TxtDescuento.Text.ToDouble = 0 Then + ' TxtDescuento.Text = LblAmortizacion.Text + ' LblAmortizacion.Text = "0.00" + ' End If + + ' 'o si el descuento es igual a la amortizacion + ' If LblAmortizacion.Text.ToDouble = TxtDescuento.Text.ToDouble Then + ' TxtDescuento.Text = LblAmortizacion.Text + ' LblAmortizacion.Text = "0.00" + ' End If + + 'End If 'Compra If ObjCompras.AddCompra(DdlTipoComprobante.SelectedValue, TxtDescripcion.Text.Trim, TxtSerie.Text.Trim, TxtFolio.Text.Trim, TxtFolioSecundario.Text.Trim, CveProveedor, TxtSubTotal.Text.ToDouble, TxtDescuento.Text.ToDouble, @@ -5854,11 +5865,6 @@ Partial Class Compras_Compras End If - If UsuarioActual.Empresa.Funcionalidad(577).ToEntero = 1 Then - IdCtaContable = UsuarioActual.Empresa.Funcionalidad(578).ToEntero - End If - - 'Agregamos el Opuesto del 22 -> 15 If importeMovimiento <> 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 15, Concepto + If(tipoCambioActual > 1, $" TC: {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then @@ -6175,17 +6181,16 @@ Partial Class Compras_Compras Else importeMovimiento = 0 End If - Case 285 'Perdida - - - If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then - If ObjConta.DtResultados.Rows.Count > 0 Then - IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero - CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero - End If - End If + Case 285 'Ret IVA 6% Servicios + IdCtaContable = UsuarioActual.Empresa.Funcionalidad(578).ToEntero + 'If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then + ' If ObjConta.DtResultados.Rows.Count > 0 Then + ' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero + ' CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero + ' End If + 'End If If DdlRetIVAConcepto.SelectedValue.ToEntero = 5 Then @@ -6203,8 +6208,6 @@ Partial Class Compras_Compras End If - - Case 6 'Compra Dim AgregaMercanciaInventario As Boolean = UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119) AndAlso UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1" @@ -8119,9 +8122,11 @@ Partial Class Compras_Compras Contador += 1 'If gvr.DataKey("Fecha").ToDate > Fecha Then Fecha = gvr.DataKey("Fecha").ToDate 'guardo la fecha mayor Importe += gvr.FCTextBox("TxtAnticipo").Text.ToDouble - If Math.Round(Importe, 2) - Math.Round(CompraSaldo, 2) > 0.01 Then gvr.FCTextBox("TxtAnticipo").Text = "" : gvr.FCCheckBox("Chk").Checked = False + If Math.Round(Importe, 2) - Math.Round(CompraSaldo, 2) > 0.01 Then gvr.FCTextBox("TxtAnticipo").Text = "" : gvr.FCCheckBox("Chk").Checked = False + End If - Next + Next + Else Contador = 1 End If @@ -9056,6 +9061,11 @@ Partial Class Compras_Compras End If LblAmortizacion.Text = ImporteAnticipo.FormatoNumero + TxtDescuento.Text = "0.00" + 'limpia los descuentos + For Each dr As DataRow In TmpDT.Rows + dr("Descuento") = 0.00 + Next UpPS.Update() End If RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAnticipos")) @@ -10102,7 +10112,7 @@ Partial Class Compras_Compras Dim nodeDocumentosRelacionados As XmlNodeList = XMLDoc.SelectNodes(String.Format("//{0}:CfdiRelacionado", Prefijo), namespaces) For Each documento As XmlNode In nodeDocumentosRelacionados If documento.Attributes("UUID").Value <> "" Then - 'ListaDocumentos.Add(documento.Attributes("UUID").Value) + ListaDocumentos.Add(documento.Attributes("UUID").Value) End If Next End If @@ -10273,9 +10283,10 @@ Partial Class Compras_Compras Else If e.Row.DBCampo("Saldo").ToDouble < 0 Then e.Row.Cells(3).ForeColor = Drawing.Color.Red If e.Row.DBCampo("Saldo").ToDouble = 0 Then e.Row.FCLiteral("LtlAnticipos").Text = "" + Dim ImporteAmortizacion As Decimal = If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0, TmpDT.SUMD("ImporteConImpuestos"), TxtTotal.Text.ToDecimal) - e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("chkAnt(this,{0},{1},{2});", e.Row.FCTextBox("TxtAnticipo").ClientID, e.Row.DBCampo("Saldo"), If(CveCompra > 0, Saldo, If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, TmpDT.SUMD("ImporteConImpuestos"), TxtTotal.Text.ToDouble)), e.Row.DBCampo("CveMoneda").ToEntero, If(Not e.Row.DBCampo("TCCompra").ToDouble > 1, GlobalTipoCambio(e.Row.DBCampo("Fecha").ToDate), e.Row.DBCampo("TCCompra").ToDouble), DdlMoneda.SelectedValue.ToEntero)) 'SI ES UNA COMPRA NUEVA SE PONE EL TOTAL, SI NO EL SALDO - e.Row.FCTextBox("TxtAnticipo").Attributes.Add("onKeyUp", String.Format("FnCambiaAnt({0},this,{1},{2});", e.Row.FCCheckBox("Chk").ClientID, e.Row.DBCampo("Saldo"), If(CveCompra > 0, Saldo, If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, TmpDT.SUMD("ImporteConImpuestos"), TxtTotal.Text.ToDouble)), e.Row.DBCampo("CveMoneda").ToEntero, If(Not e.Row.DBCampo("TCCompra").ToDouble > 1, GlobalTipoCambio(e.Row.DBCampo("Fecha").ToDate), e.Row.DBCampo("TCCompra").ToDouble), DdlMoneda.SelectedValue.ToEntero)) 'SI ES UNA COMPRA NUEVA SE PONE EL TOTAL, SI NO EL SALDO + e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("chkAnt(this,{0},{1},{2});", e.Row.FCTextBox("TxtAnticipo").ClientID, e.Row.DBCampo("Saldo"), If(CveCompra > 0, Saldo, ImporteAmortizacion), e.Row.DBCampo("CveMoneda").ToEntero, If(Not e.Row.DBCampo("TCCompra").ToDouble > 1, GlobalTipoCambio(e.Row.DBCampo("Fecha").ToDate), e.Row.DBCampo("TCCompra").ToDouble), DdlMoneda.SelectedValue.ToEntero)) 'SI ES UNA COMPRA NUEVA SE PONE EL TOTAL, SI NO EL SALDO + e.Row.FCTextBox("TxtAnticipo").Attributes.Add("onKeyUp", String.Format("FnCambiaAnt({0},this,{1},{2});", e.Row.FCCheckBox("Chk").ClientID, e.Row.DBCampo("Saldo"), If(CveCompra > 0, Saldo, ImporteAmortizacion), e.Row.DBCampo("CveMoneda").ToEntero, If(Not e.Row.DBCampo("TCCompra").ToDouble > 1, GlobalTipoCambio(e.Row.DBCampo("Fecha").ToDate), e.Row.DBCampo("TCCompra").ToDouble), DdlMoneda.SelectedValue.ToEntero)) 'SI ES UNA COMPRA NUEVA SE PONE EL TOTAL, SI NO EL SALDO If ChkNCInv.Checked Then e.Row.FCCheckBox("Chk").CssClass = "ChkAntNC" @@ -10288,6 +10299,8 @@ Partial Class Compras_Compras Entro = True End If Next + 'permite vincular otro folio fiscal. + Entro = True If Not Entro Then e.Row.FCCheckBox("Chk").Enabled = False End If End If @@ -14849,7 +14862,11 @@ Partial Class Compras_Compras 'If DdlOCVinculaInv.SelectedValue.ToEntero = 240 And Not CveImportacion > 0 Then Alert("Necesita vincular una Importación si selecciona Factura de Importación", TipoMensaje.MsgAdvertencia) : Exit Sub Dim SubTotalGV = 0.0D - Dim SubTotalCompra = If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, TmpDT.SUMD("ImporteSinImpuestos"), TmpDT.SUM("Total").ToString.ToDecimal) + Dim Amortizacion As Decimal = TmpDT.SUMD("Total") + If ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 Then + Amortizacion = TmpDT.SUMD("ImporteSinImpuestos") + End If + Dim SubTotalCompra As Decimal = Amortizacion Dim DiferenciaPermitida = 1 Dim Cont = 0 For Each gvr As GridViewRow In GvOC1.Rows @@ -14917,6 +14934,11 @@ Partial Class Compras_Compras TotalRows += 1 End If Next + Dim Amortizacion As Decimal = 0 + Dim TieneAmortizacion As Boolean = False + If ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 Then + TieneAmortizacion = True + End If For Each gvr As GridViewRow In GvOC1.Rows If gvr.FCTextBox("TxtCantidad").Text.ToDecimal > 0 Or VinculacionCompleta Then dr = DTOCGV.Rows(gvr.RowIndex) @@ -14935,8 +14957,9 @@ Partial Class Compras_Compras Dim SubProyecto As String = dr("SubProyecto").ToString Dim Proyecto As String = dr("Proyecto").ToString Dim Obs As String = dr("Obs").ToString - Dim PU As Decimal = gvr.FCTextBox("TxtPU").Text.ToDecimal - Dim Total As Decimal = If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, Math.Round((gvr.FCTextBox("TxtCantidad").Text.ToDecimal * gvr.FCTextBox("TxtPU").Text.ToDecimal) - (TxtDescuento.Text.ToDouble / TotalRows).ToDecimal, 2), gvr.FCTextBox("TxtTotalOC1").Text.ToDecimal) + Dim PU As Decimal = gvr.FCTextBox("TxtPU").Text.ToDecimal + + Dim Total As Decimal = If(TieneAmortizacion, Math.Round((gvr.FCTextBox("TxtCantidad").Text.ToDecimal * gvr.FCTextBox("TxtPU").Text.ToDecimal) - (TxtDescuento.Text.ToDouble / TotalRows).ToDecimal, 2), gvr.FCTextBox("TxtTotalOC1").Text.ToDecimal) 'Dim Total As Decimal = gvr.FCTextBox("TxtTotalOC1").Text.ToDecimal 'Dim IVA As Decimal = gvr.FCHiddenField("HdnOC1IVA").Value.ToDecimal 'Dim RetIVA As Double = gvr.FCHiddenField("HdnOC1RetIVA").Value.ToDecimal @@ -14948,7 +14971,7 @@ Partial Class Compras_Compras Dim RetISR As Double = dr("RetISRPorcentaje").ToString.ToDecimal Dim IEPSPS As Double = dr("IEPSPSPorcentaje").ToString.ToDecimal Dim IEPSPSIVA As Double = dr("IEPSPSIVAPorcentaje").ToString.ToDecimal - Dim Descuento As Double = If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, TxtDescuento.Text.ToDouble / TotalRows, gvr.FCHiddenField("HdnOC1Descuento").Value.ToDecimal) + Dim Descuento As Double = If(TieneAmortizacion, TxtDescuento.Text.ToDouble / TotalRows, gvr.FCHiddenField("HdnOC1Descuento").Value.ToDecimal) 'Dim Descuento As Double = gvr.FCHiddenField("HdnOC1Descuento").Value.ToDecimal Dim CveOrdenCompraDetalle As Integer = dr("CveOrdenCompraDetalle").ToString.ToEntero Dim EntregaDirecta As Integer = dr("EntregaDirecta").ToString.ToEntero @@ -14997,7 +15020,7 @@ Partial Class Compras_Compras AddPS2(False) 'AJUSTE DE REDONDEO O DIFERENCIA PERMITIDA DE IMPORTE - AjustaImporteUltimoConcepto((If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, TmpDT.SUMD("ImporteSinImpuestos"), TxtSubTotal2.Text.ToDouble) + TxtOtrosImpuestos.Text.ToDouble).ToDecimal - If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, TmpDT.SUM("ImporteSinImpuestos").ToString.ToDecimal, TmpDT.SUM("Total").ToString.ToDecimal)) + AjustaImporteUltimoConcepto((If(TieneAmortizacion, TmpDT.SUMD("ImporteSinImpuestos"), TxtSubTotal2.Text.ToDouble) + TxtOtrosImpuestos.Text.ToDouble).ToDecimal - If(TieneAmortizacion, TmpDT.SUM("ImporteSinImpuestos").ToString.ToDecimal, TmpDT.SUM("Total").ToString.ToDecimal)) 'AjustaImporteUltimoConcepto(TxtSubTotal2.Text.ToDecimal + TxtOtrosImpuestos.Text.ToDecimal - (TmpDT.SUM("Total").ToString.ToDecimal)) From 49c8fd3cce56bd6ae028f99298fec5cfd0292ce7 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Tue, 18 Feb 2020 11:48:44 -0700 Subject: [PATCH 08/25] nuevo filtro de busqueda en depositos caja y modificacion a reporte --- App_Code/ClsBancos.vb | 13 +- Bancos/DepositosCaja.aspx | 19 ++- Bancos/DepositosCaja.aspx.vb | 2 +- Empresas/Grales/Formatos/Traslado.rdlc | 221 ++++++++++++++++++++++++- 4 files changed, 244 insertions(+), 11 deletions(-) diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index 8113ab863..4dbde281c 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -3341,11 +3341,11 @@ Public Class ClsBancos End Try Return Retorno - End Function + End Function #End Region - + #Region "PagosCajaChica" - Public Function GetPagosCajaChica(FechaI As String, FechaF As String, CveEmpresa As Integer, CveCuenta As Integer) As Boolean + Public Function GetPagosCajaChica(FechaI As String, FechaF As String, CveEmpresa As Integer, CveCuenta As Integer, Optional TipoPago As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_BancosCajaChicaPagosGet") @@ -3354,6 +3354,7 @@ Public Class ClsBancos .Add("@FechaF", SqlDbType.VarChar).Value = FechaF .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta + .Add("@TipoChequeEfectivo", SqlDbType.Int).Value = TipoPago End With Try @@ -3364,10 +3365,10 @@ Public Class ClsBancos End Try Return Retorno - End Function - + End Function + #End Region - + #Region "ACTIVOS FIJOS" Public Function GetActivosFijosCreditos(CveCredito As Integer, CveActivoFijo As Integer) As Boolean Dim Retorno As Boolean = False diff --git a/Bancos/DepositosCaja.aspx b/Bancos/DepositosCaja.aspx index db3f0d7a9..830a6df54 100644 --- a/Bancos/DepositosCaja.aspx +++ b/Bancos/DepositosCaja.aspx @@ -70,6 +70,15 @@ + +
+ + + + + +
+ @@ -114,7 +123,8 @@ Importe seleccionado: $00.00
- +
+ @@ -141,6 +151,12 @@ + + + + + + @@ -152,6 +168,7 @@ +
diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index 7898c801c..71e9a4b23 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -41,7 +41,7 @@ Partial Class Bancos_DepositosCaja FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1") FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1") - ObjBancos.GetPagosCajaChica(FechaI, FechaF, UsuarioActual.CveEmpresa, DdlCajaChica.SelectedValue.ToEntero) + ObjBancos.GetPagosCajaChica(FechaI, FechaF, UsuarioActual.CveEmpresa, DdlCajaChica.SelectedValue.ToEntero, DdlTipoPago.SelectedValue.ToEntero) GvFacturas.DataSource = ObjBancos.DtResultados ObjBancos.Dispose() diff --git a/Empresas/Grales/Formatos/Traslado.rdlc b/Empresas/Grales/Formatos/Traslado.rdlc index 626b3516a..d94b0fd55 100644 --- a/Empresas/Grales/Formatos/Traslado.rdlc +++ b/Empresas/Grales/Formatos/Traslado.rdlc @@ -490,6 +490,215 @@ + + 0.44125cm + + + + + true + true + + + + + =Sum(Fields!Cantidad.Value) + + + + + + + Textbox20 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + Total Productos + + + + + + + Textbox21 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox23 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox37 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox41 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox42 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + @@ -509,13 +718,19 @@ + + + + + + Before DsInventarios 0.07056cm 0.00711cm - 0.73434cm + 1.17559cm 19.56807cm - 0.42708in + 0.68252in @@ -66,8 +81,8 @@ -
-
+
+
@@ -76,7 +91,7 @@
-
+
@@ -118,10 +133,14 @@
-
- +
+<%-- - + --%> + + + +
From aa269774727cfded324ba4f6c471b0bc99d12b35 Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Tue, 18 Feb 2020 20:12:23 -0700 Subject: [PATCH 11/25] modulos Edoc --- App_Code/ClsPaginas.vb | 6 +++--- App_Code/ClsVentas.vb | 4 ++-- Ventas/RepIngresos.aspx.vb | 6 +++++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index accc6316b..c38c36938 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -4671,9 +4671,9 @@ Public Class ClsPaginas PaginaDict.Add("/PortalProveedor/PortalProveedor.aspx".ToUpper(), 1201) PaginaDict.Add("/Edoc/CatDocumentos.aspx".ToUpper(), 1205) - PaginaDict.Add("/Edoc/CatTipoContratos.aspx".ToUpper(), -1) - PaginaDict.Add("/Edoc/CatDocumentosContratos.aspx".ToUpper(), -1) - PaginaDict.Add("/Edoc/Contratos.aspx".ToUpper(), -1) + PaginaDict.Add("/Edoc/CatTipoContratos.aspx".ToUpper(), 1207) + PaginaDict.Add("/Edoc/CatDocumentosContratos.aspx".ToUpper(), 1208) + PaginaDict.Add("/Edoc/Contratos.aspx".ToUpper(), 1209) 'Portal PaginaDict.Add("/AIMMGM/ConsultaCliente.aspx".ToUpper(), -1) diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index deaf7c5ac..596819afc 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -3914,14 +3914,14 @@ Public Class ClsVentas #End Region - Public Function RepIngresos(CveEmpresa As Integer, FechaInicio As Date, FechaFin As Date, TipoDocto As String, CveSubProyecto As Integer) As Boolean + Public Function RepIngresos(CveEmpresa As Integer, FechaInicio As Date, FechaFin As Date, TipoDocto As String, Cves_Subprotectos As String) As Boolean Dim retorno As Boolean = False DataAdapter("PA_Ventas_RepIngresos", CommandType.StoredProcedure) With SqlAdapter.SelectCommand.Parameters .Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio .Add("@FechaFin", SqlDbType.Date).Value = FechaFin .Add("@TipoDoc", SqlDbType.VarChar).Value = TipoDocto - .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@Cves_Subprotectos", SqlDbType.VarChar).Value = Cves_Subprotectos .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With Try diff --git a/Ventas/RepIngresos.aspx.vb b/Ventas/RepIngresos.aspx.vb index 295e5b6b9..0850d272c 100644 --- a/Ventas/RepIngresos.aspx.vb +++ b/Ventas/RepIngresos.aspx.vb @@ -84,7 +84,11 @@ Partial Class Ventas_RepIngresos Protected Sub CargaRepIngresos(Optional tipoReporte As Integer = -1) Dim ObjRepI As New ClsVentas() - ObjRepI.RepIngresos(UsuarioActual.CveEmpresa, If(RsFechaI = "-1", MinFecha, RsFechaI.ToDate), If(RsFechaF = "-1", MaxFecha, RsFechaF.ToDate), TipoDoc, DdlSubProyecto.SelectedValue.ToEntero) + Dim Cves_Subprotectos As String = If(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM) + + + + ObjRepI.RepIngresos(UsuarioActual.CveEmpresa, If(RsFechaI = "-1", MinFecha, RsFechaI.ToDate), If(RsFechaF = "-1", MaxFecha, RsFechaF.ToDate), TipoDoc, Cves_Subprotectos) GVRepIngresos.DataSource = ObjRepI.DtResultados DtDatos = ObjRepI.DtResultados ObjRepI.Dispose() From 956c9e2299d50cc15747c0c77ce7771d4cded68f Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Wed, 19 Feb 2020 09:30:51 -0700 Subject: [PATCH 12/25] el logo del reporte es buscado como png --- General/CATIEPSxEntidadFed.aspx.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/General/CATIEPSxEntidadFed.aspx.cs b/General/CATIEPSxEntidadFed.aspx.cs index 10798c8c0..23354850a 100644 --- a/General/CATIEPSxEntidadFed.aspx.cs +++ b/General/CATIEPSxEntidadFed.aspx.cs @@ -112,10 +112,13 @@ public partial class General_CATIEPSxEntidadFed : ClsPaginas protected void LnkPDF_Click(object sender, EventArgs e) { List paramList = new List(); - paramList.Add(new ReportParameter("Logo", String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa))); + paramList.Add(new ReportParameter("Logo", String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa))); paramList.Add(new ReportParameter("FechaInicio", TxtIEPSfechaInicio.Text)); paramList.Add(new ReportParameter("FechaFin", TxtIEPSfechaFin.Text)); paramList.Add(new ReportParameter("Agrupador", DdlAgrupador.SelectedValue)); + paramList.Add(new ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)); + paramList.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); + paramList.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString("d/M/yyyy"))); ImprimirPDF("Empresas/Grales/Formatos/CatIepsEntidadFed.rdlc", DtIEPS, paramList,"IEPS por entidades federativa",RDSName:"DsInventarios"); } From d9d67f4734517b91f01b804bb7f164982f3b3bb6 Mon Sep 17 00:00:00 2001 From: Rene Molina Date: Wed, 19 Feb 2020 13:38:16 -0700 Subject: [PATCH 13/25] -- conceptos de pago de servicios 6% --- Bancos/PopIECompras.aspx.vb | 73 +++++++++++++++++++++++++++++++- Bancos/ProveedoresAbonar.aspx.vb | 66 +++++++++++++++++++++++++++++ 2 files changed, 137 insertions(+), 2 deletions(-) diff --git a/Bancos/PopIECompras.aspx.vb b/Bancos/PopIECompras.aspx.vb index 83386cb47..4a5e80e2b 100644 --- a/Bancos/PopIECompras.aspx.vb +++ b/Bancos/PopIECompras.aspx.vb @@ -1982,6 +1982,75 @@ Partial Class Bancos_PopIECompras End If End If End If + + Case 285 'Ret IVA x Acreditar Acreditable Servicios + If MovimientoPagar.ConceptoRetIVA = 5 Then + If CveMoneda = 1 AndAlso CveMonedaCompra = 1 Then + ImporteMovimiento = MovimientoPagar.RetIVA * PorcentajePago + ImporteMX = ImporteMovimiento + ElseIf CveMoneda = 1 AndAlso CveMonedaCompra = 2 Then + ImporteMovimiento = (MovimientoPagar.RetIVA * PorcentajePago) + ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra) + ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 1 Then + ImporteMovimiento = (MovimientoPagar.RetIVA * PorcentajePago) + ImporteMX = ImporteMovimiento * tipoCambioCompra + ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 2 Then + ImporteMovimiento = (MovimientoPagar.RetIVA * PorcentajePago) + ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra) + End If + ImporteMovimiento = Math.Round(ImporteMovimiento, 2) + ImporteMX = Math.Round(ImporteMX, 2) + TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra) + + If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}" + + 'Conta ContPAQ + If IdCtaContRetIVA > 0 Then + IdCtaContable = IdCtaContRetIVA + ElseIf UsuarioActual.Empresa.Funcionalidad(578).ToEntero > 0 Then + IdCtaContable = UsuarioActual.Empresa.Funcionalidad(578).ToEntero + Else + If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then + If ObjMov.DtResultados.Rows.Count > 0 Then + IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero + End If + End If + End If + End If + Case 286 'Ret IVA Acreditable Servicio + If MovimientoPagar.ConceptoRetIVA = 5 Then + If CveMoneda = 1 AndAlso CveMonedaCompra = 1 Then + ImporteMovimiento = MovimientoPagar.RetIVA * PorcentajePago + ImporteMX = ImporteMovimiento + ElseIf CveMoneda = 1 AndAlso CveMonedaCompra = 2 Then + ImporteMovimiento = (MovimientoPagar.RetIVA * PorcentajePago) + ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra) + ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 1 Then + ImporteMovimiento = (MovimientoPagar.RetIVA * PorcentajePago) + ImporteMX = ImporteMovimiento * tipoCambioCompra + ElseIf CveMoneda = 2 AndAlso CveMonedaCompra = 2 Then + ImporteMovimiento = (MovimientoPagar.RetIVA * PorcentajePago) + ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra) + End If + ImporteMovimiento = Math.Round(ImporteMovimiento, 2) + ImporteMX = Math.Round(ImporteMX, 2) + TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra) + + If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}" + + 'Conta ContPAQ + If IdCtaContRetIVAAcreditable > 0 Then + IdCtaContable = IdCtaContRetIVAAcreditable + ElseIf UsuarioActual.Empresa.Funcionalidad(582).ToEntero > 0 Then + IdCtaContable = UsuarioActual.Empresa.Funcionalidad(582).ToEntero + Else + If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then + If ObjMov.DtResultados.Rows.Count > 0 Then + IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero + End If + End If + End If + End If 'Case 16 'Ret ISR X Acreditar ' If MovimientoPagar.ConceptoRetISR = 1 Then ' If CveMoneda = 1 AndAlso CveMonedaCompra = 1 Then @@ -2579,8 +2648,8 @@ Partial Class Bancos_PopIECompras End If ObjCreditos.Dispose() Else - IdCtaContable = CtaProveedor - CveCuenta = CveCuentaProveedor + IdCtaContable = IdCuentaBancaria + CveCuenta = CveCuentaCliente End If Else IdCtaContable = IdCtaContComplementaria diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index 1ab731944..98a4713c9 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -1261,6 +1261,72 @@ Partial Class Bancos_ProveedoresAbonar End If End If End If + Case 285 'Ret IVA x Acreditar Acreditable Servicios + If gvr.DataKey("CveRetIVAConcepto").ToEntero = 5 Then + If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then + ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago + importeMX = ImporteMovimiento + ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then + ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) + importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra) + ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then + ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) + importeMX = ImporteMovimiento * tipoCambioCompra + ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then + ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) + importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra) + End If + ImporteMovimiento = Math.Round(ImporteMovimiento, 2) + importeMX = Math.Round(importeMX, 2) + + If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}" + + 'Conta ContPAQ + If IdCtaContRetIVA > 0 Then + IdCtaContable = IdCtaContRetIVA + ElseIf UsuarioActual.Empresa.Funcionalidad(578).ToEntero > 0 Then + IdCtaContable = UsuarioActual.Empresa.Funcionalidad(578).ToEntero + Else + If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then + If ObjMov.DtResultados.Rows.Count > 0 Then + IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero + End If + End If + End If + End If + Case 286 'Ret IVA Acreditable Servicio + If gvr.DataKey("CveRetIVAConcepto").ToEntero = 5 Then + If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then + ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago + importeMX = ImporteMovimiento + ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then + ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) + importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra) + ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then + ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) + importeMX = ImporteMovimiento * tipoCambioCompra + ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then + ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) + importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra) + End If + ImporteMovimiento = Math.Round(ImporteMovimiento, 2) + importeMX = Math.Round(importeMX, 2) + + If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}" + + 'Conta ContPAQ + If IdCtaContRetIVAAcreditable > 0 Then + IdCtaContable = IdCtaContRetIVAAcreditable + ElseIf UsuarioActual.Empresa.Funcionalidad(582).ToEntero > 0 Then + IdCtaContable = UsuarioActual.Empresa.Funcionalidad(582).ToEntero + Else + If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then + If ObjMov.DtResultados.Rows.Count > 0 Then + IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero + End If + End If + End If + End If 'Case 16 'Ret ISR X Acreditar ' If gvr.DataKey("CveRetISRConcepto").ToEntero = 1 Then ' If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then From 0b1963b098e49a3b12cff76d4608368b7a8cd689 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Wed, 19 Feb 2020 16:45:47 -0700 Subject: [PATCH 14/25] =?UTF-8?q?consulta=20de=20las=20ventas=20correspond?= =?UTF-8?q?ientes=20a=20los=20grupos=20de=20tama=C3=B1os?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Acumuladores/RepEntradasUsadosClientes.aspx | 70 +++++++++++++++++-- .../RepEntradasUsadosClientes.aspx.vb | 32 +++++---- App_Code/ClsAcumuladores.vb | 23 ++++++ 3 files changed, 109 insertions(+), 16 deletions(-) diff --git a/Acumuladores/RepEntradasUsadosClientes.aspx b/Acumuladores/RepEntradasUsadosClientes.aspx index 36a2fb0f6..c2da0c83c 100644 --- a/Acumuladores/RepEntradasUsadosClientes.aspx +++ b/Acumuladores/RepEntradasUsadosClientes.aspx @@ -72,15 +72,77 @@ - + - - - + + + + + + + + + + + + + + diff --git a/Acumuladores/RepEntradasUsadosClientes.aspx.vb b/Acumuladores/RepEntradasUsadosClientes.aspx.vb index 8925785f9..75e36daaf 100644 --- a/Acumuladores/RepEntradasUsadosClientes.aspx.vb +++ b/Acumuladores/RepEntradasUsadosClientes.aspx.vb @@ -49,7 +49,7 @@ Partial Class Acumuladores_RepEntradasUsadosClientes Dim Acum As New ClsAcumuladores If Acum.EntradasUsadosClientesRep(CveAlmacen, FechaI, FechaF, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then - GvDatos.DataSource = Acum.DtResultados.FiltraParametros("Codigo_Clientes <> 'Total:'") 'los renglones generados con esta caracteriztica son con un grouping set en la consulta, se pueden quitar + GvDatos.DataSource = Acum.DtResultados.FiltraParametros("Codigo_Clientes <> 'Total:'") 'los renglones generados con esta caracteriztica son con un grouping set en la consulta, se pueden quitar DatosEntradasUsadosClientes = Acum.DtResultados.FiltraParametros("Codigo_Clientes <> 'Total:'") End If @@ -61,18 +61,11 @@ Partial Class Acumuladores_RepEntradasUsadosClientes Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then - 'If e.Row.DBCampo("EsHeader").ToString = "-1" Or e.Row.DBCampo("Codigo").ToString = "" Then - ' e.Row.CssClass = "SubTotales2" - 'End If - If e.Row.DBCampo("TipoHeader").ToString = "1" Then - e.Row.CssClass = "Totales" - ElseIf e.Row.DBCampo("TipoHeader").ToString = "2" Then - e.Row.CssClass = "SubTotales" - ElseIf e.Row.DBCampo("TipoHeader").ToString = "3" Then - e.Row.CssClass = "SubTotales2" - End If - End If + If e.Row.DBCampo("EsHeader").ToString = "-1" Or e.Row.DBCampo("Codigo").ToString = "" Then + e.Row.CssClass = "SubTotales2" + End If + End If End Sub Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs) @@ -96,4 +89,19 @@ Partial Class Acumuladores_RepEntradasUsadosClientes End Sub + Public Sub CargarVentasGrupo(sender As Object, e As EventArgs) + Dim tempLink As LinkButton = CType(sender, LinkButton) + Dim renglon As GridViewRow = CType(tempLink.NamingContainer, GridViewRow) + + LbCliente.Text = renglon.DataKey("NombreComercial") + LbTam.Text = renglon.DataKey("Codigo") + Dim ObjAcum As New ClsAcumuladores + If ObjAcum.GetUsadosClasificacionVentas(renglon.DataKey("CveCliente"), renglon.DataKey("Codigo"), TxtFechaI.Text, TxtFechaF.Text) Then + GvVentas.DataSource = ObjAcum.DtResultados + End If + ObjAcum.Dispose() + GvVentas.DataBind() + + RegistraScript("$('#ModalVentasAvance').modal('show');RecargaAvances = true;") + End Sub End Class diff --git a/App_Code/ClsAcumuladores.vb b/App_Code/ClsAcumuladores.vb index 0a9418855..3720d4918 100644 --- a/App_Code/ClsAcumuladores.vb +++ b/App_Code/ClsAcumuladores.vb @@ -1039,6 +1039,29 @@ Public Class ClsAcumuladores Return Retorno End Function + Public Function GetUsadosClasificacionVentas(CveCliente As Integer, Codigo As String, FechaInicio As String, FechaFin As String) As Boolean + + Dim Retorno As Boolean = False + + SqlDataAdapter("PA_Acum_UsadosClasificacionVentas") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveCliente", SqlDbType.Int).Value = CveCliente + .Add("@Codigo", SqlDbType.VarChar).Value = Codigo + .Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio + .Add("@FechaFin", SqlDbType.Date).Value = FechaFin + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As SqlException + OnError("Ocurrió un error al consultar los datos. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + #Region " IDisposable Support " From 176b79164573c29999fc57f10ddeea41fa407f4a Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Wed, 19 Feb 2020 17:47:04 -0700 Subject: [PATCH 15/25] Documentacion ajsutes, rep ingresos --- Edoc/CatDocumentos.aspx | 2 +- Edoc/Contratos.aspx | 2 +- Edoc/Contratos.aspx.vb | 10 +- Ventas/RepIngresos.aspx | 413 +++++++++++++++++++------------------ Ventas/RepIngresos.aspx.vb | 6 +- vwd.webinfo | 2 + 6 files changed, 229 insertions(+), 206 deletions(-) diff --git a/Edoc/CatDocumentos.aspx b/Edoc/CatDocumentos.aspx index eaa6a2fed..a4dd193e9 100644 --- a/Edoc/CatDocumentos.aspx +++ b/Edoc/CatDocumentos.aspx @@ -1,4 +1,4 @@ -<%@ Page Title="RH - Catálogo de Documentos" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatDocumentos.aspx.vb" Inherits="RH_CatDocumentos" %> +<%@ Page Title="Catálogo de Documentos" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatDocumentos.aspx.vb" Inherits="RH_CatDocumentos" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> diff --git a/Edoc/Contratos.aspx b/Edoc/Contratos.aspx index 3bd132099..b49544a0c 100644 --- a/Edoc/Contratos.aspx +++ b/Edoc/Contratos.aspx @@ -230,7 +230,7 @@
--%> + +
+
+
+ + Representastes Legales + +
+
+
+
+
+ +
+ + + + +
+
+
+ + + + + + + + + + <%-- + + + + + --%> + + + + + +
+
+
diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb index 3036fa58f..b32464910 100644 --- a/Compras/Proveedores.aspx.vb +++ b/Compras/Proveedores.aspx.vb @@ -380,6 +380,9 @@ Partial Class Compras_Proveedores End If HlEvento.Visible = True HlEvento.NavigateUrl = "/OI/PopUpAgenda.aspx?CveTipoEvento=2&CveProveedor=" & CveProveedor & "&TB_iframe=true&height=370&width=600;" + + CargaRepresentantes() + Else 'Configuración de Modalidad Insert @@ -500,6 +503,30 @@ Partial Class Compras_Proveedores 'ViewState("OUsuario") = "Usuario DESC" End Sub + + Private Sub CargaRepresentantes() + + If CveProveedor > 0 Then + + Dim ObjProveedores As New ClsCompProveedores + + If ObjProveedores.GetRePresentanteLegal(-1, UsuarioActual.CveEmpresa, CveProveedor) Then + + GvRepresentante.DataSource = ObjProveedores.DtResultados + Else + GvRepresentante.DataSource = Nothing + End If + + ObjProveedores.Dispose() + + GvRepresentante.DataBind() + End If + + + End Sub + + + Private Sub CargaCuentasContables(Optional IdCuentaPadre As Integer = -1) If UsuarioActual.Empresa.UsaContabilidad Then Dim ObjContabilidad As New ClsContPAQi(UsuarioActual.Empresa) From bdad939716a0e1593b33dc9307019d33a10f81da Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 19 Feb 2020 20:04:01 -0700 Subject: [PATCH 20/25] Edicion de remision en el punto de venta --- App_Code/Modelos.vb | 66 ++- Ventas/PV.aspx | 40 +- Ventas/PV.aspx.vb | 968 ++++++++++++++++++++++++++++++++++++++------ 3 files changed, 920 insertions(+), 154 deletions(-) diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index e0d5d3f62..08036f1b9 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -14,6 +14,7 @@ Imports System.Net Imports System.IO.Compression Imports System.Text Imports System.Net.Http +Imports System.Collections.Generic Namespace Modelos @@ -539,7 +540,64 @@ Namespace Modelos Public Property CveEstatus As Integer End Class - + Public Function RegenerarPrePolizas(Optional TransaccionCompartida As SqlClient.SqlTransaction = Nothing, Optional ObjACTransac As ClsContPAQi = Nothing) As Boolean + Dim ErrorPrePolizas As Boolean = False + + Dim ObjVentas As ClsVentas = Nothing + If TransaccionCompartida IsNot Nothing Then + ObjVentas = New ClsVentas(TransaccionCompartida) + Else + ObjVentas = New ClsVentas() + ObjVentas.IniciaTransacSQL() + End If + + Dim ObjConta As New ClsContabilidad(ObjVentas.IniciaTransacSQL()) + Dim ObjBancos As New ClsBancos(ObjVentas.IniciaTransacSQL()) + Dim ObjEventos As New ClsOIEventos(ObjVentas.IniciaTransacSQL()) + Dim ObjAC As ClsContPAQi = Nothing + + If ObjACTransac Is Nothing Then + If UsuarioActual.Empresa.UsaAC Then + ObjAC = New ClsContPAQi(UsuarioActual.Empresa) : ObjAC.IniciaTransacSQL() + End If + Else + ObjAC = ObjACTransac + End If + + ErrorPrePolizas = Not RegeneracionPolizas(Me, ObjVentas, ObjAC, ObjConta, ObjBancos, ObjEventos) + + If TransaccionCompartida Is Nothing Then + ObjVentas.Commit() + ObjVentas.Dispose() + ObjBancos.Dispose() + ObjEventos.Dispose() + End If + + If ObjACTransac Is Nothing Then + If ObjAC IsNot Nothing Then + ObjAC.Commit() + ObjAC.Dispose() + End If + End If + + Return Not ErrorPrePolizas + End Function + Private Function RegeneracionPolizas(ObjFactura As Modelos.Factura, ByRef ObjVentas As ClsVentas, ByRef ObjAC As ClsContPAQi, ByRef ObjConta As ClsContabilidad, ObjBancos As ClsBancos, ObjEventos As ClsOIEventos) As Boolean + Dim ErrorPrePolizas As Boolean = False + + 'REMOVEMOS LOS CONCEPTOS DE LA PREPOLIZA + ErrorPrePolizas = Not ObjConta.RemovePrePolizasDetalle(ObjFactura.CvePrePoliza, -1, ObjFactura.CveVenta, 2) + + 'VUELVE A GENERAR LAS PREPOLIZAS + If Not ErrorPrePolizas Then + ErrorPrePolizas = ProcesoPrepolizas(ObjFactura, ObjConta, -1, ObjFactura.DtDetalle, ObjAC, ValorMultiplicador:=1, ObjBancos:=ObjBancos, ObjVentas:=ObjVentas, ObjEventos:=ObjEventos, DtRemisionesRelacionadas:=New DataTable, SeCancelaRemisionProceso:=False, + CancelarRemisiones:=False, ListaRemisionesCancelar:=New List(Of Integer)) + End If + + If Not ErrorPrePolizas Then ErrorPrePolizas = GuardarVentaImpuestosLocales(ObjFactura, ObjVentas, ObjConta, 1) + + Return Not ErrorPrePolizas + End Function Public Function EmitirFactura(Optional Timbrar As Boolean = True, Optional Transac As SqlClient.SqlTransaction = Nothing, Optional ObjContPaqTransac As ClsContPAQi = Nothing) As MMensajeFactura Dim Retorno As New MMensajeFactura() @@ -1059,7 +1117,7 @@ Namespace Modelos Return Retorno End Function - Private Function DescargarFactura(CveVenta As Integer, CveEmpresa As Integer, Optional GetBytes As Boolean = true) As Byte() + Private Function DescargarFactura(CveVenta As Integer, CveEmpresa As Integer, Optional GetBytes As Boolean = True) As Byte() Dim Url = New Uri(String.Format("http://{0}:{1}/Compras/PopUpVerFactura.aspx?P={2}", HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port, Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta)))) Dim File As Byte() = Nothing Try @@ -6067,7 +6125,7 @@ Namespace Modelos End Set End Property - Public ReadOnly Property GlobalDTProductosServiciosEquivalencias(CvePS As Integer, CveUM As Integer, CveEmpresa As Integer) As DataTable + Public ReadOnly Property GlobalDTProductosServiciosEquivalencias(CvePS As Integer, CveUM As Integer, CveEmpresa As Integer) As DataTable Get Dim AppNombre As String = String.Format("GlobalDTProductosServiciosEquivalencias{0}", CveEmpresa) @@ -6085,7 +6143,7 @@ Namespace Modelos GlobalDTProductosServiciosEquivalencias = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End If End Get - + End Property Property GlobalDTProveedorClasificacion(CveEmpresa As Integer) As DataTable Get diff --git a/Ventas/PV.aspx b/Ventas/PV.aspx index d60fe016f..07ff5a1dc 100644 --- a/Ventas/PV.aspx +++ b/Ventas/PV.aspx @@ -621,7 +621,8 @@ - + <%--0--%> @@ -1331,12 +1332,18 @@
- + + + +
+ + +
@@ -2556,7 +2563,7 @@
- + + -
+

@@ -2807,7 +2814,7 @@
-