-- mejoras en visualización de serie-lote
This commit is contained in:
@@ -766,6 +766,7 @@ Public Class ClsOC
|
||||
|
||||
.Add("@vCveOrdenCompra", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
.Add("@vFolio", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
.Add("@vSerieFolio", SqlDbType.VarChar, 25).Direction = ParameterDirection.Output
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -773,6 +774,7 @@ Public Class ClsOC
|
||||
|
||||
_CveOrdenCompra = SqlAdapter.SelectCommand.Parameters("@vCveOrdenCompra").Value.ToString.ToEntero
|
||||
_Folio = SqlAdapter.SelectCommand.Parameters("@vFolio").Value.ToString.ToEntero
|
||||
_SerieFolio = SqlAdapter.SelectCommand.Parameters("@vSerieFolio").Value.ToString
|
||||
|
||||
'GetOC(_CveOrdenCompra, pCveEmpresa)
|
||||
Retorno = True
|
||||
|
||||
29
OC/OC.aspx
29
OC/OC.aspx
@@ -8,11 +8,9 @@
|
||||
<li>
|
||||
<asp:HyperLink ID="HLImprimir" Target="_blank" runat="server" Visible="false"> <i class="fa fa-print"></i> Imprimir</asp:HyperLink>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:HyperLink ID="HLImprimirCotizacion" Target="_blank" runat="server" Visible="false"> <i class="fa fa-print"></i> Imprimir Cotización</asp:HyperLink>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:HyperLink ID="generarAnticipo" Style="width: 170px;" Visible="false" Target="_blank" runat="server"><i class="fa fa-plus"></i> Generar Anticipo</asp:HyperLink>
|
||||
</li>
|
||||
@@ -22,7 +20,6 @@
|
||||
<li>
|
||||
<asp:HyperLink ID="HLGenerarRecepcion" Visible="false" Target="_blank" runat="server"><i class="fa fa-truck"></i>Recibir Mercancía</asp:HyperLink>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a id="BtnSolicitudAnticipo" runat="server" visible="false" data-toggle="modal" href="#ModalSolicitarAnticipo"><i class="fa fa-dollar"></i>Solicitar Anticipo </a>
|
||||
</li>
|
||||
@@ -31,10 +28,7 @@
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink ID="HlAgregarExcel" NavigateUrl="#" Visible="false" data-toggle="modal" data-target="#DivCargaExcel" runat="server"><i class='fa fa-server'></i> Importar Listado</asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LbDescargarExcel" Visible="false" runat="server"><i class='fa fa-file-excel-o'></i> Descargar Formato</asp:LinkButton>
|
||||
</li>
|
||||
</li>
|
||||
<li>
|
||||
<a id="BtnGeneraContrato" runat="server" visible="false" data-toggle="modal" href="#ModalContrato"><i class="fa fa-book"></i>Generar por Contrato </a>
|
||||
</li>
|
||||
@@ -44,16 +38,18 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkCambiarMoneda" Visible="False" runat="server"><i class='fa fa-money'></i> Cambiar Moneda</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkDescargarDetalleExcel" Visible="False" runat="server" OnClick="LnkDescargarDetalleExcel_Click"><i class='fa fa-excel'></i> Descargar Partidas</asp:LinkButton>
|
||||
</li>
|
||||
<li style="text-align: left!important" runat="server" id="LiLnkGuias" visible="true">
|
||||
<asp:LinkButton runat="server" ID="LnkAgregarGuia" CssClass="" data-toggle="tooltip" data-placement="left" OnClick="LnkAgregarGuia_Click" title="Paquetería Guías." Text="<i class='fa fa-truck'></i> Paqueteria Guías" Visible="false"></asp:LinkButton>
|
||||
</li>
|
||||
<li style="text-align: left!important" runat="server" id="LIContratos" visible="false">
|
||||
<asp:LinkButton runat="server" ID="LnkAcontratos" CssClass="" data-toggle="tooltip" data-placement="left" OnClick="LnkAcontratos_Click" title="Contratos" Text="<i class='fa fa-file-text'></i> Contratos"></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LbDescargarExcel" />
|
||||
<asp:PostBackTrigger ControlID="LnkDescargarDetalleExcel" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
@@ -407,7 +403,7 @@
|
||||
<td><b>Estatus:</b></td>
|
||||
<td>
|
||||
<asp:Label ID="LblMsgEstatus" runat="server" Text="" Font-Size="6pt" Font-Italic="True" ForeColor="Red"></asp:Label>
|
||||
<asp:DropDownList ID="CboE" CssClass="form-control input-sm" runat="server" AutoPostBack="true" DataTextField="Estatus" DataValueField="CveEstatus" Width="104px"></asp:DropDownList>
|
||||
<asp:DropDownList ID="CboE" CssClass="form-control input-sm" runat="server" AutoPostBack="true" DataTextField="Estatus" DataValueField="CveEstatus" Width="100%" style="min-width:104px;"></asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
<tr runat="server" id="TrPendientes">
|
||||
@@ -459,7 +455,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="trCfdi" style="display:none;" >
|
||||
<td>
|
||||
<td colspan="2">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">CFDI Versión 3.3</span>
|
||||
@@ -498,10 +494,7 @@
|
||||
<asp:TextBox ID="TxtPorcentajeProntoPago" CssClass="form-control " runat="server" MaxLength="50" Width="80px" Height="28px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtPorcentajeProntoPago" ValidChars="1234567890." />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
@@ -2409,7 +2402,7 @@
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Agregar Excel</h4>
|
||||
<h4 class="modal-title">Carga por Excel</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
@@ -2418,7 +2411,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-11" style="margin-left: 30px; margin-right: 30px; margin-bottom: 200px;">
|
||||
<div class="col-md-11" style="margin-left: 30px; margin-right: 30px; margin-bottom: 10px;">
|
||||
<asp:TextBox ID="TxtExcel" CssClass="ADSdropzone hidden" Text="" data-maxFile="1" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -45,6 +45,24 @@ Partial Class OC_OC
|
||||
ViewState("ModalidadSubProyectoGeneral") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property NotificacionCorreo As Boolean
|
||||
Get
|
||||
Return If(IsNothing(ViewState("NotificacionCorreo")), True, CBool(ViewState("NotificacionCorreo")))
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("NotificacionCorreo") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property VisualizaContrato As Boolean
|
||||
Get
|
||||
Return If(IsNothing(ViewState("VisualizaContrato")), False, CBool(ViewState("VisualizaContrato")))
|
||||
End Get
|
||||
|
||||
Set(ByVal value As Boolean)
|
||||
ViewState("VisualizaContrato") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TipoOC As String
|
||||
Get
|
||||
If ViewState("TipoOC") Is Nothing Then
|
||||
@@ -213,8 +231,6 @@ Partial Class OC_OC
|
||||
Else
|
||||
Return ViewState("NumCotizaciones").ToString.ToEntero
|
||||
End If
|
||||
|
||||
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("NumCotizaciones") = value
|
||||
@@ -646,6 +662,9 @@ Partial Class OC_OC
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa) = Nothing
|
||||
NotificacionCorreo = True
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then NotificacionCorreo = False
|
||||
|
||||
CargaDatosAgregarPS()
|
||||
CveProveedorOriginal = -1
|
||||
InventarioPrePoliza176 = 0
|
||||
@@ -704,12 +723,10 @@ Partial Class OC_OC
|
||||
CargaDatos(CveOrdenCompra)
|
||||
ConfiguraRetencionesProveedor()
|
||||
Else
|
||||
LIContratos.Visible = True
|
||||
LIContratos.Visible = VisualizaContrato
|
||||
EsNuevo = True
|
||||
InicializarValores()
|
||||
HlAgregarExcel.Visible = True
|
||||
LbDescargarExcel.Visible = True
|
||||
|
||||
|
||||
TxtDescrip.Attributes.Add("onKeyUp", String.Format("SetText({0}, {1})", TxtDescrip.ClientID, TxtJustificacion.ClientID))
|
||||
CreaDTDetalles()
|
||||
@@ -793,7 +810,8 @@ Partial Class OC_OC
|
||||
|
||||
'End If
|
||||
|
||||
BtnGeneraContrato.Visible = True : CargaClientesContrato()
|
||||
'BtnGeneraContrato.Visible = True
|
||||
'CargaClientesContrato()
|
||||
|
||||
CargaEstatusInicialFinal()
|
||||
CargaEstatusUsuarios()
|
||||
@@ -1462,7 +1480,7 @@ Partial Class OC_OC
|
||||
|
||||
TieneInventario = CBool(objOC.DtResultados.Rows(0)("TieneInvOC"))
|
||||
DdlMetodoPago.SelectedValueExist(objOC.DtResultados.Rows(0)("MetodoPago"))
|
||||
|
||||
LnkDescargarDetalleExcel.Visible = True
|
||||
|
||||
If objOC.DtResultados.Rows(0)("CveSubProyectoEntrega").ToString.ToEntero > 0 Then
|
||||
DdlSubProyectoEntrega.SelectedValueExist(objOC.DtResultados.Rows(0)("CveSubProyectoEntrega").ToString)
|
||||
@@ -2917,7 +2935,7 @@ Partial Class OC_OC
|
||||
If Not TieneError Then
|
||||
CveOCGeneradas.Add(CveOrdenCompra)
|
||||
FolioOCGeneradas.Add(OC.Folio)
|
||||
SerieFolio = OC.Folio.ToString
|
||||
SerieFolio = OC.SerieFolio.ToString
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -2967,8 +2985,6 @@ Partial Class OC_OC
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If CveOrdenTrabajo > 0 Then
|
||||
|
||||
Dim ObjAF As New ClsAF(OC.IniciaTransacSQL)
|
||||
@@ -2977,9 +2993,6 @@ Partial Class OC_OC
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
@@ -3015,7 +3028,7 @@ Partial Class OC_OC
|
||||
End If
|
||||
End If
|
||||
|
||||
ViewState("LigaOCs") = If(CveEstatusNuevo <> CboE.SelectedValue.ToEntero, String.Format("<a href='/OC/OC.aspx?OC={0}'>{1}</a>", CveOrdenCompra, Folio), "")
|
||||
ViewState("LigaOCs") = If(CveEstatusNuevo <> CboE.SelectedValue.ToEntero, String.Format("<a href='/OC/OC.aspx?OC={0}'>{1}</a>", CveOrdenCompra, SerieFolio), "")
|
||||
|
||||
If CveOrdenCompra > 0 Then
|
||||
Dim ImprimirOC As String = String.Format("<a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Orden de Compra</a> ", Encripta(String.Format("OP=OC&CVEOC={0}", CveOrdenCompra)))
|
||||
@@ -3595,7 +3608,7 @@ Partial Class OC_OC
|
||||
'End If
|
||||
|
||||
If Not HuboError Then
|
||||
LigaOcsTemp = String.Format("{0}<br><a href='/OC/OC.aspx?OC={1}'>{2}</a>", LigaOcsTemp, objOrdenCompra.CveOrdenCompra, objOrdenCompra.Folio)
|
||||
LigaOcsTemp = String.Format("{0}<br><a href='/OC/OC.aspx?OC={1}'>{2}</a>", LigaOcsTemp, objOrdenCompra.CveOrdenCompra, objOrdenCompra.SerieFolio)
|
||||
CveOCGeneradasTemp.Add(objOrdenCompra.CveOrdenCompra)
|
||||
FolioOCGeneradasTemp.Add(objOrdenCompra.Folio)
|
||||
End If
|
||||
@@ -3690,7 +3703,7 @@ Partial Class OC_OC
|
||||
|
||||
|
||||
If HuboError = False Then
|
||||
ViewState("LigaOCs") = String.Format("{0}<br><a href='/OC/OC.aspx?OC={1}'>{2}</a>", LigaOCs, objOrdenCompra.CveOrdenCompra, objOrdenCompra.Folio)
|
||||
ViewState("LigaOCs") = String.Format("{0}<br><a href='/OC/OC.aspx?OC={1}'>{2}</a>", LigaOCs, objOrdenCompra.CveOrdenCompra, objOrdenCompra.SerieFolio)
|
||||
CveOCGeneradas.Add(objOrdenCompra.CveOrdenCompra)
|
||||
FolioOCGeneradas.Add(objOrdenCompra.Folio)
|
||||
End If
|
||||
@@ -4015,6 +4028,10 @@ Partial Class OC_OC
|
||||
e.Row.FCLiteral("LtlSubProyecto").Text = Str
|
||||
End If
|
||||
End If
|
||||
If e.Row.DBCampo("Descuento").ToDecimal > 0 Then
|
||||
Dim Desc As Decimal = e.Row.DBCampo("Descuento").ToDecimal
|
||||
e.Row.FCLiteral("LtlDescuento").Text = String.Format("{0}<br/>{1}%", Desc.FormatoNumero, (Desc / (e.Row.DBCampo("Cantidad").ToDecimal * e.Row.DBCampo("PU").ToDecimal) * 100.0).FormatoNumero)
|
||||
End If
|
||||
|
||||
e.Row.Cells(0).ToolTip = e.Row.DBCampo("CvePresupuestoEgreso")
|
||||
'comente esta linea, RMF: 2015.04.20
|
||||
@@ -6275,6 +6292,9 @@ Partial Class OC_OC
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub EnviarCorreoCambioEstatus(pCveEstatus As Integer, Estatus As String, Optional NotificarAlert As Boolean = True, Optional AsuntoMail As String = "")
|
||||
|
||||
If Not NotificacionCorreo Then Exit Sub
|
||||
|
||||
Dim strOpciones As New StringBuilder
|
||||
If CveUsuario = -1 Or Not CBool(GlobalDTUsuarios(CveUsuario, CveEmpresa:=CveEmpresaActual).FiltroPrimeroValor("Estatus")) Then
|
||||
CveUsuario = UsuarioActual.CveUsuario
|
||||
@@ -6376,6 +6396,7 @@ Partial Class OC_OC
|
||||
#Region " ENVIAR CORREO USUARIO ASIGNADO "
|
||||
|
||||
Protected Sub MandaCorreoUsuario(Para As String, CorreosCCP As String, CorreosCCPNombre As List(Of String), Optional NotificarAlert As Boolean = True)
|
||||
If Not NotificacionCorreo Then Exit Sub
|
||||
Dim strOpciones As New StringBuilder
|
||||
Dim Body As String = GeneraCorreo(CveOrdenCompra, "") 'strOpciones.ToString) 'genero los datos de la OC
|
||||
|
||||
@@ -6397,6 +6418,7 @@ Partial Class OC_OC
|
||||
End Sub
|
||||
|
||||
Protected Sub CorreoUsuarioAsignado(pCveEstatus As Integer, Estatus As String, Optional NotificarAlert As Boolean = True)
|
||||
If Not NotificacionCorreo Then Exit Sub
|
||||
If CBool(GlobalDTUsuarios(DdlUsuariosAsignado.SelectedValue.ToEntero, CveEmpresaActual).FiltroPrimeroValor("Estatus").ToString) Then
|
||||
'Dim CorreosCCP As New List(Of String)
|
||||
Dim StrCorreos As New StringBuilder
|
||||
@@ -6434,6 +6456,7 @@ Partial Class OC_OC
|
||||
|
||||
#Region " enviarCorreoOrdenDeCompra "
|
||||
Protected Sub EnviarCorreoOrdenCompra(CveOrdenCompra As Integer)
|
||||
If Not NotificacionCorreo Then Exit Sub
|
||||
Dim CveProveedor As Integer
|
||||
Dim strOpciones As New StringBuilder
|
||||
|
||||
@@ -6458,6 +6481,7 @@ Partial Class OC_OC
|
||||
#End Region
|
||||
|
||||
Private Function GeneraCorreo(CveOrdenCompra As Integer, Opciones As String, Optional IncluirDetalles As Boolean = True, Optional Bitacora As String = "", Optional LigaAdjunto As String = "") As String
|
||||
If Not NotificacionCorreo Then Return ""
|
||||
Dim strBody As New StringBuilder
|
||||
Dim objOC As New ClsOC
|
||||
|
||||
@@ -6574,6 +6598,7 @@ Partial Class OC_OC
|
||||
Return strBody.ToString
|
||||
End Function
|
||||
Private Function GeneraCorreoProveedor(CveOrdenCompra As Integer, ByRef CveProveedor As Integer) As String
|
||||
If Not NotificacionCorreo Then Return ""
|
||||
Dim strBody As New StringBuilder
|
||||
Dim objOC As New ClsOC
|
||||
|
||||
@@ -7005,7 +7030,7 @@ Partial Class OC_OC
|
||||
Return StrReturn
|
||||
End Function
|
||||
|
||||
Protected Sub BtnDescargar_Click(sender As Object, e As EventArgs) Handles BtnDescargar.Click, LbDescargarExcel.Click
|
||||
Protected Sub BtnDescargar_Click(sender As Object, e As EventArgs) Handles BtnDescargar.Click
|
||||
Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\FormatoOC.xlsx"
|
||||
Dim Archivo As New IO.FileInfo(Directorio)
|
||||
If Archivo.Exists Then
|
||||
@@ -7122,7 +7147,6 @@ Partial Class OC_OC
|
||||
BtnCancelarPrevio.Visible = False
|
||||
BtnCrearApartirDe.Visible = False
|
||||
|
||||
|
||||
uppSeguimientoEstatus.Update()
|
||||
UPProv.Update()
|
||||
UPPEmp.Update()
|
||||
@@ -7204,7 +7228,6 @@ Partial Class OC_OC
|
||||
|
||||
CargarOptionAnticipos()
|
||||
HlAgregarExcel.Visible = True
|
||||
LbDescargarExcel.Visible = True
|
||||
|
||||
CargaEstatusInicialFinal()
|
||||
CargaEstatusUsuarios()
|
||||
@@ -7250,8 +7273,8 @@ Partial Class OC_OC
|
||||
|
||||
BtnSolicitudAnticipo.Visible = False
|
||||
HlAgregarExcel.Visible = True
|
||||
LbDescargarExcel.Visible = True
|
||||
BtnGeneraContrato.Visible = True : CargaClientesContrato()
|
||||
'BtnGeneraContrato.Visible = True
|
||||
CargaClientesContrato()
|
||||
|
||||
LbVerificarExistencia.Visible = True
|
||||
LnkAgregarGuia.Visible = False
|
||||
@@ -9590,6 +9613,9 @@ Partial Class OC_OC
|
||||
|
||||
End Function
|
||||
|
||||
Protected Sub LnkDescargarDetalleExcel_Click(sender As Object, e As EventArgs)
|
||||
GvD.ExportToExcel("des")
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user