Merge branch 'master' of http://adsistemasof.sytes.net:8383/SIG
This commit is contained in:
@@ -2683,7 +2683,10 @@ Public Class ClsContabilidad
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function AddConta_PlantillasPolizasDetalles(CvePlantillaPoliza As Integer, CveConcepto As Integer, TipoMovto As Integer, IdCtaContable As Integer, Orden As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveSubProyecto As Integer, CveProveedor As Integer, Optional CvePersonal As Integer = -1) As Boolean
|
||||
Public Function AddConta_PlantillasPolizasDetalles(CvePlantillaPoliza As Integer, CveConcepto As Integer, TipoMovto As Integer,
|
||||
IdCtaContable As Integer, Orden As Integer, CveUsuario As Integer, CveEmpresa As Integer,
|
||||
CveSubProyecto As Integer, CveProveedor As Integer, Optional CvePersonal As Integer = -1,
|
||||
Optional PorcentajeImpuesto As Decimal = 0) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Conta_PlantillasPolizasDetalleAdd")
|
||||
@@ -2699,6 +2702,7 @@ Public Class ClsContabilidad
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||
.Add("@PorcentajeImpuesto", SqlDbType.SmallMoney).Value = PorcentajeImpuesto
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -2715,7 +2719,9 @@ Public Class ClsContabilidad
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function UpdateConta_PlantillasPolizasDetalle(CveConcepto As Integer, TipoMovto As Integer, IdCtaContable As Integer, Orden As Integer, CvePlantillaPolizaDetalle As Integer, CveSubProyecto As Integer, CveProveedor As Integer, Optional CvePersonal As Integer = -1) As Boolean
|
||||
Public Function UpdateConta_PlantillasPolizasDetalle(CveConcepto As Integer, TipoMovto As Integer, IdCtaContable As Integer, Orden As Integer,
|
||||
CvePlantillaPolizaDetalle As Integer, CveSubProyecto As Integer, CveProveedor As Integer,
|
||||
Optional CvePersonal As Integer = -1, Optional PorcentajeImpuesto As Decimal = 0) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Conta_PlantillasPolizasDetalleUpdate")
|
||||
@@ -2729,6 +2735,7 @@ Public Class ClsContabilidad
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||
.Add("@PorcentajeImpuesto", SqlDbType.SmallMoney).Value = PorcentajeImpuesto
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -4006,7 +4006,7 @@ Namespace Modelos
|
||||
'1 NORMAL, 2 CON PAGOS
|
||||
Dim ModalidadRefacturacion As Integer = UsuarioActual.Empresa.Funcionalidad(586).ToEntero()
|
||||
|
||||
If ModalidadRefacturacion <= 0 Then
|
||||
If EsRefacturacion AndAlso ModalidadRefacturacion <= 0 Then
|
||||
Retorno.Mensaje = "La factura no se puede refacturar debido a que la empresa no tiene asignada una modalidad de refacturación."
|
||||
Retorno.TipoMensaje = TipoMensaje.MsgAdvertencia
|
||||
|
||||
|
||||
281
Ashx/GenerarPDFFactura.ashx
Normal file
281
Ashx/GenerarPDFFactura.ashx
Normal file
@@ -0,0 +1,281 @@
|
||||
<%@ WebHandler Language="VB" Class="GenerarPDFFactura" %>
|
||||
|
||||
Imports System
|
||||
Imports System.Web
|
||||
Imports System.Data
|
||||
Imports Newtonsoft.Json
|
||||
Imports Newtonsoft.Json.Linq
|
||||
Imports Extensiones
|
||||
Imports System.IO
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Public Class GenerarPDFFactura : Implements IHttpHandler
|
||||
|
||||
Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
|
||||
Get
|
||||
Return False
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
|
||||
Dim retorno As String = "no se encontro la variable"
|
||||
|
||||
Try
|
||||
Dim datos As ParametroWS = Nothing
|
||||
If context.Request.Headers("Content-Type") IsNot Nothing AndAlso context.Request.Headers("Content-Type").Contains("json") AndAlso context.Request.InputStream IsNot Nothing Then
|
||||
context.Response.ContentType = "application/json"
|
||||
Using reader As New StreamReader(context.Request.InputStream)
|
||||
Dim json = reader.ReadToEnd()
|
||||
datos = JsonConvert.DeserializeObject(Of ParametroWS)(json)
|
||||
End Using
|
||||
End If
|
||||
|
||||
If datos IsNot Nothing Then
|
||||
Dim ListaDS = New List(Of ReportDataSource)
|
||||
Dim Parametros As New List(Of ReportParameter)
|
||||
|
||||
Dim Formato = context.Server.MapPath("/") + "Empresas/1/Report.rdlc"
|
||||
|
||||
Parametros.Add(New ReportParameter("Empresa", datos.Empresa.Empresa))
|
||||
Parametros.Add(New ReportParameter("RFC", datos.Empresa.RFC))
|
||||
Parametros.Add(New ReportParameter("DomicilioExpedicion", datos.Empresa.DomicilioFiscal))
|
||||
Parametros.Add(New ReportParameter("Serie", datos.Factura.Serie))
|
||||
Parametros.Add(New ReportParameter("Folio", datos.Factura.Folio))
|
||||
Parametros.Add(New ReportParameter("Fecha", datos.Factura.Fecha))
|
||||
Parametros.Add(New ReportParameter("ClienteNombre", datos.Cliente.NombreComercial))
|
||||
Parametros.Add(New ReportParameter("ClienteDireccion", datos.Cliente.Calle + " Colonia " + datos.Cliente.Colonia + " " + datos.Cliente.Ciudad + ", " + datos.Cliente.Estado))
|
||||
Parametros.Add(New ReportParameter("ClienteLugar", datos.Cliente.Ciudad))
|
||||
Parametros.Add(New ReportParameter("ClienteRFC", datos.Cliente.RFC))
|
||||
Parametros.Add(New ReportParameter("ImporteLetra", datos.Factura.Total.Texto2Letras()))
|
||||
Parametros.Add(New ReportParameter("FormaPago", datos.Factura.FormaPago))
|
||||
Parametros.Add(New ReportParameter("MetodoPago", datos.Factura.MetodoPago))
|
||||
Parametros.Add(New ReportParameter("SelloCFDI", ""))
|
||||
Parametros.Add(New ReportParameter("SelloSAT", ""))
|
||||
Parametros.Add(New ReportParameter("CadenaOriginal", ""))
|
||||
Parametros.Add(New ReportParameter("FolioFiscal", datos.Factura.UUID))
|
||||
Parametros.Add(New ReportParameter("SerieCertificadoSAT", ""))
|
||||
Parametros.Add(New ReportParameter("FechaCertificado", ""))
|
||||
Parametros.Add(New ReportParameter("CertificadoContribuyente", ""))
|
||||
Parametros.Add(New ReportParameter("UsoCFDI", datos.Factura.UsoCFDI))
|
||||
Parametros.Add(New ReportParameter("Vencimiento", Now.AddDays(30)))
|
||||
Parametros.Add(New ReportParameter("SubTotal", datos.Factura.SubTotal))
|
||||
Parametros.Add(New ReportParameter("IVA", datos.Factura.IVA))
|
||||
Parametros.Add(New ReportParameter("IEPS", datos.Factura.IEPS))
|
||||
Parametros.Add(New ReportParameter("Total", datos.Factura.Total))
|
||||
Parametros.Add(New ReportParameter("QR", ""))
|
||||
|
||||
Dim DtDatos As New DataTable
|
||||
DtDatos.Columns.Add(New DataColumn("Cantidad", GetType(Decimal)))
|
||||
DtDatos.Columns.Add(New DataColumn("UnidadMedida", GetType(String)))
|
||||
DtDatos.Columns.Add(New DataColumn("PS", GetType(String)))
|
||||
DtDatos.Columns.Add(New DataColumn("PU", GetType(Decimal)))
|
||||
DtDatos.Columns.Add(New DataColumn("IVA", GetType(Decimal)))
|
||||
DtDatos.Columns.Add(New DataColumn("IEPS", GetType(Decimal)))
|
||||
DtDatos.Columns.Add(New DataColumn("Total", GetType(Decimal)))
|
||||
|
||||
For Each PS In datos.Factura.ListaProductos
|
||||
Dim Row = DtDatos.NewRow()
|
||||
Row("Cantidad") = PS.Cantidad
|
||||
Row("UnidadMedida") = PS.UnidadMedida
|
||||
Row("PS") = PS.CodigoPS
|
||||
Row("PU") = PS.PU
|
||||
Row("IVA") = PS.IVA
|
||||
Row("IEPS") = PS.IEPS
|
||||
Row("Total") = (PS.Cantidad * PS.PU) + PS.IVA + PS.IEPS
|
||||
|
||||
DtDatos.Rows.Add(Row)
|
||||
Next
|
||||
ListaDS.Add(New ReportDataSource("DsProductos", DtDatos))
|
||||
|
||||
ImprimirbytesPDF(context, StreamPDF(context, Formato, ListaDS, Parametros), "test")
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
ex.GuardaLog(ex.ToString())
|
||||
context.Response.Write(retorno)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Public Function StreamPDF(ByVal context As HttpContext, RutaReporte As String, DataSource As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional MR As ReportViewer = Nothing) As Byte()
|
||||
'limpio ReportViwer
|
||||
Dim sw As New System.Diagnostics.Stopwatch()
|
||||
sw.Start()
|
||||
|
||||
If IsNothing(MR) Then MR = New ReportViewer
|
||||
Dim Bytes As Byte() = Nothing
|
||||
Try
|
||||
' MasterReporteador.LocalReport.DataSources.Clear()
|
||||
For Each RDS As ReportDataSource In DataSource
|
||||
MR.LocalReport.DataSources.Add(RDS)
|
||||
Next
|
||||
|
||||
MR.LocalReport.ReportPath = RutaReporte
|
||||
MR.ProcessingMode = ProcessingMode.Local
|
||||
MR.LocalReport.EnableExternalImages = True
|
||||
MR.LocalReport.SetParameters(Parametros)
|
||||
MR.LocalReport.Refresh()
|
||||
Dim Warnings As Warning() = Nothing
|
||||
Dim StreamIds As String() = Nothing
|
||||
Dim MimeType As String = Nothing
|
||||
Dim Encoding As String = Nothing
|
||||
Dim Extension As String = Nothing
|
||||
Bytes = MR.LocalReport.Render(Formato, Nothing, MimeType, Encoding, Extension, StreamIds, Warnings)
|
||||
Catch ex As Microsoft.Reporting.WebForms.ScriptManagerNotFoundException
|
||||
GuardaLog($"Error: { If(ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, ex.Message) } | Descripcion: {If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException.Message IsNot Nothing, ex.InnerException.InnerException.Message, If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, "Sin descripcion"))} - Ruta {RutaReporte}")
|
||||
'HAY QUE VALIDAR QUE LOS OBJETOS QUE SE USAN PARA GUARDAR LOG EXISTEN!!! IPP 14 AGOSTO 2017
|
||||
'GuardaLog($"Error: {ex.InnerException.Message} | Descripcion: {If(ex.InnerException.InnerException IsNot Nothing, ex.InnerException.InnerException.Message, "Sin descripcion")} - Ruta {RutaReporte}")
|
||||
Catch ex As Exception
|
||||
GuardaLog($"Error: { If(ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, ex.Message) } | Descripcion: {If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException.Message IsNot Nothing, ex.InnerException.InnerException.Message, If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, "Sin descripcion"))} - Ruta {RutaReporte}")
|
||||
'HAY QUE VALIDAR QUE LOS OBJETOS QUE SE USAN PARA GUARDAR LOG EXISTEN!!! IPP 14 AGOSTO 2017
|
||||
'GuardaLog($"Error {ex.InnerException.Message} | Descripcion: {If(ex.InnerException.InnerException IsNot Nothing, ex.InnerException.InnerException.Message, "Sin descripcion")} - Ruta {RutaReporte}")
|
||||
End Try
|
||||
|
||||
sw.Stop()
|
||||
If sw.Elapsed.TotalSeconds > 10 Then
|
||||
GuardaLog($"Reporte:{RutaReporte} | Tiempo Renderizado Milisegundos: {sw.ElapsedMilliseconds},Total Segundos: {sw.Elapsed.TotalSeconds} ")
|
||||
End If
|
||||
|
||||
Return Bytes
|
||||
End Function
|
||||
|
||||
Public Sub ImprimirbytesPDF(ByVal context As HttpContext, bytes As Byte(), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional Descarga As Boolean = False)
|
||||
'limpio ReportViwer
|
||||
Dim mimeType As String = Nothing
|
||||
Dim extension As String = Nothing
|
||||
|
||||
'If Descarga Then
|
||||
' Try
|
||||
' bytes = bytes
|
||||
' File.WriteAllBytes(String.Format("{0}PDF/whatever.gif", UsuarioActual.Empresa.Ruta), img)
|
||||
' Catch ex As Exception
|
||||
' If UsuarioActual.CveRol = 1 Then
|
||||
' Alert(ex.Message, TipoMensaje.MsgAdvertencia)
|
||||
' Else
|
||||
' Alert("Ocurrió un error al generar la descarga. Favor de contactar a soporte tecnico cod'IMPDFclspag'", TipoMensaje.MsgAdvertencia)
|
||||
' End If
|
||||
' End Try
|
||||
'End If
|
||||
|
||||
Try
|
||||
|
||||
bytes = bytes
|
||||
context.Response.Buffer = True
|
||||
context.Response.Clear()
|
||||
context.Response.ContentType = mimeType
|
||||
context.Response.AddHeader("content-disposition", String.Format("attachment; filename={0}.{1}", NombreArchivo, If(Formato = "PDF", "pdf", "xls")))
|
||||
context.Response.BinaryWrite(bytes) ' create the file
|
||||
context.Response.Flush() ' send it to the client to download
|
||||
context.Response.SuppressContent = True
|
||||
context.ApplicationInstance.CompleteRequest()
|
||||
context.Response.End()
|
||||
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
Public Class FacturaWS
|
||||
Public Property Id As Integer
|
||||
Public Property CveVenta As Integer
|
||||
Public Property CveCliente As Integer
|
||||
Public Property NombreCliente As String
|
||||
Public Property Fecha As DateTime
|
||||
Public Property CveSubCentroCosto As Integer
|
||||
Public Property CveTipoDocumento As Integer
|
||||
Public Property TipoDocumento As String
|
||||
Public Property Serie As String
|
||||
Public Property Folio As Integer
|
||||
Public Property CveVendedor As Integer
|
||||
Public Property CveUsuario As Integer
|
||||
Public Property CveEstatusVenta As Integer
|
||||
Public Property EstatusVenta As String
|
||||
Public Property UUID As String
|
||||
Public Property ListaProductos As List(Of ProductoWS)
|
||||
Public Property CveUsoCFDI As Integer
|
||||
Public Property UsoCFDI As String
|
||||
Public Property CveMetodoPago As Integer
|
||||
Public Property MetodoPago As String
|
||||
Public Property ClaveMetodoPagoSAT As String
|
||||
Public Property CveFormaPago As Integer
|
||||
Public Property FormaPago As String
|
||||
Public Property ClaveFormaPagoSAT As String
|
||||
Public Property Observaciones As String
|
||||
Public Property CveMoneda As Integer
|
||||
Public Property TipoCambio As Double
|
||||
Public Property FechaIng As DateTime
|
||||
Public Property CveEmpresa As Integer
|
||||
Public Property SubTotal As Double
|
||||
Public Property Descuentos As Double
|
||||
Public Property IVA As Double
|
||||
Public Property IEPS As Double
|
||||
Public Property Total As Double
|
||||
End Class
|
||||
|
||||
Public Class ProductoWS
|
||||
Public Property Id As Integer
|
||||
Public Property CveVentaDetalle As Integer
|
||||
Public Property CveVenta As Integer
|
||||
Public Property CveProductoServicio As Integer
|
||||
Public Property CodigoPS As String
|
||||
Public Property CveUnidadMedida As Integer
|
||||
Public Property UnidadMedida As String
|
||||
Public Property Cantidad As Double
|
||||
Public Property Observacion As String
|
||||
Public Property PU As Double
|
||||
Public Property Descuento As Double
|
||||
Public Property IVA As Double
|
||||
Public Property IEPS As Double
|
||||
Public Property IVAPorcentaje As Double
|
||||
Public Property IEPSPorcentaje As Double
|
||||
Public Property CveSubCentroCosto As Integer
|
||||
Public Property SubCentroCosto As String
|
||||
End Class
|
||||
|
||||
Public Class ClienteWS
|
||||
Public Property Id As Integer
|
||||
Public Property CveCliente As Integer
|
||||
Public Property RazonSocial As String
|
||||
Public Property NombreComercial As String
|
||||
Public Property RFC As String
|
||||
Public Property Codigo As String
|
||||
Public Property Calle As String
|
||||
Public Property NoExterior As String
|
||||
Public Property Colonia As String
|
||||
Public Property Ciudad As String
|
||||
Public Property Municipio As String
|
||||
Public Property Estado As String
|
||||
Public Property CodigoPostal As Integer
|
||||
Public Property Contacto As String
|
||||
Public Property ContactoTelefono As String
|
||||
Public Property Correo As String
|
||||
Public Property CveVendedor As Integer
|
||||
Public Property Estatus As Boolean
|
||||
Public Property CveUsuario As Integer
|
||||
Public Property CveEmpresa As Integer
|
||||
Public Property CveRegimenFiscal As Integer
|
||||
Public Property RegimenFiscal As String
|
||||
Public Property CodigoRegimenFiscal As String
|
||||
End Class
|
||||
|
||||
Public Class EmpresaWS
|
||||
Public Property Id As Integer
|
||||
Public Property CveEmpresa As Integer
|
||||
Public Property Empresa As String
|
||||
Public Property RFC As String
|
||||
Public Property DomicilioFiscal As String
|
||||
Public Property ArchivoCER As String
|
||||
Public Property ArchivoKEY As String
|
||||
Public Property FieldPassword As String
|
||||
Public Property CveRegimenFiscal As Integer
|
||||
Public Property RegimenFiscal As String
|
||||
End Class
|
||||
|
||||
Public Class ParametroWS
|
||||
Public Property Factura As FacturaWS
|
||||
Public Property Cliente As ClienteWS
|
||||
Public Property Empresa As EmpresaWS
|
||||
End Class
|
||||
|
||||
|
||||
End Class
|
||||
@@ -370,8 +370,7 @@ public partial class Bancos_Devoluciones : ClsPaginas
|
||||
}
|
||||
|
||||
// DATOS PREPOLIZA
|
||||
if ((DdlTipoTransanccion.SelectedValue == "1"))
|
||||
FolioFijo = TxtFolio.Text.ToEntero();
|
||||
if ( DdlTipoTransanccion.SelectedValue == "1" && UsuarioActual.CveEmpresa != 119) FolioFijo = TxtFolio.Text.ToEntero();
|
||||
CvePrePoliza = ObjMov.AddPrePolizas("Bancos/IE Devoluciones", CvePlantillaPoliza, TxtImporte.Text.Trim().ToDouble(), TxtImporte.Text.Trim().ToDouble(), CveMoneda, TxtFechaDocumento.Text.ToDate(), TxtObservaciones.Text.Trim(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo: FolioFijo, ReglaFolioPoliza: ObjComp.ObtenerReglaFolio(DdlTipoTransanccion.SelectedValue, null, UsuarioActual.CveEmpresa), CveTipoPoliza: ObjMov.ObtenerTipoPoliza(DdlTipoTransanccion.SelectedValue, "-1", UsuarioActual.CveEmpresa));
|
||||
|
||||
if (CvePrePoliza > 0)
|
||||
|
||||
@@ -299,8 +299,8 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
||||
AsignaCuentaProveedor(DdlProveedores.SelectedValue.ToEntero());
|
||||
|
||||
// DATOS PREPOLIZA
|
||||
if ((DdlTipoTransaccion.SelectedValue == "1"))
|
||||
FolioFijo = TxtFolio.Text.ToEntero();
|
||||
if ( DdlTipoTransaccion.SelectedValue == "1" && UsuarioActual.CveEmpresa != 119) FolioFijo = TxtFolio.Text.ToEntero();
|
||||
|
||||
CvePrePoliza = ObjMov.AddPrePolizas("Bancos/IE PAGO ACRREDORES", CvePlantillaPoliza, TxtImporte.Text.Trim().ToDouble(), TxtImporte.Text.Trim().ToDouble(), CveMoneda, TxtFechaDocumento.Text.ToDate(), DdlProveedores.SelectedText.ToString(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo: FolioFijo, ReglaFolioPoliza: ObjComp.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, null, UsuarioActual.CveEmpresa), CveTipoPoliza: ObjMov.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, "-1", UsuarioActual.CveEmpresa));
|
||||
|
||||
if (CvePrePoliza > 0)
|
||||
|
||||
@@ -339,9 +339,8 @@ public partial class Bancos_PagoDeudor : ClsPaginas
|
||||
}
|
||||
|
||||
// DATOS PREPOLIZA
|
||||
if ((DdlTipoTransaccionPrestamo.SelectedValue == "1"))
|
||||
FolioFijo = TxtFolioPrestamo.Text.ToEntero();
|
||||
CvePrePoliza = ObjMov.AddPrePolizas("Bancos/IE PRESTAMO DEUDORES", CvePlantillaPoliza, TxtImportePrestamo.Text.Trim().ToDouble(), TxtImportePrestamo.Text.Trim().ToDouble(), CveMonedaPrestamo, TxtFechaPrestamo.Text.ToDate(), DdlProveedorPrestamo.SelectedText.ToString(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo: FolioFijo, ReglaFolioPoliza: ObjComp.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, null, UsuarioActual.CveEmpresa), CveTipoPoliza: ObjMov.ObtenerTipoPoliza(DdlTipoTransaccionPrestamo.SelectedValue, "-1", UsuarioActual.CveEmpresa));
|
||||
if (DdlTipoTransaccionPrestamo.SelectedValue == "1" && UsuarioActual.CveEmpresa != 119) FolioFijo = TxtFolioPrestamo.Text.ToEntero();
|
||||
CvePrePoliza = ObjMov.AddPrePolizas("Bancos/IE PRESTAMO DEUDORES", CvePlantillaPoliza, TxtImportePrestamo.Text.Trim().ToDouble(), TxtImportePrestamo.Text.Trim().ToDouble(), CveMonedaPrestamo, TxtFechaPrestamo.Text.ToDate(), DdlProveedorPrestamo.SelectedText.ToString(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo: FolioFijo, ReglaFolioPoliza: ObjComp.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, null, UsuarioActual.CveEmpresa), CveTipoPoliza: ObjMov.ObtenerTipoPoliza(DdlTipoTransaccionPrestamo.SelectedValue, "-1", UsuarioActual.CveEmpresa));
|
||||
|
||||
if (CvePrePoliza > 0)
|
||||
{
|
||||
@@ -674,8 +673,8 @@ public partial class Bancos_PagoDeudor : ClsPaginas
|
||||
}
|
||||
|
||||
// DATOS PREPOLIZA
|
||||
if ((DdlTipoTransaccion.SelectedValue == "1"))
|
||||
FolioFijo = TxtFolio.Text.ToEntero();
|
||||
if (DdlTipoTransaccion.SelectedValue == "1" && UsuarioActual.CveEmpresa != 119) FolioFijo = TxtFolio.Text.ToEntero();
|
||||
|
||||
CvePrePoliza = ObjMov.AddPrePolizas("Bancos/IE PAGO DEUDORES", CvePlantillaPoliza, TxtImporte.Text.Trim().ToDouble(), TxtImporte.Text.Trim().ToDouble(), CveMoneda, TxtFechaDocumento.Text.ToDate(), DdlProveedores.SelectedText.ToString(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo: FolioFijo, ReglaFolioPoliza: ObjComp.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, null, UsuarioActual.CveEmpresa), CveTipoPoliza: ObjMov.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, "-1", UsuarioActual.CveEmpresa));
|
||||
|
||||
if (CvePrePoliza > 0)
|
||||
|
||||
@@ -250,8 +250,8 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
|
||||
AsignaCuentaPersonal(DdlFuncionarioEmpleadoPago.SelectedValue.ToEntero(), CveMoneda);
|
||||
|
||||
// DATOS PREPOLIZA
|
||||
if ((DdlTipoTransaccion.SelectedValue == "1"))
|
||||
FolioFijo = TxtFolio.Text.ToEntero();
|
||||
if (DdlTipoTransaccion.SelectedValue == "1" && UsuarioActual.CveEmpresa != 119) FolioFijo = TxtFolio.Text.ToEntero();
|
||||
|
||||
CvePrePoliza = ObjMov.AddPrePolizas("Bancos/IE PAGO ACRREDORES", CvePlantillaPoliza, TxtImporte.Text.Trim().ToDouble(), TxtImporte.Text.Trim().ToDouble(), CveMoneda, TxtFechaDocumento.Text.ToDate(), DdlFuncionarioEmpleadoPago.SelectedItem.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo: FolioFijo, ReglaFolioPoliza: ObjComp.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, null, UsuarioActual.CveEmpresa), CveTipoPoliza: ObjMov.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, "-1", UsuarioActual.CveEmpresa));
|
||||
|
||||
if (CvePrePoliza > 0)
|
||||
@@ -539,9 +539,9 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
|
||||
AsignaCuentaPersonal(DdlFuncionarioEmpleadoPrestamo.SelectedValue.ToEntero(), CveMoneda);
|
||||
|
||||
// DATOS PREPOLIZA
|
||||
if ((DdlTipoTransanccionPrestamo.SelectedValue == "1"))
|
||||
FolioFijo = TxtFolioPrestamo.Text.ToEntero();
|
||||
CvePrePoliza = ObjMov.AddPrePolizas("Bancos/IE PRESTAMO PERSONAL", CvePlantillaPoliza, TxtImportePrestamo.Text.Trim().ToDouble(), TxtImportePrestamo.Text.Trim().ToDouble(), CveMoneda, TxtFechaPrestamo.Text.ToDate(), DdlFuncionarioEmpleadoPrestamo.SelectedItem.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo: FolioFijo, ReglaFolioPoliza: ObjComp.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, null, UsuarioActual.CveEmpresa));
|
||||
if (DdlTipoTransanccionPrestamo.SelectedValue == "1" && UsuarioActual.CveEmpresa != 119 ) FolioFijo = TxtFolioPrestamo.Text.ToEntero();
|
||||
|
||||
CvePrePoliza = ObjMov.AddPrePolizas("Bancos/PRESTAMO PERSONAL", CvePlantillaPoliza, TxtImportePrestamo.Text.Trim().ToDouble(), TxtImportePrestamo.Text.Trim().ToDouble(), CveMoneda, TxtFechaPrestamo.Text.ToDate(), DdlFuncionarioEmpleadoPrestamo.SelectedItem.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo: FolioFijo, ReglaFolioPoliza: ObjComp.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, null, UsuarioActual.CveEmpresa));
|
||||
|
||||
if (CvePrePoliza > 0)
|
||||
{
|
||||
|
||||
@@ -358,7 +358,7 @@
|
||||
<asp:UpdatePanel ID="UPCompras" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvCxP" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas X Pagar Pendientes"
|
||||
DataKeyNames="CveCompra,ImporteProgramo,Saldo,SubTotal,IVA,IVADeducible,IVANoDeducible,IEPS,RetIVA,RetISR,Original,UUID,RFC,CveFactura,SerieFolio,Descripcion,CvePrePoliza,Fecha,EstatusInventario,CveProveedor,TipoCambio, CveMoneda,CveRetIVAConcepto,IVAPorPagar,IVAPorPagarDeducible,IVAPorPagarNoDeducible,IEPSPorPagar,CveRetISRConcepto,PorcentajeIVA,CveTipoConcepto,CveSubProyecto"
|
||||
DataKeyNames="CveCompra,ImporteProgramo,Saldo,SubTotal,IVA,IVADeducible,IVANoDeducible,IEPS,RetIVA,RetISR,Original,UUID,RFC,CveFactura,SerieFolio,Descripcion,CvePrePoliza,Fecha,EstatusInventario,CveProveedor,TipoCambio, CveMoneda,CveRetIVAConcepto,IVAPorPagar,IVAPorPagarDeducible,IVAPorPagarNoDeducible,IEPSPorPagar,CveRetISRConcepto,PorcentajeIVA,CveTipoConcepto,CveSubProyecto,TotalOriginal"
|
||||
Width="100%" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
|
||||
@@ -709,7 +709,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
|
||||
|
||||
|
||||
Valida.Verificar(gvr.DataKey("UUID"), gvr.DataKey("RFC"), UsuarioActual.Empresa.RFC, gvr.DataKey("Original").ToDecimal)
|
||||
Valida.Verificar(gvr.DataKey("UUID"), gvr.DataKey("RFC"), UsuarioActual.Empresa.RFC, gvr.DataKey("TotalOriginal").ToDecimal)
|
||||
|
||||
If Not UsuarioActual.Empresa.FacturaProduccion OrElse UsuarioActual.CveEmpresa < 2 Then
|
||||
Valida.EsValida = 1
|
||||
|
||||
@@ -912,7 +912,7 @@ Partial Class Bancos_ProveedoresCreditos
|
||||
Dim tImporteMonedaExtranjera As Decimal = 0
|
||||
If tCveMoneda <> 1 Then tImporteMonedaExtranjera = TxtImporte.Text.ToDecimal * GlobalTipoCambio(TxtFechaDocumento.Text.Trim.ToDate).ToString.ToDecimal
|
||||
'cheque
|
||||
If DdlTipoTransaccion.SelectedValue = "1" Then FolioFijo = TxtFolio.Text.ToEntero
|
||||
If DdlTipoTransaccion.SelectedValue = "1" AndAlso UsuarioActual.CveEmpresa <> 119 Then FolioFijo = TxtFolio.Text.ToEntero
|
||||
|
||||
CvePrePoliza = ObjMov.AddPrePolizas("Bancos/ProvCred", CvePlantillaPoliza, TxtImporte.Text.Trim.ToDouble, TxtImporte.Text.Trim.ToDouble, tCveMoneda, TxtFechaDocumento.Text.ToDate, TxtPagueseA.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjComp.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, Nothing, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjMov.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, "-1", UsuarioActual.CveEmpresa))
|
||||
|
||||
|
||||
@@ -15,6 +15,12 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkAgregar" OnClick="LnkAgregar_Click" runat="server"><i class="fa fa-plus"></i><span style="padding-left:5px;">Agregar Etapas de Proceso</span></asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkImprimir" OnClick="LnkImprimir_Click" runat="server"><i class="fa fa-file-pdf-o"></i><span style="padding-left:5px;">PDF</span></asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkImprimirExcel" OnClick="LnkImprimirExcel_Click" runat="server"><i class="fa fa-file-excel-o"></i><span style="padding-left:5px;">Excel</span></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Data;
|
||||
using Microsoft.Reporting.WebForms;
|
||||
|
||||
using Extensiones;
|
||||
|
||||
@@ -317,4 +318,36 @@ public partial class CRM_CatEtapasProceso : ClsPaginas
|
||||
CargaDatos(DdlFiltroProceso.SelectedValue.ToEntero());
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void LnkImprimir_Click(object sender,EventArgs e)
|
||||
{
|
||||
Imprimir("PDF");
|
||||
}
|
||||
|
||||
protected void LnkImprimirExcel_Click(object sender, EventArgs e)
|
||||
{
|
||||
Imprimir("EXCEL");
|
||||
}
|
||||
|
||||
private void Imprimir(string formato)
|
||||
{
|
||||
System.IO.FileInfo Image = new System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta));
|
||||
string logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
|
||||
|
||||
List<ReportParameter> param = new List<ReportParameter>();
|
||||
|
||||
param.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa));
|
||||
if (Image.Exists)
|
||||
{
|
||||
param.Add(new ReportParameter("LogoPath", logouri));
|
||||
}
|
||||
else
|
||||
{
|
||||
param.Add(new ReportParameter("LogoPath", ""));
|
||||
}
|
||||
param.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre));
|
||||
param.Add(new ReportParameter("FechaImpresion", DateTime.Today.ToString()));
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepCatEtapasProceso.rdlc", TmpDT, param, "Report Cat Etapas Proceso", formato);
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,12 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkAgregar" OnClick="LnkAgregar_Click" runat="server"><i class="fa fa-plus"></i><span style="padding-left:5px;">Agregar Probabilidad de Acercamiento</span></asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkImprimir" OnClick="LnkImprimir_Click" runat="server"><i class="fa fa-file-pdf-o"></i><span style="padding-left:5px;">PDF</span></asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkImprimirExcel" OnClick="LnkImprimirExcel_Click" runat="server"><i class="fa fa-file-excel-o"></i><span style="padding-left:5px;">Excel</span></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Data;
|
||||
using Microsoft.Reporting.WebForms;
|
||||
|
||||
using Extensiones;
|
||||
|
||||
@@ -195,4 +196,35 @@ public partial class CRM_CatProbabilidadAcercamiento : ClsPaginas
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
protected void LnkImprimir_Click(object sender, EventArgs e)
|
||||
{
|
||||
Imprimir("PDF");
|
||||
}
|
||||
|
||||
protected void LnkImprimirExcel_Click(object sender, EventArgs e)
|
||||
{
|
||||
Imprimir("EXCEL");
|
||||
}
|
||||
|
||||
private void Imprimir(string formato)
|
||||
{
|
||||
System.IO.FileInfo Image = new System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta));
|
||||
string logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
|
||||
|
||||
List<ReportParameter> param = new List<ReportParameter>();
|
||||
|
||||
param.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa));
|
||||
if (Image.Exists)
|
||||
{
|
||||
param.Add(new ReportParameter("LogoPath", logouri));
|
||||
}
|
||||
else
|
||||
{
|
||||
param.Add(new ReportParameter("LogoPath", ""));
|
||||
}
|
||||
param.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre));
|
||||
param.Add(new ReportParameter("FechaImpresion", DateTime.Today.ToString()));
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepCatProbabilidadAcercamiento", TmpDT, param, "Report Cat Etapas Proceso", formato);
|
||||
}
|
||||
}
|
||||
51
CRM/Report.rdlc
Normal file
51
CRM/Report.rdlc
Normal file
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
|
||||
<Body>
|
||||
<ReportItems>
|
||||
<Textbox Name="Textbox1">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>test reporte</Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Top>0.69667in</Top>
|
||||
<Left>1.88417in</Left>
|
||||
<Height>0.25in</Height>
|
||||
<Width>2.55208in</Width>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<Height>2in</Height>
|
||||
<Style />
|
||||
</Body>
|
||||
<Width>6.5in</Width>
|
||||
<Page>
|
||||
<LeftMargin>1in</LeftMargin>
|
||||
<RightMargin>1in</RightMargin>
|
||||
<TopMargin>1in</TopMargin>
|
||||
<BottomMargin>1in</BottomMargin>
|
||||
<Style />
|
||||
</Page>
|
||||
<AutoRefresh>0</AutoRefresh>
|
||||
<rd:ReportUnitType>Inch</rd:ReportUnitType>
|
||||
<rd:ReportID>efa9f51c-a3da-48bc-be7d-74f8599c6070</rd:ReportID>
|
||||
</Report>
|
||||
@@ -160,7 +160,7 @@
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePlantillaPolizaDetalle, TipoMovimiento, CveSubProyecto, CveProveedor, CvePersonal, CveConcepto, IdCtaContable, Orden" EmptyDataText="No se encontraron Plantilla de Pólizas Registradas" ToolTip="Listado de Plantilla de Pólizas" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePlantillaPolizaDetalle, TipoMovimiento, CveSubProyecto, CveProveedor, CvePersonal, CveConcepto, IdCtaContable, Orden,PorcentajeImpuesto" EmptyDataText="No se encontraron Plantilla de Pólizas Registradas" ToolTip="Listado de Plantilla de Pólizas" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Concepto Contable">
|
||||
<ItemTemplate>
|
||||
@@ -283,7 +283,13 @@
|
||||
<label for="<%= TxtOrden.ClientID.ToString()%>">Orden:</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlPorcentajeImpuesto" CssClass="form-control input-sm select2me js-referencia-programmatic" runat="server" Visible="false" AppendDataBoundItems="true" Width="240px" ValidationGroup="GrpAgregar">
|
||||
<asp:ListItem Text="8%" Value="0.08"></asp:ListItem>
|
||||
<asp:ListItem Text="16%" Value="0.16"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label id="LblPorcentajeImpuesto" runat="server" for="<%= DdlPorcentajeImpuesto.ClientID.ToString()%>">Tasa:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlPersonal" CssClass="form-control input-sm select2me js-referencia-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="NombreCompleto" DataValueField="CvePersonal" Width="240px" ValidationGroup="GrpAgregar"></asp:DropDownList>
|
||||
<label ID="LblPersonal" runat="server" for="<%= DdlPersonal.ClientID.ToString()%>">Personal:</label>
|
||||
|
||||
@@ -158,6 +158,7 @@ Partial Class Contabilidad_PlantillasPolizasDetalle
|
||||
DTDetalle.Columns.Add("IdCtaContable", GetType(Integer))
|
||||
DTDetalle.Columns.Add("Orden", GetType(String))
|
||||
DTDetalle.Columns.Add("Usuario", GetType(String))
|
||||
DTDetalle.Columns.Add("PorcentajeImpuesto", GetType(Decimal))
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -172,7 +173,7 @@ Partial Class Contabilidad_PlantillasPolizasDetalle
|
||||
CvePlantilla = ObjPlantillaPoliza.CvePlantillaPoliza
|
||||
If DTDetalle.Rows.Count > 0 Then
|
||||
For Each Row As DataRow In DTDetalle.Rows
|
||||
If Not ObjPlantillaPoliza.AddConta_PlantillasPolizasDetalles(CvePlantilla, Row("CveConcepto").ToString.ToEntero, Row("TipoMovto").ToString.ToEntero, Row("IdCtaContable").ToString.ToEntero, Row("Orden").ToString.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DDLSubProyecto.SelectedValue.ToEntero, DDLProveedor.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero) Then
|
||||
If Not ObjPlantillaPoliza.AddConta_PlantillasPolizasDetalles(CvePlantilla, Row("CveConcepto").ToString.ToEntero, Row("TipoMovto").ToString.ToEntero, Row("IdCtaContable").ToString.ToEntero, Row("Orden").ToString.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DDLSubProyecto.SelectedValue.ToEntero, DDLProveedor.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero, DdlPorcentajeImpuesto.SelectedValue.ToDecimal) Then
|
||||
ErrorPlantilla = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -228,7 +229,7 @@ Partial Class Contabilidad_PlantillasPolizasDetalle
|
||||
|
||||
If HdnModalidad.Value = "I" Then
|
||||
If CvePlantillaPoliza > 0 Then
|
||||
If ObjPlantillaPolizaDetalle.AddConta_PlantillasPolizasDetalles(CvePlantillaPoliza, DdlConcepto.SelectedValue.ToEntero, DdlTipoMovimiento.SelectedValue.ToEntero, DdlCtaContable.SelectedValue.ToEntero, TxtOrden.Text.Trim.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DDLSubProyecto.SelectedValue.ToEntero, DDLProveedor.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero) Then
|
||||
If ObjPlantillaPolizaDetalle.AddConta_PlantillasPolizasDetalles(CvePlantillaPoliza, DdlConcepto.SelectedValue.ToEntero, DdlTipoMovimiento.SelectedValue.ToEntero, DdlCtaContable.SelectedValue.ToEntero, TxtOrden.Text.Trim.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DDLSubProyecto.SelectedValue.ToEntero, DDLProveedor.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero, DdlPorcentajeImpuesto.SelectedValue.ToDecimal) Then
|
||||
TxtOrden.Text = ""
|
||||
updatatos()
|
||||
Alert("El nuevo Registro se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
@@ -260,7 +261,7 @@ Partial Class Contabilidad_PlantillasPolizasDetalle
|
||||
If HdnID.Value.ToEntero <> -1 Then
|
||||
If CvePlantillaPoliza > 0 Then
|
||||
If ObjPlantillaPolizaDetalle.UpdateConta_PlantillasPolizasDetalle(DdlConcepto.SelectedValue.ToEntero, DdlTipoMovimiento.SelectedValue.ToEntero, DdlCtaContable.SelectedValue.ToEntero, TxtOrden.Text.Trim.ToEntero,
|
||||
HdnID.Value.ToEntero, DDLSubProyecto.SelectedValue.ToEntero, DDLProveedor.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero) Then
|
||||
HdnID.Value.ToEntero, DDLSubProyecto.SelectedValue.ToEntero, DDLProveedor.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero, DdlPorcentajeImpuesto.SelectedValue.ToDecimal) Then
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
updatatos()
|
||||
Else
|
||||
@@ -352,6 +353,13 @@ Partial Class Contabilidad_PlantillasPolizasDetalle
|
||||
DdlPersonal.Visible = False
|
||||
LblPersonal.Visible = False
|
||||
End If
|
||||
If DdlConcepto.SelectedValue.Contiene("19", "61") Then ' conceptos de IVA Acreditable e IVA Trasladado
|
||||
DdlPorcentajeImpuesto.Visible = True
|
||||
LblPorcentajeImpuesto.Visible = True
|
||||
Else
|
||||
DdlPorcentajeImpuesto.Visible = False
|
||||
LblPorcentajeImpuesto.Visible = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -392,6 +400,15 @@ Partial Class Contabilidad_PlantillasPolizasDetalle
|
||||
DdlPersonal.Visible = False
|
||||
LblPersonal.Visible = False
|
||||
End If
|
||||
If DdlConcepto.SelectedValue.Contiene("19", "61") Then ' conceptos de IVA Acreditable e IVA Trasladado
|
||||
DdlPorcentajeImpuesto.SelectedValueExist(GvRow.DataKey("PorcentajeImpuesto"))
|
||||
DdlPorcentajeImpuesto.Visible = True
|
||||
LblPorcentajeImpuesto.Visible = True
|
||||
Else
|
||||
DdlPorcentajeImpuesto.Visible = False
|
||||
LblPorcentajeImpuesto.Visible = False
|
||||
End If
|
||||
|
||||
UpModal.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "divAgregarSucursal"))
|
||||
CargaDatos()
|
||||
|
||||
@@ -302,7 +302,7 @@
|
||||
</table>
|
||||
|
||||
<div style="width: 100%; min-height: 200px; overflow-scrolling: auto;">
|
||||
<asp:GridView ID="GvMov" runat="server" AutoGenerateColumns="False" ShowHeader="False" DataKeyNames="IdMov,IDCuenta,Cargo,Abono,TipoMovto,CveConcepto,CveProveedor,CvePersonal, CveCompra,CveClasificacion,CveCliente,CveVenta,TC,CveOC" Width="100%" CssClass=" GvMov GvSize table table-striped table-advance table-hover mysmallbtn" GridLines="None">
|
||||
<asp:GridView ID="GvMov" runat="server" AutoGenerateColumns="False" ShowHeader="False" DataKeyNames="IdMov,IDCuenta,Cargo,Abono,TipoMovto,CveConcepto,CveProveedor,CvePersonal, CveCompra,CveClasificacion,CveCliente,CveVenta,TC,CveOC,PorcentajeImpuesto" Width="100%" CssClass=" GvMov GvSize table table-striped table-advance table-hover mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Cuenta</HeaderTemplate>
|
||||
|
||||
@@ -296,8 +296,8 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
.Add("Cuenta", Type.GetType("System.String"))
|
||||
.Add("Referencia", Type.GetType("System.String"))
|
||||
.Add("Concepto", Type.GetType("System.String"))
|
||||
.Add("Cargo", Type.GetType("System.Double"))
|
||||
.Add("Abono", Type.GetType("System.Double"))
|
||||
.Add("Cargo", Type.GetType("System.Decimal"))
|
||||
.Add("Abono", Type.GetType("System.Decimal"))
|
||||
.Add("TipoMovto", Type.GetType("System.Int32"))
|
||||
.Add("EsComodin", Type.GetType("System.Int32"))
|
||||
.Add("CveConcepto", Type.GetType("System.Int32"))
|
||||
@@ -316,7 +316,8 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
.Add("IdCtaContable", Type.GetType("System.Int32"))
|
||||
.Add("CveOC", Type.GetType("System.Int32"))
|
||||
.Add("ConceptoContable", Type.GetType("System.String"))
|
||||
.Add("TC", Type.GetType("System.Double"))
|
||||
.Add("TC", Type.GetType("System.Decimal"))
|
||||
.Add("PorcentajeImpuesto", Type.GetType("System.Decimal"))
|
||||
End With
|
||||
End Sub
|
||||
|
||||
@@ -714,7 +715,8 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
dr("CveProveedor") = drt("CveProveedor")
|
||||
dr("CvePersonal") = drt("CvePersonal")
|
||||
dr("CveClasificacion") = -1
|
||||
dr("MultipleSubProyecto") = drt("MultipleSubProyecto")
|
||||
dr("MultipleSubProyecto") = drt("MultipleSubProyecto")
|
||||
dr("PorcentajeImpuesto") = drt("PorcentajeImpuesto")
|
||||
DtMovimientos.Rows.Add(dr)
|
||||
Next
|
||||
|
||||
@@ -861,6 +863,7 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
Dim Importe As Double = 0
|
||||
Dim TipoMovto As Boolean = False
|
||||
Dim IdCtaContable As Integer = 0
|
||||
Dim PorcentajeImpuesto As Decimal = 0
|
||||
|
||||
'Registra movimieno bancario
|
||||
If CveConcepto = 30 Then
|
||||
@@ -877,7 +880,8 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
Dim CveCompra As Integer = -1
|
||||
|
||||
'inserto las compras que voy a pagarDdlSaldos
|
||||
For Each gvr As GridViewRow In GvMov.Rows
|
||||
For Each gvr As GridViewRow In GvMov.Rows
|
||||
|
||||
If gvr.DataKey("IDCuenta").ToEntero > 0 Then
|
||||
IdCtaContable = gvr.DataKey("IDCuenta")
|
||||
End If
|
||||
@@ -919,8 +923,9 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
CveProveedor:=CveProveedor, CveCompra:=CveCompra,
|
||||
CvePersonal:=gvr.DataKey("CvePersonal").ToEntero, CveClasificacion:=gvr.DataKey("CveClasificacion").ToEntero,
|
||||
ImporteMX:=Importe, CveTipoGasto:=gvr.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero,
|
||||
CveCliente:=gvr.DataKey("CveCliente").ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, TipoCambio:=If(gvr.DataKey("TC").ToString.ToDouble > 0, gvr.DataKey("TC").ToString.ToDouble, 1),
|
||||
ImporteME:=If(gvr.DataKey("TC").ToString.ToDouble > 0, (Importe / (gvr.DataKey("TC").ToString.ToDouble - 1)).RoundSQL, 0)) Then
|
||||
CveCliente:=gvr.DataKey("CveCliente").ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, TipoCambio:=If(gvr.DataKey("TC").ToString.ToDecimal > 0, gvr.DataKey("TC").ToString.ToDecimal, 1),
|
||||
ImporteME:=If(gvr.DataKey("TC").ToString.ToDecimal > 0, (Importe / (gvr.DataKey("TC").ToString.ToDecimal - 1)).RoundSQL, 0),
|
||||
PorcentajeImpuesto:=gvr.DataKey("PorcentajeImpuesto").ToDecimal) Then
|
||||
Else
|
||||
MsgError = "No se pudo insertar el detalle de la póliza2"
|
||||
Exit For
|
||||
|
||||
@@ -540,7 +540,7 @@
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Sum(Fields!Cantidad.Value, "DsInventarios")</Value>
|
||||
<Value>=Sum(iif(Not Fields!Clasificacion.Value = "USADOS",CInt(Fields!Cantidad.Value),0),"DsInventarios")</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
@@ -580,7 +580,7 @@
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Sum(iif(Fields!Clasificacion.Value = "USADOS",Fields!Cantidad.Value,0),"DsInventarios")</Value>
|
||||
<Value>=Sum(iif(Fields!Clasificacion.Value = "USADOS",CInt(Fields!Cantidad.Value),0),"DsInventarios")</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
@@ -809,39 +809,6 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox10">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!SubProyecto.Value</Value>
|
||||
<Style>
|
||||
<FontSize>12pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Top>3.24566cm</Top>
|
||||
<Left>0.00711cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>14.27979cm</Width>
|
||||
<ZIndex>6</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox11">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
@@ -849,7 +816,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Origen 2: </Value>
|
||||
<Value>Origen: </Value>
|
||||
<Style>
|
||||
<FontSize>12pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
@@ -871,7 +838,7 @@
|
||||
<Left>0.00711cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>14.27979cm</Width>
|
||||
<ZIndex>7</ZIndex>
|
||||
<ZIndex>6</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -911,7 +878,7 @@
|
||||
<Left>0.00711cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>14.27979cm</Width>
|
||||
<ZIndex>8</ZIndex>
|
||||
<ZIndex>7</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -930,7 +897,7 @@
|
||||
<Left>0.1121cm</Left>
|
||||
<Height>2.53711cm</Height>
|
||||
<Width>4.08574cm</Width>
|
||||
<ZIndex>9</ZIndex>
|
||||
<ZIndex>8</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
|
||||
@@ -1546,7 +1546,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>FACTURA</Value>
|
||||
<Value>=UCase(Parameters!TipoDocumento.Value)</Value>
|
||||
<Style>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
<Color>White</Color>
|
||||
@@ -1560,7 +1560,7 @@
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox8</rd:DefaultName>
|
||||
<Left>18.23008cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Height>0.96018cm</Height>
|
||||
<Width>2.79101cm</Width>
|
||||
<ZIndex>7</ZIndex>
|
||||
<Style>
|
||||
@@ -1594,7 +1594,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox8</rd:DefaultName>
|
||||
<Top>0.59682cm</Top>
|
||||
<Top>0.97782cm</Top>
|
||||
<Left>18.23008cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>2.79101cm</Width>
|
||||
@@ -1645,7 +1645,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox8</rd:DefaultName>
|
||||
<Top>1.19682cm</Top>
|
||||
<Top>1.57782cm</Top>
|
||||
<Left>18.23008cm</Left>
|
||||
<Height>0.86903cm</Height>
|
||||
<Width>2.79101cm</Width>
|
||||
|
||||
@@ -134,7 +134,7 @@ Partial Class Inventarios_PrestamosdeProveedor
|
||||
|
||||
'AGREGAMOS LA SALIDA
|
||||
CveMovimientoSalida = ObjInventario.AddMovimiento(DdlAlmacenOrigen.SelectedValue.ToEntero, 29, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1,
|
||||
Observaciones:=TxtObservacionesEntrega.Text.Trim, CveProveedor:=tCveProveedor)
|
||||
Observaciones:=TxtObservacionesEntrega.Text.Trim, CveProveedor:=tCveProveedor, Modulo:="PresP")
|
||||
Folio = ObjInventario.Folio
|
||||
|
||||
If CveMovimientoSalida <= 0 Then
|
||||
|
||||
@@ -2161,49 +2161,57 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
|
||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/RecepcionEntrega", 4, TotalCosto, TotalCosto, 1, Fecha, ClienteNombre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
||||
For Each RowInv As DataRow In tmpCostos.Rows
|
||||
ValorInventario = DtCostos.SUMD("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").RoundSQL()
|
||||
TotalCostoAcumulado += ValorInventario
|
||||
|
||||
'cuando es el último movimiento y hay diferencias en los importes
|
||||
If cont = DtCostos.FiltraParametros("", "", {"CveClasificacion"}).Rows.Count AndAlso TotalCosto <> TotalCostoAcumulado Then
|
||||
ValorInventario = ValorInventario + (TotalCosto - TotalCostoAcumulado)
|
||||
End If
|
||||
If CvePrePoliza > 0 Then
|
||||
|
||||
'Concepto = String.Format("{0} - {1}", Row2("Clasificacion").ToString, Row2("SubProyecto").ToString)
|
||||
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
|
||||
CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostosSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
|
||||
For Each RowInv As DataRow In tmpCostos.Rows
|
||||
ValorInventario = DtCostos.SUMD("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").RoundSQL()
|
||||
TotalCostoAcumulado += ValorInventario
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ValorMultiplicador * ValorInventario, SerieFolio, 69, SerieFolio, Fecha, IdCtaContable, -1, CveVenta:=CveVentaSurtir, CveCliente:=CveCliente, CveMovimientoAlmacen:=CveMovimiento, CveSubProyecto:=CveSubProyecto, ImporteMX:=ValorMultiplicador * ValorInventario, CveCuenta:=CveCuenta, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero) Then
|
||||
ErrorMovInv = True
|
||||
'cuando es el último movimiento y hay diferencias en los importes
|
||||
If cont = DtCostos.FiltraParametros("", "", {"CveClasificacion"}).Rows.Count AndAlso TotalCosto <> TotalCostoAcumulado Then
|
||||
ValorInventario = ValorInventario + (TotalCosto - TotalCostoAcumulado)
|
||||
End If
|
||||
|
||||
'Concepto = String.Format("{0} - {1}", Row2("Clasificacion").ToString, Row2("SubProyecto").ToString)
|
||||
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
|
||||
CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostosSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ValorMultiplicador * ValorInventario, SerieFolio, 69, SerieFolio, Fecha, IdCtaContable, -1, CveVenta:=CveVentaSurtir, CveCliente:=CveCliente, CveMovimientoAlmacen:=CveMovimiento, CveSubProyecto:=CveSubProyecto, ImporteMX:=ValorMultiplicador * ValorInventario, CveCuenta:=CveCuenta, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
|
||||
cont += 1
|
||||
Next
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ValorMultiplicador * TotalCosto, SerieFolio, 68, SerieFolio, Fecha, IdCtaContableAlmacen, -1, CveVenta:=CveVentaSurtir, CveCliente:=CveCliente, CveMovimientoAlmacen:=CveMovimiento, CveSubProyecto:=CveSubProyecto, ImporteMX:=ValorMultiplicador * TotalCosto, CveCuenta:=CveCuentaAlmacen) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
cont += 1
|
||||
Next
|
||||
'AutoConta - El movimiento 1 es el de Venta
|
||||
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ValorMultiplicador * TotalCosto, SerieFolio, 68, SerieFolio, Fecha, IdCtaContableAlmacen, -1, CveVenta:=CveVentaSurtir, CveCliente:=CveCliente, CveMovimientoAlmacen:=CveMovimiento, CveSubProyecto:=CveSubProyecto, ImporteMX:=ValorMultiplicador * TotalCosto, CveCuenta:=CveCuentaAlmacen) Then
|
||||
If AutoConta And Not ErrorMovInv Then
|
||||
Dim ObjContPaq = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
If IdCtaContable > 0 Then
|
||||
If Not ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContPaq) Then
|
||||
Alert("Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico")
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico"
|
||||
End If
|
||||
Else
|
||||
Alert(String.Format("No se puede contabilizar ya que falta asignación de las cuentas contables"), TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
ObjContPaq.Dispose()
|
||||
End If
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un Error al ingresar la prepoliza"
|
||||
End If
|
||||
|
||||
'AutoConta - El movimiento 1 es el de Venta
|
||||
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
|
||||
|
||||
If AutoConta And Not ErrorMovInv Then
|
||||
Dim ObjContPaq = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
If IdCtaContable > 0 Then
|
||||
If Not ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContPaq) Then
|
||||
Alert("Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico")
|
||||
End If
|
||||
Else
|
||||
Alert(String.Format("No se puede contabilizar ya que falta asignación de las cuentas contables"), TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
ObjContPaq.Dispose()
|
||||
End If
|
||||
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un Error al ingresar las prepolizas"
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkMandarCorreo" runat="server" Text="<i class='fa fa-plus'></i> Agregar Documento"></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkMandarCorreo" runat="server" Text="<i class='fa fa-envelope'></i> Enviar Correo"></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -58,7 +58,7 @@
|
||||
<textarea runat="server" id="TxtCorreo" class="form-control"></textarea>
|
||||
</div>
|
||||
<div class="col-md-1" style="width: 15%">
|
||||
<asp:LinkButton runat="server" ID="LbBuscar" >Buscar</asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="LbBuscar" Style="color: #23527c;">Buscar</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
@@ -76,25 +76,67 @@
|
||||
<asp:Label runat="server" ID="LblCircular">Circular:</asp:Label>
|
||||
</div>
|
||||
<div class="col-md-1" style="width: 70%">
|
||||
<textarea runat="server" id="TxtCircular" class="form-control" style="height:150px"></textarea>
|
||||
<%--<textarea runat="server" id="TxtCircular" class="form-control" style="height: 150px"></textarea>--%>
|
||||
<asp:TextBox ID="TxtCircular" ClientIDMode="Static" runat="server" MaxLength="5000" TextMode="MultiLine" Height="200px" Width="100%"></asp:TextBox>
|
||||
<ajax:HtmlEditorExtender
|
||||
ID="htmlEdDescripcion"
|
||||
TargetControlID="TxtCircular"
|
||||
DisplaySourceTab="True"
|
||||
EnableSanitization="false"
|
||||
runat="server">
|
||||
<Toolbar>
|
||||
<ajax:Undo />
|
||||
<ajax:Redo />
|
||||
<ajax:Bold />
|
||||
<ajax:Italic />
|
||||
<ajax:Underline />
|
||||
<ajax:StrikeThrough />
|
||||
<ajax:Subscript />
|
||||
<ajax:Superscript />
|
||||
<ajax:JustifyLeft />
|
||||
<ajax:JustifyCenter />
|
||||
<ajax:JustifyRight />
|
||||
<ajax:JustifyFull />
|
||||
<ajax:InsertOrderedList />
|
||||
<ajax:InsertUnorderedList />
|
||||
<ajax:CreateLink />
|
||||
<ajax:UnLink />
|
||||
<ajax:RemoveFormat />
|
||||
<ajax:SelectAll />
|
||||
<ajax:UnSelect />
|
||||
<ajax:Delete />
|
||||
<ajax:Cut />
|
||||
<ajax:Copy />
|
||||
<ajax:Paste />
|
||||
<ajax:BackgroundColorSelector />
|
||||
<ajax:ForeColorSelector />
|
||||
<ajax:FontNameSelector />
|
||||
<ajax:FontSizeSelector />
|
||||
<ajax:Indent />
|
||||
<ajax:Outdent />
|
||||
<ajax:InsertHorizontalRule />
|
||||
<ajax:HorizontalSeparator />
|
||||
<%--<ajax:InsertImage />--%>
|
||||
</Toolbar>
|
||||
</ajax:HtmlEditorExtender>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-1" style="width:30%">
|
||||
<div class="col-md-1" style="width: 30%">
|
||||
<asp:Label runat="server" ID="LblAdjunto">Adjuntar archivo:</asp:Label>
|
||||
</div>
|
||||
<div class="col-md-1" style="width:70%">
|
||||
<div class="col-md-1" style="width: 70%">
|
||||
<asp:TextBox ID="TxtFileDocumentacion" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div id="archivosDiv" runat="server" class="row" visible="false">
|
||||
<div class="col-md-1" style="width:30%">
|
||||
<div class="col-md-1" style="width: 30%">
|
||||
<asp:Label runat="server" ID="Label1">Archivo cargado:</asp:Label>
|
||||
</div>
|
||||
<div class="col-md-1" style="width:70%">
|
||||
<asp:HyperLink runat="server" ID="HkArchivo" ></asp:HyperLink>
|
||||
<div class="col-md-1" style="width: 70%">
|
||||
<asp:HyperLink runat="server" ID="HkArchivo" Style="color: #23527c;"></asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
@@ -58,11 +58,11 @@ Partial Class OI_CircularDetalle
|
||||
TxtAsunto.Text = Circular.Item("Asunto")
|
||||
TxtCorreo.Value = Circular.Item("CorreosInternos")
|
||||
TxtCorreoAdicional.Value = Circular.Item("CorreosExternos")
|
||||
TxtCircular.Value = Circular.Item("Circular")
|
||||
TxtCircular.Text = Circular.Item("Circular")
|
||||
|
||||
If Circular.Item("ArchivoAdjunto") <> "" Then
|
||||
archivosDiv.Visible = True
|
||||
HkArchivo.NavigateUrl = String.Format("{0}Empresas\{1}\Formatos\{2}", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa, Circular.Item("ArchivoAdjunto"))
|
||||
HkArchivo.NavigateUrl = $"~/Empresas/{UsuarioActual.CveEmpresa}/Formatos/{Circular.Item("ArchivoAdjunto")}"
|
||||
HkArchivo.Text = Circular.Item("ArchivoAdjunto")
|
||||
End If
|
||||
|
||||
@@ -86,7 +86,7 @@ Partial Class OI_CircularDetalle
|
||||
|
||||
Dim AdjuntoValidate As String = NombreArchivo().Split("-")(1)
|
||||
|
||||
If ObjOI.UpdateCircular(CveCircular, TxtAsunto.Text, TxtCircular.Value, TxtCorreo.Value, TxtCorreoAdicional.Value, AdjuntoValidate) Then
|
||||
If ObjOI.UpdateCircular(CveCircular, TxtAsunto.Text, TxtCircular.Text, TxtCorreo.Value, TxtCorreoAdicional.Value, AdjuntoValidate) Then
|
||||
GuardarArchivo(CveCircular)
|
||||
Alert("Actualizado correctamente")
|
||||
End If
|
||||
@@ -94,7 +94,7 @@ Partial Class OI_CircularDetalle
|
||||
Dim CorreoExtra As String = If(TxtCorreoAdicional.Value = "", "-1", TxtCorreoAdicional.Value)
|
||||
|
||||
Dim AdjuntoValidate As String = NombreArchivo().Split("-")(1)
|
||||
Dim CircularInsertado As Integer = ObjOI.AddCircular(TxtAsunto.Text, TxtCircular.Value, TxtCorreo.Value, Today.ToString, UsuarioActual.CveUsuario,
|
||||
Dim CircularInsertado As Integer = ObjOI.AddCircular(TxtAsunto.Text, TxtCircular.Text, TxtCorreo.Value, Today.ToString, UsuarioActual.CveUsuario,
|
||||
UsuarioActual.CveEmpresa, CorreoExtra, AdjuntoValidate)
|
||||
If CircularInsertado > 0 Then
|
||||
GuardarArchivo(CircularInsertado)
|
||||
@@ -223,10 +223,21 @@ Partial Class OI_CircularDetalle
|
||||
Protected Sub LnkMandarCorreo_Click() Handles LnkMandarCorreo.Click
|
||||
Dim correos() As String
|
||||
correos = TxtCorreo.Value.Split(Environment.NewLine)
|
||||
'MandaCorreo()
|
||||
Dim ArchivoBytes As Byte() = ArchivoBytesArrya(HkArchivo.Text)
|
||||
|
||||
Dim Contador As Integer = 0
|
||||
Try
|
||||
For Each Correo As String In correos
|
||||
MandaCorreo(TxtAsunto.Text, Correo, If(Contador > 0, "", TxtCorreoAdicional.Value), TxtCircular.Text, ArchivoBytes, HkArchivo.Text)
|
||||
Contador += 1
|
||||
Next
|
||||
Alert("El correo se envió correctamente")
|
||||
Catch ex As Exception
|
||||
Alert("Error al enviar correo", TipoMensaje.MsgError)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub MandaCorreo(Asunto As String, Para As String, ArrayCC As String, body As String, ArchivoBinario As Byte())
|
||||
Private Sub MandaCorreo(Asunto As String, Para As String, ArrayCC As String, body As String, ArchivoBinario As Byte(), NombreArchivo As String)
|
||||
|
||||
Dim a As String = String.Format("{0} -- {1} --- {2}", Asunto, Para, ArrayCC)
|
||||
a.GuardaLog()
|
||||
@@ -237,7 +248,7 @@ Partial Class OI_CircularDetalle
|
||||
|
||||
With itemMail
|
||||
itemMail.ArchivoBinario = ArchivoBinario
|
||||
itemMail.NombreArchivo = "Invitación.pdf"
|
||||
itemMail.NombreArchivo = NombreArchivo
|
||||
|
||||
End With
|
||||
|
||||
@@ -247,4 +258,19 @@ Partial Class OI_CircularDetalle
|
||||
Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, body, ArrayCC, LSRutasMail)
|
||||
Mail = Nothing
|
||||
End Sub
|
||||
|
||||
Private Function ArchivoBytesArrya(ArchivoNombre As String) As Byte()
|
||||
Dim ArchivoEnviar As String = String.Format("{0}Formatos\{1}", UsuarioActual.Empresa.Ruta, ArchivoNombre)
|
||||
If File.Exists(ArchivoEnviar) Then
|
||||
Dim fs As System.IO.FileStream = System.IO.File.Open(ArchivoEnviar, IO.FileMode.Open, IO.FileAccess.Read)
|
||||
Dim buff(fs.Length) As Byte
|
||||
If fs.Length > 0 Then
|
||||
fs.Read(buff, 0, fs.Length - 1)
|
||||
fs.Close()
|
||||
End If
|
||||
Return buff
|
||||
End If
|
||||
|
||||
Return New Byte() {}
|
||||
End Function
|
||||
End Class
|
||||
|
||||
@@ -863,7 +863,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
importeMX = gvr.FCTextBox("TxtAbonar").Text.ToDecimal * tipoCambioVentaValuacion
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
ImporteMovimiento = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
||||
importeMX = gvr.FCTextBox("TxtAbonar").Text.ToDecimal * tipoCambioVentaValuacion
|
||||
importeMX = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
ImporteMovimiento = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
||||
importeMX = ImporteMovimiento * tipoCambioVentaValuacion
|
||||
@@ -1467,6 +1467,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, Referencia, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=importeMX, CveCuenta:=CveCuenta, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
Exit For
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -1568,7 +1569,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
End If
|
||||
End If
|
||||
|
||||
If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 3) Then
|
||||
If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 3) Then
|
||||
If ObjMov.ValorPolizaDescuadre > 0 Then
|
||||
MsgError = ObjMov.MensajePolizaDescuadre + " La diferencia es de: " + ObjMov.ValorDiferencia
|
||||
End If
|
||||
|
||||
@@ -11787,7 +11787,10 @@ Partial Class Ventas
|
||||
If CveCliente > 0 Then
|
||||
|
||||
HdnIVACalculado.Value = "0"
|
||||
HdnFolioFiscalNC.Value = "0"
|
||||
'SI ES REFACTURACION NO LIMPIAR EL FOLIO FISCAL
|
||||
If NuevaFactura <> 1 Then
|
||||
HdnFolioFiscalNC.Value = "0"
|
||||
End If
|
||||
LblAntAplicados.Text = ""
|
||||
LblAntAplicados.Visible = False
|
||||
LblAmortizacion.Text = "0.00"
|
||||
@@ -15078,7 +15081,7 @@ Partial Class Ventas
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
End Sub
|
||||
Private Function GenerarPolizaAC(ObjAC As ClsContPAQi, factura As Modelos.Factura, Optional CancelacionIngreso As Boolean = False) As RetornoPolizaConta
|
||||
Private Function GenerarPolizaAC(ObjAC As ClsContPAQi, factura As Modelos.Factura, Optional CancelacionIngreso As Boolean = False) As Modelos.RetornoPolizaConta
|
||||
Dim Retorno As New Modelos.RetornoPolizaConta
|
||||
Dim IDPoliza As Integer = 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user