Transferencias tarjetas
This commit is contained in:
@@ -795,7 +795,7 @@ Partial Class Bancos_IE
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 13 Then
|
If UsuarioActual.CveEmpresa.Contiene(13, 1) Then
|
||||||
TRImporteDeduccionesPago.Visible = True
|
TRImporteDeduccionesPago.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -181,19 +181,19 @@
|
|||||||
<div>
|
<div>
|
||||||
<asp:UpdatePanel ID="UpGvTC" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpGvTC" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<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>
|
<Columns>
|
||||||
<asp:BoundField DataField="Numero" HeaderText="Tarjeta de Credito" ItemStyle-HorizontalAlign="Right">
|
<asp:BoundField DataField="CLABE" HeaderText="CLABE" ItemStyle-HorizontalAlign="Right">
|
||||||
<ItemStyle HorizontalAlign="Right" />
|
<ItemStyle HorizontalAlign="Left" />
|
||||||
</asp:BoundField>
|
</asp:BoundField>
|
||||||
<asp:TemplateField HeaderText="Responsable">
|
<asp:TemplateField HeaderText="Num Cuenta">
|
||||||
<ItemTemplate>
|
<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>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Cantidad a Abonar">
|
<asp:TemplateField HeaderText="Cantidad a Abonar">
|
||||||
<ItemTemplate>
|
<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>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Right" />
|
<ItemStyle HorizontalAlign="Right" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
|
Imports System.Data.SqlClient
|
||||||
|
|
||||||
Partial Class Bancos_Transferencias
|
Partial Class Bancos_Transferencias
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
@@ -188,7 +189,7 @@ Partial Class Bancos_Transferencias
|
|||||||
Protected Sub BtnGuardar_Click(sender As Object, e As System.EventArgs) Handles BtnGuardar.Click
|
Protected Sub BtnGuardar_Click(sender As Object, e As System.EventArgs) Handles BtnGuardar.Click
|
||||||
|
|
||||||
'VALIDACIONES
|
'VALIDACIONES
|
||||||
Dim SumaImportesTarjeta As Decimal
|
Dim SumaImportesTarjeta As Decimal = 0D
|
||||||
If GvTC.Visible Then
|
If GvTC.Visible Then
|
||||||
For Each row As GridViewRow In GvTC.Rows
|
For Each row As GridViewRow In GvTC.Rows
|
||||||
SumaImportesTarjeta += row.FCTextBox("TxtAbono").Text.ToDecimal
|
SumaImportesTarjeta += row.FCTextBox("TxtAbono").Text.ToDecimal
|
||||||
@@ -303,7 +304,11 @@ Partial Class Bancos_Transferencias
|
|||||||
End If
|
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)
|
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
|
End If
|
||||||
|
|
||||||
@@ -313,7 +318,7 @@ Partial Class Bancos_Transferencias
|
|||||||
CveIEDevolucion = DdlCajaChica.SelectedValue.ToEntero()
|
CveIEDevolucion = DdlCajaChica.SelectedValue.ToEntero()
|
||||||
End If
|
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
|
If filemove <> "" Then
|
||||||
filemove.FilesMove(CveIE.ToString, String.Format("{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
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
|
'Agregamos los Movimientos de Acreedor cuando es tarjeta
|
||||||
If GvTC.Visible Then
|
If GvTC.Visible Then
|
||||||
|
|
||||||
|
AlertaGlobal.Append("<br/><br/>Recepci<63>n:<br/>")
|
||||||
|
|
||||||
For Each row As GridViewRow In GvTC.Rows
|
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}",
|
$"Transferencia entre cuentas {TxtObservaciones.Text}", $"Transferencia entre cuentas {TxtObservaciones.Text}",
|
||||||
CveIE:=CveIEDestino) Then
|
CveIE:=CveIEDestino) Then
|
||||||
|
|
||||||
MsgError = "Ocurrio un error al ingresar la prepoliza"
|
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
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
'Agregamos la contraria a bancos cuando es cuenta
|
'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)
|
AlertaGlobal.AppendFormat("<br/><br/>Movimiento: <a class=""Texto"" target='_blank' href=""/Bancos/IE.aspx?CveIE={0}"">{1}</a>", CveIE, FolioOrigen)
|
||||||
End If
|
End If
|
||||||
If CveIEDestino > 0 AndAlso CveIE <> CveIEDestino Then
|
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
|
End If
|
||||||
Else
|
Else
|
||||||
MsgError = "no se pudo insertar el detalle de la p<>liza2"
|
MsgError = "no se pudo insertar el detalle de la p<>liza2"
|
||||||
@@ -592,11 +611,14 @@ Partial Class Bancos_Transferencias
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function GetFolio(CveCuenta As Integer, CveTipoTransaccion As Integer) As String
|
Private Function GetFolio(CveCuenta As Integer, CveTipoTransaccion As Integer) As String
|
||||||
|
|
||||||
Dim Folio As String
|
Dim Folio As String
|
||||||
Dim Banco As New ClsBancos
|
Dim Banco As ClsBancos
|
||||||
|
Banco = New ClsBancos
|
||||||
Folio = Banco.GetNextFolio(CveCuenta, CveTipoTransaccion).ToString
|
Folio = Banco.GetNextFolio(CveCuenta, CveTipoTransaccion).ToString
|
||||||
Banco.Dispose()
|
Banco.Dispose()
|
||||||
Return Folio
|
Return Folio
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub chkMovimientoTarjeta_CheckedChanged(sender As Object, e As EventArgs) Handles chkMovimientoTarjeta.CheckedChanged
|
Private Sub chkMovimientoTarjeta_CheckedChanged(sender As Object, e As EventArgs) Handles chkMovimientoTarjeta.CheckedChanged
|
||||||
|
|||||||
@@ -239,7 +239,7 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
LnkAccionesModalSeleccionLayout.Visible = True
|
LnkAccionesModalSeleccionLayout.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa.Contiene(13) Then
|
If UsuarioActual.CveEmpresa.Contiene(13, 1) Then
|
||||||
DVImporteDeduccionesPago.Visible = True
|
DVImporteDeduccionesPago.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user