From 66a3d8b3b91dbf37951c884e542fb4bab097971a Mon Sep 17 00:00:00 2001 From: Desarrollo2019 Date: Tue, 20 Aug 2019 17:58:06 -0700 Subject: [PATCH 1/8] Validacion en Ventas impuestos de hijos y padres --- App_Code/ClsContabilidad.vb | 3 ++- Ventas/Ventas.aspx.vb | 27 ++++++++++++++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index ba54c7715..31a25e690 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -5662,12 +5662,13 @@ Public Class ClsContabilidad #End Region #Region "VALIDACION POLIZA DESCUADRADA" - Public Function ValidacionPrePolizaCuadre(CvePrePoliza As Integer, Opcion As Integer) As Boolean + Public Function ValidacionPrePolizaCuadre(CvePrePoliza As Integer, Opcion As Integer, Optional CveVenta As Integer = -1) As Boolean Dim Retorno = False DataAdapter("PA_Conta_PrePoliza_Validacion") With SqlAdapter.SelectCommand.Parameters .Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza + .Add("@CveVenta", SqlDbType.Int).Value = CveVenta .Add("@Opcion", SqlDbType.Int).Value = Opcion .Add("@Valor", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@MsgSalida", SqlDbType.VarChar, 100).Direction = ParameterDirection.Output diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index f3a8526a7..3f0ab4f82 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -10215,7 +10215,11 @@ Partial Class Ventas If ObjConta.ValidacionPrePolizaCuadre(ObjFactura.CvePrePoliza, 2) Then If ObjConta.ValorPolizaDescuadre > 0 Then - 'ErrorPrepoliza = True + If ObjConta.ValorPolizaDescuadre = 2 Then + ErrorPrepoliza = True + Alert(ObjConta.MensajePolizaDescuadre, TipoMensaje.MsgError) + End If + 'ErrorPrepoliza = True GuardaLogAD($"Ventas/Ventas-ProcesoPrePolizas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{ObjFactura.CvePrePoliza}", "LogPrePolizas") 'SIRVE PARA VER LA PREPOLIZA QUE SE VALIDA @@ -15669,6 +15673,15 @@ Partial Class Ventas End If End If + If ObjConta.ValidacionPrePolizaCuadre(-1, 2, CveVenta) Then + If ObjConta.ValorPolizaDescuadre > 0 Then + If ObjConta.ValorPolizaDescuadre = 2 Then + OcurrioError = True + ErrorList.Add(ObjConta.MensajePolizaDescuadre) + End If + End If + End If + If Not OcurrioError Then If RegeneracionPolizas(ObjVentas, ObjAC) Then OcurrioError = True @@ -21650,6 +21663,7 @@ Partial Class Ventas Dim ObjVentas As New ClsVentas Dim ObjCGame As New ClsCGame(ObjVentas.IniciaTransacSQL()) + Dim ObjConta As New ClsContabilidad(ObjVentas.IniciaTransacSQL()) Dim OcurrioError = False Dim MensajeError = "" @@ -21703,6 +21717,15 @@ Partial Class Ventas End If End If + If ObjConta.ValidacionPrePolizaCuadre(-1, 2, CveVenta) Then + If ObjConta.ValorPolizaDescuadre > 0 Then + If ObjConta.ValorPolizaDescuadre = 2 Then + OcurrioError = True + MensajeError = ObjConta.MensajePolizaDescuadre + End If + End If + End If + If OcurrioError Then ObjVentas.RollBack() Alert($"{MensajeError}. Por favor vuelva a intentar.", TipoMensaje.MsgError) @@ -21721,6 +21744,8 @@ Partial Class Ventas End If ObjVentas.Dispose() + ObjConta.Dispose() + ObjCGame.Dispose() End Sub #End Region From 322e7abb3dd334716bb5f23235752a6dea4b59db Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Tue, 20 Aug 2019 18:54:52 -0700 Subject: [PATCH 2/8] ClsBancos Editar IE --- App_Code/ClsBancos.vb | 12 +- Bancos/IE.aspx | 29 +- Bancos/IE.aspx.vb | 835 ++++++++++++++++++++---------------------- 3 files changed, 414 insertions(+), 462 deletions(-) diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index 69909efbc..5f783d5de 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -1315,7 +1315,8 @@ Public Class ClsBancos Return Retorno End Function - Public Function UpdateBancos_IE(FechaDocumento As DateTime, FechaAplicado As DateTime?, CveIE As Integer, Optional Folio As String = "-1") As Boolean + Public Function UpdateBancos_IE(FechaDocumento As DateTime, FechaAplicado As DateTime?, CveIE As Integer, Optional Folio As String = "-1", Optional CveCuentaDeposito As Integer = -1, Optional CveCuenta As Integer = -1, + Optional Observaciones As String = "-1") As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Banc_IEUpdate") @@ -1328,8 +1329,17 @@ Public Class ClsBancos Else .Add("@FechaAplicado", SqlDbType.DateTime).Value = FechaAplicado End If + .Add("@CveIE", SqlDbType.Int).Value = CveIE .Add("@Folio", SqlDbType.VarChar).Value = Folio + + .Add("@CveCuentaDeposito", SqlDbType.Int).Value = CveCuentaDeposito + .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta + .Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones + + + + End With Try diff --git a/Bancos/IE.aspx b/Bancos/IE.aspx index 9579c2804..8220a8417 100644 --- a/Bancos/IE.aspx +++ b/Bancos/IE.aspx @@ -11,17 +11,14 @@   +
  • Listado Facturas Pagadas
  • -
  • Imprimir
  • - - -
  • @@ -30,7 +27,6 @@ -
  • Actualizar Tipo Cambio
  • @@ -54,7 +50,10 @@ Refacturar Complemento
  • - Cancelar Complemento + Cancelar Complemento + + <%--data-original-title="¿Está seguro que desea cancelar el documento?" data-btn-ok-label="si" Style="color: #686868;"> +
  • @@ -862,6 +861,7 @@ + @@ -1228,6 +1228,7 @@ @@ -1333,29 +1334,31 @@