This commit is contained in:
Oscar Irigoyen
2023-04-04 08:37:43 -07:00
11 changed files with 170 additions and 161 deletions

View File

@@ -3803,7 +3803,7 @@ Public Class ClsContabilidad
End Function End Function
Public Function GetMovimientosAuxiliaresCatalogo(IdCuenta As Integer, FechaI As Date, FechaF As Date, CveMoneda As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, TipoReporte As String) As Boolean Public Function GetMovimientosAuxiliaresCatalogo(IdCuenta As Integer, FechaI As Date, FechaF As Date, CveMoneda As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, TipoReporte As String, OpcionCuentas As Integer) As Boolean
Dim Retorno = False Dim Retorno = False
DataAdapter("PA_Conta_MovimientosAuxiliaresCatalogoGet") DataAdapter("PA_Conta_MovimientosAuxiliaresCatalogoGet")
@@ -3816,6 +3816,7 @@ Public Class ClsContabilidad
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Tipo", SqlDbType.Int).Value = TipoReporte .Add("@Tipo", SqlDbType.Int).Value = TipoReporte
.Add("@OpcionCuentas", SqlDbType.Int).Value = OpcionCuentas
End With End With
SqlAdapter.SelectCommand.CommandTimeout = 0 SqlAdapter.SelectCommand.CommandTimeout = 0
Try Try

View File

@@ -39,25 +39,32 @@
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server"> <asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter" style=""> <div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
<div class="portlet-title portlet-filterT" style=""> <div class="portlet-title portlet-filterT smalltitle">
<div class="titlefiltros caption "> <div class="titlefiltros caption ">
<ul class="list-inline text-size-12"> <div class="row">
<li>Proveedor: <div class="col-md-1 ">Proveedor:</div>
<asp:DropDownList ID="DdlProveedores" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor" Width="300px"> <div class="col-md-2 ">
<ADS:Dropdownlost ID="DdlProveedores" runat="server" CssStyle="width: 100%;" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor"></ADS:Dropdownlost>
<%--<asp:DropDownList CssClass=" select2me" Width="100%" ID="DdlProveedores" runat="server" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>--%>
</li> </div>
<li>Estatus: <div class="col-md-1 truncate">Estatus:
</div>
<div class="col-md-1" style="min-width: 115px">
<asp:DropDownList ID="DdlOpcion" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" Width="100px"> <asp:DropDownList ID="DdlOpcion" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" Width="100px">
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem> <asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Selected="True" Text="Con Saldo" Value="0"></asp:ListItem> <asp:ListItem Selected="True" Text="Con Saldo" Value="0"></asp:ListItem>
<asp:ListItem Text="Sin Saldo" Value="1"></asp:ListItem> <asp:ListItem Text="Sin Saldo" Value="1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</li> </div>
<li>Fecha I.</li> <div class="col-md-1 truncate">
<li style="width: 140px;"> Fecha I:
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px; margin-bottom: -10px;"> </div>
<div class="col-md-1" style="min-width: 105px">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80px !important; padding: 0px; margin-bottom: -10px;">
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox> <asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox>
<span class="input-group-btn "> <span class="input-group-btn ">
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton> <asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
@@ -69,10 +76,13 @@
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
<%--<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>--%> <%--<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>--%>
<%--<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>--%> <%--<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>--%>
</li> </div>
<li>Fecha F.</li> <div class="col-md-1 truncate">
<li> Fecha Fin:
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px; margin-bottom: -10px;">
</div>
<div class="col-md-1" style="min-width: 105px">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80px !important; padding: 0px; margin-bottom: -10px;">
<asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox> <asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox>
<span class="input-group-btn "> <span class="input-group-btn ">
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton> <asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
@@ -84,8 +94,8 @@
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
<%--<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>--%> <%--<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>--%>
<%--<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>--%> <%--<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>--%>
</li> </div>
</ul> </div>
</div> </div>
<div class="tools"> <div class="tools">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" OnClick="BtnConsultar_Click" /> <asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" OnClick="BtnConsultar_Click" />
@@ -97,10 +107,10 @@
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server"> <asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Notas de Crédito" OnRowDataBound="GvDatos_RowDataBound" <asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Notas de Crédito" OnRowDataBound="GvDatos_RowDataBound"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" Style="text-align: center;" GridLines="None" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None"
DataKeyNames="CveCompra,Saldo,CveIE,CveProveedor,CvePersonal,CveMoneda,IdCtaContProveedores,IdCtaContExtranjera,IdCtaContComplementaria,TipoCambio,CveSubProyecto"> DataKeyNames="CveCompra,Saldo,CveIE,CveProveedor,CvePersonal,CveMoneda,CveTipoConcepto,IdCtaContProveedores,IdCtaContExtranjera,IdCtaContComplementaria,TipoCambio,CveSubProyecto">
<Columns> <Columns>
<asp:TemplateField ItemStyle-Width="7%"> <asp:TemplateField ItemStyle-Width="2%">
<ItemTemplate> <ItemTemplate>
<asp:CheckBox ID="chk" Checked="false" Visible="false" runat="server" /> <asp:CheckBox ID="chk" Checked="false" Visible="false" runat="server" />
</ItemTemplate> </ItemTemplate>

View File

@@ -20,8 +20,11 @@ Partial Class Compras_RepNotasCredito
#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 Page.IsPostBack Then If Not Page.IsPostBack Then
DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) DdlProveedores.setEsWebService(True)
DdlProveedores.DataBind() DdlProveedores.Attributes.Add("data-metodo", "getproveedores")
DdlProveedores.SelectedText = "Todos"
DdlProveedores.SelectedValue = "-1"
TxtFechaSaldar.Text = Now.ToShortDateString TxtFechaSaldar.Text = Now.ToShortDateString
CargaDatos() CargaDatos()
End If End If
@@ -68,7 +71,7 @@ Partial Class Compras_RepNotasCredito
Dim StrFiltro As New StringBuilder Dim StrFiltro As New StringBuilder
'StrFiltro.AppendFormat(String.Format("<b>Proveedor:</b> {0}, <b>Estatus:</b> {1}", DdlProveedores.SelectedItem.Text, DdlOpcion.SelectedItem.Text)) 'StrFiltro.AppendFormat(String.Format("<b>Proveedor:</b> {0}, <b>Estatus:</b> {1}", DdlProveedores.SelectedItem.Text, DdlOpcion.SelectedItem.Text))
' If DdlTipoComprobante.SelectedValue <> "-1" Then StrFiltro.AppendFormat("&emsp;<b>Tipo Documento</b>: {0}", DdlTipoComprobante.SelectedItem.Text) ' If DdlTipoComprobante.SelectedValue <> "-1" Then StrFiltro.AppendFormat("&emsp;<b>Tipo Documento</b>: {0}", DdlTipoComprobante.SelectedItem.Text)
If DdlProveedores.SelectedValue <> "-1" Then StrFiltro.AppendFormat("&emsp;<b>Proveedor:</b> {0}", DdlProveedores.SelectedItem.Text) If DdlProveedores.SelectedValue <> "-1" Then StrFiltro.AppendFormat("&emsp;<b>Proveedor:</b> {0}", DdlProveedores.SelectedText)
If DdlOpcion.SelectedValue <> "-1" Then StrFiltro.AppendFormat("&emsp;<b>Estatus:</b> {0}", DdlOpcion.SelectedItem.Text) If DdlOpcion.SelectedValue <> "-1" Then StrFiltro.AppendFormat("&emsp;<b>Estatus:</b> {0}", DdlOpcion.SelectedItem.Text)
If txtFechaI.Text <> "" Then StrFiltro.AppendFormat("&emsp;<b>Fecha Inicio </b>: {0}", txtFechaI.Text.ToDate.ToShortDateString) If txtFechaI.Text <> "" Then StrFiltro.AppendFormat("&emsp;<b>Fecha Inicio </b>: {0}", txtFechaI.Text.ToDate.ToShortDateString)
@@ -140,6 +143,7 @@ Partial Class Compras_RepNotasCredito
ImporteMN = gr.DataKey("Saldo").ToDecimal.RoundSQL ImporteMN = gr.DataKey("Saldo").ToDecimal.RoundSQL
TCCompra = gr.DataKey("TipoCambio").ToDecimal TCCompra = gr.DataKey("TipoCambio").ToDecimal
CveMoneda = gr.DataKey("CveMoneda").ToEntero CveMoneda = gr.DataKey("CveMoneda").ToEntero
Dim CveTipoConcepto = gr.DataKey("CveTipoConcepto").ToEntero
If CveMoneda > 1 Then If CveMoneda > 1 Then
IdCtaContable = gr.DataKey("IdCtaContExtranjera").ToEntero IdCtaContable = gr.DataKey("IdCtaContExtranjera").ToEntero
@@ -148,6 +152,10 @@ Partial Class Compras_RepNotasCredito
IdCtaContable = gr.DataKey("IdCtaContProveedores").ToEntero IdCtaContable = gr.DataKey("IdCtaContProveedores").ToEntero
End If End If
Dim ConPreP As ConceptosTipoSaldo = ClsPaginas.ObtenerCveConceptoPrePoliza(15, CveMoneda, False, CveTipoConcepto)
'Dim CveCon As Integer = ObtConceptoContableProvisionCompra(CveTipoConcepto, DdlTipoComprobante.SelectedValue, DdlMoneda.SelectedValue.ToEntero, False)
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, -Importe, "", 18, Concepto, TxtFechaSaldar.Text.ToDate, IdCtaContable, -1, gr.DataKey("CveIE").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CvePersonal:=gr.DataKey("CvePersonal").ToEntero, ImporteMX:=-If(CveMoneda > 1 AndAlso UsaComplementaria, Importe, ImporteMN), ImporteME:=-If(CveMoneda > 1, Importe, 0), CveCompra:=gr.DataKey("CveCompra").ToEntero, CveCompraAmortizacion:=gr.DataKey("CveCompra").ToEntero, TipoCambio:=TCCompra) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, -Importe, "", 18, Concepto, TxtFechaSaldar.Text.ToDate, IdCtaContable, -1, gr.DataKey("CveIE").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CvePersonal:=gr.DataKey("CvePersonal").ToEntero, ImporteMX:=-If(CveMoneda > 1 AndAlso UsaComplementaria, Importe, ImporteMN), ImporteME:=-If(CveMoneda > 1, Importe, 0), CveCompra:=gr.DataKey("CveCompra").ToEntero, CveCompraAmortizacion:=gr.DataKey("CveCompra").ToEntero, TipoCambio:=TCCompra) Then
MsgError = "Ocurrio un Error al saldar el movimiento" MsgError = "Ocurrio un Error al saldar el movimiento"
End If End If
@@ -181,7 +189,7 @@ Partial Class Compras_RepNotasCredito
End If End If
Dim ImporteFluctuacion As Decimal = Math.Abs((Importe * difFluctuacion).RoundSQL) Dim ImporteFluctuacion As Decimal = Math.Abs((Importe * difFluctuacion).RoundSQL)
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoFluctua, ImporteFluctuacion, "", CveConceptoFluctua, Concepto, Now, IdCtaContableFluctua, -1, CveCompra:=gr.DataKey("CveCompra").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, ImporteMX:=ImporteFluctuacion, ImporteME:=ImporteFluctuacion, TipoCambio:=TCCompra, TipoCambioPago:=TC) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoFluctua, ImporteFluctuacion, "", CveConceptoFluctua, Concepto, Now, IdCtaContableFluctua, -1, CveCompra:=gr.DataKey("CveCompra").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, ImporteMX:=ImporteFluctuacion, ImporteME:=ImporteFluctuacion, TipoCambio:=TCCompra, TipoCambioPago:=TC, CveSubProyecto:=gr.DataKey("CveSubProyecto").ToEntero) Then
MsgError = "Ocurrio un Error al saldar el movimiento" MsgError = "Ocurrio un Error al saldar el movimiento"
End If End If
End If End If

View File

@@ -181,7 +181,7 @@
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtConcepto" runat="server" Width="100%" CssClass="form-control" Enabled="false"></asp:TextBox> <asp:TextBox ID="TxtConcepto" runat="server" Width="100%" CssClass="form-control" ></asp:TextBox>
<label for="<%= TxtConcepto.ClientID.ToString()%>">Concepto:</label> <label for="<%= TxtConcepto.ClientID.ToString()%>">Concepto:</label>
<asp:RequiredFieldValidator ID="RFVConcepto" runat="server" ControlToValidate="TxtConcepto" Display="None" ErrorMessage="El campo <b>''Concepto''</b> es requerido, por favor ingrese uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVConcepto" runat="server" ControlToValidate="TxtConcepto" Display="None" ErrorMessage="El campo <b>''Concepto''</b> es requerido, por favor ingrese uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEConcepto" runat="server" HighlightCssClass="vco" TargetControlID="RFVConcepto" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCEConcepto" runat="server" HighlightCssClass="vco" TargetControlID="RFVConcepto" Width="350px"></ajax:ValidatorCalloutExtender>

View File

@@ -1210,35 +1210,66 @@ Partial Class ContabilidadC_RegPrePolizaS
ObjContabilidad.IniciaTransacSQL() ObjContabilidad.IniciaTransacSQL()
Try Try
ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario)
If Not ObjContabilidad.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then
OcurrioError = True
End If
If DtMovimientosEliminar IsNot Nothing AndAlso DtMovimientosEliminar.Rows.Count > 0 Then Dim Retorno As Boolean = ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario)
For Each RowEliminar As DataRow In DtMovimientosEliminar.Rows
If Not ObjContabilidad.RemovePrePolizasDetalle(Me.CvePrePoliza, RowEliminar("CvePrePolizaDetalle").ToString().ToEntero()) Then
OcurrioError = True
Exit For
End If
Next
End If
If Not OcurrioError Then If Retorno Then
Dim CveIEAgregado As Integer = -1 If Not ObjContabilidad.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then
For Each row As GridViewRow In GvPrePoliza.Rows OcurrioError = True
If row.DataKey("CvePrePolizaDetalle").ToEntero > 0 Then End If
If row.FCCheckBox("chkModificado").Checked Then
If DtMovimientosEliminar IsNot Nothing AndAlso DtMovimientosEliminar.Rows.Count > 0 Then
For Each RowEliminar As DataRow In DtMovimientosEliminar.Rows
If Not ObjContabilidad.RemovePrePolizasDetalle(Me.CvePrePoliza, RowEliminar("CvePrePolizaDetalle").ToString().ToEntero()) Then
OcurrioError = True
Exit For
End If
Next
End If
If Not OcurrioError Then
Dim CveIEAgregado As Integer = -1
For Each row As GridViewRow In GvPrePoliza.Rows
If row.DataKey("CvePrePolizaDetalle").ToEntero > 0 Then
If row.FCCheckBox("chkModificado").Checked Then
contador = contador + 1
Dim ImporteIE As Decimal = If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal)
If row.DataKey("CveConceptoContable").ToEntero = 30 AndAlso ImporteIE > 0 AndAlso row.DataKey("CveIE").ToDecimal <= 0 Then
Dim ObjIE As New ClsBancos(ObjContabilidad.IniciaTransacSQL)
CveIEAgregado = ObjIE.AddBancos_IE(row.DataKey("ContadoCuenta").ToEntero, row.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text, row.DataKey("ContadoNumeroFolio"),
row.DataKey("ContadoBeneficiario"), ImporteIE, CveMoneda, 0, row.DataKey("ContadoObservaciones"), "",
False, False, 0, row.DataKey("CvePrePoliza").ToEntero, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CveIEAgregado < 0 Then
'MsgError = "No se pudo registrar movimiento bancario"
OcurrioError = True
Exit For
End If
End If
If Not ObjContabilidad.UpdatePrePolizasDetalle(row.DataKey("CvePrePolizaDetalle").ToEntero, row.FCLiteral("TxtConcepto").Text, row.DataKey("CveSubProyecto").ToEntero,
row.DataKey("IdCtaContable").ToEntero, If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, False, True), If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0,
row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), CveTipoGasto:=If(DdlTipoGasto.Visible, row.DataKey("CveTipoGasto").ToEntero, row.DataKey("CveTipoGasto").ToEntero),
CveConceptoContable:=row.DataKey("CveConceptoContable").ToEntero, CveProveedor:=row.DataKey("CveProveedor").ToEntero, CveCompra:=row.DataKey("CveCompra").ToEntero,
CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero,
CvePersonal:=row.DataKey("CvePersonal").ToEntero, Referencia:=row.FCLiteral("TxtRef").Text, CveCuenta:=row.DataKey("CveCuenta").ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario, CveIE:=CveIEAgregado) Then
OcurrioError = True
Exit For
End If
End If
Else
contador = contador + 1 contador = contador + 1
Dim ImporteIE As Decimal = If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal) Dim ImporteIE As Decimal = If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal)
If row.DataKey("CveConceptoContable").ToEntero = 30 AndAlso ImporteIE > 0 AndAlso row.DataKey("CveIE").ToDecimal <= 0 Then If row.DataKey("CveConceptoContable").ToEntero = 30 AndAlso ImporteIE > 0 AndAlso row.DataKey("CveIE").ToDecimal <= 0 Then
Dim ObjIE As New ClsBancos(ObjContabilidad.IniciaTransacSQL) Dim ObjIE As New ClsBancos(ObjContabilidad.IniciaTransacSQL)
CveIEAgregado = ObjIE.AddBancos_IE(row.DataKey("ContadoCuenta").ToEntero, row.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text, row.DataKey("ContadoNumeroFolio"), CveIEAgregado = ObjIE.AddBancos_IE(row.DataKey("ContadoCuenta").ToEntero, row.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text, row.DataKey("ContadoNumeroFolio"),
row.DataKey("ContadoBeneficiario"), ImporteIE, CveMoneda, 0, row.DataKey("ContadoObservaciones"), "", row.DataKey("ContadoBeneficiario"), ImporteIE, CveMoneda, 0, row.DataKey("ContadoObservaciones"), "",
False, False, 0, row.DataKey("CvePrePoliza").ToEntero, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) False, False, 0, row.DataKey("CvePrePoliza").ToEntero, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CveIEAgregado < 0 Then If CveIEAgregado < 0 Then
'MsgError = "No se pudo registrar movimiento bancario" 'MsgError = "No se pudo registrar movimiento bancario"
OcurrioError = True OcurrioError = True
@@ -1246,50 +1277,26 @@ Partial Class ContabilidadC_RegPrePolizaS
End If End If
End If End If
If Not ObjContabilidad.UpdatePrePolizasDetalle(row.DataKey("CvePrePolizaDetalle").ToEntero, row.FCLiteral("TxtConcepto").Text, row.DataKey("CveSubProyecto").ToEntero, If Not ObjContabilidad.AddPrePolizasDetalle(CvePrePoliza, If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, False, True), If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0,
row.DataKey("IdCtaContable").ToEntero, If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, False, True), If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), row.DataKey("Referencia").ToString,
row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), CveTipoGasto:=If(DdlTipoGasto.Visible, row.DataKey("CveTipoGasto").ToEntero, row.DataKey("CveTipoGasto").ToEntero), row.DataKey("CveConceptoContable").ToEntero, row.FCLiteral("TxtConcepto").Text, Now,
CveConceptoContable:=row.DataKey("CveConceptoContable").ToEntero, CveProveedor:=row.DataKey("CveProveedor").ToEntero, CveCompra:=row.DataKey("CveCompra").ToEntero, row.DataKey("IdCtaContable").ToEntero, 0, CveSubProyecto:=row.DataKey("CveSubProyecto").ToEntero,
CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero, CveTipoGasto:=If(DdlTipoGasto.Visible, row.DataKey("CveTipoGasto").ToEntero, row.DataKey("CveTipoGasto").ToEntero),
CvePersonal:=row.DataKey("CvePersonal").ToEntero, Referencia:=row.FCLiteral("TxtRef").Text, CveCuenta:=row.DataKey("CveCuenta").ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario, CveIE:=CveIEAgregado) Then ImporteMX:=If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0,
OcurrioError = True row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), CveProveedor:=row.DataKey("CveProveedor").ToEntero,
Exit For CveCompra:=row.DataKey("CveCompra").ToEntero, CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero,
End If CvePersonal:=row.DataKey("CvePersonal").ToEntero, CveCuenta:=row.DataKey("CveCuenta").ToEntero, PorcentajeImpuesto:=row.DataKey("PorcentajeImpuesto").ToDecimal, CveIE:=CveIEAgregado) Then
End If
Else
contador = contador + 1
Dim ImporteIE As Decimal = If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal)
If row.DataKey("CveConceptoContable").ToEntero = 30 AndAlso ImporteIE > 0 AndAlso row.DataKey("CveIE").ToDecimal <= 0 Then
Dim ObjIE As New ClsBancos(ObjContabilidad.IniciaTransacSQL)
CveIEAgregado = ObjIE.AddBancos_IE(row.DataKey("ContadoCuenta").ToEntero, row.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text, row.DataKey("ContadoNumeroFolio"),
row.DataKey("ContadoBeneficiario"), ImporteIE, CveMoneda, 0, row.DataKey("ContadoObservaciones"), "",
False, False, 0, row.DataKey("CvePrePoliza").ToEntero, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CveIEAgregado < 0 Then
'MsgError = "No se pudo registrar movimiento bancario"
OcurrioError = True OcurrioError = True
Exit For Exit For
End If End If
End If End If
If Not ObjContabilidad.AddPrePolizasDetalle(CvePrePoliza, If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, False, True), If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, Next
row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), row.DataKey("Referencia").ToString, End If
row.DataKey("CveConceptoContable").ToEntero, row.FCLiteral("TxtConcepto").Text, Now, Else
row.DataKey("IdCtaContable").ToEntero, 0, CveSubProyecto:=row.DataKey("CveSubProyecto").ToEntero, OcurrioError = True
CveTipoGasto:=If(DdlTipoGasto.Visible, row.DataKey("CveTipoGasto").ToEntero, row.DataKey("CveTipoGasto").ToEntero),
ImporteMX:=If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0,
row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), CveProveedor:=row.DataKey("CveProveedor").ToEntero,
CveCompra:=row.DataKey("CveCompra").ToEntero, CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero,
CvePersonal:=row.DataKey("CvePersonal").ToEntero, CveCuenta:=row.DataKey("CveCuenta").ToEntero, PorcentajeImpuesto:=row.DataKey("PorcentajeImpuesto").ToDecimal, CveIE:=CveIEAgregado) Then
OcurrioError = True
Exit For
End If
End If
Next
End If End If
Catch ex As Exception Catch ex As Exception
OcurrioError = True OcurrioError = True
OnError("Ocurrío un error al actualizar la PrePoliza", ex) OnError("Ocurrío un error al actualizar la PrePoliza", ex)

View File

@@ -101,17 +101,17 @@
<asp:ListItem Text="Con movimientos o saldo no igual a cero" Value="4"></asp:ListItem> <asp:ListItem Text="Con movimientos o saldo no igual a cero" Value="4"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<div class="col-md-1 truncate" id="tdTipoReporte" visible="true"> <div class="col-md-1 truncate" id="tdTipoReporte" visible="false" runat="server">
Tipo Tipo
</div> </div>
<div class="col-md-2" id="tdTipoReporte2" visible="true"> <div class="col-md-2" id="tdTipoReporte2" visible="false" runat="server">
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm select2me" runat="server" Width="100%"> <asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm select2me" runat="server" Width="100%">
<asp:ListItem Text="Contable" Value="1"></asp:ListItem> <asp:ListItem Text="Contable" Value="1"></asp:ListItem>
<asp:ListItem Text="Contable y Complementario" Value="3"></asp:ListItem> <asp:ListItem Text="Contable y Complementario" Value="3"></asp:ListItem>
<asp:ListItem Text="Complementario" Value="2"></asp:ListItem> <asp:ListItem Text="Complementario" Value="2"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<div class="col-md-1"> <div class="col-md-1" id="divProyecto" runat="server">
<asp:Label ID="LblProyecto" runat="server">Proyecto:</asp:Label> <asp:Label ID="LblProyecto" runat="server">Proyecto:</asp:Label>
</div> </div>
<div class="col-md-2"> <div class="col-md-2">
@@ -123,10 +123,7 @@
<asp:DropDownList ID="DdlSubproyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True"> <asp:DropDownList ID="DdlSubproyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True">
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<div class="col-md-2"> <div class="col-md-1">
<asp:DropDownList Visible="false" CssClass="form-control input-sm" Width="150px" ID="DdlTipoCuentas" ClientIDMode="Static" runat="server" DataTextField="Nombre" DataValueField="CveCuenta" TabIndex="4" AutoPostBack="true">
</asp:DropDownList>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -109,10 +109,6 @@ Partial Class AC2_RepAnexoCatalogo
'FechaInicio = Request("FI").ToDate 'FechaInicio = Request("FI").ToDate
FechaFin = Request("FF").ToDate FechaFin = Request("FF").ToDate
DdlCuentas.SelectedValueExist(IdCuenta) DdlCuentas.SelectedValueExist(IdCuenta)
If DdlCuentas.SelectedValue.ToEntero <> -1 Then
'RegistraScript("Enable();")
DdlTipoCuentas.SelectedValueExist(-2)
End If
If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then
FechaInicio = Request("FI").ToDate FechaInicio = Request("FI").ToDate
@@ -189,19 +185,13 @@ Partial Class AC2_RepAnexoCatalogo
Dim dr As DataRow = ObjTipoCuenta.DtResultados.FiltroPrimero("Codigo IN ('_GLOBAL')") Dim dr As DataRow = ObjTipoCuenta.DtResultados.FiltroPrimero("Codigo IN ('_GLOBAL')")
If dr IsNot Nothing Then strGlobal = dr.Item(0).ToString If dr IsNot Nothing Then strGlobal = dr.Item(0).ToString
'DTCuentas = ObjTipoCuenta.DtResultados '.FiltraParametros("Afectable = 1") 'DTCuentas = ObjTipoCuenta.DtResultados '.FiltraParametros("Afectable = 1")
DdlTipoCuentas.DataSource = ObjTipoCuenta.DtResultados.FiltraParametros("Codigo IN ('_ACTIVO', '_BPASIVO', '_CAPITAL', '_CUADRE', '_ESTADISTICAS', '_ORDEN', '_RACREEDOR', '_RDEUDOR', '_UTILIDAD')")
DdlCuentas.DataSource = ObjTipoCuenta.DtResultados DdlCuentas.DataSource = ObjTipoCuenta.DtResultados
End If End If
ObjTipoCuenta.Dispose() ObjTipoCuenta.Dispose()
DdlTipoCuentas.DataBind()
'If strGlobal.Length > 0 Then DdlTipoCuentas.Items.Insert(0, New ListItem("Todas", strGlobal))
DdlTipoCuentas.Items.Insert(0, New ListItem("Todas las Cuentas", "-1"))
DdlTipoCuentas.Items.Add(New ListItem("Algun específico", "-2"))
DdlTipoCuentas.SelectedValue = "-2"
DdlCuentas.DataBind() DdlCuentas.DataBind()
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto) CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=divProyecto)
End Sub End Sub
@@ -323,25 +313,17 @@ Partial Class AC2_RepAnexoCatalogo
End Sub End Sub
Public Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click Public Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
If DdlTipoCuentas.SelectedValue.ToEntero = -2 AndAlso DdlCuentas.SelectedValue.ToEntero = -1 Then If DdlCuentas.SelectedValue.ToEntero = -1 Then
Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError) Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError)
Else Else
FechaInicio = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", Date.Now, txtFechaI.Text.ToDate) FechaInicio = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", Date.Now, txtFechaI.Text.ToDate)
FechaFin = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", Date.Now, txtFechaF.Text.ToDate) FechaFin = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", Date.Now, txtFechaF.Text.ToDate)
IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero = -2, DdlCuentas.SelectedValue.ToEntero, DdlTipoCuentas.SelectedValue.ToEntero) IdCuenta = DdlCuentas.SelectedValue.ToEntero
CargaDatos() CargaDatos()
End If End If
'RegistraScript("Enable();") 'RegistraScript("Enable();")
End Sub End Sub
Protected Sub DdlTipoCuentas_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoCuentas.SelectedIndexChanged
If DdlTipoCuentas.SelectedValue.ToEntero = -2 Then
DdlCuentas.Enabled = True
Else
DdlCuentas.Enabled = False
DdlCuentas.SelectedValueExist(-1)
End If
End Sub
Public Overrides Sub VerifyRenderingInServerForm(control As Control) Public Overrides Sub VerifyRenderingInServerForm(control As Control)

View File

@@ -44,11 +44,22 @@
<div class="portlet solid grey-cascade portlet-filter"> <div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle"> <div class="portlet-title portlet-filterT smalltitle">
<div class="tools"> <div class="tools">
<asp:Button ID="BtnConsultar" runat="server" CssClass="btn btn-default" Text="Consultar" Width="100px" OnClick="BtnConsultar_Click" ValidationGroup="GrpConsulta" /> <asp:Button ID="BtnConsultar" runat="server" Text="Consultar" CssClass="btn btn-default" OnClick="BtnConsultar_Click" ValidationGroup="Valida" />
<a href="javascript:;" class="expand"></a> <a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%>
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
</div> </div>
<div class="titlefiltros caption "> <div class="titlefiltros caption ">
<div class="row"> <div class="row">
<div class="col-md-1">
Cuenta:
</div>
<div class="col-md-3">
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="false">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-1"> <div class="col-md-1">
Fecha Inicio: Fecha Inicio:
</div> </div>
@@ -87,29 +98,35 @@
<div class="col-md-2" style="display: none;"> <div class="col-md-2" style="display: none;">
<asp:DropDownList ID="DdlTipoCuentas" CssClass="form-control input-sm" runat="server" DataTextField="Nombre" DataValueField="CveCuenta" TabIndex="4" AutoPostBack="true" ClientIDMode="Static"> <asp:DropDownList ID="DdlTipoCuentas" CssClass="form-control input-sm" runat="server" DataTextField="Nombre" DataValueField="CveCuenta" TabIndex="4" AutoPostBack="true" ClientIDMode="Static">
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<div class="col-md-1">
Cuenta:
</div>
<div class="col-md-2">
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="false">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div> </div>
</div> </div>
</div> </div>
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
<div class="portlet-body" style="display: none">
<div class="row"> <div class="row">
<label class="col-md-1">Moneda:</label> <div class="col-md-1 truncate">
<div class="col-md-1"> Tipo Movto
<asp:DropDownList ID="DdlMoneda" CssClass="form-control input-sm select2me" runat="server" DataTextField="Moneda" DataValueField="CveMoneda" TabIndex="5" ClientIDMode="Static" Width="100%"> </div>
<div class="col-md-2 truncate">
<asp:DropDownList ID="DdlOpcionCuentas" runat="server" DataTextField="Cuenta" DataValueField="CveCuenta" TabIndex="4" CssClass="form-control input-sm select2me" Width="100%">
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Con movimientos" Value="1"></asp:ListItem>
<asp:ListItem Text="Saldo actual no igual a cero" Value="2"></asp:ListItem>
<asp:ListItem Text="Con movimientos y saldo no igual a cero" Value="3"></asp:ListItem>
<asp:ListItem Text="Con movimientos o saldo no igual a cero" Value="4"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<div class="col-md-1"> <div class="col-md-1 truncate" id="tdTipoReporte" visible="false" runat="server">
Tipo
</div>
<div class="col-md-2" id="tdTipoReporte2" visible="false" runat="server">
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm select2me" runat="server" Width="100%">
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
<asp:ListItem Text="Contable y Complementario" Value="3"></asp:ListItem>
<asp:ListItem Text="Complementario" Value="2"></asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-md-1" id="divProyecto" runat="server">
<asp:Label ID="LblProyecto" runat="server">Proyecto:</asp:Label> <asp:Label ID="LblProyecto" runat="server">Proyecto:</asp:Label>
</div> </div>
<div class="col-md-2"> <div class="col-md-2">
@@ -121,18 +138,7 @@
<asp:DropDownList ID="DdlSubproyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True"> <asp:DropDownList ID="DdlSubproyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True">
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<div class="col-md-2" runat="server" id="tdTipoReporte" visible="true">
<div class="row">
<label class="col-md-3">Tipo:</label>
<div class="col-md-6">
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm select2me" runat="server" Width="100%">
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
<asp:ListItem Text="Contable y Complementarias" Value="2"></asp:ListItem>
<asp:ListItem Text="Complementarias" Value="3"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -105,9 +105,7 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
CargaTipoCuentas() CargaTipoCuentas()
'TxtCuenta.Enabled = False 'TxtCuenta.Enabled = False
DdlMoneda.DataSource = GlobalDTMonedas
'DdlMoneda.Dispose()
DdlMoneda.DataBind()
txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString
txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString
@@ -228,7 +226,7 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
ObjTipoCuenta.Dispose() ObjTipoCuenta.Dispose()
DdlCuentas.DataBind() DdlCuentas.DataBind()
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto) CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=divProyecto)
End Sub End Sub
@@ -248,7 +246,7 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
IdCuenta = DdlCuentas.SelectedValue.ToEntero IdCuenta = DdlCuentas.SelectedValue.ToEntero
Cuenta = DdlCuentas.SelectedItem.ToString Cuenta = DdlCuentas.SelectedItem.ToString
Dim ObjConta As New ClsContabilidad Dim ObjConta As New ClsContabilidad
If ObjConta.GetMovimientosAuxiliaresCatalogo(IdCuenta, FechaInicio, FechaFin, DdlMoneda.SelectedValue.ToEntero, CveProyecto, CveSubProyecto, UsuarioActual.CveEmpresa, TipoReporte) Then If ObjConta.GetMovimientosAuxiliaresCatalogo(IdCuenta, FechaInicio, FechaFin, -1, CveProyecto, CveSubProyecto, UsuarioActual.CveEmpresa, TipoReporte, DdlOpcionCuentas.SelectedValue.ToEntero) Then
DtDatos = ObjConta.DtResultados DtDatos = ObjConta.DtResultados
DtTotales = DtDatos.Clone DtTotales = DtDatos.Clone
@@ -275,8 +273,8 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
Row = DtTotales.NewRow Row = DtTotales.NewRow
Row("CveCuenta") = -1 Row("CveCuenta") = -1
Row("CargosMovto") = If(DdlMoneda.SelectedValue = "1", dr("Cargos"), dr("CargosME")) Row("CargosMovto") = If("1" = "1", dr("Cargos"), dr("CargosME"))
Row("AbonosMovto") = If(DdlMoneda.SelectedValue = "1", dr("Abonos"), dr("AbonosME")) Row("AbonosMovto") = If("1" = "1", dr("Abonos"), dr("AbonosME"))
Row("Saldo") = dr("SaldoActual") Row("Saldo") = dr("SaldoActual")
Row("CtaMayor") = dr("CtaMayor") Row("CtaMayor") = dr("CtaMayor")
Row("Concepto") = String.Format("Total {0}:", dr("Nombre")) Row("Concepto") = String.Format("Total {0}:", dr("Nombre"))
@@ -367,9 +365,9 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
End If End If
'e.Row.FCLabel("LbReferencia").Text = String.Format("Total {0}:", If(e.Row.DBCampo("CtaMayor").ToString = "2", "", e.Row.DBCampo("Nombre").ToString)) 'e.Row.FCLabel("LbReferencia").Text = String.Format("Total {0}:", If(e.Row.DBCampo("CtaMayor").ToString = "2", "", e.Row.DBCampo("Nombre").ToString))
e.Row.FCLabel("LbCargos").Text = e.Row.DBCampo("Cargos").ToString.FormatoNumero(If(DdlMoneda.SelectedValue = "1", 2, 4)) e.Row.FCLabel("LbCargos").Text = e.Row.DBCampo("Cargos").ToString.FormatoNumero(If("1" = "1", 2, 4))
e.Row.FCLabel("LbAbonos").Text = e.Row.DBCampo("Abonos").ToString.FormatoNumero(If(DdlMoneda.SelectedValue = "1", 2, 4)) e.Row.FCLabel("LbAbonos").Text = e.Row.DBCampo("Abonos").ToString.FormatoNumero(If("1" = "1", 2, 4))
e.Row.FCLabel("LbSaldo").Text = e.Row.DBCampo("SaldoActual").ToString.FormatoNumero(If(DdlMoneda.SelectedValue = "1", 2, 4)) e.Row.FCLabel("LbSaldo").Text = e.Row.DBCampo("SaldoActual").ToString.FormatoNumero(If("1" = "1", 2, 4))
End If End If
Else Else
@@ -378,9 +376,9 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
CType(e.Row.FindControl("tr1"), HtmlTableRow).Visible = False CType(e.Row.FindControl("tr1"), HtmlTableRow).Visible = False
e.Row.FCHyperLink("HLPoliza").NavigateUrl = String.Format("/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}", e.Row.DBCampo("CvePoliza")) e.Row.FCHyperLink("HLPoliza").NavigateUrl = String.Format("/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}", e.Row.DBCampo("CvePoliza"))
If e.Row.DBCampo("CargosMovto").ToDouble <> 0 Then e.Row.FCLabel("LbCargos").Text = e.Row.DBCampo("CargosMovto").ToString.FormatoNumero(If(DdlMoneda.SelectedValue = "1", 2, 4)) If e.Row.DBCampo("CargosMovto").ToDouble <> 0 Then e.Row.FCLabel("LbCargos").Text = e.Row.DBCampo("CargosMovto").ToString.FormatoNumero(If("1" = "1", 2, 4))
If e.Row.DBCampo("AbonosMovto").ToDouble <> 0 Then e.Row.FCLabel("LbAbonos").Text = e.Row.DBCampo("AbonosMovto").ToString.FormatoNumero(If(DdlMoneda.SelectedValue = "1", 2, 4)) If e.Row.DBCampo("AbonosMovto").ToDouble <> 0 Then e.Row.FCLabel("LbAbonos").Text = e.Row.DBCampo("AbonosMovto").ToString.FormatoNumero(If("1" = "1", 2, 4))
If e.Row.DBCampo("Saldo").ToDouble <> 0 Then e.Row.FCLabel("LbSaldo").Text = e.Row.DBCampo("Saldo").ToString.FormatoNumero(If(DdlMoneda.SelectedValue = "1", 2, 4)) If e.Row.DBCampo("Saldo").ToDouble <> 0 Then e.Row.FCLabel("LbSaldo").Text = e.Row.DBCampo("Saldo").ToString.FormatoNumero(If("1" = "1", 2, 4))
End If End If
@@ -485,7 +483,7 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
params.Add(New ReportParameter("pFechaFin", FechaFin.ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("pFechaFin", FechaFin.ToString("dd/MM/yyyy")))
params.Add(New ReportParameter("pFechaInicio", FechaInicio.ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("pFechaInicio", FechaInicio.ToString("dd/MM/yyyy")))
params.Add(New ReportParameter("CveMoneda", DdlMoneda.SelectedValue)) params.Add(New ReportParameter("CveMoneda", "1"))
params.Add(New ReportParameter("Cuenta", Cuenta)) params.Add(New ReportParameter("Cuenta", Cuenta))
ImprimirPDF("Empresas/Grales/Formatos/RepMovimientosAuxiliaresCatalogo.rdlc", DtDatos, params, "MovimientosAuxiliares", Formato) ImprimirPDF("Empresas/Grales/Formatos/RepMovimientosAuxiliaresCatalogo.rdlc", DtDatos, params, "MovimientosAuxiliares", Formato)

View File

@@ -212,7 +212,7 @@
<asp:LinkButton ID="LnkAutorizar" Visible="false" OnClick="LnkAutorizar_Click" runat="server"><i class="fa fa-thumbs-up" aria-hidden="true"></i>Autorizar</asp:LinkButton> <asp:LinkButton ID="LnkAutorizar" Visible="false" OnClick="LnkAutorizar_Click" runat="server"><i class="fa fa-thumbs-up" aria-hidden="true"></i>Autorizar</asp:LinkButton>
</li> </li>
<li> <li>
<asp:LinkButton ID="LnkCancelarNomina" Visible="false" OnClick="LnkCancelarNomina_Click" runat="server"><i class="fa fa-ban" aria-hidden="true"></i>Cancelar nómina</asp:LinkButton> <asp:LinkButton ID="LnkCancelarNomina" Visible="false" OnClick="LnkCancelarNomina_Click" runat="server"><i class="fa fa-ban" aria-hidden="true"></i>Desautorizar nómina</asp:LinkButton>
</li> </li>
<li> <li>
<asp:LinkButton ID="LnkTimbrarTodos" Visible="false" OnClick="LnkTimbrarTodos_Click" runat="server"><i class="fa fa-bell"></i> Timbrar todos</asp:LinkButton> <asp:LinkButton ID="LnkTimbrarTodos" Visible="false" OnClick="LnkTimbrarTodos_Click" runat="server"><i class="fa fa-bell"></i> Timbrar todos</asp:LinkButton>

View File

@@ -377,7 +377,7 @@ Partial Class Site
End If End If
'Dim Inicio = From i In dt.AsEnumerable Where i!CvePadre.Equals(0) Order By i!Orden 'Dim Inicio = From i In dt.AsEnumerable Where i!CvePadre.Equals(0) Order By i!Orden
Dim CveModuloPadre, CveModuloPadreSeleccionado, CveModuloHijoSeleccionado, CveModuloNietoSeleccionado As Integer 'Dim CveModuloPadre, CveModuloPadreSeleccionado, CveModuloHijoSeleccionado, CveModuloNietoSeleccionado As Integer
'Dim CveModulo As Integer = CveModulomasterpage.Text.ToEntero() 'Dim CveModulo As Integer = CveModulomasterpage.Text.ToEntero()
'Dim ScriptColorGrupoModulo As String = "" 'Dim ScriptColorGrupoModulo As String = ""
'Dim LinkBase = "javascript:;" 'Dim LinkBase = "javascript:;"