-
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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(" <b>Tipo Documento</b>: {0}", DdlTipoComprobante.SelectedItem.Text)
|
||||
If DdlProveedores.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" <b>Proveedor:</b> {0}", DdlProveedores.SelectedItem.Text)
|
||||
If DdlProveedores.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" <b>Proveedor:</b> {0}", DdlProveedores.SelectedText)
|
||||
If DdlOpcion.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" <b>Estatus:</b> {0}", DdlOpcion.SelectedItem.Text)
|
||||
|
||||
If txtFechaI.Text <> "" Then StrFiltro.AppendFormat(" <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
|
||||
|
||||
Reference in New Issue
Block a user