Cambios impresion
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomLeft" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
@@ -78,10 +78,14 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkImprimirPDF" runat="server" Visible="false" OnClick="LnkImprimirPDF_Click" Style="color: #686868;"><i class="fa fa-ad-pdf" style="color:#686868;"></i> Imprmir PDF's</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkComprobante" runat="server" Visible="false" data-toggle="modal" data-target="#ModalUpload" Style="color: #686868;"><i class="fa fa-ad-pdf" style="color:#686868;"></i> Cargar Comprobante</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkImprimirPDF" />
|
||||
<asp:PostBackTrigger ControlID="LnkComprobante" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -791,7 +795,50 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="ModalUpload" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Subir Archivo</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UpCargarArchivo" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="text-align: center;">
|
||||
<label style="color: red;">Nota: Si ya tiene un comprobante este sera reemplazado</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:TextBox ID="TxtCargarArchivo" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<%--<div>
|
||||
|
||||
</div>--%>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnGuardarArchivo" runat="server" ClientIDMode="Static" Text="Guardar" CssClass="btn btn-primary" />
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/Metronic/assets/global/plugins/dropzone/dropzone.js"></script>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
@@ -180,6 +180,15 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property CveIE As Integer
|
||||
Get
|
||||
Return CType(ViewState("CveIE"), Integer)
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveIE") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -525,7 +534,12 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
If CveConceptoContable.Contiene(68) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", e.Row.DBCampo("CveMovimientoAlmacen"))
|
||||
If CveConceptoContable.Contiene(30, 204) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE"))
|
||||
|
||||
If CveConceptoContable.Contiene(30) Then LnkImprimirPDF.Visible = True
|
||||
If CveConceptoContable.Contiene(30) AndAlso UsuarioActual.CveRol = 1 Then
|
||||
LnkImprimirPDF.Visible = True
|
||||
LnkComprobante.Visible = True
|
||||
CveIE = e.Row.DBCampo("CveIE").ToString.ToEntero
|
||||
|
||||
End If
|
||||
|
||||
'e.Row.FCHyperLink("HlReferencia").NavigateUrl = CveConceptoContable
|
||||
|
||||
@@ -1770,7 +1784,21 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
If ObjIE.DtResultados.Rows.Count > 0 Then
|
||||
Path = String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ObjIE.Comprobante.ToString)
|
||||
If File.Exists(Path) Then
|
||||
Pathpdf.Add(Path)
|
||||
Dim formato As String = System.IO.Path.GetExtension(Path)
|
||||
If formato.ToLower.Contiene(".jpg", ".png", ".jpeg") Then
|
||||
Dim ComprobantePDF As String = String.Format("{0}\{1}\comprobante.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick)
|
||||
Using crea_archivo = New iTextSharp.text.Document
|
||||
PdfWriter.GetInstance(crea_archivo, New FileStream(ComprobantePDF, FileMode.Create))
|
||||
crea_archivo.Open()
|
||||
Dim image As iTextSharp.text.Image = iTextSharp.text.Image.GetInstance(Path)
|
||||
crea_archivo.Add(image)
|
||||
End Using
|
||||
Pathpdf.Add(ComprobantePDF)
|
||||
|
||||
Else
|
||||
Pathpdf.Add(Path)
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -1784,6 +1812,7 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
Dim CveFactura As String = dr("CveFactura").ToString
|
||||
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
|
||||
@@ -1892,7 +1921,7 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
|
||||
Try
|
||||
pdfCount = pdfFiles.Length
|
||||
If pdfCount > 1 Then
|
||||
If pdfCount > 0 Then
|
||||
fileName = pdfFiles(f)
|
||||
reader = New iTextSharp.text.pdf.PdfReader(fileName)
|
||||
pageCount = reader.NumberOfPages
|
||||
@@ -2243,5 +2272,41 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
Return dataTable
|
||||
|
||||
End Function
|
||||
|
||||
Protected Sub BtnGuardarArchivo_Click(sender As Object, e As EventArgs) Handles BtnGuardarArchivo.Click
|
||||
Dim ObjIE As New ClsBancos
|
||||
Dim Comprobante As String = ""
|
||||
|
||||
Dim Filesgral As List(Of Archivo) = TxtCargarArchivo.getfiles().Archivos
|
||||
If Filesgral.Count > 0 Then
|
||||
Dim fileItem As Archivo = Filesgral(0)
|
||||
Dim Path As String = HttpContext.Current.Request.ApplicationPath
|
||||
Comprobante = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "")
|
||||
|
||||
Path = Extensiones.DirectorioBaseEmpresas
|
||||
Path += String.Format("Empresas/{0}/IE", UsuarioActual.CveEmpresa)
|
||||
|
||||
|
||||
|
||||
If Not Directory.Exists(Path) Then
|
||||
Directory.CreateDirectory(Path)
|
||||
End If
|
||||
Path += $"/{CveIE}.{Comprobante}"
|
||||
If File.Exists(Path) Then
|
||||
File.Delete(Path)
|
||||
End If
|
||||
My.Computer.FileSystem.MoveFile(fileItem.FileUrl, Path)
|
||||
End If
|
||||
TxtCargarArchivo.Text = ""
|
||||
RegistraScript("$('#ModalUpload').modal('hide')", "hidemodal1")
|
||||
|
||||
If ObjIE.UpdateComprobanteIE(Comprobante.Replace("."c, ""), CveIE) Then
|
||||
Alert("El Comprobante se guardo exitosamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjIE.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user