-- complementos de pago.
This commit is contained in:
@@ -69,37 +69,27 @@
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Label ID="LblEncabezado" runat="server" Text=" Registro de Póliza"></asp:Label>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" runat="server" Visible="true" data-target="#DivCargaExcel"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Cargar Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<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>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<li>
|
||||
<asp:HyperLink ID="HplImprimirPDF" runat="server" Target="_blank" Visible="false" ><i class="fa fa-file-pdf-o" style="color:#686868;"></i> Imprimir Poliza</asp:HyperLink>
|
||||
</li>
|
||||
|
||||
<%-- <li>
|
||||
<asp:LinkButton ID="LnkImprimePDFResumen" runat="server" Visible="true" OnClick="LnkImprimePDFResumen_Click" Style="color: #686868;"><i class="fa fa-file-pdf-o" style="color:#686868;"></i> Imprimir PDF Resumen</asp:LinkButton>
|
||||
</li>--%>
|
||||
<%-- <li>
|
||||
<asp:LinkButton ID="LnkImprimeExcelResumen" runat="server" Visible="false" OnClick="LnkImprimeExcelResumen_Click" Style="color: #686868;"><i class="fa fa-file-excel-o" style="color:#686868;"></i> Imprimir Excel Resumen</asp:LinkButton>
|
||||
</li>--%>
|
||||
|
||||
|
||||
</li>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
|
||||
<asp:LinkButton ID="LnkAddConcepto" runat="server" OnClick="LnkAddConcepto_Click" ><i class="fa fa-plus" ></i> Agregar Concepto</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkCrearAPartirDe" runat="server" Visible="false" OnClick="LnkCrearAPartirDe_Click" Style="color: #686868;"><i class="fa fa-plus" style="color:#686868;" ></i>Crear a partir de</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkComplementoPago" runat="server" Visible="false" Style="color: #686868;"><i class="fa fa-money" style="color:#686868;"></i> Complemento de Pago</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" runat="server" Visible="true" data-target="#DivCargaExcel"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Cargar Excel</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
@@ -1008,6 +998,52 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="ModalComplementoPagos" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel ID="UpComplementoPagos" class="modal-dialog rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Complemento Pagos</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div runat="server" id="DVGenerarComplementoModal" visible=" false " style="width: 100%; margin-right: -10px!important; text-align: right">
|
||||
<asp:LinkButton runat="server" ID="LnkEmitirComplemento" CssClass="btn btn-primary" OnClick="LnkEmitirComplemento_Click"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="¿Generar Complemento?" data-btn-ok-label="si">Generar Complemento</asp:LinkButton>
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvComplementoPagos" runat="server"
|
||||
DataKeyNames="CveComplementoPago,FolioFiscal,SerieFolioPago"
|
||||
AutoGenerateColumns="False" EmptyDataText="Sin resultados" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall ScrollAD" GridLines="None" data-sort="true">
|
||||
<Columns>
|
||||
|
||||
<asp:BoundField HeaderText="SerieFolio" DataField="SerieFolioPago" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="FechaComplemento" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" />
|
||||
<asp:BoundField HeaderText="Importe" DataField="Importe" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="15%" />
|
||||
<asp:BoundField HeaderText="XML" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="PDF" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Estatus" Visible="false" DataField="StrEstatus" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="15%" />
|
||||
|
||||
|
||||
<%-- <asp:TemplateField HeaderText="EstatusSAT" Visible="true" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEstatusSAT" OnClick="LnkEstatusSAT_Click" runat="server" AlternateText="Editar" CausesValidation="False"
|
||||
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-question'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="CancelarComplementoPagos" type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="/Metronic/assets/global/plugins/dropzone/dropzone.js"></script>
|
||||
|
||||
@@ -6,7 +6,6 @@ Imports GemBox.Spreadsheet
|
||||
Partial Class ContabilidadC_RegPrePolizaS
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
#Region "Propiedades"
|
||||
Public Property ArregloMovs As ArrayList
|
||||
Get
|
||||
@@ -504,7 +503,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
GvPrePoliza.Columns(7).Visible = True
|
||||
End If
|
||||
|
||||
If DtMovimientos.FiltraParametros("CveConceptoContable IN (2,17,292,308)").Rows.Count > 0 Then
|
||||
If DtMovimientos.FiltraParametros("CveConceptoContable IN (2,292)").Rows.Count > 0 AndAlso DtMovimientos.FiltraParametros("CveConceptoContable IN (30)").Rows.Count = 0 Then
|
||||
LnkComplementoPago.Visible = True
|
||||
End If
|
||||
|
||||
@@ -2073,6 +2072,36 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
#Region "COMPLEMENTO DE PAGO"
|
||||
|
||||
Private Sub LnkComplementoPago_Click(sender As Object, e As EventArgs) Handles LnkComplementoPago.Click
|
||||
CargaComplementosPago()
|
||||
RegistraScript("$('#ModalComplementoPagos').modal('show');")
|
||||
End Sub
|
||||
|
||||
Private Sub CargaComplementosPago()
|
||||
|
||||
Dim ObjBancos As New ClsBancos
|
||||
DVGenerarComplementoModal.Visible = False
|
||||
|
||||
If ObjBancos.GetComplementoPagosRep(-1, MinFecha, MaxFecha, -1, -1, 1, UsuarioActual.CveEmpresa, 2, CvePrePoliza:=CvePrePoliza) Then
|
||||
Dim dtt As DataTable = Nothing
|
||||
dtt = ObjBancos.DtResultados
|
||||
If dtt.Rows.Count > 0 Then
|
||||
UpComplementoPagos.Visible = True
|
||||
'GvComplementoPagos.Columns(7).Visible = True
|
||||
' si tiene el permiso para eliminar IE o editar IE
|
||||
'If UsuarioActual.TienePermisoProceso(85) OrElse UsuarioActual.TienePermisoProceso(99) Then GvComplementoPagos.Columns(8).Visible = True
|
||||
Else
|
||||
DVGenerarComplementoModal.Visible = True
|
||||
End If
|
||||
GvComplementoPagos.DataSource = ObjBancos.DtResultados.FiltraParametros("", DistinctColumns:={"CveComplementoPago", "FolioFiscal", "SerieFolioPago", "FechaComplemento", "Importe", "CveIE"})
|
||||
|
||||
End If
|
||||
ObjBancos.Dispose()
|
||||
GvComplementoPagos.DataBind()
|
||||
UpComplementoPagos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub GeneraTimbre(CvePrePoliza As Integer)
|
||||
Dim Str As New StringBuilder
|
||||
Dim Banco As New ClsBancos
|
||||
@@ -2094,6 +2123,18 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Alert(Str.ToString, TipoMensaje.MsgInformacion, "self.parent.tb_remove();self.parent.location.reload();")
|
||||
End Sub
|
||||
|
||||
Protected Sub GvComplementoPagos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvComplementoPagos.RowDataBound
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
'If e.Row.DataKey("Tipo") = "Ing" Then
|
||||
e.Row.Cells(3).Text = String.Format("<a class="" texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank""><i class="" fa fa-file-code-o""></i></a>", Encripta(String.Format("OP=CompP&EXT=xml&SerieFolio={0}&CVECOMPLEMENTOPAGO={1}&CVEIE={2}", e.Row.DBCampo("SerieFolioPago"), e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("CveIE"))))
|
||||
e.Row.Cells(4).Text = String.Format("<a class="" texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank""><i class="" fa fa-ad-pdf""></i></a>", Encripta(String.Format("OP=CompP&EXT=pdf&SerieFolio={0}&CVECOMPLEMENTOPAGO={1}&CVEIE={2}", e.Row.DBCampo("SerieFolioPago"), e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("CveIE"))))
|
||||
|
||||
'End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub MandaCorreo(NombreArchivo As String, Correo As String, Optional ConAlerta As Boolean = True)
|
||||
Try
|
||||
Dim Msg As String = ""
|
||||
@@ -2127,13 +2168,9 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkComplementoPago_Click(sender As Object, e As EventArgs)
|
||||
GeneraTimbre(CvePrePoliza)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
#Region "E X C E L"
|
||||
|
||||
|
||||
@@ -2709,5 +2746,9 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
End If
|
||||
UpModalConcepto.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkEmitirComplemento_Click(sender As Object, e As EventArgs)
|
||||
GeneraTimbre(CvePrePoliza)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user