RepProgramasOperativosAvances
This commit is contained in:
154
AC/RepProgramasOperativosAvances.aspx
Normal file
154
AC/RepProgramasOperativosAvances.aspx
Normal file
@@ -0,0 +1,154 @@
|
|||||||
|
<%@ Page Title="Reporte Avance Programatico" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepProgramasOperativosAvances.aspx.vb" Inherits="AC_RepProgramasOperativosAvances" %>
|
||||||
|
|
||||||
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
|
<style>
|
||||||
|
/* .ADScroller-header{
|
||||||
|
|
||||||
|
border:solid;
|
||||||
|
border-color:#DDD;
|
||||||
|
}*/
|
||||||
|
</style>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||||
|
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<asp:HyperLink ID="HplAgregar" runat="server" NavigateUrl="/AC/ProgramaOperativo.aspx?CveProgramaOperativo=703&EsProyecto=1,&Bloqueado=1" Target="_blank" Visible="True"><i class="fa fa-plus-circle"></i> Agregar</asp:HyperLink>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LBPdf" OnClick="LBPdf_Click" runat="server"><i class="fa fa-file-pdf-o""></i> Exporta PDF</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LBExcel" OnClick="LBExcel_Click" runat="server"><i class="fa fa-file-excel-o"></i> Exporta Excel</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||||
|
Reporte de Avance Programatico
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||||
|
|
||||||
|
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="portlet solid grey-cascade portlet-filter">
|
||||||
|
<div class="portlet-title portlet-filterT smalltitle">
|
||||||
|
<div class="tools">
|
||||||
|
<asp:Button ID="consultar" runat="server" Text="Consultar" OnClick="consultar_Click" CssClass="btn btn-Default" />
|
||||||
|
</div>
|
||||||
|
<div class="titlefiltros caption ">
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-md-1" style="width: 130px;">Tipo de proyecto:</label>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:DropDownList ID="DdlProyecto" runat="server" CssClass="select2me" Style="width: 150px !important;">
|
||||||
|
<asp:ListItem Text="Presupuesto" Value="1"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="AnteProyecto" Value="0"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
<label class="col-md-1">Ejercicio:</label>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:DropDownList ID="DdlEjercicio" runat="server" Width="100%" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="select2me"></asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
<asp:UpdatePanel ID="UPPDatos" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<asp:GridView ID="GVD" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Registros de Avance Programatico" Width="100%"
|
||||||
|
DataKeyNames="CveProgramaOperativo,EsProyecto,Bloqueado"
|
||||||
|
CssClass="table table-advance table-hover Widthall ScrollAD mysmallbtn" data-freezerows="2" Style="text-align: center;" GridLines="None" OnDataBound="GVD_DataBound" >
|
||||||
|
<Columns>
|
||||||
|
|
||||||
|
|
||||||
|
<asp:BoundField HeaderText="Clave" DataField="Clave" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
<asp:BoundField HeaderText="Programa Operativo Anual (POA)" DataField="ProgramaOperativo" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
<asp:BoundField HeaderText="U.M." DataField="UnidadMedida" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
|
||||||
|
<asp:BoundField HeaderText="Meta" DataField="Meta" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<%--<asp:BoundField HeaderText="" DataField="Acciones" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />--%>
|
||||||
|
|
||||||
|
|
||||||
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||||
|
<HeaderTemplate>
|
||||||
|
Acciones <br /> Realizadas
|
||||||
|
</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="LblAcciones" Text='<%#Eval("Acciones", "{0:N2}") %>' Target="_blank" runat="server" />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
|
||||||
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||||
|
<HeaderTemplate>
|
||||||
|
Dif. Meta <br> Acciones Realizadas
|
||||||
|
</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="LblMetaDif" Text='<%#Eval("MetaDif", "{0:N2}") %>' Target="_blank" runat="server" />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
|
||||||
|
<%--<asp:BoundField HeaderText="Dif. Meta Acciones Realizadas" DataField="MetaDif" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />--%>
|
||||||
|
|
||||||
|
|
||||||
|
<asp:BoundField HeaderText="Comprometido" DataField="Comprometido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField HeaderText="Devengado" DataField="Devengado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField HeaderText="Ejercido" DataField="Ejercido" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField HeaderText="Pagado" DataField="Pagado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<%--<asp:HyperLinkField HeaderText="Clave" DataTextField="Clave" DataNavigateUrlFields="CveProgramaOperativo,EsProyecto,Bloqueado"
|
||||||
|
DataNavigateUrlFormatString="/AC/ProgramaOperativo.aspx?CveProgramaOperativo={0}&EsProyecto={1},&Bloqueado={2}" ControlStyle-CssClass="btn btn-circle btn-sm blue" />--%>
|
||||||
|
|
||||||
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="80px" HeaderText="Acciones">
|
||||||
|
<ItemTemplate>
|
||||||
|
|
||||||
|
<asp:HyperLink ID="GvHLAgregar" runat="server"
|
||||||
|
CssClass="btn btn-circle btn-sm blue"
|
||||||
|
Target="_blank" Visible="True"><i class='fa fa-plus'></i></asp:HyperLink>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
|
||||||
|
</Columns>
|
||||||
|
|
||||||
|
</asp:GridView>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
NavigateUrl="/AC/ProgramaOperativo.aspx?CveProgramaOperativo=703&EsProyecto=1,&Bloqueado=1"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
|
<asp:UpdatePanel runat="server">
|
||||||
|
<ContentTemplate>
|
||||||
|
<table width="100%">
|
||||||
|
<tr>
|
||||||
|
<td align="right">
|
||||||
|
<asp:Button ID="BtnProyecto" Visible="false" runat="server" Text="Aprobar Programa" class="btn green" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
204
AC/RepProgramasOperativosAvances.aspx.vb
Normal file
204
AC/RepProgramasOperativosAvances.aspx.vb
Normal file
@@ -0,0 +1,204 @@
|
|||||||
|
Imports Extensiones
|
||||||
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
Imports System.Data
|
||||||
|
Imports System.Drawing
|
||||||
|
|
||||||
|
Partial Class AC_RepProgramasOperativosAvances
|
||||||
|
Inherits ClsPaginas
|
||||||
|
|
||||||
|
|
||||||
|
#Region "PROPIEDADES"
|
||||||
|
|
||||||
|
Private Property DtProgramaOperativo As DataTable
|
||||||
|
Get
|
||||||
|
Return CType(ViewState("DtProgramaOperativo"), DataTable)
|
||||||
|
End Get
|
||||||
|
Set(value As DataTable)
|
||||||
|
ViewState("DtProgramaOperativo") = 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
|
||||||
|
SetValues()
|
||||||
|
CargaDatos()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
#Region " VALORES INICIALES "
|
||||||
|
Private Sub SetValues()
|
||||||
|
CargaEjercicios()
|
||||||
|
End Sub
|
||||||
|
Private Sub CargaEjercicios()
|
||||||
|
Dim ClsConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
|
If ClsConta.GetEjercicios() Then
|
||||||
|
DdlEjercicio.DataSource = ClsConta.DtResultados
|
||||||
|
Else
|
||||||
|
DdlEjercicio.DataSource = Nothing
|
||||||
|
End If
|
||||||
|
ClsConta.Dispose()
|
||||||
|
DdlEjercicio.DataBind()
|
||||||
|
|
||||||
|
DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString)
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub CargaDatos()
|
||||||
|
Dim objAC As New ClsAC
|
||||||
|
Dim Ejercicio As Integer = DdlEjercicio.SelectedValue.ToString.ToEntero
|
||||||
|
Dim EsProyecto As Boolean = CBool(DdlProyecto.SelectedValue.ToString)
|
||||||
|
|
||||||
|
BtnProyecto.Visible = False
|
||||||
|
|
||||||
|
If objAC.GetProgramasOperativosAvances(-1, UsuarioActual.CveEmpresa, EsProyecto, Ejercicio) Then
|
||||||
|
GVD.DataSource = objAC.DtResultados
|
||||||
|
GlobalDTAC_ProgramaOperativo(-1) = objAC.DtResultados
|
||||||
|
DtProgramaOperativo = objAC.DtResultados
|
||||||
|
|
||||||
|
'debe de haber datos para habilitar los botones
|
||||||
|
If DtProgramaOperativo.Rows.Count > 0 Then
|
||||||
|
If EsProyecto Then
|
||||||
|
If DtProgramaOperativo.Rows(0)("Bloqueado").ToString = "0" Then
|
||||||
|
BtnProyecto.Visible = True
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
'si es anteproyecto
|
||||||
|
If DtProgramaOperativo.Rows(0)("Bloqueado").ToString = "0" Then
|
||||||
|
BtnProyecto.Visible = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
UPPDatos.Update()
|
||||||
|
|
||||||
|
objAC.Dispose()
|
||||||
|
GVD.DataBind()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub consultar_Click(sender As Object, e As EventArgs)
|
||||||
|
CargaDatos()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub GVD_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVD.RowDataBound
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
|
'DataNavigateUrlFields = "CveProgramaOperativo,EsProyecto,Bloqueado"
|
||||||
|
'DataNavigateUrlFormatString = "/AC/ProgramaOperativo.aspx?CveProgramaOperativo={0}&EsProyecto={1},&Bloqueado={2}"
|
||||||
|
|
||||||
|
e.Row.FCHyperLink("GvHLAgregar").NavigateUrl = $"/AC/ProgramaOperativo.aspx?CveProgramaOperativo={e.Row.DataKey("CveProgramaOperativo")}&EsProyecto={e.Row.DataKey("EsProyecto")}&Bloqueado={e.Row.DataKey("Bloqueado")}"
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub BtnProyecto_Click(sender As Object, e As EventArgs) Handles BtnProyecto.Click
|
||||||
|
Dim objAC As New ClsAC()
|
||||||
|
objAC.IniciaTransacSQL()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Dim ErrorAC = False
|
||||||
|
For Each dr As DataRow In DtProgramaOperativo.Rows
|
||||||
|
If Not objAC.BloquearProgramaOperativo(dr("CveProgramaOperativo").ToString.ToEntero) Then
|
||||||
|
ErrorAC = True
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
If Not ErrorAC Then
|
||||||
|
objAC.Commit()
|
||||||
|
Alert("Los Programas Operativos se autorizaron correctamente", TipoMensaje.MsgInformacion)
|
||||||
|
Else
|
||||||
|
Alert("Ocurrió un error al bloquear los Programas Operativos ", TipoMensaje.MsgInformacion)
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
objAC.Dispose()
|
||||||
|
|
||||||
|
CargaDatos()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
#Region "I M P R I M I R "
|
||||||
|
Protected Sub LBPdf_Click(sender As Object, e As EventArgs)
|
||||||
|
' ImprimirReporte()
|
||||||
|
End Sub
|
||||||
|
Protected Sub LBExcel_Click(sender As Object, e As EventArgs)
|
||||||
|
' ImprimirReporte("Excel")
|
||||||
|
End Sub
|
||||||
|
Protected Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||||
|
'nombre del archivo a generar
|
||||||
|
Dim fileName As String = "ReporteProgramaOperativo"
|
||||||
|
'ubicacion del rdlc
|
||||||
|
Dim reportpath As String = "AC/Reportes/RepProgramaOperativo.rdlc"
|
||||||
|
|
||||||
|
'parametros a enviar al reporte
|
||||||
|
Dim params As New List(Of ReportParameter)
|
||||||
|
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||||
|
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||||
|
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||||
|
params.Add(New ReportParameter("pEjercicio", DdlEjercicio.SelectedValue.ToString))
|
||||||
|
ImprimirPDF(reportpath, DtProgramaOperativo, params, fileName, Formato)
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub GVD_DataBound(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
Dim row As New GridViewRow(0, 0, DataControlRowType.Header, DataControlRowState.Normal)
|
||||||
|
Dim cell As New TableHeaderCell()
|
||||||
|
|
||||||
|
cell = New TableHeaderCell()
|
||||||
|
cell.ColumnSpan = 1
|
||||||
|
cell.Text = ""
|
||||||
|
row.Controls.Add(cell)
|
||||||
|
|
||||||
|
cell = New TableHeaderCell()
|
||||||
|
cell.ColumnSpan = 1
|
||||||
|
cell.Text = ""
|
||||||
|
row.Controls.Add(cell)
|
||||||
|
|
||||||
|
cell = New TableHeaderCell()
|
||||||
|
cell.ColumnSpan = 1
|
||||||
|
cell.Text = ""
|
||||||
|
|
||||||
|
row.Controls.Add(cell)
|
||||||
|
|
||||||
|
cell = New TableHeaderCell()
|
||||||
|
cell.Text = "POA"
|
||||||
|
cell.ColumnSpan = 3
|
||||||
|
row.Controls.Add(cell)
|
||||||
|
|
||||||
|
cell = New TableHeaderCell()
|
||||||
|
cell.ColumnSpan = 4
|
||||||
|
cell.Text = "Presupuesto"
|
||||||
|
row.Controls.Add(cell)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
cell = New TableHeaderCell()
|
||||||
|
cell.ColumnSpan = 2
|
||||||
|
cell.Text = ""
|
||||||
|
row.Controls.Add(cell)
|
||||||
|
|
||||||
|
GVD.HeaderRow.Parent.Controls.AddAt(0, row)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -140,6 +140,26 @@ Public Class ClsAC
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function GetProgramasOperativosAvances(CveProgramaOperativo As Integer, CveEmpresa As Integer, Proyecto As Boolean, Optional Ejercicio As Integer = -1) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_AC_ProgramasOperativosAvancesGet")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveProgramaOperativo", SqlDbType.Int).Value = CveProgramaOperativo
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@Ejercicio", SqlDbType.SmallInt).Value = Ejercicio
|
||||||
|
.Add("@EsProyecto", SqlDbType.Bit).Value = Proyecto
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al obtener los programas Operativos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Function GetProgramaOperativo() As Boolean
|
Public Function GetProgramaOperativo() As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_AC_ProgramaOperativoGet")
|
DataAdapter("PA_AC_ProgramaOperativoGet")
|
||||||
|
|||||||
@@ -8312,6 +8312,8 @@ Public Class ClsPaginas
|
|||||||
PaginaDict.Add("/AC/CatFuentesFinanciamientoCONAC.aspx".ToUpper(), 277)
|
PaginaDict.Add("/AC/CatFuentesFinanciamientoCONAC.aspx".ToUpper(), 277)
|
||||||
PaginaDict.Add("/AC/ProgramaOperativo.aspx".ToUpper(), 289)
|
PaginaDict.Add("/AC/ProgramaOperativo.aspx".ToUpper(), 289)
|
||||||
PaginaDict.Add("/AC/RepProgramaOperativo.aspx".ToUpper(), 289)
|
PaginaDict.Add("/AC/RepProgramaOperativo.aspx".ToUpper(), 289)
|
||||||
|
PaginaDict.Add("/AC/RepProgramasOperativosAvances.aspx".ToUpper(), 1335)
|
||||||
|
|
||||||
PaginaDict.Add("/AC/RepPresupuestoEgresos.aspx".ToUpper(), 290)
|
PaginaDict.Add("/AC/RepPresupuestoEgresos.aspx".ToUpper(), 290)
|
||||||
PaginaDict.Add("/AC/RepPresupuestoEgresosMensual.aspx".ToUpper(), 290)
|
PaginaDict.Add("/AC/RepPresupuestoEgresosMensual.aspx".ToUpper(), 290)
|
||||||
PaginaDict.Add("/AC/RepPresupuestoEgresosDetalle.aspx".ToUpper(), 290)
|
PaginaDict.Add("/AC/RepPresupuestoEgresosDetalle.aspx".ToUpper(), 290)
|
||||||
|
|||||||
@@ -4919,7 +4919,7 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Dim DoctosRelacionados As String = If(UUIDSList.Count > 0, String.Join(",", UUIDSList.ToArray()), "-1")
|
Dim DoctosRelacionados As String = GeneraStrinDoctosRelacionados()
|
||||||
|
|
||||||
If ObjCompras.AddCompra(DdlTipoComprobante.SelectedValue, TxtDescripcion.Text.Trim, TxtSerie.Text.Trim, TxtFolio.Text.Trim, TxtFolioSecundario.Text.Trim, CveProveedor, TxtSubTotal.Text.ToDouble, TxtDescuento.Text.ToDouble,
|
If ObjCompras.AddCompra(DdlTipoComprobante.SelectedValue, TxtDescripcion.Text.Trim, TxtSerie.Text.Trim, TxtFolio.Text.Trim, TxtFolioSecundario.Text.Trim, CveProveedor, TxtSubTotal.Text.ToDouble, TxtDescuento.Text.ToDouble,
|
||||||
LblAmortizacion.Text.ToDouble, TxtIVA.Text.ToDouble, TxtRetIVA.Text.ToDouble, TxtRetISR.Text.ToDouble, TxtIEPS.Text.ToDouble, TxtOtrosImpuestos.Text.ToDouble,
|
LblAmortizacion.Text.ToDouble, TxtIVA.Text.ToDouble, TxtRetIVA.Text.ToDouble, TxtRetISR.Text.ToDouble, TxtIEPS.Text.ToDouble, TxtOtrosImpuestos.Text.ToDouble,
|
||||||
@@ -8234,6 +8234,29 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Function GeneraStrinDoctosRelacionados() As String
|
||||||
|
|
||||||
|
Dim DoctosRelacionados As String = "-1"
|
||||||
|
Dim listaUUIDSRelacionados As New List(Of String)
|
||||||
|
|
||||||
|
If UUIDSList.Count > 0 Then
|
||||||
|
For Each s As String In UUIDSList
|
||||||
|
If s.Trim.Length > 0 Then
|
||||||
|
listaUUIDSRelacionados.Add(s.Trim)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
If listaUUIDSRelacionados.Count > 0 Then
|
||||||
|
DoctosRelacionados = String.Join(",", listaUUIDSRelacionados.ToArray())
|
||||||
|
DoctosRelacionados = DoctosRelacionados.Substring(0, DoctosRelacionados.Length - 2)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return DoctosRelacionados
|
||||||
|
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Function AsignarSubProyectoPrincipal() As Integer
|
Private Function AsignarSubProyectoPrincipal() As Integer
|
||||||
|
|
||||||
Dim CveSubProyectoPrincioal As Integer = -1
|
Dim CveSubProyectoPrincioal As Integer = -1
|
||||||
|
|||||||
@@ -1824,7 +1824,7 @@ Partial Class General_SaldosIniciales
|
|||||||
Dim Codigo As String = Row("Código").ToString()
|
Dim Codigo As String = Row("Código").ToString()
|
||||||
Dim Descripcion As String = Row("Descripción").ToString()
|
Dim Descripcion As String = Row("Descripción").ToString()
|
||||||
|
|
||||||
Dim CuentaContable As String = Row("CuentaContable").ToString().Trim.Replace("-", "").Replace(" ", "")
|
Dim CuentaContable As String = Row("Cuenta Contable").ToString().Trim.Replace("-", "").Replace(" ", "")
|
||||||
If CuentaContable.Length > 0 Then
|
If CuentaContable.Length > 0 Then
|
||||||
Dim CveCuentaContable As Integer = DTCuentasContables.FiltroPrimeroValor("CveCuenta", $"Codigo ='{CuentaContable}'").ToEntero()
|
Dim CveCuentaContable As Integer = DTCuentasContables.FiltroPrimeroValor("CveCuenta", $"Codigo ='{CuentaContable}'").ToEntero()
|
||||||
If CveCuentaContable > 0 Then
|
If CveCuentaContable > 0 Then
|
||||||
@@ -1834,6 +1834,7 @@ Partial Class General_SaldosIniciales
|
|||||||
ErrorAF = True
|
ErrorAF = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
CuentaContable = Row("Cuenta Depreciación").ToString().Trim.Replace("-", "").Replace(" ", "")
|
CuentaContable = Row("Cuenta Depreciación").ToString().Trim.Replace("-", "").Replace(" ", "")
|
||||||
If CuentaContable.Length > 0 Then
|
If CuentaContable.Length > 0 Then
|
||||||
Dim CveCuentaContable As Integer = DTCuentasContables.FiltroPrimeroValor("CveCuenta", $"Codigo ='{CuentaContable}'").ToEntero()
|
Dim CveCuentaContable As Integer = DTCuentasContables.FiltroPrimeroValor("CveCuenta", $"Codigo ='{CuentaContable}'").ToEntero()
|
||||||
@@ -1844,6 +1845,7 @@ Partial Class General_SaldosIniciales
|
|||||||
ErrorAF = True
|
ErrorAF = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
CuentaContable = Row("Cuenta Depreciación Acumulada").ToString().Trim.Replace("-", "").Replace(" ", "")
|
CuentaContable = Row("Cuenta Depreciación Acumulada").ToString().Trim.Replace("-", "").Replace(" ", "")
|
||||||
If CuentaContable.Length > 0 Then
|
If CuentaContable.Length > 0 Then
|
||||||
Dim CveCuentaContable As Integer = DTCuentasContables.FiltroPrimeroValor("CveCuenta", $"Codigo ='{CuentaContable}'").ToEntero()
|
Dim CveCuentaContable As Integer = DTCuentasContables.FiltroPrimeroValor("CveCuenta", $"Codigo ='{CuentaContable}'").ToEntero()
|
||||||
@@ -1876,8 +1878,8 @@ Partial Class General_SaldosIniciales
|
|||||||
Dim Descripcion As String = Row("Descripción").ToString()
|
Dim Descripcion As String = Row("Descripción").ToString()
|
||||||
Dim TipoAF As String = Row("Tipo").ToString().Trim
|
Dim TipoAF As String = Row("Tipo").ToString().Trim
|
||||||
Dim SubTipo As String = Row("SubTipo").ToString().Trim
|
Dim SubTipo As String = Row("SubTipo").ToString().Trim
|
||||||
Dim Valor As Decimal = Row("Valor de compra").ToString().ToDecimal
|
Dim Valor As Decimal = Row("Valor").ToString().ToDecimal
|
||||||
Dim FechaAF As Date = Row("Fecha de compra").ToString().ToDate
|
Dim FechaAF As Date = Row("Fecha").ToString().ToDate
|
||||||
Dim NumeroSerie As String = Row("No. Serie").ToString()
|
Dim NumeroSerie As String = Row("No. Serie").ToString()
|
||||||
Dim Año As Integer = Row("Año").ToString().ToEntero()
|
Dim Año As Integer = Row("Año").ToString().ToEntero()
|
||||||
Dim CuentaContable As String = Row("Cuenta Contable").ToString()
|
Dim CuentaContable As String = Row("Cuenta Contable").ToString()
|
||||||
|
|||||||
@@ -2033,7 +2033,7 @@ Partial Class ProductosyServicios
|
|||||||
|
|
||||||
Dim ObjPS As New ClsProductosServicios
|
Dim ObjPS As New ClsProductosServicios
|
||||||
|
|
||||||
'ObjPS.IniciaTransacSQL()
|
ObjPS.IniciaTransacSQL()
|
||||||
|
|
||||||
If ObjPS.UnificarPS(CvePS, DdlPsUnificar.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
If ObjPS.UnificarPS(CvePS, DdlPsUnificar.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||||
Alert("Los productos y/o servicios han sido unificados", TipoMensaje.MsgInformacion)
|
Alert("Los productos y/o servicios han sido unificados", TipoMensaje.MsgInformacion)
|
||||||
@@ -2042,11 +2042,11 @@ Partial Class ProductosyServicios
|
|||||||
ErrorUnificacion = True
|
ErrorUnificacion = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'If ErrorUnificacion Then
|
If ErrorUnificacion Then
|
||||||
' ObjPS.RollBack()
|
ObjPS.RollBack()
|
||||||
'Else
|
Else
|
||||||
' ObjPS.Commit()
|
ObjPS.Commit()
|
||||||
'End If
|
End If
|
||||||
|
|
||||||
ObjPS.Dispose()
|
ObjPS.Dispose()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user