From 952fde490fd77c1734a4a34bde11975b94e9950d Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Fri, 3 Jan 2020 16:24:26 -0700 Subject: [PATCH 1/2] Agregando una nueva columna al grid de DescuentoProntoPago --- Ventas/ClientesAbonar.aspx | 8 +++++++- Ventas/ClientesAbonar.aspx.vb | 18 ++++++++++++------ 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/Ventas/ClientesAbonar.aspx b/Ventas/ClientesAbonar.aspx index 3da0febd7..e697d1f14 100644 --- a/Ventas/ClientesAbonar.aspx +++ b/Ventas/ClientesAbonar.aspx @@ -261,7 +261,7 @@ @@ -338,6 +338,12 @@ + + Descuento Pronto Pago + +   + + Auxiliar diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index 1692af294..25766dd80 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -445,16 +445,22 @@ Partial Class Ventas_ClientesAbonar Dim FechaCorte As Date = IIf(CveIESustitucion > 0, (FechaCorteIE.ToDate).ToShortDateString, DateTime.Now.AddYears(1).ToShortDateString).ToString.ToDate + Dim SumDescuentoProntoPago As Double = 0.0 If Mov.GetCxCClienteDetalle(ViewState("CveCliente").ToString.ToEntero, FechaI, FechaF, pCveMoneda, CveSubProyecto, UsuarioActual.CveEmpresa, CveClienteSucursal, FechaCorte:=FechaCorte, CveIESustitucion:=CveIESustitucion) Then + Dim TmpCxCAux As DataTable + TmpCxCAux = Mov.DtResultados.FiltraParametros("Saldo > 0", "Fecha,SerieFolio") + SumDescuentoProntoPago = TmpCxCAux.SUM("DescuentoProntoPago") GvCxC.DataSource = Mov.DtResultados.FiltraParametros("Saldo > 0", "Fecha,SerieFolio") GvCxC.DataBind() CveMoneda = pCveMoneda - End If + End If TxtImporte.Text = "" TxtObservaciones.Text = "" - + If SumDescuentoProntoPago > 0.0 Then + GvCxC.Columns("DescuentoProntoPago").Visible = True + End If Mov.Dispose() UPVentas.Update() @@ -608,8 +614,7 @@ Partial Class Ventas_ClientesAbonar e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1}); FnCambia({2},this,{1},0,{3},{4});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo"), e.Row.FCCheckBox("Chk").ClientID, CveMonedaFiltro, moneda)) If Not UsuarioActual.Empresa.Funcionalidad(536) = "1" Then - 'si es remisión y factura no timbrada - If e.Row.DBCampo("TipoDocto") = "Rem" OrElse (e.Row.DBCampo("TipoDocto") = "Ing" AndAlso e.Row.DBCampo("FolioFiscal") = "") Then + If e.Row.DBCampo("TipoDocto") = "Rem" Then e.Row.FCCheckBox("Chk").Visible = False ' que no se pueda pagar si es remisión e.Row.Cells(0).ToolTip = "El documento es remisión y no se puede realizar el pago" End If @@ -872,6 +877,7 @@ Partial Class Ventas_ClientesAbonar CveVentasPago.Add(gvr.DataKey("CveVenta").ToEntero) SeriesPago.Add(gvr.DataKey("SerieFolio")) + Dim tipoCambioVentaDiferenciaCambiaria As Double = 1 Dim EsAnticipoEspecial As Boolean = False If gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then EsAnticipoEspecial = True @@ -1243,7 +1249,7 @@ Partial Class Ventas_ClientesAbonar If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria - + tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal) Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta) @@ -1281,7 +1287,7 @@ Partial Class Ventas_ClientesAbonar If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria - + tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal) Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta) Dim Diferencia As Decimal = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioVentaValuacion) - ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta From 7efb0ed5f79b360a58a3211417f6cb7d28a5b857 Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Fri, 3 Jan 2020 17:30:21 -0700 Subject: [PATCH 2/2] Rep Traspaso Alamacen: Se agrego en grid e impresion alamacen origen y valor. Traspaso Alamacen: se agrego en grid alamacen origen. Proveedores: Global proveedores se pone en null al agregar o actualizar, para que recargue nuevamente cuando se solicite. --- Compras/Proveedores.aspx.vb | 17 +- .../Grales/Formatos/RepTraspasoAlmacen.rdlc | 2147 +++++++++-------- Inventarios/RepTraspasoAlmacen.aspx | 48 +- Inventarios/RepTraspasoAlmacen.aspx.vb | 3 +- Inventarios/TraspasoAlmacen.aspx.vb | 2 +- 5 files changed, 1169 insertions(+), 1048 deletions(-) diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb index 859af37e3..3036fa58f 100644 --- a/Compras/Proveedores.aspx.vb +++ b/Compras/Proveedores.aspx.vb @@ -1533,11 +1533,12 @@ Partial Class Compras_Proveedores If ObjContaAC IsNot Nothing Then ObjContaAC.Commit() 'ACTUALIZAR GLOBAL - If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaGlobalDT, -1, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then - GlobalDTCompProveedores(UsuarioActual.CveEmpresa) = ObjProveedores.DtResultados - Else - ErrorBancos = True - End If + 'If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaGlobalDT, -1, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then + GlobalDTCompProveedores(UsuarioActual.CveEmpresa) = Nothing + 'Else + ' ErrorBancos = True + 'End If + Alert("El Proveedor se guardó correctamente. " & "
" & MsgCuentaContable, TipoMensaje.MsgInformacion, If(Request("CveFactura") Is Nothing, "document.location.href=""/Compras/CatProveedores.aspx""", "window.opener.location.href = window.opener.location.href; window.close();")) RecargaGlobalCuentasBancarias() End If @@ -1617,9 +1618,9 @@ Partial Class Compras_Proveedores If tIdContaProveedor > 0 AndAlso CreoCuenta Then ObjProveedores.UpdateProveedorIdCuentaAC(CveProveedor, tIdContaProveedor) - If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaGlobalDT, -1, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then - GlobalDTCompProveedores(UsuarioActual.CveEmpresa) = ObjProveedores.DtResultados - End If + 'If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaGlobalDT, -1, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then + GlobalDTCompProveedores(UsuarioActual.CveEmpresa) = Nothing + 'End If Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion) 'HABILITA ENVIAR ACTIVACION AL PORTAL PROVEEDOR SI SE AGREGO CORREO diff --git a/Empresas/Grales/Formatos/RepTraspasoAlmacen.rdlc b/Empresas/Grales/Formatos/RepTraspasoAlmacen.rdlc index a76bee9e1..37cfca530 100644 --- a/Empresas/Grales/Formatos/RepTraspasoAlmacen.rdlc +++ b/Empresas/Grales/Formatos/RepTraspasoAlmacen.rdlc @@ -1,1023 +1,1126 @@ - - - - - - - - - 3.57404cm - - - 2.36927cm - - - 2.15604cm - - - 15.6445cm - - - 2.02375cm - - - - - 0.4148cm - - - - - true - true - - - - - Disponible - - - - - - - Textbox3 - - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Unidad - - - - - - - Textbox5 - - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Código - - - - - - - Textbox16 - - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Producto - - - - - - - Textbox12 - - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - SerieLote - - - - - - - Textbox4 - - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.49417cm - - - - - true - true - - - - - =IIf(Fields!PS.Value = "", "Folio: " & Fields!FolioSalida.Value, Fields!Cantidad.Value) - - - - - - =IIf(Fields!PS.Value = "", "#9cacc1", "NoColor") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =IIf(Fields!PS.Value = "", Fields!FechaMovto.Value, Fields!UnidadMedida.Value) - - - - - - - UnidadMedida - - - =IIf(Fields!PS.Value = "", "#9cacc1", "NoColor") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Codigo.Value - - - - - - - Codigo - - - =IIf(Fields!PS.Value = "", "#9cacc1", "NoColor") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - - - - - =IIf(Fields!PS.Value = "", "Almacén Destino: " & Fields!AlmacenDestino.Value & " Responsable: " & Fields!Recibio.Value, Fields!PS.Value) - - - - - - =IIf(Fields!PS.Value = "", "#9cacc1", "NoColor") - 2pt - 2pt - 2pt - 2pt - - - true - - - - - - true - true - - - - - =Fields!SerieLote.Value - - - - - - - SerieLote - - - =IIf(Fields!PS.Value = "", "#9cacc1", "NoColor") - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - After - - - - - - - true - true - true - true - DataSet1 - 0.17639cm - 0.24474cm - 0.90897cm - 25.7676cm - - - - - - 0.67394in - - - - - - - Textbox1 - 0.47625cm - 6.54965cm - 0.6cm - 12.60299cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - REPORTE DE TRASPASO DE ALMACÉN - - - - - - - - - - - - - - - - Textbox2 - 1.07625cm - 6.54965cm - 0.52945cm - 12.60299cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - External - =Parameters!LogoPath.Value - FitProportional - 0.11458in - 0.28839cm - 2.09585cm - 5.89966cm - 2 - - - - - - true - true - - - - - =Parameters!Filtros.Value - HTML - - - - - - 2pt - 2pt - 2pt - 2pt - - - - 3.30439cm - 0.24474cm - 0cm - 25.72823cm - 4 - - - - - - - - - - - 1.84855cm - true - true - - - true - true - - - - - ="Página " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox3 - 0.27341cm - 22.76211cm - 0.38981cm - 3.13456cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Usuario: - - - - - - - Textbox8 - 0.27341cm - 0.28839cm - 0.38981cm - 1.60042cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!UsuarioImprimio.Value - - - - - - - Textbox9 - 0.27341cm - 1.83272cm - 0.38981cm - 7.13374cm - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - 0.15875cm - 0.24474cm - 0cm - 25.72823cm - 4 - - - - - - true - true - - - - - =Globals!ExecutionTime - - - - - - - Textbox11 - 0.27341cm - 12.77526cm - 0.38981cm - 4.99273cm - 5 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - IMPRESO EN SIG, Rep. Traspaso Almacén - - - - - - - Textbox13 - 0.63378cm - 0.28839cm - 0.46771cm - 6.69369cm - 6 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 21.59cm - 27.94cm - 0.5cm - 0.5cm - 0cm - 0cm - 0.13cm - + + + + + + Textbox3 + + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Unidad + + + + + + + Textbox5 + + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Código + + + + + + + Textbox16 + + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Producto + + + + + + + Textbox12 + + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + SerieLote + + + + + + + Textbox4 + + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Valor + + + + + + + Textbox6 + + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.49417cm + + + + + true + true + + + + + =IIf(Fields!PS.Value = "", "Folio: " & Fields!FolioSalida.Value, Fields!Cantidad.Value) + + + + + + =IIf(Fields!PS.Value = "", "#9cacc1", "NoColor") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =IIf(Fields!PS.Value = "", Fields!FechaMovto.Value, Fields!UnidadMedida.Value) + + + + + + + UnidadMedida + + + =IIf(Fields!PS.Value = "", "#9cacc1", "NoColor") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Codigo.Value + + + + + + + Codigo + + + =IIf(Fields!PS.Value = "", "#9cacc1", "NoColor") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + =IIf(Fields!PS.Value = "", "Almacén Origen: " & Fields!Almacen.Value & " Almacén Destino: " & Fields!AlmacenDestino.Value & " Responsable: " & Fields!Recibio.Value, Fields!PS.Value) + + + + + + =IIf(Fields!PS.Value = "", "#9cacc1", "NoColor") + 2pt + 2pt + 2pt + 2pt + + + true + + + + + + true + true + + + + + =Fields!SerieLote.Value + + + + + + + SerieLote + + + =IIf(Fields!PS.Value = "", "#9cacc1", "NoColor") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Valor.Value + + + + + + + Valor + + + =IIf(Fields!PS.Value = "", "#9cacc1", "NoColor") + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + true + true + true + true + DataSet1 + 0.17639cm + 0.24474cm + 0.90897cm + 25.65193cm + + + + + + 0.67394in + + + + + + + Textbox1 + 0.47625cm + 6.54965cm + 0.6cm + 12.60299cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + REPORTE DE TRASPASO DE ALMACÉN + + + + + + + + + + + + + + + + Textbox2 + 1.07625cm + 6.54965cm + 0.52945cm + 12.60299cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!LogoPath.Value + FitProportional + 0.11458in + 0.28839cm + 2.09585cm + 5.89966cm + 2 + + + + + + true + true + + + + + =Parameters!Filtros.Value + HTML + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 3.30439cm + 0.24474cm + 0cm + 25.72823cm + 4 + + + + + + + + + + + 1.84855cm + true + true + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 0.27341cm + 22.76211cm + 0.38981cm + 3.13456cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario: + + + + + + + Textbox8 + 0.27341cm + 0.28839cm + 0.38981cm + 1.60042cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!UsuarioImprimio.Value + + + + + + + Textbox9 + 0.27341cm + 1.83272cm + 0.38981cm + 7.13374cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 0.15875cm + 0.24474cm + 0cm + 25.72823cm + 4 + + + + + + true + true + + + + + =Globals!ExecutionTime + + + + + + + Textbox11 + 0.27341cm + 12.77526cm + 0.38981cm + 4.99273cm + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + IMPRESO EN SIG, Rep. Traspaso Almacén + + + + + + + Textbox13 + 0.63378cm + 0.28839cm + 0.46771cm + 6.69369cm + 6 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 21.59cm + 27.94cm + 0.5cm + 0.5cm + 0cm + 0cm + 0.13cm +