Merge branch 'master' of http://192.168.10.111:8383/SIG
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)
|
||||||
|
|
||||||
|
|||||||
@@ -826,27 +826,13 @@ Public Class ClsVentas
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function UpdateVentaAnticipoAutorizado(CveVenta As Integer, Autorizado As Boolean) As Boolean
|
Public Function UpdateAnticipoAutorizado(CveVenta As Integer, CveIE As Integer, Tipo As String, Autorizado As Boolean) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Vta_VentaAnticipoAutorizadoUpdate")
|
DataAdapter("PA_Vta_AnticipoAutorizadoUpdate")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||||
.Add("@Autorizado", SqlDbType.Bit).Value = Autorizado
|
|
||||||
End With
|
|
||||||
Try
|
|
||||||
SqlAdapter.Fill(Data)
|
|
||||||
Retorno = True
|
|
||||||
Catch ex As Exception
|
|
||||||
OnError("Ocurrió un error al actualizar el estatus del anticipo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
|
||||||
End Try
|
|
||||||
Return Retorno
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Public Function UpdateIxCAnticipoAutorizado(CveIE As Integer, Autorizado As Boolean) As Boolean
|
|
||||||
Dim Retorno As Boolean = False
|
|
||||||
DataAdapter("PA_Vta_IxCAnticipoAutorizadoUpdate")
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
|
||||||
.Add("@CveIE", SqlDbType.Int).Value = CveIE
|
.Add("@CveIE", SqlDbType.Int).Value = CveIE
|
||||||
|
.Add("@Tipo", SqlDbType.VarChar).Value = Tipo
|
||||||
.Add("@Autorizado", SqlDbType.Bit).Value = Autorizado
|
.Add("@Autorizado", SqlDbType.Bit).Value = Autorizado
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
@@ -6349,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")
|
||||||
@@ -6359,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)
|
||||||
|
|||||||
6
App_WebReferences/GrowerService/service.disco
Normal file
6
App_WebReferences/GrowerService/service.disco
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<discovery xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.xmlsoap.org/disco/">
|
||||||
|
<contractRef ref="http://webservices.optimaproduce.net/GrowerService/service.asmx?wsdl" docRef="http://webservices.optimaproduce.net/GrowerService/service.asmx" xmlns="http://schemas.xmlsoap.org/disco/scl/" />
|
||||||
|
<soap address="http://webservices.optimaproduce.net/GrowerService/service.asmx" xmlns:q1="http://tempuri.org/" binding="q1:ServiceSoap" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
|
||||||
|
<soap address="http://webservices.optimaproduce.net/GrowerService/service.asmx" xmlns:q2="http://tempuri.org/" binding="q2:ServiceSoap12" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
|
||||||
|
</discovery>
|
||||||
7
App_WebReferences/GrowerService/service.discomap
Normal file
7
App_WebReferences/GrowerService/service.discomap
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<DiscoveryClientResultsFile xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<Results>
|
||||||
|
<DiscoveryClientResult referenceType="System.Web.Services.Discovery.ContractReference" url="http://webservices.optimaproduce.net/GrowerService/service.asmx?wsdl" filename="service.wsdl" />
|
||||||
|
<DiscoveryClientResult referenceType="System.Web.Services.Discovery.DiscoveryDocumentReference" url="http://webservices.optimaproduce.net/GrowerService/service.asmx?disco" filename="service.disco" />
|
||||||
|
</Results>
|
||||||
|
</DiscoveryClientResultsFile>
|
||||||
350
App_WebReferences/GrowerService/service.wsdl
Normal file
350
App_WebReferences/GrowerService/service.wsdl
Normal file
@@ -0,0 +1,350 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<wsdl:definitions xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:tns="http://tempuri.org/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
|
||||||
|
<wsdl:types>
|
||||||
|
<s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
|
||||||
|
<s:element name="GetSales">
|
||||||
|
<s:complexType>
|
||||||
|
<s:sequence>
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="OptimaCompanyID" type="s:int" />
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="companyID" type="s:int" />
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="yearID" type="s:int" />
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="batchID" type="s:int" />
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="packerID" type="s:int" />
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="growerID" type="s:int" />
|
||||||
|
</s:sequence>
|
||||||
|
</s:complexType>
|
||||||
|
</s:element>
|
||||||
|
<s:element name="GetSalesResponse">
|
||||||
|
<s:complexType>
|
||||||
|
<s:sequence>
|
||||||
|
<s:element minOccurs="0" maxOccurs="1" name="GetSalesResult">
|
||||||
|
<s:complexType>
|
||||||
|
<s:sequence>
|
||||||
|
<s:any minOccurs="0" maxOccurs="unbounded" namespace="http://www.w3.org/2001/XMLSchema" processContents="lax" />
|
||||||
|
<s:any minOccurs="1" namespace="urn:schemas-microsoft-com:xml-diffgram-v1" processContents="lax" />
|
||||||
|
</s:sequence>
|
||||||
|
</s:complexType>
|
||||||
|
</s:element>
|
||||||
|
</s:sequence>
|
||||||
|
</s:complexType>
|
||||||
|
</s:element>
|
||||||
|
<s:element name="GetAdjustements">
|
||||||
|
<s:complexType>
|
||||||
|
<s:sequence>
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="OptimaCompanyID" type="s:int" />
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="companyID" type="s:int" />
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="packerID" type="s:int" />
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="growerID" type="s:int" />
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="batchID" type="s:int" />
|
||||||
|
</s:sequence>
|
||||||
|
</s:complexType>
|
||||||
|
</s:element>
|
||||||
|
<s:element name="GetAdjustementsResponse">
|
||||||
|
<s:complexType>
|
||||||
|
<s:sequence>
|
||||||
|
<s:element minOccurs="0" maxOccurs="1" name="GetAdjustementsResult">
|
||||||
|
<s:complexType>
|
||||||
|
<s:sequence>
|
||||||
|
<s:any minOccurs="0" maxOccurs="unbounded" namespace="http://www.w3.org/2001/XMLSchema" processContents="lax" />
|
||||||
|
<s:any minOccurs="1" namespace="urn:schemas-microsoft-com:xml-diffgram-v1" processContents="lax" />
|
||||||
|
</s:sequence>
|
||||||
|
</s:complexType>
|
||||||
|
</s:element>
|
||||||
|
</s:sequence>
|
||||||
|
</s:complexType>
|
||||||
|
</s:element>
|
||||||
|
<s:element name="GetInventoryActivity">
|
||||||
|
<s:complexType>
|
||||||
|
<s:sequence>
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="OptimaCompanyID" type="s:int" />
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="companyID" type="s:int" />
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="LdDate" type="s:dateTime" />
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="packerID" type="s:int" />
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="growerID" type="s:int" />
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="LabelID" type="s:int" />
|
||||||
|
<s:element minOccurs="0" maxOccurs="1" name="Language" type="s:string" />
|
||||||
|
</s:sequence>
|
||||||
|
</s:complexType>
|
||||||
|
</s:element>
|
||||||
|
<s:element name="GetInventoryActivityResponse">
|
||||||
|
<s:complexType>
|
||||||
|
<s:sequence>
|
||||||
|
<s:element minOccurs="0" maxOccurs="1" name="GetInventoryActivityResult">
|
||||||
|
<s:complexType>
|
||||||
|
<s:sequence>
|
||||||
|
<s:any minOccurs="0" maxOccurs="unbounded" namespace="http://www.w3.org/2001/XMLSchema" processContents="lax" />
|
||||||
|
<s:any minOccurs="1" namespace="urn:schemas-microsoft-com:xml-diffgram-v1" processContents="lax" />
|
||||||
|
</s:sequence>
|
||||||
|
</s:complexType>
|
||||||
|
</s:element>
|
||||||
|
</s:sequence>
|
||||||
|
</s:complexType>
|
||||||
|
</s:element>
|
||||||
|
<s:element name="GetTodayInvoices">
|
||||||
|
<s:complexType>
|
||||||
|
<s:sequence>
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="OptimaCompanyID" type="s:int" />
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="companyID" type="s:int" />
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="yearID" type="s:int" />
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="packerID" type="s:int" />
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="growerID" type="s:int" />
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="InvoiceDate" type="s:dateTime" />
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="ContractFilter" type="s:int" />
|
||||||
|
</s:sequence>
|
||||||
|
</s:complexType>
|
||||||
|
</s:element>
|
||||||
|
<s:element name="GetTodayInvoicesResponse">
|
||||||
|
<s:complexType>
|
||||||
|
<s:sequence>
|
||||||
|
<s:element minOccurs="0" maxOccurs="1" name="GetTodayInvoicesResult">
|
||||||
|
<s:complexType>
|
||||||
|
<s:sequence>
|
||||||
|
<s:any minOccurs="0" maxOccurs="unbounded" namespace="http://www.w3.org/2001/XMLSchema" processContents="lax" />
|
||||||
|
<s:any minOccurs="1" namespace="urn:schemas-microsoft-com:xml-diffgram-v1" processContents="lax" />
|
||||||
|
</s:sequence>
|
||||||
|
</s:complexType>
|
||||||
|
</s:element>
|
||||||
|
</s:sequence>
|
||||||
|
</s:complexType>
|
||||||
|
</s:element>
|
||||||
|
<s:element name="GetGeneralExpenses">
|
||||||
|
<s:complexType>
|
||||||
|
<s:sequence>
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="OptimaCompanyID" type="s:int" />
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="companyID" type="s:int" />
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="yearID" type="s:int" />
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="packerID" type="s:int" />
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="growerID" type="s:int" />
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="batchID" type="s:int" />
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="expenseID" type="s:int" />
|
||||||
|
</s:sequence>
|
||||||
|
</s:complexType>
|
||||||
|
</s:element>
|
||||||
|
<s:element name="GetGeneralExpensesResponse">
|
||||||
|
<s:complexType>
|
||||||
|
<s:sequence>
|
||||||
|
<s:element minOccurs="0" maxOccurs="1" name="GetGeneralExpensesResult">
|
||||||
|
<s:complexType>
|
||||||
|
<s:sequence>
|
||||||
|
<s:any minOccurs="0" maxOccurs="unbounded" namespace="http://www.w3.org/2001/XMLSchema" processContents="lax" />
|
||||||
|
<s:any minOccurs="1" namespace="urn:schemas-microsoft-com:xml-diffgram-v1" processContents="lax" />
|
||||||
|
</s:sequence>
|
||||||
|
</s:complexType>
|
||||||
|
</s:element>
|
||||||
|
</s:sequence>
|
||||||
|
</s:complexType>
|
||||||
|
</s:element>
|
||||||
|
<s:element name="GetLotExpenses">
|
||||||
|
<s:complexType>
|
||||||
|
<s:sequence>
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="OptimaCompanyID" type="s:int" />
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="companyID" type="s:int" />
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="yearID" type="s:int" />
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="packerID" type="s:int" />
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="growerID" type="s:int" />
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="batchID" type="s:int" />
|
||||||
|
<s:element minOccurs="1" maxOccurs="1" name="expenseID" type="s:int" />
|
||||||
|
</s:sequence>
|
||||||
|
</s:complexType>
|
||||||
|
</s:element>
|
||||||
|
<s:element name="GetLotExpensesResponse">
|
||||||
|
<s:complexType>
|
||||||
|
<s:sequence>
|
||||||
|
<s:element minOccurs="0" maxOccurs="1" name="GetLotExpensesResult">
|
||||||
|
<s:complexType>
|
||||||
|
<s:sequence>
|
||||||
|
<s:any minOccurs="0" maxOccurs="unbounded" namespace="http://www.w3.org/2001/XMLSchema" processContents="lax" />
|
||||||
|
<s:any minOccurs="1" namespace="urn:schemas-microsoft-com:xml-diffgram-v1" processContents="lax" />
|
||||||
|
</s:sequence>
|
||||||
|
</s:complexType>
|
||||||
|
</s:element>
|
||||||
|
</s:sequence>
|
||||||
|
</s:complexType>
|
||||||
|
</s:element>
|
||||||
|
</s:schema>
|
||||||
|
</wsdl:types>
|
||||||
|
<wsdl:message name="GetSalesSoapIn">
|
||||||
|
<wsdl:part name="parameters" element="tns:GetSales" />
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="GetSalesSoapOut">
|
||||||
|
<wsdl:part name="parameters" element="tns:GetSalesResponse" />
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="GetAdjustementsSoapIn">
|
||||||
|
<wsdl:part name="parameters" element="tns:GetAdjustements" />
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="GetAdjustementsSoapOut">
|
||||||
|
<wsdl:part name="parameters" element="tns:GetAdjustementsResponse" />
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="GetInventoryActivitySoapIn">
|
||||||
|
<wsdl:part name="parameters" element="tns:GetInventoryActivity" />
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="GetInventoryActivitySoapOut">
|
||||||
|
<wsdl:part name="parameters" element="tns:GetInventoryActivityResponse" />
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="GetTodayInvoicesSoapIn">
|
||||||
|
<wsdl:part name="parameters" element="tns:GetTodayInvoices" />
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="GetTodayInvoicesSoapOut">
|
||||||
|
<wsdl:part name="parameters" element="tns:GetTodayInvoicesResponse" />
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="GetGeneralExpensesSoapIn">
|
||||||
|
<wsdl:part name="parameters" element="tns:GetGeneralExpenses" />
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="GetGeneralExpensesSoapOut">
|
||||||
|
<wsdl:part name="parameters" element="tns:GetGeneralExpensesResponse" />
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="GetLotExpensesSoapIn">
|
||||||
|
<wsdl:part name="parameters" element="tns:GetLotExpenses" />
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="GetLotExpensesSoapOut">
|
||||||
|
<wsdl:part name="parameters" element="tns:GetLotExpensesResponse" />
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:portType name="ServiceSoap">
|
||||||
|
<wsdl:operation name="GetSales">
|
||||||
|
<wsdl:input message="tns:GetSalesSoapIn" />
|
||||||
|
<wsdl:output message="tns:GetSalesSoapOut" />
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="GetAdjustements">
|
||||||
|
<wsdl:input message="tns:GetAdjustementsSoapIn" />
|
||||||
|
<wsdl:output message="tns:GetAdjustementsSoapOut" />
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="GetInventoryActivity">
|
||||||
|
<wsdl:input message="tns:GetInventoryActivitySoapIn" />
|
||||||
|
<wsdl:output message="tns:GetInventoryActivitySoapOut" />
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="GetTodayInvoices">
|
||||||
|
<wsdl:input message="tns:GetTodayInvoicesSoapIn" />
|
||||||
|
<wsdl:output message="tns:GetTodayInvoicesSoapOut" />
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="GetGeneralExpenses">
|
||||||
|
<wsdl:input message="tns:GetGeneralExpensesSoapIn" />
|
||||||
|
<wsdl:output message="tns:GetGeneralExpensesSoapOut" />
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="GetLotExpenses">
|
||||||
|
<wsdl:input message="tns:GetLotExpensesSoapIn" />
|
||||||
|
<wsdl:output message="tns:GetLotExpensesSoapOut" />
|
||||||
|
</wsdl:operation>
|
||||||
|
</wsdl:portType>
|
||||||
|
<wsdl:binding name="ServiceSoap" type="tns:ServiceSoap">
|
||||||
|
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
|
||||||
|
<wsdl:operation name="GetSales">
|
||||||
|
<soap:operation soapAction="http://tempuri.org/GetSales" style="document" />
|
||||||
|
<wsdl:input>
|
||||||
|
<soap:body use="literal" />
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<soap:body use="literal" />
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="GetAdjustements">
|
||||||
|
<soap:operation soapAction="http://tempuri.org/GetAdjustements" style="document" />
|
||||||
|
<wsdl:input>
|
||||||
|
<soap:body use="literal" />
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<soap:body use="literal" />
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="GetInventoryActivity">
|
||||||
|
<soap:operation soapAction="http://tempuri.org/GetInventoryActivity" style="document" />
|
||||||
|
<wsdl:input>
|
||||||
|
<soap:body use="literal" />
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<soap:body use="literal" />
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="GetTodayInvoices">
|
||||||
|
<soap:operation soapAction="http://tempuri.org/GetTodayInvoices" style="document" />
|
||||||
|
<wsdl:input>
|
||||||
|
<soap:body use="literal" />
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<soap:body use="literal" />
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="GetGeneralExpenses">
|
||||||
|
<soap:operation soapAction="http://tempuri.org/GetGeneralExpenses" style="document" />
|
||||||
|
<wsdl:input>
|
||||||
|
<soap:body use="literal" />
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<soap:body use="literal" />
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="GetLotExpenses">
|
||||||
|
<soap:operation soapAction="http://tempuri.org/GetLotExpenses" style="document" />
|
||||||
|
<wsdl:input>
|
||||||
|
<soap:body use="literal" />
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<soap:body use="literal" />
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
</wsdl:binding>
|
||||||
|
<wsdl:binding name="ServiceSoap12" type="tns:ServiceSoap">
|
||||||
|
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
|
||||||
|
<wsdl:operation name="GetSales">
|
||||||
|
<soap12:operation soapAction="http://tempuri.org/GetSales" style="document" />
|
||||||
|
<wsdl:input>
|
||||||
|
<soap12:body use="literal" />
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<soap12:body use="literal" />
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="GetAdjustements">
|
||||||
|
<soap12:operation soapAction="http://tempuri.org/GetAdjustements" style="document" />
|
||||||
|
<wsdl:input>
|
||||||
|
<soap12:body use="literal" />
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<soap12:body use="literal" />
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="GetInventoryActivity">
|
||||||
|
<soap12:operation soapAction="http://tempuri.org/GetInventoryActivity" style="document" />
|
||||||
|
<wsdl:input>
|
||||||
|
<soap12:body use="literal" />
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<soap12:body use="literal" />
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="GetTodayInvoices">
|
||||||
|
<soap12:operation soapAction="http://tempuri.org/GetTodayInvoices" style="document" />
|
||||||
|
<wsdl:input>
|
||||||
|
<soap12:body use="literal" />
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<soap12:body use="literal" />
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="GetGeneralExpenses">
|
||||||
|
<soap12:operation soapAction="http://tempuri.org/GetGeneralExpenses" style="document" />
|
||||||
|
<wsdl:input>
|
||||||
|
<soap12:body use="literal" />
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<soap12:body use="literal" />
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="GetLotExpenses">
|
||||||
|
<soap12:operation soapAction="http://tempuri.org/GetLotExpenses" style="document" />
|
||||||
|
<wsdl:input>
|
||||||
|
<soap12:body use="literal" />
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<soap12:body use="literal" />
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
</wsdl:binding>
|
||||||
|
<wsdl:service name="Service">
|
||||||
|
<wsdl:port name="ServiceSoap" binding="tns:ServiceSoap">
|
||||||
|
<soap:address location="http://webservices.optimaproduce.net/GrowerService/service.asmx" />
|
||||||
|
</wsdl:port>
|
||||||
|
<wsdl:port name="ServiceSoap12" binding="tns:ServiceSoap12">
|
||||||
|
<soap12:address location="http://webservices.optimaproduce.net/GrowerService/service.asmx" />
|
||||||
|
</wsdl:port>
|
||||||
|
</wsdl:service>
|
||||||
|
</wsdl:definitions>
|
||||||
169
Ashx/E158.ashx
Normal file
169
Ashx/E158.ashx
Normal file
@@ -0,0 +1,169 @@
|
|||||||
|
<%@ WebHandler Language="VB" Class="E158" %>
|
||||||
|
|
||||||
|
Imports System
|
||||||
|
Imports System.Web
|
||||||
|
Imports System.Data
|
||||||
|
Imports Newtonsoft.Json
|
||||||
|
Imports Newtonsoft.Json.Linq
|
||||||
|
Imports Extensiones
|
||||||
|
Imports System.IO
|
||||||
|
Imports CrystalDecisions.CrystalReports.Engine
|
||||||
|
Imports CrystalDecisions.Shared
|
||||||
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
Imports System.Threading
|
||||||
|
Imports System.Threading.Tasks
|
||||||
|
Imports System.Net.Http
|
||||||
|
Imports System.Net.Http.Headers
|
||||||
|
Imports SharpCompress.Archive.Rar
|
||||||
|
Imports SharpCompress.Common
|
||||||
|
Imports SharpCompress.Reader
|
||||||
|
Imports System.Xml
|
||||||
|
'Imports ADSistemaLibrary.SatXml
|
||||||
|
'Imports ADSistemaLibrary.SatXml.XmlSatCFDI
|
||||||
|
Imports System.Diagnostics
|
||||||
|
Imports System.Drawing
|
||||||
|
Imports System.Drawing.Imaging
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Public Class E158 : Implements IHttpHandler, IReadOnlySessionState
|
||||||
|
|
||||||
|
|
||||||
|
Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
|
||||||
|
Get
|
||||||
|
Return False
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private currentcontext As HttpContext
|
||||||
|
Private URLParametros As New Hashtable
|
||||||
|
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
|
||||||
|
context.Response.ContentType = "text/plain"
|
||||||
|
currentcontext = context
|
||||||
|
Dim retorno As String = "no se encontro la variable"
|
||||||
|
Try
|
||||||
|
Dim metodo As String = ""
|
||||||
|
Dim FechaActual As DateTime = ClsPaginas.NowADS()
|
||||||
|
Dim FechaEnvio As DateTime = FechaActual
|
||||||
|
|
||||||
|
If context.Request("var") IsNot Nothing Then
|
||||||
|
URLParametros = Parametros(context.Request("var"))
|
||||||
|
metodo = URLParametros("metodo").ToString
|
||||||
|
'SI TRAE UN JSON COMO PARAMETRO
|
||||||
|
ElseIf context.Request("metodo") IsNot Nothing Then
|
||||||
|
metodo = context.Request("metodo").ToString()
|
||||||
|
If context.Request("FechaEnvio") IsNot Nothing Then
|
||||||
|
FechaEnvio = context.Request("FechaEnvio").ToString().ToDateTime()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Select Case metodo
|
||||||
|
Case "PreciosVentaCultivo"
|
||||||
|
Dim tCveEmpresa As Integer = context.Request("CveEmpresa").ToString.ToEntero
|
||||||
|
If PreciosVentaCultivo(tCveEmpresa, context) Then
|
||||||
|
retorno = "OK"
|
||||||
|
Else
|
||||||
|
retorno = "Error"
|
||||||
|
End If
|
||||||
|
|
||||||
|
context.Response.Write(retorno)
|
||||||
|
End Select
|
||||||
|
Catch ex As Exception
|
||||||
|
ex.GuardaLog(ex.ToString())
|
||||||
|
context.Response.Write(retorno)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function PreciosVentaCultivo(ByVal CveEmpresa As Integer, ByVal context As HttpContext) As Boolean
|
||||||
|
Dim Respuesta As Boolean = False
|
||||||
|
Dim Usuario As Usuario = ValidaUsuarioSistema(100, CveEmpresa)
|
||||||
|
|
||||||
|
' Crear una instancia del servicio web
|
||||||
|
Dim wsservice As New GrowerService.Service()
|
||||||
|
wsservice.Url = "http://webservices.optimaproduce.net/GrowerService/service.asmx"
|
||||||
|
|
||||||
|
' Llamar al método GetSales con los parámetros necesarios
|
||||||
|
|
||||||
|
Dim Parametro1 As Integer = 9
|
||||||
|
Dim Parametro2 As Integer = 1
|
||||||
|
Dim Parametro3 As Integer = 43
|
||||||
|
Dim Parametro4 As Integer = 0 '–batchid de una liquidación – 0 Todos
|
||||||
|
Dim Parametro5 As Integer = 3 '– Para agropecuaria Jam
|
||||||
|
Dim Parametro6 As Integer = 0
|
||||||
|
Dim Parametro6Date As Date = Now.AddDays(-3)
|
||||||
|
|
||||||
|
'Dim DTresp As DataTable = wsservice.GetSales(Parametro1, Parametro2, Parametro3, Parametro4, Parametro5, Parametro6)
|
||||||
|
'DTresp.WriteXml("C:\temp\GrowerService\Sales.xml", XmlWriteMode.WriteSchema)
|
||||||
|
|
||||||
|
'Dim DTAdjustements As DataTable = wsservice.GetAdjustements(Parametro1, Parametro2, Parametro4, Parametro5, Parametro6)
|
||||||
|
'DTAdjustements.WriteXml("C:\temp\GrowerService\Adjustements.xml", XmlWriteMode.WriteSchema)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'Dim DTGeneralExpenses As DataTable = wsservice.GetGeneralExpenses(Parametro1, Parametro2, Parametro3, Parametro4, Parametro5, Parametro6, expenseID:=)
|
||||||
|
'DTGeneralExpenses.WriteXml("C:\temp\GrowerService\GeneralExpenses.xml", XmlWriteMode.WriteSchema)
|
||||||
|
|
||||||
|
'Dim DTLotexpenses As DataTable = wsservice.GetLotExpenses(Parametro1, Parametro2, Parametro3, Parametro4, Parametro5, Parametro6, expenseID:=)
|
||||||
|
'DTLotexpenses.WriteXml("C:\temp\GrowerService\Lotexpenses.xml", XmlWriteMode.WriteSchema)
|
||||||
|
|
||||||
|
Dim DTTodayInvoices As DataTable = wsservice.GetTodayInvoices(Parametro1, Parametro2, Parametro3, Parametro4, Parametro5, Parametro6Date, ContractFilter:=1)
|
||||||
|
DTTodayInvoices.WriteXml("C:\temp\GrowerService\TodayInvoices.xml", XmlWriteMode.WriteSchema)
|
||||||
|
|
||||||
|
Dim InvParametro1 As Integer = 9
|
||||||
|
Dim InvParametro2 As Integer = 1
|
||||||
|
Dim InvParametro3 As Date = Now.AddDays(-3) ' “01/01/2025” '- ldDate
|
||||||
|
Dim InvParametro4 As Integer = 3 '- PackerID
|
||||||
|
Dim InvParametro5 As Integer = 0 ' - GrowerID
|
||||||
|
Dim InvParametro6 As Integer = 0 '- LabelID(0 = Todos)
|
||||||
|
Dim InvParametro7 As String = ”E” '- Language
|
||||||
|
|
||||||
|
'Dim DTIntentoryActivity As DataTable = wsservice.GetInventoryActivity(InvParametro1, InvParametro2, InvParametro3, InvParametro4, InvParametro5, InvParametro6, InvParametro7)
|
||||||
|
'DTIntentoryActivity.WriteXml("C:\temp\GrowerService\IntentoryActivity.xml", XmlWriteMode.WriteSchema)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Return Respuesta
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
Private Function ValidaUsuarioSistema(CveUsuario As Integer, CveEmpresa As Integer) As Usuario
|
||||||
|
Dim UsuarioActual As Usuario = Nothing
|
||||||
|
Dim NombreCadena As String = ClsPaginas.GlobalNombreCadenaConexion(CveEmpresa)
|
||||||
|
Dim ObjUsuarios As New ClsSisUsuarioAutenticacion(NombreCadena:=NombreCadena)
|
||||||
|
UsuarioActual = ObjUsuarios.GetUsuarioDetalle(CveUsuario, CveEmpresa)
|
||||||
|
If UsuarioActual IsNot Nothing Then
|
||||||
|
HttpContext.Current.Session("UsuarioSIG") = UsuarioActual
|
||||||
|
'CreaObjetoEmpresa(UsuarioActual)
|
||||||
|
End If
|
||||||
|
ObjUsuarios.Dispose()
|
||||||
|
|
||||||
|
Return UsuarioActual
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function Parametros(Cadena As String) As Hashtable
|
||||||
|
Cadena = Decripta(Cadena)
|
||||||
|
Dim P1() As String = Cadena.Split("&"c)
|
||||||
|
Dim Tmp As String
|
||||||
|
Dim P2() As String
|
||||||
|
|
||||||
|
Dim URLParametros As New Hashtable
|
||||||
|
|
||||||
|
For Each Tmp In P1
|
||||||
|
P2 = Tmp.Replace("%26%", "&").Split("="c)
|
||||||
|
URLParametros.Add(P2(0).ToString(), P2(1))
|
||||||
|
Next
|
||||||
|
Return URLParametros
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -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,7 +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
|
||||||
|
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()
|
||||||
|
|||||||
@@ -1156,18 +1156,13 @@ Partial Class Ventas_PVCobranza
|
|||||||
|
|
||||||
If CveVenta > 0 OrElse CveIE > 0 Then
|
If CveVenta > 0 OrElse CveIE > 0 Then
|
||||||
Dim Actualizo As Boolean = False
|
Dim Actualizo As Boolean = False
|
||||||
If Tipo.Contiene("NC", "Ant") Then
|
|
||||||
If ObjVentas.UpdateVentaAnticipoAutorizado(CveVenta, False) Then
|
If ObjVentas.UpdateAnticipoAutorizado(CveVenta, CveIE, Tipo.Trim(), False) Then
|
||||||
Actualizo = True
|
Actualizo = True
|
||||||
End If
|
|
||||||
ElseIf Tipo.Contiene("IxC") Then
|
|
||||||
If ObjVentas.UpdateIxCAnticipoAutorizado(CveIE, False) Then
|
|
||||||
Actualizo = True
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Actualizo Then
|
If Actualizo Then
|
||||||
Retorno = ObjEventoBitacora.AddEventoBitacora($"El anticipo se desautorizó correctamente. Folio: <b>{Folio}</b>", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveIE, -1, CveCliente, -1, -1, -1, -1, -1, CveVenta:=CveVenta)
|
Retorno = ObjEventoBitacora.AddEventoBitacora($"El anticipo se aplicó correctamente. Folio: <b>{Folio}</b>", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveIE, -1, CveCliente, -1, -1, -1, -1, -1, CveVenta:=CveVenta)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -2279,7 +2274,7 @@ Partial Class Ventas_PVCobranza
|
|||||||
Dim CveIE As Integer = gvr.DataKey("CveIE").ToEntero()
|
Dim CveIE As Integer = gvr.DataKey("CveIE").ToEntero()
|
||||||
|
|
||||||
Dim ObjVta As New ClsVentas
|
Dim ObjVta As New ClsVentas
|
||||||
If ObjVta.AddAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, CveVendedor, Saldo, 0, UsuarioActual.CveUsuario, 1, TipoDocumento:="Ant", DiasVencidos:=1, CveVenta:=CveVenta, CveIE:=CveIE) Then
|
If ObjVta.AddAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, CveVendedor, Saldo, CveEstatus:=0, CveUsuario:=UsuarioActual.CveUsuario, TipoAutorizacion:=1, TipoDocumento:="Ant", DiasVencidos:=1, CveVenta:=CveVenta, CveIE:=CveIE) Then
|
||||||
Dim msgAlert = "La autorización se agregó correctamente."
|
Dim msgAlert = "La autorización se agregó correctamente."
|
||||||
If EnvioMsg Then
|
If EnvioMsg Then
|
||||||
msgAlert = $"{msgAlert} Se envió una notificación de autorización a los usuarios"
|
msgAlert = $"{msgAlert} Se envió una notificación de autorización a los usuarios"
|
||||||
@@ -2381,9 +2376,9 @@ Partial Class Ventas_PVCobranza
|
|||||||
|
|
||||||
Dim AnticipoAutorizado = CBool(e.Row.DBCampo("AnticipoAutorizado"))
|
Dim AnticipoAutorizado = CBool(e.Row.DBCampo("AnticipoAutorizado"))
|
||||||
|
|
||||||
If Not EsProduccion AndAlso UsuarioActual.CveRol = 1 Then
|
'If Not EsProduccion AndAlso UsuarioActual.CveRol = 1 Then
|
||||||
AnticipoAutorizado = True
|
' AnticipoAutorizado = True
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(185) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(185) = "1" Then
|
||||||
If e.Row.DBCampo("Tipo").ToString().Contiene("NC", "Ant", "IxC") AndAlso Not AnticipoAutorizado Then
|
If e.Row.DBCampo("Tipo").ToString().Contiene("NC", "Ant", "IxC") AndAlso Not AnticipoAutorizado Then
|
||||||
|
|||||||
@@ -10505,7 +10505,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub VerificaAutorizacionEgs(Optional VerificarImportes As Boolean = True)
|
Private Sub VerificaAutorizacionEgs(Optional VerificarImportes As Boolean = True, Optional MostrarAlertas As Boolean = True)
|
||||||
Dim ImporteAutorizacion As Decimal = 0
|
Dim ImporteAutorizacion As Decimal = 0
|
||||||
Dim TipoAutorizacion As Integer = 0
|
Dim TipoAutorizacion As Integer = 0
|
||||||
|
|
||||||
@@ -10535,7 +10535,10 @@ Partial Class Ventas
|
|||||||
CveAutorizacion = -1
|
CveAutorizacion = -1
|
||||||
|
|
||||||
If BloquearCredito Then
|
If BloquearCredito Then
|
||||||
Alert($"El importe autorizado es insuficiente. Importe autorizado:{ImporteAutorizacion:N2}", TipoMensaje.MsgAdvertencia)
|
If MostrarAlertas Then
|
||||||
|
Alert($"El importe autorizado es insuficiente. Importe autorizado:{ImporteAutorizacion:N2}", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -10543,7 +10546,10 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Else
|
Else
|
||||||
CveAutorizacion = -1
|
CveAutorizacion = -1
|
||||||
Alert($"No se encontro una autorización de crédito.", TipoMensaje.MsgAdvertencia)
|
If MostrarAlertas Then
|
||||||
|
Alert($"No se encontro una autorización de crédito.", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -31508,6 +31514,23 @@ Partial Class Ventas
|
|||||||
Private Sub AplicarNC(CvePS As Integer, Optional NCDescuento As Boolean = False, Optional EsNCAmortizacion As Boolean = False, Optional AplicaImpuestosLocales As Boolean = True, Optional AplicaNuevoDocumento As Boolean = False, Optional AplicoNCFacturaActual As Boolean = False, Optional TipoDoctoNC As String = "Egs")
|
Private Sub AplicarNC(CvePS As Integer, Optional NCDescuento As Boolean = False, Optional EsNCAmortizacion As Boolean = False, Optional AplicaImpuestosLocales As Boolean = True, Optional AplicaNuevoDocumento As Boolean = False, Optional AplicoNCFacturaActual As Boolean = False, Optional TipoDoctoNC As String = "Egs")
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
'VALIDACION DE AUTORIZACION PARA NC, POR AHORA SOLO BDH
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso AplicoNCFacturaActual AndAlso TipoDoctoNC = "Egs" Then
|
||||||
|
Dim PermiteAutorizacion = False
|
||||||
|
'SI NO ES GENERADA CON REMISIONES DE NC, UTILIZAR LA AUTORIZACION
|
||||||
|
If (ListaRemisionesNC Is Nothing OrElse ListaRemisionesNC.Count = 0) Then
|
||||||
|
PermiteAutorizacion = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If PermiteAutorizacion Then
|
||||||
|
VerificaAutorizacionEgs(VerificarImportes:=True, MostrarAlertas:=True)
|
||||||
|
If Me.CveAutorizacion <= 0 Then
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
Me.AplicaDocumentoNuevoNC = AplicaNuevoDocumento
|
Me.AplicaDocumentoNuevoNC = AplicaNuevoDocumento
|
||||||
Dim DrPS As DataRow = Nothing
|
Dim DrPS As DataRow = Nothing
|
||||||
|
|
||||||
@@ -39669,8 +39692,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
|
||||||
@@ -40565,10 +40605,13 @@ Partial Class Ventas
|
|||||||
RblRNCTipo_SelectedIndexChanged(RblRNCTipo, EventArgs.Empty)
|
RblRNCTipo_SelectedIndexChanged(RblRNCTipo, EventArgs.Empty)
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
VerificaAutorizacionEgs(VerificarImportes:=True)
|
|
||||||
If Me.CveAutorizacion <= 0 Then
|
TxtImportesRemisionesNC.Text = "0.00"
|
||||||
Exit Sub
|
TxtNCImporte.Text = "0.00"
|
||||||
Else
|
|
||||||
|
VerificaAutorizacionEgs(VerificarImportes:=True, MostrarAlertas:=False)
|
||||||
|
|
||||||
|
If Me.CveAutorizacion > 0 Then
|
||||||
Using ObjVentas As New ClsVentas
|
Using ObjVentas As New ClsVentas
|
||||||
If ObjVentas.GetAutorizacion(Me.CveAutorizacion, UsuarioActual.CveEmpresa) Then
|
If ObjVentas.GetAutorizacion(Me.CveAutorizacion, UsuarioActual.CveEmpresa) Then
|
||||||
If ObjVentas.DtResultados.FiltroPrimeroValor("CveTipoVenta").ToEntero() > 0 Then
|
If ObjVentas.DtResultados.FiltroPrimeroValor("CveTipoVenta").ToEntero() > 0 Then
|
||||||
@@ -40578,7 +40621,12 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Using
|
End Using
|
||||||
|
Else
|
||||||
|
DivTipoVentaAsingado.Visible = True
|
||||||
|
LblTipoVentaAsignado.Text = "Sin definir"
|
||||||
|
DdlNCPS.Enabled = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
RegistraScript("$('#ModalAplicarNC').modal('show');", "ModalNC")
|
RegistraScript("$('#ModalAplicarNC').modal('show');", "ModalNC")
|
||||||
|
|||||||
Reference in New Issue
Block a user