diff --git a/Contabilidad/RegPrePolizaS.aspx b/Contabilidad/RegPrePolizaS.aspx index 4856937c2..b460ad4ee 100644 --- a/Contabilidad/RegPrePolizaS.aspx +++ b/Contabilidad/RegPrePolizaS.aspx @@ -69,37 +69,27 @@ - - -
  • - Cargar Excel -
  • -
  • - Crear Complemento de Pago -
  • +
  • Imprimir Poliza -
  • - - <%--
  • - Imprimir PDF Resumen -
  • --%> - <%--
  • - Imprimir Excel Resumen -
  • --%> - - +
  • - Agregar Concepto
  • Crear a partir de
  • +
  • + Complemento de Pago +
  • +
  • + Cargar Excel +
  • -
    + +
    @@ -1008,6 +998,52 @@ + + diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index bbf936287..28a9814bb 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -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("", 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("", 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