From 72217d88d3302a0d66af1dab36a3b478d7b67366 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Thu, 25 Jun 2020 11:52:32 -0700 Subject: [PATCH] BDH: Pagar NC con C.CH debe descontar en el corte --- Bancos/IE.aspx.vb | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index cfb1e58c4..7b6fc323e 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -437,6 +437,15 @@ Partial Class Bancos_IE 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" @@ -1291,6 +1300,17 @@ Partial Class Bancos_IE End If ObjCliente.Dispose() 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 #End Region #Region " CARGA PERSONAL " @@ -1428,6 +1448,11 @@ Partial Class Bancos_IE 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 CargaGridTarjetas() Else @@ -2471,7 +2496,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)) + 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), CveCorte:=Me.CveCorte) If CveIE > 0 Then