diff --git a/.gitignore b/.gitignore index fc8032bc3..a3e8e0702 100644 --- a/.gitignore +++ b/.gitignore @@ -259,6 +259,7 @@ paket-files/ # JetBrains Rider .idea/ *.sln.iml +*.sln # CodeRush .cr/ 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/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index 81d5750b4..16d5a2652 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -154,7 +154,7 @@ Public Class ClsContabilidad Retorno = SqlAdapter.SelectCommand.Parameters("@CvePrePoliza").Value.ToString.ToEntero Catch ex As Exception - If ex.Message.Contains("50005;") Then + If ex.Message.Contains("50015;") Then OnError("No se puede registrar una póliza en un ejercicio Cerrado", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) Else OnError("Ocurrió un error al Guardar", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) @@ -500,7 +500,12 @@ Public Class ClsContabilidad SqlAdapter.Fill(Data) Retorno = True Catch ex As Exception - OnError("Ocurrió un error al eliminar el movimiento", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + + If ex.Message.Contains("50015;") Then + OnError("No se puede eliminar una póliza en un ejercicio Cerrado", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + Else + OnError("Ocurrió un error al Guardar", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End If End Try Return Retorno @@ -933,6 +938,22 @@ Public Class ClsContabilidad Return Retorno End Function + Public Function UpdatePrePolizasDetalleBloquear(CvePrePoliza As Integer, Bloquear As Boolean) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Conta_PrePolizasDetalleBloquearUpdate") + With SqlAdapter.SelectCommand.Parameters + .Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza + .Add("@Bloquear", SqlDbType.Bit).Value = Bloquear + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al bloquear o desbloquear las prepolizas detalle.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return Retorno + End Function + Public Function ContabilizarPrePoliza(CvePrePoliza As Integer, CveUsuario As Integer, Empresa As Empresa, Optional Fecha As Date = MinFecha, Optional Concepto As String = "", @@ -981,6 +1002,8 @@ Public Class ClsContabilidad End If + + Dim tIdPoliza As Integer Dim CveTipoPoliza, FolioFijo As Integer Dim Cargos As Decimal @@ -1260,6 +1283,12 @@ Public Class ClsContabilidad End If End If + If Not OcurrioError Then + If Not UpdatePrePolizasDetalleBloquear(CvePrePoliza, True) Then + OcurrioError = True + End If + End If + 'If Empresa.Funcionalidad(522).ToString = "1" And Empresa.UsaContabilidad Then ' Dim CodigoPersona As String = "" @@ -5638,12 +5667,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/Ashx/SIGFacturacion.ashx b/Ashx/SIGFacturacion.ashx index 5f4fb1591..d016019c6 100644 --- a/Ashx/SIGFacturacion.ashx +++ b/Ashx/SIGFacturacion.ashx @@ -763,7 +763,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState End Sub Private Function DescargarFactura(CveVenta As Integer, CveEmpresa As Integer) As Byte() - Dim Url = New Uri(String.Format("{0}Compras/PopUpVerFactura.aspx?P={1}", ClsPaginas.UrlSitio, Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1", CveVenta)))) + Dim Url = New Uri(String.Format("{0}Compras/PopUpVerFactura.aspx?P={1}", ClsPaginas.UrlSitio, Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta)))) Dim File As Byte() = Nothing Try Using httpClient = New HttpClient() diff --git a/Bancos/IE.aspx b/Bancos/IE.aspx index 9579c2804..ebb998e18 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 + + <%-- data-original-title="¿Está seguro que desea cancelar el documento?" data-btn-ok-label="si" Style="color: #686868;"> +
  • @@ -862,6 +861,7 @@ + @@ -962,7 +962,7 @@ - + @@ -1228,6 +1228,7 @@ @@ -1333,29 +1334,31 @@ Comandos @@ -704,11 +705,11 @@ <%-- 9 --%> - + <%-- 10 --%> - + - + @@ -1436,11 +1437,11 @@
    + @@ -1792,18 +1794,21 @@ - -
    -
    - -
    -
    -
    -
    -
    - -
    -
    + + +
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
    @@ -3211,10 +3216,11 @@ - + ScrollAD " + data-height="320" Style="text-align: left;" GridLines="None" DataKeyNames="CvePS"> @@ -4330,7 +4336,7 @@ - +
    @@ -4340,7 +4346,7 @@ -
    +
    @@ -4541,10 +4547,10 @@ - - - + + + @@ -4773,9 +4779,9 @@