This commit is contained in:
2023-09-07 13:51:54 -07:00
11 changed files with 180 additions and 54 deletions

View File

@@ -132,6 +132,7 @@ Public Class ClsBancos
Public Property UsaTarjeta As Boolean Public Property UsaTarjeta As Boolean
Public Property TieneTerminal As Boolean Public Property TieneTerminal As Boolean
Public Property CveCuentaPadre As Integer
#End Region #End Region
@@ -416,6 +417,7 @@ Public Class ClsBancos
Me.UsaLayoutGrupos = If(Data.Rows(0)("UsaLayoutGrupos").ToString = "True", True, False) Me.UsaLayoutGrupos = If(Data.Rows(0)("UsaLayoutGrupos").ToString = "True", True, False)
Me.UsaTarjeta = If(Data.Rows(0)("UsaTarjeta").ToString = "True", True, False) Me.UsaTarjeta = If(Data.Rows(0)("UsaTarjeta").ToString = "True", True, False)
Me.TieneTerminal = If(Data.Rows(0)("TieneTerminal").ToString = "True", True, False) Me.TieneTerminal = If(Data.Rows(0)("TieneTerminal").ToString = "True", True, False)
Me.CveCuentaPadre = Data.Rows(0)("CveCuentaPadre").ToString.ToEntero
End If End If
@@ -450,7 +452,7 @@ Public Class ClsBancos
Public Function AddBancosCuentas(CveBanco As Integer, CveTipoCuenta As Integer, NumCuenta As String, CLABE As String, CveMoneda As Integer, DiaCorte As Integer, FInicial As Integer, FActual As Integer, FFinal As Integer, Public Function AddBancosCuentas(CveBanco As Integer, CveTipoCuenta As Integer, NumCuenta As String, CLABE As String, CveMoneda As Integer, DiaCorte As Integer, FInicial As Integer, FActual As Integer, FFinal As Integer,
LimiteCredito As Double, FormatoCheque As String, CveUsuario As Integer, CveEmpresa As Integer, ConvenioPagoElectronico As String, LimiteCredito As Double, FormatoCheque As String, CveUsuario As Integer, CveEmpresa As Integer, ConvenioPagoElectronico As String,
UsaLayout As Boolean, UsaTarjeta As Boolean, Optional SaldoInicial As Double = 0, Optional UsaLayoutGrupos As Boolean = False, Optional TieneTerminal As Boolean = False) As Boolean UsaLayout As Boolean, UsaTarjeta As Boolean, Optional SaldoInicial As Double = 0, Optional UsaLayoutGrupos As Boolean = False, Optional TieneTerminal As Boolean = False, Optional CveCuentaPadre As Integer = Nothing) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Banc_BancosCuentasAdd") DataAdapter("PA_Banc_BancosCuentasAdd")
@@ -476,7 +478,7 @@ Public Class ClsBancos
.Add("@SaldoInicial", SqlDbType.Money).Value = SaldoInicial .Add("@SaldoInicial", SqlDbType.Money).Value = SaldoInicial
.Add("@UsaLayoutGrupos", SqlDbType.Bit).Value = UsaLayoutGrupos .Add("@UsaLayoutGrupos", SqlDbType.Bit).Value = UsaLayoutGrupos
.Add("@TieneTerminal", SqlDbType.Bit).Value = TieneTerminal .Add("@TieneTerminal", SqlDbType.Bit).Value = TieneTerminal
.Add("@CveCuentaPadre", SqlDbType.Int).Value = CveCuentaPadre
End With End With
@@ -500,7 +502,7 @@ Public Class ClsBancos
Public Function UpdateBancosCuentas(CveBanco As Integer, CveTipoCuenta As Integer, NumCuenta As String, CLABE As String, CveMoneda As Integer, DiaCorte As Integer, FInicial As Integer, FActual As Integer, FFinal As Integer, Public Function UpdateBancosCuentas(CveBanco As Integer, CveTipoCuenta As Integer, NumCuenta As String, CLABE As String, CveMoneda As Integer, DiaCorte As Integer, FInicial As Integer, FActual As Integer, FFinal As Integer,
LimiteCredito As Double, FormatoCheque As String, Estatus As Boolean, CveCuenta As Integer, ConvenioPagoElectronico As String, LimiteCredito As Double, FormatoCheque As String, Estatus As Boolean, CveCuenta As Integer, ConvenioPagoElectronico As String,
UsaLayout As Boolean, UsaTarjeta As Boolean, Optional UsaLayoutGrupos As Boolean = False, Optional TieneTerminal As Boolean = False) As Boolean UsaLayout As Boolean, UsaTarjeta As Boolean, Optional UsaLayoutGrupos As Boolean = False, Optional TieneTerminal As Boolean = False, Optional CveCuentaPadre As Integer = Nothing) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Banc_BancosCuentasUpdate") DataAdapter("PA_Banc_BancosCuentasUpdate")
@@ -524,6 +526,7 @@ Public Class ClsBancos
.Add("@UsaTarjeta", SqlDbType.Bit).Value = UsaTarjeta .Add("@UsaTarjeta", SqlDbType.Bit).Value = UsaTarjeta
.Add("@UsaLayoutGrupos", SqlDbType.Bit).Value = UsaLayoutGrupos .Add("@UsaLayoutGrupos", SqlDbType.Bit).Value = UsaLayoutGrupos
.Add("@TieneTerminal", SqlDbType.Bit).Value = TieneTerminal .Add("@TieneTerminal", SqlDbType.Bit).Value = TieneTerminal
.Add("@CveCuentaPadre", SqlDbType.Int).Value = CveCuentaPadre
End With End With
@@ -1489,7 +1492,7 @@ Public Class ClsBancos
NotificarA As String, EsAbonoEnCuenta As Boolean, AplicaImpuestos As Boolean, IDPoliza As Integer, CvePrePoliza As Integer, Comprobante As String, CveUsuario As Integer, CveEmpresa As Integer, NotificarA As String, EsAbonoEnCuenta As Boolean, AplicaImpuestos As Boolean, IDPoliza As Integer, CvePrePoliza As Integer, Comprobante As String, CveUsuario As Integer, CveEmpresa As Integer,
Optional CveCuentaDeposito As Integer = -1, Optional PagoElectronico As String = "-1", Optional CveEstatusIE As Integer = 1, Optional CveCuentaTarjeta As Integer = -1, Optional CveCuentaDeposito As Integer = -1, Optional PagoElectronico As String = "-1", Optional CveEstatusIE As Integer = 1, Optional CveCuentaTarjeta As Integer = -1,
Optional Referencia As String = "-1", Optional CveCorte As Integer = -1, Optional CveProveedorIntermediario As Integer = -1, Optional FueConciliado As Boolean = False, Optional Referencia As String = "-1", Optional CveCorte As Integer = -1, Optional CveProveedorIntermediario As Integer = -1, Optional FueConciliado As Boolean = False,
Optional MesesSinIntereses As Integer = -1, Optional Modulo As String = "", Optional ConceptoCIE As String = "", Optional CveOCAnticipo As Integer = -1) As Integer Optional MesesSinIntereses As Integer = -1, Optional Modulo As String = "", Optional ConceptoCIE As String = "", Optional CveOCAnticipo As Integer = -1, Optional ImporteDeduccionesPago As Decimal = -1) As Integer
Dim Retorno As Integer = -1 Dim Retorno As Integer = -1
DataAdapter("PA_Banc_IEAdd") DataAdapter("PA_Banc_IEAdd")
@@ -1529,6 +1532,8 @@ Public Class ClsBancos
.Add("@FolioRegistro", SqlDbType.VarChar, 50).Direction = ParameterDirection.Output .Add("@FolioRegistro", SqlDbType.VarChar, 50).Direction = ParameterDirection.Output
.Add("@Modulo", SqlDbType.VarChar).Value = Modulo .Add("@Modulo", SqlDbType.VarChar).Value = Modulo
.Add("@CveOCAnticipo", SqlDbType.Int).Value = CveOCAnticipo .Add("@CveOCAnticipo", SqlDbType.Int).Value = CveOCAnticipo
.Add("@ImporteDeduccionesPago", SqlDbType.Money).Value = ImporteDeduccionesPago
End With End With
Try Try

View File

@@ -80,6 +80,13 @@
<asp:RequiredFieldValidator ID="RFVTipoCuenta" runat="server" ControlToValidate="DdlTipoCuenta" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVTipoCuenta" runat="server" ControlToValidate="DdlTipoCuenta" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCOTipoCuenta" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoCuenta" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCOTipoCuenta" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoCuenta" Width="300px"></ajax:ValidatorCalloutExtender>
</td> </td>
</tr>
<tr>
<td>Cuenta Padre:</td>
<td>
<asp:DropDownList ID="DdlCuentaPadre" runat="server" AppendDataBoundItems="true" AutoPostBack="true" CssClass="select2me" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="200px" >
</asp:DropDownList>
</td>
</tr> </tr>
<tr> <tr>
<td>Usa Tarjeta:</td> <td>Usa Tarjeta:</td>

View File

@@ -2,18 +2,22 @@
Option Strict On Option Strict On
Imports Extensiones Imports Extensiones
Imports System.Runtime.InteropServices
Imports System.IO
Imports System.Data Imports System.Data
'Imports DocumentFormat.OpenXml.Office.CustomUI
Partial Class Bancos_CuentasBancariasDetalle Partial Class Bancos_CuentasBancariasDetalle
Inherits ClsPaginas Inherits ClsPaginas
'Configuración 'Configuración
#Region "P R O P I E D A D E S" #Region "P R O P I E D A D E S"
Private ReadOnly Property CveCuenta As Integer Private ReadOnly Property CveCuenta As Integer
Get Get
If ViewState("CveCuenta") Is Nothing Then
ViewState("CveCuenta") = -1
End If
Return ViewState("CveCuenta").ToString.ToEntero Return ViewState("CveCuenta").ToString.ToEntero
End Get End Get
End Property End Property
Private Property DTUsuarios As DataTable Private Property DTUsuarios As DataTable
@@ -23,14 +27,15 @@ Partial Class Bancos_CuentasBancariasDetalle
Set(value As DataTable) Set(value As DataTable)
ViewState("DTUsuarios") = value ViewState("DTUsuarios") = value
End Set End Set
End Property End Property
#End Region #End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then If Not IsPostBack Then
CargarTipoCuenta() CargarTipoCuenta()
CargarBanco() CargarBanco()
CargarMoneda() CargarMoneda()
CargaCuentasPadre()
ViewState("DTUsuarios") = Nothing ViewState("DTUsuarios") = Nothing
Dim tablaUsuariosAux As DataTable = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", "Nombre", DistinctColumns:={"CveUsuario", "Nombre", "Usuario"}) Dim tablaUsuariosAux As DataTable = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", "Nombre", DistinctColumns:={"CveUsuario", "Nombre", "Usuario"})
@@ -68,9 +73,36 @@ Partial Class Bancos_CuentasBancariasDetalle
ActivarRegistroAutomatico() ActivarRegistroAutomatico()
End If End If
End Sub End Sub
Private Sub CargaCuentasPadre()
Dim DTCuentasPadre As New DataTable
DdlCuentaPadre.DataSource = GlobalDTBancosCuentas(-1, CveEmpresa:=UsuarioActual.CveEmpresa, CveTipoCuenta:=-1).FiltraParametros($" CveCuenta <> {CveCuenta} ", "", {"CveCuenta", "NumCuentaMoneda"})
'Dim ObjBancos As New ClsBancos
'If ObjBancos.GetBancosCuentas(-1, UsuarioActual.CveEmpresa) Then
' DTCuentasPadre = ObjBancos.DtResultados.FiltraParametros("", "", {"CveCuenta", "TipoCuenta", "Banco", "NumCuenta", "CLABE", "Moneda", "FInicial", "Estatus", "Fecha", "Usuario"})
' If CveCuenta > 0 Then
' DTCuentasPadre = DTCuentasPadre.FiltraParametros($" CveCuenta <> {CveCuenta} ")
' End If
' DdlCuentaPadre.DataSource = DTCuentasPadre
'Else
' DdlCuentaPadre.DataSource = Nothing
'End If
'ObjBancos.Dispose()
DdlCuentaPadre.DataBind()
DdlCuentaPadre.Items.Insert(0, New ListItem("Sin Selección", "-1"))
End Sub
#Region " CARGA VALORES INICIALES " #Region " CARGA VALORES INICIALES "
Private Sub SetValues() Private Sub SetValues()
ViewState("Orden") = "" ViewState("Orden") = ""
@@ -186,9 +218,10 @@ Partial Class Bancos_CuentasBancariasDetalle
ChkUsaTarjeta.Checked = ObjCuentasBancariasDetalle.UsaTarjeta ChkUsaTarjeta.Checked = ObjCuentasBancariasDetalle.UsaTarjeta
ChkTieneTerminal.Checked = ObjCuentasBancariasDetalle.TieneTerminal ChkTieneTerminal.Checked = ObjCuentasBancariasDetalle.TieneTerminal
ChkUsaTarjeta_CheckedChanged(Nothing, Nothing) ChkUsaTarjeta_CheckedChanged(Nothing, Nothing)
DdlCuentaPadre.SelectedValueExist(ObjCuentasBancariasDetalle.CveCuentaPadre)
trFinicial.Visible = False trFinicial.Visible = False
trLimiteCredito.Visible = True trLimiteCredito.Visible = True
TxtLimiteCredito.Text = ObjCuentasBancariasDetalle.LimiteCredito.ToString TxtLimiteCredito.Text = ObjCuentasBancariasDetalle.LimiteCredito.ToString
@@ -256,7 +289,7 @@ Partial Class Bancos_CuentasBancariasDetalle
If ObjCuentasBancariasDetalle.AddBancosCuentas(DdlBanco.SelectedValue.ToEntero, DdlTipoCuenta.SelectedValue.ToEntero, TxtNumCuenta.Text.Trim, If ObjCuentasBancariasDetalle.AddBancosCuentas(DdlBanco.SelectedValue.ToEntero, DdlTipoCuenta.SelectedValue.ToEntero, TxtNumCuenta.Text.Trim,
TxtCLABE.Text.Trim, DdlMoneda.SelectedValue.ToEntero, 0, TxtFInicial.Text.Trim.ToEntero, 0, 0, TxtLimiteCredito.Text.Trim.ToDouble, TxtCLABE.Text.Trim, DdlMoneda.SelectedValue.ToEntero, 0, TxtFInicial.Text.Trim.ToEntero, 0, 0, TxtLimiteCredito.Text.Trim.ToDouble,
"", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, If(ChkLayout.Checked, TxtConvenio.Text, ""), ChkLayout.Checked, ChkUsaTarjeta.Checked, UsaLayoutGrupos:=ChkLayoutGrupos.Checked, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, If(ChkLayout.Checked, TxtConvenio.Text, ""), ChkLayout.Checked, ChkUsaTarjeta.Checked, UsaLayoutGrupos:=ChkLayoutGrupos.Checked,
TieneTerminal:=ChkTieneTerminal.Checked) Then TieneTerminal:=ChkTieneTerminal.Checked, CveCuentaPadre:=DdlCuentaPadre.SelectedValue.ToEntero) Then
ViewState("CveCuenta") = ObjCuentasBancariasDetalle.TCveCuenta ViewState("CveCuenta") = ObjCuentasBancariasDetalle.TCveCuenta
Else Else
ErrorUsuarios = True ErrorUsuarios = True
@@ -289,7 +322,7 @@ Partial Class Bancos_CuentasBancariasDetalle
Else Else
If ObjCuentasBancariasDetalle.UpdateBancosCuentas(DdlBanco.SelectedValue.ToEntero, DdlTipoCuenta.SelectedValue.ToEntero, TxtNumCuenta.Text.Trim, TxtCLABE.Text.Trim, DdlMoneda.SelectedValue.ToEntero, 0, TxtFInicial.Text.Trim.ToEntero, 0, 0, If ObjCuentasBancariasDetalle.UpdateBancosCuentas(DdlBanco.SelectedValue.ToEntero, DdlTipoCuenta.SelectedValue.ToEntero, TxtNumCuenta.Text.Trim, TxtCLABE.Text.Trim, DdlMoneda.SelectedValue.ToEntero, 0, TxtFInicial.Text.Trim.ToEntero, 0, 0,
TxtLimiteCredito.Text.Trim.ToDouble, "", ChkEstatus.Checked, CveCuenta, TxtConvenio.Text, TxtLimiteCredito.Text.Trim.ToDouble, "", ChkEstatus.Checked, CveCuenta, TxtConvenio.Text,
ChkLayout.Checked, ChkUsaTarjeta.Checked, UsaLayoutGrupos:=ChkLayoutGrupos.Checked, TieneTerminal:=ChkTieneTerminal.Checked) Then ChkLayout.Checked, ChkUsaTarjeta.Checked, UsaLayoutGrupos:=ChkLayoutGrupos.Checked, TieneTerminal:=ChkTieneTerminal.Checked, CveCuentaPadre:=DdlCuentaPadre.SelectedValue.ToEntero) Then
'CargaDatos() 'CargaDatos()
GlobalDTBancosCuentas(-1, CveEmpresa:=UsuarioActual.CveEmpresa) = Nothing GlobalDTBancosCuentas(-1, CveEmpresa:=UsuarioActual.CveEmpresa) = Nothing
'If ObjCuentasBancariasDetalle.GetBancosCuentasUsuarios(-1) Then 'If ObjCuentasBancariasDetalle.GetBancosCuentasUsuarios(-1) Then
@@ -488,12 +521,18 @@ Partial Class Bancos_CuentasBancariasDetalle
Dim CuentaContable = DirectCast(sender, Button).CommandArgument.ToString Dim CuentaContable = DirectCast(sender, Button).CommandArgument.ToString
Dim Button = DirectCast(sender, Button) Dim Button = DirectCast(sender, Button)
Select Case CuentaContable Try
Case "CuentaContable" Select Case CuentaContable
AgregarCuentaContable(Button, DDlCuentaContable) Case "CuentaContable"
Case "CuentaContableComplementaria" AgregarCuentaContable(Button, DDlCuentaContable)
AgregarCuentaContable(Button, DdlCuentaContableComplementaria) Case "CuentaContableComplementaria"
End Select AgregarCuentaContable(Button, DdlCuentaContableComplementaria)
End Select
Catch ex As Exception
End Try
End Sub End Sub
Private Sub AgregarCuentaContable(btn As Button, ddl As DropDownList) Private Sub AgregarCuentaContable(btn As Button, ddl As DropDownList)

View File

@@ -799,6 +799,12 @@
<asp:CheckBox ID="ChkConciliado" runat="server" Text="Conciliado" Enabled="False" /> <asp:CheckBox ID="ChkConciliado" runat="server" Text="Conciliado" Enabled="False" />
</td> </td>
</tr>
<tr runat="server" id="TRImporteDeduccionesPago" visible="false">
<td >Deducciones Pago:</td>
<td style="text-align:left">
<asp:Label runat="server" ID="LblImporteDeduccionesPago"></asp:Label>
</td>
</tr> </tr>
</table> </table>
</fieldset> </fieldset>

View File

@@ -794,6 +794,11 @@ Partial Class Bancos_IE
DvFolioACCondiciones.Visible = True DvFolioACCondiciones.Visible = True
End If End If
If UsuarioActual.CveEmpresa.Contiene(13, 1) Then
TRImporteDeduccionesPago.Visible = True
End If
End If End If
End Sub End Sub
@@ -885,6 +890,8 @@ Partial Class Bancos_IE
LblEstatusIE.Visible = True LblEstatusIE.Visible = True
LblEstatusIE.Text = ObjIE.EstatusIE.ToString LblEstatusIE.Text = ObjIE.EstatusIE.ToString
LblImporteDeduccionesPago.Text = ObjIE.DtResultados.Rows(0)("ImporteDeduccionesPago").ToString.ToDecimal.ToString("###,###,###.00")
If ObjIE.CveTipoTransaccion.Contiene(3, 4) Then 'cuando es cheque recibido If ObjIE.CveTipoTransaccion.Contiene(3, 4) Then 'cuando es cheque recibido
LnkChqDevuelto.Visible = True LnkChqDevuelto.Visible = True
End If End If

View File

@@ -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>

View File

@@ -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,18 +611,22 @@ 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
If chkMovimientoTarjeta.Checked Then If chkMovimientoTarjeta.Checked Then
If GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveCuenta = {0} AND UsaTarjeta = 1", DdlCuentaDestino.SelectedValue.ToEntero)).Rows.Count > 0 Then 'If GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveCuenta = {0} AND UsaTarjeta = 1", DdlCuentaDestino.SelectedValue.ToEntero)).Rows.Count > 0 Then
CargaGridTarjetas() CargaGridTarjetas()
End If 'End If
Else Else
GvTC.Visible = False GvTC.Visible = False
UpGvTC.Update() UpGvTC.Update()

View File

@@ -11,6 +11,7 @@ using iTextSharp.text.pdf;
using iTextSharp.text; using iTextSharp.text;
using ADSNetLibrary.SIGAPI.Models.CRM.Request; using ADSNetLibrary.SIGAPI.Models.CRM.Request;
using ADSNetLibrary.SIGAPI.Services.CRM; using ADSNetLibrary.SIGAPI.Services.CRM;
using System.Activities.Statements;
public partial class CRM_RepAcercamientosProcesos : ClsPaginas public partial class CRM_RepAcercamientosProcesos : ClsPaginas
{ {
@@ -336,20 +337,34 @@ public partial class CRM_RepAcercamientosProcesos : ClsPaginas
private PdfPTable crearHeader() private PdfPTable crearHeader()
{ {
//Imagen de la empresa
iTextSharp.text.Image pic = iTextSharp.text.Image.GetInstance($"{UsuarioActual.Empresa.Ruta}/Logo.png");
pic.ScalePercent(20f);
BaseColor bordesBlancos = new BaseColor(255, 255, 255); BaseColor bordesBlancos = new BaseColor(255, 255, 255);
PdfPTable tableHeader = new PdfPTable(7); PdfPTable tableHeader = new PdfPTable(7);
tableHeader.WidthPercentage = 100f; tableHeader.WidthPercentage = 100f;
PdfPCell imageCell = new PdfPCell(pic);
imageCell.UseVariableBorders = true; if (File.Exists(($"{UsuarioActual.Empresa.Ruta}/Logo.png"))) {
imageCell.BorderColor = bordesBlancos; iTextSharp.text.Image pic = iTextSharp.text.Image.GetInstance($"{UsuarioActual.Empresa.Ruta}/Logo.png");
imageCell.Colspan = 2; pic.ScalePercent(20f);
imageCell.Rowspan = 2;
tableHeader.AddCell(imageCell); PdfPCell imageCell = new PdfPCell(pic);
imageCell.UseVariableBorders = true;
imageCell.BorderColor = bordesBlancos;
imageCell.Colspan = 2;
imageCell.Rowspan = 2;
tableHeader.AddCell(imageCell);
}
else
{
PdfPCell imageCell = new PdfPCell();
imageCell.UseVariableBorders = true;
imageCell.BorderColor = bordesBlancos;
imageCell.Colspan = 2;
imageCell.Rowspan = 2;
tableHeader.AddCell(imageCell);
}
//Imagen de la empresa
PdfPCell empresaCell = new PdfPCell(new Phrase(UsuarioActual.Empresa.Empresa)); PdfPCell empresaCell = new PdfPCell(new Phrase(UsuarioActual.Empresa.Empresa));
empresaCell.UseVariableBorders = true; empresaCell.UseVariableBorders = true;

View File

@@ -2069,9 +2069,11 @@ Partial Class Compras_Compras
DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4")) DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4"))
End If End If
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then DdlRetIVAConcepto.Items.Add(New ListItem("General.", "6")) 'emp acumuladoras If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then DdlRetIVAConcepto.Items.Add(New ListItem("General.", "6")) 'emp acumuladoras
DdlRetIVAConcepto.Items.Insert(0, New ListItem("Fletes P.F.", "2"))
End If End If
If RetIVAFlete Then If RetIVAFlete Then
DdlRetIVAConcepto.Items.Insert(0, New ListItem("Fletes P.F.", "2"))
DdlRetIVAConcepto.SelectedValueExist(2) DdlRetIVAConcepto.SelectedValueExist(2)
End If End If
@@ -2091,10 +2093,11 @@ Partial Class Compras_Compras
End If End If
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then DdlRetIVAConcepto.Items.Add(New ListItem("General.", "6")) 'emp acumuladoras If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then DdlRetIVAConcepto.Items.Add(New ListItem("General.", "6")) 'emp acumuladoras
DdlRetIVAConcepto.Items.Insert(0, New ListItem("Fletes P.M.", "3"))
End If End If
If RetIVAFlete Then If RetIVAFlete Then
DdlRetIVAConcepto.Items.Insert(0, New ListItem("Fletes P.M.", "3"))
DdlRetIVAConcepto.SelectedValueExist(3) DdlRetIVAConcepto.SelectedValueExist(3)
End If End If

View File

@@ -246,6 +246,20 @@
</div> </div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
<div class="row" id="DVImporteDeduccionesPago" runat="server" visible="false">
<div class="col-md-2">Deducciones Pago:</div>
<div class="col-md-3">
<asp:TextBox ID="TxtImporteDeduccionesPago" runat="server" Width="100px" onkeyup="FormatoMoneda(this)" ClientIDMode="Static"></asp:TextBox>
</div>
<div class="col-md-2">
</div>
<div class="col-md-3">
</div>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -233,9 +233,13 @@ Partial Class Ventas_ClientesAbonar
RVTxtFechaDocumento.MaximumValue = Now.ToString("dd/MM/yyyy") RVTxtFechaDocumento.MaximumValue = Now.ToString("dd/MM/yyyy")
If UsuarioActual.CveEmpresa.Contiene(13, 83, 158) Then If UsuarioActual.CveEmpresa.Contiene(13, 83, 158) Then
LnkAccionesModalSeleccionLayout.Visible = True LnkAccionesModalSeleccionLayout.Visible = True
End If End If
If UsuarioActual.CveEmpresa.Contiene(13, 1) Then
DVImporteDeduccionesPago.Visible = True
End If
End If End If
If (CveMonedaFiltro = 2 And ChkPagarPesos.Checked) Then If (CveMonedaFiltro = 2 And ChkPagarPesos.Checked) Then
@@ -781,7 +785,10 @@ Partial Class Ventas_ClientesAbonar
If ChkProveedorIntermediario.Checked Then If ChkProveedorIntermediario.Checked Then
CveProvIntermediario = If(DdlProveedorIntermediario.SelectedValue.ToEntero <= 0, -1, DdlProveedorIntermediario.SelectedValue.ToEntero) CveProvIntermediario = If(DdlProveedorIntermediario.SelectedValue.ToEntero <= 0, -1, DdlProveedorIntermediario.SelectedValue.ToEntero)
End If End If
CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.Trim.ToDate, TxtFolio.Text.Trim, TxtAboneA.Text.Trim, TxtImporte.Text.ToDecimal, GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", "CveCuenta = " & DdlCuenta.SelectedValue).ToEntero, TipoCambio, TxtObservaciones.Text.Trim, "", True, True, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaDeposito:=CveCuentaDeposito, CveProveedorIntermediario:=CveProvIntermediario) CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.Trim.ToDate, TxtFolio.Text.Trim, TxtAboneA.Text.Trim, TxtImporte.Text.ToDecimal,
GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", "CveCuenta = " & DdlCuenta.SelectedValue).ToEntero, TipoCambio,
TxtObservaciones.Text.Trim, "", True, True, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaDeposito:=CveCuentaDeposito,
CveProveedorIntermediario:=CveProvIntermediario, ImporteDeduccionesPago:=TxtImporteDeduccionesPago.Text.ToDecimal)
Else Else
If RblTipoPago.SelectedValue.Contiene("3") Then 'ixc If RblTipoPago.SelectedValue.Contiene("3") Then 'ixc
CveIE = DdlIngreso.SelectedValue.ToEntero CveIE = DdlIngreso.SelectedValue.ToEntero