Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -234,7 +234,7 @@ Partial Class Contabilidad_FiltraPolizas
|
||||
Dim ObjCompra As New ClsCompras
|
||||
Dim ObjIE As New ClsBancos()
|
||||
Dim pathPoliza As String = ""
|
||||
Dim TieneComprobante As Boolean
|
||||
Dim TieneComprobante As String = ""
|
||||
Tick = DateTime.Now.Ticks.ToString
|
||||
Dim ObjContabilidad As New ClsContabilidad
|
||||
Dim CvePrePoliza As Integer
|
||||
@@ -252,7 +252,7 @@ Partial Class Contabilidad_FiltraPolizas
|
||||
ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePoliza)
|
||||
TieneComprobante = VerificarComprobante(ObjContabilidad.DtResultados)
|
||||
|
||||
If TieneComprobante And SinComprobante Then
|
||||
If TieneComprobante = "" And Not SinComprobante Then
|
||||
|
||||
Path = ImprimirPolizaPDF(CvePrePoliza)
|
||||
pathPoliza = Path
|
||||
@@ -331,8 +331,8 @@ Partial Class Contabilidad_FiltraPolizas
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
If Not TieneComprobante Then
|
||||
PolizasSinComprobante += String.Format("<a href='/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}'>{1} {2}</a> <br/>", TempPolizas.DataKey("CvePrePoliza").ToString, TempPolizas.DataKey("TipoPol").ToString, TempPolizas.DataKey("Folio").ToString)
|
||||
If TieneComprobante <> "" Then
|
||||
PolizasSinComprobante += String.Format("<a href='/Bancos/IE.aspx?CveIE={0}'>{1} {2}</a> <br/>", TieneComprobante, TempPolizas.DataKey("TipoPol").ToString, TempPolizas.DataKey("Folio").ToString)
|
||||
SinComprobante = True
|
||||
End If
|
||||
|
||||
@@ -381,7 +381,7 @@ Partial Class Contabilidad_FiltraPolizas
|
||||
If ObjConta.GetPrePolizasDetalle(CvePrePoliza) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
Dim dtVC As DataTable
|
||||
Dim dr As DataRow
|
||||
dtVC = ObjConta.DtResultados
|
||||
dtVC = ObjConta.DtResultados.FiltraParametros("Contabilizable = 1", "Orden")
|
||||
dr = dtVC.Rows(0)
|
||||
Dim ruta As String = ""
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
@@ -493,12 +493,12 @@ Partial Class Contabilidad_FiltraPolizas
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function VerificarComprobante(ByVal PrepolizaDetalle As DataTable) As Boolean
|
||||
Private Function VerificarComprobante(ByVal PrepolizaDetalle As DataTable) As String
|
||||
Dim filtro() As String = {"CveIE", "CveConceptoContable"}
|
||||
Dim Path As String
|
||||
Dim dt As DataTable = PrepolizaDetalle.FiltraParametros("", "", filtro)
|
||||
Dim ObjIE As New ClsBancos()
|
||||
Dim TieneComprobante As Boolean = False
|
||||
Dim TieneComprobante As String = ""
|
||||
|
||||
For Each Row As DataRow In dt.FiltraParametros("CveConceptoContable = 30").Rows
|
||||
|
||||
@@ -506,14 +506,14 @@ Partial Class Contabilidad_FiltraPolizas
|
||||
If ObjIE.DtResultados.Rows.Count > 0 Then
|
||||
Path = String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ObjIE.Comprobante.ToString)
|
||||
If File.Exists(Path) Then
|
||||
TieneComprobante = True
|
||||
TieneComprobante = ""
|
||||
Exit For
|
||||
Else
|
||||
TieneComprobante = False
|
||||
TieneComprobante = Row("CveIE").ToString
|
||||
Exit For
|
||||
End If
|
||||
Else
|
||||
TieneComprobante = False
|
||||
TieneComprobante = Row("CveIE").ToString
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -80,6 +80,9 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkComprobante" runat="server" Visible="false" data-toggle="modal" data-target="#ModalUpload" Style="color: #686868;"><i class="fa fa-upload" style="color:#686868;"></i> Cargar Comprobante</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkImprimirPoliza" runat="server" Visible="true" OnClick="LnkImprimirPoliza_Click" Style="color: #686868;"><i class="fa fa-print" style="color:#686868;"></i> Imprimir Poliza</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -250,14 +250,16 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
GvConcepto.Columns(4).Visible = False
|
||||
GvMov.Columns(5).Visible = False
|
||||
End If
|
||||
LnkExcel.Visible = False
|
||||
LnkImprimirPoliza.Visible = True
|
||||
|
||||
If IfNull(Request("Conta"), "").ToString = "1" Then
|
||||
Contabilizar()
|
||||
End If
|
||||
Exit Sub
|
||||
LnkExcel.Visible = False
|
||||
Else
|
||||
LnkExcel.Visible = True
|
||||
LnkImprimirPoliza.Visible = False
|
||||
CreaDT()
|
||||
BtnEliminar.Visible = False
|
||||
|
||||
@@ -1840,21 +1842,21 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
Next
|
||||
|
||||
|
||||
dt = DtMovimientos.FiltraParametros("", "", filtroComplemento)
|
||||
For Each Row As DataRow In dt.Rows
|
||||
|
||||
For Each Row As DataRow In dt.FiltraParametros("CveConceptoContable = 30").Rows
|
||||
If ObjCompra.GetCompraComplementoPago(-1, UsuarioActual.CveEmpresa, Row("CveIE").ToString.ToEntero) Then
|
||||
If ObjCompra.DtResultados IsNot Nothing AndAlso ObjCompra.DtResultados.Rows.Count > 0 Then
|
||||
Dim dr As DataRow = ObjCompra.DtResultados.Rows(0)
|
||||
Dim RFC As String = dr("RFCde").ToString
|
||||
Dim CveFactura As String = dr("CveFactura").ToString
|
||||
Console.WriteLine(RFC & CveFactura)
|
||||
If CveFactura <> "" Then
|
||||
Path = String.Format("{0}Compras\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, RFC, CveFactura)
|
||||
Console.WriteLine(Path)
|
||||
If File.Exists(Path) Then
|
||||
Pathpdf.Add(Path)
|
||||
For Each RowComple As DataRow In ObjCompra.DtResultados.FiltraParametros("", "", {"RFCde", "CveFactura"}).Rows
|
||||
Dim RFC As String = RowComple.Item("RFCde").ToString
|
||||
Dim CveFactura As String = RowComple.Item("CveFactura").ToString
|
||||
If CveFactura <> "" Then
|
||||
Path = String.Format("{0}Compras\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, RFC, CveFactura)
|
||||
If File.Exists(Path) Then
|
||||
Pathpdf.Add(Path)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
@@ -1889,7 +1891,7 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
If ObjConta.GetPrePolizasDetalle(CvePrePoliza) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
Dim dtVC As DataTable
|
||||
Dim dr As DataRow
|
||||
dtVC = ObjConta.DtResultados
|
||||
dtVC = ObjConta.DtResultados.FiltraParametros("Contabilizable = 1", "Orden")
|
||||
dr = dtVC.Rows(0)
|
||||
Dim ruta As String = ""
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
@@ -2343,20 +2345,20 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
For Each Row As DataRow In dt.FiltraParametros("CveConceptoContable = 30").Rows
|
||||
|
||||
If ObjIE.GetBancosIE(Row("CveIE").ToString.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
If ObjIE.DtResultados.Rows.Count > 0 Then
|
||||
Path = String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ObjIE.Comprobante.ToString)
|
||||
If File.Exists(Path) Then
|
||||
TieneComprobante = True
|
||||
Exit For
|
||||
Else
|
||||
TieneComprobante = False
|
||||
Exit For
|
||||
End If
|
||||
If ObjIE.DtResultados.Rows.Count > 0 Then
|
||||
Path = String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ObjIE.Comprobante.ToString)
|
||||
If File.Exists(Path) Then
|
||||
TieneComprobante = True
|
||||
Exit For
|
||||
Else
|
||||
TieneComprobante = False
|
||||
Exit For
|
||||
End If
|
||||
Else
|
||||
TieneComprobante = False
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
ObjIE.Dispose()
|
||||
@@ -2364,5 +2366,53 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
|
||||
End Function
|
||||
|
||||
Protected Sub LnkImprimirPoliza_Click(sender As Object, e As EventArgs)
|
||||
ImprimirPolizaPDFRunTime(IdPoliza)
|
||||
End Sub
|
||||
Private Function ImprimirPolizaPDFRunTime(IdPoliza As Integer) As String
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
'Dim ObjPoliza As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/Polizas.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
Dim params As New List(Of ReportParameter)
|
||||
Dim Bytes As Byte() = Nothing
|
||||
|
||||
|
||||
'If ObjPoliza.GetPoliza(IdPoliza, -1, -1, -1, -1) AndAlso ObjPoliza.DtResultados.Rows.Count > 0 Then
|
||||
If ObjConta.GetPrePolizasDetalle(CvePrePoliza) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
Dim dtVC As DataTable
|
||||
Dim dr As DataRow
|
||||
dtVC = ObjConta.DtResultados.FiltraParametros("Contabilizable = 1", "Orden")
|
||||
dr = dtVC.Rows(0)
|
||||
Dim ruta As String = ""
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("TipoPoliza", dr("TipoPoliza").ToString))
|
||||
params.Add(New ReportParameter("Finicio", dr("Fecha").ToString.ToDate.ToShortDateString))
|
||||
params.Add(New ReportParameter("FFin", dr("Fecha").ToString.ToDate.ToShortDateString))
|
||||
params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToShortDateString))
|
||||
'params.Add(New ReportParameter("Nombre", dr("Cuenta").ToString))
|
||||
'params.Add(New ReportParameter("Cuenta", dr("Codigo").ToString))
|
||||
params.Add(New ReportParameter("Numero", dr("FolioPoliza").ToString))
|
||||
params.Add(New ReportParameter("Moneda", ""))
|
||||
params.Add(New ReportParameter("CodigoPostal", ""))
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
params.Add(New ReportParameter("UsuarioRegistro", GlobalDTUsuarios(dr("CveUsuario").ToString.ToEntero).FiltroPrimeroValor("Nombre")))
|
||||
End If
|
||||
If UsuarioActual.CveEmpresa = 140 Then
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
End If
|
||||
If Archivo.Exists Then
|
||||
ruta = UsuarioActual.Empresa.Ruta & "Formatos/Polizas.rdlc"
|
||||
Else
|
||||
ruta = "Empresas/Grales/Formatos/Polizas.rdlc"
|
||||
End If
|
||||
ImprimirbytesPDF(StreamPDF(ruta, dtVC, params, "ppoliza"), String.Format("{0}-{1}", TipoPoliza, dr("FolioPoliza").ToString), "PDF", True)
|
||||
|
||||
End If
|
||||
Return String.Format("{0}\{1}\{2}.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick, IdPoliza.ToString)
|
||||
ObjConta.Dispose()
|
||||
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
@@ -75,14 +75,14 @@
|
||||
<asp:LinkButton ID="LnkComplementoPago" runat="server" Visible="false" OnClick="LnkComplementoPago_Click" Style="color: #686868;"><i class="fa fa-money" style="color:#686868;"></i> Crear Complemento de Pago</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkImprimirPDF" runat="server" OnClick="LnkImprimirPDF_Click" Style="color: #686868;"><i class="fa fa-file-pdf-o" style="color:#686868;"></i> Imprimir Poliza</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkImprimirPDF" runat="server" Visible="true" OnClick="LnkImprimirPDF_Click" Style="color: #686868;"><i class="fa fa-file-pdf-o" style="color:#686868;"></i> Imprimir Poliza</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkAddConcepto" runat="server" OnClick="LnkAddConcepto_Click" Visible="false"><i class="fa fa-plus" ></i> Agregar Concepto</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkAddConcepto" runat="server" OnClick="LnkAddConcepto_Click" Visible="true"><i class="fa fa-plus" ></i> Agregar Concepto</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -342,7 +342,7 @@
|
||||
</div>
|
||||
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom ">
|
||||
<asp:GridView ID="GvMov" runat="server" AutoGenerateColumns="False" ShowHeader="False"
|
||||
DataKeyNames="IdMov,IDCuenta,Cargo,Abono,TipoMovto,CveConcepto,CveProveedor,CvePersonal, CveCompra,CveClasificacion,CveCliente,CveVenta, CveCuenta" Width="100%" CssClass=" GvMov GvSize table table-striped table-advance table-hover mysmallbtn" GridLines="None">
|
||||
DataKeyNames="IdMov,IDCuenta,Cargo,Abono,TipoMovto,CveConcepto,CveProveedor,CvePersonal, CveCompra,CveClasificacion,CveCliente,CveVenta" Width="100%" CssClass=" GvMov GvSize table table-striped table-advance table-hover mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Cuenta</HeaderTemplate>
|
||||
@@ -558,10 +558,11 @@
|
||||
<ItemStyle HorizontalAlign="Right" Width="20px" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField Visible="false" >
|
||||
<asp:TemplateField >
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="chkModificado" Checked="false"/>
|
||||
<asp:CheckBox runat="server" ID="chkModificado" Checked="false" Visible="false"/>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" Width="0px" />
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
|
||||
@@ -232,10 +232,13 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
DivTG.Visible = False
|
||||
GvMov.Columns(5).Visible = False
|
||||
End If
|
||||
|
||||
Exit Sub
|
||||
Else
|
||||
CreaDT()
|
||||
BtnEliminar.Visible = False
|
||||
BtnEliminar.Visible = False
|
||||
LnkExcel.Visible = True
|
||||
LnkImprimirPDF.Visible = False
|
||||
End If
|
||||
|
||||
|
||||
@@ -466,8 +469,9 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
' row.FCTextBox("TxtCargo").Enabled = False
|
||||
' row.FCTextBox("TxtAbono").Enabled = False
|
||||
'Next
|
||||
End If
|
||||
|
||||
End If
|
||||
LnkExcel.Visible = False
|
||||
LnkImprimirPDF.Visible = True
|
||||
Else
|
||||
Alert("El documento solicitado no existe, favor de revisar su búsqueda.", TipoMensaje.MsgAdvertencia)
|
||||
BtnEliminar.Visible = False
|
||||
@@ -1362,6 +1366,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
GvPrePoliza.DataBind()
|
||||
UpPrePoliza.Update()
|
||||
End If
|
||||
GvPrePoliza.Columns(11).Visible = True
|
||||
|
||||
GvPrePoliza.Rows(IndiceGrid).FCCheckBox("chkModificado").Checked = True
|
||||
End If
|
||||
End If
|
||||
@@ -2028,7 +2034,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
If ObjConta.GetPrePolizasDetalle(CvePrePoliza) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
Dim dtVC As DataTable
|
||||
Dim dr As DataRow
|
||||
dtVC = ObjConta.DtResultados
|
||||
dtVC = ObjConta.DtResultados.FiltraParametros("Contabilizable = 1", "Orden")
|
||||
dr = dtVC.Rows(0)
|
||||
Dim ruta As String = ""
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
|
||||
Reference in New Issue
Block a user