diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index a1fff0611..47e593526 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -436,6 +436,14 @@ Partial Class Bancos_IE End Set End Property + Private Property CveCorte As Integer + Get + Return IfNull(ViewState("CveCorte"), -1, ViewState("CveCorte").ToString().ToString()).ToString().ToEntero() + End Get + Set(value As Integer) + ViewState("CveCorte") = value + End Set + End Property #Region "CANCELACIÓN COMPLEMENTO MODAL V2" @@ -1180,6 +1188,16 @@ Partial Class Bancos_IE GvRH.DataBind() UpGvRH.Update() End Sub + Private Sub CargaCorteCaja() + 'Checar si hay un Turno Abierto + Dim ObjPVenta As New ClsPuntoVenta + If ObjPVenta.GetVta_Cortes("-1", "-1", UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, 0) Then + If ObjPVenta.DtResultados.Rows.Count > 0 Then + CveCorte = ObjPVenta.CveCorte + End If + End If + ObjPVenta.Dispose() + End Sub #Region " CARGA PROVEEDOR " Protected Sub DdlProveedores_selectedindexchange(sender As Object, e As EventArgs) @@ -1459,6 +1477,11 @@ Partial Class Bancos_IE DivCheques.Visible = False End If + End If + + 'PAGAR NC CON C.CH DEBE DESCONTAR EN EL CORTE + If UsuarioActual.TienePermisoProceso(160) AndAlso Opcion IsNot Nothing AndAlso Opcion = "DevDinV" AndAlso dr("CveTipoCuenta").ToString.ToEntero = 1 Then + CargaCorteCaja() End If If dr("UsaTarjeta").ToString = "True" Then @@ -2506,7 +2529,7 @@ Partial Class Bancos_IE CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.Trim.ToDate, TxtFolio.Text.Trim, PagueseA, TxtImporte.Text.Trim.ToDouble, DdlMoneda.SelectedValue.ToEntero, TxtTipoCambio.Text.Trim.ToDouble, TxtObservaciones.Text.Trim, TxtNotificarA.Text.Trim, ChkAbonoCuenta.Checked, ChkAplicaImpuestos.Checked, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaDeposito:=CveCuentaDeposito, CveEstatusIE:=DdlEstatusIE.SelectedValue.ToString.ToEntero, Referencia:=If(TxtReferenciaCIE.Visible, TxtReferenciaCIE.Text, "-1"), CveCuentaTarjeta:=If(DivTarjeta.Visible, DdlTarjeta.SelectedValue.ToEntero, -1), - ConceptoCIE:=If(TxtConceptoCIE.Text.Trim.Length > 0, TxtConceptoCIE.Text, "-1")) + ConceptoCIE:=If(TxtConceptoCIE.Text.Trim.Length > 0, TxtConceptoCIE.Text, "-1"), CveCorte:=Me.CveCorte) If CveIE > 0 Then