From d3f25b84d94fe0f80b28b74d62d6cf63419cad49 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 12 Nov 2024 15:56:01 -0700 Subject: [PATCH 1/9] --FIX agregar ps con descuento en OC --- OC/OC.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index b2e62328e..2b6d48e9c 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -4071,7 +4071,7 @@ Partial Class OC_OC End If If e.Row.DBCampo("Descuento").ToDecimal > 0 Then Dim Desc As Decimal = e.Row.DBCampo("Descuento").ToDecimal - e.Row.FCLiteral("LtlDescuento").Text = String.Format("{0}

{1}%

", Desc.FormatoNumero, (Desc / (e.Row.DBCampo("Cantidad").ToDecimal * e.Row.DBCampo("PU").ToDecimal) * 100.0).FormatoNumero) + e.Row.FCLiteral("LtlDescuento").Text = String.Format("{0}

{1}%

", Desc.FormatoNumero, (Desc / (e.Row.DBCampo("Cantidad").ToDecimal * e.Row.DBCampo("Importe").ToDecimal) * 100.0).FormatoNumero) End If e.Row.Cells(0).ToolTip = e.Row.DBCampo("CvePresupuestoEgreso") From 4f5c4ebcf8f72e0ddf7140e84589a43e865ccd4a Mon Sep 17 00:00:00 2001 From: rakcsle Date: Thu, 14 Nov 2024 18:30:24 -0700 Subject: [PATCH 2/9] Compras correcion devolucion en dolares, Saldos iniciales mensajes codig, numero de parte --- App_Code/ClsProductosServicios.vb | 16 +- Compras/Compras.aspx | 11 +- Compras/Compras.aspx.vb | 52 +- Empresas/119/Formatos/Cotizacion.rdlc | 7 +- Empresas/158/Formatos/Cotizacion.rdlc | 4219 +++++++++++++------------ 5 files changed, 2186 insertions(+), 2119 deletions(-) diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb index 511e9125e..9ea2ab57d 100644 --- a/App_Code/ClsProductosServicios.vb +++ b/App_Code/ClsProductosServicios.vb @@ -537,7 +537,21 @@ Public Class ClsProductosServicios If Ex1.Message.Contains("Número: 2627;") Then Alert("El Nuevo Producto o Servicio no se guardo debido a que actualmente se encuentra registrado", TipoMensaje.MsgAdvertencia) ElseIf Ex1.Message.Contains("Número: 2601;") Then - Alert("El Nuevo Producto o Servicio tiene Codigo duplicado:" & Codigo, TipoMensaje.MsgAdvertencia) + + If Ex1.Message.Contains("UK_ProductosServicios_Codigo_Empresa") Then + Alert("El Nuevo Producto o Servicio tiene Codigo duplicado:" & Codigo, TipoMensaje.MsgAdvertencia) + ElseIf Ex1.Message.Contains("UK_ProductosServicios_CveEmpresa_CodigoBarras") Then + Alert("El Nuevo Producto o Servicio tiene Codigo de barras duplicado:" & CodigoBarras, TipoMensaje.MsgAdvertencia) + ElseIf Ex1.Message.Contains("UK_ProductosServicios_CveEmpresa_NumeroParte") Then + Alert("El Nuevo Producto o Servicio tiene Numero de Parte duplicado:" & NumeroParte, TipoMensaje.MsgAdvertencia) + ElseIf Ex1.Message.Contains("UK_ProductosServicios_EmpresaNumeroParte") Then + Alert("El Nuevo Producto o Servicio tiene Numero de Parte duplicado:" & NumeroParte, TipoMensaje.MsgAdvertencia) + Else + Alert("El Nuevo Producto o Servicio duplicado(ND):" & NumeroParte, TipoMensaje.MsgAdvertencia) + End If + + + Else Me.OnError("Ocurrió un error al guardar el nuevo Producto o Servicio.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End If diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx index abf6c7d0f..c0bd4a9d4 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -1329,7 +1329,16 @@ - + + + + Unidad + + + + + + <%----%> diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 05d53e680..e78190fe8 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -2308,6 +2308,7 @@ Partial Class Compras_Compras GvPS.DataSource = TmpDT GvPS.DataBind() UpPS.Update() + CargaGvInv() End If End If Else @@ -11117,6 +11118,48 @@ Partial Class Compras_Compras End If + + + ''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 + ' e.Row.FCLabel("LtlUnidadMedida").Attributes.Add("onclick", $"FncUMEquivalencias(1,'{e.Row.DBCampo("UM").Replace("'", "")}',{e.Row.RowIndex},'{DtEquivalencias.FiltroPrimeroValor("UnidadMedida", "UnidadBase = 1")}','{e.Row.DBCampo("CveUnidadMedidaSAT")}','{e.Row.DBCampo("SATClaveUnidadMedida")}')") + ' e.Row.FCLabel("LtlUnidadMedida").CssClass = "label label-danger manita centrarUM" + ' e.Row.FCLabel("LtlUnidadMedida").Attributes.Add("data-toggle", "tooltip") + ' e.Row.FCLabel("LtlUnidadMedida").Attributes.Add("title", "Unidad de medida SIN registrar") + ' End If + + ' 'If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then e.Row.FCHyperLink("HplPS").Text = e.Row.DBCampo("PSCodigo") + + ' 'EQUIVALENCIA + ' If e.Row.DBCampo("CveUM").ToString.ToEntero > 0 And e.Row.DBCampo("CveTipoPS").ToString.ToEntero = 2 Then + + ' 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 + ' 'UM NO BASE + ' e.Row.FCLinkButton("LBAplicarEquivalencia").Visible = True + + ' 'e.Row.FCLabel("LtlUnidadMedida").Attributes.Add("onclick", $"FncUMEquivalencias(2,'{e.Row.DBCampo("UM").Replace("'", "")}',{e.Row.RowIndex},'{DtEquivalencias.FiltroPrimeroValor("UnidadMedida", "UnidadBase = 1")}')") + ' e.Row.FCLabel("LtlUnidadMedida").CssClass = "label label-danger centrarUM" + ' e.Row.FCLabel("LtlUnidadMedida").Attributes.Add("data-toggle", "tooltip") + ' e.Row.FCLabel("LtlUnidadMedida").Attributes.Add("title", "Unidad de medida NO medida base") + ' End If + ' Else + ' 'SIN EQUIVALENCIA + ' e.Row.FCLabel("LtlUnidadMedida").Attributes.Add("onclick", $"FncUMEquivalencias(3,'{e.Row.DBCampo("UM").Replace("'", "")}',{e.Row.RowIndex},'{DtEquivalencias.FiltroPrimeroValor("UnidadMedida", "UnidadBase = 1")}','{e.Row.DBCampo("CveUnidadMedidaSAT")}','{e.Row.DBCampo("SATClaveUnidadMedida")}')") + ' e.Row.FCLabel("LtlUnidadMedida").CssClass = "label label-danger manita centrarUM" + ' e.Row.FCLabel("LtlUnidadMedida").Attributes.Add("data-toggle", "tooltip") + ' e.Row.FCLabel("LtlUnidadMedida").Attributes.Add("title", "Unidad de medida SIN equivalencia") + ' End If + ' DtEquivalencias.Dispose() + ' End If + 'End If + + + End If 'HEADER GvInv @@ -13620,18 +13663,19 @@ Partial Class Compras_Compras 'End Sub Protected Sub BtnVinculaDevolucion_Click(sender As Object, e As EventArgs) Try - Dim subtotaldevolucion As Double = 0 + Dim subtotaldevolucion As Decimal = 0 Dim realizadevolucion As Boolean = False 'Calculo los subtotales para comparar con la NC - Dim cantidad As Double = 0.0 + Dim cantidad As Decimal = 0D For Each Dr As GridViewRow In GVDevolucion.Rows - cantidad = Dr.FCTextBox("TxtCantidad").Text.ToDouble + cantidad = Dr.FCTextBox("TxtCantidad").Text.ToDecimal If cantidad > 0 Then realizadevolucion = True - subtotaldevolucion += Dr.DataKey("PU").ToString.ToDouble * cantidad + Dim PU As Decimal = If(DdlMoneda.SelectedValue.ToEntero <> 1, Dr.DataKey("PUExtranjero").ToString.ToDecimal, Dr.DataKey("PU").ToString.ToDecimal) + subtotaldevolucion += PU * cantidad End If Next diff --git a/Empresas/119/Formatos/Cotizacion.rdlc b/Empresas/119/Formatos/Cotizacion.rdlc index 51e22dcf5..e45d17b44 100644 --- a/Empresas/119/Formatos/Cotizacion.rdlc +++ b/Empresas/119/Formatos/Cotizacion.rdlc @@ -1237,6 +1237,7 @@ 2pt + true @@ -2787,12 +2788,6 @@ true ReportParameter1 - - String - true - true - ReportParameter1 - diff --git a/Empresas/158/Formatos/Cotizacion.rdlc b/Empresas/158/Formatos/Cotizacion.rdlc index 54181a5fb..7f69682af 100644 --- a/Empresas/158/Formatos/Cotizacion.rdlc +++ b/Empresas/158/Formatos/Cotizacion.rdlc @@ -1,2111 +1,5 @@ - - - - - true - true - - - - - Cliente: - - - - =Parameters!ClienteNombre.Value - - - - - - - - - Dirección: - - - - =Parameters!ClienteDireccion.Value - - - - - - - - - RFC: - - - - =Parameters!ClienteRFC.Value - - - - - - - - - Atención A: - - - - =Parameters!ClienteContacto.Value - - - - - - - Textbox2 - 0.05159in - 4.32145cm - 0.99993in - 3.6362in - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Domicilio fiscal: - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - - - - - - Cotización - - - - - - - - - - - - - Serie: - - - - =Parameters!Serie.Value - - - - Folio: - - - - =Parameters!Folio.Value - - - - - - - - - Fecha: - - - - - - - - = Parameters!Fecha.Value - - - - - - - - - - - - - Forma de pago: - - - - =Parameters!FormaPago.Value - - - - - - - - - Método de pago: - - - - =Parameters!MetodoPago.Value - - - - - - - - - Cuenta: - - - - =IIF(Parameters!NumCta.Value="0" Orelse Parameters!NumCta.Value="","No Identificado",Parameters!NumCta.Value) - - - - - - - Textbox4 - 0.05159in - 5.39311in - 1.27833in - 2.8593in - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Expedido en - - - - : - - - - - - - - - =Parameters!DomicilioSucursal.Value - - - - - - - - - AJA9809264V2 - - - - - - - - - - - - - - - - - - Vendedor: - - - - =Parameters!VendedorNombre.Value - - - - - - - Textbox40 - 3.51387cm - 13.72673cm - 2.47332cm - 7.26261cm - 3 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - 0.75572in - - - 0.58129in - - - 0.79461in - - - 2.38421in - - - 0.78125in - - - 0.63048in - - - 0.55487in - - - 0.62063in - - - 1.11998in - - - - - 0.19645in - - - - - true - true - - - - - CANT - - - - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - UNIDAD - - - - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - CODIGO - - - - - - - Textbox29 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - DESCRIPCIÓN - - - - - - - Textbox17 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - PU - - - - - - - Textbox1 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - %DESC - - - - - - - Textbox21 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - IEPS - - - - - - - Textbox23 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - IVA - - - - - - - Textbox8 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - TOTAL - - - - - - - Textbox1 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.14436in - - - - - true - true - - - - - =Fields!Cantidad.Value - - - - - - - Cantidad1 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!UM.Value - - - - - - - UM - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Codigo.Value - - - - - - - Codigo - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!PS.Value & " " & Fields!Obs.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!PU.Value - - - - - - - PU1 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Descuento.Value - - - - - - - Descuento - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!IEPS.Value - - - - - - - IEPS - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!IVA.Value - - - - - - - IVA - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Cantidad.Value * Fields!PU.Value - - - - - - - TiempoEntrega - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - - - - - After - - - - - - - DsOC - 2.45577in - 0.04048in - 0.34081in - 8.22304in - 4 - - - - - - true - true - - - - - - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =UCase(Parameters!ImporteLetra.Value) - - - - - - - ImporteLetra - 3.25108in - 0.98592in - 0.18861in - 7.2776in - 7 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - 2.99824cm - - - - - 0.48004cm - - - - - true - true - - - - - =Fields!Importe.Value - - - - - - - Importe - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - =Fields!ImpuestoLocal.Value - - - - 2.93858cm - - - true - true - - - - - =IIF(Fields!ImpuestoLocal.Value = "Total",UCase(Fields!ImpuestoLocal.Value),Fields!ImpuestoLocal.Value) - - - - - - White - 2pt - 2pt - 2pt - 2pt - - - - - - - - DataSet1 - 7.4511cm - 15.05252cm - 0.48004cm - 5.93682cm - 8 - - - - - - true - true - - - - - Sin más por el momento, se despide su seguro proveedor - - - - Textbox2 - 16.4177cm - 3.65232cm - 0.57354cm - 12.91587cm - 9 - - - 2pt - 2pt - 2pt - 2pt - - - - 17.86437cm - 7.71741cm - 0cm - 5.675cm - 10 - - - - - - true - true - - - - - =Parameters!VendedorNombre.Value - - - - Textbox3 - 17.93492cm - 7.71741cm - 0.6cm - 5.675cm - 11 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Nombre Comercial: - - - - - - - - - Beneficiario: - - - - - - - - - - - - - Banco: - - - - - - - - - - - - - Clabe: - - - - - - - - - Cuenta: - - - - - - - - - - - Textbox1 - 12.29987cm - 0.10282cm - 2.03296cm - 3.74249cm - 12 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - AGROPECUARIA JAM SA DE CV - - - - - - - - - AGROPECUARIA JAM SA DE CV - - - - - - - - - BBVA BANCOMER, MONEDA NACIONAL - - - - - - - - - 012760004508391082 - - - - - - - - - 0450839108 - - - - - - - Textbox1 - 12.29987cm - 3.84531cm - 2.03295cm - 5.75197cm - 13 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Nombre Comercial: - - - - - - - - - Beneficiario: - - - - - - - - - - - - - Banco: - - - - - - - - - - - - - Clabe: - - - - - - - - - Cuenta: - - - - - - - - - - - Textbox1 - 12.29987cm - 9.70311cm - 2.03295cm - 4.17266cm - 14 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - AGROPECUARIA JAM SA DE CV - - - - - - - - - AGROPECUARIA JAM SA DE CV - - - - - - - - - BBVA BANCOMER, MONEDA DOLARES - - - - - - - - - 012760004508391163 - - - - - - - - - 0450839116 - - - - - - - Textbox1 - 12.29987cm - 13.87577cm - 2.03294cm - 6.94061cm - 15 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Observaciones de crédito: - - - - =Parameters!Observaciones.Value - - - - - - - =Parameters!FormaEntrega.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - Embedded - logo - FitProportional - 0.13104cm - 0.10282cm - 2.53982cm - 4.06377cm - 17 - - - - - - 18.53492cm - - - - - - - - =Today - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 0cm - 0cm - 0.5cm - 0.5cm - 1.27cm - + + + =Parameters!ClienteNombre.Value + + + + + + + + + Dirección: + + + + =Parameters!ClienteDireccion.Value + + + + + + + + + RFC: + + + + =Parameters!ClienteRFC.Value + + + + + + + + + Atención A: + + + + =Parameters!ClienteContacto.Value + + + + + + + Textbox2 + 0.05159in + 4.32145cm + 0.99993in + 3.6362in + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Domicilio fiscal: + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + + + + + + Cotización + + + + + + + + + + + + + Serie: + + + + =Parameters!Serie.Value + + + + Folio: + + + + =Parameters!Folio.Value + + + + + + + + + Fecha: + + + + + + + + = Parameters!Fecha.Value + + + + + + + + + + + + + Forma de pago: + + + + =Parameters!FormaPago.Value + + + + + + + + + Método de pago: + + + + =Parameters!MetodoPago.Value + + + + + + + + + Cuenta: + + + + =IIF(Parameters!NumCta.Value="0" Orelse Parameters!NumCta.Value="","No Identificado",Parameters!NumCta.Value) + + + + + + + Textbox4 + 0.05159in + 5.39311in + 1.27833in + 2.8593in + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Expedido en + + + + : + + + + + + + + + =Parameters!DomicilioSucursal.Value + + + + + + + + + AJA9809264V2 + + + + + + + + + + + + + + + + + + Vendedor: + + + + =Parameters!VendedorNombre.Value + + + + + + + Textbox40 + 3.51387cm + 13.72673cm + 2.47332cm + 7.26261cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 0.75572in + + + 0.58129in + + + 0.79461in + + + 2.38421in + + + 0.78125in + + + 0.63048in + + + 0.55487in + + + 0.62063in + + + 1.11998in + + + + + 0.19645in + + + + + true + true + + + + + CANT + + + + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + UNIDAD + + + + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + CODIGO + + + + + + + Textbox29 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + DESCRIPCIÓN + + + + + + + Textbox17 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + PU + + + + + + + Textbox1 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + %DESC + + + + + + + Textbox21 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + IEPS + + + + + + + Textbox23 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + IVA + + + + + + + Textbox8 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + TOTAL + + + + + + + Textbox1 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.14436in + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!UM.Value + + + + + + + UM + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Codigo.Value + + + + + + + Codigo + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PS.Value & " " & Fields!Obs.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PU.Value + + + + + + + PU1 + + + 2pt + 2pt + 2pt + 2pt + + + true + + + + + + true + true + + + + + =Fields!Descuento.Value + + + + + + + Descuento + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!IEPS.Value + + + + + + + IEPS + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!IVA.Value + + + + + + + IVA + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Cantidad.Value * Fields!PU.Value + + + + + + + TiempoEntrega + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DsOC + 2.45577in + 0.04048in + 0.34081in + 8.22304in + 4 + + + + + + true + true + + + + + + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =UCase(Parameters!ImporteLetra.Value) + + + + + + + ImporteLetra + 3.25108in + 0.98592in + 0.18861in + 7.2776in + 7 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 2.99824cm + + + + + 0.48004cm + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Importe + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + =Fields!ImpuestoLocal.Value + + + + 2.93858cm + + + true + true + + + + + =IIF(Fields!ImpuestoLocal.Value = "Total",UCase(Fields!ImpuestoLocal.Value),Fields!ImpuestoLocal.Value) + + + + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + DataSet1 + 7.4511cm + 15.05252cm + 0.48004cm + 5.93682cm + 8 + + + + + + true + true + + + + + Sin más por el momento, se despide su seguro proveedor + + + + Textbox2 + 16.4177cm + 3.65232cm + 0.57354cm + 12.91587cm + 9 + + + 2pt + 2pt + 2pt + 2pt + + + + 17.86437cm + 7.71741cm + 0cm + 5.675cm + 10 + + + + + + true + true + + + + + =Parameters!VendedorNombre.Value + + + + Textbox3 + 17.93492cm + 7.71741cm + 0.6cm + 5.675cm + 11 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Nombre Comercial: + + + + + + + + + Beneficiario: + + + + + + + + + + + + + Banco: + + + + + + + + + + + + + Clabe: + + + + + + + + + Cuenta: + + + + + + + + + + + Textbox1 + 12.29987cm + 0.10282cm + 2.03296cm + 3.74249cm + 12 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + AGROPECUARIA JAM SA DE CV + + + + + + + + + AGROPECUARIA JAM SA DE CV + + + + + + + + + BBVA BANCOMER, MONEDA NACIONAL + + + + + + + + + 012760004508391082 + + + + + + + + + 0450839108 + + + + + + + Textbox1 + 12.29987cm + 3.84531cm + 2.03295cm + 5.75197cm + 13 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Nombre Comercial: + + + + + + + + + Beneficiario: + + + + + + + + + + + + + Banco: + + + + + + + + + + + + + Clabe: + + + + + + + + + Cuenta: + + + + + + + + + + + Textbox1 + 12.29987cm + 9.70311cm + 2.03295cm + 4.17266cm + 14 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + AGROPECUARIA JAM SA DE CV + + + + + + + + + AGROPECUARIA JAM SA DE CV + + + + + + + + + BBVA BANCOMER, MONEDA DOLARES + + + + + + + + + 012760004508391163 + + + + + + + + + 0450839116 + + + + + + + Textbox1 + 12.29987cm + 13.87577cm + 2.03294cm + 6.94061cm + 15 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Observaciones de crédito: + + + + =Parameters!Observaciones.Value + + + + + + + =Parameters!FormaEntrega.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + logo + FitProportional + 0.13104cm + 0.10282cm + 2.53982cm + 4.06377cm + 17 + + + + + + 18.53492cm + + + + + + + + =Today + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0cm + 0cm + 0.5cm + 0.5cm + 1.27cm + + + + Dashboard Ventas + + + + + + + + + + +
+
+
+ + +
+
+
+ Proyecto: +
+ +
+ SubProyecto: +
+ +
+ +
+ + + + + +
+
+
+
+ +
+
+
+ + +
+
+ + + + + + + + + + + + + +
+
+ + + + + + + + +
+
+
+
+ +
+
+
+ + Grafica +
+
+ + + +
+
+
+
+ loading +
+
+
+ +
+
+
+
+ + + + + + + + + + + +
+
+
+ <%-- + + + + + + + + + + + + + + + +
EneroFebreroMarzoAbrilMayoJunioJulioAgostoSeptiembreOctubreNoviembreDiciembre
--%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ <%--
+
+
+ + + + + + + + + + + + + + + + +
EneroFebreroMarzoAbrilMayoJunioJulioAgostoSeptiembreOctubreNoviembreDiciembre
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
--%> + + + + + + + + + + + + + diff --git a/Ventas/DashboardVentas.aspx.vb b/Ventas/DashboardVentas.aspx.vb new file mode 100644 index 000000000..92680092c --- /dev/null +++ b/Ventas/DashboardVentas.aspx.vb @@ -0,0 +1,253 @@ + +Imports System.Activities.Statements +Imports System.Data +Imports Extensiones + +Partial Class Ventas_DashboardVentas + Inherits ClsPaginas + + Private Property DtVentasClasificacion As DataTable + Get + Return CType(ViewState("DtVentasClasificacion"), DataTable) + End Get + Set(value As DataTable) + ViewState("DtVentasClasificacion") = value + End Set + End Property + + Private Property DtVentas As DataTable + Get + Return CType(ViewState("DtVentas"), DataTable) + End Get + Set(value As DataTable) + ViewState("DtVentas") = value + End Set + End Property + + Private Property DtVentasClasificacionxMes As DataTable + Get + Return CType(ViewState("DtVentasClasificacionxMes"), DataTable) + End Get + Set(value As DataTable) + ViewState("DtVentasClasificacionxMes") = value + End Set + End Property + + Private Property DtVentasGrafica As DataTable + Get + Return CType(ViewState("DtVentasGrafica"), DataTable) + End Get + Set(value As DataTable) + ViewState("DtVentasGrafica") = value + End Set + End Property + + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load + If Not IsPostBack Then + CargaCombos() + End If + End Sub + + Private Sub CargaCombos() + CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto, AplicaTodos:="Seleccione") + DdlSubProyecto.Items(0).Text = "Seleccione" + End Sub + + Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) + CargaDatos() + UpDatos.Update() + End Sub + + Protected Sub CargaDatos() + Dim ObjVentas As New ClsVentas + If ObjVentas.GetDashboardVentasGet(UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero, DdlAgrupador.SelectedValue.ToEntero) Then + Dim DsDatos = ObjVentas.DataSetResultados.Copy() + If DsDatos IsNot Nothing Then + 'DESGLOSE + DtVentasClasificacion = DsDatos.Tables(0) + DtVentas = DsDatos.Tables(1) + DtVentasClasificacionxMes = DsDatos.Tables(2) + DtVentasGrafica = DsDatos.Tables(3) + + DtVentasClasificacion.Columns.Add("PorcentajeVenta", GetType(Decimal)) + DtVentasClasificacion.Columns.Add("Ano2xAno1", GetType(Decimal)) + DtVentasClasificacion.Columns.Add("Ano2xPPTO", GetType(Decimal)) + + DtVentas.Columns.Add("Ano3xAno1", GetType(Decimal)) + DtVentas.Columns.Add("Ano3xAno2", GetType(Decimal)) + DtVentas.Columns.Add("CumplimientaRealVSPPTO", GetType(Decimal)) + DtVentas.Columns.Add("Ano3xPPTO", GetType(Decimal)) + + Dim AcumuladoAno1 As Decimal = 0 + Dim AcumuladoAno2 As Decimal = 0 + Dim AcumuladoAno3 As Decimal = 0 + Dim AcumuladoPPTO As Decimal = 0 + For Each Row As DataRow In DtVentas.Rows + AcumuladoAno1 += Row("TotalAno1").ToString().ToDecimal() + AcumuladoAno2 += Row("TotalAno2").ToString().ToDecimal() + AcumuladoAno3 += Row("TotalAno3").ToString().ToDecimal() + AcumuladoPPTO += Row("TotalAno3Presupuesto").ToString().ToDecimal() + + Row("Ano3xAno1") = (AcumuladoAno3 / AcumuladoAno1) - 1 + Row("Ano3xAno2") = (AcumuladoAno3 / AcumuladoAno2) - 1 + + Row("CumplimientaRealVSPPTO") = (Row("TotalAno3").ToString().ToDecimal() * 100) / Row("TotalAno3Presupuesto").ToString().ToDecimal() / 100 + + Row("Ano3xPPTO") = (AcumuladoAno3 / AcumuladoPPTO) - 1 + Next + + For Each Row As DataRow In DtVentasClasificacion.Rows + Row("Ano2xAno1") = If(Row("TotalAno1").ToString().ToDecimal() = 0, 0, (Row("TotalAno2").ToString().ToDecimal() - Row("TotalAno1").ToString().ToDecimal()) / Row("TotalAno1").ToString().ToDecimal()) + + Row("Ano2xPPTO") = (Row("TotalAno2").ToString().ToDecimal() - Row("TotalAno2Presupuesto").ToString().ToDecimal()) / Row("TotalAno2Presupuesto").ToString().ToDecimal() + + Row("PorcentajeVenta") = If(DtVentasClasificacion.SUMD("TotalAno2") = 0, 0, Row("TotalAno2").ToString().ToDecimal() / DtVentasClasificacion.SUMD("TotalAno2")) + Next + + GvVentasClasificacion.DataSource = DtVentasClasificacion + GvVentas.DataSource = DtVentas + GvVentasClasificacionxMes.DataSource = DtVentasClasificacionxMes + GvVentasAcumulado.DataSource = DtVentas + End If + End If + ObjVentas.Dispose() + + GvVentasClasificacion.Columns(1).HeaderText = Now.Year.ToString() + GvVentasClasificacion.Columns(2).HeaderText = (Now.Year - 1).ToString() + GvVentasClasificacion.Columns(4).HeaderText = $"PRESUPUESTO {Now.Year}" + GvVentasClasificacion.Columns(5).HeaderText = $"{Now.Year} VS {Now.Year - 1}" + GvVentasClasificacion.Columns(6).HeaderText = $"{Now.Year} VS PPTO" + + GvVentasClasificacionxMes.Columns(1).HeaderText = $"{Now.Year}-Enero" + GvVentasClasificacionxMes.Columns(2).HeaderText = $"{(Now.Year - 1)}-Enero" + GvVentasClasificacionxMes.Columns(3).HeaderText = $"{Now.Year}-Febrero" + GvVentasClasificacionxMes.Columns(4).HeaderText = $"{(Now.Year - 1)}-Febrero" + GvVentasClasificacionxMes.Columns(5).HeaderText = $"{Now.Year}-Marzo" + GvVentasClasificacionxMes.Columns(6).HeaderText = $"{(Now.Year - 1)}-Marzo" + GvVentasClasificacionxMes.Columns(7).HeaderText = $"{Now.Year}-Abril" + GvVentasClasificacionxMes.Columns(8).HeaderText = $"{(Now.Year - 1)}-Abril" + GvVentasClasificacionxMes.Columns(9).HeaderText = $"{Now.Year}-Mayo" + GvVentasClasificacionxMes.Columns(10).HeaderText = $"{(Now.Year - 1)}-Mayo" + GvVentasClasificacionxMes.Columns(11).HeaderText = $"{Now.Year}-Junio" + GvVentasClasificacionxMes.Columns(12).HeaderText = $"{(Now.Year - 1)}-Junio" + GvVentasClasificacionxMes.Columns(13).HeaderText = $"{Now.Year}-Julio" + GvVentasClasificacionxMes.Columns(14).HeaderText = $"{(Now.Year - 1)}-Julio" + GvVentasClasificacionxMes.Columns(15).HeaderText = $"{Now.Year}-Agosto" + GvVentasClasificacionxMes.Columns(16).HeaderText = $"{(Now.Year - 1)}-Agosto" + GvVentasClasificacionxMes.Columns(17).HeaderText = $"{Now.Year}-Septiembre" + GvVentasClasificacionxMes.Columns(18).HeaderText = $"{(Now.Year - 1)}-Septiembre" + GvVentasClasificacionxMes.Columns(19).HeaderText = $"{Now.Year}-Octubre" + GvVentasClasificacionxMes.Columns(20).HeaderText = $"{(Now.Year - 1)}-Octubre" + GvVentasClasificacionxMes.Columns(21).HeaderText = $"{Now.Year}-Noviembre" + GvVentasClasificacionxMes.Columns(22).HeaderText = $"{(Now.Year - 1)}-Noviembre" + GvVentasClasificacionxMes.Columns(23).HeaderText = $"{Now.Year}-Diciembre" + GvVentasClasificacionxMes.Columns(24).HeaderText = $"{(Now.Year - 1)}-Diciembre" + + 'GvVentasClasificacionxMes.Columns(1).HeaderText = $"{Now.Year}" + 'GvVentasClasificacionxMes.Columns(2).HeaderText = $"{(Now.Year - 1)}" + 'GvVentasClasificacionxMes.Columns(3).HeaderText = $"{Now.Year}" + 'GvVentasClasificacionxMes.Columns(4).HeaderText = $"{(Now.Year - 1)}" + 'GvVentasClasificacionxMes.Columns(5).HeaderText = $"{Now.Year}" + 'GvVentasClasificacionxMes.Columns(6).HeaderText = $"{(Now.Year - 1)}" + 'GvVentasClasificacionxMes.Columns(7).HeaderText = $"{Now.Year}" + 'GvVentasClasificacionxMes.Columns(8).HeaderText = $"{(Now.Year - 1)}" + 'GvVentasClasificacionxMes.Columns(9).HeaderText = $"{Now.Year}" + 'GvVentasClasificacionxMes.Columns(10).HeaderText = $"{(Now.Year - 1)}" + 'GvVentasClasificacionxMes.Columns(11).HeaderText = $"{Now.Year}" + 'GvVentasClasificacionxMes.Columns(12).HeaderText = $"{(Now.Year - 1)}" + 'GvVentasClasificacionxMes.Columns(13).HeaderText = $"{Now.Year}" + 'GvVentasClasificacionxMes.Columns(14).HeaderText = $"{(Now.Year - 1)}" + 'GvVentasClasificacionxMes.Columns(15).HeaderText = $"{Now.Year}" + 'GvVentasClasificacionxMes.Columns(16).HeaderText = $"{(Now.Year - 1)}" + 'GvVentasClasificacionxMes.Columns(17).HeaderText = $"{Now.Year}" + 'GvVentasClasificacionxMes.Columns(18).HeaderText = $"{(Now.Year - 1)}" + 'GvVentasClasificacionxMes.Columns(19).HeaderText = $"{Now.Year}" + 'GvVentasClasificacionxMes.Columns(20).HeaderText = $"{(Now.Year - 1)}" + 'GvVentasClasificacionxMes.Columns(21).HeaderText = $"{Now.Year}" + 'GvVentasClasificacionxMes.Columns(22).HeaderText = $"{(Now.Year - 1)}" + 'GvVentasClasificacionxMes.Columns(23).HeaderText = $"{Now.Year}" + 'GvVentasClasificacionxMes.Columns(24).HeaderText = $"{(Now.Year - 1)}" + + GvVentas.Columns(1).HeaderText = (Now.Year - 2).ToString() + GvVentas.Columns(2).HeaderText = (Now.Year - 1).ToString() + GvVentas.Columns(3).HeaderText = Now.Year.ToString() + GvVentas.Columns(4).HeaderText = $"PRESUPUESTO {Now.Year}" + GvVentas.Columns(5).HeaderText = $"CUMPLIMIENTO REAL VS PPTO {Now.Year}" + + GvVentasAcumulado.Columns(1).HeaderText = $"{Now.Year} VS {Now.Year - 2}" + GvVentasAcumulado.Columns(2).HeaderText = $"{Now.Year} VS {Now.Year - 1}" + GvVentasAcumulado.Columns(3).HeaderText = $"{Now.Year} VS PPTO" + + GvVentasClasificacion.DataBind() + GvVentas.DataBind() + GvVentasClasificacionxMes.DataBind() + GvVentasAcumulado.DataBind() + + CargaGraficas(DtVentasGrafica) + + 'Dim Ano3 = DateTime.Now.Year.ToString() + 'Dim Ano2 = (DateTime.Now.Year - 1).ToString() + 'Dim Ano1 = (DateTime.Now.Year - 2).ToString() + + 'Dim Dt As New DataTable() + 'Dt.Columns.Add("Mes") + 'Dt.Columns.Add(DateTime.Now.Year.ToString()) + 'Dt.Columns.Add((DateTime.Now.Year - 1).ToString()) + 'Dt.Columns.Add((DateTime.Now.Year - 2).ToString()) + 'Dt.Columns.Add("Presupuesto") + + 'For Each Dr As DataRow In DtVentas.Rows + ' Dim Row As DataRow = Dt.NewRow() + ' Row("Mes") = Dr("Mes").ToString() + ' Row(DateTime.Now.Year.ToString()) = Dr("TotalAno3").ToString().FormatoNumero + ' Row((DateTime.Now.Year - 1).ToString()) = Dr("TotalAno2").ToString().FormatoNumero + ' Row((DateTime.Now.Year - 2).ToString()) = Dr("TotalAno1").ToString().FormatoNumero + ' Row("Presupuesto") = Dr("TotalAno3Presupuesto").ToString().FormatoNumero + ' Dt.Rows.Add(Row) + 'Next + + 'Dim json As String = Newtonsoft.Json.JsonConvert.SerializeObject(Dt) + + 'RegistraScript($"CargaGrafica({json});console.log({json})", "22") + + End Sub + + Private Sub CargaGraficas(ByVal DtVentas As DataTable) + MuestraGrafica(div_ventas, DtVentas, "Ano", "Total", "", "", "gh2", "") + End Sub + + Private Sub MuestraGrafica(ByVal divcontainer As HtmlGenericControl, ByVal DTDatos As DataTable, ByVal ColTitle As String, ByVal ColValue As String, ByVal Titulo As String, ByVal SubTitulo As String, ByVal Optional Indicador As String = "gh", ByVal Optional XReferencia As String = "", ByVal Optional YReferencia As String = "") + Dim Info As String = "" + Dim SBJSScript As StringBuilder = New StringBuilder() + + If DTDatos.Rows.Count > 0 Then + + 'For Each DbRow As DataRow In DTDatos.Rows + ' Info = String.Format("{2}['{1}',{0}],", DbRow("TotalAno1"), DbRow(ColTitle), Info) + ' Info = String.Format("{2}['{1}',{0}],", DbRow("TotalAno2"), DbRow(ColTitle), Info) + ' Info = String.Format("{2}['{1}',{0}],", DbRow("TotalAno3"), DbRow(ColTitle), Info) + ' Info = String.Format("{2}['{1}',{0}],", DbRow("TotalAno3Presupuesto"), DbRow(ColTitle), Info) + 'Next + + 'For Each DbRow As DataRow In DTDatos.Rows + ' Info = String.Format("{2}['{1}',{0}],", DbRow("TotalAno1"), DateTime.Now.Year - 2, Info) + ' Info = String.Format("{2}['{1}',{0}],", DbRow("TotalAno2"), DateTime.Now.Year - 1, Info) + ' Info = String.Format("{2}['{1}',{0}],", DbRow("TotalAno3"), DateTime.Now.Year, Info) + ' Info = String.Format("{2}['{1}',{0}],", DbRow("TotalAno3Presupuesto"), $"PRESUPUESTO {Now.Year}", Info) + 'Next + + For Each DbRow As DataRow In DTDatos.Rows + Info = String.Format("{2}['{1}',{0}],", DbRow(ColValue), DbRow(ColTitle), Info) + Next + + If Info.Length > 0 Then + 'Info = Info.Remove(Info.Length - 1, 1) + SBJSScript.AppendFormat("graficahighcharts('{0}','{1}','{2}','{3}',[{4}],1,'{5}');", divcontainer.ClientID, Titulo, SubTitulo, YReferencia, Info, XReferencia) + End If + Else + SBJSScript.AppendFormat("graficahighcharts('{0}','{1}','{2}','{3}',[{4}],1,'{5}');", divcontainer.ClientID, Titulo, SubTitulo, YReferencia, " ", XReferencia) + End If + + RegistraScript(SBJSScript.ToString(), Indicador) + End Sub +End Class From b52fa9bc359bbf2410805572b63923d3e1349091 Mon Sep 17 00:00:00 2001 From: RPimienta Date: Thu, 14 Nov 2024 23:06:09 -0600 Subject: [PATCH 5/9] Cambios en el dashboard de ventas --- Ventas/DashboardVentas.aspx | 123 ++++++++++++++++++++++++++++++++- Ventas/DashboardVentas.aspx.vb | 56 ++++++--------- 2 files changed, 144 insertions(+), 35 deletions(-) diff --git a/Ventas/DashboardVentas.aspx b/Ventas/DashboardVentas.aspx index d45d29431..c4b4ac610 100644 --- a/Ventas/DashboardVentas.aspx +++ b/Ventas/DashboardVentas.aspx @@ -117,8 +117,10 @@
+
+
- loading + <%--loading--%>
@@ -251,7 +253,7 @@
- + <%-- @@ -346,6 +348,123 @@ // "enabled": true // } //}); + }--%> + + + + + + + + + + + + + + + diff --git a/Ventas/DashboardVentas.aspx.vb b/Ventas/DashboardVentas.aspx.vb index 92680092c..34f3fe41a 100644 --- a/Ventas/DashboardVentas.aspx.vb +++ b/Ventas/DashboardVentas.aspx.vb @@ -2,6 +2,7 @@ Imports System.Activities.Statements Imports System.Data Imports Extensiones +Imports Newtonsoft.Json.Linq Partial Class Ventas_DashboardVentas Inherits ClsPaginas @@ -183,7 +184,7 @@ Partial Class Ventas_DashboardVentas GvVentasClasificacionxMes.DataBind() GvVentasAcumulado.DataBind() - CargaGraficas(DtVentasGrafica) + CargaGraficaNEW(DtVentasGrafica) 'Dim Ano3 = DateTime.Now.Year.ToString() 'Dim Ano2 = (DateTime.Now.Year - 1).ToString() @@ -212,42 +213,31 @@ Partial Class Ventas_DashboardVentas End Sub - Private Sub CargaGraficas(ByVal DtVentas As DataTable) - MuestraGrafica(div_ventas, DtVentas, "Ano", "Total", "", "", "gh2", "") - End Sub + Private Sub CargaGraficaNEW(ByVal D_T_Datos As DataTable) + Dim jsonData As JArray = New JArray() - Private Sub MuestraGrafica(ByVal divcontainer As HtmlGenericControl, ByVal DTDatos As DataTable, ByVal ColTitle As String, ByVal ColValue As String, ByVal Titulo As String, ByVal SubTitulo As String, ByVal Optional Indicador As String = "gh", ByVal Optional XReferencia As String = "", ByVal Optional YReferencia As String = "") - Dim Info As String = "" - Dim SBJSScript As StringBuilder = New StringBuilder() + For x As Integer = 1 To 12 + Dim Mes As String = D_T_Datos.Columns(x).ColumnName + Dim obj As JObject = New JObject() + obj.Add(New JProperty("mes", Mes)) - If DTDatos.Rows.Count > 0 Then - - 'For Each DbRow As DataRow In DTDatos.Rows - ' Info = String.Format("{2}['{1}',{0}],", DbRow("TotalAno1"), DbRow(ColTitle), Info) - ' Info = String.Format("{2}['{1}',{0}],", DbRow("TotalAno2"), DbRow(ColTitle), Info) - ' Info = String.Format("{2}['{1}',{0}],", DbRow("TotalAno3"), DbRow(ColTitle), Info) - ' Info = String.Format("{2}['{1}',{0}],", DbRow("TotalAno3Presupuesto"), DbRow(ColTitle), Info) - 'Next - - 'For Each DbRow As DataRow In DTDatos.Rows - ' Info = String.Format("{2}['{1}',{0}],", DbRow("TotalAno1"), DateTime.Now.Year - 2, Info) - ' Info = String.Format("{2}['{1}',{0}],", DbRow("TotalAno2"), DateTime.Now.Year - 1, Info) - ' Info = String.Format("{2}['{1}',{0}],", DbRow("TotalAno3"), DateTime.Now.Year, Info) - ' Info = String.Format("{2}['{1}',{0}],", DbRow("TotalAno3Presupuesto"), $"PRESUPUESTO {Now.Year}", Info) - 'Next - - For Each DbRow As DataRow In DTDatos.Rows - Info = String.Format("{2}['{1}',{0}],", DbRow(ColValue), DbRow(ColTitle), Info) + For y As Integer = 0 To D_T_Datos.Rows.Count - 1 + obj.Add(New JProperty(D_T_Datos.Rows(y)(0).ToString(), D_T_Datos.Rows(y)(x).ToString())) Next - If Info.Length > 0 Then - 'Info = Info.Remove(Info.Length - 1, 1) - SBJSScript.AppendFormat("graficahighcharts('{0}','{1}','{2}','{3}',[{4}],1,'{5}');", divcontainer.ClientID, Titulo, SubTitulo, YReferencia, Info, XReferencia) - End If - Else - SBJSScript.AppendFormat("graficahighcharts('{0}','{1}','{2}','{3}',[{4}],1,'{5}');", divcontainer.ClientID, Titulo, SubTitulo, YReferencia, " ", XReferencia) - End If + jsonData.Add(obj) + Next - RegistraScript(SBJSScript.ToString(), Indicador) + Dim jsonSeries As JArray = New JArray() + + For y As Integer = 0 To D_T_Datos.Rows.Count - 1 + Dim obj As JObject = New JObject(New JProperty(D_T_Datos.Rows(y)(0).ToString(), D_T_Datos.Rows(y)(0).ToString())) + jsonSeries.Add(obj) + Next + + Dim jsdatos As String = jsonData.ToString() + Dim jsseries As String = jsonSeries.ToString() + RegistraScript($"generaGrafico({jsdatos},{jsseries});") End Sub + End Class From f93e69ffb0cc83bfc0e3928bd81c284bea89fbca Mon Sep 17 00:00:00 2001 From: rakcsle Date: Fri, 15 Nov 2024 09:38:20 -0700 Subject: [PATCH 6/9] Compras devolucion en dolares --- App_Code/ClsProductosServicios.vb | 2 +- Compras/Compras.aspx | 2 +- Compras/Compras.aspx.vb | 19 ++++++++++++++----- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb index 9ea2ab57d..96195d57a 100644 --- a/App_Code/ClsProductosServicios.vb +++ b/App_Code/ClsProductosServicios.vb @@ -547,7 +547,7 @@ Public Class ClsProductosServicios ElseIf Ex1.Message.Contains("UK_ProductosServicios_EmpresaNumeroParte") Then Alert("El Nuevo Producto o Servicio tiene Numero de Parte duplicado:" & NumeroParte, TipoMensaje.MsgAdvertencia) Else - Alert("El Nuevo Producto o Servicio duplicado(ND):" & NumeroParte, TipoMensaje.MsgAdvertencia) + Alert("El Nuevo Producto o Servicio tiene un valor duplicado(ND):" & NumeroParte, TipoMensaje.MsgAdvertencia) End If diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx index c0bd4a9d4..06c444765 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -1481,7 +1481,7 @@
- + diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index e78190fe8..946fcb8ab 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -6781,7 +6781,10 @@ Partial Class Compras_Compras End If End If Else - Dim DiferenciaDevolucion As Decimal = importeMovimiento - TotalRealDevolucion + + + Dim DiferenciaDevolucion As Decimal = If(DdlMoneda.SelectedValue.ToEntero <> 1, (importeMovimiento * TxtTC.Text.ToDecimal), importeMovimiento) - TotalRealDevolucion + If TotalRealDevolucion <> 0 Then If Math.Abs(DiferenciaDevolucion) > 0 Then @@ -6795,7 +6798,7 @@ Partial Class Compras_Compras ErrorPrepoliza = True End If End If - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TotalRealDevolucion.RoundSQL(), (TotalRealDevolucion * tipoCambioActual).RoundSQL(), ConceptoContabilizacionNC, Referencia, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteME:=If(tipoCambioActual = 1, 0, TotalRealDevolucion).RoundSQL(), TipoCambio:=tipoCambioActual, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TotalRealDevolucion.RoundSQL(), (TotalRealDevolucion).RoundSQL(), ConceptoContabilizacionNC, Referencia, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteME:=If(tipoCambioActual = 1, 0, TotalRealDevolucion).RoundSQL(), TipoCambio:=tipoCambioActual, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True End If Else @@ -7725,7 +7728,7 @@ Partial Class Compras_Compras If Not ErrorPrepoliza AndAlso Not ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=4, AutoConta:=AutoConta) Then TieneError = True - If ObjConta.ValorPolizaDescuadre > 0 AndAlso UsuarioActual.CveRol = 1 Then + If ObjConta.ValorPolizaDescuadre > 0 Then Alert($"{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia}", TipoMensaje.MsgError) ErrorPrepolizaDescuadre = True End If @@ -13529,7 +13532,8 @@ Partial Class Compras_Compras Cantidad = Dr.FCTextBox("TxtCantidad").Text.ToDecimal If Cantidad > 0 Then realizadevolucion = True - subtotaldevolucion += Dr.DataKey("PU").ToString.ToDecimal * Cantidad + Dim PU As Decimal = If(DdlMoneda.SelectedValue.ToEntero <> 1, Dr.DataKey("PUExtranjero").ToString.ToDecimal, Dr.DataKey("PU").ToString.ToDecimal) + subtotaldevolucion += PU * Cantidad End If Next 'si no esta vinculado a nc simplemente me lo brinco @@ -13544,6 +13548,7 @@ Partial Class Compras_Compras Else Dim Acumulado As Decimal = 0 Dim PU As Decimal + Dim PUExtranjero As Decimal Dim CantidadRenglones As Integer = 0 Dim ii As Integer = 0 For Each Dr As GridViewRow In GVDevolucion.Rows @@ -13556,6 +13561,7 @@ Partial Class Compras_Compras If Dr.FCTextBox("TxtCantidad").Text.ToDouble > 0 Then Acumulado += (Dr.FCTextBox("TxtCantidad").Text.ToDecimal * Dr.DataKey("PU").ToString.ToDecimal) PU = Dr.DataKey("PU").ToString.ToDecimal + PUExtranjero = Dr.DataKey("PUExtranjero").ToString.ToDecimal ii += 1 If CantidadRenglones = ii Then Dim dif As Decimal = subtotal - Acumulado @@ -13581,7 +13587,7 @@ Partial Class Compras_Compras - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr.FCTextBox("TxtCantidad").Text.ToDecimal, Dr.DataKey("CveUM").ToString.ToEntero, Dr.DataKey("CvePS").ToString.ToEntero, PU, -1, CveMovimientoDetalleEntrada:=Dr.DataKey("CveMovimientoDetalle").ToString.ToEntero) Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr.FCTextBox("TxtCantidad").Text.ToDecimal, Dr.DataKey("CveUM").ToString.ToEntero, Dr.DataKey("CvePS").ToString.ToEntero, PU, -1, CveMovimientoDetalleEntrada:=Dr.DataKey("CveMovimientoDetalle").ToString.ToEntero, PUTC:=PUExtranjero) Then ErrorMovInv = True Exit For End If @@ -13598,7 +13604,10 @@ Partial Class Compras_Compras If ObjInventario.GetMovimientosDetalle(CveMovimientoEntrada, UsuarioActual.CveEmpresa, -1) Then For Each drow As DataRow In ObjInventario.DtResultados.Rows + + TotalSumaPU = TotalSumaPU + drow("Total").ToString.ToDecimal + Next End If From 531c6fd9447ca178cc1049f28787421b6918f3d2 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Sat, 16 Nov 2024 13:45:15 -0700 Subject: [PATCH 7/9] --FIX impresion traspaso --- Inventarios/TraspasoAlmacen.aspx.vb | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb index ed6e4b4e1..0f6103c6a 100644 --- a/Inventarios/TraspasoAlmacen.aspx.vb +++ b/Inventarios/TraspasoAlmacen.aspx.vb @@ -2775,10 +2775,10 @@ Partial Class Inventarios_TraspasoAlmacen If ObjTimbres.Timbrar(CvePACEspecifico:=4) Then Try - PdfFactura(ObjTimbres.ObjFactura) ObjTimbres.ObjFactura.Inv_CveMovimiento = CveMovimientoTimbrado + PdfFactura(ObjTimbres.ObjFactura) Catch ex As Exception - + OnError("Ocurrió un error al generar el pdf", ex) End Try MensajeAlert.Append("Emitido con éxito.") @@ -2788,11 +2788,6 @@ Partial Class Inventarios_TraspasoAlmacen MensajeAlert.AppendFormat("", Encripta(String.Format("OP=DesXmlTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", CveMovimientoTimbrado, "XML", ObjTimbres.ObjFactura.SerieFolio, ObjTimbres.ObjFactura.TipoDocto))) End If 'PDF - 'Dim ArchivoPDF = String.Format("{0}/PDF/{1}/{2}.pdf", UsuarioActual.Empresa.Ruta, ObjTimbres.ObjFactura.TipoDocto, ObjTimbres.ObjFactura.SerieFolio) - 'If File.Exists(ArchivoPDF) Then - ' MensajeAlert.AppendFormat("", Encripta(String.Format("OP=DesPdfTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", CveMovimientoTimbrado, "PDF", ObjTimbres.ObjFactura.SerieFolio, ObjTimbres.ObjFactura.TipoDocto))) - 'End If - If ChkEmitirCartaPorte.Checked Then MensajeAlert.AppendFormat("", Encripta(String.Format("OP=CARPOTIMBRE&CVETIMBRE={0}", CveTimbre))) Else From 556a479822e5a9cf271f7069e36fb3b38e8c464b Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Sat, 16 Nov 2024 14:40:58 -0700 Subject: [PATCH 8/9] =?UTF-8?q?Econo=20-=20Aplicaci=C3=B3n=20anticipo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsPaginas.vb | 36 ++++++++++++++++++++++++++++++++++++ Ventas/Ventas.aspx.vb | 7 +++++-- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index a0a451539..17eb43f04 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -9502,7 +9502,9 @@ Public Class ClsPaginas ImporteMovimiento = (PorcentajePago * VentaActual.IVA).RoundSQL ImporteMN = (ImporteMovimiento * VentaActual.TC).RoundSQL If VentaActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 13, VentaActual.SerieFolio, Concepto, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, PorcentajeImpuesto:=VentaActual.PorcentajeIVA, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto, CveCompra:=Pago.CveCompraRelacionada) Then ErrorMovtos = True + 'si tiene funcionalidad para tomar el TC de pago. se recalcula el importe If FuncionalidadFluctuacionImpuestos Then ImporteMN = (ImporteMovimiento * TCValuacionPago).RoundSQL If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 61, VentaActual.SerieFolio, Concepto, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, PorcentajeImpuesto:=VentaActual.PorcentajeIVA, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto, CveCompra:=Pago.CveCompraRelacionada) Then ErrorMovtos = True @@ -9540,6 +9542,39 @@ Public Class ClsPaginas End If End If + If Pago.AplicaConceptoImpuestoPendiente Then + 'si tiene iva y su proporcion + If Not ErrorMovtos AndAlso VentaActual.IVA <> 0 Then + ImporteMovimiento = (PorcentajePago * VentaActual.IVA).RoundSQL + ImporteMN = (ImporteMovimiento * VentaActual.TC).RoundSQL + If VentaActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento + + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 13, VentaActual.SerieFolio, Concepto, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, PorcentajeImpuesto:=VentaActual.PorcentajeIVA, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto, CveCompra:=Pago.CveCompraRelacionada) Then ErrorMovtos = True + End If + 'si tiene RET IVA y su proporcion + If Not ErrorMovtos AndAlso VentaActual.RetIVA > 0 Then + ImporteMovimiento = (PorcentajePago * VentaActual.RetIVA).RoundSQL + ImporteMN = (ImporteMovimiento * VentaActual.TC).RoundSQL + If VentaActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 8, VentaActual.SerieFolio, Concepto, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto, CveCompra:=Pago.CveCompraRelacionada) Then ErrorMovtos = True + End If + 'si tiene Ret ISR y su proporcion + If Not ErrorMovtos AndAlso VentaActual.RetISR > 0 Then + ImporteMovimiento = (PorcentajePago * VentaActual.RetISR).RoundSQL + ImporteMN = (ImporteMovimiento * VentaActual.TC).RoundSQL + If VentaActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 9, VentaActual.SerieFolio, Concepto, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto, CveCompra:=Pago.CveCompraRelacionada) Then ErrorMovtos = True + End If + 'si tiene IEPS y su proporcion + If Not ErrorMovtos AndAlso VentaActual.IEPS > 0 Then + ImporteMovimiento = (PorcentajePago * VentaActual.IEPS).RoundSQL + ImporteMN = (ImporteMovimiento * VentaActual.TC).RoundSQL + If VentaActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento + Dim Ret As New ConceptosRetenciones + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 38, VentaActual.SerieFolio, Concepto, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto, CveCompra:=Pago.CveCompraRelacionada) Then ErrorMovtos = True + End If + End If + 'concepto pago If Pago.TipoPago = "B" AndAlso Not ErrorMovtos AndAlso AplicarConceptoAplicacion Then ' B A N C O S Concepto = String.Format("{0} NC:{1}", VentaActual.ClienteNombre, Pago.Referencia) @@ -9683,6 +9718,7 @@ Public Class ClsPaginas Public Property CveClientePago As Integer = -1 Public Property ImporteFluctuacionAdicional As Decimal = 0 Public Property ValorMultiplicador As Decimal = 1 + Public Property AplicaConceptoImpuestoPendiente As Boolean = False End Class Public Class Venta diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 7910d3c62..2a4c697b2 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -17474,10 +17474,12 @@ Partial Class Ventas Case "3", "295" importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal - ((gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / gvr.DataKey("TotalAnticipo").ToDecimal) * gvr.DataKey("IVAAnticipo").ToDecimal) + importeMN = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal + If importeMovimiento <> 0 Then Dim Pago As New VentaPago - Pago.ImportePagoVenta = importeMovimiento + Pago.ImportePagoVenta = importeMN Pago.ImportePago = importeMovimiento Pago.CveIE = CveIEAnticipo Pago.CveMonedaPago = gvr.DataKey("CveMoneda").ToEntero() @@ -17487,6 +17489,7 @@ Partial Class Ventas Pago.TCPago = gvr.DataKey("TipoCambio").ToDecimal Pago.AplicaTraslado = gvr.DataKey("RegresarImpuesto") = "1" Pago.Referencia = gvr.DataKey("Folio") + Pago.AplicaConceptoImpuestoPendiente = (Not gvr.DataKey("RegresarImpuesto") = "1") AndAlso (VentaActual.IVA > 0 OrElse VentaActual.IEPS > 0) ErrorConta = AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjConta) @@ -17608,7 +17611,7 @@ Partial Class Ventas ObjConta.Commit() BtnAceptarAnticipos.Enabled = False - Alert(Msg.ToString(), TipoMensaje.MsgInformacion) + Alert(Msg.ToString(), TipoMensaje.MsgInformacion, JSBtnAceptar:="BtnRefrescarPagina();", ShowCloseButton:=False) End If ObjConta.Dispose() From c800ccc7afee0d41b5a56164020fd3ea4ae57910 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Tue, 19 Nov 2024 15:46:09 -0700 Subject: [PATCH 9/9] VyA RepContratoCalendario, rdlc rep anomalias, Compras gv Inv requerir lote y fecha de caducidad --- Compras/Compras.aspx | 88 +- Compras/Compras.aspx.vb | 286 +- Compras/eFacturas.aspx.vb | 7 +- Empresas/Grales/Formatos/RepAnomalias.rdlc | 6907 ++++++++++---------- Transportes/RepContratosCalendario.aspx | 379 +- Transportes/RepContratosCalendario.aspx.vb | 92 +- 6 files changed, 4029 insertions(+), 3730 deletions(-) diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx index 06c444765..0a205a1e2 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -1305,9 +1305,11 @@ - + <%--0--%> Aplica
@@ -1318,6 +1320,7 @@
+ <%--1--%> @@ -1329,7 +1332,7 @@ - + <%--2--%> Unidad @@ -1338,9 +1341,11 @@ - <%----%> + <%--3--%> + <%--4--%> + <%--5--%> @@ -1350,6 +1355,7 @@ + <%--6--%> @@ -1358,11 +1364,31 @@ - <%-- - - - - --%> + <%--7--%> + + + + + + <%--8--%> + + + +
+ + + + + + + + + +
+ +
+
+ <%--9--%> Almacén Consignación
@@ -1371,7 +1397,8 @@ -
+
+ <%--10--%> @@ -1384,11 +1411,7 @@ - <%-- - - - - --%> + @@ -5639,7 +5662,6 @@ -