From eaeb9e9eef83c3b89b0f2539b195e1b1167c5d0e Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Mon, 23 Mar 2020 18:53:03 -0700 Subject: [PATCH 1/5] . --- Empresas/Grales/Formatos/RepProductosServicios.rdlc | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/Empresas/Grales/Formatos/RepProductosServicios.rdlc b/Empresas/Grales/Formatos/RepProductosServicios.rdlc index f3e1f32c1..1a7711280 100644 --- a/Empresas/Grales/Formatos/RepProductosServicios.rdlc +++ b/Empresas/Grales/Formatos/RepProductosServicios.rdlc @@ -65,7 +65,7 @@ - 0.6cm + 0.49417cm @@ -79,7 +79,6 @@ =Fields!Cantidad.Value @@ -116,7 +115,6 @@ =Fields!SubTotal.Value @@ -153,7 +151,6 @@ =Fields!Descuento.Value @@ -190,7 +187,6 @@ =Fields!IVA.Value @@ -227,7 +223,6 @@ =Fields!Total.Value @@ -461,7 +456,6 @@ =Fields!GPO.Value @@ -488,7 +482,7 @@ DataSet1 0.06614cm - 1.2cm + 1.09417cm 18.9786cm - 0.47244in + 0.43077in - - true - true - - - - - Fecha Inicio: - - - - - - - - - =IIF(Parameters!FechaInicio.Value = "-1","",Parameters!FechaInicio.Value) - - - - - - - - - - - - - - - Fecha Fin: - - - - - - - - - =IIF(Parameters!FechaFin.Value = "-1","",Parameters!FechaFin.Value) - - - - Textbox13 - 0.0259cm - 15.579cm - 2.18834cm - 3.53188cm - 2 - - - 2pt - 2pt - 2pt - 2pt - - External =Parameters!LogoPath.Value @@ -673,7 +588,7 @@ 0.06614cm 2.22362cm 2.33715cm - 3 + 2 @@ -700,7 +615,7 @@ 0.06614cm 0.6cm 18.9786cm - 4 + 3 From 34235f8a61da2d6f0fa6cb87871c080b26995fa2 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 24 Mar 2020 14:35:59 -0700 Subject: [PATCH 3/5] Refacturacion con pagos (P2) --- App_Code/ClsVentas.vb | 18 ++++++++++++++++++ App_Code/Modelos.vb | 13 +++++++++++-- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index a77c722ea..057dfdf96 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -547,6 +547,24 @@ Public Class ClsVentas Return Retorno End Function + Public Function CancelarPagos(CveVenta As Integer, CvePrePoliza As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_CancelarPagosVenta") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveVenta", SqlDbType.Int).Value = CveVenta + .Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al cancelar los pagos de la venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function Public Function RemoveVta_VentaPago(CveVenta As Integer, CveMetodoPago As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_VentasPagoRemove") diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index f3f8f4c5e..f6ab19071 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -4285,7 +4285,7 @@ Namespace Modelos End If 'CUANDO LA CANCELACION ESTA EN PROCESO NO DEBE REALIZAR NADA DE ESTE PROCESO - If (((ObjFactura.Saldo > 0 AndAlso (CveEstatus > 0 AndAlso CveEstatus <> 20)) OrElse (ObjFactura.Total = 0 AndAlso UsuarioActual.CveEmpresa.Contiene(72) AndAlso ObjFactura.TipoDocto.Contiene("Ing"))) AndAlso CveEstatus.Contiene(4, 5)) OrElse (CvePlantillaPoliza = 7 AndAlso (CveEstatus > 0 AndAlso CveEstatus <> 20)) Then + If Not EsRefacturacion AndAlso ((((ObjFactura.Saldo > 0 AndAlso (CveEstatus > 0 AndAlso CveEstatus <> 20)) OrElse (ObjFactura.Total = 0 AndAlso UsuarioActual.CveEmpresa.Contiene(72) AndAlso ObjFactura.TipoDocto.Contiene("Ing"))) AndAlso CveEstatus.Contiene(4, 5)) OrElse (CvePlantillaPoliza = 7 AndAlso (CveEstatus > 0 AndAlso CveEstatus <> 20))) Then 'CUANDO SE CANCELA, LA PÓLIZA DEBE DE SER DE DIARIO CvePrePoliza = ObjConta.AddPrePolizas("Modelos/CancelarDocumento", CvePlantillaPoliza, ObjFactura.Total, ObjFactura.Total, ObjFactura.CveMoneda, Now, ObjFactura.Cliente.Nombre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=3) @@ -4296,8 +4296,16 @@ Namespace Modelos MensajeError = "Ocurrió un error al generar la prepoliza de cancelación." End If + ''CANCELAR PAGOS + 'If EsRefacturacion AndAlso ObjFactura.TipoDocto.Contiene("Ing", "Rem", "Ant") AndAlso ObjFactura.Pagado > 0 Then + ' If Not ObjVentas.CancelarPagos(ObjFactura.CveVenta, CvePrePoliza) Then + ' ErrorCancelar = True + ' MensajeError = "Ocurrió un error al generar la cancelación de pagos." + ' End If + 'End If + 'CANCELAR PAGOS - If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then + If Not EsRefacturacion AndAlso ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then If Not ErrorCancelar Then If Not ObjConta.PrePolizasCancelarPagos(ObjFactura.CveDevolucion, CvePrePoliza) Then ErrorCancelar = True @@ -4306,6 +4314,7 @@ Namespace Modelos End If End If + 'CANCELA PREPOLIZA If Not ErrorCancelar Then ErrorCancelar = ProcesoPrepolizas(ObjFactura, ObjConta, -1, ObjFactura.DtDetalle, ObjAC, -1, ObjBancos, ObjVentas, ObjEventos, DtRemisionesRelacionadas:=DtRemisionesRelacionadas, SeCancelaRemisionProceso:=SeCancelaRemisionProceso, From b3c5b0fdcb6e68d758a02283304af0c614696250 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 24 Mar 2020 14:36:09 -0700 Subject: [PATCH 4/5] Exportar excel en rep remisiones detalle --- Ventas/RepRemisionesDetalle.aspx | 72 ++++------------------------- Ventas/RepRemisionesDetalle.aspx.vb | 6 ++- vwd.webinfo | 2 + 3 files changed, 15 insertions(+), 65 deletions(-) diff --git a/Ventas/RepRemisionesDetalle.aspx b/Ventas/RepRemisionesDetalle.aspx index a42d59d3a..88a19d02a 100644 --- a/Ventas/RepRemisionesDetalle.aspx +++ b/Ventas/RepRemisionesDetalle.aspx @@ -202,70 +202,14 @@ CssClass="table table-striped table-advance table-hover ScrollAD" data-sort="true" Width="100%" Style="text-align: center;" GridLines="None"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + diff --git a/Ventas/RepRemisionesDetalle.aspx.vb b/Ventas/RepRemisionesDetalle.aspx.vb index 922842e23..f8e1fbe6a 100644 --- a/Ventas/RepRemisionesDetalle.aspx.vb +++ b/Ventas/RepRemisionesDetalle.aspx.vb @@ -280,9 +280,13 @@ Partial Class RepRemisionesDetalle Private Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click - GvDatos.ExportToExcel("Reporte de Remisiones por Facturar Detalle" & Now.ToShortDateString) + 'GvDatos.ExportToExcel("Reporte de Remisiones por Facturar Detalle" & Now.ToShortDateString) + GvDatos.ExportToExcelG("Reporte de Remisiones por Facturar Detalle" & Now.ToShortDateString, Titulo:="Reporte de Remisiones por Facturar Detalle ", Usuario:=UsuarioActual) End Sub Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) CargaDatos() End Sub + Public Overrides Sub VerifyRenderingInServerForm(control As Control) + 'MyBase.VerifyRenderingInServerForm(control) + End Sub End Class diff --git a/vwd.webinfo b/vwd.webinfo index ea9dcacfe..c61135231 100644 --- a/vwd.webinfo +++ b/vwd.webinfo @@ -32,6 +32,8 @@ + + From 575c85e432af8f5a971bbcedc3f9afa82bd0f017 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 24 Mar 2020 14:39:57 -0700 Subject: [PATCH 5/5] Correcion de validacion de pagos --- Ventas/Ventas.aspx.vb | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 315aade63..93b3b113b 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -17736,20 +17736,20 @@ Partial Class Ventas End Sub Private Function ValidaPagosContado() As Boolean Dim Retorno = False - Dim Total As Decimal = TxtTotal.Text.ToDecimal() + 'SI LA VENTA ES NUEVA VALIDAR TAMBIEN LOS PAGOS DE CONTADO If UsuarioActual.CveEmpresa = 141 AndAlso CveVenta <= 0 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ant") Then - If Not PermiteCredito AndAlso (DtPagos Is Nothing OrElse DtPagos.Rows.Count = 0) AndAlso Total > 0 Then + If Not PermiteCredito AndAlso (DtPagos Is Nothing OrElse DtPagos.Rows.Count = 0) AndAlso TxtTotal.Text.ToDecimal > 0 Then Alert("Es necesario especificar un pago.", TipoMensaje.MsgAdvertencia) Retorno = True Return Retorno End If - If Not PermiteCredito AndAlso (DtPagos IsNot Nothing AndAlso DtPagos.Rows.Count > 0) AndAlso Total > 0 Then + If Not PermiteCredito AndAlso (DtPagos IsNot Nothing AndAlso DtPagos.Rows.Count > 0) AndAlso TxtTotal.Text.ToDecimal > 0 Then Dim TotalPago As Decimal = DtPagos.SUM("Importe").ToDecimal() - If TotalPago < Total Then + If TotalPago < TxtTotal.Text.ToDecimal Then Alert("La suma de los pagos debe ser igual al total de la venta.", TipoMensaje.MsgAdvertencia) Retorno = True Return Retorno @@ -17767,11 +17767,10 @@ Partial Class Ventas If UsuarioActual.CveEmpresa = 141 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ant") Then - If Not PermiteCredito AndAlso DtPagos IsNot Nothing AndAlso DtPagos.Rows.Count > 0 AndAlso Total > 0 Then - + If Not PermiteCredito AndAlso DtPagos IsNot Nothing AndAlso DtPagos.Rows.Count > 0 AndAlso TxtTotal.Text.ToDecimal > 0 Then Dim TotalPago As Decimal = DtPagos.SUM("Importe").ToDecimal() - If TotalPago < Total Then + If TotalPago < TxtTotal.Text.ToDecimal Then Alert("La suma de los pagos debe ser igual al total de la venta.", TipoMensaje.MsgAdvertencia) Retorno = True Return Retorno