From 44dd59c023c51a16a482bad7e590022f343a0105 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 26 Nov 2022 13:50:02 -0700 Subject: [PATCH 01/56] -- que genere el log al consultar --- Ashx/E119.ashx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Ashx/E119.ashx b/Ashx/E119.ashx index 782584b41..3bcda13fb 100644 --- a/Ashx/E119.ashx +++ b/Ashx/E119.ashx @@ -196,6 +196,8 @@ Public Class E119 : Implements IHttpHandler TieneError = True End If End Using + Dim Msg As String = "Consultado día: " & Fecha.ToShortDateString + Msg.GuardaLogAD("LogE119") Else RespuestaError.message = "la fecha no es leida correctamente" TieneError = True From 95d5e901c6706707411069ce245921af96363727 Mon Sep 17 00:00:00 2001 From: MLopez Date: Wed, 30 Nov 2022 09:07:29 -0700 Subject: [PATCH 02/56] E172 Rep Indicador Resumen: Agregar tabla de Indicadores agrupada por Proveedor --- App_Code/ClsCGame.vb | 20 +++++++++ Compras/Compras.aspx.vb | 4 ++ General/RepIndicadorResumen.aspx | 63 ++++++++++++++++++++++++++++- General/RepIndicadorResumen.aspx.vb | 46 +++++++++++++++++++-- 4 files changed, 129 insertions(+), 4 deletions(-) diff --git a/App_Code/ClsCGame.vb b/App_Code/ClsCGame.vb index ce78e577c..7622d3cae 100644 --- a/App_Code/ClsCGame.vb +++ b/App_Code/ClsCGame.vb @@ -3390,6 +3390,26 @@ Public Class ClsCGame End Function +#End Region + +#Region "INDICADORES" + + Public Function GetIndicadores(CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Citrus_IndicadoresGet") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener los indicadores.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return Retorno + End Function + + #End Region #Region "IDisposable Support" diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 52b8f4eff..e7ae66cd7 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1,10 +1,14 @@ Option Explicit On Option Strict On +Imports System.Data +Imports System.Xml Imports System.Diagnostics Imports System.Globalization Imports System.IO Imports System.Threading.Tasks +Imports Newtonsoft.Json +Imports Extensiones Partial Class Compras_Compras diff --git a/General/RepIndicadorResumen.aspx b/General/RepIndicadorResumen.aspx index 150701480..1fb38f090 100644 --- a/General/RepIndicadorResumen.aspx +++ b/General/RepIndicadorResumen.aspx @@ -348,7 +348,7 @@ CssClass="table table-striped table-advance table-hover ScrollAD " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False"> - + @@ -381,6 +381,66 @@ +
+
+ + +
+
+ + Indicadores por Proveedor +
+
+
+
+
+
+ +
+
+
+ + + + + + + + + + + +
+
+
+
+ + <%--
+ + +
+
+ + Indicadores - Gráfica +
+
+
+
+
+
+ +
+
+
+
+
+
+
+
--%> +
+ @@ -435,6 +495,7 @@ AmCharts.makeChart("chartdiv_cxp192", { ...chartconfig, dataProvider: json["CxP192"] }); // Compras x Producto ProveedorClasificacion 192 AmCharts.makeChart("chartdiv_ccxc", { ...chartconfig, dataProvider: json["CCxC"] }); // Cuentas por Cobrar x Cliente AmCharts.makeChart("chartdiv_cpxp", { ...chartconfig, dataProvider: json["CPxP"] }); // Cuentas por Pagar x Proveedor + // AmCharts.makeChart("chartdiv_indicadores", { ...chartconfig, dataProvider: json["Indicadores"] }); // Indicadores por Proveedor document.getElementById('amChartsAttribution').style.visibility = 'visible'; } diff --git a/General/RepIndicadorResumen.aspx.vb b/General/RepIndicadorResumen.aspx.vb index 64dd89557..f25a5be80 100644 --- a/General/RepIndicadorResumen.aspx.vb +++ b/General/RepIndicadorResumen.aspx.vb @@ -77,6 +77,20 @@ Partial Class General_RepIndicadorResumen ViewState("CPxP") = value End Set End Property + Private Property Indicadores As DataTable + Get + + If ViewState("Indicadores") Is Nothing Then + Return New DataTable + Else + Return DirectCast(ViewState("Indicadores"), DataTable) + End If + + End Get + Set(value As DataTable) + ViewState("Indicadores") = value + End Set + End Property Private Property DtColor As DataTable Get @@ -126,7 +140,8 @@ Partial Class General_RepIndicadorResumen Dim ObjVentas As New ClsVentas Dim ObjCompras As New ClsCompras - Dim ObjMovtos As New ClsMovimientos() + Dim ObjMovtos As New ClsMovimientos + Dim ObjCitrus As New ClsCGame If ObjVentas.GetRepProductosServicios(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, TxtFechaI.Text.Trim(), TxtFechaF.Text.Trim(), MinFecha, MaxFecha, -1, -1, -1, -1, -1, "-1", UsuarioActual.CveEmpresa, 5, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoCambio:=1) Then @@ -177,17 +192,28 @@ Partial Class General_RepIndicadorResumen CPxP = Nothing End If + If ObjCitrus.GetIndicadores(UsuarioActual.CveEmpresa) Then + + Indicadores = ObjCitrus.DtResultados + GvIndicadores.DataSource = Indicadores + Else + GvIndicadores.DataSource = Nothing + Indicadores = Nothing + End If + ObjVentas.Dispose() ObjCompras.Dispose() ObjMovtos.Dispose() + ObjCitrus.Dispose() GvVxP.DataBind() GvCxP192.DataBind() GvCxP.DataBind() GvCCxC.DataBind() GvCPxP.DataBind() + GvIndicadores.DataBind() - ' Mostrar gráficos solo si hay datos en su respectiva tabla + 'Mostrar gráficos solo si hay datos en su respectiva tabla If GvVxP.Rows.Count > 0 Then UPGraficaVxP.Visible = True Else @@ -213,8 +239,13 @@ Partial Class General_RepIndicadorResumen Else UPGraficaCPxP.Visible = False End If + 'If GvIndicadores.Rows.Count > 0 Then + ' UPGraficaIndicadores.Visible = True + 'Else + ' UPGraficaIndicadores.Visible = False + 'End If - ' Si no había datos en ninguna tabla no cargar función de gráficos + 'Si no había datos en ninguna tabla no cargar función de gráficos If (GvVxP.Rows.Count = 0 AndAlso GvCxP.Rows.Count = 0 AndAlso GvCxP192.Rows.Count = 0 AndAlso GvCCxC.Rows.Count = 0 AndAlso GvCPxP.Rows.Count = 0) Then Exit Sub GraficasPastel() 'GraficasBarras() @@ -247,6 +278,13 @@ Partial Class General_RepIndicadorResumen End If End If End Sub + Protected Sub GvIndicadores_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvIndicadores.RowDataBound + 'If e.Row.RowType = DataControlRowType.DataRow Then + ' If e.Row.DBCampo("Orden") = "" Then + ' e.Row.CssClass = "Totales" + ' End If + 'End If + End Sub Private Sub CreaDataTableColor() DtColor = New DataTable DtColor.Columns.Add("Color") @@ -447,6 +485,8 @@ Partial Class General_RepIndicadorResumen Next Dim query_cpxp = From s In DtCPxP.AsEnumerable() Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()} + 'TODO: Indicadores x Proveedor -- Determinar qué poner en la gráfica con E172 + 'Serializar datos agrupándolos en su respectivo DataTable, todos en un solo JSON Dim json As String = Newtonsoft.Json.JsonConvert.SerializeObject(New With {.VxP = query_vxp, .CxP = query_cxp, .CxP192 = query_cxp192, .CCxC = query_ccxc, .CPxP = query_cpxp}) 'Dim json As String = Newtonsoft.Json.JsonConvert.SerializeObject(New With {.VxP = query_vxp, .CCxC = New String() {}}) From 2d83db0b82d799afc879e4a9cc07451850d1b880 Mon Sep 17 00:00:00 2001 From: MLopez Date: Wed, 30 Nov 2022 14:12:10 -0700 Subject: [PATCH 03/56] =?UTF-8?q?E172=20Rep=20Indicador=20Resumen:=20Afina?= =?UTF-8?q?r=20informaci=C3=B3n=20de=20las=20tablas=20-Los=20saldos=20y=20?= =?UTF-8?q?totales=20ahora=20se=20muestran=20como=20campos=20de=20moneda?= =?UTF-8?q?=20para=20distinguirlos=20mejor=20de=20las=20cantidades=20-El?= =?UTF-8?q?=20tipo=20de=20moneda=20por=20entrada=20ahora=20se=20visualiza?= =?UTF-8?q?=20en=20las=20tablas=20-Las=20tablas=20ahora=20se=20ordenan=20p?= =?UTF-8?q?or=20subtotal=20y=20moneda=20o=20saldo=20y=20moneda=20-Las=20gr?= =?UTF-8?q?=C3=A1ficas=20ahora=20solo=20grafican=20el=20Top=2025=20de=20ca?= =?UTF-8?q?da=20tabla?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cambios en BD [SIG_Resp_MLR]: - Se modificó PA_Citrus_IndicadoresGet - +2 param: @FechaI @FechaF - Ahora filtra por CveTipoProveedor = 192 (Productor) - Se modificó PA_Vta_GetRepPS + columna Abreviatura, los totales usan la Abreviatura ahora en vez de Moneda --- App_Code/ClsCGame.vb | 4 +- General/RepIndicadorResumen.aspx | 33 +++++++----- General/RepIndicadorResumen.aspx.vb | 83 +++++++++++++++++++++++------ 3 files changed, 92 insertions(+), 28 deletions(-) diff --git a/App_Code/ClsCGame.vb b/App_Code/ClsCGame.vb index 7622d3cae..25c25c7a7 100644 --- a/App_Code/ClsCGame.vb +++ b/App_Code/ClsCGame.vb @@ -3394,11 +3394,13 @@ Public Class ClsCGame #Region "INDICADORES" - Public Function GetIndicadores(CveEmpresa As Integer) As Boolean + Public Function GetIndicadores(CveEmpresa As Integer, FechaI As Date, FechaF As Date) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Citrus_IndicadoresGet") With SqlAdapter.SelectCommand.Parameters .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@FechaI", SqlDbType.Date).Value = FechaI + .Add("@FechaF", SqlDbType.Date).Value = FechaF End With Try SqlAdapter.Fill(Data) diff --git a/General/RepIndicadorResumen.aspx b/General/RepIndicadorResumen.aspx index 1fb38f090..bbe65bf2a 100644 --- a/General/RepIndicadorResumen.aspx +++ b/General/RepIndicadorResumen.aspx @@ -127,7 +127,8 @@ - + + @@ -183,9 +184,14 @@ - + + + <%-- + --%> @@ -239,7 +245,8 @@ - + + @@ -294,7 +301,8 @@ AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False"> - + + @@ -349,7 +357,8 @@ AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False"> - + + @@ -388,7 +397,7 @@
- Indicadores por Proveedor + Indicadores por Proveedor Productor
@@ -405,11 +414,11 @@ - - + + - - + +
@@ -423,7 +432,7 @@
- Indicadores - Gráfica + Indicadores por Proveedor Productor- Gráfica
@@ -495,7 +504,7 @@ AmCharts.makeChart("chartdiv_cxp192", { ...chartconfig, dataProvider: json["CxP192"] }); // Compras x Producto ProveedorClasificacion 192 AmCharts.makeChart("chartdiv_ccxc", { ...chartconfig, dataProvider: json["CCxC"] }); // Cuentas por Cobrar x Cliente AmCharts.makeChart("chartdiv_cpxp", { ...chartconfig, dataProvider: json["CPxP"] }); // Cuentas por Pagar x Proveedor - // AmCharts.makeChart("chartdiv_indicadores", { ...chartconfig, dataProvider: json["Indicadores"] }); // Indicadores por Proveedor + // AmCharts.makeChart("chartdiv_indicadores", { ...chartconfig, dataProvider: json["Indicadores"] }); // Indicadores por Proveedor Productor document.getElementById('amChartsAttribution').style.visibility = 'visible'; } diff --git a/General/RepIndicadorResumen.aspx.vb b/General/RepIndicadorResumen.aspx.vb index f25a5be80..29e79f3e9 100644 --- a/General/RepIndicadorResumen.aspx.vb +++ b/General/RepIndicadorResumen.aspx.vb @@ -77,6 +77,22 @@ Partial Class General_RepIndicadorResumen ViewState("CPxP") = value End Set End Property +#If False Then + Private Property gv1 As DataTable + Get + + If ViewState("gv1") Is Nothing Then + Return New DataTable + Else + Return DirectCast(ViewState("gv1"), DataTable) + End If + + End Get + Set(value As DataTable) + ViewState("gv1") = value + End Set + End Property +#End If Private Property Indicadores As DataTable Get @@ -146,6 +162,8 @@ Partial Class General_RepIndicadorResumen If ObjVentas.GetRepProductosServicios(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, TxtFechaI.Text.Trim(), TxtFechaF.Text.Trim(), MinFecha, MaxFecha, -1, -1, -1, -1, -1, "-1", UsuarioActual.CveEmpresa, 5, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoCambio:=1) Then VxP = ObjVentas.DtResultados + VxP.DefaultView.Sort = "CveMoneda,SubTotal DESC" + VxP = VxP.DefaultView.ToTable GvVxP.DataSource = VxP Else GvVxP.DataSource = Nothing @@ -155,6 +173,8 @@ Partial Class General_RepIndicadorResumen If ObjCompras.GetRepProductosServicios(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, TxtFechaI.Text.Trim(), TxtFechaF.Text.Trim(), -1, -1, -1, UsuarioActual.CveEmpresa, 5, -1, -1, "-1", "-1", -1, TipoCambio:=1, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveProveedorClasificacion:=192) Then CxP192 = ObjCompras.DtResultados + CxP192.DefaultView.Sort = "CveMoneda,SubTotal DESC" + CxP192 = CxP192.DefaultView.ToTable GvCxP192.DataSource = CxP192 Else GvCxP192.DataSource = Nothing @@ -164,6 +184,8 @@ Partial Class General_RepIndicadorResumen If ObjCompras.GetRepProductosServicios(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, TxtFechaI.Text.Trim(), TxtFechaF.Text.Trim(), -1, -1, -1, UsuarioActual.CveEmpresa, 5, -1, -1, "-1", "-1", -1, TipoCambio:=1, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveTipoProveedor:=1) Then CxP = ObjCompras.DtResultados + CxP.DefaultView.Sort = "CveMoneda,SubTotal DESC" + CxP = CxP.DefaultView.ToTable GvCxP.DataSource = CxP Else GvCxP.DataSource = Nothing @@ -176,6 +198,8 @@ Partial Class General_RepIndicadorResumen "-1", "-1", "-1", FechaCorte:=FechaCorte.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then CCxC = ObjMovtos.DtResultados + CCxC.DefaultView.Sort = "CveMoneda,Saldo DESC" + CCxC = CCxC.DefaultView.ToTable GvCCxC.DataSource = CCxC Else GvCCxC.DataSource = Nothing @@ -186,15 +210,28 @@ Partial Class General_RepIndicadorResumen "-1", "-1", "-1", FechaCorte:=FechaCorte.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then CPxP = ObjMovtos.DtResultados + CPxP.DefaultView.Sort = "CveMoneda,Saldo DESC" + CPxP = CPxP.DefaultView.ToTable GvCPxP.DataSource = CPxP Else GvCPxP.DataSource = Nothing CPxP = Nothing End If - If ObjCitrus.GetIndicadores(UsuarioActual.CveEmpresa) Then + 'If ObjCompras.GetRepProductosServicios(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, TxtFechaI.Text.Trim(), TxtFechaF.Text.Trim(), -1, -1, -1, + ' UsuarioActual.CveEmpresa, 5, -1, -1, "-1", "-1", -1, TipoCambio:=1, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveProveedorClasificacion:=192) Then + ' gv1 = ObjCompras.DtResultados + ' GridView1.DataSource = gv1 + 'Else + ' GridView1.DataSource = Nothing + ' gv1 = Nothing + 'End If + + If ObjCitrus.GetIndicadores(UsuarioActual.CveEmpresa, TxtFechaI.Text, TxtFechaF.Text) Then Indicadores = ObjCitrus.DtResultados + Indicadores.DefaultView.Sort = "Saldo DESC" + Indicadores = Indicadores.DefaultView.ToTable GvIndicadores.DataSource = Indicadores Else GvIndicadores.DataSource = Nothing @@ -209,6 +246,7 @@ Partial Class General_RepIndicadorResumen GvVxP.DataBind() GvCxP192.DataBind() GvCxP.DataBind() + 'GridView1.DataBind() GvCCxC.DataBind() GvCPxP.DataBind() GvIndicadores.DataBind() @@ -259,8 +297,19 @@ Partial Class General_RepIndicadorResumen End Sub Protected Sub GvCxP_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCxP.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then - If e.Row.DBCampo("Orden") = "" Then + 'e.Row.Cells(0).Text = e.Row.DBCampo("Orden") + If e.Row.DBCampo("Orden") = "00ND" Then e.Row.CssClass = "Totales" + e.Row.Cells(0).Text = "Total " + e.Row.DBCampo("Abreviatura") + End If + End If + End Sub + Protected Sub GvCxP192_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCxP192.RowDataBound + If e.Row.RowType = DataControlRowType.DataRow Then + 'e.Row.Cells(0).Text = e.Row.DBCampo("Orden") + If e.Row.DBCampo("Orden") = "00ND" Then + e.Row.CssClass = "Totales" + e.Row.Cells(0).Text = "Total " + e.Row.DBCampo("Abreviatura") End If End If End Sub @@ -269,6 +318,8 @@ Partial Class General_RepIndicadorResumen If e.Row.DBCampo("Orden") = "" Then e.Row.CssClass = "Totales" End If + 'TODO: Sería mejor usar la Abreviatura de la tabla, pero habría que extender PA_Comp_RepCxP para incluir la columna Abreviatura + e.Row.Cells(2).Text = $"{GlobalDTMonedas().FiltraParametros($"CveMoneda = {e.Row.DBCampo("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}" End If End Sub Protected Sub GvCPxP_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCPxP.RowDataBound @@ -276,6 +327,8 @@ Partial Class General_RepIndicadorResumen If e.Row.DBCampo("Orden") = "" Then e.Row.CssClass = "Totales" End If + 'TODO: Sería mejor usar la Abreviatura de la tabla, pero habría que extender PA_Comp_RepCxP para incluir la columna Abreviatura + e.Row.Cells(2).Text = $"{GlobalDTMonedas().FiltraParametros($"CveMoneda = {e.Row.DBCampo("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}" End If End Sub Protected Sub GvIndicadores_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvIndicadores.RowDataBound @@ -377,7 +430,7 @@ Partial Class General_RepIndicadorResumen Row("Texto") = $"{Dr("GPO").ToString} {GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}" Row("Valor") = Dr("SubTotal").ToString.FormatoNumero Row("Color") = DtColor.Rows(RowColorIndex)("Color").ToString - Row("Moneda") = Dr("Moneda").ToString + Row("Moneda") = Dr("Abreviatura").ToString DtVxP.Rows.Add(Row) RowColorIndex += 1 If RowColorIndex = 17 Then @@ -385,7 +438,7 @@ Partial Class General_RepIndicadorResumen End If End If Next - Dim query_vxp = From s In DtVxP.AsEnumerable() Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()} + Dim query_vxp = From s In DtVxP.AsEnumerable().Take(25) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()} 'Compras x Producto TipoProveedor=1 DtCxP.Reset() @@ -395,13 +448,13 @@ Partial Class General_RepIndicadorResumen DtCxP.Columns.Add("Moneda") RowColorIndex = 0 For Each Dr As DataRow In CxP.Rows - If Not Dr("Orden").ToString = "" Then + If Not Dr("Orden").ToString = "00ND" Then Dim Row As DataRow = Nothing Row = DtCxP.NewRow() Row("Texto") = $"{Dr("GPO").ToString} {GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}" Row("Valor") = Dr("SubTotal").ToString.FormatoNumero Row("Color") = DtColor.Rows(RowColorIndex)("Color").ToString - Row("Moneda") = Dr("Moneda").ToString + Row("Moneda") = Dr("Abreviatura").ToString DtCxP.Rows.Add(Row) RowColorIndex += 1 If RowColorIndex = 17 Then @@ -409,7 +462,7 @@ Partial Class General_RepIndicadorResumen End If End If Next - Dim query_cxp = From s In DtCxP.AsEnumerable() Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()} + Dim query_cxp = From s In DtCxP.AsEnumerable().Take(25) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()} 'Compras x Producto ProveedorClasificacion=192 DtCxP192.Reset() @@ -419,13 +472,13 @@ Partial Class General_RepIndicadorResumen DtCxP192.Columns.Add("Moneda") RowColorIndex = 0 For Each Dr As DataRow In CxP192.Rows - If Not Dr("Orden").ToString = "" Then + If Not Dr("Orden").ToString = "00ND" Then Dim Row As DataRow = Nothing Row = DtCxP192.NewRow() Row("Texto") = $"{Dr("GPO").ToString} {GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}" Row("Valor") = Dr("SubTotal").ToString.FormatoNumero Row("Color") = DtColor.Rows(RowColorIndex)("Color").ToString - Row("Moneda") = Dr("Moneda").ToString + Row("Moneda") = Dr("Abreviatura").ToString DtCxP192.Rows.Add(Row) RowColorIndex += 1 If RowColorIndex = 17 Then @@ -433,7 +486,7 @@ Partial Class General_RepIndicadorResumen End If End If Next - Dim query_cxp192 = From s In DtCxP192.AsEnumerable() Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()} + Dim query_cxp192 = From s In DtCxP192.AsEnumerable().Take(25) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()} 'Alert(Newtonsoft.Json.JsonConvert.SerializeObject(CCxC.Rows)) @@ -451,7 +504,7 @@ Partial Class General_RepIndicadorResumen Row("Texto") = $"{Dr("GPO").ToString} {GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}" Row("Valor") = Dr("Saldo").ToString.FormatoNumero Row("Color") = DtColor.Rows(RowColorIndex)("Color").ToString - Row("Moneda") = Dr("Moneda").ToString + Row("Moneda") = $"{GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}" DtCCxC.Rows.Add(Row) RowColorIndex += 1 If RowColorIndex = 17 Then @@ -459,7 +512,7 @@ Partial Class General_RepIndicadorResumen End If End If Next - Dim query_ccxc = From s In DtCCxC.AsEnumerable() Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()} + Dim query_ccxc = From s In DtCCxC.AsEnumerable().Take(25) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()} 'Cuentas por pagar x Proveedor DtCPxP.Reset() @@ -475,7 +528,7 @@ Partial Class General_RepIndicadorResumen Row("Texto") = $"{Dr("GPO").ToString} {GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}" Row("Valor") = Dr("Saldo").ToString.FormatoNumero Row("Color") = DtColor.Rows(RowColorIndex)("Color").ToString - Row("Moneda") = Dr("Moneda").ToString + Row("Moneda") = $"{GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}" DtCPxP.Rows.Add(Row) RowColorIndex += 1 If RowColorIndex = 17 Then @@ -483,11 +536,11 @@ Partial Class General_RepIndicadorResumen End If End If Next - Dim query_cpxp = From s In DtCPxP.AsEnumerable() Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()} + Dim query_cpxp = From s In DtCPxP.AsEnumerable().Take(25) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()} 'TODO: Indicadores x Proveedor -- Determinar qué poner en la gráfica con E172 - 'Serializar datos agrupándolos en su respectivo DataTable, todos en un solo JSON + 'Serializar datos agrupándolos por su respectivo DataTable, todos en un solo JSON Dim json As String = Newtonsoft.Json.JsonConvert.SerializeObject(New With {.VxP = query_vxp, .CxP = query_cxp, .CxP192 = query_cxp192, .CCxC = query_ccxc, .CPxP = query_cpxp}) 'Dim json As String = Newtonsoft.Json.JsonConvert.SerializeObject(New With {.VxP = query_vxp, .CCxC = New String() {}}) 'Alert(json) From 10ffcd0cee19de3bc570b9ddc087ad6c8d24b96a Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 30 Nov 2022 18:34:18 -0700 Subject: [PATCH 04/56] -- ws polizavirtual --- Ventas/Ventas.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index c60c002ed..049dfe8cf 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -33452,7 +33452,7 @@ Partial Class Ventas End If ObjFactura.SetSubProyecto() - 'EnviarPolizaVentaWS(obj, CvePolizaVirtual, ObjFactura.SubProyecto.Acum_PortalUsuario, ObjFactura.SubProyecto.Acum_PortalContrasena) + EnviarPolizaVentaWS(obj, CvePolizaVirtual, ObjFactura.SubProyecto.Acum_PortalUsuario, ObjFactura.SubProyecto.Acum_PortalContrasena) End If Next From 643c0b71f6da33f41863e00a775708bb75b7271f Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 30 Nov 2022 18:34:40 -0700 Subject: [PATCH 05/56] tipomovto pago concepto 21 --- App_Code/ClsPaginas.vb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index aed6a7b25..51ad3ab9e 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -9800,13 +9800,13 @@ Public Class ClsPaginas Dim Ret As New ConceptosRetenciones If Pago.CveMonedaPago > 1 Then 'Agregamos la Extranjera - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 21, Pago.Referencia, Concepto, CompraActual.IdCtaContableAnticipoProv, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, 21, Pago.Referencia, Concepto, CompraActual.IdCtaContableAnticipoProv, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImporteMN, 266, Pago.Referencia, Concepto, CompraActual.IdCtaContableAnticipoProvComplementaria, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, ImporteMN, 266, Pago.Referencia, Concepto, CompraActual.IdCtaContableAnticipoProvComplementaria, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True Else 'Agregamos Nacional - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 21, Pago.Referencia, Concepto, CompraActual.IdCtaContableAnticipoProv, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, 21, Pago.Referencia, Concepto, CompraActual.IdCtaContableAnticipoProv, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago) Then ErrorMovtos = True End If From 4024b09f86a07c1b71ea6d518ba2ef47bae90f1b Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Thu, 1 Dec 2022 12:13:20 -0700 Subject: [PATCH 06/56] Entradas Salidas Mrt --- Empresas/Grales/Formatos/EntradaSalida.mrt | 677 +++++++++++++++++++++ 1 file changed, 677 insertions(+) create mode 100644 Empresas/Grales/Formatos/EntradaSalida.mrt diff --git a/Empresas/Grales/Formatos/EntradaSalida.mrt b/Empresas/Grales/Formatos/EntradaSalida.mrt new file mode 100644 index 000000000..7ed95f52d --- /dev/null +++ b/Empresas/Grales/Formatos/EntradaSalida.mrt @@ -0,0 +1,677 @@ + + + + + + + + DsInventarios + + Codigo,System.String + PS,System.String + UnidadMedida,System.String + PU,System.Decimal + Cantidad,System.Decimal + Total,System.Decimal + Descuento,System.Decimal + CodigoAF,System.String + Almacen,System.String + Lote,System.String + Batch,System.String + SerieLote,System.String + + + 9f26b214e5b34695ab9f7508c6bb98f2 + DsInventarios + Datos.DsInventarios + + + + + + + ReportParameters,Empresa,Empresa,ReportParameter1,System.String,,False,False,True,False + ReportParameters,Almacen,Almacen,ReportParameter1,System.String,,False,False,True,False + ReportParameters,Folio,Folio,ReportParameter1,System.String,,False,False,True,False + ReportParameters,Concepto,Concepto,ReportParameter1,System.String,,False,False,True,False + ReportParameters,Fecha,Fecha,ReportParameter1,System.String,,False,False,True,False + ReportParameters,FechaImpresion,FechaImpresion,ReportParameter1,System.String,,False,False,True,False + ReportParameters,Descuentos,Descuentos,ReportParameter1,System.String,,False,False,True,False + ReportParameters,IVA,IVA,ReportParameter1,System.String,,False,False,True,False + ReportParameters,Total,Total,ReportParameter1,System.String,,False,False,True,False + ReportParameters,NombreRecibio,NombreRecibio,ReportParameter1,System.String,,False,False,True,False + ReportParameters,NombreEntrego,NombreEntrego,ReportParameter1,System.String,,False,False,True,False + ReportParameters,LogoPath,LogoPath,ReportParameter1,System.String,,False,False,True,False + ReportParameters,FacturaProveedor,FacturaProveedor,ReportParameter1,System.String,,False,False,True,False + ReportParameters,Observaciones,Observaciones,ReportParameter1,System.String,,False,False,True,False + ReportParameters,FacturadoA,FacturadoA,ReportParameter1,System.String,,False,False,True,False + ReportParameters,UsuarioImprimio,UsuarioImprimio,ReportParameter1,System.String,,False,False,True,False + ReportParameters,DomicilioFiscal,DomicilioFiscal,ReportParameter1,System.String,,False,False,True,False + + + EngineV2 + + dd46217c7a274120b98e67b7fdbf8a1e + + + + None;Black;2;Solid;False;4;Black + Transparent + + + None;Black;1;None;False;4;Black + Transparent + 0,0,20,4.11 + + + True + Transparent + True + 4.37,0.43,9.11,1.55 + + + Arial,12,Bold + True + True + 2,2,2,2 + Textbox34 + + + {Empresa}<br/> +{Concepto} + Black + ,,,,WordWrap=True,A=0 + Wysiwyg + Expression + + + True + Transparent + 0.2,0.32,3.43,1.66 + + + 68, 114, 196 + {LogoPath} + True + 2,2,2,2 + Logo + + + True + + + Transparent + True + 2.43,2.34,9.54,0.6 + + + Enabled,FacturaProveedor_x0020__x0021__x003D__x0020__x0022__x0022_ + + Arial,10 + True + 2,2,2,2 + Textbox15 + + + {FacturaProveedor} + Black + + + Transparent + 2.43,3.09,9.54,0.6 + + + Enabled,FacturadoA_x0020__x0021__x003D__x0020__x0022__x0022_ + + Arial,10 + True + 2,2,2,2 + Textbox18 + + + {FacturadoA} + Black + + + Transparent + True + 0.27,3.1,2.12,0.6 + + + Enabled,FacturadoA_x0020__x0021__x003D__x0020__x0022__x0022_ + + Arial,10,Bold + True + 2,2,2,2 + Textbox16 + + + Proveedor: + Black + + + Transparent + True + 0.26,2.34,2.13,0.6 + + False + + Enabled,FacturaProveedor_x0020__x0021__x003D__x0020__x0022__x0022_ + + Arial,10,Bold + True + 2,2,2,2 + Textbox20 + + + Factura: + Black + + + Transparent + True + 13.63,0.35,2.07,0.89 + + + Arial,16,Bold + Right + True + 2,2,2,2 + Textbox3 + + + Folio: + Black + + + Transparent + True + 15.7,0.31,2.57,0.93 + + + Arial,16,Bold + True + 2,2,2,2 + Textbox31 + + + {Folio} + [255:0:0] + + + Transparent + True + 12.65,3.1,1.81,0.6 + + + Arial,10,Bold + True + 2,2,2,2 + Textbox4 + + + Fecha: + Black + + + Transparent + 14.46,2.34,3.9,0.6 + + + Arial,8 + True + 2,2,2,2 + Textbox10 + + + {Almacen} + Black + + + Transparent + True + 14.46,3.1,3.9,0.6 + + + Arial,8 + True + 2,2,2,2 + Textbox32 + + + {Fecha} + Black + + d + + + + Transparent + True + 12.65,2.34,1.81,0.6 + + + Arial,10,Bold + True + 2,2,2,2 + Textbox21 + + + Almacén: + Black + + + + + PageHeaderBand1 + + + + + None;Black;1;None;False;4;Black + Transparent + 0,26.48,20,2.22 + + + Transparent + True + 1.74,0.47,5.96,0.6 + + + Arial,10 + Center + True + 2,2,2,2 + Textbox35 + + + {NombreRecibio} + Black + + + Transparent + True + 11.8,0.43,5.96,0.6 + + + Arial,10 + Center + True + 2,2,2,2 + Textbox36 + + + {Almacen} + Black + + + Transparent + True + 11.96,1.49,2.91,0.6 + + + Arial,9,Bold + Right + True + 2,2,2,2 + Textbox8 + + + Fecha Impresion: + Black + + + Transparent + True + 14.87,1.49,2.89,0.6 + + + Arial,10 + True + 2,2,2,2 + Textbox37 + + + {FechaImpresion} + Black + + d + + + + 2.22,0.29,4.95,0.0254 + Black + + + Black + + + True + Line6 + + + + Black + + + + 12.2,0.29,4.95,0.0254 + Black + + + Black + + + True + Line7 + + + + Black + + + + + + PageFooterBand1 + + + + + Transparent + True + True + 0,4.11,20,2.69 + + + Transparent + True + 0.02,0.18,20,1.51 + + + Transparent + + 0,0,20,0.42 + + + Adv[0:0:0];1;Solid;[0:0:0];1;Solid;Black;1;None;Black;1;None;False;4;Black + [255:255:255] + True + 0,0,1.14,0.42 + + + Arial,8,Bold + True + 2,2,2,2 + Textbox7 + + + Cant. + Black + + + Adv[0:0:0];1;Solid;[0:0:0];1;Solid;Black;1;None;Black;1;None;False;4;Black + [255:255:255] + True + 1.14,0,3.15,0.42 + + + Arial,8,Bold + True + 2,2,2,2 + Textbox9 + + + Código + Black + + + Adv[0:0:0];1;Solid;[0:0:0];1;Solid;Black;1;None;Black;1;None;False;4;Black + [255:255:255] + True + 4.29,0,11.27,0.42 + + + Arial,8,Bold + True + 2,2,2,2 + Textbox11 + + + Descripción + Black + + + Adv[0:0:0];1;Solid;[0:0:0];1;Solid;Black;1;None;Black;1;None;False;4;Black + [255:255:255] + True + 15.56,0,2.7,0.42 + + + Enabled,DsInventarios.SerieLote_x0021__x003D__x0020__x0022__x0022_ + + Arial,8,Bold + True + 2,2,2,2 + Textbox6 + + + Serie + Black + + + Adv[0:0:0];1;Solid;[0:0:0];1;Solid;Black;1;None;Black;1;None;False;4;Black + [255:255:255] + True + 18.26,0,1.74,0.42 + + + Enabled,DsInventarios.Lote_x0021__x003D__x0020__x0022__x0022_ + + Arial,8,Bold + True + 2,2,2,2 + Textbox5 + + + Lote + Black + + + + DsInventarios + + + True + DataBand2 + + + + + + Transparent + + 0,0.42,20,0.69 + + + Transparent + True + 0,0,1.14,0.69 + + + Arial,8 + Right + True + 2,2,2,2 + Cantidad + + + {DsInventarios.Cantidad} + Black + + 0;(0) + + + + Transparent + True + 1.14,0,3.15,0.69 + + + Arial,8 + True + 2,2,2,2 + Codigo + + + {DsInventarios.Codigo} + Black + + + Transparent + True + 4.29,0,11.27,0.69 + + + Arial,8 + True + 2,2,2,2 + PS + + + {DsInventarios.PS} + Black + + + Transparent + True + 15.56,0,2.7,0.69 + + + Enabled,DsInventarios.SerieLote_x0021__x003D__x0020__x0022__x0022_ + + Arial,8 + True + 2,2,2,2 + SerieLote + + + {DsInventarios.SerieLote} + Black + + + Transparent + True + 18.26,0,1.74,0.69 + + + Enabled,DsInventarios.Lote_x0021__x003D__x0020__x0022__x0022_ + + Arial,8 + True + 2,2,2,2 + Lote + + + {DsInventarios.Lote} + Black + + + + DsInventarios + + + True + DataBand3 + + + + + + + + True + Tablix2 + + + + + Transparent + True + 0.06,1.79,11.37,0.6 + + + Arial,8 + True + 2,2,2,2 + Textbox2 + + + {Observaciones} + Black + + + + 1 + + + MainBand + + + + + + + + c751c4d57273461888e484933acfb628 + 0.5,0.5,0.5,0.5 + Page1 + 29.7 + 21 + + + + + System.Dll + System.Drawing.Dll + System.Windows.Forms.Dll + System.Data.Dll + System.Xml.Dll + Stimulsoft.Controls.Dll + Stimulsoft.Base.Dll + Stimulsoft.Report.Dll + + Report + 10/13/2022 7:15:28 PM + 10/13/2022 4:49:14 PM + C:\inetpub\wwwSIGGIT\Empresas\Grales\Formatos\EntradaSalida.mrt + fbf73b9709d54158a65b0723556fde8e + Report + Centimeters + 2022.1.6.0 + + CSharp + + \ No newline at end of file From f786c6863fe0ebfb3e7031fda9bd5ec0bd2c39c8 Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Thu, 1 Dec 2022 12:14:03 -0700 Subject: [PATCH 07/56] Compras carga xml caractestes especiales, Formato Cotizacion 140 v4.0 --- Compras/Compras.aspx.vb | 109 +- Empresas/140/Formatos/Cotizacion.rdlc | 3446 +++++++++++++------------ Empresas/140/Formatos/Factura.rdlc | 342 +-- 3 files changed, 1997 insertions(+), 1900 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 52b8f4eff..6708a078a 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1,10 +1,23 @@ Option Explicit On Option Strict On +'Imports System.Diagnostics +'Imports System.Globalization +'Imports System.IO +'Imports System.Threading.Tasks +'Imports ADSNetLibrary.SIGAPI.Helpers +'Imports Extensiones +'Imports Stimulsoft.Base + +Imports System.Activities +Imports System.Data Imports System.Diagnostics Imports System.Globalization Imports System.IO Imports System.Threading.Tasks +Imports System.Xml +Imports Extensiones +Imports Newtonsoft.Json Partial Class Compras_Compras @@ -1765,7 +1778,7 @@ Partial Class Compras_Compras If Validada And Not EnListadoEFOS Then Try - XMLDoc.LoadXml(File.ReadAllText(Archivo).Replace("<br>", "").Replace("<", "")) + XMLDoc.LoadXml(File.ReadAllText(Archivo).Replace("<br>", "").Replace("<", "").Replace("o;?", "")) Catch ex As Exception Try Dim oReader = New StreamReader(Archivo, Encoding.GetEncoding("ISO-8859-1")) @@ -8304,7 +8317,7 @@ Partial Class Compras_Compras Dim IndicePrimero As Integer = 0 For Each dRow As DataRow In TmpDT.Rows - If Boolean.Parse(dRow("AplicaIEPS").ToString) And dRow("IEPSPS").ToString.ToDecimal > 0 Then + If dRow("IEPSPS").ToString.ToDecimal > 0 Then IndicePrimero = IndiceContador Exit For End If @@ -8312,11 +8325,8 @@ Partial Class Compras_Compras Next If DiferenciaIEPSPS.RoundAD(2) <> 0 Then - - TmpDT.Rows(IndicePrimero)("IEPSPS") = TmpDT.Rows(IndicePrimero)("IEPSPS").ToString.ToDecimal + DiferenciaIEPSPS TmpDT.AcceptChanges() - End If @@ -8571,23 +8581,34 @@ Partial Class Compras_Compras PorcentajePago = gvr.FCTextBox("TxtAnticipo").Text.ToDecimal / TxtTotal.Text.ToDecimal - Dim ImporteAntMNComision As Decimal = (ImporteAnt + ImporComisionAnticipo) - If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimientoCompra, (ImporteAnt + ImporComisionAnticipo), "", CveConceptoCompra, "", TxtFechaPago.Text.ToDate, IdCtaContable, -1, CveCompra:=CveCompraNC, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteAntMNComision, ImporteME:=If(TipoCambioAnt = 1, 0, (ImporteAnt + ImporComisionAnticipo)), TipoCambio:=TipoCambioAnt, CveSubProyecto:=CveSubProyectoAnticipo) Then - ErrorMovtosCxP = 1 + + 'Se comento por que ya se aplica el pago en AplicaPrePolizaPagoCompra + 'Dim ImporteAntMNComision As Decimal = (ImporteAnt + ImporComisionAnticipo) + 'If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimientoCompra, (ImporteAnt + ImporComisionAnticipo), "", CveConceptoCompra, "", TxtFechaPago.Text.ToDate, IdCtaContable, -1, CveCompra:=CveCompraNC, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteAntMNComision, ImporteME:=If(TipoCambioAnt = 1, 0, (ImporteAnt + ImporComisionAnticipo)), TipoCambio:=TipoCambioAnt, CveSubProyecto:=CveSubProyectoAnticipo) Then + ' ErrorMovtosCxP = 1 + 'End If + + + If gvr.DataKey("TipoDocto").Contiene("Egsc") Then + CompraActual.IdCtaContableAnticipoProv = IdCtaContable + End If + + If gvr.DataKey("TipoDocto").Contiene("DD") Then + CompraActual.IdCtaContableProv = IdCtaContable End If If CveMonedaAnticipo > 1 Then - Dim ImporteAntMN As Decimal = TipoCambioAnt * ImporteAnt - ImporteAnt - If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimientoCompra, ImporteAntMN, "", CveConceptoCompraComplementaria, "", TxtFechaPago.Text.ToDate, IdCtaContableComp, -1, CveCompra:=CveCompraNC, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteAntMN, ImporteME:=If(TipoCambioAnt = 1, 0, ImporteAnt), TipoCambio:=TipoCambioAnt, CveSubProyecto:=CveSubProyectoAnticipo) Then - ErrorMovtosCxP = 1 + Dim ImporteAntMN As Decimal = TipoCambioAnt * ImporteAnt - ImporteAnt + If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimientoCompra, ImporteAntMN, "", CveConceptoCompraComplementaria, "", TxtFechaPago.Text.ToDate, IdCtaContableComp, -1, CveCompra:=CveCompraNC, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteAntMN, ImporteME:=If(TipoCambioAnt = 1, 0, ImporteAnt), TipoCambio:=TipoCambioAnt, CveSubProyecto:=CveSubProyectoAnticipo) Then + ErrorMovtosCxP = 1 + End If End If - End If - Pago.CveIE = CveIE - Pago.CveCompraAmortizacion = CveCompraNC - AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePolizaNueva, ObjConta) + Pago.CveIE = CveIE + Pago.CveCompraAmortizacion = CveCompraNC + AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePolizaNueva, ObjConta) + End If End If - End If Next @@ -9783,12 +9804,38 @@ Partial Class Compras_Compras #Region "CargaXML" Private Function ValorXML(n As XmlNode, Campo As String, Optional Retorno As String = "") As String - Dim o As XmlNode = n.Attributes.Cast(Of XmlAttribute)().SingleOrDefault(Function(a) String.Compare(a.Name, Campo, True) = 0) - If o Is Nothing Then - Return Retorno + + If UsuarioActual.CveRol = 1 Then + + Try + + Dim o As XmlNode = n.Attributes.Cast(Of XmlAttribute)().SingleOrDefault(Function(a) String.Compare(a.Name, Campo, True) = 0) + If o Is Nothing Then + Return Retorno + Else + Return o.Value + End If + + Catch ex As Exception + + Alert($"Error al leer valor nodo campo:{Campo}") + + Return "" + End Try + Else - Return o.Value + + Dim o As XmlNode = n.Attributes.Cast(Of XmlAttribute)().SingleOrDefault(Function(a) String.Compare(a.Name, Campo, True) = 0) + If o Is Nothing Then + Return Retorno + Else + Return o.Value + End If + End If + + + End Function Private Sub CargaComprobanteXML(XMLDoc As XmlDocument) @@ -12242,8 +12289,30 @@ Partial Class Compras_Compras End Sub Protected Sub BtnContado_Click(sender As Object, e As EventArgs) + TxtRembolsoNumero.Text = TxtNumeroReembolso.Text + + If RBLContado.SelectedValue.ToEntero = 6 Then ' Caja chica + DdlFuncionarioEmpleado.SelectedValueExist(-1) + DdlCuentaCajaChicaReembolso.SelectedValueExist(-1) + TxtDocumentoImporteFE.Text = "" + TextBox3.Text = "" + ViewState("CvePersonal") = -1 + End If + + If RBLContado.SelectedValue.ToEntero = 2 Then ' viaticos personal + DdlTipoTransaccionCaja.SelectedValueExist(-1) + DdlCuentaCaja.SelectedValueExist(-1) + TxtDocumentoFolioCaja.Text = "" + TxtDocumentoImporteCaja.Text = "" + TxtDocumentoObservacionesCaja.Text = "" + ViewState("CveCajaChica") = -1 + End If + + UpContado.Update() + RegistraScript(String.Format("$('#{0}').modal('hide');", "DivContadoModal")) + End Sub Protected Sub RblRembolso_SelectedIndexChanged(sender As Object, e As EventArgs) diff --git a/Empresas/140/Formatos/Cotizacion.rdlc b/Empresas/140/Formatos/Cotizacion.rdlc index a1e70d57d..542612f69 100644 --- a/Empresas/140/Formatos/Cotizacion.rdlc +++ b/Empresas/140/Formatos/Cotizacion.rdlc @@ -1,1719 +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 - - - - Embedded - Logo - Fit - 0.05159in - 0.0375in - 0.99993in - 1.60289in - 1 - - - - - - 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 - 3 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Expedido en - - - - : - - - - - - - - - =Parameters!DomicilioSucursal.Value - - - - - - - - - BBD021220APA - - - - - - - - - - - - - - - - - - Vendedor: - - - - =Parameters!VendedorNombre.Value - - - - - - - Textbox40 - 3.51387cm - 13.72673cm - 2.47332cm - 7.26261cm - 4 - - - 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 - - - - - - #3a4173 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - UNIDAD - - - - - - #3a4173 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - CODIGO - - - - - - - Textbox29 - - - #3a4173 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - DESCRIPCIÓN - - - - - - - Textbox17 - - - #3a4173 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - PU - - - - - - - Textbox1 - - - #3a4173 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - %DESC - - - - - - - Textbox21 - - - #3a4173 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - IEPS - - - - - - - Textbox23 - - - #3a4173 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - IVA - - - - - - - Textbox8 - - - #3a4173 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - TOTAL - - - - - - - Textbox1 - - - #3a4173 - 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) - Fields!Descuento.Value - - - - - - - TiempoEntrega - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - - - - - After - - - - - - - DsOC - 2.45577in - 0.04048in - 0.34081in - 8.22304in - 5 - - - - - - true - true - - - - - - - - #3a4173 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - #3a4173 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =UCase(Parameters!ImporteLetra.Value) - - - - - - - ImporteLetra - 3.25108in - 1.038in - 0.18861in - 7.22552in - 8 - - - 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 - 9 - - - - - - true - true - - - - - Sin más por el momento, se despide su seguro proveedor - - - - Textbox2 - 12.55395cm - 3.49882cm - 0.57354cm - 12.91587cm - 10 - - - 2pt - 2pt - 2pt - 2pt - - - - 14.00062cm - 7.56391cm - 0cm - 5.675cm - 11 - - - - - - true - true - - - - - =Parameters!VendedorNombre.Value - - - - Textbox3 - 14.07117cm - 7.56391cm - 0.6cm - 5.675cm - 12 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Observaciones de crédito: - - - - =Parameters!Observaciones.Value - - - - - - - =Parameters!FormaEntrega.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - 14.80346cm - - - - - - - - =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 + + + + Embedded + Logo + Fit + 0.05159in + 0.0375in + 0.99993in + 1.60289in + 1 + + + + + + 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 + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Expedido en + + + + : + + + + + + + + + =Parameters!DomicilioSucursal.Value + + + + + + + + + BBD021220APA + + + + + + + + + + + + + + + + + + Vendedor: + + + + =Parameters!VendedorNombre.Value + + + + + + + Textbox40 + 3.51387cm + 13.72673cm + 2.47332cm + 7.26261cm + 4 + + + 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 + + + + + + #3a4173 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + UNIDAD + + + + + + #3a4173 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + CODIGO + + + + + + + Textbox29 + + + #3a4173 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + DESCRIPCIÓN + + + + + + + Textbox17 + + + #3a4173 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + PU + + + + + + + Textbox1 + + + #3a4173 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + %DESC + + + + + + + Textbox21 + + + #3a4173 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + IEPS + + + + + + + Textbox23 + + + #3a4173 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + IVA + + + + + + + Textbox8 + + + #3a4173 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + TOTAL + + + + + + + Textbox1 + + + #3a4173 + 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) - Fields!Descuento.Value + + + + + + + TiempoEntrega + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DsOC + 2.45577in + 0.04048in + 0.34081in + 8.22304in + 5 + + + + + + true + true + + + + + + + + #3a4173 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + #3a4173 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =UCase(Parameters!ImporteLetra.Value) + + + + + + + ImporteLetra + 3.25108in + 1.038in + 0.18861in + 7.22552in + 8 + + + 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 + 9 + + + + + + true + true + + + + + Sin más por el momento, se despide su seguro proveedor + + + + Textbox2 + 12.55395cm + 3.49882cm + 0.57354cm + 12.91587cm + 10 + + + 2pt + 2pt + 2pt + 2pt + + + + 14.00062cm + 7.56391cm + 0cm + 5.675cm + 11 + + + + + + true + true + + + + + =Parameters!VendedorNombre.Value + + + + Textbox3 + 14.07117cm + 7.56391cm + 0.6cm + 5.675cm + 12 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Observaciones de crédito: + + + + =Parameters!Observaciones.Value + + + + + + + =Parameters!FormaEntrega.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 14.80346cm + + + + + + + + =Today + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0cm + 0cm + 0.5cm + 0.5cm + 1.27cm + @@ -26,7 +26,7 @@ Cliente: @@ -34,21 +34,21 @@ =Parameters!ClienteCodigo.Value - =Parameters!ClienteNombre.Value @@ -62,7 +62,7 @@ RFC: @@ -70,7 +70,7 @@ =Parameters!ClienteRFC.Value @@ -85,7 +85,7 @@ Calle: @@ -93,7 +93,7 @@ @@ -101,7 +101,7 @@ =Parameters!ClienteCalle.Value & IIF(Parameters!ClienteNoExt.Value <> "", " No.Ext: " & Parameters!ClienteNoExt.Value & iif(Parameters!ClienteNoInt.Value <> ""," No.Int: " & Parameters!ClienteNoInt.Value,""),iif(Parameters!ClienteNoInt.Value <> ""," No.Int: " & Parameters!ClienteNoInt.Value,"")) @@ -116,7 +116,7 @@ Colonia: @@ -124,7 +124,7 @@ @@ -132,7 +132,7 @@ =Parameters!ClienteColonia.Value @@ -147,7 +147,7 @@ Ciudad: @@ -155,7 +155,7 @@ =Parameters!ClienteCiudad.Value @@ -163,7 +163,7 @@ @@ -171,7 +171,7 @@ Estado: @@ -179,7 +179,7 @@ @@ -187,7 +187,7 @@ =Parameters!ClienteEstado.Value @@ -202,7 +202,7 @@ Municipio y/o Delegación: @@ -210,7 +210,7 @@ =Parameters!ClienteMunicipio.Value @@ -218,7 +218,7 @@ @@ -233,7 +233,7 @@ Pais: @@ -241,7 +241,7 @@ =Parameters!ClientePais.Value @@ -249,7 +249,7 @@ @@ -257,7 +257,7 @@ CP: @@ -265,7 +265,7 @@ @@ -273,7 +273,7 @@ =Parameters!ClienteCP.Value @@ -310,7 +310,7 @@ "Este documento es una representación impresa de un CFDI" @@ -325,7 +325,7 @@ Folio fiscal: @@ -333,7 +333,7 @@ =Parameters!FolioFiscal.Value @@ -346,7 +346,7 @@ Fecha y hora de certificación: @@ -354,7 +354,7 @@ =Parameters!FechaCertificacion.Value @@ -362,7 +362,7 @@ Número de serie del Certificado de Sello Digital: @@ -370,7 +370,7 @@ =Parameters!CertificadoContribuyente.Value @@ -383,7 +383,7 @@ Sello digital del CFDI: Número de serie del Certificado de Sello Digital del SAT: @@ -391,7 +391,7 @@ =Parameters!SerieCertificadoSAT.Value @@ -404,7 +404,7 @@ =Parameters!SelloCFDI.Value @@ -417,7 +417,7 @@ @@ -430,7 +430,7 @@ Cadena original del complemento de certificación digital del SAT: @@ -443,7 +443,7 @@ =Parameters!CadenaOriginal.Value @@ -456,7 +456,7 @@ @@ -469,7 +469,7 @@ Sello digital del SAT: @@ -482,7 +482,7 @@ =Parameters!SelloSAT.Value @@ -542,7 +542,7 @@ Domicilio fiscal: @@ -555,7 +555,7 @@ Tamaulipas S/N @@ -568,7 +568,7 @@ C.P. 83190 Col. San Benito @@ -581,7 +581,7 @@ Hermosillo, Son. México. @@ -615,7 +615,7 @@ = IIF(Parameters!Tipo.Value = "INGRESO","FACTURA","NOTA DE CRÉDITO") @@ -630,7 +630,7 @@ @@ -638,7 +638,7 @@ Serie: @@ -654,7 +654,7 @@ @@ -662,7 +662,7 @@ Folio: @@ -685,7 +685,7 @@ Fecha: @@ -693,7 +693,7 @@ @@ -701,7 +701,7 @@ =Format(Cdate(Parameters!Fecha.Value),"dd/MM/yyyy") @@ -725,7 +725,7 @@ @@ -733,7 +733,7 @@ =Parameters!MonedaAbreviatura.Value @@ -748,7 +748,7 @@ Vencimiento @@ -756,7 +756,7 @@ : @@ -764,7 +764,7 @@ =Parameters!Vencimiento.Value @@ -772,7 +772,7 @@ @@ -787,7 +787,7 @@ Forma de pago: @@ -795,7 +795,7 @@ =Parameters!FormaPago.Value @@ -810,7 +810,7 @@ Método de pago: @@ -818,7 +818,7 @@ =Parameters!MetodoPago.Value @@ -833,7 +833,7 @@ Uso CFDI: @@ -841,7 +841,7 @@ =Parameters!UsoCFDI.Value @@ -856,7 +856,7 @@ Régimen fiscal: @@ -864,7 +864,7 @@ Regimen General de Ley Personas Morales @@ -872,7 +872,7 @@ @@ -908,7 +908,7 @@ Expedido en @@ -916,7 +916,7 @@ : @@ -931,7 +931,7 @@ =Parameters!DomicilioSucursal.Value @@ -946,7 +946,7 @@ BBD021220APA @@ -961,7 +961,7 @@ @@ -976,7 +976,7 @@ Vendedor: @@ -984,7 +984,7 @@ =Parameters!VendedorNombre.Value @@ -1054,7 +1054,7 @@ CANT @@ -1426,7 +1426,7 @@ =Fields!SATClaveProdServ.Value @@ -1461,7 +1461,7 @@ =Fields!PS.Value & " " & Fields!Obs.Value @@ -1494,7 +1494,7 @@ =Fields!PU.Value @@ -1835,7 +1835,7 @@ =Parameters!Observaciones.Value @@ -1881,7 +1881,7 @@ =Fields!Importe.Value @@ -1984,7 +1984,7 @@ CFDI Relacionados @@ -2057,7 +2057,7 @@ =Parameters!TipoRelacionTexto.Value @@ -2112,7 +2112,7 @@ Folio @@ -2297,7 +2297,7 @@ =Fields!Fecha.Value @@ -2332,7 +2332,7 @@ =Fields!Importe.Value @@ -2367,7 +2367,7 @@ =Fields!FolioFiscal.Value @@ -2429,9 +2429,9 @@ - VERSION 3.3 + VERSION 4.0 @@ -2502,7 +2502,7 @@ IMPUESTO @@ -2653,7 +2653,7 @@ =Fields!tasa.Value @@ -2688,7 +2688,7 @@ =Fields!Importe.Value @@ -2770,7 +2770,7 @@ TODA DEVOLUCIÓN NO REALIZADA EL DÍA DE LA COMPRA CAUSARÁ EL 10% DE CARGO" @@ -2925,7 +2925,7 @@ Nombre @@ -2961,7 +2961,7 @@ Recibí Producto @@ -3071,14 +3071,14 @@ =Parameters!Serie.Value @@ -3086,7 +3086,7 @@ @@ -3103,7 +3103,7 @@ =Parameters!Folio.Value @@ -3152,7 +3152,7 @@ @@ -3160,7 +3160,7 @@ Cliente: @@ -3168,7 +3168,7 @@ =Parameters!ClienteCodigo.Value @@ -3176,7 +3176,7 @@ - @@ -3184,7 +3184,7 @@ =Parameters!ClienteNombre.Value @@ -3192,7 +3192,7 @@ - @@ -3200,7 +3200,7 @@ =Parameters!ClienteRFC.Value @@ -3215,7 +3215,7 @@ Domicilio: @@ -3223,7 +3223,7 @@ =Parameters!ClienteDireccion.Value @@ -3231,7 +3231,7 @@ , @@ -3239,7 +3239,7 @@ =Parameters!ClienteCiudad.Value @@ -3247,7 +3247,7 @@ , @@ -3255,7 +3255,7 @@ =Parameters!ClienteEstado.Value @@ -3303,7 +3303,7 @@ POR ESTE @@ -3388,7 +3388,7 @@ *** @@ -3546,7 +3546,7 @@ Obligado =Parameters!FechaImpresion.Value @@ -3681,7 +3681,7 @@ ="Página " & Globals.PageNumber & " de " & Globals.TotalPages @@ -4566,6 +4566,18 @@ true ReportParameter1 + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + From 878b406d276eb00f6e542b19abe419ff3c04500d Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Sat, 3 Dec 2022 16:17:55 -0700 Subject: [PATCH 08/56] Utilizar direcciones de envio como destinatario en comercio exterior en Ventas.aspx, alta de regimen fiscal en clientes desde PV.aspx --- App_Code/ClsClientes.vb | 16 ++- Inventarios/CartaPorteManual.aspx.vb | 2 +- Inventarios/RepEntregaAlmacenRuta.aspx.cs | 2 +- OC/OC.aspx.vb | 2 +- Ventas/Clientes.aspx | 27 ++-- Ventas/Clientes.aspx.vb | 28 ++-- Ventas/PV.aspx | 120 +++++++--------- Ventas/PV.aspx.vb | 166 +++++++++++++++++++--- Ventas/Ventas.aspx | 37 +++-- Ventas/Ventas.aspx.vb | 86 +++++++++-- 10 files changed, 335 insertions(+), 151 deletions(-) diff --git a/App_Code/ClsClientes.vb b/App_Code/ClsClientes.vb index 14f390bd5..f71c30878 100644 --- a/App_Code/ClsClientes.vb +++ b/App_Code/ClsClientes.vb @@ -1499,8 +1499,9 @@ Public Class ClsClientes #Region "D I R E C C I O N D E E N V I O " Public Function DireccionEnvioAdd(CveCliente As Integer, EnvioDireccion As String, EnvioNoExt As String, EnvioNoInt As String, EnvioColonia As String, EnvioCiudad As String, EnvioEstado As String, - EnvioCP As Integer, EnvioContacto As String, CveUsuario As Integer, Estatus As Integer, Optional CveClienteSucursal As Integer = -1, Optional EnvioDepartamento As String = "-1", Optional EnvioTel As String = "-1", - Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveLocalidad As Integer = -1, Optional CveColonia As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1) As Integer + EnvioCP As String, EnvioContacto As String, CveUsuario As Integer, Estatus As Integer, Optional CveClienteSucursal As Integer = -1, Optional EnvioDepartamento As String = "-1", Optional EnvioTel As String = "-1", + Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveLocalidad As Integer = -1, Optional CveColonia As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1, + Optional COM_NumRegIdTrib As String = "") As Integer Dim Retorno As Integer = -1 DataAdapter("PA_Vta_ClientesDireccionesEnvioAdd") @@ -1513,7 +1514,7 @@ Public Class ClsClientes .Add("@EnvioColonia", SqlDbType.VarChar).Value = EnvioColonia .Add("@EnvioCiudad", SqlDbType.VarChar).Value = EnvioCiudad .Add("@EnvioEstado", SqlDbType.VarChar).Value = EnvioEstado - .Add("@EnvioCP", SqlDbType.Int).Value = EnvioCP + .Add("@EnvioCP", SqlDbType.VarChar).Value = EnvioCP .Add("@EnvioContacto", SqlDbType.VarChar).Value = EnvioContacto .Add("@EnvioDepartamento", SqlDbType.VarChar).Value = EnvioDepartamento .Add("@EnvioTel", SqlDbType.VarChar).Value = EnvioTel @@ -1527,6 +1528,7 @@ Public Class ClsClientes .Add("@CveLocalidad", SqlDbType.Int).Value = CveLocalidad .Add("@CveColonia", SqlDbType.Int).Value = CveColonia .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@COM_NumRegIdTrib", SqlDbType.VarChar).Value = COM_NumRegIdTrib .Add("@CveDireccionEnvio", SqlDbType.Int).Direction = ParameterDirection.Output End With @@ -1561,8 +1563,9 @@ Public Class ClsClientes End Function Public Function DireccionEnvioUpdate(CveCliente As Integer, EnvioDireccion As String, EnvioNoExt As String, EnvioNoInt As String, EnvioColonia As String, EnvioCiudad As String, EnvioEstado As String, - EnvioCP As Integer, EnvioContacto As String, CveUsuario As Integer, Estatus As Integer, CveDireccionEnvio As Integer, Optional EnvioDepartamento As String = "-1", Optional CveClienteSucursal As Integer = -1, Optional EnvioTel As String = "-1", - Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveLocalidad As Integer = -1, Optional CveColonia As Integer = -1, Optional CveSubProyecto As Integer = -1) As Boolean + EnvioCP As String, EnvioContacto As String, CveUsuario As Integer, Estatus As Integer, CveDireccionEnvio As Integer, Optional EnvioDepartamento As String = "-1", Optional CveClienteSucursal As Integer = -1, Optional EnvioTel As String = "-1", + Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveLocalidad As Integer = -1, Optional CveColonia As Integer = -1, Optional CveSubProyecto As Integer = -1, + Optional COM_NumRegIdTrib As String = "") As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_ClientesDireccionesEnvioUpdate") @@ -1578,7 +1581,7 @@ Public Class ClsClientes .Add("@EnvioEstado", SqlDbType.VarChar).Value = EnvioEstado .Add("@EnvioContacto", SqlDbType.VarChar).Value = EnvioContacto .Add("@EnvioDepartamento", SqlDbType.VarChar).Value = EnvioDepartamento - .Add("@EnvioCP", SqlDbType.Int).Value = EnvioCP + .Add("@EnvioCP", SqlDbType.VarChar).Value = EnvioCP .Add("@EnvioTel", SqlDbType.VarChar).Value = EnvioTel .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@Estatus", SqlDbType.Int).Value = Estatus @@ -1589,6 +1592,7 @@ Public Class ClsClientes .Add("@CveMunicipio", SqlDbType.Int).Value = CveMunicipio .Add("@CveLocalidad", SqlDbType.Int).Value = CveLocalidad .Add("@CveColonia", SqlDbType.Int).Value = CveColonia + .Add("@COM_NumRegIdTrib", SqlDbType.VarChar).Value = COM_NumRegIdTrib End With diff --git a/Inventarios/CartaPorteManual.aspx.vb b/Inventarios/CartaPorteManual.aspx.vb index 6369d50dd..1c04f04ab 100644 --- a/Inventarios/CartaPorteManual.aspx.vb +++ b/Inventarios/CartaPorteManual.aspx.vb @@ -536,7 +536,7 @@ Partial Class Inventarios_CartaPorteManual Dim EnvioDireccion As String = GvRow.DataKey("EnvioDireccion") Dim EnvioNoExt As String = GvRow.DataKey("EnvioNoExt") Dim EnvioNoInt As String = GvRow.DataKey("EnvioNoInt") - Dim EnvioCP As Integer = GvRow.DataKey("EnvioCP").ToEntero + Dim EnvioCP As String = GvRow.DataKey("EnvioCP") Dim CvePais As Integer = GvRow.DataKey("CvePais").ToEntero Dim CveEstado As Integer = GvRow.DataKey("CveEstado").ToEntero diff --git a/Inventarios/RepEntregaAlmacenRuta.aspx.cs b/Inventarios/RepEntregaAlmacenRuta.aspx.cs index 3dc47a24d..ed0c5bdae 100644 --- a/Inventarios/RepEntregaAlmacenRuta.aspx.cs +++ b/Inventarios/RepEntregaAlmacenRuta.aspx.cs @@ -1094,7 +1094,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas bool ErrorProceso = false; //CveDireccionEditar - if (!ObjCli.DireccionEnvioUpdate(-1, TxtEnvioDireccion.Text, TxtEnvioNoExt.Text, TxtEnvioNoInt.Text, "-1", "-1", "-1", TxtEnvioCP.Text.ToEntero(), "-1", UsuarioActual.CveUsuario, -1, CveDireccionEditar, "-1", -1, "-1", + if (!ObjCli.DireccionEnvioUpdate(-1, TxtEnvioDireccion.Text, TxtEnvioNoExt.Text, TxtEnvioNoInt.Text, "-1", "-1", "-1", TxtEnvioCP.Text, "-1", UsuarioActual.CveUsuario, -1, CveDireccionEditar, "-1", -1, "-1", DdlDirClientePais.SelectedValue.ToEntero(), DdlDirClienteEstado.SelectedValue.ToEntero(), DdlDirClienteMunicipio.SelectedValue.ToEntero(), DdlDirClienteLocalidad.SelectedValue.ToEntero(), DdlDirClienteColonia.SelectedValue.ToEntero())) { ErrorProceso = true; diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index 76c7c54c1..c4da7e4fb 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -7800,7 +7800,7 @@ Partial Class OC_OC Dim TieneError = False Dim Estatus = If(ChkEstatus.Checked, 1, 0) - CveDireccionEnvio = ObjClientes.DireccionEnvioAdd(Ddlcliente.txtValue.Value.ToEntero, TxtEnvioDireccion.Text.Trim, TxtEnvioNoExt.Text.Trim, TxtEnvioNoInt.Text.Trim, TxtEnvioColonia.Text.Trim, TxtEnvioCiudad.Text.Trim, TxtEnvioEstado.Text.Trim, TxtEnvioCP.Text.ToEntero, TxtEnvioContacto.Text.Trim, UsuarioActual.CveUsuario, Estatus, CveClienteSucursal:=DdlClienteSucursalEnvio.SelectedValue.ToEntero, EnvioTel:=TxtEnvioTel.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", "")) + CveDireccionEnvio = ObjClientes.DireccionEnvioAdd(Ddlcliente.txtValue.Value.ToEntero, TxtEnvioDireccion.Text.Trim, TxtEnvioNoExt.Text.Trim, TxtEnvioNoInt.Text.Trim, TxtEnvioColonia.Text.Trim, TxtEnvioCiudad.Text.Trim, TxtEnvioEstado.Text.Trim, TxtEnvioCP.Text, TxtEnvioContacto.Text.Trim, UsuarioActual.CveUsuario, Estatus, CveClienteSucursal:=DdlClienteSucursalEnvio.SelectedValue.ToEntero, EnvioTel:=TxtEnvioTel.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", "")) If CveDireccionEnvio < 0 Then TieneError = True diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index ae60cc84c..3d80a5652 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -856,7 +856,7 @@
@@ -5294,7 +5294,7 @@
- +
@@ -5325,10 +5325,7 @@
-
- -
@@ -5339,21 +5336,17 @@
-
<%----%>
-
-
-
@@ -5361,18 +5354,14 @@
- +
+
+
+ + +
- - - - - - - - -
<%----%> diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 5f5496898..127298d4c 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -4583,17 +4583,21 @@ Partial Class Clientes Private Sub DirClientevalidaCodigoPostal() - Dim CPTxt As Integer = TxtEnvioCP.Text.ToEntero() + 'EN JAPON NO SE MANEJA CP NUMERICO + If DdlDirClientePais.SelectedValue.ToEntero() <> 122 Then + Dim CPTxt As Integer = TxtEnvioCP.Text.ToEntero() - Dim CveColonia As Integer = DdlDirClienteColonia.SelectedValue.ToEntero + Dim CveColonia As Integer = DdlDirClienteColonia.SelectedValue.ToEntero - If CPTxt > 0 And CveColonia > 0 Then - Dim CP As Integer = GlobalDTGralColonias("-1", "-1", "-1", CveColonia:=CveColonia).FiltroPrimeroValor("CP", "").ToEntero - If CPTxt <> CP Then - Alert("El código postal selecionado es diferente del codigo postal de la Colonia.", TipoMensaje.MsgAdvertencia) + If CPTxt > 0 And CveColonia > 0 Then + Dim CP As Integer = GlobalDTGralColonias("-1", "-1", "-1", CveColonia:=CveColonia).FiltroPrimeroValor("CP", "").ToEntero + If CPTxt <> CP Then + Alert("El código postal selecionado es diferente del codigo postal de la Colonia.", TipoMensaje.MsgAdvertencia) + End If End If End If + End Sub @@ -4636,6 +4640,7 @@ Partial Class Clientes DdlClienteSucursalEnvio.SelectedValueExist("-1") End If + TxtCom_NumRegIdTrib.Text = GvRow.DataKey("COM_NumRegIdTrib") Dim CveSubProyectoClienteSucursal As Integer = GvRow.DataKey("CveSubProyecto").ToEntero @@ -4644,6 +4649,8 @@ Partial Class Clientes DdlSubProyectoClienteSucursal.SelectedValueExist(CveSubProyectoClienteSucursal) End If + BtnAgregarDireccion.Text = "Actualizar" + UpAddDireccion.Update() RegistraScript("$('#divAddDireccionEnvio').modal();") End Sub @@ -4653,16 +4660,16 @@ Partial Class Clientes Dim Estatus = If(ChkEstatus.Checked, 1, 0) If CveDireccionEnvio < 0 Then - CveDireccionEnvio = ObjClientes.DireccionEnvioAdd(CveCliente, TxtEnvioDireccion.Text.Trim, TxtEnvioNoExt.Text.Trim, TxtEnvioNoInt.Text.Trim, TxtEnvioColonia.Text.Trim, TxtEnvioCiudad.Text.Trim, TxtEnvioEstado.Text.Trim, TxtEnvioCP.Text.ToEntero(), TxtEnvioContacto.Text.Trim, UsuarioActual.CveUsuario, Estatus, CveClienteSucursal:=DdlClienteSucursalEnvio.SelectedValue.ToEntero(), EnvioTel:=TxtEnvioTel.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), - CvePais:=DdlDirClientePais.SelectedValue.ToEntero, CveEstado:=DdlDirClienteEstado.SelectedValue.ToEntero, CveMunicipio:=DdlDirClienteMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlDirClienteLocalidad.SelectedValue.ToEntero, CveColonia:=DdlDirClienteColonia.SelectedValue.ToEntero, CveSubProyecto:=DdlSubProyectoClienteSucursal.SelectedValue.ToEntero) + CveDireccionEnvio = ObjClientes.DireccionEnvioAdd(CveCliente, TxtEnvioDireccion.Text.Trim, TxtEnvioNoExt.Text.Trim, TxtEnvioNoInt.Text.Trim, TxtEnvioColonia.Text.Trim, TxtEnvioCiudad.Text.Trim, TxtEnvioEstado.Text.Trim, TxtEnvioCP.Text.Trim(), TxtEnvioContacto.Text.Trim, UsuarioActual.CveUsuario, Estatus, CveClienteSucursal:=DdlClienteSucursalEnvio.SelectedValue.ToEntero(), EnvioTel:=TxtEnvioTel.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), + CvePais:=DdlDirClientePais.SelectedValue.ToEntero, CveEstado:=DdlDirClienteEstado.SelectedValue.ToEntero, CveMunicipio:=DdlDirClienteMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlDirClienteLocalidad.SelectedValue.ToEntero, CveColonia:=DdlDirClienteColonia.SelectedValue.ToEntero, CveSubProyecto:=DdlSubProyectoClienteSucursal.SelectedValue.ToEntero, COM_NumRegIdTrib:=TxtCom_NumRegIdTrib.Text.Trim()) If CveDireccionEnvio < 0 Then TieneError = True End If Else - If Not ObjClientes.DireccionEnvioUpdate(CveCliente, TxtEnvioDireccion.Text.Trim, TxtEnvioNoExt.Text.Trim, TxtEnvioNoInt.Text.Trim, TxtEnvioColonia.Text.Trim, TxtEnvioCiudad.Text.Trim, TxtEnvioEstado.Text.Trim, TxtEnvioCP.Text.ToEntero(), TxtEnvioContacto.Text.Trim, UsuarioActual.CveUsuario, Estatus, CveDireccionEnvio, CveClienteSucursal:=DdlClienteSucursalEnvio.SelectedValue.ToEntero(), EnvioTel:=TxtEnvioTel.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), - CvePais:=DdlDirClientePais.SelectedValue.ToEntero, CveEstado:=DdlDirClienteEstado.SelectedValue.ToEntero, CveMunicipio:=DdlDirClienteMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlDirClienteLocalidad.SelectedValue.ToEntero, CveColonia:=DdlDirClienteColonia.SelectedValue.ToEntero, CveSubProyecto:=DdlSubProyectoClienteSucursal.SelectedValue.ToEntero) Then + If Not ObjClientes.DireccionEnvioUpdate(CveCliente, TxtEnvioDireccion.Text.Trim, TxtEnvioNoExt.Text.Trim, TxtEnvioNoInt.Text.Trim, TxtEnvioColonia.Text.Trim, TxtEnvioCiudad.Text.Trim, TxtEnvioEstado.Text.Trim, TxtEnvioCP.Text.Trim(), TxtEnvioContacto.Text.Trim, UsuarioActual.CveUsuario, Estatus, CveDireccionEnvio, CveClienteSucursal:=DdlClienteSucursalEnvio.SelectedValue.ToEntero(), EnvioTel:=TxtEnvioTel.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), + CvePais:=DdlDirClientePais.SelectedValue.ToEntero, CveEstado:=DdlDirClienteEstado.SelectedValue.ToEntero, CveMunicipio:=DdlDirClienteMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlDirClienteLocalidad.SelectedValue.ToEntero, CveColonia:=DdlDirClienteColonia.SelectedValue.ToEntero, CveSubProyecto:=DdlSubProyectoClienteSucursal.SelectedValue.ToEntero, COM_NumRegIdTrib:=TxtCom_NumRegIdTrib.Text.Trim()) Then TieneError = True End If @@ -4698,6 +4705,7 @@ Partial Class Clientes 'DdlDirClienteLocalidad.SelectedValueExist(-1) 'DdlDirClienteColonia.SelectedValueExist(-1) + BtnAgregarDireccion.Text = "Agregar" UpAddDireccion.Update() RegistraScript("$('#divAddDireccionEnvio').modal();") End Sub diff --git a/Ventas/PV.aspx b/Ventas/PV.aspx index 0e383970e..e9c6b7400 100644 --- a/Ventas/PV.aspx +++ b/Ventas/PV.aspx @@ -2464,7 +2464,6 @@ -
@@ -2475,47 +2474,32 @@
- - -