This commit is contained in:
Antonio Gonzalez
2020-08-10 11:07:09 -07:00
parent 0be233a696
commit cac6ee80a7
3 changed files with 56 additions and 21 deletions

View File

@@ -51,11 +51,12 @@ Partial Class Contabilidad_LibroDiario
InicializaValores()
If UsuarioActual.Empresa.UsaAC Then
BtnConsultar.Enabled = True
Else
Alert("La empresa no usa Armonización Contable", TipoMensaje.MsgError)
End If
BtnConsultar.Enabled = True
'If UsuarioActual.Empresa.UsaAC Then
' BtnConsultar.Enabled = True
'Else
' Alert("La empresa no usa Armonización Contable", TipoMensaje.MsgError)
'End If
End If
End Sub
@@ -212,7 +213,6 @@ Partial Class Contabilidad_LibroDiario
#Region " IMPRIMIR "
#End Region
Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click
'FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
'FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate)
@@ -245,5 +245,6 @@ Partial Class Contabilidad_LibroDiario
ImprimirbytesPDF(ImprimirPDFCrystal(Server.MapPath("~/Empresas/Grales/Formatos/LibroDiario.rpt"), DtDatos, lista, "LibroDiario", Formato), "LibroDiario", Formato)
End Sub
#End Region
End Class

View File

@@ -83,8 +83,8 @@
<asp:GridView ID="GvDatos" CssClass="table table-striped table-hover Widthall" GridLines="None" AutoGenerateColumns="False" runat="server">
<Columns>
<asp:BoundField HeaderText="Fecha" DataField="Fecha" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
<asp:BoundField HeaderText="Tipo" DataField="TipoPoliza" />
<asp:BoundField HeaderText="Poliza" DataField="FolioPoliza" />
<asp:BoundField HeaderText="Tipo" DataField="TipoPol" />
<asp:BoundField HeaderText="Poliza" DataField="Folio" />
<asp:BoundField HeaderText="Concepto" DataField="Concepto" />
<asp:BoundField HeaderText="Cuenta" DataField="Codigo" />
<asp:BoundField HeaderText="Nombre" DataField="Nombre" />

View File

@@ -90,20 +90,19 @@ Partial Class Contabilidad2_RepLibroDiario
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
''CABECERA
'If e.Row.DBCampo("TipoRenglon").ToString.ToEntero = 1 Then
' e.Row.Font.Bold = True
' e.Row.Cells(4).Text = ""
' e.Row.Cells(5).Text = ""
' e.Row.Cells(6).Text = ""
' e.Row.Cells(7).Text = ""
' e.Row.Cells(8).Text = ""
' e.Row.CssClass = "SubTotales" '
'End If
'CABECERA
If e.Row.DBCampo("TipoRenglon").ToString.ToEntero = 1 Then
e.Row.Font.Bold = True
e.Row.Cells(4).Text = ""
e.Row.Cells(5).Text = ""
e.Row.Cells(6).Text = ""
e.Row.Cells(7).Text = ""
e.Row.Cells(8).Text = ""
e.Row.CssClass = "SubTotales" '
End If
'DETALLE
If e.Row.DBCampo("Codigo") <> "" Then
If e.Row.DBCampo("TipoRenglon").ToString.ToEntero = 2 Then
e.Row.Cells(0).Text = ""
e.Row.Cells(1).Text = ""
e.Row.Cells(2).Text = ""
@@ -111,7 +110,7 @@ Partial Class Contabilidad2_RepLibroDiario
End If
'SUBTOTAL
If e.Row.DBCampo("Codigo") = "" Then
If e.Row.DBCampo("TipoRenglon").ToString.ToEntero = 3 Then
e.Row.Font.Bold = True
e.Row.Cells(0).Text = ""
e.Row.Cells(1).Text = ""
@@ -141,4 +140,39 @@ Partial Class Contabilidad2_RepLibroDiario
End If
End Sub
#Region " IMPRIMIR "
Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click
'FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
'FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate)
'DtDatos = DtDatos
ImprimirReporte()
End Sub
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
'FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
'FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate)
'DtDatos = DtDatos
ImprimirReporte("EXCEL")
End Sub
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
Dim lista = New List(Of CrystalParametro)
lista.Add(New CrystalParametro("Empresa", UsuarioActual.Empresa.Empresa))
lista.Add(New CrystalParametro("FechaInicio", FechaInicio.ToString("dd/MM/yyyy")))
lista.Add(New CrystalParametro("FechaFin", FechaFin.ToString("dd/MM/yyyy")))
lista.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual.Nombre))
If Imagen.Exists Then
lista.Add(New CrystalParametro("LogoPath", logouri))
Else
lista.Add(New CrystalParametro("LogoPath", ""))
End If
ImprimirbytesPDF(ImprimirPDFCrystal(Server.MapPath("~/Empresas/Grales/Formatos/LibroDiario.rpt"), DtDatos, lista, "LibroDiario", Formato), "LibroDiario", Formato)
End Sub
#End Region
End Class