Transferencias tarjetas
This commit is contained in:
@@ -795,7 +795,7 @@ Partial Class Bancos_IE
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.CveEmpresa = 13 Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 1) Then
|
||||
TRImporteDeduccionesPago.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
@@ -181,19 +181,19 @@
|
||||
<div>
|
||||
<asp:UpdatePanel ID="UpGvTC" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvTC" runat="server" DataKeyNames="CveCuentaTarjeta, CveCuenta" AutoGenerateColumns="False" EmptyDataText="No hay tarjetas vinculadas" ToolTip="Tarjetas de Credito" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
|
||||
<asp:GridView ID="GvTC" runat="server" DataKeyNames="CveCuenta" AutoGenerateColumns="False" EmptyDataText="No hay tarjetas vinculadas" ToolTip="Tarjetas de Credito" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Numero" HeaderText="Tarjeta de Credito" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="CLABE" HeaderText="CLABE" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:BoundField>
|
||||
<asp:TemplateField HeaderText="Responsable">
|
||||
<asp:TemplateField HeaderText="Num Cuenta">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtResponsable" runat="server" Width="250px" Text='<%# Eval("Responsable")%>' CssClass="TextBoxAsLabel"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtResponsable" runat="server" Width="250px" Text='<%# Eval("NumCuenta")%>' CssClass="TextBoxAsLabel"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cantidad a Abonar">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtAbono" runat="server" Style="text-align: right;"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtAbono" runat="server" Style="text-align: right;" onkeyup="FormatoMoneda(this)" ></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
Imports System.IO
|
||||
Imports Extensiones
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Partial Class Bancos_Transferencias
|
||||
Inherits ClsPaginas
|
||||
@@ -188,7 +189,7 @@ Partial Class Bancos_Transferencias
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As System.EventArgs) Handles BtnGuardar.Click
|
||||
|
||||
'VALIDACIONES
|
||||
Dim SumaImportesTarjeta As Decimal
|
||||
Dim SumaImportesTarjeta As Decimal = 0D
|
||||
If GvTC.Visible Then
|
||||
For Each row As GridViewRow In GvTC.Rows
|
||||
SumaImportesTarjeta += row.FCTextBox("TxtAbono").Text.ToDecimal
|
||||
@@ -303,7 +304,11 @@ Partial Class Bancos_Transferencias
|
||||
End If
|
||||
|
||||
CveIE = ObjIE.AddBancos_IE(DdlCuentaOrigen.SelectedValue.ToEntero, DdlTipoMovto.SelectedValue.ToEntero, TxtFechaDocumento.Text.Trim.ToDate, TxtFolio.Text.Trim, CuentaDestino, TxtImporte.Text.Trim.ToDouble, CveMonedaOrigen, TipoCambio, TxtObservaciones.Text.Trim, "", False, False, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
CveIEDestino = ObjIE.AddBancos_IE(DdlCuentaDestino.SelectedValue.ToEntero, If(DdlTipoMovto.SelectedValue = "2", 8, 3), TxtFechaDocumento.Text.Trim.ToDate, FolioDestino, String.Format("Transferencia Cta: {0}", DdlCuentaOrigen.SelectedItem.Text), ImporteDestino, CveMonedaDestino, TipoCambio, TxtObservaciones.Text.Trim, "", False, False, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
If Not chkMovimientoTarjeta.Checked Then
|
||||
CveIEDestino = ObjIE.AddBancos_IE(DdlCuentaDestino.SelectedValue.ToEntero, If(DdlTipoMovto.SelectedValue = "2", 8, 3), TxtFechaDocumento.Text.Trim.ToDate, FolioDestino, String.Format("Transferencia Cta: {0}", DdlCuentaOrigen.SelectedItem.Text), ImporteDestino, CveMonedaDestino, TipoCambio, TxtObservaciones.Text.Trim, "", False, False, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
@@ -313,7 +318,7 @@ Partial Class Bancos_Transferencias
|
||||
CveIEDevolucion = DdlCajaChica.SelectedValue.ToEntero()
|
||||
End If
|
||||
|
||||
If (CveIE > 0 AndAlso CveIEDestino > 0) Then
|
||||
If (CveIE > 0 AndAlso CveIEDestino > 0 Or CveIE > 0 AndAlso chkMovimientoTarjeta.Checked AndAlso SumaImportesTarjeta <> 0) Then
|
||||
|
||||
If filemove <> "" Then
|
||||
filemove.FilesMove(CveIE.ToString, String.Format("{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
@@ -354,13 +359,22 @@ Partial Class Bancos_Transferencias
|
||||
'Agregamos los Movimientos de Acreedor cuando es tarjeta
|
||||
If GvTC.Visible Then
|
||||
|
||||
AlertaGlobal.Append("<br/><br/>Recepci<63>n:<br/>")
|
||||
|
||||
For Each row As GridViewRow In GvTC.Rows
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovtoDetalle, row.FCTextBox("TxtAbono").Text.ToDecimal, row.FCTextBox("TxtAbono").Text.ToDecimal, 41,
|
||||
CveIEDestino = ObjIE.AddBancos_IE(row.DataKey("CveCuenta").ToEntero, If(DdlTipoMovto.SelectedValue = "2", 8, 3), TxtFechaDocumento.Text.Trim.ToDate, FolioDestino, String.Format("Transferencia Cta: {0}", DdlCuentaOrigen.SelectedItem.Text), row.FCTextBox("TxtAbono").Text.ToDecimal, CveMonedaDestino, TipoCambio, TxtObservaciones.Text.Trim, "", False, False, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovtoDetalle, row.FCTextBox("TxtAbono").Text.ToDecimal, row.FCTextBox("TxtAbono").Text.ToDecimal, 30,
|
||||
$"Transferencia entre cuentas {TxtObservaciones.Text}", $"Transferencia entre cuentas {TxtObservaciones.Text}",
|
||||
CveIE:=CveIEDestino) Then
|
||||
|
||||
MsgError = "Ocurrio un error al ingresar la prepoliza"
|
||||
Exit For
|
||||
Else
|
||||
AlertaGlobal.AppendFormat("<a class=""Texto"" target='_blank' href=""/Bancos/IE.aspx?CveIE={0}"">{1}</a><br/>", CveIEDestino, FolioDestino)
|
||||
FolioDestino = (FolioDestino.ToLong + 1).ToString
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
'Agregamos la contraria a bancos cuando es cuenta
|
||||
@@ -418,7 +432,12 @@ Partial Class Bancos_Transferencias
|
||||
AlertaGlobal.AppendFormat("<br/><br/>Movimiento: <a class=""Texto"" target='_blank' href=""/Bancos/IE.aspx?CveIE={0}"">{1}</a>", CveIE, FolioOrigen)
|
||||
End If
|
||||
If CveIEDestino > 0 AndAlso CveIE <> CveIEDestino Then
|
||||
AlertaGlobal.AppendFormat("<br/><br/>Recepci<63>n: <a class=""Texto"" target='_blank' href=""/Bancos/IE.aspx?CveIE={0}"">{1}</a>", CveIEDestino, FolioDestino)
|
||||
|
||||
If Not chkMovimientoTarjeta.Checked Then
|
||||
AlertaGlobal.AppendFormat("<br/><br/>Recepci<63>n: <a class=""Texto"" target='_blank' href=""/Bancos/IE.aspx?CveIE={0}"">{1}</a>", CveIEDestino, FolioDestino)
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
Else
|
||||
MsgError = "no se pudo insertar el detalle de la p<>liza2"
|
||||
@@ -592,11 +611,14 @@ Partial Class Bancos_Transferencias
|
||||
End Sub
|
||||
|
||||
Private Function GetFolio(CveCuenta As Integer, CveTipoTransaccion As Integer) As String
|
||||
|
||||
Dim Folio As String
|
||||
Dim Banco As New ClsBancos
|
||||
Dim Banco As ClsBancos
|
||||
Banco = New ClsBancos
|
||||
Folio = Banco.GetNextFolio(CveCuenta, CveTipoTransaccion).ToString
|
||||
Banco.Dispose()
|
||||
Return Folio
|
||||
|
||||
End Function
|
||||
|
||||
Private Sub chkMovimientoTarjeta_CheckedChanged(sender As Object, e As EventArgs) Handles chkMovimientoTarjeta.CheckedChanged
|
||||
|
||||
@@ -239,7 +239,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
LnkAccionesModalSeleccionLayout.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(13) Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 1) Then
|
||||
DVImporteDeduccionesPago.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
Reference in New Issue
Block a user