Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -3246,7 +3246,7 @@ Public Class ClsContratos
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetPresupuestosRepDetalleCompras(CveProyecto As Integer, CveSubProyecto As Integer, CveAgrupador As Integer, CveTipoGasto As Integer, FechaI As Date, FechaF As Date, CveEmpresa As Integer, CveUsuario As Integer) As Boolean
|
||||
Public Function GetPresupuestosRepDetalleCompras(CveProyecto As Integer, CveSubProyecto As Integer, CveAgrupador As Integer, CveTipoGasto As Integer, FechaI As Date, FechaF As Date, CveEmpresa As Integer, CveUsuario As Integer, Optional Comprometido As Boolean = False) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Con_PresupuestosRepDetalleCompra")
|
||||
@@ -3259,6 +3259,7 @@ Public Class ClsContratos
|
||||
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@Comprometido", SqlDbType.Bit).Value = Comprometido
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -1855,7 +1855,8 @@ Partial Class Compras_Compras
|
||||
|
||||
If Validada And Not EnListadoEFOS Then
|
||||
Try
|
||||
XMLDoc.LoadXml(File.ReadAllText(Archivo).Replace("<br>", "").Replace("<", "").Replace("o;?", ""))
|
||||
' &HFEFF, es el código ZERO WIDTH NO-BREAK SPACE
|
||||
XMLDoc.LoadXml(File.ReadAllText(Archivo).Replace("<br>", "").Replace("<", "").Replace("o;?", "").Replace(ChrW(&HFEFF), ""))
|
||||
Catch ex As Exception
|
||||
Try
|
||||
Dim oReader As New StreamReader(Archivo, Encoding.GetEncoding("ISO-8859-1"))
|
||||
@@ -1865,9 +1866,14 @@ Partial Class Compras_Compras
|
||||
GuardaLog("Error al intentar leer el XML del SAT. Error:" & ex2.ToString())
|
||||
End Try
|
||||
End Try
|
||||
|
||||
If XMLDoc.InnerXml = "" Then
|
||||
Alert("No se pudo procesar el archivo xml.", TipoMensaje.MsgError)
|
||||
Return ""
|
||||
End If
|
||||
|
||||
CreaDTConceptos()
|
||||
CargaComprobanteXML(XMLDoc)
|
||||
|
||||
If NuevaValidacionXML = 1 OrElse (Version = "3.3" OrElse Version = "4.0") Then
|
||||
Dim Xml As String
|
||||
Dim nodo As XmlNode = XMLDoc.DocumentElement
|
||||
@@ -4181,20 +4187,17 @@ Partial Class Compras_Compras
|
||||
|
||||
Protected Sub BtnGuardar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnGuardar.Click
|
||||
|
||||
|
||||
|
||||
If Not ValidaPresupuesto(2) Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'------------------ INICIA VALIDACIONES ------------------
|
||||
|
||||
If MetodoPagoOC = 0 AndAlso RBLPago.SelectedValue.ToEntero <> 2 Then
|
||||
If MetodoPagoOC = 0 AndAlso RBLPago.SelectedValue.ToEntero <> 2 AndAlso LblSaldoFactura.Text.ToDecimal > 0 Then
|
||||
Alert("La orden de compra se definió de contado, favor de especificar la compra de contado.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
Dim CveSubProyectoPrincipal As Integer = AsignarSubProyectoPrincipal()
|
||||
|
||||
If Not CveSubProyectoPrincipal > 0 Then
|
||||
@@ -4202,7 +4205,7 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
|
||||
If Not ValidaVinculacionNotaFactura() Then
|
||||
Alert("Se requiere que la nota este aplciada a las facturas", TipoMensaje.MsgAdvertencia)
|
||||
Alert("Se requiere que la nota este aplicada a las facturas", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
@@ -8609,7 +8612,6 @@ Partial Class Compras_Compras
|
||||
'PORCENTAJE IVA
|
||||
Dim PorcentajeIVA As Decimal = TmpDT.MAX("IVAPorcentaje").ToDecimal
|
||||
|
||||
|
||||
Dim TmpCveRetIVAConcepto As Integer = If(CveRetIVAConceptoOriginal <> DdlRetIVAConcepto.SelectedValue.ToEntero, DdlRetIVAConcepto.SelectedValue.ToEntero, -1)
|
||||
Dim TmpCveRetISRConcepto As Integer = If(CveRetISRConceptoOriginal <> DdlRetISRConcepto.SelectedValue.ToEntero, DdlRetISRConcepto.SelectedValue.ToEntero, -1)
|
||||
Dim tNoDeducible As Integer = If(ChkEsNoDeducible.Checked, 1, 0)
|
||||
@@ -9265,7 +9267,7 @@ Partial Class Compras_Compras
|
||||
Dim CveProveedorConcepto As Integer = 0, CveIE As Integer = 0, CveCreditoDetalle As Integer = 0
|
||||
Dim ConceptoPersonal As String = "", Concepto As String = ""
|
||||
Dim tUsaInventarios As Boolean = UsuarioActual.Empresa.UsaInventarios
|
||||
If (UsuarioActual.CveEmpresa.Contiene(13, 83)) Then tUsaInventarios = False
|
||||
If (UsuarioActual.CveEmpresa.Contiene(13, 83, 7, 11, 12, 122, 145)) Then tUsaInventarios = False
|
||||
|
||||
If Not ObjConta.GetPrePolizasDetalleCompra(CveCompra, UsuarioActual.CveEmpresa) Then
|
||||
ErrorPrepoliza = True
|
||||
@@ -18533,10 +18535,12 @@ Partial Class Compras_Compras
|
||||
If ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 49, CveCompra, 1) Then
|
||||
If ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 68, CveCompra, 1) Then
|
||||
If ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 6, CveCompra, 1) Then
|
||||
If ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 205, CveCompra, 1) Then
|
||||
TieneError = False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
'INGRESAMOS DETALLES
|
||||
If Not TieneError Then
|
||||
|
||||
@@ -321,7 +321,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
TxtFechaDocumento.Text = NowADS().ToString("dd/MM/yyyy")
|
||||
TxtFechaelaboracion.Text = NowADS().ToString("dd/MM/yyyy")
|
||||
TxtConcepto.Enabled = True
|
||||
TxtUsuarioElaboro.Text = UsuarioActual.Usuario
|
||||
TxtUsuarioElaboro.Text = UsuarioActual.Nombre
|
||||
End If
|
||||
|
||||
|
||||
@@ -448,7 +448,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Folio = dr("FolioPoliza").ToString
|
||||
|
||||
TxtFolio.Text = dr("FolioPoliza").ToString
|
||||
TxtUsuarioElaboro.Text = dr("Usuario").ToString
|
||||
TxtUsuarioElaboro.Text = dr("UsuarioNombre").ToString
|
||||
TxtFechaelaboracion.Text = dr("FechaIng").ToString.ToDate.ToString("dd/MM/yyyy")
|
||||
TxtFechaelaboracion.ToolTip = dr("FechaIng").ToString.ToDate.ToString("HH:mm:ss")
|
||||
CvePlantillaPoliza = dr("CvePlantillaPoliza").ToString.ToEntero
|
||||
|
||||
@@ -208,7 +208,7 @@
|
||||
<div class="col-md-1" style="max-width: 80px">Agrupador:</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlAgrupador" Width="150px" runat="server" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Text="Clasificacion" Value="1" />
|
||||
<asp:ListItem Text="Clasificación" Value="1" />
|
||||
<asp:ListItem Text="Centro de Costo" Value="2" Selected="True" />
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
@@ -231,7 +231,7 @@
|
||||
<asp:DropDownList ID="DdlSubProyecto" DataTextField="SubProyecto" AppendDataBoundItems="true" DataValueField="CveSubProyecto" Width="200px" runat="server" CssClass="form-control input-sm select2me">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1" style="max-width: 120px">Clasificacion:</div>
|
||||
<div class="col-md-1" style="max-width: 120px">Clasificación:</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlClasificacion" DataTextField="Agrupador" DataValueField="CveAgrupador" Width="200px" runat="server" CssClass="form-control input-sm select2me">
|
||||
</asp:DropDownList>
|
||||
@@ -341,9 +341,9 @@
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="Sin resultados" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall ScrollAD" GridLines="None" data-sort="true">
|
||||
<Columns>
|
||||
<%--<asp:HyperLinkField HeaderText="Descripcion" DataTextField="Agrupador" ItemStyle-Width="20%"--%>
|
||||
<asp:BoundField HeaderText="Descripcion" DataField="Agrupador" ItemStyle-Width="20%" />
|
||||
<asp:BoundField HeaderText="Descripción" DataField="Agrupador" ItemStyle-Width="20%" />
|
||||
<asp:BoundField HeaderText="Importe" DataField="Autorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Comprometido" DataField="Comprometido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Importe" DataField="Comprometido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Importe" DataField="Ejercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="15%" />
|
||||
<asp:BoundField HeaderText="%" DataField="EjercidoPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Importe" DataField="PorEjercer" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="15%" />
|
||||
@@ -383,7 +383,7 @@
|
||||
<asp:GridView ID="GvDatosMensual" OnRowDataBound="GvDatosMensual_RowDataBound" runat="server" AutoGenerateColumns="False" Style="min-width: 2000px; overflow-y: hidden" Width="4740px" EmptyDataText="Sin resultados" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover" GridLines="None" data-sort="true">
|
||||
<Columns>
|
||||
|
||||
<asp:BoundField HeaderText="Descripcion" DataField="Agrupador" ItemStyle-Width="200px" />
|
||||
<asp:BoundField HeaderText="Descripción" DataField="Agrupador" ItemStyle-Width="200px" />
|
||||
<asp:BoundField HeaderText="Importe" DataField="Autorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="120px" />
|
||||
|
||||
<asp:BoundField HeaderText="Autorizado" DataField="EneroAutorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
|
||||
|
||||
@@ -201,7 +201,7 @@
|
||||
<div class="col-md-1" style="max-width: 80px">Agrupador:</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlAgrupador" Width="150px" runat="server" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Text="Clasificacion" Value="1" />
|
||||
<asp:ListItem Text="Clasificación" Value="1" />
|
||||
<asp:ListItem Text="Centro de Costo" Value="2" Selected="True" />
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
@@ -224,7 +224,7 @@
|
||||
<asp:DropDownList ID="DdlSubProyecto" DataTextField="SubProyecto" AppendDataBoundItems="true" DataValueField="CveSubProyecto" Width="200px" runat="server" CssClass="form-control input-sm select2me">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1" style="max-width: 120px">Clasificacion:</div>
|
||||
<div class="col-md-1" style="max-width: 120px">Clasificación:</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlClasificacion" DataTextField="Agrupador" DataValueField="CveAgrupador" Width="200px" runat="server" CssClass="form-control input-sm select2me">
|
||||
</asp:DropDownList>
|
||||
@@ -259,9 +259,9 @@
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="Sin resultados" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall ScrollAD" GridLines="None" data-sort="true">
|
||||
<Columns>
|
||||
<%--<asp:HyperLinkField HeaderText="Descripcion" DataTextField="Agrupador" ItemStyle-Width="20%"--%>
|
||||
<asp:BoundField HeaderText="Descripcion" DataField="Agrupador" ItemStyle-Width="20%" />
|
||||
<asp:BoundField HeaderText="Descripción" DataField="Agrupador" ItemStyle-Width="20%" />
|
||||
<asp:BoundField HeaderText="Importe" DataField="Autorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Comprometido" DataField="Comprometido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Importe" DataField="Comprometido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Importe" DataField="Ejercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="15%" />
|
||||
<asp:BoundField HeaderText="%" DataField="EjercidoPorcentaje" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Importe" DataField="PorEjercer" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="15%" />
|
||||
@@ -299,7 +299,7 @@
|
||||
</table>
|
||||
<asp:GridView ID="GvDatosMensual" OnRowDataBound="GvDatosMensual_RowDataBound" runat="server" AutoGenerateColumns="False" Style="min-width: 2000px; overflow-y: hidden" Width="4740px" EmptyDataText="Sin resultados" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover" GridLines="None" data-sort="true">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Descripcion" DataField="Agrupador" ItemStyle-Width="200px" />
|
||||
<asp:BoundField HeaderText="Descripción" DataField="Agrupador" ItemStyle-Width="200px" />
|
||||
<asp:BoundField HeaderText="Importe" DataField="Autorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="120px" />
|
||||
|
||||
<asp:BoundField HeaderText="Autorizado" DataField="EneroAutorizado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
<div class="portlet-body" style="display: none;" id="idnecesaria2">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1" style="max-width: 120px">Clasificacion:</div>
|
||||
<div class="col-md-1" style="max-width: 120px">Clasificación:</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlClasificacion" DataTextField="Agrupador" AppendDataBoundItems="true" DataValueField="CveAgrupador" Width="200px" runat="server" CssClass="form-control input-sm select2me">
|
||||
</asp:DropDownList>
|
||||
|
||||
@@ -2,9 +2,12 @@
|
||||
Option Strict On
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Org.BouncyCastle.Asn1.Ocsp
|
||||
Partial Class Contratos_RepPresupuestosDetalleCompras
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
|
||||
#Region "P R O P I E D A D E S"
|
||||
|
||||
Public Property Gpo() As Integer
|
||||
@@ -16,6 +19,18 @@ Partial Class Contratos_RepPresupuestosDetalleCompras
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Comprometido As Boolean
|
||||
Get
|
||||
If ViewState("Comprometido") Is Nothing Then
|
||||
ViewState("Comprometido") = False
|
||||
End If
|
||||
Return Boolean.Parse(ViewState("Comprometido").ToString)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("Comprometido") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
@@ -72,6 +87,10 @@ Partial Class Contratos_RepPresupuestosDetalleCompras
|
||||
Dim CveSubProyecto = IfNull(Request("CveSubProyecto"), -1).ToString.ToEntero
|
||||
Dim CveTipoGasto = IfNull(Request("CveTipoGasto"), -1).ToString.ToEntero
|
||||
Dim Agrupador = IfNull(Request("Agrupador"), -1).ToString.ToEntero
|
||||
|
||||
Comprometido = If(Request("Comprometido") IsNot Nothing AndAlso Request("Comprometido").ToEntero = 1, True, False)
|
||||
|
||||
|
||||
Gpo = IfNull(Request("CveAgrupador"), -1).ToString.ToEntero
|
||||
Dim EsProyecto = CBool(IfNull(Request("EsProyecto"), False))
|
||||
If Agrupador = 1 Then Agrupador = 2 Else Agrupador = 1
|
||||
@@ -106,7 +125,8 @@ Partial Class Contratos_RepPresupuestosDetalleCompras
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjPresupuestos As New ClsContratos
|
||||
If ObjPresupuestos.GetPresupuestosRepDetalleCompras(DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlTipoGasto.SelectedValue.ToEntero, TxtFiltrosFechaInicio.Text.ToDate, TxtFiltrosFechaFin.Text.ToDate, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
|
||||
If ObjPresupuestos.GetPresupuestosRepDetalleCompras(DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlTipoGasto.SelectedValue.ToEntero, TxtFiltrosFechaInicio.Text.ToDate,
|
||||
TxtFiltrosFechaFin.Text.ToDate, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, Comprometido:=Comprometido) Then
|
||||
GvDatos.DataSource = ObjPresupuestos.DtResultados
|
||||
End If
|
||||
ObjPresupuestos.Dispose()
|
||||
@@ -131,6 +151,10 @@ Partial Class Contratos_RepPresupuestosDetalleCompras
|
||||
Dim Liga = ""
|
||||
Dim Css = "Texto"
|
||||
|
||||
|
||||
If Comprometido Then
|
||||
Liga = $"/OC/OC.aspx?OC={e.Row.DBCampo("CveOrdenCompra")}"
|
||||
Else
|
||||
Dim TipoAgrupador As Integer = e.Row.DBCampo("TipoAgrupador").ToEntero()
|
||||
Select Case TipoAgrupador
|
||||
Case 1
|
||||
@@ -140,6 +164,8 @@ Partial Class Contratos_RepPresupuestosDetalleCompras
|
||||
Case Else
|
||||
|
||||
End Select
|
||||
End If
|
||||
|
||||
e.Row.Cells(0).Text = "<a target=""_blank"" class=" + "" + Css + "" + " href=" + "" + Liga + "" + ">" + e.Row.Cells(0).Text + "</a>"
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -3946,7 +3946,9 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"})
|
||||
Dim DTOCs As DataTable = DtCostos.FiltraParametros("", "", {"CveOrdenCompraDetalle"})
|
||||
Dim ConceptoPoliza As String = String.Format("{0}-{1}", DdlConcepto.SelectedItem.Text, If(DdlConcepto.SelectedValue.ToEntero.Contiene(3), HplVenta.Text, TxtFolio.Text))
|
||||
Dim Contabilizable As Boolean = True
|
||||
Dim CveModalidad As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero).FiltroPrimeroValor("CveModalidad").ToEntero()
|
||||
|
||||
Dim Contabilizable As Boolean = (CveModalidad = 1)
|
||||
|
||||
If tmpCostos.Rows.Count > 0 Then
|
||||
Dim Concepto As String = If(TxtObservaciones.Text = "", ConceptoPoliza, $" {TxtObservaciones.Text}")
|
||||
@@ -3955,7 +3957,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
If HplCompra.Visible AndAlso HplCompra.Text <> "" Then
|
||||
ValorInventario = DtCostos.SUMD("Total")
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ValorInventario, ValorInventario, 205, Concepto, Concepto, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimiento, ImporteME:=ValorInventario, CveCompra:=HdnCveCompra.Value.ToEntero, TipoCambio:=LbTipoCambio.Text.ToDecimal) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ValorInventario, ValorInventario, 205, Concepto, Concepto, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimiento, ImporteME:=ValorInventario, CveCompra:=HdnCveCompra.Value.ToEntero, TipoCambio:=LbTipoCambio.Text.ToDecimal, Contabilizable:=Contabilizable) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
' ValorInventario = ValorInventario - ValorInventarioME
|
||||
|
||||
@@ -3927,7 +3927,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
if (frow != null)
|
||||
{
|
||||
|
||||
TxtInfoValor.Text = String.Format("{0:###,###.##}", frow["Importe"]);
|
||||
TxtInfoValor.Text = String.Format("{0:###,###.####}", frow["Importe"]);
|
||||
DdlInfoTipoAplicacion.SelectedValueExist(frow["TipoAplicacion"].ToString());
|
||||
|
||||
TxtInfoDescripcion.Text = String.Format("{0}", frow["Descripcion02"]);
|
||||
|
||||
@@ -2239,7 +2239,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-2">Solicitar a:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList ID="DdlSAUsuario" CssClass="form-control input-sm select2me" DataTextField="Nombre" DataValueField="CveUsuario" runat="server" Width="100%"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlSAUsuario" CssClass="form-control input-sm select2me" DataTextField="Nombre" DataValueField="CveUsuario" runat="server" Width="100%" CausesValidation="true"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVSAUsuario" runat="server" InitialValue="-1" ControlToValidate="DdlSAUsuario" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Usuario''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalSolicitarAnticipo"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCESAUsuario" runat="server" HighlightCssClass="vco" TargetControlID="RFVSAUsuario" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
@@ -5464,14 +5464,25 @@ Partial Class OC_OC
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub EnviaCorreoSolicitudAnticipo(CveEvento As Integer, Optional ImporteAnticipo As Decimal = 0)
|
||||
Dim Param As New List(Of String)
|
||||
|
||||
Dim DtPara As DataTable = GlobalDTUsuarios(DdlSAUsuario.SelectedValue.ToString.ToEntero, CveEmpresaActual)
|
||||
|
||||
If DdlMetodoPago.SelectedValue.ToEntero = 0 Then
|
||||
|
||||
DtPara = GlobalDTUsuarios(DdlSAUsuarioContado.SelectedValue.ToString.ToEntero, CveEmpresaActual)
|
||||
|
||||
If DtPara Is Nothing Then
|
||||
DtPara = GlobalDTUsuarios(DdlSAUsuario.SelectedValue.ToString.ToEntero, CveEmpresaActual)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Try
|
||||
If DtPara IsNot Nothing AndAlso DtPara.Rows.Count > 0 Then
|
||||
|
||||
Param.Add(DtPara.Rows(0)("Correo").ToString()) 'Para
|
||||
Param.Add("Solicitud de anticipo de Orden de Compra") 'Asunto
|
||||
|
||||
@@ -5485,7 +5496,14 @@ Partial Class OC_OC
|
||||
Param.Add(String.Format("{0}PDF\OC-{1}.pdf", UsuarioActual.Empresa.Ruta, CveOrdenCompra))
|
||||
Dim Hilo As New Threading.Thread(AddressOf MandaCorreoAnticipo)
|
||||
Hilo.Start(Param)
|
||||
|
||||
End If
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub EnviaCorreoSolicitudAnticipoCancelado()
|
||||
'If Not CveIEAnticipo > 0 Then 'SI NO SE HA REALIZADO EL ANTICIPO NOTIFICA QUE SE HA CANCELADO
|
||||
Dim ObjOC As New ClsOC
|
||||
|
||||
@@ -1343,8 +1343,9 @@ Partial Class Sistemas_UsuarioDetalle
|
||||
|
||||
Private Sub RecargaGlobales(TieneError As Boolean, ObjSubProyectos As ClsSubProyectos, ObjBancos As ClsBancos, ObjOC As ClsOC, ObjUsuarios As ClsSisUsuarios)
|
||||
'RECARGA GLOBAL SUBPROYECTOS
|
||||
Dim tCveEmpresa As Integer = DdlEmpresaAsignaciones.SelectedValue.ToEntero
|
||||
If Not TieneError Then
|
||||
GlobalDTSubProyectosUsuarios(-1, -1, UsuarioActual.CveEmpresa) = Nothing
|
||||
GlobalDTSubProyectosUsuarios(-1, -1, tCveEmpresa) = Nothing
|
||||
|
||||
'If ObjSubProyectos.GetSubProyectosUsuarios Then
|
||||
' Application("GlobalDTSubProyectosUsuarios") = ObjSubProyectos.DtResultados
|
||||
@@ -1355,7 +1356,7 @@ Partial Class Sistemas_UsuarioDetalle
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
GlobalDTProyectosUsuarios(-1, -1, UsuarioActual.CveEmpresa, -1) = Nothing
|
||||
GlobalDTProyectosUsuarios(-1, -1, tCveEmpresa, -1) = Nothing
|
||||
'If ObjSubProyectos.GetSubProyectosUsuarios Then
|
||||
' Application("GlobalDTProyectosUsuarios") = ObjSubProyectos.DtResultados.FiltraParametros("", "", {"Proyecto", "CveProyecto", "CveUsuario", "CveEmpresa", "CveEstatusProyecto"})
|
||||
'Else
|
||||
@@ -1366,23 +1367,23 @@ Partial Class Sistemas_UsuarioDetalle
|
||||
|
||||
'RECARGA GLOBAL BANCOS
|
||||
'If ObjBancos.GetBancosCuentasUsuarios(-1) Then
|
||||
GlobalDTBancosCuentas(-1, CveEmpresa:=UsuarioActual.CveEmpresa) = Nothing 'ObjBancos.DtResultados
|
||||
GlobalDTBancosCuentas(-1, CveEmpresa:=tCveEmpresa) = Nothing 'ObjBancos.DtResultados
|
||||
' End If
|
||||
|
||||
'RECARGA GLOBAL ESTATUS
|
||||
GlobalDTOCEstatusUsuarios(UsuarioActual.CveEmpresa) = Nothing
|
||||
GlobalDTOCEstatusUsuarios(tCveEmpresa) = Nothing
|
||||
|
||||
'If ObjOC.GetEstatusUsuarios(-1, -1, -1, -1, -1) Then Application("GlobalDTOCEstatusUsuarios") = ObjOC.DtResultados Else Application("GlobalDTOCEstatusUsuarios") = Nothing
|
||||
|
||||
|
||||
'RECARGA GLOBAL ALMACEN
|
||||
'If ObjUsuarios.GetAlmacen(-1, UsuarioActual.CveEmpresa) Then Application("GlobalDTAlmacenUsuarios") = ObjUsuarios.DtResultados Else Application("GlobalDTAlmacenUsuarios") = Nothing
|
||||
GlobalDTAlmacenUsuarios(-1, UsuarioActual.CveEmpresa) = Nothing
|
||||
GlobalDTAlmacenUsuarios(-1, tCveEmpresa) = Nothing
|
||||
|
||||
'RECARGA GLOBAL EMPRESAS USUARIOS
|
||||
GlobalDTAlmacenUsuarios(-1, UsuarioActual.CveEmpresa) = Nothing
|
||||
GlobalDTUsuarioResponsable(UsuarioActual.CveEmpresa) = Nothing
|
||||
GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa) = Nothing
|
||||
GlobalDTAlmacenUsuarios(-1, tCveEmpresa) = Nothing
|
||||
GlobalDTUsuarioResponsable(tCveEmpresa) = Nothing
|
||||
GlobalDTUsuarios(CveEmpresa:=tCveEmpresa) = Nothing
|
||||
GlobalDTUsuarios(CveEmpresa:=-1) = Nothing
|
||||
|
||||
|
||||
|
||||
@@ -80,6 +80,9 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkGenerarEtiqueta" runat="server" data-toggle="tooltip" data-placement="left" title="Generar Etiqueta" Visible="false" OnClick="LnkGenerarEtiqueta_Click" Text="<i class='fa fa-qrcode'></i> Imprimir Etiqueta"></asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkEquivalenciaAdd" runat="server" data-toggle="tooltip" data-placement="left" title="Agregar Equivalencia" OnClick="LnkEquivalenciaAdd_Click" Text="<i class='fa fa-plus'></i> Agregar Equivalencia"></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
|
||||
</asp:UpdatePanel>
|
||||
@@ -355,6 +358,7 @@
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
a
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -2086,6 +2090,46 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="divEquivalenciaModal" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<asp:UpdatePanel ID="UPPEquiv" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<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="H1" runat="server">Equivalencia</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlEquivalenciaUM" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida" Width="206px">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlEquivalenciaUM.ClientID.ToString()%>">Unidad de Medida:</label>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlEquivalenciaUM" 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="GrpEliminarPS"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCantidadEquivalencia" runat="server" Width="60" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<label for="<%= TxtCantidadEquivalencia.ClientID.ToString()%>">Cantidad:</label>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtDescripcion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripcion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEliminarPS"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel ID="UpdatePanel5" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:LinkButton ID="LnkAgregarEquivalencia" runat="server" CssClass="btn btn-primary" OnClick="LnkAgregarEquivalencia_Click"> Guardar</asp:LinkButton>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="ModalCodigoBarrasQR" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
|
||||
@@ -3689,4 +3689,24 @@ Partial Class ProductosyServicios
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkEquivalenciaAdd_Click(sender As Object, e As EventArgs)
|
||||
DdlEquivalenciaUM.Items.Clear()
|
||||
DdlEquivalenciaUM.DataSource = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa)
|
||||
DdlEquivalenciaUM.DataBind()
|
||||
UPPEquiv.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "divEquivalenciaModal"))
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkAgregarEquivalencia_Click(sender As Object, e As EventArgs)
|
||||
Dim Ps As New ClsProductosServicios
|
||||
|
||||
If Ps.AddPSEquivalencias(CvePS, DdlEquivalenciaUM.SelectedValue.ToEntero, TxtCantidadEquivalencia.Text.ToDecimal, False, 0, UsuarioActual.CveUsuario) Then
|
||||
Alert("Equivalencia registrada correctamente.", TipoMensaje.ToastInformacion)
|
||||
CargaEquivalencias()
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "divEquivalenciaModal"))
|
||||
End If
|
||||
|
||||
Ps.Dispose()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
||||
<asp:Literal runat="server" ID="LtlEncabezado" Text="Reporte Lineas Adicionales"></asp:Literal>
|
||||
<asp:Literal runat="server" ID="LtlEncabezado" Text="Reporte Vencimientos"></asp:Literal>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||
</asp:Content>
|
||||
@@ -39,16 +39,44 @@
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1 truncate" runat="server" id="DVProveedor1" visible="false">Comercializador:</div>
|
||||
<div class="col-md-2" runat="server" id="DVProveedor2" visible="false">
|
||||
<ADS:Dropdownlost ID="DdlProveedor" SelectedText="-" runat="server" CssStyle="width: 100%; selected2me; " Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor" CssClass="select2me"></ADS:Dropdownlost>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate" >Cliente:</div>
|
||||
<div class="col-md-2 ">
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" UsaWebService="true" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">
|
||||
Fecha Inicio:
|
||||
</div>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Fecha Fin:
|
||||
</div>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1 truncate" >Estatus:</div>
|
||||
<div class="col-md-1 ">
|
||||
<asp:DropDownList runat="server" ID="DdlEstatus" CssClass="select2me" Width="100%">
|
||||
@@ -88,8 +116,8 @@
|
||||
|
||||
<div class="row " runat="server" visible ="false" id="DvLinea">
|
||||
<div class=" col-md-12" style="text-align: right!important">
|
||||
<input type="text" id="TxtBuscarLineaAdicional" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBuscarLineaAdicional','{0}')", GvLineasAdicionales.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBuscarLineaAdicional','{0}')", GvLineasAdicionales.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
<input type="text" id="TxtBuscarLineaAdicional" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBuscarLineaAdicional','{0}')", GvD.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBuscarLineaAdicional','{0}')", GvD.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -104,7 +132,7 @@
|
||||
<div class="row ">
|
||||
<div class="col-md-12">
|
||||
|
||||
<asp:GridView ID="GvLineasAdicionales" Width="100%" runat="server" GridLines="None" Visible="false"
|
||||
<asp:GridView ID="GvD" Width="100%" runat="server" GridLines="None" Visible="false"
|
||||
DataKeyNames="CveLineaAdicional,LineaAdicional,CveCliente,CveProveedor,TipoLinea,Importe,CveMoneda,FechaVencimiento,CveUsuario,CveCategoria,FechaIng,CveLineaAdicionalEstatus,Proveedor,LineaAdicionalComprobante,DiasVencimiento,CveVenta"
|
||||
CssClass="table table-striped table-advance table-hover ScrollAD input-sm " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
|
||||
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
||||
|
||||
@@ -27,17 +27,17 @@ public partial class Ventas_RepVencimientosCredito : ClsPaginas
|
||||
|
||||
private int TipoLinea
|
||||
{
|
||||
get { return (ViewState["TipoLinea"] == null) ? 1: int.Parse(ViewState["TipoLinea"].ToString()); }
|
||||
get { return (ViewState["TipoLinea"] == null) ? 1: int.Parse(ViewState["TipoLinea"].ToString()); }
|
||||
set { ViewState["TipoLinea"] = (int)value; }
|
||||
}
|
||||
|
||||
private DataTable DTDatosGvLineasAdicionales
|
||||
private DataTable DTDatosGvD
|
||||
{
|
||||
get
|
||||
get
|
||||
{
|
||||
if (ViewState["DTDatosGvLineasAdicionales"] == null)
|
||||
if (ViewState["DTDatosGvD"] == null)
|
||||
{
|
||||
ViewState["DTDatosGvLineasAdicionales"] = new DataTable();
|
||||
ViewState["DTDatosGvD"] = new DataTable();
|
||||
}
|
||||
return (DataTable)ViewState["DTDatosGvD"];
|
||||
}
|
||||
@@ -66,45 +66,14 @@ public partial class Ventas_RepVencimientosCredito : ClsPaginas
|
||||
InicializaValores();
|
||||
CargaDatos();
|
||||
}
|
||||
}
|
||||
|
||||
private void InicializaValores()
|
||||
{
|
||||
|
||||
if (Request["OP"] != null && Request["OP"].ToString() == "PO")
|
||||
{
|
||||
DVProveedor1.Visible = true;
|
||||
DVProveedor2.Visible = true;
|
||||
TipoLinea = 2;
|
||||
LtlEncabezado.Text = "Reporte PO";
|
||||
GvLAPO.Visible = true;
|
||||
DvLineaPO.Visible = true;
|
||||
DVAgrupador1.Visible = true;
|
||||
DVAgrupador2.Visible = true;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
DvLinea.Visible = true;
|
||||
GvLineasAdicionales.Visible = true;
|
||||
}
|
||||
|
||||
|
||||
if(UsuarioActual.Empresa.Funcionalidad(105) == "1") {
|
||||
DdlProveedor.setEsWebService(true);
|
||||
DdlProveedor.Attributes.Add("data-metodo", "getproveedores");
|
||||
DdlProveedor.SelectedText = "Todos";
|
||||
DdlProveedor.SelectedValue = "-1";
|
||||
}else {
|
||||
DdlProveedor.setEsWebService(false);
|
||||
}
|
||||
|
||||
private void InicializaValores()
|
||||
{
|
||||
txtFechaI.Text = NowADS().FirstDayOfMonth().ToShortDateString();
|
||||
txtFechaF.Text = NowADS().ToShortDateString();
|
||||
|
||||
DdlClientes.setEsWebService(true);
|
||||
DdlClientes.Attributes.Add("data-metodo", "getcliente");
|
||||
DdlClientes.SelectedText = "Todos";
|
||||
DdlClientes.Attributes.Add("data-metodo", "getcliente");
|
||||
DdlClientes.SelectedText = "Todos";
|
||||
DdlClientes.SelectedValue = "-1";
|
||||
@@ -115,29 +84,29 @@ public partial class Ventas_RepVencimientosCredito : ClsPaginas
|
||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
CargaDatos();
|
||||
}
|
||||
}
|
||||
|
||||
private void CargaDatos()
|
||||
{
|
||||
DTDatosGvD = new DataTable();
|
||||
LnkDescargaExcel.Visible = false;
|
||||
LnkDescargaExcel.Visible = false;
|
||||
|
||||
ClsVentas objVentas = new ClsVentas();
|
||||
|
||||
int CveProveedor = DdlProveedor.SelectedValue.ToEntero() > 0 ? DdlProveedor.SelectedValue.ToEntero() : -1;
|
||||
int CveProveedor = -1;
|
||||
|
||||
if(TipoLinea == 1)
|
||||
if(TipoLinea == 1)
|
||||
{
|
||||
if (objVentas.GetLineasAdicionalesVencimientos( DdlClientes.SelectedValue.ToEntero(), 1, txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), 1, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
GvLineasAdicionales.DataSource = objVentas.DtResultados;
|
||||
GvD.DataSource = objVentas.DtResultados;
|
||||
|
||||
if (objVentas.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
DTDatosGvD = objVentas.DtResultados;
|
||||
LnkDescargaExcel.Visible = true;
|
||||
UpAcciones.Update();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -157,7 +126,7 @@ public partial class Ventas_RepVencimientosCredito : ClsPaginas
|
||||
|
||||
if (objVentas.RepLineasAdicionales(DdlAgrupador.SelectedValue.ToEntero(), -1, DdlClientes.SelectedValue.ToEntero(), CveProveedor, 2, -1, MinFecha, MaxFecha, DdlEstatus.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa))
|
||||
{
|
||||
GvLAPO.DataSource = objVentas.DtResultados;
|
||||
GvLAPO.DataSource = objVentas.DtResultados;
|
||||
|
||||
if (objVentas.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
@@ -169,7 +138,7 @@ public partial class Ventas_RepVencimientosCredito : ClsPaginas
|
||||
else
|
||||
{
|
||||
GvLAPO.DataSource = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
objVentas.Dispose();
|
||||
@@ -301,7 +270,7 @@ public partial class Ventas_RepVencimientosCredito : ClsPaginas
|
||||
objVentas.Dispose();
|
||||
}
|
||||
|
||||
protected void LnkDescargaExcel_Click(object sender, EventArgs e)
|
||||
protected void LnkDescargaExcel_Click(object sender, EventArgs e)
|
||||
{
|
||||
if(TipoLinea == 1)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user