diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb
index c674cd34c..972139eaa 100644
--- a/Bancos/IE.aspx.vb
+++ b/Bancos/IE.aspx.vb
@@ -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
diff --git a/Bancos/Transferencias.aspx b/Bancos/Transferencias.aspx
index 612e4b413..d48cdc4c6 100644
--- a/Bancos/Transferencias.aspx
+++ b/Bancos/Transferencias.aspx
@@ -181,19 +181,19 @@
-
+
-
-
+
+
-
+
-
+
-
+
diff --git a/Bancos/Transferencias.aspx.vb b/Bancos/Transferencias.aspx.vb
index 0b5c4a904..b9e04594f 100644
--- a/Bancos/Transferencias.aspx.vb
+++ b/Bancos/Transferencias.aspx.vb
@@ -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("
Recepción:
")
+
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("{1}
", 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("
Movimiento: {1}", CveIE, FolioOrigen)
End If
If CveIEDestino > 0 AndAlso CveIE <> CveIEDestino Then
- AlertaGlobal.AppendFormat("
Recepción: {1}", CveIEDestino, FolioDestino)
+
+ If Not chkMovimientoTarjeta.Checked Then
+ AlertaGlobal.AppendFormat("
Recepción: {1}", 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
diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb
index ff2f6b619..a794b8a11 100644
--- a/Ventas/ClientesAbonar.aspx.vb
+++ b/Ventas/ClientesAbonar.aspx.vb
@@ -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