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
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
DataAdapter("PA_Conta_MovimientosAuxiliaresCatalogoGet")
@@ -3816,6 +3816,7 @@ Public Class ClsContabilidad
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Tipo", SqlDbType.Int).Value = TipoReporte
.Add("@OpcionCuentas", SqlDbType.Int).Value = OpcionCuentas
End With
SqlAdapter.SelectCommand.CommandTimeout = 0
Try

View File

@@ -39,25 +39,32 @@
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter" style="">
<div class="portlet-title portlet-filterT" style="">
<div class="titlefiltros caption ">
<ul class="list-inline text-size-12">
<li>Proveedor:
<asp:DropDownList ID="DdlProveedores" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor" Width="300px">
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
<div class="portlet-title portlet-filterT smalltitle">
<div class="titlefiltros caption ">
<div class="row">
<div class="col-md-1 ">Proveedor:</div>
<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:DropDownList>
</li>
<li>Estatus:
</asp:DropDownList>--%>
</div>
<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:ListItem Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Selected="True" Text="Con Saldo" Value="0"></asp:ListItem>
<asp:ListItem Text="Sin Saldo" Value="1"></asp:ListItem>
</asp:DropDownList>
</li>
<li>Fecha I.</li>
<li style="width: 140px;">
<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 truncate">
Fecha I:
</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>
<span class="input-group-btn ">
<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>
<%--<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>--%>
</li>
<li>Fecha F.</li>
<li>
<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 truncate">
Fecha Fin:
</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>
<span class="input-group-btn ">
<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>
<%--<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>--%>
</li>
</ul>
</div>
</div>
</div>
<div class="tools">
<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">
<ContentTemplate>
<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"
DataKeyNames="CveCompra,Saldo,CveIE,CveProveedor,CvePersonal,CveMoneda,IdCtaContProveedores,IdCtaContExtranjera,IdCtaContComplementaria,TipoCambio,CveSubProyecto">
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None"
DataKeyNames="CveCompra,Saldo,CveIE,CveProveedor,CvePersonal,CveMoneda,CveTipoConcepto,IdCtaContProveedores,IdCtaContExtranjera,IdCtaContComplementaria,TipoCambio,CveSubProyecto">
<Columns>
<asp:TemplateField ItemStyle-Width="7%">
<asp:TemplateField ItemStyle-Width="2%">
<ItemTemplate>
<asp:CheckBox ID="chk" Checked="false" Visible="false" runat="server" />
</ItemTemplate>

View File

@@ -20,8 +20,11 @@ Partial Class Compras_RepNotasCredito
#End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
DdlProveedores.DataBind()
DdlProveedores.setEsWebService(True)
DdlProveedores.Attributes.Add("data-metodo", "getproveedores")
DdlProveedores.SelectedText = "Todos"
DdlProveedores.SelectedValue = "-1"
TxtFechaSaldar.Text = Now.ToShortDateString
CargaDatos()
End If
@@ -68,7 +71,7 @@ Partial Class Compras_RepNotasCredito
Dim StrFiltro As New StringBuilder
'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 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 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
TCCompra = gr.DataKey("TipoCambio").ToDecimal
CveMoneda = gr.DataKey("CveMoneda").ToEntero
Dim CveTipoConcepto = gr.DataKey("CveTipoConcepto").ToEntero
If CveMoneda > 1 Then
IdCtaContable = gr.DataKey("IdCtaContExtranjera").ToEntero
@@ -148,6 +152,10 @@ Partial Class Compras_RepNotasCredito
IdCtaContable = gr.DataKey("IdCtaContProveedores").ToEntero
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
MsgError = "Ocurrio un Error al saldar el movimiento"
End If
@@ -181,7 +189,7 @@ Partial Class Compras_RepNotasCredito
End If
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"
End If
End If

View File

@@ -181,7 +181,7 @@
<div class="row">
<div class="col-md-12">
<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>
<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>

View File

@@ -1210,35 +1210,66 @@ Partial Class ContabilidadC_RegPrePolizaS
ObjContabilidad.IniciaTransacSQL()
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
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
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)
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
If Retorno Then
If Not ObjContabilidad.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then
OcurrioError = True
End If
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
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)
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
@@ -1246,50 +1277,26 @@ Partial Class ContabilidadC_RegPrePolizaS
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
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"
If Not ObjContabilidad.AddPrePolizasDetalle(CvePrePoliza, 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.DataKey("CveConceptoContable").ToEntero, row.FCLiteral("TxtConcepto").Text, Now,
row.DataKey("IdCtaContable").ToEntero, 0, CveSubProyecto:=row.DataKey("CveSubProyecto").ToEntero,
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
If Not ObjContabilidad.AddPrePolizasDetalle(CvePrePoliza, 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.DataKey("CveConceptoContable").ToEntero, row.FCLiteral("TxtConcepto").Text, Now,
row.DataKey("IdCtaContable").ToEntero, 0, CveSubProyecto:=row.DataKey("CveSubProyecto").ToEntero,
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
Next
End If
Else
OcurrioError = True
End If
Catch ex As Exception
OcurrioError = True
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:DropDownList>
</div>
<div class="col-md-1 truncate" id="tdTipoReporte" visible="true">
<div class="col-md-1 truncate" id="tdTipoReporte" visible="false" runat="server">
Tipo
</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: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">
<div class="col-md-1" id="divProyecto" runat="server">
<asp:Label ID="LblProyecto" runat="server">Proyecto:</asp:Label>
</div>
<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>
</div>
<div class="col-md-2">
<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 class="col-md-1">
</div>
</div>
</div>

View File

@@ -109,10 +109,6 @@ Partial Class AC2_RepAnexoCatalogo
'FechaInicio = Request("FI").ToDate
FechaFin = Request("FF").ToDate
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
FechaInicio = Request("FI").ToDate
@@ -189,19 +185,13 @@ Partial Class AC2_RepAnexoCatalogo
Dim dr As DataRow = ObjTipoCuenta.DtResultados.FiltroPrimero("Codigo IN ('_GLOBAL')")
If dr IsNot Nothing Then strGlobal = dr.Item(0).ToString
'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
End If
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()
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto)
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=divProyecto)
End Sub
@@ -323,25 +313,17 @@ Partial Class AC2_RepAnexoCatalogo
End Sub
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)
Else
FechaInicio = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", Date.Now, txtFechaI.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()
End If
'RegistraScript("Enable();")
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)

View File

@@ -44,11 +44,22 @@
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle">
<div class="tools">
<asp:Button ID="BtnConsultar" runat="server" CssClass="btn btn-default" Text="Consultar" Width="100px" OnClick="BtnConsultar_Click" ValidationGroup="GrpConsulta" />
<a href="javascript:;" class="expand"></a>
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" CssClass="btn btn-default" OnClick="BtnConsultar_Click" ValidationGroup="Valida" />
<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 class="titlefiltros caption ">
<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">
Fecha Inicio:
</div>
@@ -87,29 +98,35 @@
<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>
</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 class="portlet-body" style="display: none">
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
<div class="row">
<label class="col-md-1">Moneda:</label>
<div class="col-md-1">
<asp:DropDownList ID="DdlMoneda" CssClass="form-control input-sm select2me" runat="server" DataTextField="Moneda" DataValueField="CveMoneda" TabIndex="5" ClientIDMode="Static" Width="100%">
<div class="col-md-1 truncate">
Tipo Movto
</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>
</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>
</div>
<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>
</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>

View File

@@ -105,9 +105,7 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
CargaTipoCuentas()
'TxtCuenta.Enabled = False
DdlMoneda.DataSource = GlobalDTMonedas
'DdlMoneda.Dispose()
DdlMoneda.DataBind()
txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString
txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString
@@ -228,7 +226,7 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
ObjTipoCuenta.Dispose()
DdlCuentas.DataBind()
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto)
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=divProyecto)
End Sub
@@ -248,7 +246,7 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
IdCuenta = DdlCuentas.SelectedValue.ToEntero
Cuenta = DdlCuentas.SelectedItem.ToString
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
DtTotales = DtDatos.Clone
@@ -275,8 +273,8 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
Row = DtTotales.NewRow
Row("CveCuenta") = -1
Row("CargosMovto") = If(DdlMoneda.SelectedValue = "1", dr("Cargos"), dr("CargosME"))
Row("AbonosMovto") = If(DdlMoneda.SelectedValue = "1", dr("Abonos"), dr("AbonosME"))
Row("CargosMovto") = If("1" = "1", dr("Cargos"), dr("CargosME"))
Row("AbonosMovto") = If("1" = "1", dr("Abonos"), dr("AbonosME"))
Row("Saldo") = dr("SaldoActual")
Row("CtaMayor") = dr("CtaMayor")
Row("Concepto") = String.Format("Total {0}:", dr("Nombre"))
@@ -367,9 +365,9 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
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("LbCargos").Text = e.Row.DBCampo("Cargos").ToString.FormatoNumero(If(DdlMoneda.SelectedValue = "1", 2, 4))
e.Row.FCLabel("LbAbonos").Text = e.Row.DBCampo("Abonos").ToString.FormatoNumero(If(DdlMoneda.SelectedValue = "1", 2, 4))
e.Row.FCLabel("LbSaldo").Text = e.Row.DBCampo("SaldoActual").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("1" = "1", 2, 4))
e.Row.FCLabel("LbSaldo").Text = e.Row.DBCampo("SaldoActual").ToString.FormatoNumero(If("1" = "1", 2, 4))
End If
Else
@@ -378,9 +376,9 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
CType(e.Row.FindControl("tr1"), HtmlTableRow).Visible = False
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("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("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("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("1" = "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
@@ -485,7 +483,7 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
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("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))
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>
</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>
<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
'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 ScriptColorGrupoModulo As String = ""
'Dim LinkBase = "javascript:;"