Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -7286,15 +7286,16 @@ Public Class ClsContPAQi
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
StrSQL.Clear()
|
||||
StrSQL.Append(" SELECT P.Id, P.Fecha, T.Nombre AS TipoPol, P.Concepto, P.Cargos, P.Abonos, P.Folio ")
|
||||
StrSQL.Append(" SELECT P.Id, P.Fecha, T.Nombre AS TipoPol, P.Concepto, P.Cargos, P.Abonos, P.Folio, PP.CvePrepoliza ")
|
||||
StrSQL.Append(" FROM [dbo].[Polizas] P ")
|
||||
StrSQL.Append(" LEFT JOIN TiposPolizas T ON T.Id = P.TipoPol ")
|
||||
StrSQL.Append(" LEFT JOIN MovimientosPoliza M ON M.IdPoliza = P.Id ")
|
||||
StrSQL.Append(" LEFT JOIN [SERVIDOR].[Ventas].dbo.Conta_PrePolizas PP on P.Id = PP.IdPoliza")
|
||||
StrSQL.Append(" WHERE P.Ejercicio = @Ejercicio ")
|
||||
StrSQL.Append(" AND P.Periodo = @Periodo ")
|
||||
StrSQL.Append(" AND (@TipoPoliza = -1 OR P.TipoPol = @TipoPoliza) ")
|
||||
StrSQL.Append(" AND (@SegmentoNegocio = -1 OR M.IdSegNeg = @SegmentoNegocio) ")
|
||||
StrSQL.Append(" GROUP BY P.Id, P.Fecha, T.Nombre, P.Concepto, P.Cargos, P.Abonos, P.Folio ")
|
||||
StrSQL.Append(" GROUP BY P.Id, P.Fecha, T.Nombre, P.Concepto, P.Cargos, P.Abonos, P.Folio, PP.CvePrepoliza ")
|
||||
StrSQL.Append(" ORDER BY P.Folio ")
|
||||
|
||||
SqlDataAdapter(StrSQL.ToString, CommandType.Text)
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -171,6 +171,14 @@
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="PrePoliza" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplPrepoliza" CssClass="Texto" Target="_blank" NavigateUrl='<%# Eval("CvePrePoliza", "/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}")%>' runat="server" ToolTip="Ir PrePoliza"><i class="fa fa-arrow-right" style="color:#686868;"></i></asp:HyperLink>
|
||||
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos"></HeaderStyle>
|
||||
</asp:GridView>
|
||||
|
||||
@@ -70,18 +70,22 @@
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" runat="server" Visible="true" data-target="#DivCargaExcel"><i class="fa fa-ad-excel" style="font-weight:bold;"></i> Cargar Excel</asp:LinkButton>
|
||||
<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>
|
||||
<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>
|
||||
<asp:LinkButton ID="LnkImprimirPDF" runat="server" Visible="false" OnClick="LnkImprimirPDF_Click" Style="color: #686868;"><i class="fa fa-file-pdf-o" style="color:#686868;"></i> Paquete Egresos</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-upload" 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
|
||||
@@ -1814,7 +1843,7 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
Alert("Error")
|
||||
Alert("Error al descargar el paquete", TipoMensaje.MsgError)
|
||||
End Try
|
||||
End Sub
|
||||
Private Function ImprimirPolizaPDF(IdPoliza As Integer) As String
|
||||
@@ -1828,11 +1857,8 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
|
||||
'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
|
||||
Try
|
||||
|
||||
|
||||
Dim dtVC As DataTable
|
||||
Dim dr As DataRow
|
||||
Dim dtVC As DataTable
|
||||
Dim dr As DataRow
|
||||
dtVC = ObjConta.DtResultados
|
||||
dr = dtVC.Rows(0)
|
||||
Dim ruta As String = ""
|
||||
@@ -1866,9 +1892,6 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
End If
|
||||
|
||||
Return String.Format("{0}\{1}\{2}.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick, IdPoliza.ToString)
|
||||
Catch ex As Exception
|
||||
Alert("ggg")
|
||||
End Try
|
||||
End If
|
||||
|
||||
|
||||
@@ -1892,7 +1915,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 +2266,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
|
||||
|
||||
|
||||
@@ -2693,12 +2693,18 @@ Partial Class Ventas_ClientesAbonar
|
||||
If CveConceptoDeduccion = 78 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.IdCuentaOtrosIngresos
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122) Then
|
||||
|
||||
ClienteMovto = False : Saldo = Saldo * -1
|
||||
ImpuestosMovto = True : IVA = IVA * -1
|
||||
RETIVA = RETIVA * -1
|
||||
|
||||
'RETIVA = RETIVA * -1
|
||||
|
||||
RETIVA = ((SubTotal * RETIVA / gr.DataKey("SubTotal").ToDecimal.RoundSQL) * -1).RoundSQL(2)
|
||||
|
||||
CveConceptoCliente = 1
|
||||
'falta cuenta incobrable
|
||||
IdCuentaContableNoDeducible = 3114
|
||||
|
||||
End If
|
||||
|
||||
Dim UsaComplementaria As Boolean = False
|
||||
|
||||
Reference in New Issue
Block a user