parametro de empresas agregado al reporte de anomalias
This commit is contained in:
@@ -2675,6 +2675,7 @@ Public Class ClsInventarios
|
|||||||
DataAdapter("PA_Inv_InventarioFisicoResultadoAvance")
|
DataAdapter("PA_Inv_InventarioFisicoResultadoAvance")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveInventarioFisico", SqlDbType.Int).Value = CveInventarioFisico
|
.Add("@CveInventarioFisico", SqlDbType.Int).Value = CveInventarioFisico
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
|
|||||||
@@ -4847,7 +4847,7 @@ Public Class ClsPaginas
|
|||||||
PaginaDict.Add("/RH/RepVacaciones.aspx".ToUpper(), 422)
|
PaginaDict.Add("/RH/RepVacaciones.aspx".ToUpper(), 422)
|
||||||
PaginaDict.Add("/RH/CatChecadorTipo.aspx".ToUpper(), 427)
|
PaginaDict.Add("/RH/CatChecadorTipo.aspx".ToUpper(), 427)
|
||||||
PaginaDict.Add("/RH/CatChecadorHorarios.aspx".ToUpper(), 428)
|
PaginaDict.Add("/RH/CatChecadorHorarios.aspx".ToUpper(), 428)
|
||||||
PaginaDict.Add("/RH/CatChecadorEstaciones.aspx".ToUpper(), 627)
|
|
||||||
PaginaDict.Add("/RH/RepChecadorPreAsistencia.aspx".ToUpper(), 628)
|
PaginaDict.Add("/RH/RepChecadorPreAsistencia.aspx".ToUpper(), 628)
|
||||||
PaginaDict.Add("/RH/CatCaptaciones.aspx".ToUpper(), 629)
|
PaginaDict.Add("/RH/CatCaptaciones.aspx".ToUpper(), 629)
|
||||||
PaginaDict.Add("/RH/RepUniformes.aspx".ToUpper(), 630)
|
PaginaDict.Add("/RH/RepUniformes.aspx".ToUpper(), 630)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ Imports System.Data
|
|||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
Imports System.Xml
|
Imports System.Xml
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports iTextSharp.text
|
Imports iTextSharp.text
|
||||||
Imports iTextSharp.text.pdf
|
Imports iTextSharp.text.pdf
|
||||||
|
|
||||||
Imports Stimulsoft.Report
|
Imports Stimulsoft.Report
|
||||||
@@ -17,8 +17,8 @@ Imports Stimulsoft.Report.Web
|
|||||||
Partial Class PopUpVerFactura
|
Partial Class PopUpVerFactura
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|
||||||
Private Shared missing As Object = System.Reflection.Missing.Value
|
Private Shared missing As Object = System.Reflection.Missing.Value
|
||||||
|
|
||||||
#Region " PROPIEDADES "
|
#Region " PROPIEDADES "
|
||||||
Public Property DtMovimientos() As DataTable
|
Public Property DtMovimientos() As DataTable
|
||||||
Get
|
Get
|
||||||
@@ -85,18 +85,18 @@ Partial Class PopUpVerFactura
|
|||||||
End If
|
End If
|
||||||
Return ""
|
Return ""
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
'Private Property SessionPorImpresion As Boolean
|
'Private Property SessionPorImpresion As Boolean
|
||||||
' Get
|
' Get
|
||||||
' Return CBool(IfNull(ViewState("SessionPorImpresion"), False, ViewState("SessionPorImpresion")))
|
' Return CBool(IfNull(ViewState("SessionPorImpresion"), False, ViewState("SessionPorImpresion")))
|
||||||
' End Get
|
' End Get
|
||||||
' Set(value As Boolean)
|
' Set(value As Boolean)
|
||||||
' ViewState("SessionPorImpresion") = value
|
' ViewState("SessionPorImpresion") = value
|
||||||
' End Set
|
' End Set
|
||||||
'End Property
|
'End Property
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
'CREA EL OBJECTO USUARIO A PARTIR DEL TOKEN
|
'CREA EL OBJECTO USUARIO A PARTIR DEL TOKEN
|
||||||
@@ -201,10 +201,10 @@ Partial Class PopUpVerFactura
|
|||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region "U S U A R I O - T O K E N"
|
#Region "U S U A R I O - T O K E N"
|
||||||
|
|
||||||
Private Function ValidaUsuarioSistema(CveEmpresa As Integer, Optional CveUsuario As Integer = 100) As Usuario
|
Private Function ValidaUsuarioSistema(CveEmpresa As Integer, Optional CveUsuario As Integer = 100) As Usuario
|
||||||
|
|
||||||
Dim UsuarioToken As Usuario = Nothing
|
Dim UsuarioToken As Usuario = Nothing
|
||||||
@@ -238,9 +238,9 @@ Partial Class PopUpVerFactura
|
|||||||
UsuarioToken.Empresa = ObjEmpresa.Empresa
|
UsuarioToken.Empresa = ObjEmpresa.Empresa
|
||||||
End If
|
End If
|
||||||
ObjEmpresa.Dispose()
|
ObjEmpresa.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Private Sub SeleccionaReporte(UrlParametros As Hashtable)
|
Private Sub SeleccionaReporte(UrlParametros As Hashtable)
|
||||||
|
|
||||||
'DESCARGA COMPROBANTE
|
'DESCARGA COMPROBANTE
|
||||||
@@ -501,10 +501,10 @@ Partial Class PopUpVerFactura
|
|||||||
URLParametros.Add(P2(0).ToString.ToUpper, P2(1))
|
URLParametros.Add(P2(0).ToString.ToUpper, P2(1))
|
||||||
Next
|
Next
|
||||||
Return URLParametros
|
Return URLParametros
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
#Region "OP = CORT - IMPRIMIR CORTE"
|
#Region "OP = CORT - IMPRIMIR CORTE"
|
||||||
|
|
||||||
Private Sub ImprimeCorte(CveCorte As Integer, Formato As String)
|
Private Sub ImprimeCorte(CveCorte As Integer, Formato As String)
|
||||||
Dim ObjVenta As New ClsVentas
|
Dim ObjVenta As New ClsVentas
|
||||||
Dim ObjPuntoVenta As New ClsPuntoVenta
|
Dim ObjPuntoVenta As New ClsPuntoVenta
|
||||||
@@ -549,10 +549,10 @@ Partial Class PopUpVerFactura
|
|||||||
ImprimirPDF("Empresas/Grales/Formatos/RepCortes.rdlc", lrds, params, "ReporteCortes", Formato)
|
ImprimirPDF("Empresas/Grales/Formatos/RepCortes.rdlc", lrds, params, "ReporteCortes", Formato)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " OP = FACTURA - IMPRIME COMPRA"
|
#Region " OP = FACTURA - IMPRIME COMPRA"
|
||||||
Private Sub DescargaComprobante(Parametros As Hashtable)
|
Private Sub DescargaComprobante(Parametros As Hashtable)
|
||||||
If Parametros("COMPROBANTE") IsNot Nothing Then
|
If Parametros("COMPROBANTE") IsNot Nothing Then
|
||||||
@@ -591,9 +591,9 @@ Partial Class PopUpVerFactura
|
|||||||
End If
|
End If
|
||||||
Archivo = Nothing
|
Archivo = Nothing
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "OP DesXmlVIA- DESCARGAR XML DE VIATICOS"
|
#Region "OP DesXmlVIA- DESCARGAR XML DE VIATICOS"
|
||||||
Private Sub DescargaXMLViaticos(Parametros As Hashtable)
|
Private Sub DescargaXMLViaticos(Parametros As Hashtable)
|
||||||
If Parametros("SERIEFOLIO") IsNot Nothing AndAlso Parametros("SERIEFOLIO").ToString <> "" Then
|
If Parametros("SERIEFOLIO") IsNot Nothing AndAlso Parametros("SERIEFOLIO").ToString <> "" Then
|
||||||
@@ -613,10 +613,10 @@ Partial Class PopUpVerFactura
|
|||||||
End If
|
End If
|
||||||
Archivo = Nothing
|
Archivo = Nothing
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "OP DesXmlNom- DESCARGAR XML DE UTILIDADES"
|
#Region "OP DesXmlNom- DESCARGAR XML DE UTILIDADES"
|
||||||
Private Sub DescargaXMLUtilidades(Parametros As Hashtable)
|
Private Sub DescargaXMLUtilidades(Parametros As Hashtable)
|
||||||
If Parametros("SERIEFOLIO") IsNot Nothing AndAlso Parametros("SERIEFOLIO").ToString <> "" Then
|
If Parametros("SERIEFOLIO") IsNot Nothing AndAlso Parametros("SERIEFOLIO").ToString <> "" Then
|
||||||
@@ -636,9 +636,9 @@ Partial Class PopUpVerFactura
|
|||||||
End If
|
End If
|
||||||
Archivo = Nothing
|
Archivo = Nothing
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "OP = 'CONG' - IMPRIME GASTO DE CONTRATO"
|
#Region "OP = 'CONG' - IMPRIME GASTO DE CONTRATO"
|
||||||
Private Sub ImprimeGastoContrato(CveContrato As Integer, CveContratoGasto As Integer)
|
Private Sub ImprimeGastoContrato(CveContrato As Integer, CveContratoGasto As Integer)
|
||||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||||
@@ -680,10 +680,10 @@ Partial Class PopUpVerFactura
|
|||||||
params.Add(New ReportParameter("LogoPath", ""))
|
params.Add(New ReportParameter("LogoPath", ""))
|
||||||
End If
|
End If
|
||||||
ImprimirPDF("Empresas/Grales/Formatos/ContratoGasto.rdlc", dt, params, $"{Nombre}-Gastos", Formato:="PDF")
|
ImprimirPDF("Empresas/Grales/Formatos/ContratoGasto.rdlc", dt, params, $"{Nombre}-Gastos", Formato:="PDF")
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
#Region "OP = 'CIC' - IMPRIME FORMATO CICOVISA"
|
#Region "OP = 'CIC' - IMPRIME FORMATO CICOVISA"
|
||||||
Private Sub ImprimeFormatoCICOVISA(CveVenta As Integer)
|
Private Sub ImprimeFormatoCICOVISA(CveVenta As Integer)
|
||||||
If CveVenta > 0 Then
|
If CveVenta > 0 Then
|
||||||
@@ -720,10 +720,10 @@ Partial Class PopUpVerFactura
|
|||||||
ImprimirPDF("Empresas/Grales/Formatos/Cicovisa.rdlc", Dt, params, String.Format("Formato Cicovisa -{0}", Now.ToDateTime.ToShortDateString))
|
ImprimirPDF("Empresas/Grales/Formatos/Cicovisa.rdlc", Dt, params, String.Format("Formato Cicovisa -{0}", Now.ToDateTime.ToShortDateString))
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "OP = 'CARPO' - IMPRIME FORMATO CARTA PORTE"
|
#Region "OP = 'CARPO' - IMPRIME FORMATO CARTA PORTE"
|
||||||
Private Sub ImprimeFormatoCartaPorte(CveMovimiento As Integer)
|
Private Sub ImprimeFormatoCartaPorte(CveMovimiento As Integer)
|
||||||
If CveMovimiento > 0 Then
|
If CveMovimiento > 0 Then
|
||||||
@@ -848,12 +848,12 @@ Partial Class PopUpVerFactura
|
|||||||
ImprimirPDF("Empresas/Grales/Formatos/CartaPorte.rdlc", Dt, params, String.Format("Carta Porte -{0}", Now.ToDateTime.ToShortDateString))
|
ImprimirPDF("Empresas/Grales/Formatos/CartaPorte.rdlc", Dt, params, String.Format("Carta Porte -{0}", Now.ToDateTime.ToShortDateString))
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "OP = 'DesXmlTra' - IMPRIME XML TRASLADO"
|
#Region "OP = 'DesXmlTra' - IMPRIME XML TRASLADO"
|
||||||
|
|
||||||
Private Sub DescargaXMLTraslado(Parametros As Hashtable)
|
Private Sub DescargaXMLTraslado(Parametros As Hashtable)
|
||||||
If Parametros("CVEMOVIMIENTO") IsNot Nothing AndAlso Parametros("CVEMOVIMIENTO").ToString.ToEntero > 0 Then
|
If Parametros("CVEMOVIMIENTO") IsNot Nothing AndAlso Parametros("CVEMOVIMIENTO").ToString.ToEntero > 0 Then
|
||||||
Dim Exten As String = If(Parametros("EXT").ToString.ToLower = "xml", "xml", "pdf")
|
Dim Exten As String = If(Parametros("EXT").ToString.ToLower = "xml", "xml", "pdf")
|
||||||
@@ -872,12 +872,12 @@ Partial Class PopUpVerFactura
|
|||||||
End If
|
End If
|
||||||
Archivo = Nothing
|
Archivo = Nothing
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "OP = 'DesPdfTra' - IMPRIME PDF TRASLADO"
|
#Region "OP = 'DesPdfTra' - IMPRIME PDF TRASLADO"
|
||||||
|
|
||||||
Private Sub DescargaPDFTraslado(Parametros As Hashtable)
|
Private Sub DescargaPDFTraslado(Parametros As Hashtable)
|
||||||
If Parametros("CVEMOVIMIENTO") IsNot Nothing AndAlso Parametros("CVEMOVIMIENTO").ToString.ToEntero > 0 Then
|
If Parametros("CVEMOVIMIENTO") IsNot Nothing AndAlso Parametros("CVEMOVIMIENTO").ToString.ToEntero > 0 Then
|
||||||
Dim Exten As String = If(Parametros("EXT").ToString.ToLower = "xml", "xml", "pdf")
|
Dim Exten As String = If(Parametros("EXT").ToString.ToLower = "xml", "xml", "pdf")
|
||||||
@@ -896,10 +896,10 @@ Partial Class PopUpVerFactura
|
|||||||
End If
|
End If
|
||||||
Archivo = Nothing
|
Archivo = Nothing
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " OP = 'Vta,Fact' - IMPRIME PDF VENTAS"
|
#Region " OP = 'Vta,Fact' - IMPRIME PDF VENTAS"
|
||||||
Private Sub DescargaFacturaVenta(Parametros As Hashtable)
|
Private Sub DescargaFacturaVenta(Parametros As Hashtable)
|
||||||
If Parametros("CVEVENTA") IsNot Nothing AndAlso Parametros("CVEVENTA").ToString.ToEntero > 0 Then
|
If Parametros("CVEVENTA") IsNot Nothing AndAlso Parametros("CVEVENTA").ToString.ToEntero > 0 Then
|
||||||
@@ -1209,11 +1209,11 @@ Partial Class PopUpVerFactura
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " - OP = 'Alm' - REPORTE ENTRADAS ALMACEN "
|
#Region " - OP = 'Alm' - REPORTE ENTRADAS ALMACEN "
|
||||||
|
|
||||||
Private Sub CargaMovimientosAlmacen(CveMovimiento As Integer)
|
Private Sub CargaMovimientosAlmacen(CveMovimiento As Integer)
|
||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
|
|
||||||
@@ -1284,8 +1284,8 @@ Partial Class PopUpVerFactura
|
|||||||
|
|
||||||
Dim CveMovimientoRelacionado As Integer = -1
|
Dim CveMovimientoRelacionado As Integer = -1
|
||||||
Dim FolioRelacionado As String = ""
|
Dim FolioRelacionado As String = ""
|
||||||
Dim CveConceptoMovtoRelacionado As Integer = -1
|
Dim CveConceptoMovtoRelacionado As Integer = -1
|
||||||
|
|
||||||
Dim CveTipoAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {CveAlmacen}").ToString.ToEntero
|
Dim CveTipoAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {CveAlmacen}").ToString.ToEntero
|
||||||
|
|
||||||
'VERIFICA SI TIENE MOVIMIENTO VIRTUAL RELACIONADO
|
'VERIFICA SI TIENE MOVIMIENTO VIRTUAL RELACIONADO
|
||||||
@@ -1296,7 +1296,7 @@ Partial Class PopUpVerFactura
|
|||||||
CveConceptoMovtoRelacionado = 37
|
CveConceptoMovtoRelacionado = 37
|
||||||
ElseIf CveConcepto.Contiene(36, 37) Then
|
ElseIf CveConcepto.Contiene(36, 37) Then
|
||||||
FolioRelacionado = ObjInventarios.DtResultados.FiltroPrimeroValor("FolioRelacionado")
|
FolioRelacionado = ObjInventarios.DtResultados.FiltroPrimeroValor("FolioRelacionado")
|
||||||
CveConceptoMovtoRelacionado = 3
|
CveConceptoMovtoRelacionado = 3
|
||||||
ElseIf CveConcepto.Contiene(2) AndAlso CveTipoAlmacen.Contiene(24, 25) Then
|
ElseIf CveConcepto.Contiene(2) AndAlso CveTipoAlmacen.Contiene(24, 25) Then
|
||||||
FolioRelacionado = ObjInventarios.DtResultados.FiltroPrimeroValor("FolioRelacionado")
|
FolioRelacionado = ObjInventarios.DtResultados.FiltroPrimeroValor("FolioRelacionado")
|
||||||
CveConceptoMovtoRelacionado = 3
|
CveConceptoMovtoRelacionado = 3
|
||||||
@@ -1308,10 +1308,10 @@ Partial Class PopUpVerFactura
|
|||||||
Dim CantidadProductos As Decimal = 0
|
Dim CantidadProductos As Decimal = 0
|
||||||
Dim CantidadUsados As Decimal = 0
|
Dim CantidadUsados As Decimal = 0
|
||||||
|
|
||||||
If CveConcepto = 3 Or CveConcepto = 18 Or CveConcepto = 30 Or CveConcepto = 34 Or CveConcepto = 35 Or CveConcepto = 16 Or CveConcepto = 7 Then 'SALIDA Y DEVOLUCION DEL CLIENTE
|
If CveConcepto = 3 Or CveConcepto = 18 Or CveConcepto = 30 Or CveConcepto = 34 Or CveConcepto = 35 Or CveConcepto = 16 Or CveConcepto = 7 Or CveConcepto = 40 Then 'SALIDA Y DEVOLUCION DEL CLIENTE
|
||||||
If ObjInventarios.GetMovimientosDetalleImpresion(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
If ObjInventarios.GetMovimientosDetalleImpresion(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||||
DtMovimientos = ObjInventarios.DtResultados
|
DtMovimientos = ObjInventarios.DtResultados
|
||||||
|
Alert("asdf")
|
||||||
DtMovimientos.Columns("No").AutoIncrement = True
|
DtMovimientos.Columns("No").AutoIncrement = True
|
||||||
DtMovimientos.Columns("No").AutoIncrementSeed = DtMovimientos.Rows.Count + 1
|
DtMovimientos.Columns("No").AutoIncrementSeed = DtMovimientos.Rows.Count + 1
|
||||||
DtMovimientos.Columns("No").AutoIncrementStep = 1
|
DtMovimientos.Columns("No").AutoIncrementStep = 1
|
||||||
@@ -1355,27 +1355,27 @@ Partial Class PopUpVerFactura
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 140 AndAlso CveCompra > 0 Then
|
If UsuarioActual.CveEmpresa = 140 AndAlso CveCompra > 0 Then
|
||||||
If ObjInventarios.RecepcionAlmacenGet(CveCompra, -1, UsuarioActual.CveEmpresa) AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then
|
If ObjInventarios.RecepcionAlmacenGet(CveCompra, -1, UsuarioActual.CveEmpresa) AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then
|
||||||
Dim DtFaltante As DataTable = ObjInventarios.DtResultados.FiltraParametros("CantidadF > 0")
|
Dim DtFaltante As DataTable = ObjInventarios.DtResultados.FiltraParametros("CantidadF > 0")
|
||||||
If DtFaltante.Rows.Count > 0 Then
|
If DtFaltante.Rows.Count > 0 Then
|
||||||
Dim SbPendientes As New StringBuilder
|
Dim SbPendientes As New StringBuilder
|
||||||
SbPendientes.AppendFormat("Los siguientes productos quedaron pendientes por recibir:")
|
SbPendientes.AppendFormat("Los siguientes productos quedaron pendientes por recibir:")
|
||||||
For Each Row As DataRow In DtFaltante.Rows
|
For Each Row As DataRow In DtFaltante.Rows
|
||||||
SbPendientes.AppendFormat(" PS:{0} Cant.:{1:N0},", Row("CodigoPS"), Row("CantidadF"))
|
SbPendientes.AppendFormat(" PS:{0} Cant.:{1:N0},", Row("CodigoPS"), Row("CantidadF"))
|
||||||
Next
|
Next
|
||||||
SbPendientes.Remove(SbPendientes.Length - 1, 1)
|
SbPendientes.Remove(SbPendientes.Length - 1, 1)
|
||||||
|
|
||||||
SbPendientes.AppendFormat(" Total Cant.:{0:N0}, Total Costo:{1:N2}", DtFaltante.SUM("CantidadF"), DtFaltante.SUM("Total"))
|
SbPendientes.AppendFormat(" Total Cant.:{0:N0}, Total Costo:{1:N2}", DtFaltante.SUM("CantidadF"), DtFaltante.SUM("Total"))
|
||||||
|
|
||||||
If Not String.IsNullOrEmpty(Observaciones) Then
|
If Not String.IsNullOrEmpty(Observaciones) Then
|
||||||
Observaciones = SbPendientes.ToString() + ".<br/>" + Observaciones
|
Observaciones = SbPendientes.ToString() + ".<br/>" + Observaciones
|
||||||
Else
|
Else
|
||||||
Observaciones = SbPendientes.ToString()
|
Observaciones = SbPendientes.ToString()
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
DtFaltante.Dispose()
|
DtFaltante.Dispose()
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CveTipoAlmacen = 20 Then
|
If CveTipoAlmacen = 20 Then
|
||||||
@@ -1535,38 +1535,38 @@ Partial Class PopUpVerFactura
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Entradas.rdlc", DtMovimientos, params, String.Format("Entrada de Almacen - {0}", Folio), RDSName:="DsInventarios")
|
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Entradas.rdlc", DtMovimientos, params, String.Format("Entrada de Almacen - {0}", Folio), RDSName:="DsInventarios")
|
||||||
ElseIf UsuarioActual.CveEmpresa = 140 Then
|
ElseIf UsuarioActual.CveEmpresa = 140 Then
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
If Imagen.Exists Then
|
If Imagen.Exists Then
|
||||||
params.Add(New ReportParameter("LogoPath", logouri))
|
params.Add(New ReportParameter("LogoPath", logouri))
|
||||||
Else
|
Else
|
||||||
params.Add(New ReportParameter("LogoPath", ""))
|
params.Add(New ReportParameter("LogoPath", ""))
|
||||||
End If
|
End If
|
||||||
Dim concepto As String = ""
|
Dim concepto As String = ""
|
||||||
If CveConcepto.Contiene(2, 32, 33) Then
|
If CveConcepto.Contiene(2, 32, 33) Then
|
||||||
concepto = "ENTRADA DE ALMACÉN"
|
concepto = "ENTRADA DE ALMACÉN"
|
||||||
ElseIf CveConcepto.Contiene(36) Then
|
ElseIf CveConcepto.Contiene(36) Then
|
||||||
concepto = "ENTRADA VIRTUAL"
|
concepto = "ENTRADA VIRTUAL"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||||
params.Add(New ReportParameter("Concepto", concepto))
|
params.Add(New ReportParameter("Concepto", concepto))
|
||||||
params.Add(New ReportParameter("Almacen", Almacen))
|
params.Add(New ReportParameter("Almacen", Almacen))
|
||||||
params.Add(New ReportParameter("Fecha", Fecha))
|
params.Add(New ReportParameter("Fecha", Fecha))
|
||||||
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
|
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
|
||||||
params.Add(New ReportParameter("Folio", Folio))
|
params.Add(New ReportParameter("Folio", Folio))
|
||||||
params.Add(New ReportParameter("FacturadoA", NombreCliente))
|
params.Add(New ReportParameter("FacturadoA", NombreCliente))
|
||||||
params.Add(New ReportParameter("FacturaProveedor", If(CveCompra > 0 AndAlso dr IsNot Nothing, dr("SerieFolio").ToString, "")))
|
params.Add(New ReportParameter("FacturaProveedor", If(CveCompra > 0 AndAlso dr IsNot Nothing, dr("SerieFolio").ToString, "")))
|
||||||
params.Add(New ReportParameter("Descuentos", If(CveCompra > 0 AndAlso dr IsNot Nothing, (dr("Descuentos").ToString.ToDouble).FormatoNumero(2), "")))
|
params.Add(New ReportParameter("Descuentos", If(CveCompra > 0 AndAlso dr IsNot Nothing, (dr("Descuentos").ToString.ToDouble).FormatoNumero(2), "")))
|
||||||
params.Add(New ReportParameter("IVA", If(CveCompra > 0 AndAlso dr IsNot Nothing, dr("IVA").ToString.FormatoNumero(2), "")))
|
params.Add(New ReportParameter("IVA", If(CveCompra > 0 AndAlso dr IsNot Nothing, dr("IVA").ToString.FormatoNumero(2), "")))
|
||||||
params.Add(New ReportParameter("Total", If(CveCompra > 0 AndAlso dr IsNot Nothing, dr("Total").ToString.FormatoNumero(2), "")))
|
params.Add(New ReportParameter("Total", If(CveCompra > 0 AndAlso dr IsNot Nothing, dr("Total").ToString.FormatoNumero(2), "")))
|
||||||
'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
|
'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
|
||||||
params.Add(New ReportParameter("Observaciones", Observaciones))
|
params.Add(New ReportParameter("Observaciones", Observaciones))
|
||||||
params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
|
params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
|
||||||
params.Add(New ReportParameter("CveConceptoMovRelacionado", CveConceptoMovRelacionado.ToString()))
|
params.Add(New ReportParameter("CveConceptoMovRelacionado", CveConceptoMovRelacionado.ToString()))
|
||||||
params.Add(New ReportParameter("FolioRelacionado", FolioRelacionado))
|
params.Add(New ReportParameter("FolioRelacionado", FolioRelacionado))
|
||||||
|
|
||||||
ImprimirPDF(String.Format("{0}Formatos/Entradas.rdlc", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Entrada de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
|
ImprimirPDF(String.Format("{0}Formatos/Entradas.rdlc", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Entrada de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||||
Else
|
Else
|
||||||
|
|
||||||
params.Add(New ReportParameter("TipoDocumento", String.Format("Compras {0}", Almacen)))
|
params.Add(New ReportParameter("TipoDocumento", String.Format("Compras {0}", Almacen)))
|
||||||
@@ -1616,6 +1616,7 @@ Partial Class PopUpVerFactura
|
|||||||
params.Add(New ReportParameter("Descuentos", If(CveCompra > 0 AndAlso dr IsNot Nothing, (dr("Descuentos").ToString.ToDouble).FormatoNumero(2), "")))
|
params.Add(New ReportParameter("Descuentos", If(CveCompra > 0 AndAlso dr IsNot Nothing, (dr("Descuentos").ToString.ToDouble).FormatoNumero(2), "")))
|
||||||
params.Add(New ReportParameter("IVA", If(CveCompra > 0 AndAlso dr IsNot Nothing, dr("IVA").ToString.FormatoNumero(2), "")))
|
params.Add(New ReportParameter("IVA", If(CveCompra > 0 AndAlso dr IsNot Nothing, dr("IVA").ToString.FormatoNumero(2), "")))
|
||||||
params.Add(New ReportParameter("Total", If(CveCompra > 0 AndAlso dr IsNot Nothing, dr("Total").ToString.FormatoNumero(2), "")))
|
params.Add(New ReportParameter("Total", If(CveCompra > 0 AndAlso dr IsNot Nothing, dr("Total").ToString.FormatoNumero(2), "")))
|
||||||
|
params.Add(New ReportParameter("Observaciones", Observaciones))
|
||||||
'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
|
'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
|
||||||
params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
|
params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
|
||||||
If (UsuarioActual.CveEmpresa = 72) Then
|
If (UsuarioActual.CveEmpresa = 72) Then
|
||||||
@@ -1624,7 +1625,7 @@ Partial Class PopUpVerFactura
|
|||||||
ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Entrada de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
|
ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Entrada de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Case 3, 16, 37 ' S A L I D A S
|
Case 3, 16, 37, 40 ' S A L I D A S
|
||||||
'Dim Archivo As New System.IO.FileInfo(String.Format("Empresas/{0}/Formatos/Salidas.rdlc", 72))
|
'Dim Archivo As New System.IO.FileInfo(String.Format("Empresas/{0}/Formatos/Salidas.rdlc", 72))
|
||||||
'Dim Imagen As New System.IO.FileInfo(String.Format("Empresas/{0}/Logo.png", 72))
|
'Dim Imagen As New System.IO.FileInfo(String.Format("Empresas/{0}/Logo.png", 72))
|
||||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/Salidas.rdlc", UsuarioActual.Empresa.Ruta))
|
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/Salidas.rdlc", UsuarioActual.Empresa.Ruta))
|
||||||
@@ -1632,7 +1633,7 @@ Partial Class PopUpVerFactura
|
|||||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
Dim concepto As String = ""
|
Dim concepto As String = ""
|
||||||
If CveConcepto = 3 Then
|
If CveConcepto.Contiene(3, 40) Then
|
||||||
concepto = "SALIDA DE ALMACÉN"
|
concepto = "SALIDA DE ALMACÉN"
|
||||||
ElseIf CveConcepto = 37 Then
|
ElseIf CveConcepto = 37 Then
|
||||||
concepto = "SALIDA VIRTUAL"
|
concepto = "SALIDA VIRTUAL"
|
||||||
@@ -1797,7 +1798,7 @@ Partial Class PopUpVerFactura
|
|||||||
params.Add(New ReportParameter("NombreRecibio", Recibio))
|
params.Add(New ReportParameter("NombreRecibio", Recibio))
|
||||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||||
params.Add(New ReportParameter("CveConceptoMovRelacionado", CveConceptoMovRelacionado.ToString()))
|
params.Add(New ReportParameter("CveConceptoMovRelacionado", CveConceptoMovRelacionado.ToString()))
|
||||||
params.Add(New ReportParameter("FolioRelacionado", FolioRelacionado))
|
params.Add(New ReportParameter("FolioRelacionado", FolioRelacionado))
|
||||||
params.Add(New ReportParameter("UsuarioRegistro", UsuarioRegistro))
|
params.Add(New ReportParameter("UsuarioRegistro", UsuarioRegistro))
|
||||||
|
|
||||||
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Salidas.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
|
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Salidas.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||||
@@ -2323,7 +2324,7 @@ Partial Class PopUpVerFactura
|
|||||||
|
|
||||||
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
|
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
|
||||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||||
params.Add(New ReportParameter("CveConceptoMovRelacionado", CveConceptoMovRelacionado.ToString()))
|
params.Add(New ReportParameter("CveConceptoMovRelacionado", CveConceptoMovRelacionado.ToString()))
|
||||||
params.Add(New ReportParameter("FolioRelacionado", FolioRelacionado))
|
params.Add(New ReportParameter("FolioRelacionado", FolioRelacionado))
|
||||||
End If
|
End If
|
||||||
@@ -3327,10 +3328,10 @@ Partial Class PopUpVerFactura
|
|||||||
ImprimirbytesPDF(reporte, $"OrdenCompra-{Folio.ToString}")
|
ImprimirbytesPDF(reporte, $"OrdenCompra-{Folio.ToString}")
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "OP = 'VAL' - IMPRIME PDF VAL"
|
#Region "OP = 'VAL' - IMPRIME PDF VAL"
|
||||||
Private Sub GenerarPDFVale(CveVale As Integer)
|
Private Sub GenerarPDFVale(CveVale As Integer)
|
||||||
|
|
||||||
@@ -3360,9 +3361,9 @@ Partial Class PopUpVerFactura
|
|||||||
'End If
|
'End If
|
||||||
End If
|
End If
|
||||||
ObjAF.Dispose()
|
ObjAF.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "OP = 'OS' - IMPRIMIR PDF OS"
|
#Region "OP = 'OS' - IMPRIMIR PDF OS"
|
||||||
Private Sub GenerarPDFOS(CveOS As Integer)
|
Private Sub GenerarPDFOS(CveOS As Integer)
|
||||||
Dim ObjOS As New ClsOS()
|
Dim ObjOS As New ClsOS()
|
||||||
@@ -3481,9 +3482,9 @@ Partial Class PopUpVerFactura
|
|||||||
TmpDTMaterialesOS.Columns.Add("Clasificacion", GetType(String))
|
TmpDTMaterialesOS.Columns.Add("Clasificacion", GetType(String))
|
||||||
TmpDTMaterialesOS.Columns.Add("PS", GetType(String))
|
TmpDTMaterialesOS.Columns.Add("PS", GetType(String))
|
||||||
TmpDTMaterialesOS.Columns.Add("UM", GetType(String))
|
TmpDTMaterialesOS.Columns.Add("UM", GetType(String))
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "OP = 'OI' - Crear Archivo "
|
#Region "OP = 'OI' - Crear Archivo "
|
||||||
Private Sub CrearArchivo(Archivo As String)
|
Private Sub CrearArchivo(Archivo As String)
|
||||||
Dim ObjEventos As New ClsOIEventos
|
Dim ObjEventos As New ClsOIEventos
|
||||||
@@ -3492,11 +3493,11 @@ Partial Class PopUpVerFactura
|
|||||||
Dim file As System.IO.FileInfo = New System.IO.FileInfo(path) '-- if the file exists on the server
|
Dim file As System.IO.FileInfo = New System.IO.FileInfo(path) '-- if the file exists on the server
|
||||||
|
|
||||||
DescargarArchivo(file)
|
DescargarArchivo(file)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "OP = 'Contratos' - Crear Archivo "
|
#Region "OP = 'Contratos' - Crear Archivo "
|
||||||
Private Sub CrearArchivoContratos(Archivo As String)
|
Private Sub CrearArchivoContratos(Archivo As String)
|
||||||
|
|
||||||
@@ -3504,11 +3505,11 @@ Partial Class PopUpVerFactura
|
|||||||
Dim file As System.IO.FileInfo = New System.IO.FileInfo(Archivo) '-- if the file exists on the server
|
Dim file As System.IO.FileInfo = New System.IO.FileInfo(Archivo) '-- if the file exists on the server
|
||||||
|
|
||||||
DescargarArchivo(file)
|
DescargarArchivo(file)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "OP = 'OI' - Descargar Archivo "
|
#Region "OP = 'OI' - Descargar Archivo "
|
||||||
Private Sub DescargarArchivo(File As System.IO.FileInfo)
|
Private Sub DescargarArchivo(File As System.IO.FileInfo)
|
||||||
If File.Exists Then 'set appropriate headers
|
If File.Exists Then 'set appropriate headers
|
||||||
@@ -3538,11 +3539,11 @@ Partial Class PopUpVerFactura
|
|||||||
Alert("Ocurrio un error al descargar el archivo", TipoMensaje.MsgAdvertencia, "window.close()")
|
Alert("Ocurrio un error al descargar el archivo", TipoMensaje.MsgAdvertencia, "window.close()")
|
||||||
|
|
||||||
End If 'nothing in the URL as HTTP GET
|
End If 'nothing in the URL as HTTP GET
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "OP = 'AFR' - AF"
|
#Region "OP = 'AFR' - AF"
|
||||||
|
|
||||||
Private Sub ImprimirPDFAFR(CveAFR As Integer, Tipo As Integer)
|
Private Sub ImprimirPDFAFR(CveAFR As Integer, Tipo As Integer)
|
||||||
Dim ObjAF As New ClsAF
|
Dim ObjAF As New ClsAF
|
||||||
'Dim ObjSubProyecto As New ClsSubProyectos
|
'Dim ObjSubProyecto As New ClsSubProyectos
|
||||||
@@ -3646,7 +3647,7 @@ Partial Class PopUpVerFactura
|
|||||||
params.Add(New ReportParameter("RFC", dr("RFC").ToString))
|
params.Add(New ReportParameter("RFC", dr("RFC").ToString))
|
||||||
params.Add(New ReportParameter("Puesto", dr("Puesto").ToString))
|
params.Add(New ReportParameter("Puesto", dr("Puesto").ToString))
|
||||||
params.Add(New ReportParameter("PuestoEntrego", dr("PuestoEntrego").ToString))
|
params.Add(New ReportParameter("PuestoEntrego", dr("PuestoEntrego").ToString))
|
||||||
params.Add(New ReportParameter("Departamento", dr("Departamento").ToString))
|
params.Add(New ReportParameter("Departamento", dr("Departamento").ToString))
|
||||||
params.Add(New ReportParameter("DepartamentoEntrego", dr("DepartamentoEntrego").ToString))
|
params.Add(New ReportParameter("DepartamentoEntrego", dr("DepartamentoEntrego").ToString))
|
||||||
params.Add(New ReportParameter("Folio", dr("Folio").ToString))
|
params.Add(New ReportParameter("Folio", dr("Folio").ToString))
|
||||||
params.Add(New ReportParameter("Sucursal", dr("SubProyecto").ToString))
|
params.Add(New ReportParameter("Sucursal", dr("SubProyecto").ToString))
|
||||||
@@ -3729,9 +3730,9 @@ Partial Class PopUpVerFactura
|
|||||||
|
|
||||||
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/ResguardoAF.rdlc", dtVC, params, NomArchivo)
|
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/ResguardoAF.rdlc", dtVC, params, NomArchivo)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "OP = 'POL' "
|
#Region "OP = 'POL' "
|
||||||
Private Sub ImprimirPolizaPDF(IdPoliza As Integer)
|
Private Sub ImprimirPolizaPDF(IdPoliza As Integer)
|
||||||
'Dim ObjConta As New ClsContabilidad
|
'Dim ObjConta As New ClsContabilidad
|
||||||
@@ -3770,9 +3771,9 @@ Partial Class PopUpVerFactura
|
|||||||
|
|
||||||
ObjPoliza.Dispose()
|
ObjPoliza.Dispose()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "OP = 'CAN' - CANCELACION"
|
#Region "OP = 'CAN' - CANCELACION"
|
||||||
Public Sub ImprimeCancelacion(CveVenta As Integer)
|
Public Sub ImprimeCancelacion(CveVenta As Integer)
|
||||||
Dim ObjVentas As New ClsVentas
|
Dim ObjVentas As New ClsVentas
|
||||||
@@ -3797,9 +3798,9 @@ Partial Class PopUpVerFactura
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "OP = 'DC' - DEPOSITOS CAJA"
|
#Region "OP = 'DC' - DEPOSITOS CAJA"
|
||||||
Private Sub CargaDepositosCaja(CveIE As Integer, CuentaCaja As String, CuentaDeposito As String)
|
Private Sub CargaDepositosCaja(CveIE As Integer, CuentaCaja As String, CuentaDeposito As String)
|
||||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/DepositoCaja.rdlc", UsuarioActual.Empresa.Ruta))
|
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/DepositoCaja.rdlc", UsuarioActual.Empresa.Ruta))
|
||||||
@@ -3826,11 +3827,11 @@ Partial Class PopUpVerFactura
|
|||||||
|
|
||||||
ObjIE.Dispose()
|
ObjIE.Dispose()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "I E C H E Q U E S"
|
#Region "I E C H E Q U E S"
|
||||||
|
|
||||||
Private Sub ImprimirIE(CveIE As Integer, CveEmpresa As Integer)
|
Private Sub ImprimirIE(CveIE As Integer, CveEmpresa As Integer)
|
||||||
Dim CveTipoTransaccion = -1
|
Dim CveTipoTransaccion = -1
|
||||||
Dim ObjIE As New ClsBancos()
|
Dim ObjIE As New ClsBancos()
|
||||||
@@ -4237,21 +4238,21 @@ Partial Class PopUpVerFactura
|
|||||||
ParamComprobacion.Dispose()
|
ParamComprobacion.Dispose()
|
||||||
|
|
||||||
ObjIE.Dispose()
|
ObjIE.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "OP = RECIBO DE PAGOS"
|
#Region "OP = RECIBO DE PAGOS"
|
||||||
Private Sub ImprimirReciboDePagos(CveIE As Integer, CveVenta As Integer)
|
Private Sub ImprimirReciboDePagos(CveIE As Integer, CveVenta As Integer)
|
||||||
|
|
||||||
PDFReciboDePagos(CveVenta, CveIE, -1)
|
PDFReciboDePagos(CveVenta, CveIE, -1)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "OP = VTA - PyME"
|
#Region "OP = VTA - PyME"
|
||||||
|
|
||||||
' 04/05/2018 - Pruebas de impresion de factura PyME
|
' 04/05/2018 - Pruebas de impresion de factura PyME
|
||||||
Private Sub GeneraPDFVtaPyMe(Venta As Modelos.Factura, Optional Formato As String = "PDF")
|
Private Sub GeneraPDFVtaPyMe(Venta As Modelos.Factura, Optional Formato As String = "PDF")
|
||||||
Dim Directorio1 As String = String.Format("{0}Empresas\{1}\Formatos\Factura.mrt", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa)
|
Dim Directorio1 As String = String.Format("{0}Empresas\{1}\Formatos\Factura.mrt", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa)
|
||||||
Dim File As FileInfo = New FileInfo(Directorio1)
|
Dim File As FileInfo = New FileInfo(Directorio1)
|
||||||
@@ -4306,9 +4307,9 @@ Partial Class PopUpVerFactura
|
|||||||
Else
|
Else
|
||||||
RegistraScript("alert('No hay un formato de factura predefinido,favor de comunicar a soporte tecnico')")
|
RegistraScript("alert('No hay un formato de factura predefinido,favor de comunicar a soporte tecnico')")
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "OP = ENTREGAS - Entregas por realizar"
|
#Region "OP = ENTREGAS - Entregas por realizar"
|
||||||
Public Sub ImprimeEntregasPorRealizar(CveAsignacionEntrega As Long, pUsuarioEntregar As String)
|
Public Sub ImprimeEntregasPorRealizar(CveAsignacionEntrega As Long, pUsuarioEntregar As String)
|
||||||
Dim Correcto As Boolean = False
|
Dim Correcto As Boolean = False
|
||||||
@@ -4331,79 +4332,79 @@ Partial Class PopUpVerFactura
|
|||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "OP = Etiqueta - Etiquetas de recepcion"
|
#Region "OP = Etiqueta - Etiquetas de recepcion"
|
||||||
Private Sub ImprimirEtiqueta(CveMovimiento As Integer, Modalidad As String)
|
Private Sub ImprimirEtiqueta(CveMovimiento As Integer, Modalidad As String)
|
||||||
|
|
||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
|
|
||||||
Dim All As Byte()
|
Dim All As Byte()
|
||||||
Using ms As New MemoryStream
|
Using ms As New MemoryStream
|
||||||
Using d As New Document
|
Using d As New Document
|
||||||
Using Copy As New PdfCopy(d, ms)
|
Using Copy As New PdfCopy(d, ms)
|
||||||
d.Open()
|
d.Open()
|
||||||
If ObjInventarios.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
If ObjInventarios.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||||
If ObjInventarios.DtResultados IsNot Nothing Then
|
If ObjInventarios.DtResultados IsNot Nothing Then
|
||||||
For Each DetalleRow As DataRow In ObjInventarios.DtResultados.Rows
|
For Each DetalleRow As DataRow In ObjInventarios.DtResultados.Rows
|
||||||
Dim CvePS As Integer = DetalleRow.Item("CvePS").ToString.ToEntero
|
Dim CvePS As Integer = DetalleRow.Item("CvePS").ToString.ToEntero
|
||||||
Dim Lote As String = DetalleRow.Item("Lote").ToString
|
Dim Lote As String = DetalleRow.Item("Lote").ToString
|
||||||
Dim FechaCaducidad As Date = DetalleRow.Item("FechaCaducidad").ToString.ToDate
|
Dim FechaCaducidad As Date = DetalleRow.Item("FechaCaducidad").ToString.ToDate
|
||||||
Dim PS As String = String.Format("{0} - {1}", DetalleRow.Item("Codigo").ToString, DetalleRow.Item("PS").ToString)
|
Dim PS As String = String.Format("{0} - {1}", DetalleRow.Item("Codigo").ToString, DetalleRow.Item("PS").ToString)
|
||||||
If Modalidad = "Individual" Then
|
If Modalidad = "Individual" Then
|
||||||
Dim reporteByte As Byte() = GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS)
|
Dim reporteByte As Byte() = GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS)
|
||||||
|
|
||||||
Dim reader As New PdfReader(reporteByte)
|
Dim reader As New PdfReader(reporteByte)
|
||||||
Dim Paginas As Integer = reader.NumberOfPages
|
Dim Paginas As Integer = reader.NumberOfPages
|
||||||
Dim Contador As Integer = 0
|
Dim Contador As Integer = 0
|
||||||
While Contador < Paginas
|
While Contador < Paginas
|
||||||
Contador += 1
|
Contador += 1
|
||||||
Copy.AddPage(Copy.GetImportedPage(reader, Contador))
|
Copy.AddPage(Copy.GetImportedPage(reader, Contador))
|
||||||
End While
|
End While
|
||||||
Else
|
Else
|
||||||
Dim Cant As Integer = DetalleRow.Item("Cantidad").ToString.ToEntero - 1
|
Dim Cant As Integer = DetalleRow.Item("Cantidad").ToString.ToEntero - 1
|
||||||
|
|
||||||
For contador As Integer = 0 To Cant
|
For contador As Integer = 0 To Cant
|
||||||
Dim reporteByte As Byte() = GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS)
|
Dim reporteByte As Byte() = GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS)
|
||||||
|
|
||||||
Dim reader As New PdfReader(reporteByte)
|
Dim reader As New PdfReader(reporteByte)
|
||||||
Dim Paginas As Integer = reader.NumberOfPages
|
Dim Paginas As Integer = reader.NumberOfPages
|
||||||
Dim Cont As Integer = 0
|
Dim Cont As Integer = 0
|
||||||
While Cont < Paginas
|
While Cont < Paginas
|
||||||
Cont += 1
|
Cont += 1
|
||||||
Copy.AddPage(Copy.GetImportedPage(reader, Cont))
|
Copy.AddPage(Copy.GetImportedPage(reader, Cont))
|
||||||
End While
|
End While
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
d.Close()
|
d.Close()
|
||||||
|
|
||||||
End Using
|
End Using
|
||||||
End Using
|
End Using
|
||||||
All = ms.ToArray()
|
All = ms.ToArray()
|
||||||
End Using
|
End Using
|
||||||
ImprimirbytesPDF(All, "Etiquetas")
|
ImprimirbytesPDF(All, "Etiquetas")
|
||||||
|
|
||||||
|
|
||||||
If Modalidad = "Individual" Then
|
If Modalidad = "Individual" Then
|
||||||
Else
|
Else
|
||||||
|
|
||||||
End If
|
End If
|
||||||
ObjInventarios.Dispose()
|
ObjInventarios.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function GenerarEtiqueta(CvePS As Integer, Lote As String, FechaCaducidad As Date, PS As String) As Byte()
|
Private Function GenerarEtiqueta(CvePS As Integer, Lote As String, FechaCaducidad As Date, PS As String) As Byte()
|
||||||
Dim QrDescarga As String = ""
|
Dim QrDescarga As String = ""
|
||||||
Dim Cfdi As New RVCFDI33.GeneraCFDI()
|
Dim Cfdi As New RVCFDI33.GeneraCFDI()
|
||||||
Dim b As Byte() = Cfdi.ConvertirQrCode(String.Format("?CvePS={0}&Lote={1}&Fecha={2}", CvePS, Lote, Format(FechaCaducidad, "dd/MM/yyyy").ToString()))
|
Dim b As Byte() = Cfdi.ConvertirQrCode(String.Format("?CvePS={0}&Lote={1}&Fecha={2}", CvePS, Lote, Format(FechaCaducidad, "dd/MM/yyyy").ToString()))
|
||||||
QrDescarga = Convert.ToBase64String(b)
|
QrDescarga = Convert.ToBase64String(b)
|
||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
params.Add(New ReportParameter("QR", QrDescarga))
|
params.Add(New ReportParameter("QR", QrDescarga))
|
||||||
params.Add(New ReportParameter("PS", PS))
|
params.Add(New ReportParameter("PS", PS))
|
||||||
params.Add(New ReportParameter("Lote", Lote))
|
params.Add(New ReportParameter("Lote", Lote))
|
||||||
params.Add(New ReportParameter("FechaCad", FechaCaducidad.ToString()))
|
params.Add(New ReportParameter("FechaCad", FechaCaducidad.ToString()))
|
||||||
Return StreamPDF("Empresas/Grales/Formatos/EtiquetaDeRecepcion.rdlc", New DataTable, params)
|
Return StreamPDF("Empresas/Grales/Formatos/EtiquetaDeRecepcion.rdlc", New DataTable, params)
|
||||||
End Function
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
Reference in New Issue
Block a user