imprimir Entregas Por realizar al ser asignadas
This commit is contained in:
@@ -2819,11 +2819,12 @@ Public Class ClsGenerales
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetEntregasPorRealizar(CveEmpresa As Integer) As Boolean
|
Public Function GetEntregasPorRealizar(CveEmpresa As Integer, Optional CveTick As Long = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Gral_EntregasPorRealizarGet")
|
DataAdapter("PA_Gral_EntregasPorRealizarGet")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@CveTick", SqlDbType.BigInt).Value = CveTick
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
@@ -2835,12 +2836,13 @@ Public Class ClsGenerales
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function AsignarEntregasPorRealizar(CvePaqueteriaGuia As Integer, CvePersonal As Integer) As Boolean
|
Public Function AsignarEntregasPorRealizar(CvePaqueteriaGuia As Integer, CvePersonal As Integer, Optional CveTick As Long = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Gral_AsignarEntregasPorRealizar")
|
DataAdapter("PA_Gral_AsignarEntregasPorRealizar")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CvePaqueteriaGuia", SqlDbType.Int).Value = CvePaqueteriaGuia
|
.Add("@CvePaqueteriaGuia", SqlDbType.Int).Value = CvePaqueteriaGuia
|
||||||
.Add("@CveUsuarioAsignado", SqlDbType.Int).Value = CvePersonal
|
.Add("@CveUsuarioAsignado", SqlDbType.Int).Value = CvePersonal
|
||||||
|
.Add("@CveTick", SqlDbType.BigInt).Value = CveTick
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
|
|||||||
@@ -472,6 +472,13 @@ Partial Class PopUpVerFactura
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'IMPRIME ENTREGAS POR REALIZAR
|
||||||
|
If UrlParametros("OP").ToString = "ENTREGAS" Then
|
||||||
|
If UrlParametros("CVETICK") IsNot Nothing And UrlParametros("USUARIOENTREGA") IsNot Nothing Then
|
||||||
|
ImprimeEntregasPorRealziar(UrlParametros("CVETICK").ToString, UrlParametros("USUARIOENTREGA").ToString)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function Parametros(Cadena As String) As Hashtable
|
Private Function Parametros(Cadena As String) As Hashtable
|
||||||
@@ -4163,4 +4170,20 @@ Partial Class PopUpVerFactura
|
|||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
#Region "OP = ENTREGAS - Entregas por realizar"
|
||||||
|
Public Sub ImprimeEntregasPorRealziar(pCveTick As String, pUsuarioEntregar As String)
|
||||||
|
Dim CveTick As Long = pCveTick.ToLong()
|
||||||
|
Dim ObjGeneral As New ClsGenerales
|
||||||
|
If ObjGeneral.GetEntregasPorRealizar(UsuarioActual.CveEmpresa, CveTick) Then
|
||||||
|
Dim DtPaqueteriasGuias As DataTable = ObjGeneral.DtResultados
|
||||||
|
Dim RepParams As New List(Of ReportParameter)
|
||||||
|
RepParams.Add(New ReportParameter("Fecha", DateTime.Today.ToString()))
|
||||||
|
RepParams.Add(New ReportParameter("AsignadoA", pUsuarioEntregar))
|
||||||
|
RepParams.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||||
|
|
||||||
|
ImprimirPDF($"Empresas/{UsuarioActual.CveEmpresa}/Formatos/EntregasPorRealizar.rdlc", DtPaqueteriasGuias, RepParams, "Entregas por realizar", "PDF", RDSName:="DsInventarios")
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -41,13 +41,17 @@ public partial class Inventarios_EntregasPorRealizar : ClsPaginas
|
|||||||
GridViewRowCollection Grid = GvPaqueteriasGuias.Rows;
|
GridViewRowCollection Grid = GvPaqueteriasGuias.Rows;
|
||||||
|
|
||||||
int CvePersonal = DdlUsuario.SelectedValue.ToEntero();
|
int CvePersonal = DdlUsuario.SelectedValue.ToEntero();
|
||||||
|
long CveTick = DateTime.Now.Ticks;
|
||||||
|
string Usuario = DdlUsuario.SelectedValue.ToEntero() > 0 ? DdlUsuario.SelectedItem.Text : "Todos";
|
||||||
|
|
||||||
|
string LigaPopUpVerFactura = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", ModExtensiones.Encripta(String.Format("OP=ENTREGAS&CVETICK={0}&USUARIOENTREGA={1}", CveTick, Usuario)));
|
||||||
foreach (GridViewRow row in Grid)
|
foreach (GridViewRow row in Grid)
|
||||||
{
|
{
|
||||||
if (row.FCCheckBox("ChkAsigna").Checked)
|
if (row.FCCheckBox("ChkAsigna").Checked)
|
||||||
{
|
{
|
||||||
int CvePaqueteriasGuias = row.DataKey("CvePaqueteriaGuia").ToEntero();
|
int CvePaqueteriasGuias = row.DataKey("CvePaqueteriaGuia").ToEntero();
|
||||||
|
|
||||||
if(!ObjGeneral.AsignarEntregasPorRealizar(CvePaqueteriasGuias, CvePersonal)){
|
if(!ObjGeneral.AsignarEntregasPorRealizar(CvePaqueteriasGuias, CvePersonal, CveTick)){
|
||||||
TieneError = true;
|
TieneError = true;
|
||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
@@ -71,7 +75,7 @@ public partial class Inventarios_EntregasPorRealizar : ClsPaginas
|
|||||||
if (!TieneError)
|
if (!TieneError)
|
||||||
{
|
{
|
||||||
ObjGeneral.Commit();
|
ObjGeneral.Commit();
|
||||||
Alert("Entregas asignadas correctamente");
|
Alert(String.Format("Entregas asignadas correctamente <br/><br/><a style='color:#23527c' href='{0}'>Imprimir Reporte de Entregas Asignadas</a>", LigaPopUpVerFactura));
|
||||||
CargarEntregas();
|
CargarEntregas();
|
||||||
UpDatos.Update();
|
UpDatos.Update();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user