Libro mayor SIG

This commit is contained in:
rakcsle
2024-08-28 22:53:45 -07:00
parent 473bdbced3
commit a49f1de1ca
12 changed files with 4309 additions and 4021 deletions

View File

@@ -3577,7 +3577,7 @@ Public Class ClsContabilidad
Public Function GetMovimientosAuxiliaresCatalogo(CveCuenta As Integer, FechaI As Date, FechaF As Date, CveMoneda As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, TipoReporte As String, OpcionCuentas As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Conta_MovimientosAuxiliaresCatalogoGetOIC")
DataAdapter("PA_Conta_MovimientosAuxiliaresCatalogoGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@FechaI", SqlDbType.Date).Value = FechaI
@@ -3599,6 +3599,32 @@ Public Class ClsContabilidad
Return Retorno
End Function
Public Function GetLibroMayor2(CveCuenta As Integer, FechaI As Date, FechaF As Date, CveMoneda As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, TipoReporte As String, OpcionCuentas As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Conta_LibroMayor2Get")
With SqlAdapter.SelectCommand.Parameters
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Tipo", SqlDbType.Int).Value = TipoReporte
.Add("@OpcionCuentas", SqlDbType.Int).Value = OpcionCuentas
End With
SqlAdapter.SelectCommand.CommandTimeout = 0
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
Me.OnError("Ocurrió un error al obtener los Movimientos Libro mayor", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function PolizaGet(CvePoliza As Integer) As Boolean
Dim Retorno As Boolean = False

View File

@@ -4495,24 +4495,24 @@ Public Class ClsInventarios
Return Retorno
End Function
Public Function UpdateOSEstatusInventario(CveOS As Integer, Estatus As Boolean, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_OS_OSEstatusInventarioUpdate")
With SqlAdapter.SelectCommand.Parameters
Public Function UpdateOSEstatusInventario(CveOS As Integer, Estatus As Boolean, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_OS_OSEstatusInventarioUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveOS", SqlDbType.Int).Value = CveOS
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al actualizar el estatus de OS.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al actualizar el estatus de OS.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
#End Region

View File

@@ -10172,7 +10172,7 @@ Public Class ClsPaginas
PaginaDict.Add("/Contabilidad/RepEstadoResultadosHorizontal.aspx".ToUpper(), 420)
PaginaDict.Add("/Contabilidad/RepAnexoCatalogoMensualHorizontal.aspx".ToUpper(), -1)
PaginaDict.Add("/Contabilidad/CatBloqueoDiario.aspx".ToUpper(), 680)
PaginaDict.Add("/Contabilidad/LibroMayor2.aspx".ToUpper(), -1)
PaginaDict.Add("/Contabilidad/LibroMayor2.aspx".ToUpper(), 1353)
#End Region

View File

@@ -21252,8 +21252,8 @@ Partial Class Compras_Compras
Return True
Else
Dim TmpImporteRNC As Decimal = If(AjusteProntoPagoPorcentajeIVA > 0, (ImporteRNC * AjusteProntoPagoPorcentajeIVA), ImporteRNC)
Dim TmpImporteRNCProntoPago As Decimal = If(AjusteProntoPagoPorcentajeIVA > 0, (TmpImporteRNCProntoPago * AjusteProntoPagoPorcentajeIVA), ImporteRNCProntoPago)
Dim TmpImporteRNC As Decimal = If(AjusteProntoPagoPorcentajeIVA > 0, ImporteRNC + (ImporteRNC * AjusteProntoPagoPorcentajeIVA), ImporteRNC)
Dim TmpImporteRNCProntoPago As Decimal = If(AjusteProntoPagoPorcentajeIVA > 0, ImporteRNCProntoPago + (ImporteRNCProntoPago * AjusteProntoPagoPorcentajeIVA), ImporteRNCProntoPago)
Dim StrMsg As String = $"Existe una diferencia de ${(TmpImporteRNC + TmpImporteRNCProntoPago).ToString("###,###,###.00")} entre la compra y la Orden de Compra. <br/> Se generaran Remisiones de Nota de Crédito. <br/> - Descuento de ${TmpImporteRNC.ToString("###,###,###.00")}.<br/>"
If TmpImporteRNCProntoPago > 0 Then

View File

@@ -25,15 +25,15 @@
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
<li>
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Generar EXCEL</asp:LinkButton>
<asp:LinkButton ID="ImgExcel" runat="server" Visible="false"><i class="fa fa-ad-excel" ></i> Generar EXCEL</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="Imprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
<asp:LinkButton ID="Imprimir" runat="server" Visible="false"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
</li>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
Movimientos Auxiliares del Catálogo
Libro Mayor
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
@@ -97,10 +97,10 @@
</div>
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
<div class="row">
<div class="col-md-1 truncate">
<div class="col-md-1 ">
Tipo Movto
</div>
<div class="col-md-2 truncate">
<div class="col-md-3 ">
<asp:DropDownList ID="DdlOpcionCuentas" runat="server" DataTextField="Cuenta" DataValueField="CveCuenta" TabIndex="4" CssClass="form-control input-sm select2me" Width="100%">
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Con movimientos" Value="1"></asp:ListItem>
@@ -109,7 +109,7 @@
<asp:ListItem Text="Con movimientos o saldo no igual a cero" Value="4"></asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-md-1 truncate" id="tdTipoReporte" visible="false" runat="server">
<div class="col-md-1 " id="tdTipoReporte" visible="false" runat="server">
Tipo
</div>
<div class="col-md-2" id="tdTipoReporte2" visible="false" runat="server">

View File

@@ -212,7 +212,7 @@ Partial Class Conta_LibroMayor2
Cuenta = DdlCuentas.SelectedItem.ToString
Dim ObjConta As New ClsContabilidad
If ObjConta.GetMovimientosAuxiliaresCatalogo(DdlCuentas.SelectedValue.ToEntero, FechaInicio, FechaFin, -1, CveProyecto, CveSubProyecto, UsuarioActual.CveEmpresa, TipoReporte, DdlOpcionCuentas.SelectedValue.ToEntero) Then
If ObjConta.GetLibroMayor2(DdlCuentas.SelectedValue.ToEntero, FechaInicio, FechaFin, -1, CveProyecto, CveSubProyecto, UsuarioActual.CveEmpresa, TipoReporte, DdlOpcionCuentas.SelectedValue.ToEntero) Then
DtDatos = ObjConta.DtResultados
DtTotales = DtDatos.Clone

View File

@@ -10,6 +10,9 @@
<asp:LinkButton ID="BtnImprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
<%--<asp:ImageButton ID="BtnImprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" Visible="true" /> &nbsp;--%>
</li>
<li>
<asp:LinkButton ID="BtnImprimirPoSubProyecto" runat="server" OnClick="BtnImprimirPoSubProyecto_Click" Visible="false" ><i class="fa fa-print"></i> Imprimir por Sub Proyecto</asp:LinkButton>
</li>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">

View File

@@ -5,6 +5,12 @@ Imports System
Imports System.Data
Imports Extensiones
Imports Microsoft.Reporting.WebForms
Imports ClosedXML.Excel
Imports Profact.TimbraCFDI40
Imports System.IO
Imports System.Drawing
Partial Class Contabilidad2_RepBalanzaComprobacion
Inherits ClsPaginas
@@ -105,6 +111,10 @@ Partial Class Contabilidad2_RepBalanzaComprobacion
End If
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto)
If UsuarioActual.CveRol = 1 Then
BtnImprimirPoSubProyecto.Visible = True
End If
End If
End Sub
@@ -254,4 +264,238 @@ Partial Class Contabilidad2_RepBalanzaComprobacion
ImprimirPDF(reportpath, DtDatos, params, fileName, Formato)
End Sub
Protected Sub BtnImprimirPoSubProyecto_Click(sender As Object, e As EventArgs)
Dim WBAnexoBalanza = New ClosedXML.Excel.XLWorkbook
Dim TipoReporte = DdlTipoReporte.SelectedValue.ToEntero
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
Dim SPCounter As Integer = 1
For Each drSP As DataRow In GlobalDTSubProyectos(UsuarioActual.CveEmpresa).Rows
Dim ObjConta As New ClsContabilidad
If ObjConta.GetBalanzaComprobacion(FechaInicio, FechaFin, 2, TipoReporte, -1, drSP("CveSubProyecto").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlVista.SelectedValue.ToEntero, DdlNivel.SelectedValue.ToEntero) Then
DtDatos = ObjConta.DtResultados
Else
DtDatos = Nothing
Alert("Ocurrio un error al cargar los datos del Anexo del Catálogo", TipoMensaje.MsgError)
Exit For
End If
ObjConta.Dispose()
If DtDatos.Rows.Count > 0 Then
WBAnexoBalanza.AddWorksheet(WSDocumento(drSP("SubProyecto").ToString, DtDatos))
Dim spNombre As String = drSP("SubProyecto").ToString().Replace(":", "_").Replace("/", "_").Replace("\", "_").Replace("?", "_").Replace("*", "_").Replace("[", "_").Replace("]", "_")
WBAnexoBalanza.Worksheet(SPCounter).Name = $"{SPCounter}_{spNombre}"
SPCounter = SPCounter + 1
End If
Next
Dim msB = New MemoryStream()
WBAnexoBalanza.SaveAs(msB)
Dim BB As Byte() = msB.ToArray
msB.Dispose()
Response.Clear()
Response.Buffer = True
Response.AddHeader("content-disposition", "attachment; filename=Balanza_" & Now.ToString("yyyyMMddhhmmss") & ".xlsx")
Response.ContentType = "application/vnd.ms-excel"
Response.BinaryWrite(BB)
Response.End()
End Sub
Function WSDocumento(SubProyecto As String, DtDatos As DataTable) As IXLWorksheet
Dim WBAnexoSalvar = New ClosedXML.Excel.XLWorkbook
Dim WBReporte = New ClosedXML.Excel.XLWorkbook()
WBReporte.Worksheets.Add("1")
Dim WSReporte = WBReporte.Worksheet(1)
Dim RutaLogo As String = String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta)
If File.Exists(RutaLogo) Then
Dim imagePath As String = RutaLogo
Dim img As Bitmap = New Bitmap(imagePath)
Dim picture = WSReporte.AddPicture(img).MoveTo(WSReporte.Cell("A1"))
picture.Scale(0.5)
End If
Dim Tamaniofuente As Integer = 13
Dim Range = WSReporte.Range("A1:D1")
WSReporte.Style.Font.FontSize = 10
WSReporte.Style.Font.FontName = "Arial Narrow"
WSReporte.Style.Alignment.WrapText = True
Range.Merge().Style.Font.SetBold().Font.FontSize = Tamaniofuente
WSReporte.Range("A1:F1").Merge().Style.Font.SetBold().Font.FontSize = Tamaniofuente
WSReporte.Range("A2:F2").Merge().Style.Font.SetBold().Font.FontSize = Tamaniofuente
WSReporte.Range("A3:F3").Merge().Style.Font.SetBold().Font.FontSize = Tamaniofuente
WSReporte.Range("A4:F4").Merge().Style.Font.SetBold().Font.FontSize = Tamaniofuente
WSReporte.Range("A5:F5").Merge().Style.Font.SetBold().Font.FontSize = Tamaniofuente
WSReporte.Range("A1:A5").Style.Alignment.SetHorizontal(XLAlignmentHorizontalValues.Center)
WSReporte.Column(1).Width = 15
WSReporte.Column(2).Width = 35
WSReporte.Column(3).Width = 14
WSReporte.Column(4).Width = 14
WSReporte.Column(5).Width = 14
WSReporte.Column(6).Width = 14
WSReporte.Column(7).Width = 14
WSReporte.Cell(1, 1).Value = UsuarioActual.Empresa.Empresa
WSReporte.Cell(2, 1).Value = $"Balanza de Comprobación del {TxtFechaDel.Text} al {TxtFechaAl.Text}"
WSReporte.Cell(5, 1).Value = $"Sub Proyecto: {SubProyecto}"
WSReporte.Cell(5, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left
WSReporte.Cell(5, 1).Style.Font.Bold = True
WSReporte.Cell(6, 1).Value = "Cuenta"
WSReporte.Cell(6, 2).Value = "Nombre"
WSReporte.Cell(6, 1).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center
WSReporte.Cell(6, 2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center
WSReporte.Cell(6, 3).Value = $"Saldos Iniciales{vbCrLf}Deudor Acreedor"
WSReporte.Cell(6, 4).Value = $"Cargos"
WSReporte.Cell(6, 5).Value = $"Abonos"
WSReporte.Cell(6, 6).Value = $"Saldo Actuales{vbCrLf} Deudor Acreedo"
WSReporte.Range("A6:F6").Style.Font.Bold = True
WSReporte.Range("A6:F6").Style.Font.FontSize = 10
WSReporte.Range("A6:F6").Style.Alignment.SetHorizontal(XLAlignmentHorizontalValues.Center)
WSReporte.Range("A6:F6").Style.Border.TopBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
WSReporte.Range("A6:F6").Style.Border.BottomBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
WSReporte.Range("A6:F6").Style.Border.RightBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
Dim CuerrentRow As Integer = 7
CuerrentRow = CuerrentRow + 1
For Each Drow As DataRow In DtDatos.Rows
WSReporte.Cell(CuerrentRow, 1).Value = Drow("Codigo").ToString
WSReporte.Cell(CuerrentRow, 2).Value = Drow("Nombre").ToString
WSReporte.Cell(CuerrentRow, 3).Value = Drow("SaldoInicial").ToString
WSReporte.Cell(CuerrentRow, 4).Value = Drow("Cargos").ToString
WSReporte.Cell(CuerrentRow, 5).Value = Drow("Abonos").ToString
WSReporte.Cell(CuerrentRow, 6).Value = Drow("SaldoActual").ToString
If Drow("CtaMayor").ToString.ToEntero.Contiene(1) Then
WSReporte.Cell(CuerrentRow, 1).Style.Font.Bold = True
WSReporte.Cell(CuerrentRow, 2).Style.Font.Bold = True
WSReporte.Cell(CuerrentRow, 3).Style.Font.Bold = True
WSReporte.Cell(CuerrentRow, 4).Style.Font.Bold = True
WSReporte.Cell(CuerrentRow, 5).Style.Font.Bold = True
WSReporte.Cell(CuerrentRow, 6).Style.Font.Bold = True
If Drow("CtaMayor").ToString.ToEntero.Contiene(1) Then
WSReporte.Cell(CuerrentRow, 1).Style.Alignment.Indent = 1
WSReporte.Cell(CuerrentRow, 1).Style.Font.Italic = True
End If
Else
WSReporte.Cell(CuerrentRow, 1).Style.Alignment.WrapText = True
WSReporte.Cell(CuerrentRow, 1).Style.Alignment.Indent = 2
End If
WSReporte.Cell(CuerrentRow, 2).Style.NumberFormat.Format = "#,##0.00; [Black] - #,##0.00 ;""-"""
WSReporte.Cell(CuerrentRow, 3).Style.NumberFormat.Format = "#,##0.00; [Black] - #,##0.00 ;""-"""
WSReporte.Cell(CuerrentRow, 4).Style.NumberFormat.Format = "#,##0.00; [Black] - #,##0.00 ;""-"""
WSReporte.Cell(CuerrentRow, 5).Style.NumberFormat.Format = "#,##0.00; [Black] - #,##0.00 ;""-"""
WSReporte.Cell(CuerrentRow, 6).Style.NumberFormat.Format = "#,##0.00; [Black] - #,##0.00 ;""-"""
CuerrentRow = CuerrentRow + 1
Next
For xy As Integer = 6 To CuerrentRow
WSReporte.Cell(xy, 6).Style.Border.RightBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
WSReporte.Cell(xy, 1).Style.Border.LeftBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
Next
CuerrentRow = CuerrentRow + 1
WSReporte.Cell(CuerrentRow, 1).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center
WSReporte.Cell(CuerrentRow, 2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center
WSReporte.Cell(CuerrentRow, 3).Value = $"Saldos Iniciales{vbCrLf}Deudor Acreedor"
WSReporte.Cell(CuerrentRow, 4).Value = $"Cargos"
WSReporte.Cell(CuerrentRow, 5).Value = $"Abonos"
WSReporte.Cell(CuerrentRow, 6).Value = $"Saldo Actuales{vbCrLf} Deudor Acreedo"
WSReporte.Cell(CuerrentRow, 1).Style.Border.BottomBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
WSReporte.Cell(CuerrentRow, 2).Style.Border.BottomBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
WSReporte.Cell(CuerrentRow, 3).Style.Border.BottomBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
WSReporte.Cell(CuerrentRow, 4).Style.Border.BottomBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
WSReporte.Cell(CuerrentRow, 5).Style.Border.BottomBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
WSReporte.Cell(CuerrentRow, 6).Style.Border.BottomBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
WSReporte.Range($"A{CuerrentRow}:F{CuerrentRow}").Style.Font.Bold = True
WSReporte.Range($"A{CuerrentRow}:F{CuerrentRow}").Style.Font.FontSize = 10
WSReporte.Range($"A{CuerrentRow}:F{CuerrentRow}").Style.Alignment.SetHorizontal(XLAlignmentHorizontalValues.Center)
WSReporte.Range($"A{CuerrentRow}:F{CuerrentRow}").Style.Border.TopBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
WSReporte.Range($"A{CuerrentRow}:F{CuerrentRow}").Style.Border.BottomBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
WSReporte.Range($"A{CuerrentRow}:F{CuerrentRow}").Style.Border.RightBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
CuerrentRow = CuerrentRow + 1
Dim ultimaFila As DataRow = DtDatos.Rows(DtDatos.Rows.Count - 1)
Dim LastSaldoID As Decimal = ultimaFila("SaldoID").ToString.ToDecimal
Dim LastTotalAbonos As Decimal = ultimaFila("TotalAbonos").ToString.ToDecimal
Dim LastTotalCargos As Decimal = ultimaFila("TotalCargos").ToString.ToDecimal
Dim LastSaldoAD As Decimal = ultimaFila("SaldoAD").ToString.ToDecimal
Dim LastSaldoIA As Decimal = ultimaFila("SaldoIA").ToString.ToDecimal
Dim LastSaldoAA As Decimal = ultimaFila("SaldoAA").ToString.ToDecimal
WSReporte.Cell(CuerrentRow, 2).Value = "Sumas Iguales"
WSReporte.Cell(CuerrentRow, 3).Value = LastSaldoID
WSReporte.Cell(CuerrentRow, 4).Value = LastTotalCargos
WSReporte.Cell(CuerrentRow, 5).Value = LastTotalAbonos
WSReporte.Cell(CuerrentRow, 6).Value = LastSaldoAD
WSReporte.Cell(CuerrentRow, 3).Style.NumberFormat.Format = "#,##0.00; [Black] - #,##0.00 ;""-"""
WSReporte.Cell(CuerrentRow, 4).Style.NumberFormat.Format = "#,##0.00; [Black] - #,##0.00 ;""-"""
WSReporte.Cell(CuerrentRow, 5).Style.NumberFormat.Format = "#,##0.00; [Black] - #,##0.00 ;""-"""
WSReporte.Cell(CuerrentRow, 6).Style.NumberFormat.Format = "#,##0.00; [Black] - #,##0.00 ;""-"""
CuerrentRow = CuerrentRow + 1
WSReporte.Cell(CuerrentRow, 3).Value = LastSaldoIA
WSReporte.Cell(CuerrentRow, 6).Value = LastSaldoAA
WSReporte.Cell(CuerrentRow, 3).Style.NumberFormat.Format = "#,##0.00; [Black] - #,##0.00 ;""-"""
WSReporte.Cell(CuerrentRow, 6).Style.NumberFormat.Format = "#,##0.00; [Black] - #,##0.00 ;""-"""
WSReporte.Range($"B{CuerrentRow}:F{CuerrentRow}").Style.Border.BottomBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
WSReporte.PageSetup.PrintAreas.Add($"A1:G{CuerrentRow + 0 + 1}")
WSReporte.PageSetup.Margins.Top = 0.3
WSReporte.PageSetup.Margins.Left = 0.8
WSReporte.PageSetup.Margins.Right = 0.8
WSReporte.PageSetup.FitToPages(1, 1)
WBReporte.Worksheet(1).CopyTo(WBAnexoSalvar, "SubProyecto")
Return WBReporte.Worksheet(1)
End Function
End Class

File diff suppressed because it is too large Load Diff

View File

@@ -79,7 +79,7 @@
<div class="portlet solid grey-cascade portlet-filter" style="min-height: 80px !important;">
<div class="portlet-title portlet-filterT smalltitle">
<div class="tools">
<asp:Button ID="btConsultar" CssClass="btn btn-primary" runat="server" Text="Consultar" /></td>
<asp:Button ID="btConsultar" CssClass="btn btn-primary" runat="server" Text="Consultar" /></td>
</div>
<div class="titlefiltros caption ">
@@ -136,11 +136,11 @@
<asp:ListItem Text="Devolución" Value="DEV"></asp:ListItem>
</asp:DropDownList>
</div>
<%-- <div class="col-md-1 truncate" id="DivSucursal" runat="server" style="text-align: right!important;">Sucursal:</div>
<div class="col-md-1" id="DivSucursal2" runat="server">
<asp:DropDownList ID="DdlSucursal" runat="server" AppendDataBoundItems="true" DataTextField="Sucursal" DataValueField="CveSucursal" Class="table-group-action-input form-control input-inline input-sm select2me" Width="100px">
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
</asp:DropDownList>
<%-- <div class="col-md-1 truncate" id="DivSucursal" runat="server" style="text-align: right!important;">Sucursal:</div>
<div class="col-md-1" id="DivSucursal2" runat="server">
<asp:DropDownList ID="DdlSucursal" runat="server" AppendDataBoundItems="true" DataTextField="Sucursal" DataValueField="CveSucursal" Class="table-group-action-input form-control input-inline input-sm select2me" Width="100px">
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>--%>
<div class="col-md-1 truncate" id="DivSubProyecto" runat="server" style="text-align: right!important;"><asp:Label runat="server" ID="LblSubProyecto" text="Proyecto" /></div>
<div class="col-md-1" id="DivSubProyecto2" runat="server">
@@ -243,51 +243,51 @@
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<%--<script src="/Scripts/DataTables.js"></script>
<script type="text/javascript">
function pageLoad(sender, e) {
$(document).ready(function () {
$('a[class="ajax__tab_tab"]').click(function () {
$.fn.dataTable.tables({ visible: true, api: true }).columns.adjust();
});
});
}
function OrdenarGvVentas() {
var Tam = TamañoVentana();
var Alto = Tam.height - 330;
if (Alto < 100) {
Alto = 100;
}
$('#GvVentas').DataTable({
scrollY: Alto + 'px',
scrollCollapse: true,
paging: false,
searching: false,
info: false
});
$('#GvVentas').parent().parent().children().first().css("position", "static");
}
function OrdenarGvCompras() {
var Tam = TamañoVentana();
var Alto = Tam.height - 330;
if (Alto < 100) {
Alto = 100;
}
$('#GvCompras').DataTable({
scrollY: Alto + 'px',
scrollCollapse: true,
paging: false,
searching: false,
info: false
});
$('#GvCompras').parent().parent().children().first().css("position", "static");
}
<%--<script src="/Scripts/DataTables.js"></script>
<script type="text/javascript">
function pageLoad(sender, e) {
$(document).ready(function () {
$('a[class="ajax__tab_tab"]').click(function () {
$.fn.dataTable.tables({ visible: true, api: true }).columns.adjust();
});
});
}
function OrdenarGvVentas() {
var Tam = TamañoVentana();
var Alto = Tam.height - 330;
if (Alto < 100) {
Alto = 100;
}
$('#GvVentas').DataTable({
scrollY: Alto + 'px',
scrollCollapse: true,
paging: false,
searching: false,
info: false
});
$('#GvVentas').parent().parent().children().first().css("position", "static");
}
function OrdenarGvCompras() {
var Tam = TamañoVentana();
var Alto = Tam.height - 330;
if (Alto < 100) {
Alto = 100;
}
$('#GvCompras').DataTable({
scrollY: Alto + 'px',
scrollCollapse: true,
paging: false,
searching: false,
info: false
});
$('#GvCompras').parent().parent().children().first().css("position", "static");
}
</script>--%>
</asp:Content>

View File

@@ -196,8 +196,15 @@ Partial Class OC_PopUpBuscarReq
Folio = Array(2).ToEntero
End If
Else
Serie = "-1"
Folio = TxtFolio.Text.Trim.ToEntero
Folio = -1
If TxtFolio.Text.Trim.ToEntero > 0 Then
Folio = TxtFolio.Text.Trim.ToEntero
Else
Serie = TxtFolio.Text.Trim
End If
End If
End If

View File

@@ -479,8 +479,16 @@ Partial Class OS_OrdenesServicios
End If
End If
If TipoEstatus.Contiene(1, 2, 3, 4) And CveVenta <= 0 And (UsuarioActual.TienePermisoProceso(370) Or UsuarioActual.TienePermisoProceso(382)) Then
If TipoEstatus.Contiene(1, 2, 3) And CveVenta <= 0 And (UsuarioActual.TienePermisoProceso(370) Or UsuarioActual.TienePermisoProceso(382)) Then
BtnCancelar.Visible = True
ElseIf TipoEstatus.Contiene(4) And (UsuarioActual.TienePermisoProceso(370) Or UsuarioActual.TienePermisoProceso(382)) Then
BtnCancelar.Visible = False
BtnGuardar.Visible = True
DdlEstatusOS.Enabled = False
ElseIf TipoEstatus.Contiene(5) And (UsuarioActual.TienePermisoProceso(370) Or UsuarioActual.TienePermisoProceso(382)) Then
BtnCancelar.Visible = False
BtnGuardar.Visible = False
DdlEstatusOS.Enabled = False
Else
BtnGuardar.Visible = False
End If