Ventas Actualizar Linea Adicional
This commit is contained in:
157
Agropecuaria/RepPreciosVentaManifiesto.aspx
Normal file
157
Agropecuaria/RepPreciosVentaManifiesto.aspx
Normal file
@@ -0,0 +1,157 @@
|
|||||||
|
<%@ Page Title="Reporte de Ordenes de Servicio Médicas" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepPreciosVentaManifiesto.aspx.vb" Inherits="Agrupecuaria_RepPreciosVentaManifiesto" %>
|
||||||
|
|
||||||
|
|
||||||
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
|
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content8" ContentPlaceHolderID="HA" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||||
|
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||||
|
Reporte de Ordenes de Servicio Médicas
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
|
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpAcciones">
|
||||||
|
<ContentTemplate>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkExportar" runat="server" Visible="false"><i class="fa fa-file-excel-o"></i> Excel</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
</ContentTemplate>
|
||||||
|
<Triggers>
|
||||||
|
<asp:PostBackTrigger ControlID="LnkExportar" />
|
||||||
|
</Triggers>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</asp:Content>
|
||||||
|
<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" id="idnecesaria">
|
||||||
|
<div class="portlet-title portlet-filterT smalltitle">
|
||||||
|
<div class="tools">
|
||||||
|
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
|
||||||
|
<a href="javascript:;" class="expand"></a>
|
||||||
|
</div>
|
||||||
|
<div class="titlefiltros caption">
|
||||||
|
<div class="row" style="height: 32px;">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-1 truncate">
|
||||||
|
Fecha Inicio:
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1" style="min-width: 115px">
|
||||||
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||||
|
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" 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>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
<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:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1 truncate">
|
||||||
|
Fecha Fin:
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1" style="min-width: 115px">
|
||||||
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||||
|
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" 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>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
<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:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<asp:Label ID="LblSubProyecto" runat="server" class="col-md-1 truncate">SubProyecto:</asp:Label>
|
||||||
|
<div runat="server" id="DivSubProyecto" class="col-md-1">
|
||||||
|
<asp:DropDownList ID="DdlSubProyecto" data-text="Todos" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass=" input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body" style="display: none">
|
||||||
|
<div class="row">
|
||||||
|
<label id="lblCultivo" runat="server" class="col-md-1 truncate">Cultivo </label>
|
||||||
|
<div class="col-md-2" id="DivCultivo" runat="server">
|
||||||
|
<asp:ListBox ID="DdlCultivo" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" DataTextField="Cuadro" DataValueField="CveCultivoCuadroDetalle" CssClass="ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:ListBox>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
<div class="" align="right">
|
||||||
|
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" Width="100%" EmptyDataText="No se encontraron ordenes de servicio con los filtros especificados"
|
||||||
|
ToolTip="Listado de ordenes de servicio" CssClass="table table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None">
|
||||||
|
<Columns>
|
||||||
|
<%--0--%>
|
||||||
|
<asp:HyperLinkField HeaderText="Folio" DataNavigateUrlFields="CveOS" DataNavigateUrlFormatString="/OS/OrdenesServicios.aspx?CveOS={0}" DataTextField="Folio" Target="_blank" />
|
||||||
|
<%--<asp:BoundField HeaderText="Folio" DataField="Folio" />--%>
|
||||||
|
<%--1--%>
|
||||||
|
<asp:BoundField DataField="FechaCita" HeaderText="Fecha Cirugía" ItemStyle-Width="110px" DataFormatString="{0:dd/MM/yyyy HH:mm}" HtmlEncode="False" />
|
||||||
|
<%--2--%>
|
||||||
|
<asp:BoundField HeaderText="Hospital" DataField="Nombre" />
|
||||||
|
<%--3--%>
|
||||||
|
<asp:BoundField HeaderText="Tipo" DataField="TipoVenta" />
|
||||||
|
<%--4--%>
|
||||||
|
<asp:BoundField HeaderText="Médico" DataField="Medico" />
|
||||||
|
<%--5--%>
|
||||||
|
<asp:BoundField HeaderText="Procedimiento" DataField="Procedimiento" />
|
||||||
|
<%--6--%>
|
||||||
|
<asp:BoundField HeaderText="Vendedor" DataField="Vendedor" />
|
||||||
|
<%--7--%>
|
||||||
|
<asp:BoundField HeaderText="Estatus" DataField="EstatusOrdenServicio" />
|
||||||
|
<%--8--%>
|
||||||
|
<asp:BoundField HeaderText="Técnico" DataField="NombreUsuario" />
|
||||||
|
<%--9--%>
|
||||||
|
<asp:BoundField HeaderText="Paciente" DataField="Paciente" />
|
||||||
|
<%--10--%>
|
||||||
|
<asp:BoundField HeaderText="Episodio" DataField="IdentificadorCliente" />
|
||||||
|
<%--11--%>
|
||||||
|
<asp:HyperLinkField HeaderText="Pedido" DataTextField="SerieFolioPedido" ControlStyle-CssClass="Texto" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataNavigateUrlFields="CveVentaPedido" Target="_blank" />
|
||||||
|
<%--12--%>
|
||||||
|
<asp:HyperLinkField HeaderText="Remisión" DataTextField="SerieFolioRemision" ControlStyle-CssClass="Texto" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataNavigateUrlFields="CveVentaRemision" Target="_blank" />
|
||||||
|
<%--13--%>
|
||||||
|
<asp:BoundField HeaderText="Observaciones" DataField="Observaciones" />
|
||||||
|
<%--14--%>
|
||||||
|
<asp:BoundField HeaderText="Folio Adicional" DataField="FolioAdicional" visible="false" />
|
||||||
|
<asp:BoundField HeaderText="Total" DataField="TotalRemision" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,###.00}" />
|
||||||
|
|
||||||
|
</Columns>
|
||||||
|
|
||||||
|
</asp:GridView>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
261
Agropecuaria/RepPreciosVentaManifiesto.aspx.vb
Normal file
261
Agropecuaria/RepPreciosVentaManifiesto.aspx.vb
Normal file
@@ -0,0 +1,261 @@
|
|||||||
|
Option Explicit On
|
||||||
|
Option Strict On
|
||||||
|
|
||||||
|
Imports System.Data
|
||||||
|
Imports Extensiones
|
||||||
|
|
||||||
|
Partial Class Agrupecuaria_RepPreciosVentaManifiesto
|
||||||
|
Inherits ClsPaginas
|
||||||
|
|
||||||
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
|
If Not IsPostBack Then
|
||||||
|
If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario.Contiene(77, 21) Then Response.Redirect("/Inicio.aspx")
|
||||||
|
|
||||||
|
CargaCombos()
|
||||||
|
CargaDatos()
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
#Region " CARGA COMBOS "
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub CargaCombos()
|
||||||
|
|
||||||
|
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto)
|
||||||
|
|
||||||
|
CargaCultivo()
|
||||||
|
|
||||||
|
'CargaEstatus
|
||||||
|
DdlEstatusOS.DataSource = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa)
|
||||||
|
DdlEstatusOS.DataBind()
|
||||||
|
DdlEstatusOS.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
Dim DTTecnicos As DataTable = Nothing
|
||||||
|
|
||||||
|
Dim ObjOS As New ClsOS
|
||||||
|
If ObjOS.GetSubProyectosEstatusInicial(-1, 3, UsuarioActual.CveEmpresa) Then
|
||||||
|
DTTecnicos = ObjOS.DtResultados
|
||||||
|
End If
|
||||||
|
ObjOS.Dispose()
|
||||||
|
|
||||||
|
DdlTecnico.DataSource = DTTecnicos
|
||||||
|
DdlTecnico.DataBind()
|
||||||
|
DdlTecnico.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
DdlTecnico.Items.Insert(1, New ListItem("Sin Asignar", "-2"))
|
||||||
|
|
||||||
|
'376
|
||||||
|
If UsuarioActual.TienePermisoProceso(376) Then
|
||||||
|
DdlTecnico.Enabled = False
|
||||||
|
DdlTecnico.SelectedValueExist(UsuarioActual.CveUsuario)
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If IfNull(Request("CveUsuarioTecnico"), 0).ToString.ToEntero > 0 Then
|
||||||
|
DdlTecnico.SelectedValueExist(Request("CveUsuarioTecnico").ToString)
|
||||||
|
Else
|
||||||
|
ViewState("CveUsuarioTecnico") = -1
|
||||||
|
End If
|
||||||
|
|
||||||
|
'CargaClientes
|
||||||
|
Dim EsWS As Boolean = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
||||||
|
'If EsWS Then
|
||||||
|
' DdlClientes.setEsWebService(True)
|
||||||
|
'Else
|
||||||
|
' DdlClientes.setEsWebService(False)
|
||||||
|
' DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||||
|
' DdlClientes.DataBind()
|
||||||
|
' DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
'End If
|
||||||
|
|
||||||
|
'Vendedor
|
||||||
|
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=-1).FiltraParametros("VendedorTipo in (1,4)") 'vendedores y vendedores de piso
|
||||||
|
DdlVendedor.DataBind()
|
||||||
|
DdlVendedor.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
DdlVendedor.Items.Insert(1, New ListItem("Sin Vendedor", "-2"))
|
||||||
|
|
||||||
|
If UsuarioActual.CveVendedor > 0 Then
|
||||||
|
DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor)
|
||||||
|
DdlVendedor.Enabled = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString
|
||||||
|
txtFechaF.Text = NowADS().AddDays(2).ToShortDateString
|
||||||
|
|
||||||
|
|
||||||
|
DdlMedico.DataSource = If(UsuarioActual.CveVendedor > 0, GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros($" Estatus = 'True' AND CveVendedor = {UsuarioActual.CveVendedor} "), GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' "))
|
||||||
|
DdlMedico.DataBind()
|
||||||
|
|
||||||
|
DdlProcedimiento.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||||
|
DdlProcedimiento.DataBind()
|
||||||
|
|
||||||
|
DdlTipoVenta.DataSource = GlobalDTTipoVenta(UsuarioActual.CveEmpresa)
|
||||||
|
DdlTipoVenta.DataBind
|
||||||
|
|
||||||
|
Dim ObjVentas As New ClsVentas
|
||||||
|
|
||||||
|
If ObjVentas.GetMedicosEspecialidades(-1, UsuarioActual.CveEmpresa, -1) Then
|
||||||
|
DdlEspecialidad.DataSource = ObjVentas.DtResultados
|
||||||
|
Else
|
||||||
|
DdlEspecialidad.DataSource = Nothing
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjVentas.Dispose()
|
||||||
|
|
||||||
|
DdlEspecialidad.DataBind()
|
||||||
|
DdlEspecialidad.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||||
|
|
||||||
|
DdlClienteSucursal.DataSource = GlobalDTClientesTodosSucursales(UsuarioActual.CveEmpresa)
|
||||||
|
DdlClienteSucursal.DataBind()
|
||||||
|
DdlClienteSucursal.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
|
||||||
|
'Dim EsWS As Boolean = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
||||||
|
'If EsWS Then
|
||||||
|
' DdlCliente.setEsWebService(True)
|
||||||
|
|
||||||
|
'Else
|
||||||
|
' DdlCliente.setEsWebService(False)
|
||||||
|
' DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||||
|
' DdlCliente.DataBind()
|
||||||
|
' DdlCliente.ddl.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||||
|
'End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaCultivo()
|
||||||
|
DdlCultivo.Items.Clear()
|
||||||
|
If DdlSubProyecto.GetSelectedValuesM(True) <> "" Then
|
||||||
|
DdlCultivo.DataSource = GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveSubProyecto IN ({0})", DdlSubProyecto.GetSelectedValuesM(True)))
|
||||||
|
DdlCultivo.DataBind()
|
||||||
|
Else
|
||||||
|
DdlCultivo.DataSource = Nothing
|
||||||
|
DdlCultivo.DataBind()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
#Region " CARGA DATOS "
|
||||||
|
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
||||||
|
|
||||||
|
CargaDatos()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaDatos()
|
||||||
|
|
||||||
|
Dim ObjOS As New ClsOS
|
||||||
|
Dim FechaI As Date = If(txtFechaI.Text.Trim = "", MinFecha, txtFechaI.Text.ToDate)
|
||||||
|
Dim FechaF As Date = If(txtFechaF.Text.Trim = "", MaxFecha, txtFechaF.Text.ToDate)
|
||||||
|
Dim Cvecliente As Integer = DdlClienteSucursalCliente()
|
||||||
|
Dim CveClienteSucursal As Integer = DdlClienteSucursalSucursal()
|
||||||
|
LnkPersonalizar.Visible = False
|
||||||
|
|
||||||
|
If ObjOS.GetRepOrdenesServicioMedicasRep(FechaI, FechaF, Cvecliente, DdlVendedor.SelectedValue.ToEntero, DdlEstatusOS.SelectedValue.ToEntero, DdlTecnico.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa,
|
||||||
|
CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveEspecialidad:=DdlEspecialidad.SelectedValue.ToEntero,
|
||||||
|
CveClienteSucursal:=CveClienteSucursal, CveUsuario:=UsuarioActual.CveUsuario, CveTipoVenta:=DdlTipoVenta.SelectedValue.ToEntero) Then
|
||||||
|
GvDatos.DataSource = ObjOS.DtResultados
|
||||||
|
If ObjOS.DtResultados IsNot Nothing AndAlso ObjOS.DtResultados.Rows.Count > 0 Then
|
||||||
|
LnkPersonalizar.Visible = True
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
GvDatos.DataSource = Nothing
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjOS.Dispose()
|
||||||
|
|
||||||
|
GvDatos.DataBind()
|
||||||
|
|
||||||
|
|
||||||
|
LnkExportar.Visible = If(GvDatos.Rows.Count > 0, True, False)
|
||||||
|
UpAcciones.Update()
|
||||||
|
|
||||||
|
|
||||||
|
UPDatos.Update()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
'Private Sub CargaClientes()
|
||||||
|
' DdlClientes.ddl.Items.Clear()
|
||||||
|
' DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1) '.FiltraParametros($"CveClienteClasificacion = {DdlClienteClasificacion.SelectedValue.ToEntero} OR {DdlClienteClasificacion.SelectedValue.ToEntero} = -1")
|
||||||
|
' DdlClientes.DataBind()
|
||||||
|
' DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
'End Sub
|
||||||
|
|
||||||
|
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlProyecto.SelectedIndexChanged
|
||||||
|
CargarSubProyecto(DdlSubProyecto, DdlProyecto.SelectedValue)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
#Region " GV DATOS - ROW DATABOUND "
|
||||||
|
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
e.Row.Cells(1).Attributes.Add("data-order", e.Row.DBCampo("FechaCita").ToDateTime.ToString("yyyyMMddHHmm"))
|
||||||
|
If e.Row.DBCampo("CveOS") = "" Then
|
||||||
|
e.Row.CssClass = "Totales"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||||
|
|
||||||
|
Dim SubProyecto As String = ""
|
||||||
|
|
||||||
|
If DdlSubProyecto.SelectedValue.ToEntero > 0 Then
|
||||||
|
SubProyecto = DdlSubProyecto.SelectedItem.Text
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim SbFiltros As New StringBuilder()
|
||||||
|
SbFiltros.AppendFormat($"Fecha Inicio: {txtFechaI.Text} Fecha Fin: {txtFechaF.Text}|")
|
||||||
|
SbFiltros.AppendFormat("SubProyecto: {0}|", SubProyecto)
|
||||||
|
|
||||||
|
|
||||||
|
GvDatos.ExportToExcelGembox("OrdenesServicio", UsuarioActual, "Ordenes de Servicio Medicas", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString())
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub LnkPersonalizar_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
' ChkGuardarPersonalizacion.Checked = False
|
||||||
|
RegistraScript("$('#DivPersonalizar').modal('show')")
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click
|
||||||
|
Personaliza()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Personaliza()
|
||||||
|
GvDatos.Columns(13).Visible = ChkObservaciones.Checked
|
||||||
|
GvDatos.Columns(14).Visible = ChkFolioAdicional.Checked
|
||||||
|
CargaDatos()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function DdlClienteSucursalCliente() As Integer
|
||||||
|
If DdlClienteSucursal.SelectedValue = "-1" Then
|
||||||
|
Return -1
|
||||||
|
Else
|
||||||
|
Dim array As String() = DdlClienteSucursal.SelectedValue.Split("|"c)
|
||||||
|
Return If(array(0).ToEntero > 0, array(0).ToEntero, -1)
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function DdlClienteSucursalSucursal() As Integer
|
||||||
|
If DdlClienteSucursal.SelectedValue = "-1" Then
|
||||||
|
Return -1
|
||||||
|
Else
|
||||||
|
Dim array As String() = DdlClienteSucursal.SelectedValue.Split("|"c)
|
||||||
|
Return If(array(1).ToEntero > 0, array(1).ToEntero, -1)
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -11138,6 +11138,8 @@ Public Class ClsPaginas
|
|||||||
PaginaDict.Add("/Contabilidad/OCDetalleAlmacen.aspx".ToUpper(), -1)
|
PaginaDict.Add("/Contabilidad/OCDetalleAlmacen.aspx".ToUpper(), -1)
|
||||||
PaginaDict.Add("/Contabilidad/RepBalanceGeneralHorizontal.aspx".ToUpper(), -1)
|
PaginaDict.Add("/Contabilidad/RepBalanceGeneralHorizontal.aspx".ToUpper(), -1)
|
||||||
PaginaDict.Add("/Agropecuaria/CierreCultivo.aspx".ToUpper(), 1326)
|
PaginaDict.Add("/Agropecuaria/CierreCultivo.aspx".ToUpper(), 1326)
|
||||||
|
PaginaDict.Add("/Agropecuaria/RepPreciosVentaManifiesto.aspx".ToUpper(), -1)
|
||||||
|
|
||||||
PaginaDict.Add("/Inventarios/RepRSCO.aspx".ToUpper(), 1328)
|
PaginaDict.Add("/Inventarios/RepRSCO.aspx".ToUpper(), 1328)
|
||||||
PaginaDict.Add("/testApi.aspx".ToUpper(), -1)
|
PaginaDict.Add("/testApi.aspx".ToUpper(), -1)
|
||||||
|
|
||||||
|
|||||||
@@ -6335,7 +6335,7 @@ Public Class ClsVentas
|
|||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function UpdateVentaLineaAdicional(CveLineaAdicional As Integer, CveVenta As Integer, LineaAdicionalComprobante As String, CveLineaAdicionalEstatus As Integer, CveEmpresa As Integer) As Boolean
|
Public Function UpdateVentaLineaAdicional(CveLineaAdicional As Integer, CveVenta As Integer, LineaAdicionalComprobante As String, CveLineaAdicionalEstatus As Integer, CveEmpresa As Integer, Optional OrdenCompra As String = "-1") As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Vta_LineasAdicionalesVentaUpdate")
|
DataAdapter("PA_Vta_LineasAdicionalesVentaUpdate")
|
||||||
@@ -6345,6 +6345,7 @@ Public Class ClsVentas
|
|||||||
.Add("@LineaAdicionalComprobante", SqlDbType.VarChar).Value = LineaAdicionalComprobante
|
.Add("@LineaAdicionalComprobante", SqlDbType.VarChar).Value = LineaAdicionalComprobante
|
||||||
.Add("@CveLineaAdicionalEstatus", SqlDbType.Int).Value = CveLineaAdicionalEstatus
|
.Add("@CveLineaAdicionalEstatus", SqlDbType.Int).Value = CveLineaAdicionalEstatus
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@OrdenCompra", SqlDbType.VarChar).Value = OrdenCompra
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
|
|||||||
@@ -252,6 +252,20 @@ Partial Class Compras_Compras
|
|||||||
Return ViewState("CveCompra").ToString.ToEntero
|
Return ViewState("CveCompra").ToString.ToEntero
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private Property CveCompraFactura As Integer
|
||||||
|
Get
|
||||||
|
If ViewState("CveCompraFactura") Is Nothing Then
|
||||||
|
ViewState("CveCompraFactura") = -1
|
||||||
|
End If
|
||||||
|
Return ViewState("CveCompraFactura").ToString.ToEntero
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("CveCompraFactura") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
Private ReadOnly Property CveFactura As Integer
|
Private ReadOnly Property CveFactura As Integer
|
||||||
Get
|
Get
|
||||||
Return ViewState("CveFactura").ToString.ToEntero
|
Return ViewState("CveFactura").ToString.ToEntero
|
||||||
@@ -1545,7 +1559,7 @@ Partial Class Compras_Compras
|
|||||||
If UsuarioActual.Empresa.Funcionalidad(562).ToEntero > 0 Then CargaGastosServicios(UsuarioActual.Empresa.Funcionalidad(562).ToEntero)
|
If UsuarioActual.Empresa.Funcionalidad(562).ToEntero > 0 Then CargaGastosServicios(UsuarioActual.Empresa.Funcionalidad(562).ToEntero)
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
CargaGvPersonal()
|
||||||
ElseIf Request("CveCompra") IsNot Nothing AndAlso IsNumeric(Request("CveCompra")) AndAlso Request("CveCompra").ToEntero > 0 Then
|
ElseIf Request("CveCompra") IsNot Nothing AndAlso IsNumeric(Request("CveCompra")) AndAlso Request("CveCompra").ToEntero > 0 Then
|
||||||
|
|
||||||
'If UsuarioActual.Empresa.Funcionalidad(574).ToEntero = 1 Then
|
'If UsuarioActual.Empresa.Funcionalidad(574).ToEntero = 1 Then
|
||||||
@@ -1594,6 +1608,7 @@ Partial Class Compras_Compras
|
|||||||
'End If
|
'End If
|
||||||
LnkAgregarGuia.Visible = False
|
LnkAgregarGuia.Visible = False
|
||||||
UpLnkPaqueteriaGuias.Update()
|
UpLnkPaqueteriaGuias.Update()
|
||||||
|
CargaGvPersonal()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.TienePermisoProceso(360) AndAlso UsuarioActual.CveEmpresa = 119 Then BtnProrateoDeducible.Visible = True
|
If UsuarioActual.TienePermisoProceso(360) AndAlso UsuarioActual.CveEmpresa = 119 Then BtnProrateoDeducible.Visible = True
|
||||||
@@ -2973,6 +2988,7 @@ Partial Class Compras_Compras
|
|||||||
LblRetISR.Text = If(dr("RetISR").ToString.ToDecimal > 0, TmpDT.MAX("RetISRPorcentaje").ToDecimal * 100, 0).ToString.FormatoNumero(4) '(If(SubTotal2 > 0, (RetencionISR / SubTotal2), 0) * 100).FormatoNumero(3)
|
LblRetISR.Text = If(dr("RetISR").ToString.ToDecimal > 0, TmpDT.MAX("RetISRPorcentaje").ToDecimal * 100, 0).ToString.FormatoNumero(4) '(If(SubTotal2 > 0, (RetencionISR / SubTotal2), 0) * 100).FormatoNumero(3)
|
||||||
If dr("TipoFactura").ToString <> "CFDi" Then LblTipoFact.Text = dr("TipoFactura").ToString : divTipoFactura.Visible = True
|
If dr("TipoFactura").ToString <> "CFDi" Then LblTipoFact.Text = dr("TipoFactura").ToString : divTipoFactura.Visible = True
|
||||||
ViewState("CveFactura") = dr("CveFactura").ToString.ToEntero
|
ViewState("CveFactura") = dr("CveFactura").ToString.ToEntero
|
||||||
|
CveCompraFactura = dr("CveFactura").ToString.ToEntero
|
||||||
ViewState("IdPoliza") = dr("IdPoliza").ToString.ToEntero
|
ViewState("IdPoliza") = dr("IdPoliza").ToString.ToEntero
|
||||||
|
|
||||||
DdlMoneda.SelectedValue = dr("CveMoneda").ToString
|
DdlMoneda.SelectedValue = dr("CveMoneda").ToString
|
||||||
@@ -17381,9 +17397,11 @@ Partial Class Compras_Compras
|
|||||||
If TxtIEPS.Text.ToDouble > 0 Then TrIEPS.Visible = True
|
If TxtIEPS.Text.ToDouble > 0 Then TrIEPS.Visible = True
|
||||||
End If
|
End If
|
||||||
If TxtDescuento.Text.ToDouble > 0 Then TrDescuento.Visible = True
|
If TxtDescuento.Text.ToDouble > 0 Then TrDescuento.Visible = True
|
||||||
'If ActualizaTotales And UsuarioActual.CveEmpresa = 72 Then
|
|
||||||
TxtTotal.Text = Total.ToString.FormatoNumero()
|
If ActualizaTotales And UsuarioActual.CveEmpresa = 72 Or Not CveCompraFactura > 0 Then
|
||||||
'End If
|
TxtTotal.Text = Total.ToString.FormatoNumero()
|
||||||
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
TxtSubTotal.Text = SubTotal.ToString.FormatoNumero()
|
TxtSubTotal.Text = SubTotal.ToString.FormatoNumero()
|
||||||
TxtSubTotal2.Text = SubTotal2.ToString.FormatoNumero()
|
TxtSubTotal2.Text = SubTotal2.ToString.FormatoNumero()
|
||||||
|
|||||||
@@ -39669,8 +39669,25 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Dim OrdenCompra As String = "-1"
|
||||||
|
|
||||||
|
If UsuarioActual.CveEmpresa = 119 Then
|
||||||
|
Dim arrayStr As String() = DdlLineaAdicional.SelectedItem.Text.Split(":"c)
|
||||||
|
If arrayStr.Length > 0 Then
|
||||||
|
Dim OrdenCompraTmp As String = arrayStr(0).Replace("IMP", "").Trim
|
||||||
|
If TxtOrdenCompra.Text.Trim.Length > 0 Then
|
||||||
|
If OrdenCompraTmp.ToUpper <> TxtOrdenCompra.Text.Trim.ToUpper Then
|
||||||
|
OrdenCompra = $"{TxtOrdenCompra.Text}, {OrdenCompraTmp}"
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
OrdenCompra = $"{OrdenCompraTmp}"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
Using ObjVentas As New ClsVentas
|
Using ObjVentas As New ClsVentas
|
||||||
If ObjVentas.UpdateVentaLineaAdicional(DdlLineaAdicional.SelectedValue.ToEntero(), CveVenta, "", 1, UsuarioActual.CveEmpresa) Then
|
If ObjVentas.UpdateVentaLineaAdicional(DdlLineaAdicional.SelectedValue.ToEntero(), CveVenta, "", 1, UsuarioActual.CveEmpresa, OrdenCompra:=OrdenCompra) Then
|
||||||
Alert("Se actualizó la linea adicional de crédito de la venta")
|
Alert("Se actualizó la linea adicional de crédito de la venta")
|
||||||
End If
|
End If
|
||||||
End Using
|
End Using
|
||||||
|
|||||||
Reference in New Issue
Block a user