This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2022-07-04 10:47:41 -07:00
parent 1064eae93e
commit a28cc5492d
14 changed files with 6988 additions and 34 deletions

View File

@@ -198,27 +198,110 @@ Partial Class PopUpVerFactura
End If
If Request("onlyPrint") IsNot Nothing Then
If Request("onlyPrint").ToString() = "Pallet" Then
If Request("onlyPrint").ToString() = "Pallet" AndAlso Not IsNothing(Request("CvePallet")) Then
imprimirpallet2(Request("CvePallet").ToString.ToEntero())
End If
If Request("onlyPrint").ToString() = "PalletCaja" Then
If Request("onlyPrint").ToString() = "PalletCaja" AndAlso Not IsNothing(Request("CvePallet")) Then
imprimirpallet(Request("CvePallet").ToString.ToEntero())
End If
If Request("onlyPrint").ToString() = "manifiesto" Then
If Request("onlyPrint").ToString() = "manifiesto" AndAlso Not IsNothing(Request("cveEmbarqueManifiesto")) Then
imprimirManifiesto(Request("cveEmbarqueManifiesto").ToString.ToEntero())
End If
If Request("onlyPrint").ToString() = "manifiestoRemision" Then
If Request("onlyPrint").ToString() = "manifiestoRemision" AndAlso Not IsNothing(Request("cveEmbarqueManifiesto")) Then
imprimirManifiestoRemision(Request("cveEmbarqueManifiesto").ToString.ToEntero())
End If
If Request("onlyPrint").ToString() = "manifiestoCartaPorte" Then
If Request("onlyPrint").ToString() = "manifiestoCartaPorte" AndAlso Not IsNothing(Request("cveEmbarqueManifiesto")) Then
imprimirManifiestoCartaPorte(Request("cveEmbarqueManifiesto").ToString.ToEntero())
End If
If Request("onlyPrint").ToString() = "rfctxtvalidar" Then
rfctxtvalidar()
End If
If Request("onlyPrint").ToString() = "Recibo" Then
ReciboAgropecuaria()
End If
End If
End If
End If
End Sub
Private Sub ReciboAgropecuaria()
Dim numeroPeriodo As Integer = 0
Dim cveSubProyecto As Integer = -1
Dim cveTipoNomina As Integer = -1
Dim ejercicio As Integer = 0
Dim cvePersonal As Integer = 0
Dim tipoTrabajador As String = ""
Dim facturado As Boolean = False
If Not IsNothing(Request("numeroPeriodo")) Then
numeroPeriodo = Request("numeroPeriodo").ToString.ToEntero()
End If
If Not IsNothing(Request("ejercicio")) Then
ejercicio = Request("ejercicio").ToString.ToEntero()
End If
If Not IsNothing(Request("cvePersonal")) Then
cvePersonal = Request("cvePersonal").ToString.ToEntero()
End If
Dim params As New List(Of ReportParameter)
Dim lrds As New List(Of ReportDataSource)
Using objnom As New ClsNominas
If objnom.PreNominaTotalSemana(numeroPeriodo, UsuarioActual.CveEmpresa, cveSubProyecto, cveTipoNomina, tipoTrabajador, ejercicio, facturado) Then
Dim dt As New DataTable
dt = objnom.DtResultados.FiltraParametros("CvePersonal >0")
If (cvePersonal > 0) Then
dt = dt.FiltraParametros($"CvePersonal ={cvePersonal }")
End If
lrds.Add(New ReportDataSource With {.Name = "DataSet1", .Value = dt})
End If
End Using
'endimg
'"Empresas/Grales/Formatos/EquiposGPS.rdlc"
'"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
ImprimirPDF("GPS/ReciboNom.rdlc", lrds, params, "Pallet", Content_Disposition:="Inline")
End Sub
Private Sub rfctxtvalidar()
Dim numeroPeriodo As Integer = 0
Dim cveSubProyecto As Integer = -1
Dim cveTipoNomina As Integer = -1
Dim ejercicio As Integer = 0
Dim cvePersonal As Integer = 0
Dim tipoTrabajador As String = ""
Dim facturado As Boolean = False
If Not IsNothing(Request("numeroPeriodo")) Then
numeroPeriodo = Request("numeroPeriodo").ToString.ToEntero()
End If
If Not IsNothing(Request("ejercicio")) Then
ejercicio = Request("ejercicio").ToString.ToEntero()
End If
If Not IsNothing(Request("cvePersonal")) Then
cvePersonal = Request("cvePersonal").ToString.ToEntero()
End If
Dim RFCs As New StringBuilder
Dim contador = 0
Using objnom As New ClsNominas
If objnom.PreNominaTotalSemana(numeroPeriodo, UsuarioActual.CveEmpresa, cveSubProyecto, cveTipoNomina, tipoTrabajador, ejercicio, facturado) Then
For Each item As DataRow In objnom.DtResultados.Select("CvePersonal > 0")
Dim rfc As String = item("RFC").ToString().Trim()
If rfc.Length > 0 Then
contador = contador + 1
RFCs.AppendLine(String.Format("{0}|{1}", contador, rfc))
End If
Next
End If
End Using
Response.Clear()
Response.ContentType = "text/plain"
Response.AppendHeader("content-disposition", "attachment;filename=RFCs_Validacion_Masiva.txt")
'Response.Write(contador.ToString())
Response.Write(RFCs.ToString())
Response.End()
End Sub
Private Sub imprimirManifiesto(cveEmbarqueManifiesto As Integer)
Dim NoEmbarque As String = ""
@@ -506,7 +589,6 @@ Partial Class PopUpVerFactura
ImprimirPDF("GPS/EmbarqueManifiestoRemision.rdlc", lrds, params, "Remisión", Content_Disposition:="Inline")
End Sub
Private Sub imprimirManifiestoCartaPorte(cveEmbarqueManifiesto As Integer)
Dim NoEmbarque As String = ""
Dim Fecha As String = ""
@@ -675,7 +757,6 @@ Partial Class PopUpVerFactura
End Sub
Private Sub imprimirpallet2(cvePallet As Integer)
Dim Envase As String = ""
Dim Tamano As String = ""