From c467bb6d064c8d4bcd490d6f16d89dec4b70a879 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 8 Jun 2020 22:44:57 -0700 Subject: [PATCH 01/34] - considerar abono negativo como cargo o viceversa --- Bancos/ConciliacionesBancarias.aspx.vb | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Bancos/ConciliacionesBancarias.aspx.vb b/Bancos/ConciliacionesBancarias.aspx.vb index 9175d0e91..c8957ee63 100644 --- a/Bancos/ConciliacionesBancarias.aspx.vb +++ b/Bancos/ConciliacionesBancarias.aspx.vb @@ -236,9 +236,19 @@ Partial Class Bancos_ConciliacionesBancariasaspx Seleccionados += 1 Fecha = Gvr.DataKey("FechaDocumento").ToDate If Gvr.DataKey("Tipo") = "Cargo" Then - SumaSIGCargo += Gvr.DataKey("Importe").ToDouble + If Gvr.DataKey("Importe").ToDouble < 0 Then ' cuando es negativo suma para el abono + SumaSIGAbono += Math.Abs(Gvr.DataKey("Importe").ToDouble) + Else + SumaSIGCargo += Gvr.DataKey("Importe").ToDouble + End If + ElseIf Gvr.DataKey("Tipo") = "Abono" Then - SumaSIGAbono += Gvr.DataKey("Importe").ToDouble + If Gvr.DataKey("Importe").ToDouble < 0 Then ' cuando es negativo suma para el cargo + SumaSIGCargo += Math.Abs(Gvr.DataKey("Importe").ToDouble) + Else + SumaSIGAbono += Gvr.DataKey("Importe").ToDouble + End If + End If End If Next From e2dcaf02349f60fae966fa38e4307d3cb47c234c Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 8 Jun 2020 22:45:14 -0700 Subject: [PATCH 02/34] - fluctuacion TC Valuacion --- Bancos/PopIEVentas.aspx.vb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Bancos/PopIEVentas.aspx.vb b/Bancos/PopIEVentas.aspx.vb index 17a1b63e6..ef708b810 100644 --- a/Bancos/PopIEVentas.aspx.vb +++ b/Bancos/PopIEVentas.aspx.vb @@ -2097,15 +2097,15 @@ Partial Class Bancos_PopIEVentas If CveMonedaVenta = 1 And CveMoneda = 2 Then 'factura pesos, pago en dolares - tImporteVenta = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVenta).RoundSQL + tImporteVenta = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVentaValuacion).RoundSQL tImportePago = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVenta / tipoCambioPago).RoundSQL ElseIf CveMonedaVenta = 2 And CveMoneda = 2 Then 'factura dolares, pago en dolares - tImporteVenta = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVenta).RoundSQL + tImporteVenta = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVentaValuacion).RoundSQL tImportePago = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioPago).RoundSQL ElseIf CveMonedaVenta = 2 And CveMoneda = 1 Then 'factura dolares, pago en pesos - tImporteVenta = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVenta).RoundSQL + tImporteVenta = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVentaValuacion).RoundSQL tImportePago = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioPago).RoundSQL End If From b585b401e7ab304789479be27ad754a72ca3a628 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 8 Jun 2020 22:45:30 -0700 Subject: [PATCH 03/34] -considerar Prisay ,Fecha --- Bancos/RepProgramarRecursos.aspx.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Bancos/RepProgramarRecursos.aspx.vb b/Bancos/RepProgramarRecursos.aspx.vb index 5c2cd3230..7fceb03ec 100644 --- a/Bancos/RepProgramarRecursos.aspx.vb +++ b/Bancos/RepProgramarRecursos.aspx.vb @@ -222,8 +222,8 @@ Partial Class Bancos_RepProgramarRecursos CargaCreditosVencimiento() - 'Esconde PROYECTO EMP 13,14 - If UsuarioActual.CveEmpresa = 13 Or UsuarioActual.CveEmpresa = 14 Then + 'Esconde PROYECTO EMP 13,14,83 + If UsuarioActual.CveEmpresa.Contiene(13,14,83) Then Gv.Columns(3).Visible = False Gv.Columns(4).Visible = True ElseIf UsuarioActual.CveEmpresa <> 119 Then From 0263ef5cb1ddc1517b7e6ef538946a3288211a5f Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 8 Jun 2020 22:46:29 -0700 Subject: [PATCH 04/34] -- fecha caducidad --- Inventarios/RecepcionUsados.aspx.vb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Inventarios/RecepcionUsados.aspx.vb b/Inventarios/RecepcionUsados.aspx.vb index e5b6eb401..52bc3b4d5 100644 --- a/Inventarios/RecepcionUsados.aspx.vb +++ b/Inventarios/RecepcionUsados.aspx.vb @@ -460,6 +460,7 @@ Partial Class Inventarios_RecepcionUsados dt.Columns.Add("CveAF") dt.Columns.Add("Serie", Type.GetType("System.String")) dt.Columns.Add("Lote", Type.GetType("System.String")) + dt.Columns.Add("FechaCaducidad", Type.GetType("System.DateTime")) dt.Columns.Add("Observaciones") dt.Columns.Add("CountMovimientoEntradaDetalle") @@ -995,6 +996,7 @@ Partial Class Inventarios_RecepcionUsados DtMovimientos.Rows(IndexDTUsado)("Estatus") = "" DtMovimientos.Rows(IndexDTUsado)("CveSeccionAlmacen") = CveSeccionAlmacen DtMovimientos.Rows(IndexDTUsado)("SeccionAlmacen") = SeccionAlmacen + DtMovimientos.Rows(IndexDTUsado)("FechaCaducidad") = "1900/01/01" DtMovimientos.Rows(IndexDTUsado)("CodigoAF") = CodigoAF From 238baee2eb605f159720f513d2529f1d1322d347 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 8 Jun 2020 22:46:39 -0700 Subject: [PATCH 05/34] -- activa seccion --- Ventas/ProductosServicios.aspx | 12 ++++++------ Ventas/ProductosServicios.aspx.vb | 25 +++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/Ventas/ProductosServicios.aspx b/Ventas/ProductosServicios.aspx index 57658e998..36274682c 100644 --- a/Ventas/ProductosServicios.aspx +++ b/Ventas/ProductosServicios.aspx @@ -810,7 +810,7 @@
- + @@ -831,7 +831,7 @@
- +
@@ -839,7 +839,7 @@
- +
@@ -847,7 +847,7 @@
- +
@@ -855,7 +855,7 @@
- +
@@ -863,7 +863,7 @@
- +
diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb index ba06b0a52..aa1546011 100644 --- a/Ventas/ProductosServicios.aspx.vb +++ b/Ventas/ProductosServicios.aspx.vb @@ -2635,4 +2635,29 @@ Partial Class ProductosyServicios DdlCategoriaToxicidad.SelectedValueExist("000") End Select End Sub + + Protected Sub ddlMetodos_SelectedIndexChanged(sender As Object, e As EventArgs) + + If ddlMetodos.SelectedValue = "5" Then + ChkSerie.Checked = True + Else + ChkSerie.Checked = False + End If + + End Sub + + Protected Sub ChkSerie_CheckedChanged(sender As Object, e As EventArgs) + + End Sub + + Protected Sub ChkSeccion_CheckedChanged(sender As Object, e As EventArgs) + + If ChkSeccion.Checked Then + DivSeccionAlmacen.Visible = True + Else + DivSeccionAlmacen.Visible = False + End If + + UpSeccionAlmacen.Update() + End Sub End Class From d41a66be7ed0c1ad7366eeabaf4f8480307484a3 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 8 Jun 2020 22:47:14 -0700 Subject: [PATCH 06/34] -- mensaje cuando no esta activa la funcionalidad de validacion SAT --- Compras/Compras.aspx.vb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 1ee181a35..3a995a94f 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1754,6 +1754,8 @@ Partial Class Compras_Compras Validada = True End If 'Valida.Dispose() + Else + Alert("Los servicios de validacion de facturas del SAT, no están activados.", TipoMensaje.ToastError, "", 0) End If UpPSS.Update() @@ -10695,6 +10697,7 @@ Partial Class Compras_Compras 'VALIDA UNIDAD DE MEDIDA If e.Row.DBCampo("CvePS").ToString.ToEntero > 0 Then + Dim DtEquivalencias As DataTable = GlobalDTProductosServiciosEquivalencias(e.Row.DBCampo("CvePS").ToString.ToEntero, e.Row.DBCampo("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa) 'SI UM NO ESTA REGISTRADA If e.Row.DBCampo("CveUM").ToString.ToEntero <= 0 Then @@ -10706,7 +10709,6 @@ Partial Class Compras_Compras 'EQUIVALENCIA If e.Row.DBCampo("CveUM").ToString.ToEntero > 0 And e.Row.DBCampo("CveTipoPS").ToString.ToEntero = 2 Then - Dim DtEquivalencias As DataTable = GlobalDTProductosServiciosEquivalencias(e.Row.DBCampo("CvePS").ToString.ToEntero, e.Row.DBCampo("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa) If DtEquivalencias.FiltraParametros($"CveUM = {e.Row.DBCampo("CveUM").ToString.ToEntero}").Rows.Count > 0 Then If Not DtEquivalencias.FiltraParametros($"CveUM = {e.Row.DBCampo("CveUM").ToString.ToEntero} AND UnidadBase = 1").Rows.Count > 0 Then From 05729d5619fcd6e256f71e45852d3216aa8382a2 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 8 Jun 2020 22:47:24 -0700 Subject: [PATCH 07/34] -- dispose --- Ventas/Clientes.aspx.vb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index ff52d9a63..4073e4a4e 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -6985,7 +6985,8 @@ Partial Class Clientes Response.Buffer = True memoryStream.WriteTo(Response.OutputStream) Response.End() - + memoryStream.Dispose() + End Sub Protected Sub GvDocumentosFirma_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDocumentosCliente.RowDataBound From e16f36afb92c237e7a9ee747cdb1ed7df6d5ee22 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 8 Jun 2020 22:47:48 -0700 Subject: [PATCH 08/34] -- validacion de precios de lista, Clientes/Sucursal o Sucursal/Cliente --- Ventas/Ventas.aspx.vb | 54 ++++++++++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 19 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 4928b7d97..23e5c4df8 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -13768,28 +13768,41 @@ Partial Class Ventas ObjPS.Dispose() End If - If UsuarioActual.Empresa.Funcionalidad(404).ToString() = "1" Then - Dim CvePrecioListaPS As Integer = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "").ToEntero() + If UsuarioActual.Empresa.Funcionalidad(404).ToEntero > 0 Then 'cuando el valor es 10.- secuencia Cliente/Sucursal, 20 - sucursal/cliente + Dim TipoPrecioLista As Integer = UsuarioActual.Empresa.Funcionalidad(404).ToEntero + ' si es 10. primero el cliente + Dim CvePrecioListaPS As Integer + Dim PorcentajePrecio As Double = 0 + + If TipoPrecioLista = 10 Then + + CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero() + If CvePrecioListaPS = 0 Then + + CvePrecioListaPS = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "").ToEntero() + + End If + + Else + + CvePrecioListaPS = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "").ToEntero() + If CvePrecioListaPS = 0 Then + + CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero() + + End If + + End If + If CvePrecioListaPS > 0 Then Dim ObjPS As New ClsProductosServicios If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDouble + PorcentajePrecio = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDouble End If ObjPS.Dispose() End If - Dim PorcentajePrecio As Double = 0 - If PrecioSugerido = 0 AndAlso CveCliente > 0 Then - CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero() - If CvePrecioListaPS > 0 Then - Dim ObjPS As New ClsProductosServicios - If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then - PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDouble - PorcentajePrecio = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDouble - End If - ObjPS.Dispose() - End If - End If If PrecioSugerido = 0 Then Dim ObjInventarios As New ClsInventarios @@ -17737,12 +17750,15 @@ Partial Class Ventas DdlCuentaCheque.Items.Clear() DdlCuentaTransferencia.Items.Clear() + Dim DtCC As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario) - DdlCuentaEfectivo.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero()))) - DdlCuentaTarjetaCredito.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero()))) - DdlCuentaTarjetaDebito.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero()))) - DdlCuentaCheque.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero()))) - DdlCuentaTransferencia.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero()))) + DdlCuentaEfectivo.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero()))) + DdlCuentaTarjetaCredito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero()))) + DdlCuentaTarjetaDebito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero()))) + DdlCuentaCheque.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero()))) + DdlCuentaTransferencia.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero()))) + + DtCC.Dispose() DdlCuentaEfectivo.DataBind() DdlCuentaTarjetaCredito.DataBind() From 23da11a68282056534b203e4dd47c6abc76529ba Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 8 Jun 2020 23:09:36 -0700 Subject: [PATCH 09/34] -- liga, popupverfactura --- Bancos/ProveedoresAbonar.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index 67a28c29a..841988189 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -2292,7 +2292,7 @@ Partial Class Bancos_ProveedoresAbonar 'If Archivo.Exists Then Msg.AppendFormat("
  • Imprimir movimiento
  • ", Encripta(String.Format("OP=IECHEQUE&CVEIE={0}", CveIE))) 'End If - Msg.AppendFormat("
  • Listado
  • ", Encripta(String.Format("Opcion=ImprimeMov&CveIE={0}", CveIE))) + Msg.AppendFormat("
  • Listado
  • ", Encripta(String.Format("OP=ImprimeMov&CveIE={0}", CveIE))) If IDPoliza > 0 Then Msg.AppendFormat("
  • Póliza
  • ", IDPoliza) Dim Mensaje As String = String.Format("
    El Documento se generó correctamente.


    Descargas:
      {0}
    ", Msg.ToString) From 89fd83a0ab18f1a7c384dc432854b976ced1ace6 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 8 Jun 2020 23:32:29 -0700 Subject: [PATCH 10/34] - --- App_Code/ClsInventarios.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index 4e2ca49e7..f05686a6c 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -630,7 +630,7 @@ Public Class ClsInventarios SqlAdapter.Fill(Data) Retorno = True Catch Ex1 As SqlException - If Ex1.Message.Contains("Número: 2627;") Then + If Ex1.Message.Contains("Número: 2601;") Then Alert("Ya existe una Sección de Almacén con el mismo nombre: " & Seccion & ".", TipoMensaje.MsgAdvertencia) Else Me.OnError("Ocurrió un error al Guardar la Sección de Almacén.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) From 2bb4d34483f6cf3254f4b1c019fb4ce796aaf63f Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Tue, 9 Jun 2020 13:39:20 -0700 Subject: [PATCH 11/34] - --- Inventarios/ResguardoMaterial.aspx | 19 +++++--- Inventarios/ResguardoMaterial.aspx.vb | 63 +++++++++++++++++++++------ Ventas/Clientes.aspx | 3 -- Ventas/Clientes.aspx.vb | 17 +++++--- 4 files changed, 76 insertions(+), 26 deletions(-) diff --git a/Inventarios/ResguardoMaterial.aspx b/Inventarios/ResguardoMaterial.aspx index a543fe7b5..c53ce3ca7 100644 --- a/Inventarios/ResguardoMaterial.aspx +++ b/Inventarios/ResguardoMaterial.aspx @@ -208,7 +208,8 @@ Clasificación
    Producto U.M. - Serie + Seccion almacen + Serie Observaciones @@ -238,6 +239,11 @@ + + + + + @@ -263,19 +269,22 @@