diff --git a/App_Code/ClsContPAQi.vb b/App_Code/ClsContPAQi.vb
index 10b6cbae5..751a1df63 100644
--- a/App_Code/ClsContPAQi.vb
+++ b/App_Code/ClsContPAQi.vb
@@ -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)
diff --git a/Bancos/PopUpBuscarIE.aspx b/Bancos/PopUpBuscarIE.aspx
index 228691300..def89512c 100644
--- a/Bancos/PopUpBuscarIE.aspx
+++ b/Bancos/PopUpBuscarIE.aspx
@@ -51,7 +51,7 @@
-
+
diff --git a/Contabilidad/FiltraPolizas.aspx b/Contabilidad/FiltraPolizas.aspx
index f14fbb7d1..8e3013f59 100644
--- a/Contabilidad/FiltraPolizas.aspx
+++ b/Contabilidad/FiltraPolizas.aspx
@@ -171,6 +171,14 @@
+
+
+
+
+
+
+
+
diff --git a/Contabilidad/RegPrePoliza.aspx b/Contabilidad/RegPrePoliza.aspx
index 47c26e19f..351e9ce1e 100644
--- a/Contabilidad/RegPrePoliza.aspx
+++ b/Contabilidad/RegPrePoliza.aspx
@@ -70,18 +70,22 @@
- Cargar Excel
+ Cargar Excel
Crear Complemento de Pago
- Imprmir PDF's
+ Paquete Egresos
+
+
+ Cargar Comprobante
+
@@ -791,7 +795,50 @@
+
+
+
+
+
+
+
Subir Archivo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%--
+
+
--%>
+
+
+
+
+
+
+
diff --git a/Contabilidad/RegPrePoliza.aspx.vb b/Contabilidad/RegPrePoliza.aspx.vb
index 740cf4ada..63b45e73e 100644
--- a/Contabilidad/RegPrePoliza.aspx.vb
+++ b/Contabilidad/RegPrePoliza.aspx.vb
@@ -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
diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb
index 982827aa5..a24cf4999 100644
--- a/Ventas/ClientesAbonar.aspx.vb
+++ b/Ventas/ClientesAbonar.aspx.vb
@@ -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