This commit is contained in:
@@ -5041,7 +5041,21 @@ Namespace Modelos
|
||||
Public Property Inv_CveEstatusEntrega As Integer
|
||||
Public Property Inv_EstatusEntrega As String
|
||||
Public Property Inv_ValorInventario As Decimal
|
||||
Public Property Fecha As DateTime
|
||||
Public Property Fecha As DateTime
|
||||
<ComponentModel.DataAnnotations.Schema.NotMapped>
|
||||
Public ReadOnly Property FechaCP As DateTime
|
||||
Get
|
||||
If Me.SubProyecto IsNot Nothing Then
|
||||
If Now.EsHorarioVerano Then
|
||||
Return DateTime.UtcNow.AddHours(Me.SubProyecto.UTCOffsetVerano)
|
||||
Else
|
||||
Return DateTime.UtcNow.AddHours(Me.SubProyecto.UTCOffsetInvierno)
|
||||
End If
|
||||
Else
|
||||
Return Fecha
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
Public Property FechaVencimiento As DateTime
|
||||
Public Property EstatusFactura As String
|
||||
Public Property SeTimbro As String
|
||||
@@ -8486,6 +8500,8 @@ Namespace Modelos
|
||||
FormatoFactura = ""
|
||||
SubProyecto = ""
|
||||
Correo = ""
|
||||
UTCOffsetVerano = -7
|
||||
UTCOffsetInvierno = -7
|
||||
End Sub
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
@@ -8502,9 +8518,11 @@ Namespace Modelos
|
||||
Estado = Row("Estado").ToString
|
||||
Pais = Row("Pais").ToString
|
||||
CP = Row("CP").ToString
|
||||
SubProyecto = Row("SubProyecto").ToString
|
||||
SubProyecto = Row("SubProyecto").ToString
|
||||
UTCOffsetVerano = Row("UTCOffsetVerano").ToString.ToEntero()
|
||||
UTCOffsetInvierno = Row("UTCOffsetInvierno").ToString.ToEntero()
|
||||
End If
|
||||
'SetValues(Row)
|
||||
|
||||
End Sub
|
||||
|
||||
Public ReadOnly Property LugarExp As String
|
||||
@@ -8531,7 +8549,9 @@ Namespace Modelos
|
||||
Public Property SubProyecto As String
|
||||
Public Property Correo As String
|
||||
Public Property Telefono As String
|
||||
Public Property ImprimeNombre As String
|
||||
Public Property ImprimeNombre As String
|
||||
Public Property UTCOffsetVerano As Integer
|
||||
Public Property UTCOffsetInvierno As Integer
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
@@ -434,7 +434,7 @@ Namespace Extensiones
|
||||
Return retorno
|
||||
End Function
|
||||
<Runtime.CompilerServices.Extension()>
|
||||
Public Function FilesMove(oldName As String, newName As String, newDirectorio As String) As Boolean
|
||||
Public Function FilesMove(oldName As String, newName As String, newDirectorio As String, Optional Sobreescribir As Boolean = False) As Boolean
|
||||
Dim retorno As Boolean = True
|
||||
Dim directorioOld As New StringBuilder
|
||||
Dim directorioNew As New StringBuilder
|
||||
@@ -451,7 +451,7 @@ Namespace Extensiones
|
||||
|
||||
directorioNew.Append(newName)
|
||||
Try
|
||||
My.Computer.FileSystem.MoveFile(directorioOld.ToString, directorioNew.ToString)
|
||||
My.Computer.FileSystem.MoveFile(directorioOld.ToString, directorioNew.ToString, Sobreescribir)
|
||||
Catch ex As Exception
|
||||
Alert("", String.Format("{0} code[FilesMove]", ex.Message), TipoMensaje.MsgAdvertencia)
|
||||
retorno = False
|
||||
@@ -3100,6 +3100,31 @@ Namespace Extensiones
|
||||
Dim origin As DateTime = New DateTime(1970, 1, 1, 0, 0, 0, 0)
|
||||
Return origin.AddSeconds(timestamp)
|
||||
End Function
|
||||
<Runtime.CompilerServices.Extension()>
|
||||
Public Function GetLastWeekdayOfMonth(ByVal fecha As DateTime, day As DayOfWeek) As DateTime
|
||||
Dim lastDayOfMonth As DateTime = New DateTime(fecha.Year, fecha.Month, 1).AddMonths(1).AddDays(-1)
|
||||
Dim wantedDay As Integer = CInt(day)
|
||||
Dim lastDay As Integer = CInt(lastDayOfMonth.DayOfWeek)
|
||||
Return lastDayOfMonth.AddDays(If(lastDay >= wantedDay, wantedDay - lastDay, wantedDay - lastDay - 7))
|
||||
End Function
|
||||
<Runtime.CompilerServices.Extension()>
|
||||
Public Function GetFirstWeekdayOfMonth(ByVal fecha As DateTime, day As DayOfWeek) As DateTime
|
||||
Dim result As DateTime = New DateTime(fecha.Year, fecha.Month, 1)
|
||||
|
||||
While result.DayOfWeek <> day
|
||||
result = result.AddDays(1)
|
||||
End While
|
||||
|
||||
Return result
|
||||
End Function
|
||||
<Runtime.CompilerServices.Extension()>
|
||||
Public Function EsHorarioVerano(ByVal fecha As DateTime) As Boolean
|
||||
Dim Year As Integer = fecha.Year
|
||||
Dim FechaI As DateTime = New DateTime(Year, 4, 1, 0, 0, 0).GetFirstWeekdayOfMonth(DayOfWeek.Sunday) 'PRIMER DOMINGO DE ABRIL
|
||||
Dim FechaF As DateTime = New DateTime(Year, 10, 1, 23, 59, 59).GetLastWeekdayOfMonth(DayOfWeek.Sunday) 'ULTIMO DOMINGO DE OCTUBRE
|
||||
|
||||
Return fecha >= FechaI AndAlso fecha <= FechaF
|
||||
End Function
|
||||
End Module
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -416,7 +416,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
|
||||
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
||||
Timbre.Comprobante.Serie = Obj.Serie
|
||||
Timbre.Comprobante.Fecha = Obj.Fecha
|
||||
Timbre.Comprobante.Fecha = Obj.FechaCP
|
||||
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
||||
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
||||
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
||||
|
||||
@@ -668,7 +668,7 @@ Partial Class Contratos_FacturacionMasiva
|
||||
Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
|
||||
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
||||
Timbre.Comprobante.Serie = Obj.Serie
|
||||
Timbre.Comprobante.Fecha = Obj.Fecha
|
||||
Timbre.Comprobante.Fecha = Obj.FechaCP
|
||||
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
||||
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
||||
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -16,3 +16,9 @@
|
||||
.. PAC: 4 - Verificado : (6) 6 Certificado : (384) 390 Armado: (27) 417 Genera: (390) 807 Timbrado: (2271) 3078 Guardado: (219) 3297 Actualizado: (902) 4199 ..01/10/2019:12:27 a. m.
|
||||
|
||||
.. PAC: 4 - Verificado : (0) 0 Certificado : (204) 204 Armado: (1) 205 Genera: (249) 454 Timbrado: (431) 885 ..01/10/2019:12:27 a. m.
|
||||
|
||||
.. PAC: 2 - Verificado : (332) 332 Armado: (228) 560 Guardado: (284) 844 Timbrado: (2434) 3278 Actualizado: (367) 3645 ..06/11/2019:11:44 a. m.
|
||||
|
||||
.. PAC: 2 - Verificado : (207) 207 Armado: (233) 440 Guardado: (200) 640 Timbrado: (1745) 2385 Actualizado: (175) 2560 ..06/11/2019:11:53 a. m.
|
||||
|
||||
.. PAC: 2 - Verificado : (197) 197 Armado: (220) 417 Guardado: (233) 650 Timbrado: (1795) 2445 Actualizado: (172) 2617 ..06/11/2019:11:57 a. m.
|
||||
|
||||
@@ -1,374 +1,351 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepCotizacionesDetalle.aspx.vb" Inherits="PopOCCotizacionesDetalle" %>
|
||||
|
||||
<%--<%@ MasterType VirtualPath="~/Site.master" %>--%>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<table style="width: 797px!important">
|
||||
<tr>
|
||||
<th class="Titulos" colspan="4">Carga de Cotizaciones</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<div class="row" style="vertical-align: top">
|
||||
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
|
||||
<%--PROVEEDORES--%>
|
||||
<div class="col-sm-12 rowpadding">
|
||||
<div class="portlet light smmallpadding bordered">
|
||||
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-truck"></i><span class="caption-subject bold uppercase">Proveedores</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<div style="display: inline-block">
|
||||
</div>
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="portlet-body">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<label>Clasificación:</label></td>
|
||||
<td>
|
||||
<div>
|
||||
<asp:DropDownList ID="CboClasificacionProveedor" CssClass="select2me" runat="server" AutoPostBack="true" DataTextField="ProveedorClasificacion" DataValueField="CveProveedorClasificacion"
|
||||
Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 200px !important;">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label>Proveedor:</label>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<asp:DropDownList ID="CboProveedores" CssClass="select2me" runat="server" DataTextField="RazonSocial" DataValueField="CveProveedor"
|
||||
Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 200px !important;">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVProveedor" runat="server" ControlToValidate="CboProveedores"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Proveedor''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpDetalleGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEProveedor" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVProveedor" Width="300px">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%--ARCHIVO--%>
|
||||
<div class="col-sm-12 rowpadding" style="text-align:center;">
|
||||
Archivo:
|
||||
<asp:HyperLink ID="HplArchivo" runat="server" ToolTip="Descargar" Visible="false" Height="20px">[HplArchivo]</asp:HyperLink>
|
||||
|
||||
<div class="btn-file btn green">
|
||||
<i class="fa fa-plus"></i>
|
||||
<span>Seleccionar Archivo</span>
|
||||
<asp:FileUpload ID="FUArchivo" runat="server" onchange="$('#FUTxtt').text(this.value);" />
|
||||
</div>
|
||||
<span id="FUTxtt"></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%--DATOS DE COTIZACION--%>
|
||||
<div class="col-sm-6 rowpadding">
|
||||
|
||||
<div class="portlet light smmallpadding bordered">
|
||||
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-money"></i><span class="caption-subject bold uppercase">Datos contización</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<div style="display: inline-block">
|
||||
</div>
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="portlet-body">
|
||||
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<label>Folio:</label></td>
|
||||
<td>
|
||||
<div>
|
||||
<asp:TextBox AutoComplete="off" ID="TxtFolio" runat="server" Style="width: 200px !important;"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFolio" runat="server" ControlToValidate="TxtFolio"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpDetalleGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFolio" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVFolio" Width="300px">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label>Fecha Cotización:</label></td>
|
||||
<td>
|
||||
<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 AutoComplete="off" ID="TxtFecha" runat="server" CausesValidation="true" MaxLength="10" ValidationGroup="GrpGuardar" Style="width: 183px !important;"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgFecha" Style="margin-left: -10px!important" class="btn default" Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
|
||||
|
||||
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" AcceptNegative="Left" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder=""
|
||||
CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder=""
|
||||
DisplayMoney="Left" Enabled="True" ErrorTooltipEnabled="True" Mask="99/99/9999"
|
||||
MaskType="Date" TargetControlID="TxtFecha" />
|
||||
<ajax:MaskedEditValidator ID="MEVFecha" runat="server" ControlExtender="MEEFecha"
|
||||
ControlToValidate="TxtFecha" Display="None" EmptyValueBlurredText="*" EmptyValueMessage="Fecha de Inicio de pagos Requerida"
|
||||
ErrorMessage="" InvalidValueBlurredMessage="*" InvalidValueMessage="Fecha Inválida"
|
||||
IsValidEmpty="False" TooltipMessage="Ingrese Fecha" ValidationGroup="GrpGuardar" />
|
||||
<ajax:CalendarExtender ID="CEFecha" runat="server" Enabled="True" PopupButtonID="imgFecha" PopupPosition="Left" TargetControlID="TxtFecha"></ajax:CalendarExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoFechaI" runat="server" HighlightCssClass="vco" TargetControlID="MEVFecha" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label>Moneda:</label></td>
|
||||
<td>
|
||||
<div>
|
||||
<asp:DropDownList ID="ddlMoneda" DataValueField="CveMoneda" DataTextField="Moneda" Class="table-group-action-input form-control input-inline input-small input-sm select2me" Style="width: 200px !important;" runat="server"></asp:DropDownList>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label>Días de Crédito:</label></td>
|
||||
<td>
|
||||
<div>
|
||||
<asp:TextBox AutoComplete="off" runat="server" ID="TxtDiasCredito" Style="width: 200px !important;"></asp:TextBox>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<asp:GridView ID="GvDC" runat="server" AutoGenerateColumns="False" DataKeyNames="CveOrdenCompra, CvePS, Cantidad, CveUnidadMedida,CveOrdenCompraDetalle"
|
||||
ShowHeader="True" CssClass="table table-striped table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Cant.">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox AutoComplete="off" ID="TxtCant" runat="server" Width="35" ReadOnly="True" Style="text-align: right; border: none; background-color: #fff; background: transparent;" Text='<%# Eval("Cantidad", "{0:N2}") %>'></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="40" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Unidad">
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="CboUnidadMedidaEdit" runat="server" DataTextField="Abreviatura"
|
||||
DataValueField="CveUnidadMedida" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 70px !important;">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVUnidadMedida" runat="server" ControlToValidate="CboUnidadMedidaEdit"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad de Medida''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpEditGuardar"></asp:RequiredFieldValidator>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LA" runat="server" Text='<%# Bind("Abreviatura") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50px" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Descripción">
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox AutoComplete="off" ID="TxtDescripDetalleEdit" runat="server" Text='<%# Bind("Descripcion") %>'
|
||||
Width="345px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVDescripcion" runat="server" ControlToValidate="TxtDescripDetalleEdit"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripción''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpEditGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOEmpresa" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVDescripcion" Width="300px">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LDescrip" runat="server" Text='<%# Bind("PS") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="250px" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:BoundField DataField="Observacion" HeaderText="Observación" />
|
||||
<asp:TemplateField ShowHeader="False" HeaderText="Cantidad Surtir">
|
||||
<EditItemTemplate>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox AutoComplete="off" ID="TxtCantidadSurtir" runat="server" Width="55px" Style="text-align: right" Text="" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCantidadSurtir" runat="server" ControlToValidate="TxtCantidadSurtir" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad a Surtir''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEditGuardar" Enabled="false"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECantidadSurtir" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidadSurtir" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:RangeValidator ID="RVCantidad" runat="server" ControlToValidate="TxtCantidadSurtir" Display="None" Type="Double" MinimumValue="0.01" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad Surtir''</b> debe ser mayor a cero y menor que la cantidad solicitada" ValidationGroup="GrpEditGuardar" Enabled="false"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECantidad" runat="server" HighlightCssClass="vco" TargetControlID="RVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:FilteredTextBoxExtender ID="FilCantidadSurtir" runat="server" TargetControlID="TxtCantidadSurtir" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="55px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ShowHeader="False" HeaderText="Fecha Entrega">
|
||||
<EditItemTemplate>
|
||||
</EditItemTemplate>
|
||||
<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="txtFechaEntrega" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 87px" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFechaFinContrato" Style="margin-left: -10px!important" class="btn default" Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaEntrega" runat="server" TargetControlID="txtFechaEntrega" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaEntrega" TargetControlID="txtFechaEntrega" PopupButtonID="ImgFechaFinContrato" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="CVImgFechaEntrega" runat="server" Format="dd/MM/yyyy" ControlToValidate="txtFechaEntrega" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpEditGuardar" Enabled="false"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOImgFechaEntrega" runat="server" HighlightCssClass="vco" TargetControlID="CVImgFechaEntrega" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVtxtFechaEntrega" runat="server" ControlToValidate="txtFechaEntrega" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha entrega''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEditGuardar" Enabled="false"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCtxtFechaEntrega" runat="server" HighlightCssClass="vco" TargetControlID="RFVtxtFechaEntrega" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ShowHeader="False" HeaderText="Precio Unitario">
|
||||
<EditItemTemplate>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox AutoComplete="off" ID="TxtPU" runat="server" Width="70px" Style="text-align: right" Text='<%# If(Not EsNuevo, Eval("PU", "{0:###,###,###.##}"), "") %>'></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtPU" runat="server" ControlToValidate="TxtPU" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio unitario''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEditGuardar" Enabled="false"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEPU" runat="server" HighlightCssClass="vco" TargetControlID="RFVTxtPU" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:FilteredTextBoxExtender ID="FilTxtPU" runat="server" TargetControlID="TxtPU" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="70px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ShowHeader="False" HeaderText="Importe">
|
||||
<EditItemTemplate>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox AutoComplete="off" ID="TxtImporte" runat="server" Width="75px" ReadOnly="True" Style="text-align: right; border: none; background-color: #fff; background: transparent;" Text='<%# If(Not EsNuevo, Eval("Importe", "{0:###,###,###.##}"), "") %>'></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="75px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ShowHeader="False" HeaderText="Observación">
|
||||
<EditItemTemplate>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox AutoComplete="off" ID="TxtObservacion" runat="server" Width="75px" Style="text-align: right" Text=""></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px" />
|
||||
</asp:TemplateField>
|
||||
<%--<asp:BoundField DataField="Happy" HeaderText="Happy" />--%>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="text-align: center">
|
||||
<asp:Button ID="BtnGuardar" runat="server" Text="Guardar" Visible="false" ValidationGroup="GrpEditGuardar" class="btn btn-primary" CausesValidation="true" />
|
||||
<asp:Button ID="BtnEliminar" runat="server" Text="Eliminar" Visible="false" ValidationGroup="GrpEliminar" CssClass="btn btn-danger" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepCotizacionesDetalle.aspx.vb" Inherits="PopOCCotizacionesDetalle" %>
|
||||
|
||||
<%--<%@ MasterType VirtualPath="~/Site.master" %>--%>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<table style="width: 797px!important">
|
||||
<tr>
|
||||
<th class="Titulos" colspan="4">Carga de Cotizaciones</th>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-sm-6 rowpadding">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="portlet light smmallpadding bordered">
|
||||
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-truck"></i><span class="caption-subject bold uppercase">Proveedores</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<div style="display: inline-block">
|
||||
</div>
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="portlet-body">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<label>Clasificación:</label></td>
|
||||
<td>
|
||||
<div>
|
||||
<asp:DropDownList ID="CboClasificacionProveedor" CssClass="select2me" runat="server" AutoPostBack="true" DataTextField="ProveedorClasificacion" DataValueField="CveProveedorClasificacion"
|
||||
Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 200px !important;">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label>Proveedor:</label>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<asp:DropDownList ID="CboProveedores" CssClass="select2me" runat="server" DataTextField="RazonSocial" DataValueField="CveProveedor"
|
||||
Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 200px !important;">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVProveedor" runat="server" ControlToValidate="CboProveedores"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Proveedor''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpDetalleGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEProveedor" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVProveedor" Width="300px">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet light smmallpadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-file"></i><span class="caption-subject bold uppercase">Archivo</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<div style="display: inline-block">
|
||||
<asp:LinkButton ID="LnkArchivo" Visible="false" runat="server" OnClick="LnkArchivo_Click" Text="<i class='fa fa-download' aria-hidden='true'></i> Descargar"></asp:LinkButton>
|
||||
</div>
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<asp:TextBox ID="TxtArchivo" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkArchivo" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="col-sm-6 rowpadding">
|
||||
<div class="portlet light smmallpadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-money"></i><span class="caption-subject bold uppercase">Datos contización</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<div style="display: inline-block">
|
||||
</div>
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<label>Folio:</label></td>
|
||||
<td>
|
||||
<div>
|
||||
<asp:TextBox AutoComplete="off" ID="TxtFolio" runat="server" Style="width: 200px !important;"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFolio" runat="server" ControlToValidate="TxtFolio"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpDetalleGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFolio" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVFolio" Width="300px">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label>Fecha Cotización:</label></td>
|
||||
<td>
|
||||
<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 AutoComplete="off" ID="TxtFecha" runat="server" CausesValidation="true" MaxLength="10" ValidationGroup="GrpGuardar" Style="width: 183px !important;"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgFecha" Style="margin-left: -10px!important" class="btn default" Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
|
||||
|
||||
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" AcceptNegative="Left" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder=""
|
||||
CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder=""
|
||||
DisplayMoney="Left" Enabled="True" ErrorTooltipEnabled="True" Mask="99/99/9999"
|
||||
MaskType="Date" TargetControlID="TxtFecha" />
|
||||
<ajax:MaskedEditValidator ID="MEVFecha" runat="server" ControlExtender="MEEFecha"
|
||||
ControlToValidate="TxtFecha" Display="None" EmptyValueBlurredText="*" EmptyValueMessage="Fecha de Inicio de pagos Requerida"
|
||||
ErrorMessage="" InvalidValueBlurredMessage="*" InvalidValueMessage="Fecha Inválida"
|
||||
IsValidEmpty="False" TooltipMessage="Ingrese Fecha" ValidationGroup="GrpGuardar" />
|
||||
<ajax:CalendarExtender ID="CEFecha" runat="server" Enabled="True" PopupButtonID="imgFecha" PopupPosition="Left" TargetControlID="TxtFecha"></ajax:CalendarExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoFechaI" runat="server" HighlightCssClass="vco" TargetControlID="MEVFecha" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label>Moneda:</label></td>
|
||||
<td>
|
||||
<div>
|
||||
<asp:DropDownList ID="ddlMoneda" DataValueField="CveMoneda" DataTextField="Moneda" Class="table-group-action-input form-control input-inline input-small input-sm select2me" Style="width: 200px !important;" runat="server"></asp:DropDownList>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label>Días de Crédito:</label></td>
|
||||
<td>
|
||||
<div>
|
||||
<asp:TextBox AutoComplete="off" runat="server" ID="TxtDiasCredito" Style="width: 200px !important;"></asp:TextBox>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<asp:GridView ID="GvDC" runat="server" AutoGenerateColumns="False" DataKeyNames="CveOrdenCompra, CvePS, Cantidad, CveUnidadMedida,CveOrdenCompraDetalle"
|
||||
ShowHeader="True" CssClass="table table-striped table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Cant.">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox AutoComplete="off" ID="TxtCant" runat="server" Width="35" ReadOnly="True" Style="text-align: right; border: none; background-color: #fff; background: transparent;" Text='<%# Eval("Cantidad", "{0:N2}") %>'></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="40" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Unidad">
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="CboUnidadMedidaEdit" runat="server" DataTextField="Abreviatura"
|
||||
DataValueField="CveUnidadMedida" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 70px !important;">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVUnidadMedida" runat="server" ControlToValidate="CboUnidadMedidaEdit"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad de Medida''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpEditGuardar"></asp:RequiredFieldValidator>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LA" runat="server" Text='<%# Bind("Abreviatura") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50px" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Descripción">
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox AutoComplete="off" ID="TxtDescripDetalleEdit" runat="server" Text='<%# Bind("Descripcion") %>'
|
||||
Width="345px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVDescripcion" runat="server" ControlToValidate="TxtDescripDetalleEdit"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripción''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpEditGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOEmpresa" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVDescripcion" Width="300px">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LDescrip" runat="server" Text='<%# Bind("PS") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="250px" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:BoundField DataField="Observacion" HeaderText="Observación" />
|
||||
<asp:TemplateField ShowHeader="False" HeaderText="Cantidad Surtir">
|
||||
<EditItemTemplate>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox AutoComplete="off" ID="TxtCantidadSurtir" runat="server" Width="55px" Style="text-align: right" Text="" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCantidadSurtir" runat="server" ControlToValidate="TxtCantidadSurtir" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad a Surtir''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEditGuardar" Enabled="false"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECantidadSurtir" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidadSurtir" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:RangeValidator ID="RVCantidad" runat="server" ControlToValidate="TxtCantidadSurtir" Display="None" Type="Double" MinimumValue="0.01" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad Surtir''</b> debe ser mayor a cero y menor que la cantidad solicitada" ValidationGroup="GrpEditGuardar" Enabled="false"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECantidad" runat="server" HighlightCssClass="vco" TargetControlID="RVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:FilteredTextBoxExtender ID="FilCantidadSurtir" runat="server" TargetControlID="TxtCantidadSurtir" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="55px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ShowHeader="False" HeaderText="Fecha Entrega">
|
||||
<EditItemTemplate>
|
||||
</EditItemTemplate>
|
||||
<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="txtFechaEntrega" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 87px" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFechaFinContrato" Style="margin-left: -10px!important" class="btn default" Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaEntrega" runat="server" TargetControlID="txtFechaEntrega" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaEntrega" TargetControlID="txtFechaEntrega" PopupButtonID="ImgFechaFinContrato" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="CVImgFechaEntrega" runat="server" Format="dd/MM/yyyy" ControlToValidate="txtFechaEntrega" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpEditGuardar" Enabled="false"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOImgFechaEntrega" runat="server" HighlightCssClass="vco" TargetControlID="CVImgFechaEntrega" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVtxtFechaEntrega" runat="server" ControlToValidate="txtFechaEntrega" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha entrega''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEditGuardar" Enabled="false"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCtxtFechaEntrega" runat="server" HighlightCssClass="vco" TargetControlID="RFVtxtFechaEntrega" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ShowHeader="False" HeaderText="Precio Unitario">
|
||||
<EditItemTemplate>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox AutoComplete="off" ID="TxtPU" runat="server" Width="70px" Style="text-align: right" Text='<%# If(Not EsNuevo, Eval("PU", "{0:###,###,###.##}"), "") %>'></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtPU" runat="server" ControlToValidate="TxtPU" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio unitario''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEditGuardar" Enabled="false"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEPU" runat="server" HighlightCssClass="vco" TargetControlID="RFVTxtPU" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:FilteredTextBoxExtender ID="FilTxtPU" runat="server" TargetControlID="TxtPU" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="70px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ShowHeader="False" HeaderText="Importe">
|
||||
<EditItemTemplate>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox AutoComplete="off" ID="TxtImporte" runat="server" Width="75px" ReadOnly="True" Style="text-align: right; border: none; background-color: #fff; background: transparent;" Text='<%# If(Not EsNuevo, Eval("Importe", "{0:###,###,###.##}"), "") %>'></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="75px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ShowHeader="False" HeaderText="Observación">
|
||||
<EditItemTemplate>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox AutoComplete="off" ID="TxtObservacion" runat="server" Width="75px" Style="text-align: right" Text=""></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px" />
|
||||
</asp:TemplateField>
|
||||
<%--<asp:BoundField DataField="Happy" HeaderText="Happy" />--%>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="text-align: center">
|
||||
<asp:Button ID="BtnGuardar" runat="server" Text="Guardar" Visible="false" ValidationGroup="GrpEditGuardar" class="btn btn-primary" CausesValidation="true" />
|
||||
<asp:Button ID="BtnEliminar" runat="server" Text="Eliminar" Visible="false" ValidationGroup="GrpEliminar" CssClass="btn btn-danger" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script>
|
||||
function Ir() {
|
||||
try {
|
||||
function Ir() {
|
||||
try {
|
||||
parent.CargaDatosCotizaciones();
|
||||
parent.tb_remove();
|
||||
parent.tb_remove();
|
||||
|
||||
} catch (ex) {
|
||||
console.log(ex.message);
|
||||
}
|
||||
} catch (ex) {
|
||||
console.log(ex.message);
|
||||
}
|
||||
}
|
||||
|
||||
function ClientValidateFechaEntrega(source, arguments) {
|
||||
function ClientValidateFechaEntrega(source, arguments) {
|
||||
var txtCantidadSurtir = document.getElementById(source.txtCantidadSurtir);
|
||||
|
||||
if (txtCantidadSurtir.value == 0) {
|
||||
arguments.IsValid = false;
|
||||
} else {
|
||||
if (txtCantidadSurtir.value == 0) {
|
||||
arguments.IsValid = false;
|
||||
} else {
|
||||
if (arguments.Value == "" || arguments.Value == "__/__/____")
|
||||
{ arguments.IsValid = false; }
|
||||
else
|
||||
{ arguments.IsValid = true; }
|
||||
}
|
||||
{ arguments.IsValid = true; }
|
||||
}
|
||||
}
|
||||
|
||||
function ClientValidatePU(source, arguments) {
|
||||
function ClientValidatePU(source, arguments) {
|
||||
|
||||
arguments.IsValid = true
|
||||
arguments.IsValid = true
|
||||
|
||||
}
|
||||
|
||||
function isNumeric(n) {
|
||||
return !isNaN(parseFloat(n)) && isFinite(n);
|
||||
function isNumeric(n) {
|
||||
return !isNaN(parseFloat(n)) && isFinite(n);
|
||||
}
|
||||
|
||||
function CalculaImporte(Cant, tPU, Imp) {
|
||||
function CalculaImporte(Cant, tPU, Imp) {
|
||||
var Cantidad = ToDouble(Cant.value);
|
||||
var PU = ToDouble(tPU.value);
|
||||
var Importe = Cantidad * PU;
|
||||
|
||||
Imp.value = ToDouble(Importe);
|
||||
Imp.value = ToDouble(Importe);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function validacionRow(objControl, tipo) {
|
||||
function validacionRow(objControl, tipo) {
|
||||
|
||||
var eRow;
|
||||
|
||||
if (tipo == 1) {
|
||||
eRow = $(objControl).parent().parent();
|
||||
} else if (tipo == 2) {
|
||||
eRow = $(objControl).parent().parent().parent();
|
||||
if (tipo == 1) {
|
||||
eRow = $(objControl).parent().parent();
|
||||
} else if (tipo == 2) {
|
||||
eRow = $(objControl).parent().parent().parent();
|
||||
}
|
||||
|
||||
var arregloControles = $(eRow).attr("data-controles").split(',');
|
||||
@@ -379,55 +356,55 @@
|
||||
var controleslen = arregloControles.length;
|
||||
var validadoreslen = arregloValidadores.length;
|
||||
|
||||
for (var i = 0; i < controleslen; i++) {
|
||||
for (var i = 0; i < controleslen; i++) {
|
||||
|
||||
var controlName = String.format("{0}{1}", "#", arregloControles[i]);
|
||||
|
||||
controlName = controlName.replace("'", "")
|
||||
|
||||
if ($(controlName).val().length > 0) {
|
||||
if ($(controlName).val().length > 0) {
|
||||
|
||||
activarValidadores = true;
|
||||
$(controlName).IsValid = false;
|
||||
console.log('control con valor ' + $(controlName).val() + ' ' + $(controlName).val().length + ' ' + controlName);
|
||||
break;
|
||||
break;
|
||||
|
||||
} else {
|
||||
$(controlName).IsValid = true;
|
||||
}
|
||||
} else {
|
||||
$(controlName).IsValid = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (activarValidadores) {
|
||||
if (activarValidadores) {
|
||||
|
||||
for (var v = 0; v < validadoreslen; v++) {
|
||||
for (var v = 0; v < validadoreslen; v++) {
|
||||
|
||||
var ValidatorName = arregloValidadores[v];
|
||||
var procesoCorrecto = true;
|
||||
|
||||
ValidatorName = ValidatorName.replace("'", "");
|
||||
|
||||
try {
|
||||
try {
|
||||
|
||||
document.getElementById(ValidatorName).disabled = false;
|
||||
ValidatorEnable($get(ValidatorName), true);
|
||||
ValidatorEnable($get(ValidatorName), true);
|
||||
|
||||
} catch (err) {
|
||||
} catch (err) {
|
||||
|
||||
console.log(ValidatorName + " - " + err.message);
|
||||
procesoCorrecto = false;
|
||||
procesoCorrecto = false;
|
||||
|
||||
}
|
||||
|
||||
if (procesoCorrecto) {
|
||||
console.log('validadores activados');
|
||||
} else {
|
||||
console.log('Error al activar validadores');
|
||||
}
|
||||
if (procesoCorrecto) {
|
||||
console.log('validadores activados');
|
||||
} else {
|
||||
console.log('Error al activar validadores');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
for (var v = 0; v < validadoreslen; v++) {
|
||||
} else {
|
||||
for (var v = 0; v < validadoreslen; v++) {
|
||||
|
||||
var ValidatorName = arregloValidadores[v];
|
||||
var procesoCorrecto = true;
|
||||
@@ -435,40 +412,40 @@
|
||||
ValidatorName = ValidatorName.replace("'", "");
|
||||
|
||||
|
||||
try {
|
||||
try {
|
||||
document.getElementById(ValidatorName).disabled = true;
|
||||
ValidatorEnable($get(ValidatorName), false);
|
||||
} catch (err) {
|
||||
ValidatorEnable($get(ValidatorName), false);
|
||||
} catch (err) {
|
||||
console.log(ValidatorName + " - " + err.message);
|
||||
procesoCorrecto = false;
|
||||
procesoCorrecto = false;
|
||||
}
|
||||
|
||||
if (procesoCorrecto) {
|
||||
console.log('Validadores desactivados');
|
||||
} else {
|
||||
console.log('Error al desactivar validadores');
|
||||
}
|
||||
if (procesoCorrecto) {
|
||||
console.log('Validadores desactivados');
|
||||
} else {
|
||||
console.log('Error al desactivar validadores');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function FechaActualddMMyyy() {
|
||||
function FechaActualddMMyyy() {
|
||||
var today = new Date();
|
||||
var dd = today.getDate();
|
||||
var mm = today.getMonth() + 1;
|
||||
var yyyy = today.getFullYear();
|
||||
if (dd < 10) {
|
||||
dd = '0' + dd;
|
||||
if (dd < 10) {
|
||||
dd = '0' + dd;
|
||||
}
|
||||
if (mm < 10) {
|
||||
mm = '0' + mm;
|
||||
if (mm < 10) {
|
||||
mm = '0' + mm;
|
||||
}
|
||||
return today = dd + '/' + mm + '/' + yyyy;
|
||||
return today = dd + '/' + mm + '/' + yyyy;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
Option Explicit On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Net
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class PopOCCotizacionesDetalle
|
||||
Inherits ClsPaginas
|
||||
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "Propiedades"
|
||||
|
||||
|
||||
Friend Property EsNuevo As Boolean
|
||||
Get
|
||||
EsNuevo = DirectCast(ViewState("EsNuevo"), Boolean)
|
||||
@@ -43,11 +44,20 @@ Partial Class PopOCCotizacionesDetalle
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDetalle") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
Private Property Adjunto As String
|
||||
Get
|
||||
Adjunto = ViewState("Adjunto").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("Adjunto") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
@@ -76,9 +86,9 @@ Partial Class PopOCCotizacionesDetalle
|
||||
BtnEliminar.Visible = True
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " INICIALIZA VALORES - CARGA COMBOS "
|
||||
Protected Sub CargaProveedoresClasificaciones()
|
||||
CboClasificacionProveedor.DataSource = GlobalDTProveedorClasificacion(UsuarioActual.CveEmpresa)
|
||||
@@ -97,11 +107,11 @@ Partial Class PopOCCotizacionesDetalle
|
||||
Protected Sub CargaMonedas()
|
||||
ddlMoneda.DataSource = GlobalDTMonedas()
|
||||
ddlMoneda.DataBind()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "C A R G A D A T O S "
|
||||
Private Sub CargaOCDetalle(pCveOrden As Integer)
|
||||
Dim objOC As New ClsOC
|
||||
@@ -129,11 +139,10 @@ Partial Class PopOCCotizacionesDetalle
|
||||
TxtFecha.Text = objCotizacion.Fecha.ToShortDateString
|
||||
ddlMoneda.SelectedValue = objCotizacion.CveMoneda.ToString
|
||||
TxtDiasCredito.Text = objCotizacion.DiasCredito.ToString
|
||||
|
||||
Adjunto = objCotizacion.Adjunto
|
||||
If objCotizacion.Adjunto <> "" Then
|
||||
HplArchivo.NavigateUrl = String.Format("/Empresas/{0}/Cotizaciones/{1}", UsuarioActual.CveEmpresa, objCotizacion.Adjunto)
|
||||
HplArchivo.Text = String.Format("<img targer='_blank' src='/Imagenes/{0}.png' border='0' width='18px' alt='Descargar'/>", IO.Path.GetExtension(objCotizacion.Adjunto).Replace("."c, "")) 'ImageUrl = String.Format("/Imagenes/{0}.png", IO.Path.GetExtension(Cot.NombreArchivo).Replace("."c, ""))
|
||||
HplArchivo.Visible = True
|
||||
'HplArchivo.NavigateUrl = String.Format("/Empresas/{0}/Cotizaciones/{1}", UsuarioActual.CveEmpresa, objCotizacion.Adjunto)
|
||||
LnkArchivo.Visible = True
|
||||
End If
|
||||
|
||||
If objCotizacion.GetCotizacionesDetalle(pCveCotizacion) Then
|
||||
@@ -155,7 +164,7 @@ Partial Class PopOCCotizacionesDetalle
|
||||
TxtDiasCredito.Enabled = False
|
||||
TxtFecha.Enabled = False
|
||||
TxtFolio.Enabled = False
|
||||
FUArchivo.Enabled = False
|
||||
'FUArchivo.Enabled = False
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(146) Then
|
||||
GvDC.Enabled = True
|
||||
@@ -164,61 +173,71 @@ Partial Class PopOCCotizacionesDetalle
|
||||
End If
|
||||
|
||||
BtnGuardar.Enabled = False
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " GUARDAR "
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
||||
|
||||
Dim objCotizacion As New ClsOC
|
||||
objCotizacion.IniciaTransacSQL()
|
||||
Dim TieneError = False
|
||||
|
||||
|
||||
Dim TieneError = False
|
||||
|
||||
Dim FileExtension As String = ""
|
||||
Dim Filesgral As List(Of Archivo) = TxtArchivo.getfiles().Archivos
|
||||
Dim Filename As String = ""
|
||||
For Each fileItem As Archivo In Filesgral
|
||||
FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)) '.Replace(".", "")
|
||||
Filename = fileItem.filename
|
||||
Next
|
||||
|
||||
|
||||
Try
|
||||
If EsNuevo Then
|
||||
If objCotizacion.AddCotizacion(CveOrdenCompra, CboProveedores.SelectedValue.ToEntero, -1, TxtFolio.Text, TxtFecha.Text, IO.Path.GetExtension(FUArchivo.FileName), ddlMoneda.SelectedValue.ToEntero, TxtDiasCredito.Text.ToEntero, UsuarioActual.CveUsuario) Then
|
||||
If FUArchivo.HasFile Then
|
||||
'verificar que exista el directorio
|
||||
If Not System.IO.Directory.Exists(String.Format("{0}/Empresas/{1}/Cotizaciones/", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa)) Then
|
||||
System.IO.Directory.CreateDirectory(String.Format("{0}/Empresas/{1}/Cotizaciones/", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa))
|
||||
End If
|
||||
FUArchivo.SaveAs(String.Format("{0}/Empresas/{1}/Cotizaciones/{2}{3}", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa, objCotizacion.CveCotizacion, IO.Path.GetExtension(FUArchivo.FileName)))
|
||||
If objCotizacion.AddCotizacion(CveOrdenCompra, CboProveedores.SelectedValue.ToEntero, -1, TxtFolio.Text, TxtFecha.Text, FileExtension, ddlMoneda.SelectedValue.ToEntero,
|
||||
TxtDiasCredito.Text.ToEntero, UsuarioActual.CveUsuario) Then
|
||||
|
||||
'verificar que exista el directorio
|
||||
If Not System.IO.Directory.Exists(String.Format("{0}/Empresas/{1}/Cotizaciones/", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa)) Then
|
||||
System.IO.Directory.CreateDirectory(String.Format("{0}/Empresas/{1}/Cotizaciones/", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa))
|
||||
End If
|
||||
|
||||
If Filename <> "" Then
|
||||
Filename.FilesMove(objCotizacion.CveCotizacion.ToString(), String.Format("Empresas\{0}\Cotizaciones", UsuarioActual.CveEmpresa))
|
||||
End If
|
||||
|
||||
For Each dr As GridViewRow In GvDC.Rows
|
||||
TieneError = Not objCotizacion.AddCotizacionDetalle(objCotizacion.CveCotizacion, dr.DataKey("CvePS").ToEntero, dr.FCTextBox("TxtPU").Text.ToDouble, dr.DataKey("Cantidad").ToDouble, dr.DataKey("CveUnidadMedida").ToEntero, dr.FCTextBox("txtCantidadSurtir").Text.ToDouble, If(dr.FCTextBox("txtFechaEntrega").Text.Trim = "" Or dr.FCTextBox("txtFechaEntrega").Text = "__/__/____", "-1", dr.FCTextBox("txtFechaEntrega").Text), dr.FCTextBox("txtObservacion").Text.ToString, dr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero)
|
||||
TieneError = Not objCotizacion.AddCotizacionDetalle(objCotizacion.CveCotizacion, dr.DataKey("CvePS").ToEntero, dr.FCTextBox("TxtPU").Text.ToDouble, dr.DataKey("Cantidad").ToDouble,
|
||||
dr.DataKey("CveUnidadMedida").ToEntero, dr.FCTextBox("txtCantidadSurtir").Text.ToDouble,
|
||||
If(dr.FCTextBox("txtFechaEntrega").Text.Trim = "" Or dr.FCTextBox("txtFechaEntrega").Text = "__/__/____", "-1",
|
||||
dr.FCTextBox("txtFechaEntrega").Text), dr.FCTextBox("txtObservacion").Text.ToString, dr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero)
|
||||
If TieneError = True Then Exit For
|
||||
Next
|
||||
End If
|
||||
Else
|
||||
|
||||
Dim NombreArchivo As String = ""
|
||||
|
||||
If objCotizacion.UpdateCotizacion(CboProveedores.SelectedValue.ToEntero, -1, TxtFolio.Text, TxtFecha.Text, IO.Path.GetExtension(FUArchivo.FileName), ddlMoneda.SelectedValue.ToEntero, TxtDiasCredito.Text.ToEntero, UsuarioActual.CveUsuario, CveCotizacion) Then
|
||||
|
||||
If FUArchivo.HasFile Then
|
||||
'verificar que exista el directorio
|
||||
If Not System.IO.Directory.Exists(String.Format("{0}/Empresas/{1}/Cotizaciones/", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa)) Then
|
||||
System.IO.Directory.CreateDirectory(String.Format("{0}/Empresas/{1}/Cotizaciones/", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa))
|
||||
End If
|
||||
FUArchivo.SaveAs(String.Format("{0}/Empresas/{1}/Cotizaciones/{2}{3}", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa, CveCotizacion, IO.Path.GetExtension(FUArchivo.FileName)))
|
||||
NombreArchivo = CveCotizacion & IO.Path.GetExtension(FUArchivo.FileName)
|
||||
If objCotizacion.UpdateCotizacion(CboProveedores.SelectedValue.ToEntero, -1, TxtFolio.Text, TxtFecha.Text, FileExtension, ddlMoneda.SelectedValue.ToEntero, TxtDiasCredito.Text.ToEntero, UsuarioActual.CveUsuario, CveCotizacion) Then
|
||||
|
||||
'verificar que exista el directorio
|
||||
If Not System.IO.Directory.Exists(String.Format("{0}/Empresas/{1}/Cotizaciones/", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa)) Then
|
||||
System.IO.Directory.CreateDirectory(String.Format("{0}/Empresas/{1}/Cotizaciones/", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa))
|
||||
End If
|
||||
|
||||
If Filename <> "" Then
|
||||
Filename.FilesMove(CveCotizacion.ToString(), String.Format("Empresas\{0}\Cotizaciones", UsuarioActual.CveEmpresa))
|
||||
End If
|
||||
|
||||
For Each dr As GridViewRow In GvDC.Rows
|
||||
If dr.DataKey("CveCotizacionDetalle").ToEntero > 0 Then
|
||||
TieneError = Not objCotizacion.UpdateCotizacionDetalle(dr.DataKey("CveCotizacionDetalle").ToEntero, dr.FCTextBox("TxtPU").Text.ToDouble, dr.FCTextBox("txtCantidadSurtir").Text.ToDouble, dr.FCTextBox("txtFechaEntrega").Text, dr.FCTextBox("txtObservacion").Text.ToString)
|
||||
Else
|
||||
|
||||
Dim strTemp = dr.DataKey("CveOrdenCompraDetalle").ToString
|
||||
|
||||
If dr.FCTextBox("txtCantidadSurtir").Text.ToString.ToDouble > 0 Then
|
||||
If dr.FCTextBox("TxtPU").Text.ToDouble > 0 Then TieneError = Not objCotizacion.AddCotizacionDetalle(CveCotizacion, dr.DataKey("CvePS").ToEntero, dr.FCTextBox("TxtPU").Text.ToDouble, dr.DataKey("Cantidad").ToDouble, dr.DataKey("CveUnidadMedida").ToEntero, dr.FCTextBox("txtCantidadSurtir").Text.ToString.ToDouble, If(dr.FCTextBox("txtFechaEntrega").Text.Trim = "" Or dr.FCTextBox("txtFechaEntrega").Text = "__/__/____", "-1", dr.FCTextBox("txtFechaEntrega").Text), dr.FCTextBox("txtObservacion").Text.ToString, dr.DataKey("CveOrdenCompraDetalle").ToEntero)
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
If TieneError = True Then Exit For
|
||||
Next
|
||||
@@ -229,38 +248,25 @@ Partial Class PopOCCotizacionesDetalle
|
||||
End If
|
||||
Catch ex As Exception
|
||||
TieneError = True
|
||||
objCotizacion.RollBack()
|
||||
OnError("Se presento un error al guardar la cotización", ex)
|
||||
|
||||
End Try
|
||||
|
||||
|
||||
|
||||
If Not TieneError Then
|
||||
|
||||
objCotizacion.Commit()
|
||||
Alert(If(EsNuevo, "Cotización Guardada.", "Cotización Actualizada."), TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Try
|
||||
objCotizacion.RollBack()
|
||||
Catch ex As Exception
|
||||
OnError("Error al intetar hace RollBack", ex)
|
||||
End Try
|
||||
|
||||
|
||||
|
||||
|
||||
Else
|
||||
objCotizacion.RollBack()
|
||||
End If
|
||||
|
||||
objCotizacion.Dispose()
|
||||
RegistraScript("Ir();")
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " ELIMINAR "
|
||||
Private Sub BtnEliminar_Click(sender As Object, e As EventArgs) Handles BtnEliminar.Click
|
||||
Dim objCotizacion As New ClsOC
|
||||
@@ -274,10 +280,10 @@ Partial Class PopOCCotizacionesDetalle
|
||||
|
||||
objCotizacion.Dispose()
|
||||
RegistraScript("Ir();")
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " G V D "
|
||||
Protected Sub GvD_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDC.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
@@ -365,10 +371,30 @@ Partial Class PopOCCotizacionesDetalle
|
||||
'e.Row.Attributes.Add("data-validadores", ValidadoresId)
|
||||
|
||||
|
||||
Dim asdasdasd As String = ""
|
||||
End If
|
||||
End Sub
|
||||
Dim asdasdasd As String = ""
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub LnkArchivo_Click(sender As Object, e As EventArgs)
|
||||
If Not String.IsNullOrEmpty(Adjunto) Then
|
||||
Dim filePath As String = String.Format("{0}{1}", UsuarioActual.Empresa.Ruta, "Cotizaciones\" & Adjunto)
|
||||
Dim Archivo As New System.IO.FileInfo(filePath)
|
||||
|
||||
If Archivo.Exists Then
|
||||
HttpContext.Current.Response.Clear()
|
||||
HttpContext.Current.Response.ClearContent()
|
||||
HttpContext.Current.Response.ContentType = "application/octet-stream"
|
||||
HttpContext.Current.Response.AppendHeader("Content-disposition", "attachment; filename=" + System.IO.Path.GetFileName(filePath))
|
||||
HttpContext.Current.Response.AddHeader("Content-Length", Archivo.Length.ToString())
|
||||
HttpContext.Current.Response.TransmitFile(filePath)
|
||||
HttpContext.Current.Response.Flush()
|
||||
HttpContext.Current.Response.End()
|
||||
|
||||
Archivo = Nothing
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -9409,7 +9409,7 @@ Partial Class Clientes
|
||||
Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
|
||||
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
||||
Timbre.Comprobante.Serie = Obj.Serie
|
||||
Timbre.Comprobante.Fecha = Obj.Fecha
|
||||
Timbre.Comprobante.Fecha = Obj.FechaCP
|
||||
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
||||
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
||||
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
||||
|
||||
@@ -8338,7 +8338,7 @@ Partial Class Ventas
|
||||
Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
|
||||
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
||||
Timbre.Comprobante.Serie = Obj.Serie
|
||||
Timbre.Comprobante.Fecha = Obj.Fecha
|
||||
Timbre.Comprobante.Fecha = Obj.FechaCP
|
||||
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
||||
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
||||
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
||||
|
||||
@@ -803,7 +803,7 @@ Public Class WSApp
|
||||
Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
|
||||
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
||||
Timbre.Comprobante.Serie = Obj.Serie
|
||||
Timbre.Comprobante.Fecha = Obj.Fecha
|
||||
Timbre.Comprobante.Fecha = Obj.FechaCP
|
||||
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
||||
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
||||
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
||||
|
||||
@@ -2142,7 +2142,7 @@ Public Class WSSIGApp
|
||||
Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
|
||||
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
||||
Timbre.Comprobante.Serie = Obj.Serie
|
||||
Timbre.Comprobante.Fecha = Obj.Fecha
|
||||
Timbre.Comprobante.Fecha = Obj.FechaCP
|
||||
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
||||
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
||||
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
||||
|
||||
Reference in New Issue
Block a user