-- merge Ventas
This commit is contained in:
@@ -4,7 +4,6 @@ Option Explicit On
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports Extensiones
|
||||
Imports Profact.TimbraCFDI40
|
||||
|
||||
Public Class ClsContratos
|
||||
Implements IDisposable
|
||||
@@ -323,7 +322,7 @@ Public Class ClsContratos
|
||||
Optional TipoGarantia As Integer = -1, Optional Folio As Integer = -1, Optional FechaVenc As Date = Nothing, Optional EstatusFianza As Integer = -1, Optional CvePeriodo As Integer = -1, Optional CveContratoPlantilla As Integer = -1, Optional CveCuentaEquipo As Integer = -1,
|
||||
Optional CveVendedor As Integer = -1, Optional Observaciones As String = "", Optional CveDireccionEnvio As Integer = -1, Optional AplicaImpuestosLocales As Boolean = False, Optional CorreoNotificacionPedDev As String = "",
|
||||
Optional FacturacionCicilica As Boolean = False, Optional FacturacionCiclicaAutomatico As Boolean = False, Optional DiaMesFacturacion As Integer = 1, Optional ObservacionesGenerales As String = "",
|
||||
Optional CveTipoAF As Integer = -1, Optional CveChofer As Integer = -1, Optional CveAF As Integer = -1) As Integer
|
||||
Optional CveTipoAF As Integer = -1, Optional CveChofer As Integer = -1, Optional CveAF As Integer = -1, Optional CantidadPasajeros As Integer = -1) As Integer
|
||||
|
||||
Dim Retorno As Integer = -1
|
||||
DataAdapter("PA_Con_ContratosAdd")
|
||||
@@ -382,6 +381,7 @@ Public Class ClsContratos
|
||||
.Add("@CveTipoAF", SqlDbType.Int).Value = CveTipoAF
|
||||
.Add("@CveChofer", SqlDbType.Int).Value = CveChofer
|
||||
.Add("@CveAF", SqlDbType.Int).Value = CveAF
|
||||
.Add("@CantidadPasajeros", SqlDbType.Int).Value = CantidadPasajeros
|
||||
|
||||
End With
|
||||
|
||||
|
||||
@@ -497,7 +497,7 @@ Public Class ClsOS
|
||||
|
||||
|
||||
Public Function GetRepOrdenesServicioMedicasRep(FechaI As Date, FechaF As Date, CveCliente As Integer, CveVendedor As Integer, CveEstatusOrdenServicio As Integer, CveUsuarioAtendio As Integer, CveSubProyecto As Integer, CveEmpresa As Integer,
|
||||
Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1) As Boolean
|
||||
Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveEspecialidad As Integer = -1, Optional CveClienteSucursal As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_OS_OrdenesServiciosMedicasRepGet")
|
||||
@@ -514,6 +514,8 @@ Public Class ClsOS
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveMedico", SqlDbType.Int).Value = CveMedico
|
||||
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
|
||||
.Add("@CveEspecialidad", SqlDbType.Int).Value = CveEspecialidad
|
||||
.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal
|
||||
|
||||
End With
|
||||
|
||||
|
||||
@@ -10812,6 +10812,7 @@ Public Class ClsPaginas
|
||||
|
||||
#Region "Transportes"
|
||||
PaginaDict.Add("/Transportes/RepContratos.aspx".ToUpper(), 598)
|
||||
PaginaDict.Add("/Transportes/RepContratosDetalles.aspx".ToUpper(), 598)
|
||||
PaginaDict.Add("/Transportes/RepViajes.aspx".ToUpper(), 599)
|
||||
PaginaDict.Add("/Transportes/Boletos.aspx".ToUpper(), 600)
|
||||
PaginaDict.Add("/Transportes/RepBoletos.aspx".ToUpper(), 601)
|
||||
|
||||
@@ -457,8 +457,6 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
For Each dr As DataRow In ObjContratos.DtResultados.Rows
|
||||
Dim cevent As CalendarEvent = New CalendarEvent()
|
||||
|
||||
Dim estatus As Integer = dr("EstatusContrato").ToString.ToEntero
|
||||
|
||||
cevent.id = dr("CveContrato").ToString.ToEntero
|
||||
cevent.title = dr("DescripcionContrato").ToString
|
||||
cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime)
|
||||
@@ -471,15 +469,8 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
cevent.Pesos = dr("ImporteMax").ToString.ToDecimal
|
||||
cevent.Anticipo = dr("ImporteMin").ToString.ToDecimal
|
||||
cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero
|
||||
cevent.backgroundColor = dr("BackgroundColor").ToString
|
||||
|
||||
Select Case estatus
|
||||
Case 1
|
||||
cevent.backgroundColor = "#00A56A"
|
||||
Case 2
|
||||
cevent.backgroundColor = "#2B4FD6"
|
||||
Case 3
|
||||
cevent.backgroundColor = "#EE602E"
|
||||
End Select
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -368,7 +368,6 @@ Public Class E119 : Implements IHttpHandler
|
||||
Return JsonConvert.SerializeObject(RespuestaError)
|
||||
End If
|
||||
|
||||
|
||||
If Not TieneError Then
|
||||
Dim Usuario As Usuario = ValidaUsuarioSistema(100, CveEmpresa)
|
||||
Dim ObjFactura As Modelos.Factura = Nothing
|
||||
@@ -399,7 +398,7 @@ Public Class E119 : Implements IHttpHandler
|
||||
If objVenta.GetVentaTerminal(IdEcommerce, MinFecha, CveSubProyecto, CveEmpresa) Then
|
||||
Dim dr As DataRow = objVenta.DtResultados.FiltroPrimero("")
|
||||
If dr IsNot Nothing Then
|
||||
MsgLog.AppendLine("0.10 remisión registrada previamente")
|
||||
|
||||
Dim data As New JArray
|
||||
Dim objSucursal As New JObject(
|
||||
New JProperty("Cve", dr("CveVenta")),
|
||||
@@ -408,6 +407,8 @@ Public Class E119 : Implements IHttpHandler
|
||||
data.Add(objSucursal)
|
||||
Respuesta.status = "success"
|
||||
Respuesta.data = data
|
||||
Respuesta.message = "Folio registrado previamente."
|
||||
MsgLog.AppendLine("Folio registrado previamente.")
|
||||
Registrada = True
|
||||
End If
|
||||
End If
|
||||
@@ -434,7 +435,6 @@ Public Class E119 : Implements IHttpHandler
|
||||
|
||||
If Not TieneError Then
|
||||
|
||||
|
||||
'BUSCAR SI ESTÁ REGISTRADO EL CLIENTE
|
||||
If ObjClientes.GetClientes(-1, "-1", "-1", "-1", RFC, "-1", "-1", -1, CveEmpresa, 1, TipoCliente:=-1, TopSelect:=1) Then
|
||||
If ObjClientes.DtResultados.Rows.Count > 0 Then
|
||||
@@ -445,7 +445,6 @@ Public Class E119 : Implements IHttpHandler
|
||||
End If
|
||||
MsgLog.AppendLine("1.4 verificar cliente.")
|
||||
|
||||
|
||||
If CveCliente = 0 Then
|
||||
' 'DATOS DE BILLING
|
||||
MsgLog.AppendLine("1.5 crear cliente")
|
||||
|
||||
@@ -2661,94 +2661,6 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox14">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Sucursal Tijuana</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>9pt</FontSize>
|
||||
<TextDecoration>None</TextDecoration>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Beneficiario: ELECTRICA SERVEC S DE RL DE CV </Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
<TextDecoration>None</TextDecoration>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Banco: SANTANDER </Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
<TextDecoration>None</TextDecoration>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>CLABE: 014 760 655 074 603 318 </Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
<TextDecoration>None</TextDecoration>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Cuenta: 65507460331 </Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
<TextDecoration>None</TextDecoration>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Top>8.27176cm</Top>
|
||||
<Left>9.76877cm</Left>
|
||||
<Height>1.89191cm</Height>
|
||||
<Width>9.18009cm</Width>
|
||||
<ZIndex>20</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Image Name="Image1">
|
||||
<Source>Embedded</Source>
|
||||
<Value>RFIRMAELECTRONICAEDITABLE</Value>
|
||||
@@ -2757,7 +2669,7 @@
|
||||
<Left>0.51012cm</Left>
|
||||
<Height>1.73059cm</Height>
|
||||
<Width>3.63914cm</Width>
|
||||
<ZIndex>21</ZIndex>
|
||||
<ZIndex>20</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -2771,7 +2683,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Cuentas Bancarias</Value>
|
||||
<Value>Cuenta Bancaria</Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -2784,8 +2696,8 @@
|
||||
<Top>7.75847cm</Top>
|
||||
<Left>0.25136cm</Left>
|
||||
<Height>0.53798cm</Height>
|
||||
<Width>18.6975cm</Width>
|
||||
<ZIndex>22</ZIndex>
|
||||
<Width>9.06118cm</Width>
|
||||
<ZIndex>21</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -3236,7 +3148,7 @@
|
||||
<Left>0.15747cm</Left>
|
||||
<Height>2.0799cm</Height>
|
||||
<Width>20.85172cm</Width>
|
||||
<ZIndex>23</ZIndex>
|
||||
<ZIndex>22</ZIndex>
|
||||
<Visibility>
|
||||
<Hidden>=Microsoft.VisualBasic.Interaction.IIF(First(Fields!SerieFolio.Value, "DataSet4") <> "", False, True)</Hidden>
|
||||
</Visibility>
|
||||
@@ -3277,7 +3189,7 @@
|
||||
<Left>16.84664cm</Left>
|
||||
<Height>0.49387cm</Height>
|
||||
<Width>4.14557cm</Width>
|
||||
<ZIndex>24</ZIndex>
|
||||
<ZIndex>23</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style type="text/css">
|
||||
<%-- <style type="text/css">
|
||||
.gvInventario tr td:nth-child(4) {
|
||||
width: 6% !important;
|
||||
}
|
||||
@@ -42,7 +42,16 @@
|
||||
.btn.default:hover {
|
||||
background-color: lightgray;
|
||||
}
|
||||
</style>--%>
|
||||
<style type="text/css">
|
||||
|
||||
.customCalendarStyle
|
||||
{
|
||||
position: relative; /* Asegura que z-index funcione */
|
||||
z-index: 9999;
|
||||
}
|
||||
</style>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Entrega Almacén (Surtir Mercancia)
|
||||
@@ -472,145 +481,174 @@
|
||||
|
||||
</div>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet light xspadding bordered ">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Salida de Inventario</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form-horizontal form-row-sepe formnombottom">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<%--AGREGAR POR CODIGO DE BARRAS--%>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="row" runat="server" id="DivCodigoSeriePS" visible="false">
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="col-md-2 pull-right">
|
||||
<div class="btn-group" style="float: right;">
|
||||
<asp:Button ID="BtnVerSugerencias" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnVerSugerencias_Click" runat="server" Text="Ver Sugerencias" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 pull-right">
|
||||
<table style="float: right;">
|
||||
<tr>
|
||||
<td><i class="fa fa-barcode" style="font-size: 1.8em; margin-top: 8px;" aria-hidden="true" data-toggle="tooltip" title="Código Barras"></i></td>
|
||||
<td>
|
||||
<asp:Panel ID="PanelCodigo" runat="server" DefaultButton="BtnCodigoPS">
|
||||
<asp:TextBox ID="TxtCodigoPS" ClientIDMode="Static" Text="" runat="server" />
|
||||
<asp:Button Text="" ID="BtnCodigoPS" OnClick="BtnCodigoPS_Click" Style="display: none" runat="server" />
|
||||
</asp:Panel>
|
||||
</td>
|
||||
<td runat="server" visible="false" id="TdSeriePS">
|
||||
<asp:Panel ID="PanelSerie" runat="server" DefaultButton="BtnSeriePS">
|
||||
<asp:TextBox ID="TxtSeriePS" Text="" runat="server" />
|
||||
<asp:Button Text="" ID="BtnSeriePS" OnClick="BtnSeriePS_Click" Style="display: none" runat="server" />
|
||||
</asp:Panel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="portlet light smmallpadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Salida de Inventario</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" >
|
||||
|
||||
<%--AGREGAR POR CODIGO DE BARRAS--%>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="row" runat="server" id="DivCodigoSeriePS" visible="false">
|
||||
|
||||
<%--GV DATOS--%>
|
||||
<asp:GridView ID="GvDatos" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" ShowFooter="True" ShowHeader="true" ShowHeaderWhenEmpty="True"
|
||||
DataKeyNames="Consec,CvePS,Codigo,CodigoBarras,CveUM,CantidadC,CantidadF,UM,PS,CveClasificacion,CveCategoria,CveVentaDetalle,CveTamaño,AplicaSeccion, AplicaSerie,AplicaLote,AplicaCaducidad" HeaderStyle-CssClass="Titulos" CssClass="table table-striped table-hover Widthall ScrollAD gvInventario mysmallbtn" data-heighterror="450" data-freezerows="1" GridLines="None">
|
||||
<HeaderStyle Height="30px" />
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="cbInv" runat="server" Checked="true" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" Width="2.5%" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Cant. Venta" DataField="CantidadC" DataFormatString="{0:#,##0.######}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="5%" />
|
||||
|
||||
<asp:BoundField HeaderText="Cant. Surtida" DataField="CantidadS" DataFormatString="{0:#,##0.######}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:TemplateField HeaderText="Cant. a Surtir">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TbCantidadF" runat="server" Width="50px" Mask="9,999.99" DataFormatString="{0:#,##0.######}" Style="text-align: right" Text='<%# Eval("CantidadF", "{0:#,##0.######}") %>'></asp:TextBox>
|
||||
<asp:Button Text="Serie" ID="BtnSerie" OnClick="BtnSerie_Click" CssClass="btn btn-primary btn-xs" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Unidad" DataField="UM" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" />
|
||||
<%-- <asp:HyperLinkField HeaderText="Producto o Servicio" Target="_blank" DataTextField="CodigoPS" DataNavigateUrlFields="CvePS" DataNavigateUrlFormatString="/Ventas/ProductosServicios.aspx?CvePS={0}" ItemStyle-HorizontalAlign="Left" />--%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||
<HeaderTemplate>
|
||||
<asp:Literal ID="LtlHeaderPS" Text="Producto o Servicio" runat="server"></asp:Literal>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplPS" runat="server" Target="_blank" Text='<%# Eval("CodigoPS", "{0}") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Observación" DataField="ObservacionesDetalle" ItemStyle-Width="7.5%" />
|
||||
|
||||
<asp:TemplateField HeaderText="Sección" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="SeccionAlmacen" DataValueField="CveSeccionAlmacen" CssClass="select2me" Style="width: 85% !important" runat="server" CausesValidation="true" Visible="false">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Lote" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtLote" CssClass="form-control input-sm" runat="server" Visible="false" Text='<%# Eval("Lote") %>' Width="100px" Enabled="false"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha Caducidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" Visible="false">
|
||||
<ItemTemplate>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtCaducidad" Text='<%# Eval("FechaCaducidad") %>' CssClass="form-control input-sm ADSMaskDate" Style="width: 78px" runat="server" Visible="false" Enabled="false"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="LnkCaducidad" class="btn default" Visible="false" Enabled="false"> <i class="fa fa-calendar"></i> </asp:LinkButton>
|
||||
|
||||
<ajax:MaskedEditExtender ID="MEECaducidad" runat="server" TargetControlID="TxtCaducidad" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" Enabled="false" ID="CECaducidad" TargetControlID="TxtCaducidad" PopupButtonID="LnkCaducidad" PopupPosition="BottomLeft" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVCaducidad" runat="server" ControlToValidate="TxtCaducidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Caducidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECaducidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCaducidad"></ajax:ValidatorCalloutExtender>
|
||||
</span>
|
||||
<div class="col-md-2 pull-right">
|
||||
<div class="btn-group" style="float: right;">
|
||||
<asp:Button ID="BtnVerSugerencias" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnVerSugerencias_Click" runat="server" Text="Ver Sugerencias" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 pull-right">
|
||||
<table style="float: right;">
|
||||
<tr>
|
||||
<td><i class="fa fa-barcode" style="font-size: 1.8em; margin-top: 8px;" aria-hidden="true" data-toggle="tooltip" title="Código Barras"></i></td>
|
||||
<td>
|
||||
<asp:Panel ID="PanelCodigo" runat="server" DefaultButton="BtnCodigoPS">
|
||||
<asp:TextBox ID="TxtCodigoPS" ClientIDMode="Static" Text="" runat="server" />
|
||||
<asp:Button Text="" ID="BtnCodigoPS" OnClick="BtnCodigoPS_Click" Style="display: none" runat="server" />
|
||||
</asp:Panel>
|
||||
</td>
|
||||
<td runat="server" visible="false" id="TdSeriePS">
|
||||
<asp:Panel ID="PanelSerie" runat="server" DefaultButton="BtnSeriePS">
|
||||
<asp:TextBox ID="TxtSeriePS" Text="" runat="server" />
|
||||
<asp:Button Text="" ID="BtnSeriePS" OnClick="BtnSeriePS_Click" Style="display: none" runat="server" />
|
||||
</asp:Panel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Dividir" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Center" Visible="True">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox runat="server" ID="TxtDividir" Width="30px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumeros2" runat="server" TargetControlID="TxtDividir" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<asp:Button runat="server" ID="BtnDividir" Text="Dividir" OnClick="Dividir" Style="display: none;" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<asp:HiddenField runat="server" ClientIDMode="Static" ID="HdnCantidadMovimiento" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<%--BOTON GUARDAR--%>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<div align="center">
|
||||
<asp:Label Text="Venta totalmente Surtida" ID="LbSurtida" Font-Size="Small" Visible="false" CssClass="label label-sm label-success" runat="server" />
|
||||
<br />
|
||||
<br />
|
||||
<asp:Button ID="BtnGuardar" OnClick="BtnGuardar_Click" runat="server" CssClass="btn btn-primary" Text="Guardar" Width="150px" ValidationGroup="GrpGuardar" />
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<%--GV DATOS--%>
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False"
|
||||
DataKeyNames="Consec,CvePS,Codigo,CodigoBarras,CveUM,CantidadC,CantidadF,UM,PS,CveClasificacion,CveCategoria,CveVentaDetalle,CveTamaño,AplicaSeccion, AplicaSerie,AplicaLote,AplicaCaducidad"
|
||||
CssClass="" GridLines="None" >
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="cbInv" runat="server" Checked="true" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" Width="2.5%" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Cant. Venta" DataField="CantidadC" DataFormatString="{0:#,##0.######}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="5%" />
|
||||
|
||||
<asp:BoundField HeaderText="Cant. Surtida" DataField="CantidadS" DataFormatString="{0:#,##0.######}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:TemplateField HeaderText="Cant. a Surtir">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TbCantidadF" runat="server" Width="50px" Mask="9,999.99" DataFormatString="{0:#,##0.######}" Style="text-align: right" Text='<%# Eval("CantidadF", "{0:#,##0.######}") %>'></asp:TextBox>
|
||||
<asp:Button Text="Serie" ID="BtnSerie" OnClick="BtnSerie_Click" CssClass="btn btn-primary btn-xs" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Unidad" DataField="UM" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||
<HeaderTemplate>
|
||||
<asp:Literal ID="LtlHeaderPS" Text="Producto o Servicio" runat="server"></asp:Literal>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplPS" runat="server" Target="_blank" Text='<%# Eval("CodigoPS", "{0}") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Observación" DataField="ObservacionesDetalle" ItemStyle-Width="7.5%" />
|
||||
|
||||
<asp:TemplateField HeaderText="Sección" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="SeccionAlmacen" DataValueField="CveSeccionAlmacen" CssClass="select2me" Style="width: 85% !important" runat="server" CausesValidation="true" Visible="false">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%--8--%>
|
||||
<asp:TemplateField HeaderText="Lote/caducidades" ItemStyle-HorizontalAlign="Left" Visible="false" ItemStyle-Width="150px">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlCaducidadProducto" CssClass="select2me" Width="150px" runat="server" CausesValidation="true" AutoPostBack="true" OnSelectedIndexChanged="DdlCaducidadProducto_SelectedIndexChanged">
|
||||
<asp:ListItem Selected="True" Text="-" Value="|"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--9--%>
|
||||
<asp:TemplateField HeaderText="Lote" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtLote" CssClass="form-control input-sm" runat="server" Visible="false" Text='<%# Eval("Lote") %>' Width="100px" Enabled="false"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha Caducidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" Visible="false">
|
||||
<ItemTemplate>
|
||||
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;" runat="server" visible="false" id="DvFechaCaducidad" >
|
||||
<asp:TextBox ID="TxtCaducidad" Text="" CssClass="form-control input-sm ADSMaskDate" Style="width: 87px" runat="server" ></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="LnkCaducidad" class="btn default" > <i class="fa fa-calendar"></i> </asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEECaducidad" runat="server" TargetControlID="TxtCaducidad" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CECaducidad" TargetControlID="TxtCaducidad" PopupButtonID="LnkCaducidad" PopupPosition="TopLeft" Format="dd/MM/yyyy"
|
||||
> </ajax:CalendarExtender>
|
||||
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVCaducidad" runat="server" ControlToValidate="TxtCaducidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Caducidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECaducidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCaducidad"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Dividir" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Center" Visible="True">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox runat="server" ID="TxtDividir" Width="30px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumeros2" runat="server" TargetControlID="TxtDividir" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<asp:Button runat="server" ID="BtnDividir" Text="Dividir" OnClick="Dividir" Style="display: none;" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<asp:HiddenField runat="server" ClientIDMode="Static" ID="HdnCantidadMovimiento" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<%--BOTON GUARDAR--%>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<div align="center">
|
||||
<asp:Label Text="Venta totalmente Surtida" ID="LbSurtida" Font-Size="Small" Visible="false" CssClass="label label-sm label-success" runat="server" />
|
||||
<br />
|
||||
<br />
|
||||
<asp:Button ID="BtnGuardar" OnClick="BtnGuardar_Click" runat="server" CssClass="btn btn-primary" Text="Guardar" Width="150px" ValidationGroup="GrpGuardar" />
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<%--AGREGA POR SERIE--%>
|
||||
@@ -702,8 +740,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="DivLote" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<asp:UpdatePanel ID="UpLoteBatch" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
|
||||
@@ -7,6 +7,8 @@ Imports System.IO
|
||||
Imports System.Web.Management
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports MoreLinq
|
||||
Imports Telerik.Web.UI
|
||||
|
||||
Partial Class Inventarios_EntregaAlmacen
|
||||
Inherits ClsPaginas
|
||||
@@ -715,9 +717,9 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End If
|
||||
|
||||
If DtDatos.SUM("CantidadS") <= 0 Then
|
||||
GvDatos.CssClass = "table table-striped table-hover Widthall ScrollAD gvInventario gvEscondeColumna"
|
||||
GvDatos.CssClass = "table table-striped table-hover Widthall gvInventario gvEscondeColumna"
|
||||
Else
|
||||
GvDatos.CssClass = "table table-striped table-hover Widthall ScrollAD gvInventario"
|
||||
GvDatos.CssClass = "table table-striped table-hover Widthall gvInventario"
|
||||
End If
|
||||
|
||||
If CveAlmacenTraspasoDestino > 0 And Not (TipoMovimiento = 2 And TipoDocto.Contiene("Rem", "Ped")) Then
|
||||
@@ -920,9 +922,9 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
CveVentaSurtir = -1
|
||||
CveOSSurtir = -1
|
||||
If DtDatos.SUM("CantidadS") <= 0 Then
|
||||
GvDatos.CssClass = "table table-striped table-hover Widthall ScrollAD gvInventario gvEscondeColumna"
|
||||
GvDatos.CssClass = "table table-striped table-hover Widthall gvInventario gvEscondeColumna"
|
||||
Else
|
||||
GvDatos.CssClass = "table table-striped table-hover Widthall ScrollAD gvInventario"
|
||||
GvDatos.CssClass = "table table-striped table-hover Widthall gvInventario"
|
||||
End If
|
||||
|
||||
If CveAlmacenTraspasoDestino > 0 Then
|
||||
@@ -1000,9 +1002,16 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End If
|
||||
|
||||
If AplicaSeccion Then GvDatos.Columns(7).Visible = True
|
||||
If AplicaLote Then GvDatos.Columns(8).Visible = True
|
||||
If AplicaCaducidad Then GvDatos.Columns(9).Visible = True
|
||||
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvDatos.Columns(9).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||
If AplicaLote Then GvDatos.Columns(9).Visible = True
|
||||
If AplicaCaducidad Then GvDatos.Columns(10).Visible = True
|
||||
|
||||
If AplicaLote Or AplicaCaducidad Then
|
||||
GvDatos.Columns(8).Visible = True
|
||||
End If
|
||||
|
||||
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then
|
||||
GvDatos.Columns(10).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||
End If
|
||||
'GvDatos.Columns(9).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) <> "", UsuarioActual.Empresa.Funcionalidad(147), "")
|
||||
|
||||
'SugerirFecha()
|
||||
@@ -1117,24 +1126,29 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End If
|
||||
Else
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = False
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim DvFechaCaducidad As HtmlGenericControl = TryCast(e.Row.FindControl("DvFechaCaducidad"), HtmlGenericControl)
|
||||
|
||||
If CBool(e.Row.DBCampo("AplicaCaducidad")) Then
|
||||
e.Row.FCTextBox("TxtCaducidad").Visible = True
|
||||
e.Row.FCLinkButton("LnkCaducidad").Visible = True
|
||||
If CBool(e.Row.DBCampo("AplicaCaducidad")) Then
|
||||
DvFechaCaducidad.Visible = True
|
||||
' e.Row.FCTextBox("TxtCaducidad").Visible = True
|
||||
'e.Row.FCLinkButton("LnkCaducidad").Visible = True
|
||||
e.Row.FCTextBox("TxtCaducidad").ReadOnly = True
|
||||
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = False
|
||||
'CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = False
|
||||
|
||||
'si aplica caducidad y viene vacía (posible por venta anterior), que se active su registro
|
||||
If (e.Row.FCTextBox("TxtCaducidad").Text = "" OrElse e.Row.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha) OrElse UsuarioActual.TienePermisoProceso(364) OrElse UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
e.Row.FCTextBox("TxtCaducidad").ReadOnly = False
|
||||
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = True
|
||||
e.Row.FCTextBox("TxtCaducidad").Enabled = True
|
||||
'CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = True
|
||||
'e.Row.FCTextBox("TxtCaducidad").Enabled = True
|
||||
End If
|
||||
|
||||
Else
|
||||
e.Row.FCTextBox("TxtCaducidad").Visible = False
|
||||
e.Row.FCLinkButton("LnkCaducidad").Visible = False
|
||||
e.Row.FCTextBox("TxtCaducidad").Enabled = True
|
||||
'e.Row.FCTextBox("TxtCaducidad").Visible = False
|
||||
'e.Row.FCLinkButton("LnkCaducidad").Visible = False
|
||||
'e.Row.FCTextBox("TxtCaducidad").Enabled = True
|
||||
DvFechaCaducidad.Visible = False
|
||||
End If
|
||||
|
||||
If CBool(e.Row.DBCampo("AplicaLote")) Then
|
||||
@@ -1190,8 +1204,60 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End If
|
||||
|
||||
|
||||
If Boolean.Parse(e.Row.DataKey("AplicaLote")) Or Boolean.Parse(e.Row.DataKey("AplicaCaducidad")) Then
|
||||
|
||||
CargarCaducidadProducto(e.Row.DataKey("CvePS").ToEntero, e.Row.FCDropDownList("DdlCaducidadProducto"))
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlCaducidadProducto_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, DropDownList)).NamingContainer, GridViewRow)
|
||||
|
||||
Dim AplicaLote As Boolean = Boolean.Parse(GvRow.DataKey("AplicaLote"))
|
||||
Dim AplicaCaducidad As Boolean = Boolean.Parse(GvRow.DataKey("AplicaCaducidad"))
|
||||
Dim DdlCaducidadProducto As DropDownList = GvRow.FCDropDownList("DdlCaducidadProducto")
|
||||
|
||||
Dim ArrayCaducidad As String() = DdlCaducidadProducto.SelectedValue.Split("|"c)
|
||||
Dim Lote As String = ArrayCaducidad(0)
|
||||
Dim FechaCaducidad As String = ArrayCaducidad(1)
|
||||
|
||||
|
||||
|
||||
If AplicaLote Then
|
||||
GvRow.FCTextBox("TxtLote").Text = Lote
|
||||
End If
|
||||
|
||||
If AplicaCaducidad Then
|
||||
GvRow.FCTextBox("TxtCaducidad").Text = FechaCaducidad
|
||||
End If
|
||||
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargarCaducidadProducto(CvePS As Integer, ByRef DdlLoteFechaCaducidad As DropDownList)
|
||||
|
||||
Dim almacenes As String = DdlAlmacen.SelectedValue
|
||||
If almacenes = "" Then
|
||||
almacenes = "-1"
|
||||
End If
|
||||
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
|
||||
If ObjInventarios.GetExistenciasCaducidad(CvePS, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, almacenes) Then
|
||||
|
||||
For Each dr As DataRow In ObjInventarios.DtResultados.Rows
|
||||
DdlLoteFechaCaducidad.Items.Add(New ListItem($"Lote: {dr("Lote").ToString} - Caducidad: {dr("FechaCaducidad").ToString.ToDate.ToString("dd/MM/yyyy")}", $"{dr("Lote").ToString}|{dr("FechaCaducidad").ToString.ToDate.ToString("dd/MM/yyyy")}"))
|
||||
Next
|
||||
|
||||
End If
|
||||
ObjInventarios.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDocumentos(tCveVenta As Integer)
|
||||
@@ -4458,6 +4524,8 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Return Respuesta
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -161,11 +161,31 @@
|
||||
<asp:GridView ID="GvSeriesPaqueteArmado" runat="server" AutoGenerateColumns="false" CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="#" DataField="Row" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:TemplateField HeaderText="Serie" ItemStyle-Width="90%" ItemStyle-HorizontalAlign="Center">
|
||||
<asp:TemplateField HeaderText="Serie" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox Text='<%# Eval("Serie")%>' ID="TxtSerie" runat="server" Width="90%" />
|
||||
<asp:TextBox Text='<%# Eval("Serie")%>' ID="TxtSerie" runat="server" Width="150px" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Lote" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox Text='<%# Eval("Lote")%>' ID="TxtLote" runat="server" Width="150px" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha Caducidad" ItemStyle-Width="90%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;" runat="server" >
|
||||
<asp:TextBox ID="TxtCaducidad" Text="" CssClass="form-control input-sm ADSMaskDate" Style="width: 87px" runat="server" ></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="LnkCaducidad" class="btn default" > <i class="fa fa-calendar"></i> </asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEECaducidad" runat="server" TargetControlID="TxtCaducidad" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CECaducidad" TargetControlID="TxtCaducidad" PopupButtonID="LnkCaducidad" PopupPosition="TopLeft" Format="dd/MM/yyyy" > </ajax:CalendarExtender>
|
||||
|
||||
<%--<asp:RequiredFieldValidator ID="RFVCaducidad" runat="server" ControlToValidate="TxtCaducidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Caducidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECaducidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCaducidad"></ajax:ValidatorCalloutExtender>--%>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
@@ -417,25 +437,89 @@
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<asp:Panel runat="server" ID="PnlSeriePaqueteDesarmado" DefaultButton="BtnAgregarSerieDesarmado">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">Serie</div>
|
||||
<div class="col-md-3">
|
||||
<asp:TextBox runat="server" ID="TxtSerieDesarmado" Text="" CssClass="form-control input-sm" />
|
||||
<asp:RequiredFieldValidator ID="RFVSerieDesarmado" runat="server" ControlToValidate="TxtSerieDesarmado" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Serie''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregaSeriePaqueteDesarmado"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCESerieDesarmado" runat="server" HighlightCssClass="vco" TargetControlID="RFVSerieDesarmado" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<div class="col-md-3" runat="server" id="DvDesArmadoSerie" visible="false">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox runat="server" ID="TxtSerieDesarmado" Text="" CausesValidation="true" CssClass="form-control" />
|
||||
<asp:RequiredFieldValidator ID="RfvTxtSerieDesarmado" runat="server" ControlToValidate="TxtSerieDesarmado" CssClass="help-block errorimput"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Serie''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregaSeriePaqueteDesarmado"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtSerieDesarmado.ClientID.ToString()%>">Serie:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3" runat="server" id="DvDesArmadoLote" visible="false">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox runat="server" ID="TxtLoteDesarmado" Text="" CausesValidation="true" CssClass="form-control" />
|
||||
<asp:RequiredFieldValidator ID="RfvTxtLoteDesarmado" runat="server" ControlToValidate="TxtLoteDesarmado" CssClass="help-block errorimput"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Lote''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregaSeriePaqueteDesarmado"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtLoteDesarmado.ClientID.ToString()%>">Lote:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 col-md-offset-3 text-right">
|
||||
|
||||
<div class="col-md-3" runat="server" id="DvDesArmadoCaducidad" visible="false">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top: -10px !important;" runat="server" id="DvFechaCaducidad">
|
||||
|
||||
<label for="<%= TxtDesarmadoCaducidad.ClientID.ToString()%>" style="color: #888888;">Fecha Caducidad:</label>
|
||||
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px; margin-top: -5px !important;">
|
||||
<asp:TextBox ID="TxtDesarmadoCaducidad" Text="" CssClass="form-control input-sm ADSMaskDate" Style="width: 87px" runat="server"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="LnkCaducidad" class="btn default"> <i class="fa fa-calendar"></i> </asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<ajax:MaskedEditExtender ID="MEECaducidad" runat="server" TargetControlID="TxtDesarmadoCaducidad" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CECaducidad" TargetControlID="TxtDesarmadoCaducidad" PopupButtonID="LnkCaducidad" PopupPosition="TopLeft" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtDesarmadoCaducidad" runat="server" ControlToValidate="TxtDesarmadoCaducidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Caducidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregaSeriePaqueteDesarmado"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECaducidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVTxtDesarmadoCaducidad"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<%-- <div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top: -10px !important;">
|
||||
<label for="<%= TxtFechaNacimiento.ClientID.ToString()%>" style="color: #888888;">Fecha de Nacimiento: </label>
|
||||
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px; margin-top: -5px !important;">
|
||||
<asp:TextBox ID="TxtFechaNacimiento" CssClass="form-control" MaxLength="20" runat="server" Width="100px" Height="28px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkFechaNacimiento" class="btn default" Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<ajax:MaskedEditExtender ID="MEEFechaNacimiento" runat="server" TargetControlID="TxtFechaNacimiento" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaNacimiento" PopupButtonID="LnkFechaNacimiento" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaNacimiento" runat="server" ControlToValidate="TxtFechaNacimiento" Display="None" ErrorMessage="El campo <b>''Fecha de Nacimiento''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardarMedico"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaNacimiento" runat="server" ControlToValidate="TxtFechaNacimiento" Display="None" ErrorMessage="El campo <b>''Fecha de Nacimiento''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardarMedico"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaNacimiento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaNacimiento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>--%>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-3 text-right">
|
||||
<asp:Button Text="Agregar" CssClass="btn btn-primary" ID="BtnAgregarSerieDesarmado" OnClick="BtnAgregarSerieDesarmado_Click" ValidationGroup="GrpAgregaSeriePaqueteDesarmado" runat="server" />
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</asp:Panel>
|
||||
|
||||
<br />
|
||||
|
||||
<asp:GridView ID="GvSeriesPaqueteDesarmado" runat="server" DataKeyNames="Serie" AutoGenerateColumns="false" CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
|
||||
<asp:GridView ID="GvSeriesPaqueteDesarmado" runat="server" DataKeyNames="Serie,Lote,FechaCaducidad" AutoGenerateColumns="false" CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="#" DataField="Row" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="70%" />
|
||||
<asp:BoundField HeaderText="#" DataField="Row" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="30%" />
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="30%" />
|
||||
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-Width="30%" DataFormatString="{0:dd/MM/yyyy}" />
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lnkRemove" runat="server" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-trash'></i>" CommandName="Delete" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea eliminar?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.IO.Packaging
|
||||
Imports Extensiones
|
||||
Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
Inherits ClsPaginas
|
||||
@@ -89,12 +90,32 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property AplicaSerie As Boolean
|
||||
Private Property AplicaLotePaquete As Boolean
|
||||
Get
|
||||
Return CType(ViewState("AplicaSerie"), Boolean)
|
||||
Return CType(ViewState("AplicaLotePaquete"), Boolean)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("AplicaSerie") = value
|
||||
ViewState("AplicaLotePaquete") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property AplicaCaducidadPaquete As Boolean
|
||||
Get
|
||||
Return CType(ViewState("AplicaCaducidadPaquete"), Boolean)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("AplicaCaducidadPaquete") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property AplicaSeriePaquete As Boolean
|
||||
Get
|
||||
Return CType(ViewState("AplicaSeriePaquete"), Boolean)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("AplicaSeriePaquete") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -245,6 +266,12 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
|
||||
#Region " PROCESAR - VERIFICAR EXISTENCIAS "
|
||||
Protected Sub BtnVerificarExistenciasArmado_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
AplicaSeriePaquete = False
|
||||
AplicaLotePaquete = False
|
||||
AplicaCaducidadPaquete = False
|
||||
|
||||
TipoMovimiento = 1
|
||||
Limpia(TipoMovimiento)
|
||||
|
||||
@@ -289,24 +316,43 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
If ErrorExistencias Then
|
||||
Alert(TextoExistencias, TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
AplicaSerie = CBool(drP("AplicaSerie"))
|
||||
AplicaSeriePaquete = CBool(drP("AplicaSerie"))
|
||||
AplicaLotePaquete = CBool(drP("AplicaLote"))
|
||||
AplicaCaducidadPaquete = CBool(drP("AplicaCaducidad"))
|
||||
BtnGuadarArmado.Visible = True
|
||||
End If
|
||||
|
||||
If AplicaSerie Then
|
||||
|
||||
|
||||
|
||||
If AplicaSeriePaquete Or AplicaLotePaquete Or AplicaCaducidadPaquete Then
|
||||
DivSeriesPaqueteArmado.Visible = True
|
||||
Dim Dt As New DataTable
|
||||
Dt.Columns.Add("Row", GetType(Integer))
|
||||
Dt.Columns.Add("Serie", GetType(String))
|
||||
Dt.Columns.Add("Lote", GetType(String))
|
||||
Dt.Columns.Add("FechaCaducidad", GetType(Date))
|
||||
|
||||
For index = 1 To TxtCantidadArmado.Text.ToEntero
|
||||
Dim Row = Dt.NewRow
|
||||
Row("Row") = index
|
||||
Row("Serie") = ""
|
||||
Row("Lote") = ""
|
||||
Row("FechaCaducidad") = MinFecha
|
||||
Dt.Rows.Add(Row)
|
||||
Next
|
||||
|
||||
GvSeriesPaqueteArmado.Columns(1).Visible = AplicaSeriePaquete
|
||||
GvSeriesPaqueteArmado.Columns(2).Visible = AplicaLotePaquete
|
||||
GvSeriesPaqueteArmado.Columns(3).Visible = AplicaCaducidadPaquete
|
||||
|
||||
GvSeriesPaqueteArmado.DataSource = Dt
|
||||
GvSeriesPaqueteArmado.DataBind()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
UpSeriesPaqueteArmado.Update()
|
||||
|
||||
CvePaqueteArmado = DdlPaqueteArmado.SelectedValue.ToEntero
|
||||
@@ -328,10 +374,16 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
UpGeneralesArmado.Update()
|
||||
End Sub
|
||||
Protected Sub BtnVerificarExistenciasDesarmado_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
DvDesArmadoCaducidad.Visible = False
|
||||
DvDesArmadoLote.Visible = False
|
||||
DvDesArmadoSerie.Visible = False
|
||||
|
||||
DtDatosDetalle.Clear()
|
||||
BtnGuadarDesarmado.Visible = False
|
||||
TotalDesarmado.Visible = False
|
||||
AplicaSerie = False
|
||||
AplicaSeriePaquete = False
|
||||
TxtSerieDesarmado.Text = ""
|
||||
CvePaqueteDesarmado = -1
|
||||
TipoMovimiento = 2
|
||||
@@ -362,7 +414,9 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
Alert($"No hay existencia suficiente del paquete <b>""{DdlPaqueteDesarmado.SelectedItem.Text}""</b> para desarmar. Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
Else
|
||||
AplicaSerie = CBool(drP("AplicaSerie"))
|
||||
AplicaSeriePaquete = CBool(drP("AplicaSerie"))
|
||||
AplicaLotePaquete = CBool(drP("AplicaLote"))
|
||||
AplicaCaducidadPaquete = CBool(drP("AplicaCaducidad"))
|
||||
End If
|
||||
|
||||
|
||||
@@ -391,13 +445,23 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
Next
|
||||
End If
|
||||
|
||||
If AplicaSerie Then
|
||||
If AplicaSeriePaquete Or AplicaLotePaquete Or AplicaCaducidadPaquete Then
|
||||
|
||||
DvDesArmadoCaducidad.Visible = AplicaSeriePaquete
|
||||
DvDesArmadoLote.Visible = AplicaLotePaquete
|
||||
DvDesArmadoSerie.Visible = AplicaCaducidadPaquete
|
||||
|
||||
GvSeriesPaqueteDesarmado.Columns(1).Visible = AplicaSeriePaquete
|
||||
GvSeriesPaqueteDesarmado.Columns(2).Visible = AplicaLotePaquete
|
||||
GvSeriesPaqueteDesarmado.Columns(3).Visible = AplicaCaducidadPaquete
|
||||
|
||||
DivSeriesPaqueteDesarmado.Visible = True
|
||||
CreaDtSeriesDesarmado()
|
||||
DtSeriesDesarmado.Clear()
|
||||
|
||||
GvSeriesPaqueteDesarmado.DataSource = DtSeriesDesarmado
|
||||
GvSeriesPaqueteDesarmado.DataBind()
|
||||
|
||||
End If
|
||||
UpSeriesPaqueteDesarmado.Update()
|
||||
|
||||
@@ -454,42 +518,118 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
Case 1 ' ARMADO
|
||||
For Each gvr As GridViewRow In GvDatosArmado.Rows
|
||||
If gvr.DataKey("AplicaSerie") = "True" Then
|
||||
If gvr.DataKey("Cantidad").ToEntero <> DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", gvr.DataKey("Consec"))).Rows.Count Then
|
||||
Alert("Es necesario ingresas todas las series de los componentes.", TipoMensaje.MsgAdvertencia)
|
||||
|
||||
''If gvr.DataKey("Cantidad").ToEntero <> DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", gvr.DataKey("Consec"))).Rows.Count Then
|
||||
'' Alert("Es necesario ingresas todas las series de los componentes.", TipoMensaje.MsgAdvertencia)
|
||||
'' Exit Sub
|
||||
''End If
|
||||
'If gvr.FCTextBox("TxtSerie") Then
|
||||
|
||||
'End If
|
||||
|
||||
'If gvr.FCTextBox("TxtSerie").Text.Trim = "" Then
|
||||
' Alert("Es necesario ingresas todas las series de los componentes.", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
'End If
|
||||
|
||||
End If
|
||||
|
||||
If gvr.DataKey("AplicaLote") = "True" Then
|
||||
If gvr.FCTextBox("TxtLote").Text.Trim = "" Then
|
||||
Alert("Es necesario ingresas todos los lotes de los componentes.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
If gvr.DataKey("AplicaCaducidad") = "True" Then
|
||||
|
||||
If gvr.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha Then
|
||||
Alert("Es necesario ingresas todos las fechas de caducidad de los componentes.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
Case 2 ' DESARMADO
|
||||
For Each gvr As GridViewRow In GvDatosDesarmado.Rows
|
||||
|
||||
If gvr.DataKey("AplicaSerie") = "True" Then
|
||||
If gvr.DataKey("Cantidad").ToEntero <> DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", gvr.DataKey("Consec"))).Rows.Count Then
|
||||
|
||||
'If gvr.DataKey("AplicaSerie") = "True" Then
|
||||
' 'If gvr.DataKey("Cantidad").ToEntero <> DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", gvr.DataKey("Consec"))).Rows.Count Then
|
||||
' ' Alert("Es necesario ingresas todas las series de los componentes.", TipoMensaje.MsgAdvertencia)
|
||||
' ' Exit Sub
|
||||
' 'End If
|
||||
'End If
|
||||
|
||||
If gvr.FCTextBox("Serie").Text.Trim = "" Then
|
||||
Alert("Es necesario ingresas todas las series de los componentes.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If gvr.DataKey("AplicaLote") = "True" Then
|
||||
If gvr.FCTextBox("TxtLote").Text.Trim = "" Then
|
||||
Alert("Es necesario ingresas todos los lotes de los componentes.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
If gvr.DataKey("AplicaCaducidad") = "True" Then
|
||||
|
||||
If gvr.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha Then
|
||||
Alert("Es necesario ingresas todos las fechas de caducidad de los componentes.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Next
|
||||
End Select
|
||||
|
||||
'VALIDA SI EL PAQUETE ES DE SERIE QUE SE INGRESEN TODAS LAS SERIES (CANTIDAD)
|
||||
If AplicaSerie Then
|
||||
If AplicaSeriePaquete Or AplicaLotePaquete Or AplicaCaducidadPaquete Then
|
||||
Select Case (Tipo)
|
||||
Case 1 ' ARMADO
|
||||
For Each gvr As GridViewRow In GvSeriesPaqueteArmado.Rows
|
||||
If gvr.FCTextBox("TxtSerie").Text.Trim = "" Then
|
||||
Alert("Es necesario indicar las series del paquete a armar.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
|
||||
If AplicaSeriePaquete Then
|
||||
If gvr.FCTextBox("TxtSerie").Text.Trim = "" Then
|
||||
Alert("Es necesario indicar las series del paquete a armar.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
If AplicaLotePaquete Then
|
||||
If gvr.FCTextBox("TxtLote").Text.Trim = "" Then
|
||||
Alert("Es necesario indicar los lotes del paquete a armar.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
If AplicaCaducidadPaquete Then
|
||||
If gvr.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha Then
|
||||
Alert("Es necesario indicar fechas de caducidad validas del paquete a armar.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
Case 2 ' DESARMADO
|
||||
|
||||
If TxtCantidadDesarmado.Text.ToEntero <> DtSeriesDesarmado.Rows.Count Then
|
||||
Alert("Es necesario indicar las series del paquete a desarmar.", TipoMensaje.MsgAdvertencia)
|
||||
Alert("Es necesario indicar las series, lotes o Fecha de caducidad del paquete a desarmar.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
End Select
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim TextoError As New StringBuilder
|
||||
If Tipo = 1 Then
|
||||
Dim ObjInventarioVal As New ClsInventarios
|
||||
@@ -572,7 +712,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
End If
|
||||
|
||||
|
||||
Exit Sub
|
||||
|
||||
|
||||
|
||||
Dim ObjInventario As New ClsInventarios
|
||||
@@ -669,12 +809,17 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
End If
|
||||
|
||||
|
||||
If AplicaSerie Then
|
||||
If AplicaSeriePaquete Then
|
||||
Dim ContadorPaquete = 1
|
||||
Dim DtSeriesComponentes As New DataTable
|
||||
For Each Gvr As GridViewRow In GvSeriesPaqueteArmado.Rows
|
||||
'AGREGA MOVTO DETALLE DE LA ENTRADA DEL PAQUETE
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, 1, CveUMTemp, CvePSTemp, PUTemp, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Gvr.FCTextBox("TxtSerie").Text.Trim) Then
|
||||
|
||||
Dim Serie As String = Gvr.FCTextBox("TxtSerie").Text.Trim
|
||||
Dim Lote As String = Gvr.FCTextBox("TxtLote").Text.Trim
|
||||
Dim FechaCaducidad As Date = If(Gvr.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha, MinFecha, Gvr.FCTextBox("TxtCaducidad").Text.ToDate)
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, 1, CveUMTemp, CvePSTemp, PUTemp, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad) Then
|
||||
TieneError = True
|
||||
MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de entrada"
|
||||
Exit For
|
||||
@@ -736,10 +881,17 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
'If AplicaSeccion Then
|
||||
' CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenDesarmado, CvePaqueteDesarmado).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
||||
'End If
|
||||
If AplicaSerie Then
|
||||
If AplicaSeriePaquete Or AplicaLotePaquete Or AplicaCaducidadPaquete Then
|
||||
|
||||
|
||||
For Each Gvr As GridViewRow In GvSeriesPaqueteDesarmado.Rows
|
||||
|
||||
Dim Serie As String = If(AplicaSeriePaquete, Gvr.DataKey("Serie").Trim, "-1")
|
||||
Dim Lote As String = If(AplicaLotePaquete, Gvr.DataKey("Lote").Trim, "-1")
|
||||
Dim FechaCaducidad As Date = If(AplicaCaducidadPaquete, Gvr.DataKey("FechaCaducidad").Trim.ToDate, MinFecha)
|
||||
|
||||
'AGREGA MOVTO DETALLE DE LA SALIDA DEL PAQUETE
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, 1, CveUMTemp, CvePSTemp, 0, CveSeccionAlmacen:=-3, Serie:=Gvr.DataKey("Serie").ToString) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, 1, CveUMTemp, CvePSTemp, 0, CveSeccionAlmacen:=-3, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad) Then
|
||||
TieneError = True
|
||||
MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de salida"
|
||||
Exit For
|
||||
@@ -751,6 +903,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de salida"
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Next
|
||||
Else
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, TxtCantidadDesarmado.Text.ToDecimal, CveUMTemp, CvePSTemp, 0, CveSeccionAlmacen:=CveSeccionAlmacen) Then
|
||||
@@ -878,7 +1031,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
Private Sub Limpia(Tipo As Integer)
|
||||
|
||||
DtDatosDetalle.Clear()
|
||||
AplicaSerie = False
|
||||
AplicaSeriePaquete = False
|
||||
|
||||
|
||||
'If Tipo = 1 Then
|
||||
@@ -1441,6 +1594,11 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
Dt.Columns.Add("Row", GetType(Integer))
|
||||
Dt.Columns.Add("Serie", GetType(String))
|
||||
|
||||
'Dim DrPS As DataRow = Nothing
|
||||
'DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=_DdlPaqueteArmado.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
'Dim AplicaSerie
|
||||
|
||||
|
||||
For Each Row As DataRow In DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", CType(sender, LinkButton).CommandArgument.ToEntero)).Rows
|
||||
If i > TxtCantidadArmado.Text.ToEntero Then
|
||||
Exit For
|
||||
@@ -1456,6 +1614,9 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
|
||||
GvSeriesPaqueteArmado.DataSource = Dt
|
||||
GvSeriesPaqueteArmado.DataBind()
|
||||
|
||||
|
||||
|
||||
UpSeriesPaqueteArmado.Update()
|
||||
End Sub
|
||||
|
||||
@@ -1465,15 +1626,23 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
DtSeriesDesarmado = New DataTable
|
||||
DtSeriesDesarmado.Columns.Add("Row", GetType(Integer))
|
||||
DtSeriesDesarmado.Columns.Add("Serie", GetType(String))
|
||||
DtSeriesDesarmado.Columns.Add("Lote", GetType(String))
|
||||
DtSeriesDesarmado.Columns.Add("FechaCaducidad", GetType(Date))
|
||||
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub BtnAgregarSerieDesarmado_Click(sender As Object, e As EventArgs)
|
||||
Dim Serie = TxtSerieDesarmado.Text.Trim
|
||||
Dim Serie As String = If(AplicaSeriePaquete, TxtSerieDesarmado.Text.Trim, "-1")
|
||||
Dim Lote As String = If(AplicaLotePaquete, TxtLoteDesarmado.Text.Trim, "-1")
|
||||
Dim FechaCaducidad As Date = If(AplicaCaducidadPaquete, TxtDesarmadoCaducidad.Text.ToDate, MinFecha)
|
||||
|
||||
'VERIFICA EXISTENCIAS
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim CveUMTemp = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePaqueteDesarmado).FiltroPrimeroValor("CveUM").ToEntero
|
||||
Dim Existencia = ObjInventarios.GetExistenciasPS(CvePaqueteDesarmado, CveUMTemp, UsuarioActual.CveEmpresa, CveAlmacenDesarmado, FechaMovto:=TxtFechaDesarmado.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Serie, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente))
|
||||
Dim Existencia = ObjInventarios.GetExistenciasPS(CvePaqueteDesarmado, CveUMTemp, UsuarioActual.CveEmpresa, CveAlmacenDesarmado, FechaMovto:=TxtFechaDesarmado.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Serie,
|
||||
CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), Lote:=Lote, FechaCaducidad:=FechaCaducidad)
|
||||
|
||||
If Existencia < 1 Then
|
||||
Alert($"No hay existencia suficiente con la Serie definida <b>""{Serie}""</b>. Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
|
||||
@@ -1495,9 +1664,15 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
Dim Row = DtSeriesDesarmado.NewRow
|
||||
Row("Row") = DtSeriesDesarmado.MAX("Row").ToEntero + 1
|
||||
Row("Serie") = TxtSerieDesarmado.Text.Trim
|
||||
Row("Lote") = TxtLoteDesarmado.Text.Trim
|
||||
Row("FechaCaducidad") = TxtDesarmadoCaducidad.Text.ToDate
|
||||
|
||||
DtSeriesDesarmado.Rows.Add(Row)
|
||||
|
||||
TxtSerieDesarmado.Text = ""
|
||||
TxtLoteDesarmado.Text = ""
|
||||
TxtDesarmadoCaducidad.Text = ""
|
||||
|
||||
|
||||
If DtSeriesDesarmado.Rows.Count >= TxtCantidadDesarmado.Text.ToEntero Then
|
||||
BtnAgregarSerieDesarmado.Enabled = False
|
||||
|
||||
@@ -3330,7 +3330,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Dim CveConceptoContableCostoME As Integer = -1
|
||||
Dim CveConceptoContableCostoComplementaria As Integer = -1
|
||||
Dim UsaComplementariaFleteImportaciones As Boolean = True
|
||||
If UsuarioActual.CveEmpresa = 119 Then UsaComplementariaFleteImportaciones = False
|
||||
If UsuarioActual.CveEmpresa.Contiene(119, 158) Then UsaComplementariaFleteImportaciones = False
|
||||
|
||||
If DtCostos.Rows.Count > 0 Then
|
||||
If CveCompraSurtir > 0 Then
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
|
||||
<label class="col-md-1 ">Estatus:</label>
|
||||
<div class="col-md-1" >
|
||||
<asp:DropDownList ID="DdlEstatusOS" runat="server" AppendDataBoundItems="true" Width="110px"
|
||||
<asp:DropDownList ID="DdlEstatusOS" runat="server" AppendDataBoundItems="true" Width="100%"
|
||||
DataTextField="EstatusOrdenServicio" DataValueField="CveEstatusOrdenServicio" Class="input-sm select2me">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
@@ -109,11 +109,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none">
|
||||
<div class="row">
|
||||
<label class="col-md-1 ">Técnico:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlTecnico" ClientIDMode="Static" CssClass="form-control input-sm select2me" runat="server" DataTextField="Nombre" DataValueField="CveUsuario" Width="110px" ></asp:DropDownList>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-1 ">Técnico:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlTecnico" ClientIDMode="Static" CssClass="form-control input-sm select2me" runat="server" DataTextField="Nombre" DataValueField="CveUsuario" Width="110px"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<asp:Label ID="LblProyecto" runat="server" class="col-md-1 truncate">Proyecto:</asp:Label>
|
||||
<div runat="server" id="DivProyecto" class="col-md-1">
|
||||
@@ -121,38 +121,44 @@
|
||||
</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>
|
||||
<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>
|
||||
|
||||
|
||||
<label class="col-md-1 ">Médico:</label>
|
||||
<label class="col-md-1 ">Médico:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlMedico" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Medico" DataValueField="CveMedico" Width="100%">
|
||||
<asp:ListItem Value="-1">Todos</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
<label class="col-md-1 ">Especialidad:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlEspecialidad" CssClass="form-control input-sm select2me" runat="server" DataTextField="Especialidad" Width="100%" DataValueField="CveMedicoEspecialidad"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 ">Procedimiento:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlProcedimiento" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Procedimiento" DataValueField="CveProcedimiento" Width="100%">
|
||||
<asp:ListItem Value="-1">Todos</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-1 ">Hospital:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlMedico" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Medico" DataValueField="CveMedico" Width="100%" >
|
||||
<asp:ListItem Value="-1">Todos</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:DropDownList ID="DdlClienteSucursal" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveClienteSucursal" CausesValidation="true" Width="100%" >
|
||||
</asp:DropDownList>
|
||||
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 ">Procedimiento:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlProcedimiento" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Procedimiento" DataValueField="CveProcedimiento" Width="100%" >
|
||||
<asp:ListItem Value="-1">Todos</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -80,6 +80,48 @@ Partial Class OS_RepOSMedicas
|
||||
DdlProcedimiento.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||
DdlProcedimiento.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"))
|
||||
|
||||
|
||||
Dim objcliente As New ClsClientes
|
||||
|
||||
If objcliente.GetClienteSucursales(-1, UsuarioActual.CveEmpresa) Then
|
||||
DdlClienteSucursal.DataSource = objcliente.DtResultados
|
||||
Else
|
||||
DdlClienteSucursal.DataSource = Nothing
|
||||
End If
|
||||
|
||||
objcliente.Dispose()
|
||||
|
||||
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
|
||||
|
||||
|
||||
@@ -101,7 +143,8 @@ Partial Class OS_RepOSMedicas
|
||||
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) Then
|
||||
CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveEspecialidad:=DdlEspecialidad.SelectedValue.ToEntero,
|
||||
CveClienteSucursal:=DdlClienteSucursal.SelectedValue.ToEntero) Then
|
||||
GvDatos.DataSource = ObjOS.DtResultados
|
||||
If ObjOS.DtResultados IsNot Nothing AndAlso ObjOS.DtResultados.Rows.Count > 0 Then
|
||||
LnkPersonalizar.Visible = True
|
||||
|
||||
361
Transportes/RepContratos - Copy.aspx
Normal file
361
Transportes/RepContratos - Copy.aspx
Normal file
@@ -0,0 +1,361 @@
|
||||
<%@ Page Language="VB" AutoEventWireup="true" Title="Transportes V&A - Contratos"
|
||||
MasterPageFile="~/Site.master"
|
||||
CodeFile="RepContratos - Copy.aspx.vb"
|
||||
Inherits="ListadoContratos" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="E" runat="Server">
|
||||
Listado de Contratos
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.my-1 {
|
||||
margin-block: 1rem;
|
||||
}
|
||||
|
||||
.dataTables_scrollHead {
|
||||
background-color: #DDD;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.table-scrollable {
|
||||
margin-top: 0px !important;
|
||||
margin-bottom: 0px !important;
|
||||
}
|
||||
|
||||
.Texto {
|
||||
text-align: left !important
|
||||
}
|
||||
|
||||
.boton {
|
||||
background: red;
|
||||
}
|
||||
|
||||
.consulta {
|
||||
padding: 1rem 2rem;
|
||||
background-color: #95A5A6;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.consulta_campo {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.consulta_campo label {
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel ID="UPPAcciones" runat="server" UpdateMode="Conditional" RenderMode="Inline">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LBAgregarContrato" runat="server"><i class='fa fa-plus'></i>Agregar Contrato</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LBExcel" runat="server"><i class="fa fa-file-excel-o"></i>Generar Excel</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LBExcel" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="consulta">
|
||||
<div class="consulta_campo">
|
||||
<label>Fecha Inicial:</label>
|
||||
|
||||
<asp:TextBox Width="150px" ID="txtFechaI" runat="server" CssClass="form-control"
|
||||
type="datetime"
|
||||
MaxLength="10"></asp:TextBox>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="consulta_campo">
|
||||
<label>Fecha Inicial:</label>
|
||||
|
||||
<asp:TextBox Width="150px" ID="txtFechaF" runat="server" CssClass="form-control"
|
||||
type="datetime"
|
||||
MaxLength="10"></asp:TextBox>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="consulta_campo">
|
||||
<label>Cliente</label>
|
||||
<ADS:Dropdownlost ID="DdlClientesConsulta" data-metodo="getcliente"
|
||||
runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 200px"
|
||||
CssClassDdl="pxlect2me"
|
||||
UsaWebService="true"></ADS:Dropdownlost>
|
||||
</div>
|
||||
|
||||
<div class="consulta_campo">
|
||||
<label>Estatus:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlEstatusConsulta" runat="server" Class="table-group-action-input form-control input-inline select2me"
|
||||
DataTextField="ContratoEstatus" DataValueField="CveContratoEstatus"
|
||||
AppendDataBoundItems="true"
|
||||
Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:Button ID="BtnConsulta" runat="server" Text="Consultar" class="btn btn-primary"
|
||||
OnClick="Consultar" />
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvContratos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se Encontró Contrato Registrado"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
|
||||
data-sort="true" DataKeyNames="CveContrato, DescripcionContrato, Ubicacion, FechaInicial, FechaFinal, CveCliente, CveTipoAF, Importe, ImporteMin, ImporteMax,CveChofer, Observaciones, CveContratosEstatus, CveAF">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Folio">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCveContrato" runat="server" Text='<%# Eval("CveContrato") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="100px">
|
||||
<HeaderTemplate>
|
||||
Fecha<br />
|
||||
Salida
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaI" runat="server" Text='<%# Eval("FechaInicial", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Viaje">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDescripcionContrato" runat="server" Text='<%# Eval("DescripcionContrato") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Cliente">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtNombreComercial" runat="server" Text='<%# Eval("NombreComercial") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Lugar Salida">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtUbicacion" runat="server" Text='<%# Eval("Ubicacion") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha Final" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px">
|
||||
<HeaderTemplate>
|
||||
Fecha<br />
|
||||
Regreso
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaFinal" runat="server" Text='<%# Eval("FechaFinal", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-CssClass="bold">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlEstatus" runat="server"
|
||||
Text='<%# Eval("ContratoEstatus1") %>' Style='<%# "color:" + If(Eval("BackgroundColor") IsNot DBNull.Value, Eval("BackgroundColor").ToString(), String.Empty) %>'>
|
||||
</asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div id="ModalAgregar" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel runat="server" ID="UpModal" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-dialog rowpadding">
|
||||
<div class="modal-content">
|
||||
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="myModalLabel" runat="server">Agregar Contrato</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Cliente</label>
|
||||
<div class="col-md-8">
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente"
|
||||
runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"
|
||||
UsaWebService="true" Enabled="false"></ADS:Dropdownlost>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Servicio:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtDescripcion" runat="server" MaxLength="70" Width="100%"
|
||||
TextMode="MultiLine"
|
||||
Rows="2"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVDescripcion" runat="server" ControlToValidate="TxtDescripcion"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripcion''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEDescripcion" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVDescripcion" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Observaciones:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="70" Width="100%"
|
||||
TextMode="MultiLine"
|
||||
Rows="2"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVObservaciones" runat="server" ControlToValidate="TxtObservaciones"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripcion''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEObservaciones" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVObservaciones" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Lugar de Salida:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtUbicacion" runat="server" MaxLength="70" Width="100%"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVUbicacion" runat="server" ControlToValidate="TxtUbicacion"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ubicación''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEUbicacion" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVUbicacion" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Fecha Salida:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtFechaSalida" runat="server" CssClass="form-control" CausesValidation="True"
|
||||
Width="100%"
|
||||
type="datetime-local"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtFechaSalida" runat="server" ControlToValidate="TxtFechaSalida"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Salida''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETxtFechaSalida" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVTxtFechaSalida" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Fecha Regreso:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtFechaRegreso" runat="server" CssClass="form-control" CausesValidation="True"
|
||||
Width="100%"
|
||||
type="datetime-local"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtFechaRegreso" runat="server" ControlToValidate="TxtFechaRegreso"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Regreso''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVTxtFechaRegreso" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">
|
||||
<asp:Label runat="server" Text="Tipo Unidad:"></asp:Label></label><div
|
||||
class="col-md-8">
|
||||
|
||||
<asp:DropDownList ID="DdlTipoAF" AppendDataBoundItems="true" DataTextField="TipoActivoFijo"
|
||||
DataValueField="CveTipoActivoFijo" Class="table-group-action-input form-control input-inline select2me"
|
||||
Width="100%" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTransporte" runat="server" ControlToValidate="DdlTipoAF"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Transporte''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETransporte" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVTransporte" Width="400px">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">
|
||||
<asp:Label runat="server" Text="Chofer:"></asp:Label></label><div
|
||||
class="col-md-8">
|
||||
|
||||
<asp:DropDownList ID="DdlChofer" AppendDataBoundItems="true" DataValueField="CvePersonal"
|
||||
DataTextField="NombreCompleto" Class="table-group-action-input form-control input-inline select2me"
|
||||
Width="100%" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVChofer" runat="server" ControlToValidate="DdlChofer"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEChofer" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVChofer" Width="400px">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Costo dólares:</label>
|
||||
<div class="col-md-8">
|
||||
|
||||
<asp:TextBox ID="TxtDolares" CssStyle=" form-control" runat="server" type="number"
|
||||
Width="95%"></asp:TextBox>
|
||||
<span class="fa fa-dollar"></span>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Costo pesos:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtPesos" CssStyle=" form-control" runat="server" type="number"
|
||||
Width="95%"></asp:TextBox>
|
||||
<span class="fa fa-dollar"></span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Anticipo:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtAnticipo" CssStyle=" form-control" Width="95%" runat="server"
|
||||
type="decimal"></asp:TextBox>
|
||||
<span class="fa fa-percent"></span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnGuardar" OnClick="AddContrato" runat="server" CssClass="btn btn-primary"
|
||||
Text="Guardar"
|
||||
ValidationGroup="GrpGuardar"></asp:Button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
|
||||
159
Transportes/RepContratos - Copy.aspx.vb
Normal file
159
Transportes/RepContratos - Copy.aspx.vb
Normal file
@@ -0,0 +1,159 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
Imports System.Data.SqlClient
|
||||
Imports Extensiones
|
||||
Imports Extensiones.ModExtensiones
|
||||
|
||||
Partial Class ListadoContratos
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property CveContrato As Integer
|
||||
Get
|
||||
Return ViewState("CveContrato").ToString().ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveContrato") = value
|
||||
End Set
|
||||
End Property
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
txtFechaI.Text = DateTime.Now.AddMonths(-1).ToString("MM/dd/yyyy").Replace(" ", "T")
|
||||
txtFechaF.Text = DateTime.Now.AddDays(7).ToString("MM/dd/yyyy").Replace(" ", "T")
|
||||
|
||||
If Not IsPostBack Then
|
||||
ViewState("CveContrato") = 0
|
||||
InicializaCombos()
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub InicializaCombos()
|
||||
'Lista Tipo AF
|
||||
DdlTipoAF.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa)
|
||||
DdlTipoAF.DataBind()
|
||||
DdlTipoAF.Items.Insert(0, New ListItem("-", ""))
|
||||
'Lista Chofer'
|
||||
DdlChofer.DataSource = GlobalDTRHPersonal(185)
|
||||
DdlChofer.DataBind()
|
||||
DdlChofer.Items.Insert(0, New ListItem("-", ""))
|
||||
UpModal.Update()
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjContratos As New ClsContratos
|
||||
If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, TipoContrato:=2) Then
|
||||
GvContratos.DataSource = ObjContratos.DtResultados
|
||||
GvContratos.DataBind()
|
||||
End If
|
||||
If ObjContratos.GetContratosEstatus(UsuarioActual.CveEmpresa) Then
|
||||
DdlEstatusConsulta.DataSource = ObjContratos.DtResultados
|
||||
DdlEstatusConsulta.DataBind()
|
||||
DdlEstatusConsulta.Items.Insert(0, New ListItem("-", ""))
|
||||
|
||||
End If
|
||||
UpTitulos.Update()
|
||||
|
||||
End Sub
|
||||
Protected Sub MostrarModal(Optional Descripcion As String = "", Optional FechaSalida As String = "", Optional FechaRegreso As String = "", Optional Observaciones As String = "", Optional Ubicacion As String = "", Optional Transporte As String = "", Optional CveCliente As Integer = 0, Optional Dolares As String = "", Optional Pesos As String = "", Optional Anticipo As String = "", Optional Boton As String = "Guardar", Optional Chofer As String = "")
|
||||
|
||||
'DdlClientes.SelectedText = Cliente
|
||||
TxtDescripcion.Text = Descripcion
|
||||
TxtUbicacion.Text = Ubicacion
|
||||
TxtFechaSalida.Text = FechaSalida
|
||||
TxtFechaRegreso.Text = FechaRegreso
|
||||
TxtObservaciones.Text = Observaciones
|
||||
TxtUbicacion.Text = Ubicacion
|
||||
DdlTipoAF.SelectedValue = Transporte
|
||||
DdlClientes.SelectedText = GlobalDTCliente(UsuarioActual.CveEmpresa, -1, CveCliente:=CveCliente).FiltroPrimeroValor("NombreComercial")
|
||||
DdlClientes.SelectedValue = CveCliente.ToString
|
||||
DdlChofer.SelectedValue = Chofer
|
||||
TxtObservaciones.Text = Observaciones
|
||||
TxtDolares.Text = Math.Round(Dolares.ToDecimal, 2).ToString
|
||||
TxtPesos.Text = Math.Round(Pesos.ToDecimal, 2).ToString
|
||||
TxtAnticipo.Text = Math.Round(Anticipo.ToDecimal * 100, 2).ToString
|
||||
BtnGuardar.Text = Boton
|
||||
myModalLabel.InnerHtml = $"{Boton} Contrato"
|
||||
UpModal.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalAgregar"))
|
||||
End Sub
|
||||
Private Sub LBAgregarContrato_Click(sender As Object, e As EventArgs) Handles LBAgregarContrato.Click
|
||||
MostrarModal()
|
||||
End Sub
|
||||
Protected Sub AddContrato(sender As Object, e As EventArgs)
|
||||
|
||||
If DdlClientes.SelectedValue = "" Then
|
||||
Alert("Debe seleccionar al cliente", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim ObjContratos As New ClsContratos
|
||||
ObjContratos.IniciaTransacSQL()
|
||||
|
||||
|
||||
'Agregar contrato
|
||||
If BtnGuardar.Text = "Guardar" Then
|
||||
If ObjContratos.AddContratos("", TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=2, CveContratosEstatus:=50, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero) > 0 Then
|
||||
ObjContratos.Commit()
|
||||
Alert("Agregado Correctamente.")
|
||||
End If
|
||||
End If
|
||||
|
||||
'Actualizar contrato
|
||||
If BtnGuardar.Text = "Editar" Then
|
||||
If ObjContratos.UpdateContratos(CveContrato, "", TxtDescripcion.Text, "", -1, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=2, CveContratosEstatus:=1, CveChofer:=DdlChofer.SelectedValue.ToEntero, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero) Then
|
||||
|
||||
ObjContratos.Commit()
|
||||
Alert("Actualizado Correctamente.")
|
||||
End If
|
||||
End If
|
||||
|
||||
TxtDescripcion.Text = ""
|
||||
TxtFechaSalida.Text = ""
|
||||
TxtFechaRegreso.Text = ""
|
||||
TxtObservaciones.Text = ""
|
||||
TxtUbicacion.Text = ""
|
||||
DdlClientes.SelectedText = ""
|
||||
DdlTipoAF.SelectedValue = ""
|
||||
DdlChofer.SelectedValue = ""
|
||||
TxtDolares.Text = ""
|
||||
TxtPesos.Text = ""
|
||||
TxtAnticipo.Text = ""
|
||||
BtnGuardar.Text = "Guardar"
|
||||
|
||||
ObjContratos.Dispose()
|
||||
CargaDatos()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LBExcel_Click(sender As Object, e As EventArgs) Handles LBExcel.Click
|
||||
GvContratos.ExportToExcel("ReporteCompras" & NowADS().ToShortDateString)
|
||||
End Sub
|
||||
|
||||
Protected Sub Consultar(sender As Object, e As EventArgs)
|
||||
Dim fechaInicial As String = txtFechaI.Text
|
||||
Dim fechaFinal As String = txtFechaF.Text
|
||||
|
||||
Dim cliente As String = If(DdlClientesConsulta.SelectedValue = "", "", $"C.CveCliente = {DdlClientesConsulta.SelectedValue} AND")
|
||||
Dim estatus As String = ""
|
||||
Dim nombreEstatus As String = ""
|
||||
Dim innerEstatus As String = ""
|
||||
If (DdlEstatusConsulta.SelectedValue <> "") Then
|
||||
estatus = $"C.CveContratosEstatus = {DdlEstatusConsulta.SelectedValue} AND"
|
||||
nombreEstatus = ", CE.ContratoEstatus As ContratoEstatus1"
|
||||
innerEstatus = "INNER JOIN Con_ContratosEstatus CE with(nolock) ON CE.CveContratoEstatus = C.CveContratosEstatus
|
||||
"
|
||||
End If
|
||||
Dim intervalo As String = If(DdlEstatusConsulta.SelectedValue = "" And DdlClientesConsulta.SelectedValue = "", $"FechaInicial BETWEEN '{fechaInicial}' AND '{fechaFinal}'", $"FechaInicial BETWEEN '{fechaInicial}' AND '{fechaFinal}'")
|
||||
|
||||
|
||||
Dim query As String = $"SELECT *, ISNULL(Cli.NombreComercial,'') AS NombreComercial {nombreEstatus} FROM Con_Contratos C LEFT JOIN Clientes Cli with(nolock) ON Cli.CveCliente = C.CveCliente {innerEstatus} WHERE {cliente} {estatus} {intervalo}"
|
||||
|
||||
Using connection As New SqlConnection(ConfigurationManager.ConnectionStrings("Conexion").ConnectionString)
|
||||
Using command As New SqlCommand(query, connection)
|
||||
connection.Open()
|
||||
Dim reader As SqlDataReader = command.ExecuteReader()
|
||||
GvContratos.DataSource = reader
|
||||
GvContratos.DataBind()
|
||||
End Using
|
||||
End Using
|
||||
|
||||
UpTitulos.Update()
|
||||
End Sub
|
||||
End Class
|
||||
@@ -13,24 +13,6 @@
|
||||
margin-block: 1rem;
|
||||
}
|
||||
|
||||
.dataTables_scrollHead {
|
||||
background-color: #DDD;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.table-scrollable {
|
||||
margin-top: 0px !important;
|
||||
margin-bottom: 0px !important;
|
||||
}
|
||||
|
||||
.Texto {
|
||||
text-align: left !important
|
||||
}
|
||||
|
||||
.boton {
|
||||
background: red;
|
||||
}
|
||||
|
||||
.consulta {
|
||||
padding: 1rem 2rem;
|
||||
background-color: #95A5A6;
|
||||
@@ -70,52 +52,49 @@
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="consulta">
|
||||
<div class="consulta_campo">
|
||||
<label>Fecha Inicial:</label>
|
||||
<%-- Filtros --%>
|
||||
<div class="consulta">
|
||||
<div class="consulta_campo">
|
||||
<label>Fecha Inicial:</label>
|
||||
|
||||
<asp:TextBox Width="150px" ID="txtFechaI" runat="server" CssClass="form-control"
|
||||
type="datetime"
|
||||
MaxLength="10"></asp:TextBox>
|
||||
<asp:TextBox Width="150px" ID="txtFechaI" runat="server" CssClass="form-control"
|
||||
type="datetime"
|
||||
MaxLength="10"></asp:TextBox>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="consulta_campo">
|
||||
<label>Fecha Inicial:</label>
|
||||
<div class="consulta_campo">
|
||||
<label>Fecha Inicial:</label>
|
||||
|
||||
<asp:TextBox Width="150px" ID="txtFechaF" runat="server" CssClass="form-control"
|
||||
type="datetime"
|
||||
MaxLength="10"></asp:TextBox>
|
||||
<asp:TextBox Width="150px" ID="txtFechaF" runat="server" CssClass="form-control"
|
||||
type="datetime"
|
||||
MaxLength="10"></asp:TextBox>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="consulta_campo">
|
||||
<label>Cliente</label>
|
||||
<ADS:Dropdownlost ID="DdlClientesConsulta" data-metodo="getcliente"
|
||||
runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 200px"
|
||||
CssClassDdl="pxlect2me"
|
||||
UsaWebService="true"></ADS:Dropdownlost>
|
||||
</div>
|
||||
<div class="consulta_campo">
|
||||
<label>Cliente</label>
|
||||
<ADS:Dropdownlost ID="DdlClientesConsulta" data-metodo="getcliente"
|
||||
runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 200px"
|
||||
CssClassDdl="pxlect2me"
|
||||
UsaWebService="true"></ADS:Dropdownlost>
|
||||
</div>
|
||||
|
||||
<div class="consulta_campo">
|
||||
<label>Estatus:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlEstatusConsulta" runat="server" Class="table-group-action-input form-control input-inline select2me"
|
||||
AppendDataBoundItems="true"
|
||||
Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:Button ID="BtnConsulta" runat="server" Text="Consultar" class="btn btn-primary"
|
||||
OnClick="Consultar"
|
||||
ValidationGroup="GrpConsulta" />
|
||||
<div class="consulta_campo">
|
||||
<label>Estatus:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlEstatusConsulta" runat="server" Class="table-group-action-input form-control input-inline select2me"
|
||||
DataTextField="ContratoEstatus" DataValueField="CveContratoEstatus"
|
||||
AppendDataBoundItems="true"
|
||||
Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<asp:Button ID="BtnConsulta" runat="server" Text="Consultar" class="btn btn-primary"
|
||||
OnClick="Consultar" />
|
||||
</div>
|
||||
<%-- Listado de Contratos --%>
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvContratos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se Encontró Contrato Registrado"
|
||||
@@ -169,7 +148,7 @@
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-CssClass="bold">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlEstatus" runat="server"
|
||||
Text='<%# Eval("ContratoEstatus1") %>' Style='<%# "color:" + If(Eval("BackgroundColor") IsNot DBNull.Value, Eval("BackgroundColor").ToString(), String.Empty) %>'>
|
||||
Text='<%# Eval("ContratoEstatus") %>' Style='<%# "color:" + If(Eval("BackgroundColor") IsNot DBNull.Value, Eval("BackgroundColor").ToString(), String.Empty) %>'>
|
||||
</asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
@@ -177,13 +156,12 @@
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<%-- Modal --%>
|
||||
<div id="ModalAgregar" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel runat="server" ID="UpModal" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-dialog rowpadding">
|
||||
<div class="modal-content">
|
||||
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
@@ -192,23 +170,26 @@
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<asp:Label runat="server" ID="LbFolio" Text="Folio"></asp:Label>
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Cliente</label>
|
||||
<div class="col-md-8">
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente"
|
||||
runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="86%" data-metodo="getcliente"
|
||||
runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 86%;"
|
||||
UsaWebService="true" Enabled="false"></ADS:Dropdownlost>
|
||||
<asp:LinkButton runat="server" CssClass="btn btn-primary fa-add" Width="12%"
|
||||
PostBackUrl="~/Ventas/Clientes.aspx?CveCliente=-1"></asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Servicio:</label>
|
||||
<label class="col-md-4">Servicio</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtDescripcion" runat="server" MaxLength="70" Width="100%"
|
||||
TextMode="MultiLine"
|
||||
Rows="2"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVDescripcion" runat="server" ControlToValidate="TxtDescripcion"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripcion''</b> es necesario, por favor ingréselo."
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Servicio''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEDescripcion" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVDescripcion" Width="100%">
|
||||
@@ -217,35 +198,23 @@
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Observaciones:</label>
|
||||
<label class="col-md-4">Observaciones</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="70" Width="100%"
|
||||
TextMode="MultiLine"
|
||||
Rows="2"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVObservaciones" runat="server" ControlToValidate="TxtObservaciones"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripcion''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEObservaciones" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVObservaciones" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Lugar de Salida:</label>
|
||||
<label class="col-md-4">Lugar de Salida</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtUbicacion" runat="server" MaxLength="70" Width="100%"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVUbicacion" runat="server" ControlToValidate="TxtUbicacion"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ubicación''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEUbicacion" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVUbicacion" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Fecha Salida:</label>
|
||||
<label class="col-md-4">Fecha Salida</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtFechaSalida" runat="server" CssClass="form-control" CausesValidation="True"
|
||||
Width="100%"
|
||||
@@ -260,7 +229,7 @@
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Fecha Regreso:</label>
|
||||
<label class="col-md-4">Fecha Regreso</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtFechaRegreso" runat="server" CssClass="form-control" CausesValidation="True"
|
||||
Width="100%"
|
||||
@@ -274,78 +243,68 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">
|
||||
<asp:Label runat="server" Text="Tipo Unidad:"></asp:Label></label><div
|
||||
class="col-md-8">
|
||||
|
||||
<asp:DropDownList ID="DdlTipoAF" AppendDataBoundItems="true" DataTextField="TipoActivoFijo"
|
||||
DataValueField="CveTipoActivoFijo" Class="table-group-action-input form-control input-inline select2me"
|
||||
Width="100%" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTransporte" runat="server" ControlToValidate="DdlTipoAF"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Transporte''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETransporte" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVTransporte" Width="400px">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">
|
||||
<asp:Label runat="server" Text="Chofer:"></asp:Label></label><div
|
||||
class="col-md-8">
|
||||
|
||||
<asp:DropDownList ID="DdlChofer" AppendDataBoundItems="true" DataValueField="CvePersonal"
|
||||
DataTextField="NombreCompleto" Class="table-group-action-input form-control input-inline select2me"
|
||||
Width="100%" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVChofer" runat="server" ControlToValidate="DdlChofer"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEChofer" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVChofer" Width="400px">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Costo dólares:</label>
|
||||
<label class="col-md-4">Cantidad de pasajeros</label>
|
||||
<div class="col-md-8">
|
||||
|
||||
<asp:TextBox ID="TxtDolares" CssStyle=" form-control" runat="server" type="number"
|
||||
Width="95%"></asp:TextBox>
|
||||
<span class="fa fa-dollar"></span>
|
||||
|
||||
|
||||
<asp:TextBox ID="TxtCantidadPasajeros" CssStyle="col-md-8 form-control" runat="server"
|
||||
type="number"
|
||||
Width="100%"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCantidadPasajeros" runat="server" ControlToValidate="TxtCantidadPasajeros"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad de pasajeros''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECantidadPasajeros" runat="server" HighlightCssClass="VCOCantidadPasajeros"
|
||||
TargetControlID="RFVCantidadPasajeros" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Costo pesos:</label>
|
||||
<label class="col-md-4">Tipo Unidad</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlTipoAF" AppendDataBoundItems="true" DataTextField="TipoActivoFijo"
|
||||
DataValueField="CveTipoActivoFijo" Class="table-group-action-input form-control input-inline select2me"
|
||||
Width="100%" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoAF" runat="server" ControlToValidate="DdlTipoAF"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Unidad''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETipoAF" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVTipoAF" Width="400px">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Costo dólares</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtDolares" CssStyle=" form-control" runat="server" type="number"
|
||||
Width="95%"></asp:TextBox>
|
||||
<span class="fa fa-dollar"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Costo pesos</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtPesos" CssStyle=" form-control" runat="server" type="number"
|
||||
Width="95%"></asp:TextBox>
|
||||
<span class="fa fa-dollar"></span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Anticipo:</label>
|
||||
<label class="col-md-4">Anticipo</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtAnticipo" CssStyle=" form-control" Width="95%" runat="server"
|
||||
type="decimal"></asp:TextBox>
|
||||
<span class="fa fa-percent"></span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnGuardar" OnClick="AddContrato" runat="server" CssClass="btn btn-primary"
|
||||
Text="Guardar"
|
||||
Text="Agregar"
|
||||
ValidationGroup="GrpGuardar"></asp:Button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports Extensiones
|
||||
Imports Extensiones.ModExtensiones
|
||||
@@ -7,20 +8,11 @@ Imports Extensiones.ModExtensiones
|
||||
Partial Class ListadoContratos
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property CveContrato As Integer
|
||||
Get
|
||||
Return ViewState("CveContrato").ToString().ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveContrato") = value
|
||||
End Set
|
||||
End Property
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
txtFechaI.Text = DateTime.Now.AddMonths(-1).ToString("yyyy-MM-dd").Replace(" ", "T")
|
||||
txtFechaF.Text = DateTime.Now.AddDays(7).ToString("yyyy-MM-dd").Replace(" ", "T")
|
||||
txtFechaI.Text = DateTime.Now.AddMonths(-1).ToString("MM/dd/yyyy").Replace(" ", "T")
|
||||
txtFechaF.Text = DateTime.Now.AddDays(7).ToString("MM/dd/yyyy").Replace(" ", "T")
|
||||
|
||||
If Not IsPostBack Then
|
||||
ViewState("CveContrato") = 0
|
||||
InicializaCombos()
|
||||
CargaDatos()
|
||||
End If
|
||||
@@ -38,33 +30,30 @@ Partial Class ListadoContratos
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjContratos As New ClsContratos
|
||||
|
||||
If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, TipoContrato:=2) Then
|
||||
GvContratos.DataSource = ObjContratos.DtResultados
|
||||
GvContratos.DataBind()
|
||||
End If
|
||||
|
||||
If ObjContratos.GetContratosEstatus(UsuarioActual.CveEmpresa) Then
|
||||
DdlEstatusConsulta.DataSource = ObjContratos.DtResultados
|
||||
DdlEstatusConsulta.DataBind()
|
||||
DdlEstatusConsulta.Items.Insert(0, New ListItem("-", ""))
|
||||
End If
|
||||
|
||||
Dim CveSubProyecto As Integer = GlobalDTSubProyectos(-1, -1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", "EsMatriz = 1").ToEntero
|
||||
Dim ObjFolio As New ClsGralFolios
|
||||
If ObjFolio.GetFolios("Con", UsuarioActual.CveEmpresa, CveSubProyecto:=CveSubProyecto) Then
|
||||
If ObjFolio.DtResultados.Rows.Count > 0 Then
|
||||
Dim drr As DataRow = ObjFolio.DtResultados.FiltroPrimero("")
|
||||
LbFolio.Text = drr("FActual").ToString
|
||||
End If
|
||||
End If
|
||||
GvContratos.DataBind()
|
||||
UpTitulos.Update()
|
||||
|
||||
End Sub
|
||||
Protected Sub MostrarModal(Optional Descripcion As String = "", Optional FechaSalida As String = "", Optional FechaRegreso As String = "", Optional Observaciones As String = "", Optional Ubicacion As String = "", Optional Transporte As String = "", Optional CveCliente As Integer = 0, Optional Dolares As String = "", Optional Pesos As String = "", Optional Anticipo As String = "", Optional Boton As String = "Guardar", Optional Chofer As String = "")
|
||||
|
||||
'DdlClientes.SelectedText = Cliente
|
||||
TxtDescripcion.Text = Descripcion
|
||||
TxtUbicacion.Text = Ubicacion
|
||||
TxtFechaSalida.Text = FechaSalida
|
||||
TxtFechaRegreso.Text = FechaRegreso
|
||||
TxtObservaciones.Text = Observaciones
|
||||
TxtUbicacion.Text = Ubicacion
|
||||
DdlTipoAF.SelectedValue = Transporte
|
||||
DdlClientes.SelectedText = GlobalDTCliente(UsuarioActual.CveEmpresa, -1, CveCliente:=CveCliente).FiltroPrimeroValor("NombreComercial")
|
||||
DdlClientes.SelectedValue = CveCliente.ToString
|
||||
DdlChofer.SelectedValue = Chofer
|
||||
TxtObservaciones.Text = Observaciones
|
||||
TxtDolares.Text = Math.Round(Dolares.ToDecimal, 2).ToString
|
||||
TxtPesos.Text = Math.Round(Pesos.ToDecimal, 2).ToString
|
||||
TxtAnticipo.Text = Math.Round(Anticipo.ToDecimal * 100, 2).ToString
|
||||
BtnGuardar.Text = Boton
|
||||
myModalLabel.InnerHtml = $"{Boton} Contrato"
|
||||
UpModal.Update()
|
||||
Protected Sub MostrarModal()
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalAgregar"))
|
||||
End Sub
|
||||
Private Sub LBAgregarContrato_Click(sender As Object, e As EventArgs) Handles LBAgregarContrato.Click
|
||||
@@ -80,22 +69,9 @@ Partial Class ListadoContratos
|
||||
Dim ObjContratos As New ClsContratos
|
||||
ObjContratos.IniciaTransacSQL()
|
||||
|
||||
|
||||
'Agregar contrato
|
||||
If BtnGuardar.Text = "Guardar" Then
|
||||
If ObjContratos.AddContratos("", TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=2, CveContratosEstatus:=50, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero) > 0 Then
|
||||
ObjContratos.Commit()
|
||||
Alert("Agregado Correctamente.")
|
||||
End If
|
||||
End If
|
||||
|
||||
'Actualizar contrato
|
||||
If BtnGuardar.Text = "Editar" Then
|
||||
If ObjContratos.UpdateContratos(CveContrato, "", TxtDescripcion.Text, "", -1, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=2, CveContratosEstatus:=1, CveChofer:=DdlChofer.SelectedValue.ToEntero, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero) Then
|
||||
|
||||
ObjContratos.Commit()
|
||||
Alert("Actualizado Correctamente.")
|
||||
End If
|
||||
If ObjContratos.AddContratos("", TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=2, CveContratosEstatus:=50, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CantidadPasajeros:=TxtCantidadPasajeros.Text.ToEntero, Observaciones:=TxtObservaciones.Text) > 0 Then
|
||||
ObjContratos.Commit()
|
||||
Alert("Agregado Correctamente.")
|
||||
End If
|
||||
|
||||
TxtDescripcion.Text = ""
|
||||
@@ -105,13 +81,13 @@ Partial Class ListadoContratos
|
||||
TxtUbicacion.Text = ""
|
||||
DdlClientes.SelectedText = ""
|
||||
DdlTipoAF.SelectedValue = ""
|
||||
DdlChofer.SelectedValue = ""
|
||||
TxtDolares.Text = ""
|
||||
TxtPesos.Text = ""
|
||||
TxtAnticipo.Text = ""
|
||||
BtnGuardar.Text = "Guardar"
|
||||
TxtCantidadPasajeros.Text = ""
|
||||
|
||||
ObjContratos.Dispose()
|
||||
UpModal.Update()
|
||||
CargaDatos()
|
||||
|
||||
End Sub
|
||||
@@ -121,26 +97,26 @@ Partial Class ListadoContratos
|
||||
End Sub
|
||||
|
||||
Protected Sub Consultar(sender As Object, e As EventArgs)
|
||||
Dim fechaInicial As String = txtFechaI.Text
|
||||
Dim fechaFinal As String = txtFechaF.Text
|
||||
|
||||
If DdlClientesConsulta.SelectedValue = "" Then
|
||||
Alert("Debe seleccionar al cliente", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
Dim cliente As String = If(DdlClientesConsulta.SelectedValue = "", "", $"C.CveCliente = {DdlClientesConsulta.SelectedValue} AND")
|
||||
Dim estatus As String = ""
|
||||
Dim nombreEstatus As String = ""
|
||||
Dim innerEstatus As String = ""
|
||||
If (DdlEstatusConsulta.SelectedValue <> "") Then
|
||||
estatus = $"C.CveContratosEstatus = {DdlEstatusConsulta.SelectedValue} AND"
|
||||
nombreEstatus = ", CE.ContratoEstatus As ContratoEstatus1"
|
||||
innerEstatus = "INNER JOIN Con_ContratosEstatus CE with(nolock) ON CE.CveContratoEstatus = C.CveContratosEstatus
|
||||
"
|
||||
End If
|
||||
Dim intervalo As String = If(DdlEstatusConsulta.SelectedValue = "" And DdlClientesConsulta.SelectedValue = "", $"FechaInicial BETWEEN '{fechaInicial}' AND '{fechaFinal}'", $"FechaInicial BETWEEN '{fechaInicial}' AND '{fechaFinal}'")
|
||||
|
||||
Dim cliente As Integer = DdlClientesConsulta.SelectedValue.ToEntero
|
||||
Dim estatus As Integer = DdlEstatusConsulta.SelectedValue.ToEntero
|
||||
Dim fechaInicial As DateTime = txtFechaI.Text.ToDate
|
||||
Dim fechaFinal As DateTime = txtFechaF.Text.ToDate
|
||||
|
||||
Dim query As String = "SELECT *, ISNULL(Cli.NombreComercial,'') AS NombreComercial FROM Con_Contratos C LEFT JOIN Clientes Cli with(nolock) ON Cli.CveCliente = C.CveCliente WHERE C.CveCliente = @Cliente AND EstatusContrato = @Estatus AND FechaInicial BETWEEN @FechaInicial AND @FechaFinal"
|
||||
Dim query As String = $"SELECT *, ISNULL(Cli.NombreComercial,'') AS NombreComercial {nombreEstatus} FROM Con_Contratos C LEFT JOIN Clientes Cli with(nolock) ON Cli.CveCliente = C.CveCliente {innerEstatus} WHERE {cliente} {estatus} {intervalo}"
|
||||
|
||||
Using connection As New SqlConnection(ConfigurationManager.ConnectionStrings("Conexion").ConnectionString)
|
||||
Using command As New SqlCommand(query, connection)
|
||||
command.Parameters.AddWithValue("@Cliente", cliente)
|
||||
command.Parameters.AddWithValue("@Estatus", estatus)
|
||||
command.Parameters.AddWithValue("@FechaInicial", fechaInicial)
|
||||
command.Parameters.AddWithValue("@FechaFinal", fechaFinal)
|
||||
|
||||
connection.Open()
|
||||
Dim reader As SqlDataReader = command.ExecuteReader()
|
||||
GvContratos.DataSource = reader
|
||||
@@ -150,4 +126,5 @@ Partial Class ListadoContratos
|
||||
|
||||
UpTitulos.Update()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -212,7 +212,7 @@
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Acciones">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="BtnEditar" runat="server" AlternateText="Editar" CssClass="miGrid"
|
||||
OnClick="UpdateModal" Text="Editar" />
|
||||
OnClick="UpdateModal" Text="Actualizar Contrato" />
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
@@ -236,7 +236,7 @@
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="myModalLabel" runat="server">Editar Contrato</h4>
|
||||
<h4 class="modal-title" id="myModalLabel" runat="server">Actualizar Contrato</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
@@ -323,7 +323,7 @@
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Chofer</label>
|
||||
<label class="col-md-4">Chofer 1</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlChofer" AppendDataBoundItems="true" DataValueField="CvePersonal"
|
||||
DataTextField="NombreCompleto" Class="table-group-action-input form-control input-inline select2me"
|
||||
@@ -338,6 +338,22 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Chofer 2</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlChofer1" AppendDataBoundItems="true" DataValueField="CvePersonal"
|
||||
DataTextField="NombreCompleto" Class="table-group-action-input form-control input-inline select2me"
|
||||
Width="100%" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVChofer1" runat="server" ControlToValidate="DdlChofer1"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer1''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEChofer1" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVChofer1" Width="400px">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row hidden">
|
||||
<label class="col-md-4">Costo dólares:</label>
|
||||
<div class="col-md-8">
|
||||
@@ -373,7 +389,7 @@
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnGuardar" OnClick="UpdateContrato" runat="server" CssClass="btn btn-primary"
|
||||
Text="Editar"
|
||||
Text="Actualizar"
|
||||
ValidationGroup="GrpGuardar"></asp:Button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
@@ -415,11 +431,12 @@
|
||||
}
|
||||
|
||||
function updateEvent(event, element) {
|
||||
console.log(event)
|
||||
$('#<%=TxtObservaciones.ClientID%>').val(event.title);
|
||||
$('#<%=TxtDescripcion.ClientID%>').val(event.title);
|
||||
$('#<%=TxtUbicacion.ClientID%>').val(event.NombreAcercamiento);
|
||||
$('#<%=TxtFechaSalida.ClientID.ToString%>').val(event.start._i);
|
||||
$('#<%=TxtFechaRegreso.ClientID.ToString%>').val(event.end._i);
|
||||
$('#<%=TxtFechaSalida.ClientID%>').val(event.start._i);
|
||||
$('#<%=TxtFechaRegreso.ClientID%>').val(event.end._i);
|
||||
$('#<%=DdlClientes.ClientID%>').val(event.CveCliente);
|
||||
$('#<%=DdlAF.ClientID%>').val(event.CveActivoFijo);
|
||||
$('#<%=DdlChofer.ClientID%>').val(event.CvePersonal);
|
||||
|
||||
@@ -11,8 +11,8 @@ Partial Class RepContratosCalendario
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
txtFechaI.Text = DateTime.Now.AddMonths(-1).ToString("yyyy-MM-dd").Replace(" ", "T")
|
||||
txtFechaF.Text = DateTime.Now.AddDays(7).ToString("yyyy-MM-dd").Replace(" ", "T")
|
||||
txtFechaI.Text = DateTime.Now.AddMonths(-1).ToString("MM/dd/yyyy").Replace(" ", "T")
|
||||
txtFechaF.Text = DateTime.Now.AddDays(7).ToString("MM/dd/yyyy").Replace(" ", "T")
|
||||
|
||||
If Not IsPostBack Then
|
||||
CargaCombos()
|
||||
@@ -66,6 +66,9 @@ Partial Class RepContratosCalendario
|
||||
DdlChofer.DataSource = GlobalDTRHPersonal(185)
|
||||
DdlChofer.DataBind()
|
||||
DdlChofer.Items.Insert(0, New ListItem("-", ""))
|
||||
DdlChofer1.DataSource = GlobalDTRHPersonal(185)
|
||||
DdlChofer1.DataBind()
|
||||
DdlChofer1.Items.Insert(0, New ListItem("-", ""))
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -80,25 +83,26 @@ Partial Class RepContratosCalendario
|
||||
End Sub
|
||||
|
||||
Protected Sub Consultar(sender As Object, e As EventArgs)
|
||||
If DdlClientesConsulta.SelectedValue = "" Then
|
||||
Alert("Debe seleccionar al cliente", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
Dim fechaInicial As String = txtFechaI.Text
|
||||
Dim fechaFinal As String = txtFechaF.Text
|
||||
|
||||
Dim cliente As String = If(DdlClientesConsulta.SelectedValue = "", "", $"C.CveCliente = {DdlClientesConsulta.SelectedValue} AND")
|
||||
Dim estatus As String = ""
|
||||
Dim nombreEstatus As String = ""
|
||||
Dim innerEstatus As String = ""
|
||||
If (DdlEstatusConsulta.SelectedValue <> "") Then
|
||||
estatus = $"C.CveContratosEstatus = {DdlEstatusConsulta.SelectedValue} AND"
|
||||
nombreEstatus = ", CE.ContratoEstatus As ContratoEstatus1"
|
||||
innerEstatus = "INNER JOIN Con_ContratosEstatus CE with(nolock) ON CE.CveContratoEstatus = C.CveContratosEstatus
|
||||
"
|
||||
End If
|
||||
Dim intervalo As String = If(DdlEstatusConsulta.SelectedValue = "" And DdlClientesConsulta.SelectedValue = "", $"FechaInicial BETWEEN '{fechaInicial}' AND '{fechaFinal}'", $"FechaInicial BETWEEN '{fechaInicial}' AND '{fechaFinal}'")
|
||||
|
||||
Dim cliente As Integer = DdlClientesConsulta.SelectedValue.ToEntero
|
||||
Dim estatus As Integer = DdlEstatusConsulta.SelectedValue.ToEntero
|
||||
Dim fechaInicial As DateTime = txtFechaI.Text.ToDate
|
||||
Dim fechaFinal As DateTime = txtFechaF.Text.ToDate
|
||||
|
||||
Dim query As String = "SELECT *, ISNULL(Cli.NombreComercial,'') AS NombreComercial, RH.NombreCompleto AS NombreCompleto FROM Con_Contratos C LEFT JOIN Clientes Cli with(nolock) ON Cli.CveCliente = C.CveCliente LEFT JOIN RH_Personal RH with(nolock) ON C.CveChofer = RH.CvePersonal WHERE C.CveCliente = @Cliente AND EstatusContrato = @Estatus AND FechaInicial BETWEEN @FechaInicial AND @FechaFinal"
|
||||
Dim query As String = $"SELECT *, ISNULL(Cli.NombreComercial,'') AS NombreCompleto {nombreEstatus} FROM Con_Contratos C LEFT JOIN Clientes Cli with(nolock) ON Cli.CveCliente = C.CveCliente {innerEstatus} WHERE {cliente} {estatus} {intervalo}"
|
||||
|
||||
Using connection As New SqlConnection(ConfigurationManager.ConnectionStrings("Conexion").ConnectionString)
|
||||
Using command As New SqlCommand(query, connection)
|
||||
command.Parameters.AddWithValue("@Cliente", cliente)
|
||||
command.Parameters.AddWithValue("@Estatus", estatus)
|
||||
command.Parameters.AddWithValue("@FechaInicial", fechaInicial)
|
||||
command.Parameters.AddWithValue("@FechaFinal", fechaFinal)
|
||||
|
||||
connection.Open()
|
||||
Dim reader As SqlDataReader = command.ExecuteReader()
|
||||
GvContratos.DataSource = reader
|
||||
@@ -109,11 +113,12 @@ Partial Class RepContratosCalendario
|
||||
UpTitulos.Update()
|
||||
End Sub
|
||||
Protected Sub UpdateContrato(sender As Object, e As EventArgs)
|
||||
|
||||
Dim fechaS As Date = TxtFechaSalida.Text.ToDate
|
||||
Dim fechaR As Date = TxtFechaRegreso.Text.ToDate
|
||||
Dim ObjContratos As New ClsContratos
|
||||
ObjContratos.IniciaTransacSQL()
|
||||
|
||||
If ObjContratos.UpdateContratoAF(CveContrato.Value.ToEntero, DdlAF.SelectedValue.ToEntero, DdlChofer.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
If ObjContratos.UpdateContratos(CveContrato.Value.ToEntero, "", TxtDescripcion.Text, "", -1, DdlClientes.SelectedValue.ToEntero, -1, fechaS, fechaR, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=2, CveContratosEstatus:=1, CveChofer:=DdlChofer.SelectedValue.ToEntero, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveAF:=DdlTipoAF.SelectedValue.ToEntero) Then
|
||||
ObjContratos.Commit()
|
||||
Alert("Actualizado Correctamente.")
|
||||
Else
|
||||
@@ -129,8 +134,8 @@ Partial Class RepContratosCalendario
|
||||
TxtObservaciones.Text = GvRow.DataKey("Observaciones")
|
||||
TxtDescripcion.Text = GvRow.DataKey("DescripcionContrato")
|
||||
TxtUbicacion.Text = GvRow.DataKey("Ubicacion")
|
||||
TxtFechaSalida.Text = GvRow.DataKey("FechaInicial").ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T")
|
||||
TxtFechaRegreso.Text = GvRow.DataKey("FechaFinal").ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T")
|
||||
TxtFechaSalida.Text = GvRow.DataKey("FechaInicial").ToDateTime.ToString("MM/dd/yyyy")
|
||||
TxtFechaRegreso.Text = GvRow.DataKey("FechaFinal").ToDateTime.ToString("MM/dd/yyyy")
|
||||
DdlClientes.SelectedValue = GvRow.DataKey("CveCliente")
|
||||
DdlAF.SelectedValue = GvRow.DataKey("CveAF")
|
||||
DdlChofer.SelectedValue = GvRow.DataKey("CveChofer")
|
||||
|
||||
@@ -8508,7 +8508,7 @@
|
||||
|
||||
|
||||
<%--Cliente Sucursales --%>
|
||||
<div runat="server" visible="False" id="DvModalTipoVentaPasoCliente">
|
||||
<div runat="server" visible="False" id="DvModalTipoVentaClientesucursal">
|
||||
<div class="row">
|
||||
<div class="form-group col-md-12 form-md-line-input input-iconright ">
|
||||
<asp:DropDownList ID="DdlClienteSucursal" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="Clave" CausesValidation="true"
|
||||
@@ -8523,7 +8523,7 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<%--Medico Procedimiento--%>
|
||||
|
||||
@@ -539,6 +539,20 @@ Partial Class Ventas
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Private Property CveClienteOS As Integer
|
||||
Get
|
||||
If ViewState("CveClienteOS") Is Nothing Then
|
||||
ViewState("CveClienteOS") = -1
|
||||
End If
|
||||
Return ViewState("CveClienteOS").ToString().ToEntero()
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveClienteOS") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CveClienteSucursal As Integer
|
||||
Get
|
||||
If ViewState("CveClienteSucursal") Is Nothing Then
|
||||
@@ -36286,6 +36300,17 @@ Partial Class Ventas
|
||||
DdlClienteSucursal.DataBind()
|
||||
DdlClienteSucursal.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
|
||||
Dim EsWS As Boolean = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
||||
If EsWS Then
|
||||
DdlClientesModal.setEsWebService(True)
|
||||
|
||||
Else
|
||||
DdlClientesModal.setEsWebService(False)
|
||||
DdlClientesModal.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||
DdlClientesModal.DataBind()
|
||||
DdlClientesModal.ddl.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub ChkRequiereTecnico_CheckedChanged(sender As Object, e As EventArgs)
|
||||
@@ -36302,7 +36327,7 @@ Partial Class Ventas
|
||||
If RBLTipoVenta.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
DvModalTipoVentaPasoTipo.Visible = False
|
||||
DvModalTipoVentaPasoCliente.Visible = True
|
||||
DvModalTipoVentaClientesucursal.Visible = True
|
||||
DvModalTipoVentaPasoRequiereOS.Visible = True
|
||||
DvModalTipoVentaPasoMedicoProcedimiento.Visible = True
|
||||
|
||||
@@ -36328,6 +36353,7 @@ Partial Class Ventas
|
||||
ChkRequiereTecnicoModal.Checked = True
|
||||
ChkRequiereTecnicoModal.Enabled = False
|
||||
DvModalRequiereOSFecha.Visible = True
|
||||
DvModalTipoVentaCliente.Visible = True
|
||||
Case "3" 'A-Vista
|
||||
ChkRequiereTecnicoModal.Checked = False
|
||||
DvModalTipoVentaPasoRequiereOS.Visible = False
|
||||
@@ -36417,7 +36443,8 @@ Partial Class Ventas
|
||||
LnkDvModalTipoVentaAceptar.Visible = False
|
||||
|
||||
DvModalTipoVentaPasoTipo.Visible = True
|
||||
DvModalTipoVentaPasoCliente.Visible = False
|
||||
DvModalTipoVentaClientesucursal.Visible = False
|
||||
DvModalTipoVentaCliente.Visible = False
|
||||
DvModalTipoVentaPasoRequiereOS.Visible = False
|
||||
DvModalTipoVentaPasoMedicoProcedimiento.Visible = False
|
||||
|
||||
@@ -36450,15 +36477,35 @@ Partial Class Ventas
|
||||
|
||||
Protected Sub LnkDvModalTipoVentaAceptar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
If RBLTipoVenta.SelectedValue.ToEntero = 2 Then
|
||||
|
||||
If DdlClientesModal.SelectedValue.ToEntero > 0 Then
|
||||
ViewState("CveCliente") = DdlClientesModal.SelectedValue.ToEntero
|
||||
Else
|
||||
Alert("Debe de seleccionar un cliente.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
If DdlClienteSucursalCliente() > 0 Then
|
||||
ViewState("CveCliente") = DdlClienteSucursalCliente()
|
||||
If DdlClienteSucursalCliente() > 0 Then
|
||||
CveClienteOS = DdlClienteSucursalCliente()
|
||||
Else
|
||||
Alert("Debe de seleccionar un hospital.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Else
|
||||
Alert("Debe de seleccionar un cliente.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
If DdlClienteSucursalCliente() > 0 Then
|
||||
ViewState("CveCliente") = DdlClienteSucursalCliente()
|
||||
CveClienteOS = CveCliente
|
||||
Else
|
||||
Alert("Debe de seleccionar un cliente.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If ChkRequiereTecnicoModal.Checked Then
|
||||
If Not IsDate(TxtFechaModal.Text.Replace(",", "")) Then
|
||||
Alert("El campo fecha no es valido.", TipoMensaje.MsgAdvertencia)
|
||||
@@ -36670,7 +36717,7 @@ Partial Class Ventas
|
||||
|
||||
Dim EstatusOrdenServicio As Integer = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveEstatusOrdenServicio", "TipoEstatus = 1").ToEntero
|
||||
|
||||
If ObjOrdenServicio.AddOrdenesServicios(CveCliente, DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.Nombre, TxtFechaOS.Text.Replace(",", "").ToDateTime, $"Venta: {LblSerie.Text}-{TxtFolio.Text}", UsuarioActual.CveUsuario, EstatusOrdenServicio,
|
||||
If ObjOrdenServicio.AddOrdenesServicios(CveClienteOS, DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.Nombre, TxtFechaOS.Text.Replace(",", "").ToDateTime, $"Venta: {LblSerie.Text}-{TxtFolio.Text}", UsuarioActual.CveUsuario, EstatusOrdenServicio,
|
||||
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVentaOS, -1, -1, CveOSTipo, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero,
|
||||
Direccion:="", Telefono:="", CveModeloAuto:=-1, Año:="", CveMedico:=DdlMedico.SelectedValue.ToEntero,
|
||||
CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=RBLTipoVenta.SelectedValue.ToEntero, FechaCita:=TxtFechaOS.Text.Replace(",", "").ToDateTime,
|
||||
|
||||
Reference in New Issue
Block a user