This commit is contained in:
2021-04-21 18:06:55 -07:00
43 changed files with 3504 additions and 1538 deletions

View File

@@ -10,7 +10,7 @@
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
<asp:Literal ID="LtlTitulo" runat="server" Text="Depositos de Caja"></asp:Literal>&nbsp;<asp:Literal ID="LtlDepositoCaja" runat="server"></asp:Literal>
<asp:Literal ID="LtlTitulo" runat="server" Text="Depósitos de Caja"></asp:Literal>&nbsp;<asp:Literal ID="LtlDepositoCaja" runat="server"></asp:Literal>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
@@ -32,9 +32,9 @@
<div class="titlefiltros caption ">
<div class="row">
<label class="col-md-1 truncate" style="width: 110px;">Cuenta:</label>
<label class="col-md-1 truncate" style="width: 70px;">Cuenta:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlCajaChica" runat="server" AppendDataBoundItems="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:DropDownList ID="DdlCajaChica" runat="server" AppendDataBoundItems="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Class="table-group-action-input form-control input-inline input-small input-sm select2me" style="width:200px">
</asp:DropDownList>
</div>
@@ -77,7 +77,7 @@
<asp:ListItem Value="3" Text="Cheque"></asp:ListItem>
<asp:ListItem Value="11" Text="Tarjeta de Debito"></asp:ListItem>
<asp:ListItem Value="12" Text="Tarjeta de Crédito"></asp:ListItem>
</asp:DropDownList>
</asp:DropDownList>
</div>
</div>
@@ -85,7 +85,14 @@
</div>
</div>
<div class="portlet-body" style="display: none">
<div class="row">
<label class="col-md-1 truncate" style="width: 100px;">SubProyecto:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlSubProyectos" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
</asp:DropDownList>
</div>
</div>
</div>
</div>
</ContentTemplate>
@@ -97,13 +104,13 @@
<ContentTemplate>
<div class="row">
<div class="col-md-6" runat="server" style="text-align: right;">
<label style="font-size:1.2em">Cuenta Deposito:</label>
<div class="col-md-6" runat="server" >
<label style=" ">Cuenta Depósito:</label>
<asp:DropDownList ID="DdlCuentaDeposito" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" style="width: 300px;"></asp:DropDownList>
</div>
<div class="col-md-3" runat="server" style="text-align: left;">
<div class="col-md-1" >
<label style="width:70px; font-size:1.2em;">Fecha:</label>
<label style="width:70px;">Fecha:</label>
</div>
<div class="col-md-1" >
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="padding-top: 0; width: 140px !important;">
@@ -118,41 +125,63 @@
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="CompareValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
</div>
<div class="col-md-3" style="text-align: right; font-size:1.2em;" runat="server" id="divLabelTotal" visible="false">
<asp:label runat="server">Seleccionado: $</asp:label>
<asp:label runat="server" ID="lblValorTotal">00.00</asp:label>
<asp:label runat="server" ID="lblValorTotal">0.00</asp:label>
<asp:label runat="server" ID="lblValorTotalSeleccionado" Visible="false"></asp:label>
</div>
</div>
<div class="row">
<div class="col-md-3" runat="server" Id="DivComision" Visible="false">
<label style="width: 70px; font-size:1.2em">Comisión:</label>
<asp:TextBox runat="server" ID="TxtComision" Class="table-group-action-input form-control input-inline input-small input-sm select2me" style="width: 70px;"></asp:TextBox>
<div class="col-md-2" runat="server" id="DivFaltante">
<asp:CheckBox ID="ChkFaltante" runat="server" Text="Faltante/Sobrante"/>
</div>
<div class="col-md-3" id="DivComision" style="display: none">
<label style="width: 105px; ">Importe:</label>
<asp:TextBox runat="server" ID="TxtComision" Class=" input-sm " Width="75px"></asp:TextBox>
</div>
<label class="col-md-1 truncate" style="width: 120px; font-size:1.2em; display: none" id="LblSubproyecto" >SubProyecto:</label>
<div class="col-md-2" style="display: none" id="divSubProyecton">
<asp:DropDownList ID="DdlSubProyectos" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<label class="col-md-1 truncate" style="width: 120px; display: none" id="LblSubproyecto" >SubProyecto:</label>
<div class="col-md-2" style="display: none" id="divSubProyecto">
<asp:DropDownList ID="DdlSubProyectoDeposito" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
</asp:DropDownList>
</div>
<label class="col-md-1 truncate" style="width: 120px; font-size:1.2em; display: none" id="LblClasificacion">Clasificación:</label>
<label class="col-md-1 truncate" style="width: 120px; display: none" id="LblClasificacion">Clasificación:</label>
<div class="col-md-2" style="display: none" id="divClasificacion">
<asp:DropDownList ID="DdlClasificacion" AutoPostBack="false" CssClass=" form-control input-sm select2me" runat="server" Width="50%" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
<asp:DropDownList ID="DdlClasificacion" AutoPostBack="false" CssClass=" form-control input-sm select2me" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
</asp:DropDownList>
</div>
</div>
<div class="row">
<div class="col-md-2" runat="server" id="Div1">
<asp:CheckBox ID="ChkDescuento" runat="server" Text="Descuento"/>
</div>
<div class="col-md-3" id="DivDescuento" style="display: none">
<label style="width: 105px; ">Importe:</label>
<asp:TextBox runat="server" ID="TxtDescuento" Class=" input-sm " Width="75px"></asp:TextBox>
</div>
<label class="col-md-1 truncate" style="width: 120px; display: none" id="LblSubproyectoDescuento" >SubProyecto:</label>
<div class="col-md-2" style="display: none" id="divSubProyectoDescuento">
<asp:DropDownList ID="DdlSubProyectoDescuento" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
</asp:DropDownList>
</div>
<label class="col-md-1 truncate" style="width: 120px; display: none" id="LblClasificacionDescuento">Clasificación:</label>
<div class="col-md-2" style="display: none" id="divClasificacionDescuento">
<asp:DropDownList ID="DdlClasificacionDescuento" AutoPostBack="false" CssClass=" form-control input-sm select2me" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
</asp:DropDownList>
</div>
</div>
<br />
<div style="height:550px;overflow-x:scroll">
<asp:GridView ID="GvFacturas" runat="server" AutoGenerateColumns="False" DataKeyNames="CveVenta, CvePrePoliza, CveIE, TipoCambio, CveMoneda, CveCliente, IdCtaContableBancos, IdCtaContClientes, Importe, SerieFolio" CssClass="table table-striped table-advance table-hover" Style="text-align: center; float: right; width: 100%; font-size: medium;" GridLines="None">
<asp:GridView ID="GvFacturas" runat="server" AutoGenerateColumns="False" DataKeyNames="CveVenta, CvePrePoliza, CveIE, TipoCambio, CveMoneda, CveCliente, IdCtaContableBancos, IdCtaContClientes, Importe, SerieFolio" CssClass="table table-striped table-advance table-hover" Style="text-align: center; float: right; width: 100%; " GridLines="None">
<Columns>
<asp:TemplateField>
<HeaderTemplate>
@@ -193,7 +222,7 @@
</asp:TemplateField>
</Columns>
<RowStyle Font-Size="Smaller" />
<HeaderStyle CssClass="Titulos" />
</asp:GridView>
</div>
@@ -208,7 +237,7 @@
<br />
<br />
<asp:Button ID="BtnDepositar" runat="server" Text="Depositar" CssClass="btn btn-primary" />
<asp:Button ID="BtnDepositar" runat="server" Text="Depósitar" CssClass="btn btn-primary" />
</div>
</div>
</ContentTemplate>
@@ -222,57 +251,89 @@
var ValorTotalSeleccionado = 0
var comision = 0;
var descuento = 0;
var saldo = 0;
function FnSuma(chk, cantidad) {
debugger;
var saldo = ToDouble($('#C_lblValorTotal').text());
debugger;
var saldoInicial = ToDouble($('#C_lblValorTotal').text());
if (chk.checked == false) {
cantidad = cantidad * -1;
debugger;
}
saldo = saldo + cantidad;
debugger;
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
$('#C_lblValorTotalSeleccionado').text(FormatoNumero(saldo, 2));
ValorTotalSeleccionado = saldo
saldoInicial = saldoInicial + cantidad;
$('#C_lblValorTotal').text(FormatoNumero(saldoInicial, 2));
$('#C_lblValorTotalSeleccionado').text(FormatoNumero(saldoInicial, 2));
ValorTotalSeleccionado = saldoInicial
debugger;
}
function txtSuma(txt) {
var saldo = ToDouble($('#C_lblValorTotal').text());
var comision2 = ToDouble($('#C_TxtComision').val());
if (comision2 < ValorTotalSeleccionado) {
comision2 = comision2 - comision
saldo = saldo - comision2;
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
comision = ToDouble($('#C_TxtComision').val())
} else {
var comisionNegativa = 0;
if (comision2 < 0) {
comisionNegativa = comision2 * -1
}
if (comisionNegativa > ValorTotalSeleccionado) {
$('#C_TxtComision').val(comision)
alert("No es posible poner una comision superior a lo seleccionado")
}
if (comision > 0) {
$('#LblSubproyecto').css("display", "block");
$('#divSubProyecton').css("display", "block");
$('#LblClasificacion').css("display", "block");
$('#divClasificacion').css("display", "block");
debugger;
} else {
$('#LblSubproyecto').css("display", "none");
$('#divSubProyecton').css("display", "none");
$('#LblClasificacion').css("display", "none");
$('#divClasificacion').css("display", "none");
saldo = ValorTotalSeleccionado + comision2 + descuento;
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
comision = ToDouble($('#C_TxtComision').val())
debugger;
}
}
function txtSumaDescuento(txt) {
var comision2 = ToDouble($('#C_TxtDescuento').val());
var comisionNegativa = 0;
if (comision2 < 0) {
comisionNegativa = comision2 * -1
}
if (comisionNegativa > ValorTotalSeleccionado) {
$('#C_TxtDescuento').val(descuento)
alert("No es posible poner una comision superior a lo seleccionado")
} else {
saldo = ValorTotalSeleccionado + comision2 + comision;
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
descuento = ToDouble($('#C_TxtDescuento').val())
debugger;
}
}
function CheckFaltante(chk) {
if (chk.checked == true) {
$('#DivComision').css("display", "block");
$('#LblSubproyecto').css("display", "block");
$('#divSubProyecto').css("display", "block");
$('#LblClasificacion').css("display", "block");
$('#divClasificacion').css("display", "block");
} else {
$('#DivComision').css("display", "none");
$('#divSubProyecto').css("display", "none");
$('#divSubProyecto').css("display", "none");
$('#LblClasificacion').css("display", "none");
$('#divClasificacion').css("display", "none");
}
}
function CheckDescuento(chk) {
if (chk.checked == true) {
$('#DivDescuento').css("display", "block");
$('#LblSubproyectoDescuento').css("display", "block");
$('#divSubProyectoDescuento').css("display", "block");
$('#LblClasificacionDescuento').css("display", "block");
$('#divClasificacionDescuento').css("display", "block");
} else {
$('#DivDescuento').css("display", "none");
$('#LblSubproyectoDescuento').css("display", "none");
$('#divSubProyectoDescuento').css("display", "none");
$('#LblClasificacionDescuento').css("display", "none");
$('#divClasificacionDescuento').css("display", "none");
}
}
</script>

View File

@@ -22,8 +22,12 @@ Partial Class Bancos_DepositosCaja
txtFechaI.Text = Now.AddDays(-1).ToShortDateString
txtFechaF.Text = Now.ToShortDateString
TxtComision.Attributes.Add("onKeyUp", "txtSuma(event);")
TxtDescuento.Attributes.Add("onKeyUp", "txtSumaDescuento(event);")
CargaCuentas()
ChkFaltante.Attributes.Add("onclick", "CheckFaltante(this);")
ChkDescuento.Attributes.Add("onclick", "CheckDescuento(this);")
End If
End Sub
@@ -38,9 +42,22 @@ Partial Class Bancos_DepositosCaja
DdlSubProyectos.DataBind()
DdlSubProyectos.Items.Insert(0, New ListItem("Todos", "-1"))
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
DdlSubProyectoDeposito.DataSource = DdlSubProyectos.DataSource
DdlSubProyectoDeposito.DataBind()
DdlSubProyectos.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlSubProyectoDescuento.DataSource = DdlSubProyectos.DataSource
DdlSubProyectoDescuento.DataBind()
DdlSubProyectos.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=2)
DdlClasificacion.DataBind()
DdlClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
DdlSubProyectos.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlClasificacionDescuento.DataSource = DdlClasificacion.DataSource
DdlClasificacionDescuento.DataBind()
DdlSubProyectos.Items.Insert(0, New ListItem("Seleccione", "-1"))
End Sub
Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
@@ -60,29 +77,34 @@ Partial Class Bancos_DepositosCaja
UpGvFacturas.Update()
GvFacturas.DataBind()
lblValorTotal.Text = "00.00"
lblValorTotal.Text = "0.00"
TxtComision.text = ""
divLabelTotal.Visible = True
DivComision.Visible = True
End Sub
Private Sub BtnDepositar_Click(sender As Object, e As EventArgs) Handles BtnDepositar.Click
Dim TotalImporte As Decimal = 0
Dim TotalImportePrePoliza As Decimal
Dim Comision As Decimal = TxtComision.Text.ToDecimal
Dim Descuento As Decimal = TxtDescuento.Text.ToDecimal
For Each Gvr As GridViewRow In GvFacturas.Rows
If Gvr.FCCheckBox("ChkFactura").Checked Then TotalImporte += Gvr.DataKey("Importe").ToDecimal
Next
If TotalImporte = 0 Then
Alert("Seleccion una factura para realizar el deposito", TipoMensaje.MsgAdvertencia)
Alert("Seleccion una factura para realizar el depósito", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
TotalImportePrePoliza = TotalImporte
If TxtComision.Text.ToEntero > 0 Then
TotalImporte = TotalImporte - TxtComision.Text.ToEntero
If DdlSubProyectos.SelectedValue.ToEntero = -1 Or DdlClasificacion.SelectedValue.ToEntero = -1 Then
If Comision <> 0 Then
TotalImporte = TotalImporte + Comision + Descuento
'Comision = -(Comision) ' se inverte el valor, va cargada
'Descuento = -(Descuento) ' se inverte el valor, va cargada
If DdlSubProyectoDeposito.SelectedValue.ToEntero = -1 Or DdlClasificacion.SelectedValue.ToEntero = -1 Then
Alert("Debes Seleccionar un Subproyecto y una Clasificación", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
@@ -105,8 +127,10 @@ Partial Class Bancos_DepositosCaja
Dim CveCuentaBancariaDestino As Integer = 0
Dim drOrigen As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCajaChica.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("")
Dim drDestino As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCuentaDeposito.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("")
Dim CveSubProyecto As Integer = 0
Dim CveClasificacion As Integer = 0
Dim CveSubProyecto As Integer = -1
Dim CveSubProyectoDescuento As Integer = -1
Dim CveClasificacion As Integer = -1
Dim CveClasificacionDescuento As Integer = -1
Dim documentos As String = "Los Depósitos se realizaron exitósamente<br/><br/>"
Dim imprimirFolios As String = ""
If drOrigen IsNot Nothing Then
@@ -123,28 +147,37 @@ Partial Class Bancos_DepositosCaja
NuevaCvePrePoliza = ObjContabilidad.AddPrePolizas("Vta", 13, TotalImportePrePoliza, TotalImportePrePoliza, CveMoneda, Fecha, "Depósito Bancario", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
'Salida de Caja Chica
FolioIE = ObjBancos.GetNextFolio(DdlCajaChica.SelectedValue.ToEntero, 2)
'Entrada a bancos
FolioIE = ObjBancos.GetNextFolio(DdlCuentaDeposito.SelectedValue.ToEntero, 8)
If Not FolioIE > 0 Then
OcurrioError = True
End If
CveIEOrigen = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, 2, Fecha, FolioIE.ToString, "Depósito Bancario", TotalImporte, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
CveIEOrigen = ObjBancos.AddBancos_IE(DdlCuentaDeposito.SelectedValue.ToEntero, 8, Fecha, FolioIE.ToString, "Depósito Bancario", TotalImporte, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If TxtComision.Text.ToEntero > 0 Then
CveSubProyecto = DdlSubProyectos.SelectedValue.ToEntero
CveClasificacion = DdlClasificacion.SelectedValue.ToEntero
If ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, TxtComision.Text.ToEntero, "Comisión", 78, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, ImporteMX:=TxtComision.Text.ToEntero * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then
documentos += String.Format("<a href='/Bancos/IE.aspx?CveIE={0}' target='_blank' class='Texto'>Depósito: {1}</a> &nbsp &nbsp <br/> ", CveIEOrigen, FolioIE)
If ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then
If ChkFaltante.Checked Then
CveSubProyecto = DdlSubProyectoDeposito.SelectedValue.ToEntero
CveClasificacion = DdlClasificacion.SelectedValue.ToEntero
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Comision, DdlClasificacion.SelectedItem.Text, 51, DdlClasificacion.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, ImporteMX:=Comision * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then
OcurrioError = True
End If
End If
If ChkDescuento.Checked Then
CveSubProyectoDescuento = DdlSubProyectoDescuento.SelectedValue.ToEntero
CveClasificacionDescuento = DdlClasificacionDescuento.SelectedValue.ToEntero
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, Descuento, DdlClasificacionDescuento.SelectedItem.Text, 51, DdlClasificacionDescuento.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionDescuento, CveSubProyecto:=CveSubProyecto, ImporteMX:=Comision * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then
OcurrioError = True
End If
Else OcurrioError = True
End If
Else
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then
OcurrioError = True
End If
OcurrioError = True
End If
For Each Gvr As GridViewRow In GvFacturas.Rows
@@ -153,7 +186,7 @@ Partial Class Bancos_DepositosCaja
'Datos de las Nuevas PrePolizas
'Entrada a Bancos
Dim Importe As Double = Gvr.DataKey("Importe").ToDouble
Dim Importe As Decimal = Gvr.DataKey("Importe").ToDecimal
Dim SerieFolio As String = Gvr.DataKey("SerieFolio").ToString
'Datos de las Prepolizas A Cancelar
@@ -161,14 +194,14 @@ Partial Class Bancos_DepositosCaja
Dim CveVenta As Integer = Gvr.DataKey("CveVenta").ToEntero
Dim CvePrePoliza As Integer = Gvr.DataKey("CvePrePoliza").ToEntero
FolioIE = ObjBancos.GetNextFolio(DdlCuentaDeposito.SelectedValue.ToEntero, 8)
FolioIE = ObjBancos.GetNextFolio(DdlCajaChica.SelectedValue.ToEntero, 2)
If Not FolioIE > 0 Then
OcurrioError = True
End If
CveIEDestino = ObjBancos.AddBancos_IE(DdlCuentaDeposito.SelectedValue.ToEntero, 8, Fecha, FolioIE.ToString, "Depósito Bancario", Importe, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
CveIEDestino = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, 2, Fecha, FolioIE.ToString, String.Format("Depósito Bancario: {0}", SerieFolio), Importe, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, Importe.ToDecimal, SerieFolio, 30, "Depósito Bancario", Fecha, IdCuentaBancariaDestino, -1, CveIE:=CveIEDestino, ImporteMX:=Importe.ToDecimal * TipoCambio, CveCuenta:=CveCuentaBancariaDestino) Then
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, SerieFolio, 30, String.Format("Depósito Bancario: {0}", SerieFolio), Fecha, IdCuentaBancariaDestino, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEDestino, ImporteMX:=Importe * TipoCambio, CveCuenta:=CveCuentaBancariaDestino) Then
OcurrioError = True
End If
@@ -177,15 +210,13 @@ Partial Class Bancos_DepositosCaja
OcurrioError = True
End If
Dim StrEncript As String = Encripta($"OP=DC&CveIE={CveIEDestino}&CuentaCaja={DdlCajaChica.SelectedItem.Text}&CuentaDepo={DdlCuentaDeposito.SelectedItem.Text}")
documentos += String.Format("<a href='/Bancos/IE.aspx?CveIE={0}' target='_blank' class='Texto'>Documento {1}</a> &nbsp &nbsp ", CveIEDestino.ToString, SerieFolio)
documentos += String.Format("<a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir {1}</a> <br/><br/> ", StrEncript, SerieFolio)
'documentos += String.Format("<a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir {1}</a> <br/><br/> ", StrEncript, SerieFolio)
End If
Next
If OcurrioError Then
ObjContabilidad.RollBack()
Alert("Ocurrio un error al realizar los depositos", TipoMensaje.MsgError)
@@ -193,8 +224,11 @@ Partial Class Bancos_DepositosCaja
ObjContabilidad.Commit()
CargaDatos()
documentos += String.Format("<a class=""Texto"" target='_blank' href=""/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}"">Prepóliza</a> <br/><br/> ", NuevaCvePrePoliza)
Alert(documentos.ToString)
End If
ObjContabilidad.Dispose()

View File

@@ -122,6 +122,8 @@
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="MEVCalendario" Width="350px"></ajax:ValidatorCalloutExtender>
<asp:RangeValidator ID="RVTxtFechaDocumento" runat="server" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a la fecha actual" ControlToValidate="TxtFechaDocumento" MinimumValue="01/01/1900" Type="Date" ValidationGroup="GrpGuardar"></asp:RangeValidator>
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento3" runat="server" HighlightCssClass="vco" TargetControlID="RVTxtFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
<asp:RangeValidator ID="RVTxtFechaDocumentoMenor" runat="server" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a la fecha actual" ControlToValidate="TxtFechaDocumento" MinimumValue="01/01/1900" Type="Date" ValidationGroup="GrpGuardar"></asp:RangeValidator>
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento4" runat="server" HighlightCssClass="vco" TargetControlID="RVTxtFechaDocumentoMenor" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>

View File

@@ -389,7 +389,7 @@ Partial Class Bancos_ProveedoresAbonar
If UsuarioActual.TienePermisoProceso(98) Then
PermiteModificarImporte = False
End If
Calendario.StartDate = Now.AddMonths(-2)
Calendario.StartDate = Now.AddMonths(-4)
'proceso que restringue solo el pago de apartir del dia de hoy y como limite fin de mes
If UsuarioActual.TienePermisoProceso(105) Then
Calendario.StartDate = Now
@@ -732,14 +732,15 @@ Partial Class Bancos_ProveedoresAbonar
Dim AnioDocumento As Integer = FechaDocumento.Year
Dim MesDocumento As Integer = FechaDocumento.Month
If AnioFactura > AnioDocumento Then
FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") } <br/>")
ValFechaDocumento = True
ElseIf AnioFactura = AnioDocumento And MesFactura > MesDocumento Then
FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") } <br/>")
ValFechaDocumento = True
If UsuarioActual.Empresa.UsaAC = False Then
If AnioFactura > AnioDocumento Then
FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") } <br/>")
ValFechaDocumento = True
ElseIf AnioFactura = AnioDocumento And MesFactura > MesDocumento Then
FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") } <br/>")
ValFechaDocumento = True
End If
End If
End If
Next
@@ -782,7 +783,7 @@ Partial Class Bancos_ProveedoresAbonar
Exit Sub
End If
Dim ImporteSeleccionado As Decimal = 0
Dim ImporteSeleccionado As Decimal = 0
If Not UsuarioActual.Empresa.Funcionalidad(529) = "1" Then
Dim Validada As Boolean = False
Dim MsgValidadas As New StringBuilder
@@ -3390,6 +3391,7 @@ Partial Class Bancos_ProveedoresAbonar
Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init
RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString
RVTxtFechaDocumentoMenor.MinimumValue = DateTime.Now.AddMonths(-4).ToShortDateString
Calendario.EndDate = DateTime.Now
End Sub