Recepcion Almacen Bitacora recarga despues de guaraddo parcial
This commit is contained in:
@@ -56,6 +56,9 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkVerGrafica" OnClick="LnkVerGrafica_Click" runat="server">Ver Grafica</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkModalPorcentajes" OnClick="LnkModalPorcentajes_Click" runat="server" Visible="false"><i class="fa fa-list" aria-hidden="true"></i> Consultar porcentajes</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<li>
|
||||
@@ -275,6 +278,106 @@
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div id="DivModalPorcetajes" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog modal-lg" runat="server" ID="UpModalPorcentajes" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content" style="width:700px!important">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="LblModalTituloPorcentajes" runat="server" ClientIDMode="Static" Text="">Consulta Porcentajes</asp:Label>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top: -10px !important;">
|
||||
<label for="<%= TxtModalFechaInicio.ClientID.ToString()%>" style="color: #888888;">Fecha Inicio: </label>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtModalFechaInicio" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="100px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkTxtModalFechaInicio" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="METxtModalFechaInicio" runat="server" TargetControlID="TxtModalFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CETxtModalFechaInicio" TargetControlID="TxtModalFechaInicio" PopupButtonID="LnkTxtModalFechaInicio" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtModalFechaInicio" CssClass="help-block errorimput" runat="server" ControlToValidate="TxtModalFechaInicio" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalPorcentaje"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top: -10px !important;">
|
||||
<label for="<%= TxtModalFechaFin.ClientID.ToString()%>" style="color: #888888;">Fecha Fin: </label>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtModalFechaFin" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="100px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkTxtModalFechaFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="METxtModalFechaFin" runat="server" TargetControlID="TxtModalFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CETxtModalFechaFin" TargetControlID="TxtModalFechaFin" PopupButtonID="LnkTxtModalFechaFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RfvLnkTxtModalFechaFin" CssClass="help-block errorimput" runat="server" ControlToValidate="TxtModalFechaFin" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalPorcentaje"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtModalPorcentaje" runat="server" CausesValidation="true" CssClass="form-control" MaxLength="13" Text="5" Enabled="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtModalPorcentaje" CssClass="help-block errorimput" runat="server" ControlToValidate="TxtModalPorcentaje" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Porcentaje''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalPorcentaje"></asp:RequiredFieldValidator>
|
||||
<ajax:FilteredTextBoxExtender ID="FIETTxtModalPorcentaje" TargetControlID="TxtModalPorcentaje" FilterType="Numbers,Custom" ValidChars="-" runat="server" />
|
||||
<label for="<%= TxtModalPorcentaje.ClientID.ToString()%>">Porcentaje Menor a:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<asp:Button runat="server" ID="BtnModalConsultaPorcentaje" CssClass="btn btn-primary" Text="Consultar" CausesValidation="true" ValidationGroup="GrpModalPorcentaje" OnClick="BtnModalConsultaPorcentaje_Click" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="height:10px!important"></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvPorcentajes" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas Utilidad con los filtros especificados"
|
||||
CssClass="table table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None" OnRowDataBound="GvPorcentajes_RowDataBound" >
|
||||
<Columns>
|
||||
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Left" HeaderText="SubProyecto" DataField="SubProyecto" ItemStyle-Width="200px" />
|
||||
|
||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Center" HeaderText="Serie Folio" DataTextField="SerieFolio" DataTextFormatString="{0}" Target="_blank"
|
||||
DataNavigateUrlFields="CveVenta"
|
||||
DataNavigateUrlFormatString="Ventas.aspx?CveVenta={0}" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Center" HeaderText="Fecha" DataField="FechaVenta" DataFormatString="{0:d}" ItemStyle-Width="100px" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="SubTotal" DataField="SubTotal" DataFormatString="{0:N}" ItemStyle-Width="100px" />
|
||||
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Costo" DataField="Costo" DataFormatString="{0:N}" ItemStyle-Width="100px" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="% Neto" DataField="PorNeto" DataFormatString="{0:N}" ItemStyle-Width="100px" />
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<div id="DivModalGrafica" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog modal-lg" runat="server" ID="UPModalProd" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
@@ -288,18 +391,20 @@
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
|
||||
<label class="col-md-1 truncate">Ver:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlVer" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlVer_SelectedIndexChanged" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Neto" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Rentabilidad" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Ver:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlVer" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlVer_SelectedIndexChanged" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Neto" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Rentabilidad" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<br />
|
||||
|
||||
<br />
|
||||
<div id="chartdiv"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
|
||||
</div>
|
||||
@@ -307,6 +412,10 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
|
||||
|
||||
@@ -32,19 +32,37 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
'If UsuarioActual.Empresa.Funcionalidad(382) <> "1" Then
|
||||
' GvDatos.Columns(3).Visible = False
|
||||
' GvDatos.Columns(5).Visible = False
|
||||
'End If
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
LnkModalPorcentajes.Visible = True
|
||||
End If
|
||||
|
||||
CargaCombos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Property SubProyectoConf As String
|
||||
Get
|
||||
If ViewState("SubProyectoConf") Is Nothing Then
|
||||
ViewState("SubProyectoConf") = ""
|
||||
End If
|
||||
Return ViewState("SubProyectoConf").ToString
|
||||
End Get
|
||||
|
||||
Set(value As String)
|
||||
ViewState("SubProyectoConf") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " INICIALIZA VALORES "
|
||||
Private Sub CargaCombos()
|
||||
|
||||
TxtModalFechaInicio.Text = NowADS().FirstDayOfMonth.ToShortDateString
|
||||
TxtModalFechaFin.Text = NowADS().LastDayOfMonth.ToShortDateString
|
||||
|
||||
txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString
|
||||
txtFechaF.Text = NowADS().LastDayOfMonth.ToShortDateString
|
||||
|
||||
@@ -108,6 +126,12 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
||||
|
||||
LblNeto.Text = "0"
|
||||
LblPorNeto.Text = "0"
|
||||
|
||||
|
||||
Dim LblSubProyectoConf As New Label
|
||||
CargarCentrosDeCosto(Nothing, Nothing, Nothing, LblSubProyectoConf)
|
||||
SubProyectoConf = LblSubProyectoConf.Text
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlCategoria_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
@@ -315,4 +339,42 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub LnkModalPorcentajes_Click(sender As Object, e As EventArgs)
|
||||
|
||||
GvPorcentajes.DataSource = Nothing
|
||||
GvPorcentajes.DataBind()
|
||||
UpModalPorcentajes.Update()
|
||||
RegistraScript("$('#DivModalPorcetajes').modal(`show`);")
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub BtnModalConsultaPorcentaje_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim ObjVentas As New ClsVentas()
|
||||
Dim FechaI As Date = TxtModalFechaInicio.Text.ToDate
|
||||
Dim FechaF As Date = TxtModalFechaFin.Text.ToDate
|
||||
If TxtModalFechaInicio.Text = "" Then FechaI = MinFecha
|
||||
If TxtModalFechaFin.Text = "" Then FechaF = MaxFecha
|
||||
|
||||
If ObjVentas.GetReporteVentasUtilidad("-1", -1, "-1", FechaI, FechaF, UsuarioActual.CveEmpresa, -1, -1, -1, -1, -1) Then
|
||||
GvPorcentajes.DataSource = ObjVentas.DtResultados.FiltraParametros($" CveVenta > 0 AND PorNeto <= {TxtModalPorcentaje.Text.ToDecimal} AND TipoDocto = 'Ing' AND CveEstatusFactura IN(2,3) ")
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
GvPorcentajes.DataBind()
|
||||
|
||||
ObjVentas.Dispose()
|
||||
UpModalPorcentajes.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvPorcentajes_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
|
||||
If e.Row.RowType = DataControlRowType.Header Then
|
||||
e.Row.Cells(0).Text = SubProyectoConf
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user