Nominas cambiar Banco por cuenta.
This commit is contained in:
@@ -6553,10 +6553,12 @@ Public Class ClsPaginas
|
||||
Else
|
||||
LogoRuta = String.Format("{0}Formatos\Logo.png", UsuarioActual.Empresa.Ruta)
|
||||
If File.Exists(LogoRuta) Then
|
||||
LogoRuta = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
'LogoRuta = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
LogoRuta = String.Format("{0}", LogoRuta)
|
||||
End If
|
||||
End If
|
||||
LogoRuta = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
'LogoRuta = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
LogoRuta = String.Format("{0}", LogoRuta)
|
||||
'Si no tiene CBB, SE GENERA
|
||||
If Not ImagenCBB.Exists Then
|
||||
Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar()
|
||||
@@ -7115,7 +7117,7 @@ Public Class ClsPaginas
|
||||
LogoRuta = String.Format("{0}Formatos\Logo.png", UsuarioActual.Empresa.Ruta)
|
||||
If File.Exists(LogoRuta) Then
|
||||
'LogoRuta = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
LogoRuta = String.Format("file://{0}", LogoRuta)
|
||||
LogoRuta = String.Format("{0}", LogoRuta)
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -4226,25 +4226,24 @@
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
<%-- <div class="form-group form-md-line-input">
|
||||
<asp:RadioButtonList runat="server" ID="RBLModalBancosLayout" RepeatDirection="Horizontal" CssClass=" form-control input-sm" >
|
||||
<asp:ListItem Value="1" Selected="True">Generar Layout</asp:ListItem>
|
||||
<asp:ListItem Value="2">Altas Nomina</asp:ListItem>
|
||||
</asp:RadioButtonList>
|
||||
<asp:Label runat="server" AssociatedControlID="RBLModalBancosLayout">Tipo Operacóon:</asp:Label>
|
||||
</div>--%>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:DropDownList ID="DdlModalBancosLayout" CssClass=" form-control input-sm select2me" runat="server" Width="100%">
|
||||
|
||||
<asp:DropDownList ID="DdlCuenta" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" OnSelectedIndexChanged="DdlCuenta_SelectedIndexChanged"
|
||||
AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%" ValidationGroup="GrpContado">
|
||||
</asp:DropDownList>
|
||||
|
||||
<%-- <asp:DropDownList ID="DdlModalBancosLayout" CssClass=" form-control input-sm select2me" runat="server" Width="100%">
|
||||
<asp:ListItem Value="-1">Seleccione Uno</asp:ListItem>
|
||||
<asp:ListItem Value="1">Bancomer</asp:ListItem>
|
||||
<asp:ListItem Value="2">Banorte</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label runat="server" AssociatedControlID="DdlModalBancosLayout">Banco:</asp:Label>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlModalBancosLayout" runat="server" CssClass="help-block errorimput" Display="none" InitialValue="-1" ControlToValidate="DdlModalBancosLayout"
|
||||
</asp:DropDownList>--%>
|
||||
|
||||
<asp:Label runat="server" AssociatedControlID="DdlCuenta">Cuenta:</asp:Label>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlCuenta" runat="server" CssClass="help-block errorimput" Display="none" InitialValue="-1" ControlToValidate="DdlCuenta"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Banco''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalBancoLayout">
|
||||
</asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CERfvDdlModalBancosLayout" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlModalBancosLayout" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="CERfvDdlCuenta" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlCuenta" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
|
||||
</div>
|
||||
@@ -4252,12 +4251,10 @@
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<%-- <asp:UpdatePanel ID="UpModalBancosLayoutBotones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>--%>
|
||||
|
||||
<button id="BtnModalBancosLayoutCerrar" type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
<asp:Button Text="Generar" ID="BtnModalBancosProcesar" OnClick="BtnModalBancosProcesar_Click" CssClass="btn btn-primary" ValidationGroup="GrpModalBancoLayout" runat="server" />
|
||||
<%-- </ContentTemplate>
|
||||
</asp:UpdatePanel>--%>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -8110,27 +8110,105 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
|
||||
#region Layouts
|
||||
|
||||
enum Bancos
|
||||
{
|
||||
SinSelccion,
|
||||
Bancomer,
|
||||
Banorte
|
||||
}
|
||||
|
||||
|
||||
Bancos Banco
|
||||
{
|
||||
get {
|
||||
if (ViewState["Banco"] == null)
|
||||
{
|
||||
ViewState["Banco"] = Bancos.SinSelccion;
|
||||
}
|
||||
return (Bancos) ViewState["Banco"];
|
||||
}
|
||||
set {
|
||||
ViewState["Banco"] = (Bancos) value;
|
||||
}
|
||||
}
|
||||
|
||||
string ConvenioPagoElectronico
|
||||
{
|
||||
get {
|
||||
if (ViewState["ConvenioPagoElectronico"] == null)
|
||||
{
|
||||
ViewState["ConvenioPagoElectronico"] = string.Empty;
|
||||
}
|
||||
return ViewState["ConvenioPagoElectronico"].ToString();
|
||||
}
|
||||
set {
|
||||
ViewState["ConvenioPagoElectronico"] = (string) value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void LnkLayoutContable_Click(object sender, EventArgs e)
|
||||
{
|
||||
// RBLModalBancosLayout.SelectedValue = "1";
|
||||
DdlModalBancosLayout.SelectedValueExist("-1");
|
||||
Banco = Bancos.SinSelccion;
|
||||
CargaCuentas();
|
||||
|
||||
this.RegistraScript("$('#ModalLayoutBancos').modal('show');");
|
||||
UpModalBancosLayout.Update();
|
||||
}
|
||||
|
||||
|
||||
protected void RBLModalBancosLayout_SelectedIndexChanged(object sender, EventArgs e)
|
||||
private void CargaCuentas()
|
||||
{
|
||||
|
||||
DdlCuenta.Items.Clear();
|
||||
DataTable DTCuentas = get_GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa: UsuarioActual.CveEmpresa).FiltraParametros(" CveTipoCuenta <> 1 AND UsaLayout = 'True' AND LEN(ConvenioPagoElectronico) > 0 ");
|
||||
DTCuentas.CaseSensitive = false;
|
||||
DdlCuenta.DataSource = DTCuentas.FiltraParametros(" Banco IN('BANCOMER','BANORTE')");
|
||||
DdlCuenta.DataBind();
|
||||
DdlCuenta.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
DdlCuenta.SelectedValueExist("-1");
|
||||
|
||||
}
|
||||
|
||||
protected void DdlCuenta_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
ConvenioPagoElectronico = string.Empty;
|
||||
|
||||
if (DdlCuenta.SelectedValue.ToEntero() > 0)
|
||||
{
|
||||
|
||||
ConvenioPagoElectronico = get_GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa: UsuarioActual.CveEmpresa).FiltroPrimeroValor("ConvenioPagoElectronico", $" CveCuenta = {DdlCuenta.SelectedValue}").ToString();
|
||||
if (DdlCuenta.SelectedItem.Text.ToUpper().Contains("BANCOMER"))
|
||||
{
|
||||
Banco = Bancos.Bancomer;
|
||||
|
||||
}else if (DdlCuenta.SelectedItem.Text.ToUpper().Contains("BANORTE"))
|
||||
{
|
||||
Banco = Bancos.Banorte;
|
||||
}
|
||||
else
|
||||
{
|
||||
ConvenioPagoElectronico = string.Empty;
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Banco = Bancos.SinSelccion;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void BtnModalBancosProcesar_Click(object sender, EventArgs e)
|
||||
{
|
||||
//if (RBLModalBancosLayout.SelectedValue.ToEntero() == 1)
|
||||
//{
|
||||
if (DdlModalBancosLayout.SelectedValue.ToEntero() == 1)
|
||||
|
||||
if (Banco == Bancos.Bancomer)
|
||||
{
|
||||
using (ClsNominas objnom = new ClsNominas())
|
||||
{
|
||||
@@ -8141,38 +8219,18 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
|
||||
}
|
||||
else if (DdlModalBancosLayout.SelectedValue.ToEntero() == 2)
|
||||
else if (Banco == Bancos.Banorte)
|
||||
{
|
||||
using (ClsNominas objnom = new ClsNominas())
|
||||
{
|
||||
if (objnom.GetDispersionNominaBanorte(CvePeriodoSeleccionado, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
CrearLayoutNominaBanorte(objnom.DtResultados, "66564",1);
|
||||
CrearLayoutNominaBanorte(objnom.DtResultados, ConvenioPagoElectronico, 1);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//}
|
||||
//else if (RBLModalBancosLayout.SelectedValue.ToEntero() == 2)
|
||||
//{
|
||||
// if (DdlModalBancosLayout.SelectedValue.ToEntero() == 1)
|
||||
// {
|
||||
// //Sin Alta
|
||||
// }
|
||||
// else if (DdlModalBancosLayout.SelectedValue.ToEntero() == 2)
|
||||
// {
|
||||
// //Banorte
|
||||
|
||||
// using (ClsNominas objnom = new ClsNominas())
|
||||
// {
|
||||
// if (objnom.GetLayoutAltaBanorte(CvePeriodoSeleccionado, UsuarioActual.CveEmpresa))
|
||||
// {
|
||||
// CrearLayoutAltaBanorte(objnom.DtResultados, " 04539871", "12345", UsuarioActual.Empresa.Empresa);
|
||||
// }
|
||||
// }
|
||||
|
||||
// }
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -8404,4 +8462,6 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user