From 2ecf4ab17fd6c08e6acb2a765db09094ac37203d Mon Sep 17 00:00:00 2001 From: rakcsle Date: Mon, 29 Aug 2022 18:02:19 -0700 Subject: [PATCH 1/5] =?UTF-8?q?Rempleazar=20saltos=20de=20linea=20en=20asi?= =?UTF-8?q?gnaciones=20de=20funciones=20onblur=20de=20=20vinculaci=C3=B3n?= =?UTF-8?q?=20de=20OC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Compras/Compras.aspx.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 3bb8ba23b..48467fe5e 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -15005,7 +15005,7 @@ Partial Class Compras_Compras Dim Cont As Integer = 0 For Each gvr As GridViewRow In GvOC1.Rows - RegistraScript($"CalculaTotalOCEdit('{gvr.DataKey("PS").Replace("'", "")}', {gvr.DataKey("Cantidad").ToString.ToDouble}, {gvr.FCTextBox("TxtCantidad").ClientID}, {gvr.FCTextBox("TxtPU").ClientID}, {gvr.FCTextBox("TxtTotalOC1").ClientID}, {gvr.DataKey("IEPSPS").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1IEPSImporte").ClientID}, {gvr.DataKey("IVA").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1IVA").ClientID},{gvr.DataKey("RetIVA").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1RetIVA").ClientID},{gvr.DataKey("RetISR").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1RetISR").ClientID},{gvr.DataKey("IEPSPS").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1IEPSIVA").ClientID},{gvr.DataKey("Descuento")},{gvr.FCHiddenField("HdnOC1Descuento").ClientID},{gvr.DataKey("IVAPorcentaje").ToString.ToDouble},{gvr.DataKey("RetIVAPorcentaje").ToString.ToDouble},{gvr.DataKey("RetISRPorcentaje").ToString.ToDouble},{gvr.DataKey("IEPSPSPorcentaje").ToString.ToDouble},{gvr.DataKey("IEPSPSIVAPorcentaje").ToString.ToDouble});", $"Gv{Cont}") + RegistraScript($"CalculaTotalOCEdit('{ gvr.DataKey("PS").Replace("'", "").Replace(vbLf, " ").Replace(vbCrLf, " ") }', {gvr.DataKey("Cantidad").ToString.ToDouble}, {gvr.FCTextBox("TxtCantidad").ClientID}, {gvr.FCTextBox("TxtPU").ClientID}, {gvr.FCTextBox("TxtTotalOC1").ClientID}, {gvr.DataKey("IEPSPS").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1IEPSImporte").ClientID}, {gvr.DataKey("IVA").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1IVA").ClientID},{gvr.DataKey("RetIVA").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1RetIVA").ClientID},{gvr.DataKey("RetISR").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1RetISR").ClientID},{gvr.DataKey("IEPSPS").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1IEPSIVA").ClientID},{gvr.DataKey("Descuento")},{gvr.FCHiddenField("HdnOC1Descuento").ClientID},{gvr.DataKey("IVAPorcentaje").ToString.ToDouble},{gvr.DataKey("RetIVAPorcentaje").ToString.ToDouble},{gvr.DataKey("RetISRPorcentaje").ToString.ToDouble},{gvr.DataKey("IEPSPSPorcentaje").ToString.ToDouble},{gvr.DataKey("IEPSPSIVAPorcentaje").ToString.ToDouble});", $"Gv{Cont}") Cont += 1 Next @@ -15021,7 +15021,7 @@ Partial Class Compras_Compras Protected Sub GvOC1_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvOC1.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then - Dim JSCambiaScript = $"CalculaTotalOCEdit('{e.Row.DBCampo("PS").Replace("'", "")}', {e.Row.DBCampo("Cantidad").ToString.ToDouble}, {e.Row.FCTextBox("TxtCantidad").ClientID}, {e.Row.FCTextBox("TxtPU").ClientID}, {e.Row.FCTextBox("TxtTotalOC1").ClientID}, {e.Row.DBCampo("IEPSPS").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1IEPSImporte").ClientID}, {e.Row.DBCampo("IVA").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1IVA").ClientID},{e.Row.DBCampo("RetIVA").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1RetIVA").ClientID},{e.Row.DBCampo("RetISR").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1RetISR").ClientID},{e.Row.DBCampo("IEPSPS").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1IEPSIVA").ClientID},{e.Row.DBCampo("Descuento")},{e.Row.FCHiddenField("HdnOC1Descuento").ClientID},{e.Row.DBCampo("IVAPorcentaje").ToString.ToDouble},{e.Row.DBCampo("RetIVAPorcentaje").ToString.ToDouble},{e.Row.DBCampo("RetISRPorcentaje").ToString.ToDouble},{e.Row.DBCampo("IEPSPSPorcentaje").ToString.ToDouble},{e.Row.DBCampo("IEPSPSIVAPorcentaje").ToString.ToDouble});" + Dim JSCambiaScript = $"CalculaTotalOCEdit('{e.Row.DBCampo("PS").Replace("'", "").Replace(vbLf, " ").Replace(vbCrLf, " ")}', {e.Row.DBCampo("Cantidad").ToString.ToDouble}, {e.Row.FCTextBox("TxtCantidad").ClientID}, {e.Row.FCTextBox("TxtPU").ClientID}, {e.Row.FCTextBox("TxtTotalOC1").ClientID}, {e.Row.DBCampo("IEPSPS").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1IEPSImporte").ClientID}, {e.Row.DBCampo("IVA").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1IVA").ClientID},{e.Row.DBCampo("RetIVA").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1RetIVA").ClientID},{e.Row.DBCampo("RetISR").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1RetISR").ClientID},{e.Row.DBCampo("IEPSPS").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1IEPSIVA").ClientID},{e.Row.DBCampo("Descuento")},{e.Row.FCHiddenField("HdnOC1Descuento").ClientID},{e.Row.DBCampo("IVAPorcentaje").ToString.ToDouble},{e.Row.DBCampo("RetIVAPorcentaje").ToString.ToDouble},{e.Row.DBCampo("RetISRPorcentaje").ToString.ToDouble},{e.Row.DBCampo("IEPSPSPorcentaje").ToString.ToDouble},{e.Row.DBCampo("IEPSPSIVAPorcentaje").ToString.ToDouble});" e.Row.FCTextBox("TxtCantidad").Attributes.Add("onkeyup", $"LimitaCantidadOC({e.Row.DBCampo("CantidadPendienteVincular")}, this);{JSCambiaScript}") e.Row.FCTextBox("TxtPU").Attributes.Add("onkeyup", JSCambiaScript) From 8889321c01c237949d58a32bb59d762bbce11ec6 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Mon, 29 Aug 2022 19:16:07 -0700 Subject: [PATCH 2/5] Recibo de pago RDLC Empresa 70 --- Empresas/70/Formatos/ReciboDePago.rdlc | 2661 ++++++++++++++++++++++-- vwd.webinfo | 4 + 2 files changed, 2534 insertions(+), 131 deletions(-) diff --git a/Empresas/70/Formatos/ReciboDePago.rdlc b/Empresas/70/Formatos/ReciboDePago.rdlc index 472016663..2d298c914 100644 --- a/Empresas/70/Formatos/ReciboDePago.rdlc +++ b/Empresas/70/Formatos/ReciboDePago.rdlc @@ -906,7 +906,16 @@ - 5.35332cm + 2.06136cm + + + 1.81754cm + + + 1.87029cm + + + 1.59989cm 1.8cm @@ -914,9 +923,6 @@ 1.8cm - - 1.99576cm - 1.8cm @@ -990,8 +996,12 @@ 2pt + 4 + + + @@ -1108,64 +1118,6 @@ - - - - true - true - - - - - Método Pago - - - - - - - Textbox13 - - - - #eb831f - - 1pt - - - #eb831f - - 1pt - - - #eb831f - - 1pt - - - #eb831f - - 1pt - - #eb831f - 2pt - 2pt - 2pt - 2pt - - - - @@ -1454,8 +1406,12 @@ 2pt + 4 + + + @@ -1562,59 +1518,6 @@ - - - - true - true - - - - - =Fields!MetodoDePagoDR.Value - - - - - - - #eb831f - - 1pt - - - #eb831f - - 1pt - - - #eb831f - - 1pt - - - #eb831f - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - @@ -1833,6 +1736,2351 @@ + + 0.23979cm + + + + + true + true + + + + + Impuesto + + + + + + + Textbox108 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra001BaseDR.Value > 0 Or Fields!Tra002BaseDR.Value > 0 Or Fields!Tra003BaseDR.Value > 0 Or Fields!Ret001BaseDR.Value > 0 Or Fields!Ret002BaseDR.Value > 0 Or Fields!Ret003BaseDR.Value > 0, False, True) + + + + + #eb831f + + Top + + + true + + + + + + true + true + + + + + Tipo + + + + + + + Textbox109 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra001BaseDR.Value > 0 Or Fields!Tra002BaseDR.Value > 0 Or Fields!Tra003BaseDR.Value > 0 Or Fields!Ret001BaseDR.Value > 0 Or Fields!Ret002BaseDR.Value > 0 Or Fields!Ret003BaseDR.Value > 0, False, True) + + + + Top + + + true + + + + + + true + true + + + + + Base + + + + + + + Textbox110 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra001BaseDR.Value > 0 Or Fields!Tra002BaseDR.Value > 0 Or Fields!Tra003BaseDR.Value > 0 Or Fields!Ret001BaseDR.Value > 0 Or Fields!Ret002BaseDR.Value > 0 Or Fields!Ret003BaseDR.Value > 0, False, True) + + + + Top + + + true + + + + + + true + true + + + + + Tipo Factor + + + + + + + Textbox111 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra001BaseDR.Value > 0 Or Fields!Tra002BaseDR.Value > 0 Or Fields!Tra003BaseDR.Value > 0 Or Fields!Ret001BaseDR.Value > 0 Or Fields!Ret002BaseDR.Value > 0 Or Fields!Ret003BaseDR.Value > 0, False, True) + + + + Top + + + true + + + + + + true + true + + + + + Tasa/Cuota + + + + + + + Textbox112 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra001BaseDR.Value > 0 Or Fields!Tra002BaseDR.Value > 0 Or Fields!Tra003BaseDR.Value > 0 Or Fields!Ret001BaseDR.Value > 0 Or Fields!Ret002BaseDR.Value > 0 Or Fields!Ret003BaseDR.Value > 0, False, True) + + + + Top + + + true + + + + + + true + true + + + + + Importe + + + + + + + Textbox113 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra001BaseDR.Value > 0 Or Fields!Tra002BaseDR.Value > 0 Or Fields!Tra003BaseDR.Value > 0 Or Fields!Ret001BaseDR.Value > 0 Or Fields!Ret002BaseDR.Value > 0 Or Fields!Ret003BaseDR.Value > 0, False, True) + + + + Top + + + true + + + + + + true + true + + + + + + + + + + + + #eb831f + + 1pt + + + White + + 1pt + + + White + + 1pt + + + #eb831f + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 4 + + + + + + + + + 0.07938cm + + + + + true + true + + + + + ISR + + + + + + + Textbox61 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra001BaseDR.Value > 0, False, True) + + + + + + + + + + + #eb831f + + + + + + + + + + + + + true + true + + + + + Traslado + + + + + + + Textbox204 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra001BaseDR.Value > 0, False, True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!ImpPagado.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra001BaseDR.Value > 0, False, True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Tra001TipoFactorDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra001BaseDR.Value > 0, False, True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Tra001TasaOCuotaDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra001BaseDR.Value > 0, False, True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Tra001ImporteDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra001BaseDR.Value > 0, False, True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + White + + 1pt + + + #eb831f + + 1pt + + + White + + 1pt + + + #eb831f + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 4 + + + + + + + + + 0.07938cm + + + + + true + true + + + + + IVA + + + + + + + Textbox61 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra002BaseDR.Value > 0, False, True) + + + + + + + + + + + #eb831f + + + + + + + + + + + + + true + true + + + + + Traslado + + + + + + + Textbox204 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra002BaseDR.Value > 0, False, True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!ImpPagado.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra002BaseDR.Value > 0, False, True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Tra002TipoFactorDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra002BaseDR.Value > 0, False, True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Tra002TasaOCuotaDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra002BaseDR.Value > 0, False, True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Tra002ImporteDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra002BaseDR.Value > 0, False, True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + White + + 1pt + + + #eb831f + + 1pt + + + White + + 1pt + + + #eb831f + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 4 + + + + + + + + + 0.07938cm + + + + + true + true + + + + + IEPS + + + + + + + Textbox61 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra003BaseDR.Value > 0, False, True) + + + + + + + + + + + #eb831f + + + + + + + + + + + + + true + true + + + + + Traslado + + + + + + + Textbox204 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra003BaseDR.Value > 0, False, True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!ImpPagado.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra003BaseDR.Value > 0, False, True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Tra003TipoFactorDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra003BaseDR.Value > 0, False, True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Tra003TasaOCuotaDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra003BaseDR.Value > 0, False, True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Tra003ImporteDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra003BaseDR.Value > 0, False, True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + White + + 1pt + + + #eb831f + + 1pt + + + White + + 1pt + + + #eb831f + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 4 + + + + + + + + + 0.07938cm + + + + + true + true + + + + + ISR + + + + + + + Textbox61 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret001BaseDR.Value > 0, False, True) + + + + + + + + + + + #eb831f + + + + + + + + + + + + + true + true + + + + + Retención + + + + + + + Textbox207 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret001BaseDR.Value > 0, False, True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!ImpPagado.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret001BaseDR.Value > 0, False, True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Ret001TipoFactorDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret001BaseDR.Value > 0, False, True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Ret001TasaOCuotaDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret001BaseDR.Value > 0, False, True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Ret001ImporteDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret001BaseDR.Value > 0, False, True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + White + + 1pt + + + #eb831f + + 1pt + + + White + + 1pt + + + #eb831f + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 4 + + + + + + + + + 0.07938cm + + + + + true + true + + + + + IVA + + + + + + + Textbox61 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret002BaseDR.Value > 0, False, True) + + + + + + + + + + + #eb831f + + + + + + + + + + + + + true + true + + + + + Retención + + + + + + + Textbox207 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret002BaseDR.Value > 0, False, True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!ImpPagado.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret002BaseDR.Value > 0, False, True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Ret002TipoFactorDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret002BaseDR.Value > 0, False, True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Ret002TasaOCuotaDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret002BaseDR.Value > 0, False, True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Ret002ImporteDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret002BaseDR.Value > 0, False, True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + White + + 1pt + + + #eb831f + + 1pt + + + White + + 1pt + + + #eb831f + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 4 + + + + + + + + + 0.09729cm + + + + + true + true + + + + + IEPS + + + + + + + Textbox59 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret003BaseDR.Value > 0, False, True) + + + + + White + + + + #eb831f + + + + #eb831f + + + + White + + + + + + + + + + true + true + + + + + Retención + + + + + + + Textbox207 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret003BaseDR.Value > 0, False, True) + + + + + White + + + + #eb831f + + + + White + + + + White + + + + + + + + + + true + true + + + + + =Fields!ImpPagado.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret003BaseDR.Value > 0, False, True) + + + + + White + + + + #eb831f + + + + White + + + + White + + + + + + + + + + true + true + + + + + =Fields!Ret003TipoFactorDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret003BaseDR.Value > 0, False, True) + + + + + White + + + + #eb831f + + + + White + + + + White + + + + + + + + + + true + true + + + + + =Fields!Ret003TasaOCuotaDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret003BaseDR.Value > 0, False, True) + + + + + White + + + + #eb831f + + + + White + + + + White + + + + + + + + + + true + true + + + + + =Fields!Ret003ImporteDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret003BaseDR.Value > 0, False, True) + + + + + White + + + + #eb831f + + + + White + + + + White + + + es-MX + + + + + + + + true + true + + + + + + + + + + + + White + + 1pt + + + #eb831f + + 1pt + + + White + + 1pt + + + #eb831f + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 4 + + + + + + + @@ -1845,6 +4093,8 @@ + + @@ -1854,12 +4104,22 @@ + + + + + + + + + + DataSet2 5.05cm - 1.09cm + 1.82396cm 20.5314cm 1 - 16.1771cm + 16.62701cm @@ -4510,6 +6769,134 @@ TipoCambioDR System.String + + RetIVA + System.Float + + + RetISR + System.Float + + + Tra001ImpuestoDR + System.String + + + Tra001TipoFactorDR + System.String + + + Tra001TasaOCuotaDR + System.String + + + Tra001ImporteDR + System.Float + + + Tra002ImpuestoDR + System.String + + + Tra002TipoFactorDR + System.String + + + Tra002TasaOCuotaDR + System.String + + + Tra002ImporteDR + System.Float + + + Tra003ImpuestoDR + System.String + + + Tra003TipoFactorDR + System.String + + + Tra003TasaOCuotaDR + System.String + + + Tra003ImporteDR + System.Float + + + Ret001ImpuestoDR + System.String + + + Ret001TipoFactorDR + System.String + + + Ret001TasaOCuotaDR + System.String + + + Ret001ImporteDR + System.Float + + + Ret002ImpuestoDR + System.String + + + Ret002TipoFactorDR + System.String + + + Ret002TasaOCuotaDR + System.String + + + Ret002ImporteDR + System.Float + + + Ret003ImpuestoDR + System.String + + + Ret003TipoFactorDR + System.String + + + Ret003TasaOCuotaDR + System.String + + + Ret003ImporteDR + System.Float + + + Tra001BaseDR + System.Float + + + Tra002BaseDR + System.Float + + + Tra003BaseDR + System.Float + + + Ret001BaseDR + System.Float + + + Ret002BaseDR + System.Float + + + Ret003BaseDR + System.Float + DataSet @@ -4816,6 +7203,18 @@ true ReportParameter1 + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + diff --git a/vwd.webinfo b/vwd.webinfo index 2e4bdf3e2..bd3dbe60c 100644 --- a/vwd.webinfo +++ b/vwd.webinfo @@ -542,6 +542,10 @@ + + + + From dcd4db994abaef2456fd80e68c14b066228ff333 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Mon, 29 Aug 2022 19:24:29 -0700 Subject: [PATCH 3/5] Correcion logo recibo de pago e 70 --- Empresas/70/Formatos/ReciboDePago.rdlc | 337 ++----------------------- 1 file changed, 24 insertions(+), 313 deletions(-) diff --git a/Empresas/70/Formatos/ReciboDePago.rdlc b/Empresas/70/Formatos/ReciboDePago.rdlc index 2d298c914..aaa6da6e0 100644 --- a/Empresas/70/Formatos/ReciboDePago.rdlc +++ b/Empresas/70/Formatos/ReciboDePago.rdlc @@ -318,7 +318,7 @@ - 0.52062cm + 0.49541cm @@ -595,285 +595,6 @@ - - 0.16cm - - - - - true - true - - - - - - - - - - - - #eb831f - - 1pt - - - #eb831f - - 1pt - - - #eb831f - - 1pt - - - #eb831f - - 1pt - - #eb831f - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #eb831f - - 1pt - - - #eb831f - - 1pt - - - #eb831f - - 1pt - - - #eb831f - - 1pt - - #eb831f - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #eb831f - - 1pt - - - #eb831f - - 1pt - - - #eb831f - - 1pt - - - #eb831f - - 1pt - - #eb831f - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - Textbox23 - - - - #eb831f - - 1pt - - - #eb831f - - 1pt - - - #eb831f - - 1pt - - - #eb831f - - 1pt - - #eb831f - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - Textbox33 - - - - #eb831f - - 1pt - - - #eb831f - - 1pt - - - #eb831f - - 1pt - - - #eb831f - - 1pt - - #eb831f - 2pt - 2pt - 2pt - 2pt - - - - - - @@ -889,12 +610,11 @@ - DataSet2 3.16535cm - 1.17062cm + 0.98541cm 20.53564cm - true @@ -1809,7 +1528,6 @@ Top - true @@ -1844,7 +1562,6 @@ Top - true @@ -1879,7 +1596,6 @@ Top - true @@ -1914,7 +1630,6 @@ Top - true @@ -1949,7 +1664,6 @@ Top - true @@ -1984,17 +1698,17 @@ White - + 1pt White - + 1pt #eb831f - + 1pt 2pt @@ -4118,8 +3832,8 @@ DataSet2 - 5.05cm - 1.82396cm + 4.8595cm + 1.82398cm 20.5314cm 1 - 16.62701cm + 16.43651cm @@ -6329,7 +6043,7 @@ FitProportional 0.10737cm 1.5776cm - 2.88998cm + 2.74887cm 2.5499cm 4 - 0.84667cm + 0.41981cm true true @@ -6538,7 +6252,6 @@ Textbox35 - 0.17639cm 17.56289cm 0.41981cm 2.94979cm @@ -6585,7 +6298,6 @@ Textbox29 - 0.21343cm 0.01844cm 0.41981cm 6.8491cm @@ -6634,7 +6346,6 @@ Textbox31 - 0.21343cm 9.17244cm 0.41981cm 6.02198cm From 6e2c52945303f093d9e618fa9b03a531c40a870d Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 30 Aug 2022 11:42:05 -0700 Subject: [PATCH 4/5] BDH. solo mostrar codigo de barras en acumuladores, RecepcionAlmacen.aspx --- Inventarios/RecepcionAlmacen.aspx.vb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Inventarios/RecepcionAlmacen.aspx.vb b/Inventarios/RecepcionAlmacen.aspx.vb index e48ec5fd5..9a5fefa07 100644 --- a/Inventarios/RecepcionAlmacen.aspx.vb +++ b/Inventarios/RecepcionAlmacen.aspx.vb @@ -1394,6 +1394,9 @@ Partial Class Inventarios_RecepcionAlmacen If Not TmDT.Columns.Contains("CantidadSeleccionada") Then TmDT.Columns.Add("CantidadSeleccionada", GetType(Decimal)) End If + If Not TmDT.Columns.Contains("CveCategoria") Then + TmDT.Columns.Add("CveCategoria", GetType(Integer)) + End If GvInv.Columns(2).Visible = False @@ -1557,6 +1560,11 @@ Partial Class Inventarios_RecepcionAlmacen 'FUNCIONALIDAD PISTOLA DE CODIGOS If UsuarioActual.Empresa.Funcionalidad(132) = "1" And e.Row.DBCampo("CodigoBarras").Trim <> "" And Not UsuarioActual.TienePermisoProceso(174) Then e.Row.FCTextBox("TbCantidadF").Enabled = False + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then 'acumuladoras + If e.Row.DBCampo("CveCategoria") <> "249" Then + e.Row.FCTextBox("TbCantidadF").Enabled = True + End If + End If End If If e.Row.DBCampo("CantidadF").ToDecimal = 0 Then @@ -1606,7 +1614,7 @@ Partial Class Inventarios_RecepcionAlmacen Dim TxtCantidad = GvInv.Rows(Gvr.RowIndex).FCTextBox("TbCantidadF") If Gvr.DataKey("CantidadF").ToDecimal - TxtCantidad.Text.ToDecimal - 1 >= 0 Then - If Gvr.DataKey("AplicaSerieLote") = "True" Then + If Gvr.DataKey("AplicaSerie") = "True" Then TdSeriePS.Visible = True TxtSeriePS.Focus() From 53cb2bbbc8a84c93042e610a9e6670c46c78bb26 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Thu, 1 Sep 2022 08:18:09 -0700 Subject: [PATCH 5/5] RepServicioDomicilio base --- App_Code/ClsPaginas.vb | 53 ++- Ashx/CargaEventos.ashx | 65 ++- Compras/Compras.aspx | 4 +- Empresas/1/Formatos/Factura.rdlc | 498 ++++++++++++++++++++- OS/Asignaciones.aspx | 2 +- OS/Asignaciones.aspx.vb | 27 ++ OS/OrdenesServicios.aspx.vb | 13 +- OS/RepServicioDomicilio.aspx | 742 +++++++++++++++++++++++++++++++ OS/RepServicioDomicilio.aspx.vb | 272 +++++++++++ 9 files changed, 1657 insertions(+), 19 deletions(-) create mode 100644 OS/RepServicioDomicilio.aspx create mode 100644 OS/RepServicioDomicilio.aspx.vb diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 1e743cf35..241098fd9 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -5606,7 +5606,7 @@ Public Class ClsPaginas PaginaDict.Add("/Contabilidad/OCDetalleAlmacen.aspx".ToUpper(), -1) PaginaDict.Add("/Agropecuaria/CierreCultivo.aspx".ToUpper(), 1326) - + PaginaDict.Add("/Inventarios/RepRSCO.aspx".ToUpper(), 1328) @@ -5641,6 +5641,9 @@ Public Class ClsPaginas PaginaDict.Add("/Contabilidad2/RepBalanceGeneralHorizontal.aspx".ToUpper(), -1) + PaginaDict.Add("/OS/RepServicioDomicilio.aspx".ToUpper(), -1) + + 'ECOMMERCE @@ -7041,6 +7044,9 @@ Public Class ClsPaginas Vta.SelloCFDi = "Sin Timbrar" Vta.SelloSAT = "Sin Timbrar" + Dim CETipoOperacion = "", CEClavePedimento As String = "", CEIncoterm As String = "", CEId As String = "", CEMotivoTraslado As String = "", CETipoCambio As String = "" + Dim RCETipoOperacion As String = "", RCEClavePedimento As String = "", RCEIncoterm As String = "", RCEMotivoTraslado As String = "" + 'SI ESTA TIMBRADA - CON XML If File.Exists(PathXML) AndAlso Vta.Serie <> "VistaPrevia" Then 'Cuando es vista previe y coincide la serie y folio se ponen los datos fiscales Dim XmlDoc As New System.Xml.XmlDocument @@ -7077,6 +7083,38 @@ Public Class ClsPaginas Vta.SelloCFDi = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("SelloCFD").InnerText Vta.SelloSAT = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("SelloSAT").InnerText End If + + If XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Name = "cce11:ComercioExterior" Then + + CETipoOperacion = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("TipoOperacion").InnerText + CEClavePedimento = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("ClaveDePedimento").InnerText + CEIncoterm = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("Incoterm").InnerText + + + Dim namespaces As XmlNamespaceManager = New XmlNamespaceManager(XmlDoc.NameTable) + namespaces.AddNamespace("cce11", "http://www.sat.gob.mx/ComercioExterior11") + + CEId = "" + Try + CEId = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).SelectSingleNode("//cce11:Destinatario", namespaces).Attributes("NumRegIdTrib").InnerText 'XmlDoc.SelectNodes("//cfdi:Complemento/tfd:TimbreFiscalDigital/cce11:Destinatario") + Catch ex As Exception + + End Try + + + CEMotivoTraslado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("MotivoTraslado").InnerText + CETipoCambio = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("TipoCambioUSD").InnerText + + + + + RCETipoOperacion = GlobalDTTipoOperacion.FiltroPrimeroValor("Descripcion", $"ClaveSATTipoOperacion = '{CETipoOperacion}'") + RCEClavePedimento = GlobalDTClavePedimento.FiltroPrimeroValor("Descripcion", $"ClaveSATPedimento = '{CEClavePedimento}'") + RCEIncoterm = GlobalDTIncoterm.FiltroPrimeroValor("Descripcion", $"ClaveSATIncoterm = '{CEIncoterm}'") + RCEMotivoTraslado = GlobalDTSATMotivoTraslado.FiltroPrimeroValor("MotivoTraslado", $"ClaveSATMotivoTraslado = '{CEMotivoTraslado}'") + 'RCETipoCambio = {RCETipoCambio + End If + Next End If @@ -7191,6 +7229,17 @@ Public Class ClsPaginas Dim params As New List(Of ReportParameter) + + If RCETipoOperacion.Trim.Length > 0 Then + params.Add(New ReportParameter("CETipoOperacion", RCETipoOperacion)) + params.Add(New ReportParameter("CEClavePedimento", RCEClavePedimento)) + params.Add(New ReportParameter("CEIncoterm", RCEIncoterm)) + params.Add(New ReportParameter("CEId", CEId)) + params.Add(New ReportParameter("CEMotivoTraslado", RCEMotivoTraslado)) + params.Add(New ReportParameter("CETipoCamvio", CETipoCambio)) + End If + + If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then params.Add(New ReportParameter("CFDIVersion", Vta.Version)) If Vta.Cliente.CodigoRegimenFiscal.ToString.Length > 0 Then @@ -7915,7 +7964,7 @@ Public Class ClsPaginas Dim payload As New JObject( New JProperty("formato", Formato), New JProperty("ruta", RutaReporte), - New JProperty("UsarFormatoCompilado", false), + New JProperty("UsarFormatoCompilado", False), New JProperty("parametros", paramsArray), New JProperty("dataSource", dataSourceArray) ) diff --git a/Ashx/CargaEventos.ashx b/Ashx/CargaEventos.ashx index f74549f7e..9c23b4c77 100644 --- a/Ashx/CargaEventos.ashx +++ b/Ashx/CargaEventos.ashx @@ -22,22 +22,60 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState Dim FI As Date Dim FF As Date - If context.Request("U").ToEntero > 0 Then - CveUsuario = context.Request("U").ToEntero - CveEmpresa = context.Request("E").ToEntero - FI = context.Request("start").ToDate + If context.Request("METODO") IsNot Nothing Then - FF = context.Request("end").ToDate - If Not GetEventos(CveUsuario, CveEmpresa, FI, FF) Then - 'Convierte el objeto de Eventos en JSON - 'Dim oSerializer As System.Web.Script.Serialization.JavaScriptSerializer = New System.Web.Script.Serialization.JavaScriptSerializer - Dim sJSON As String = Newtonsoft.Json.JsonConvert.SerializeObject(events) + Select Case context.Request("METODO") + Case "servicio_domicilio" + + If context.Request("U").ToEntero > 0 Then + + CveUsuario = context.Request("U").ToEntero + CveEmpresa = context.Request("E").ToEntero + FI = context.Request("start").ToDate + FF = context.Request("end").ToDate + + If Not GetEventos(CveUsuario, CveEmpresa, FI, FF, CveOS:=-2) Then + 'Convierte el objeto de Eventos en JSON + 'Dim oSerializer As System.Web.Script.Serialization.JavaScriptSerializer = New System.Web.Script.Serialization.JavaScriptSerializer + Dim sJSON As String = Newtonsoft.Json.JsonConvert.SerializeObject(events) + + context.Response.Write(sJSON) + End If + + End If + + + Exit Select + Case Else + Exit Select + End Select + + + + Else + If context.Request("U").ToEntero > 0 Then + CveUsuario = context.Request("U").ToEntero + CveEmpresa = context.Request("E").ToEntero + FI = context.Request("start").ToDate + + FF = context.Request("end").ToDate + If Not GetEventos(CveUsuario, CveEmpresa, FI, FF) Then + 'Convierte el objeto de Eventos en JSON + 'Dim oSerializer As System.Web.Script.Serialization.JavaScriptSerializer = New System.Web.Script.Serialization.JavaScriptSerializer + Dim sJSON As String = Newtonsoft.Json.JsonConvert.SerializeObject(events) + + context.Response.Write(sJSON) + End If - context.Response.Write(sJSON) End If - End If + + + + + + End Sub Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable @@ -47,14 +85,15 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState End Property - Private Function GetEventos(CveUsuario As Integer, CveEmpresa As Integer, pFI As Date, pFF As Date) As Boolean + Private Function GetEventos(CveUsuario As Integer, CveEmpresa As Integer, pFI As Date, pFF As Date, Optional CveOS As Integer = -1) As Boolean Dim ObjEventos As New ClsOIEventos Dim ErrorEventos = False Dim CveEmpresaCRM As Integer = 0 - If ObjEventos.GetEventos(-1, -1, -1, "-1", "-1", -1, CveUsuario, CveUsuario, -1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, CveUsuario, CveUsuario, CveUsuario, CveEmpresa, pFI, pFF) Then + If ObjEventos.GetEventos(-1, -1, -1, "-1", "-1", -1, CveUsuario, CveUsuario, -1, -1, -1, "-1", -1, -1, -1, -1, CveOS, -1, -1, -1, -1, -1, CveUsuario, CveUsuario, CveUsuario, CveEmpresa, pFI, pFF) Then If ObjEventos.DtResultados.Rows.Count > 0 Then events = New List(Of CalendarEvent) + Try For Each dr As DataRow In ObjEventos.DtResultados.Rows Dim cevent As CalendarEvent = New CalendarEvent() diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx index f0da08cbc..a55268f82 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -6246,7 +6246,9 @@ }); $('input[name*=HdnOC1IVA]').each(function () { - SumaIVA += ToDouble($(this).val()); + + let tmpiva = (ToDouble($(this).val())).toFixed(2) + SumaIVA += ToDouble(tmpiva); }); $('input[name*=HdnOC1RetIVA]').each(function () { diff --git a/Empresas/1/Formatos/Factura.rdlc b/Empresas/1/Formatos/Factura.rdlc index 677f609ca..4ad240d0e 100644 --- a/Empresas/1/Formatos/Factura.rdlc +++ b/Empresas/1/Formatos/Factura.rdlc @@ -3173,8 +3173,468 @@ + + + + true + true + + + + + Tipo Operación: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!CETipoOperacion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Incoterm + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!CEIncoterm.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Motivo Traslado + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!CEMotivoTraslado.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Clave Pedimento + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!CEClavePedimento.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Num Reg Id Trib + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!CEId.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Tipo Cambio + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!CETipoCamvio.Value + + + + + + + Textbox80 + 2.73506cm + 2.46012cm + 0.36214cm + 13.59648cm + 11 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + COMPLEMENTO COMERCIO EXTERIOR + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + 16.99253cm + 0.53823cm + 3.0972cm + 19.06642cm + 47 + + = IIF( LEN(Parameters!CETipoOperacion.Value) > 0, False, True) + + + + + - 16.79496cm + 20.08973cm + + + + + + + + + + Reporte Servicios a Domicilio + + + + + + +
+
+ +
+
+
+ + Servicios a Domicilio +
+
+
+ +
+
+ + + + + + + + +
+
+
+
+ + + + +
+ + + + + + + + diff --git a/OS/RepServicioDomicilio.aspx.vb b/OS/RepServicioDomicilio.aspx.vb new file mode 100644 index 000000000..ffb346f99 --- /dev/null +++ b/OS/RepServicioDomicilio.aspx.vb @@ -0,0 +1,272 @@ +Option Explicit On +Option Strict On + +Imports Extensiones +Imports System.Data +Imports Microsoft.Reporting.WebForms +Imports System.Web.Services + +Partial Class OS_RepServicioDomicilio + Inherits ClsPaginas + +#Region "PROPIEDADES" + + + Private Property DtDatos As DataTable + Get + DtDatos = DirectCast(ViewState("DtDatos"), DataTable) + End Get + + Set(ByVal value As DataTable) + ViewState("DtDatos") = value + End Set + End Property + + Private Property DtColor As DataTable + Get + Return DirectCast(ViewState("DtColor"), DataTable) + End Get + Set(value As DataTable) + ViewState("DtColor") = value + End Set + End Property + Private Property Agrupador As String + Get + Return ViewState("Agrupador").ToString + End Get + + Set(value As String) + ViewState("Agrupador") = value + End Set + End Property + Private Property TCEspecifico As Double + Get + Return ViewState("TCEspecifico").ToString.ToDouble + End Get + + Set(value As Double) + ViewState("TCEspecifico") = value + End Set + End Property + Private Property TipoCambio As Integer + Get + Return ViewState("TipoCambio").ToString.ToEntero + End Get + + Set(value As Integer) + ViewState("TipoCambio") = value + End Set + End Property + + +#End Region + + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load + If Not IsPostBack Then + InicializaCalendar() + End If + End Sub + +#Region "CARGAS" + + Private Sub SetValues() + + + + End Sub + + + Private Sub CargaDatos() + + + End Sub + +#End Region + +#Region " FULL CALENDAR " + Private Sub InicializaCalendar() + RegistraScript("InitCalendar();") + + HdnU.Value = UsuarioActual.CveUsuario.ToString + HdnE.Value = UsuarioActual.CveEmpresa.ToString + + DirectCast(Master.FindControl("TSM"), ScriptManager).EnablePageMethods = True + CargaTiposAgenda() + CheckRecurrencia.Attributes.Add("onclick", "CheckAdd(this);") + End Sub + Private Sub CargaTiposAgenda() + Dim ObjEventos As New ClsOIEventos + + If ObjEventos.GetAgendaTipo() Then + DdlAgedaTipo.DataSource = ObjEventos.DtResultados + DdlAgedaTipo.DataBind() + DdlAgedaTipo.Items.Insert(0, New ListItem("Seleccione", "-1")) + Else + Alert("Ocurrió un error al obtener los tipos de agenda. Por favor recargue la página", TipoMensaje.MsgError) + End If + + ObjEventos.Dispose() + End Sub + Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) + Dim ObjEventos As New ClsOIEventos + + Dim FechaInicio = TxtFechaInicioAgenda.Text.ToDateTime() + Dim FechaFin = TxtFechaFinAgenda.Text.ToDateTime() + + RegistraScript("GetView();") + + Dim RecurrenciaTipo = 0, Frecuencia = -1, DiasSemana = "-1", Dias = -1, Mes = -1, RecurrenciaFin = "-1" + If CheckRecurrencia.Checked Then + RecurrenciaTipo = RBLRecurrencia.SelectedValue.ToEntero + Frecuencia = TxtFrecuencia.Text.ToEntero + + 'OBTENEMOS LOS DIAS SELECCIONADOS EN LA OPCION DE RECURRENCIA POR SEMANA + Select Case RecurrenciaTipo + Case 3 + Dim StringDias = "" + For Each item As ListItem In CheckDiasSemana.Items + If item.Selected Then + If StringDias.Length > 0 Then + StringDias += "," + End If + StringDias += item.Value + End If + Next + If StringDias.Length > 0 Then + DiasSemana = StringDias + End If + End Select + + + 'If RBSinFechaFinAdd.Checked Then + ' RecurrenciaFin = "-1" + 'Else + If RBNumeroOcurrencias.Checked Then + RecurrenciaFin = TxtNumeroOcurrencias.Text + ElseIf RBFechaFin.Checked Then + RecurrenciaFin = TxtFechaFinRecurrencia.Text + Else + RecurrenciaFin = "-1" + End If + Else + If HdnCveEvento.Value.ToEntero > 0 Then + Frecuencia = -2 : DiasSemana = "-2" : Dias = -2 : Mes = -2 : RecurrenciaFin = "-2" + End If + End If + + '11/05/2018 - GASTO RECURRENTE + Dim CveTipoEvento As Integer = IIf(ChkGastoRecurrente.Checked, 10, 2).ToString().ToEntero() + Dim Importe As Double = Convert.ToDouble(IIf(ChkGastoRecurrente.Checked, TxtImporteGastoRecurrente.Text, "-1")) + + If HdnCveEvento.Value.ToEntero > 0 Then + If ObjEventos.UpdateEvento(TxtAsuntoAgenda.Text, TxtDescripcionAgenda.Text, DdlPrioridad.SelectedValue.ToEntero, DdlAgedaTipo.SelectedValue.ToEntero, -1, FechaInicio, FechaFin, -1, "-1", HdnCveEvento.Value.ToEntero, "-1", + RecurrenciaTipo, Frecuencia, DiasSemana, Dias, Mes, RecurrenciaFin, Importe:=Importe) Then + Alert("El Evento se actualizó correctamente", TipoMensaje.MsgInformacion) + Else + Alert("Ocurrió un error al actualizar el evento", TipoMensaje.MsgAdvertencia) + End If + Else + If ObjEventos.AddEventoAgenda(DdlAgedaTipo.SelectedValue.ToEntero, TxtAsuntoAgenda.Text, TxtDescripcionAgenda.Text, DdlPrioridad.SelectedValue.ToEntero, FechaInicio, FechaFin, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, + RecurrenciaTipo:=RecurrenciaTipo, Frecuencia:=Frecuencia, DiasSemana:=DiasSemana, Dia:=Dias, Mes:=Mes, RecurrenciaFin:=RecurrenciaFin, CveTipoEvento:=CveTipoEvento, Importe:=Importe) Then + + Alert("El Evento se guardó correctamente", TipoMensaje.MsgInformacion) + Else + Alert("Ocurrió un error al Guardar el evento", TipoMensaje.MsgAdvertencia) + End If + End If + + ObjEventos.Dispose() + RegistraScript("Calendario();SetView();$('#ModalAgenda').modal('hide');", "1234") + LimpiaModalAgenda() + + End Sub + Private Sub LimpiaModalAgenda() + TxtDescripcionAgenda.Text = "" + TxtAsuntoAgenda.Text = "" + DdlPrioridad.SelectedValue = "1" + TxtNumeroOcurrencias.Text = "" + TxtFechaFinRecurrencia.Text = "" + RBFechaFin.Checked = False + RBNumeroOcurrencias.Checked = False + RBLRecurrencia.SelectedValue = "1" + CheckDiasSemana.ClearSelection() + RBLRecurrencia_SelectedIndexChanged(RBLRecurrencia, EventArgs.Empty) + TxtFrecuencia.Text = "1" + LblEmpresaCRM.Text = "" + End Sub + + Protected Sub BtnEliminar_Click(sender As Object, e As EventArgs) + + Dim ObjEventos As New ClsOIEventos + RegistraScript("GetView();") + + If ObjEventos.RemoveEvento(HdnCveEvento.Value.ToEntero, UsuarioActual.CveEmpresa) Then + RegistraScript("Calendario();SetView();$('#ModalAgenda').modal('hide');", "1234") + Alert("El evento se eliminó correctamente", TipoMensaje.MsgInformacion) + Else + Alert("Ocurrió un error al eliminar el evento, por favor intente de nuevo.", TipoMensaje.MsgError) + End If + + ObjEventos.Dispose() + End Sub + + + Public Shared Function EliminaEvento(CveEvento As Integer, CveEmpresa As Integer) As String + Dim ObjEventos As New ClsOIEventos + + ObjEventos.RemoveEvento(CveEvento, CveEmpresa) + + ObjEventos.Dispose() + Return CveEvento.ToString + End Function + + + Public Shared Function ActualizaEvento(ClsEvent As CalendarEvent) As String + Dim ObjEventos As New ClsOIEventos + + Dim FechaInicio = DateTimeOffset.Parse(ClsEvent.start).DateTime + Dim FechaFin = DateTimeOffset.Parse(ClsEvent.end).DateTime + + If ObjEventos.UpdateEvento("-1", "-1", -1, -1, -1, FechaInicio, FechaFin, -1, "-1", ClsEvent.id) Then + End If + + ObjEventos.Dispose() + Return "a" + End Function + Protected Sub RBLRecurrencia_SelectedIndexChanged(sender As Object, e As EventArgs) + Select Case RBLRecurrencia.SelectedValue.ToEntero + Case 1 + LblTextoFrecuencia.Text = "Hora(s)" + TrDiasSemanaAdd.Style("display") = "none" + Case 2 + LblTextoFrecuencia.Text = "Dia(s)" + TrDiasSemanaAdd.Style("display") = "none" + Case 3 + LblTextoFrecuencia.Text = "Semana(s)" + TrDiasSemanaAdd.Style("display") = "block" + + 'Chequea los dias seleccionados en la recurrencia + For Each item As ListItem In CheckDiasSemana.Items + If HdnDiasSemanaAgendar.Value.Contains(item.Value) Then + item.Selected = True + Else + item.Selected = False + End If + Next + Case 4 + LblTextoFrecuencia.Text = "Mes(es)" + TrDiasSemanaAdd.Style("display") = "none" + Case 5 + LblTextoFrecuencia.Text = "Año(s)" + TrDiasSemanaAdd.Style("display") = "none" + Case Else + End Select + UpRecurrencia.Update() + End Sub + Protected Sub BtnActualizaAdd_Click(sender As Object, e As EventArgs) + RBLRecurrencia_SelectedIndexChanged(RBLRecurrencia, EventArgs.Empty) + End Sub +#End Region + + +End Class