Merge branch 'master' of http://agonzalez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -324,6 +324,9 @@ Public Class ClsGenerales
|
||||
Public Function GetGralPaqueterias(Optional CveEmpresa As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Gral_PaqueteriasGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
@@ -2819,12 +2822,12 @@ Public Class ClsGenerales
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetEntregasPorRealizar(CveEmpresa As Integer, Optional CveTick As Long = -1) As Boolean
|
||||
Public Function GetEntregasPorRealizar(CveEmpresa As Integer, Optional CveAsignacionEntrega As Long = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Gral_EntregasPorRealizarGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveTick", SqlDbType.BigInt).Value = CveTick
|
||||
.Add("@CveAsignacionEntrega", SqlDbType.BigInt).Value = CveAsignacionEntrega
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
@@ -2836,20 +2839,20 @@ Public Class ClsGenerales
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AsignarEntregasPorRealizar(CvePaqueteriaGuia As Integer, CvePersonal As Integer, Optional CveTick As Long = -1, Optional CveMotivoRechazoPaqueteria As Integer = -1) As Boolean
|
||||
Public Function AsignarEntregasPorRealizar(CvePaqueteriaGuia As Integer, CvePersonal As Integer, Optional CveAsignacionEntrega As Long = -1, Optional CveMotivoRechazoPaqueteria As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Gral_AsignarEntregasPorRealizar")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePaqueteriaGuia", SqlDbType.Int).Value = CvePaqueteriaGuia
|
||||
.Add("@CveUsuarioAsignado", SqlDbType.Int).Value = CvePersonal
|
||||
.Add("@CveTick", SqlDbType.BigInt).Value = CveTick
|
||||
.Add("@CveAsignacionEntrega", SqlDbType.BigInt).Value = CveAsignacionEntrega
|
||||
.Add("@CveMotivoRechazoPaqueteria", SqlDbType.Int).Value = CveMotivoRechazoPaqueteria
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener entregas por realizar.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
OnError("Ocurrió un error al asignar entregas por realizar.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
|
||||
@@ -3351,12 +3351,26 @@ Public Class ClsPaginas
|
||||
Application("GlobalDTClasificacionPorcentaje") = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTPaqueterias() As DataTable
|
||||
Property GlobalDTPaqueterias(CveEmpresa As Integer, Optional TipoPaquteria As Integer = -1) As DataTable
|
||||
Get
|
||||
GlobalDTPaqueterias = DirectCast(Application("GlobalDTPaqueterias"), DataTable)
|
||||
Dim AppNombre As String = String.Format("GlobalDTPaqueterias-{0}", CveEmpresa)
|
||||
If Application(AppNombre) Is Nothing Then
|
||||
Dim ObjGenerales As New ClsGenerales
|
||||
If ObjGenerales.GetGralPaqueterias(CveEmpresa) Then Application(AppNombre) = ObjGenerales.DtResultados Else Application(AppNombre) = Nothing
|
||||
ObjGenerales.Dispose()
|
||||
End If
|
||||
|
||||
Dim Str As StringBuilder = New StringBuilder()
|
||||
If TipoPaquteria <> -1 Then Str.AppendFormat("TipoPaqueteria = {0}", TipoPaquteria)
|
||||
|
||||
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
|
||||
GlobalDTPaqueterias = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Str.Clear()
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTPaqueterias") = value
|
||||
Dim AppNombre As String = String.Format("GlobalDTPaqueterias-{0}", CveEmpresa)
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTAcumTiposDefecto() As DataTable
|
||||
|
||||
@@ -474,8 +474,8 @@ Partial Class PopUpVerFactura
|
||||
|
||||
'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)
|
||||
If UrlParametros("CVEASIGNACIONENTREGA") IsNot Nothing And UrlParametros("USUARIOENTREGA") IsNot Nothing Then
|
||||
ImprimeEntregasPorRealizar(UrlParametros("CVEASIGNACIONENTREGA").ToString.ToLong, UrlParametros("USUARIOENTREGA").ToString)
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -4173,11 +4173,16 @@ Partial Class PopUpVerFactura
|
||||
#End Region
|
||||
|
||||
#Region "OP = ENTREGAS - Entregas por realizar"
|
||||
Public Sub ImprimeEntregasPorRealziar(pCveTick As String, pUsuarioEntregar As String)
|
||||
Dim CveTick As Long = pCveTick.ToLong()
|
||||
Public Sub ImprimeEntregasPorRealizar(CveAsignacionEntrega As Long, pUsuarioEntregar As String)
|
||||
Dim Correcto As Boolean = False
|
||||
Dim DtPaqueteriasGuias As DataTable = Nothing
|
||||
Dim ObjGeneral As New ClsGenerales
|
||||
If ObjGeneral.GetEntregasPorRealizar(UsuarioActual.CveEmpresa, CveTick) Then
|
||||
Dim DtPaqueteriasGuias As DataTable = ObjGeneral.DtResultados
|
||||
If ObjGeneral.GetEntregasPorRealizar(UsuarioActual.CveEmpresa, CveAsignacionEntrega) Then
|
||||
DtPaqueteriasGuias = ObjGeneral.DtResultados
|
||||
Correcto = True
|
||||
End If
|
||||
ObjGeneral.Dispose()
|
||||
If Correcto Then
|
||||
Dim RepParams As New List(Of ReportParameter)
|
||||
RepParams.Add(New ReportParameter("Fecha", DateTime.Today.ToString()))
|
||||
RepParams.Add(New ReportParameter("AsignadoA", pUsuarioEntregar))
|
||||
@@ -4185,6 +4190,7 @@ Partial Class PopUpVerFactura
|
||||
|
||||
ImprimirPDF($"Empresas/{UsuarioActual.CveEmpresa}/Formatos/EntregasPorRealizar.rdlc", DtPaqueteriasGuias, RepParams, "Entregas por realizar", "PDF", RDSName:="DsInventarios")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -210,15 +210,18 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas
|
||||
{
|
||||
if (UsuarioActual.CveRol == 1339)
|
||||
{
|
||||
DdlPaqueterias.DataSource = GlobalDTPaqueterias.FiltraParametros(String.Format("TipoPaqueteria = 0 AND CveEmpresa = {0}",UsuarioActual.CveEmpresa));
|
||||
}else
|
||||
{
|
||||
DdlPaqueterias.DataSource = GlobalDTPaqueterias;
|
||||
DdlPaqueterias.DataSource = get_GlobalDTPaqueterias(UsuarioActual.CveEmpresa, 0);
|
||||
DdlPaqueterias.DataBind();
|
||||
}
|
||||
DdlPaqueterias.DataBind();
|
||||
DdlPaqueterias.Items.Insert(0, new ListItem("Todos ", "-1"));
|
||||
else
|
||||
{
|
||||
DdlPaqueterias.DataSource = get_GlobalDTPaqueterias(UsuarioActual.CveEmpresa);
|
||||
DdlPaqueterias.DataBind();
|
||||
DdlPaqueterias.Items.Insert(0, new ListItem("Todos ", "-1"));
|
||||
}
|
||||
|
||||
|
||||
DdlPaqueteriaEditar.DataSource = GlobalDTPaqueterias;
|
||||
DdlPaqueteriaEditar.DataSource = get_GlobalDTPaqueterias(UsuarioActual.CveEmpresa);
|
||||
DdlPaqueteriaEditar.DataBind();
|
||||
DdlPaqueteriaEditar.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
||||
}
|
||||
|
||||
@@ -222,8 +222,8 @@
|
||||
If ObjGenerales.GetCategorias(-1, 2) Then Application("GlobalDTFamilias") = ObjGenerales.DtResultados Else Application("GlobalDTFamilias") = Nothing
|
||||
If ObjGenerales.GetCategorias(-1, 3) Then Application("GlobalDTCategoriasPresupuestos") = ObjGenerales.DtResultados Else Application("GlobalDTCategoriasPresupuestos") = Nothing
|
||||
If ObjGenerales.GetCategorias(-1, 4) Then Application("GlobalDTCategorias2") = ObjGenerales.DtResultados Else Application("GlobalDTCategorias2") = Nothing
|
||||
If ObjGenerales.GetColectivas(-1, "-1", "-1", "-1", -1) Then Application("GlobalDTObjGralColectivas") = ObjGenerales.DtResultados Else Application("GlobalDTObjGralColectivas") = Nothing
|
||||
If ObjGenerales.GetGralPaqueterias Then Application("GlobalDTPaqueterias") = ObjGenerales.DtResultados Else Application("GlobalDTPaqueterias") = Nothing
|
||||
If ObjGenerales.GetColectivas(-1, "-1", "-1", "-1", -1) Then Application("GlobalDTObjGralColectivas") = ObjGenerales.DtResultados Else Application("GlobalDTObjGralColectivas") = Nothing
|
||||
'If ObjGenerales.GetGralPaqueterias Then Application("GlobalDTPaqueterias") = ObjGenerales.DtResultados Else Application("GlobalDTPaqueterias") = Nothing
|
||||
If ObjGenerales.GetGralPaqueteriasGuiasTipo Then Application("GlobalDTPaqueteriaGuiaTipos") = ObjGenerales.DtResultados Else Application("GlobalDTPaqueteriaGuiaTipos") = Nothing
|
||||
If ObjGenerales.GetClasificacionPorcentaje(-1, -1, -1, -1, 1) Then Application("GlobalDTClasificacionPorcentaje") = ObjGenerales.DtResultados Else Application("GlobalDTClasificacionPorcentaje") = Nothing
|
||||
|
||||
|
||||
@@ -2653,7 +2653,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Dim FechaEstimada As String = If(TxtFechaEstimada.Text = "", "-1", TxtFechaEstimada.Text)
|
||||
Dim NoCajas As Integer = TxtNoCajas.Text.ToEntero()
|
||||
Dim Observaciones As String = TxtObservacionesPaqInterna.Text
|
||||
Dim CvePaqueteria As Integer = GlobalDTPaqueterias().FiltroPrimeroValor("CvePaqueteria", String.Format("CveEmpresa={0} AND TipoPaqueteria = 0", UsuarioActual.CveEmpresa)).ToEntero
|
||||
Dim CvePaqueteria As Integer = GlobalDTPaqueterias(UsuarioActual.CveEmpresa, 0).FiltroPrimeroValor("CvePaqueteria", "").ToEntero
|
||||
|
||||
If CveSubProyecto > 0 Then
|
||||
Dim CvePaqueteriaGuia As Integer = ObjGeneral.AddPaqueteriasGuias(CvePaqueteria, 9, CveEstatus, CveSubProyecto, Fecha, "", "", NoCajas, 0.00, "-1", FechaEstimada, Observaciones, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, EsEntregaInterna:=True)
|
||||
@@ -3123,7 +3123,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Dim FechaEstimada As String = If(TxtFechaEstimada.Text = "", "-1", TxtFechaEstimada.Text)
|
||||
Dim NoCajas As Integer = TxtNoCajas.Text.ToEntero()
|
||||
Dim Observaciones As String = TxtObservacionesPaqInterna.Text
|
||||
Dim CvePaqueteria As Integer = GlobalDTPaqueterias().FiltroPrimeroValor("CvePaqueteria", String.Format("CveEmpresa={0} AND TipoPaqueteria = 0", UsuarioActual.CveEmpresa)).ToEntero
|
||||
Dim CvePaqueteria As Integer = GlobalDTPaqueterias(UsuarioActual.CveEmpresa, 0).FiltroPrimeroValor("CvePaqueteria", "").ToEntero
|
||||
|
||||
Dim CvePaqueteriaGuia As Integer = ObjGeneral.AddPaqueteriasGuias(CvePaqueteria, 9, CveEstatus, CveSubProyecto, Fecha, "-1", "-1", NoCajas, 0.00, "-1", FechaEstimada, Observaciones, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, EsEntregaInterna:=True)
|
||||
|
||||
|
||||
@@ -41,17 +41,17 @@ public partial class Inventarios_EntregasPorRealizar : ClsPaginas
|
||||
GridViewRowCollection Grid = GvPaqueteriasGuias.Rows;
|
||||
|
||||
int CvePersonal = DdlUsuario.SelectedValue.ToEntero();
|
||||
long CveTick = DateTime.Now.Ticks;
|
||||
long CveAsignacionEntrega = 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)));
|
||||
string LigaPopUpVerFactura = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", ModExtensiones.Encripta(String.Format("OP=ENTREGAS&CVEASIGNACIONENTREGA={0}&USUARIOENTREGA={1}", CveAsignacionEntrega, Usuario)));
|
||||
foreach (GridViewRow row in Grid)
|
||||
{
|
||||
if (row.FCCheckBox("ChkAsigna").Checked)
|
||||
{
|
||||
int CvePaqueteriasGuias = row.DataKey("CvePaqueteriaGuia").ToEntero();
|
||||
|
||||
if(!ObjGeneral.AsignarEntregasPorRealizar(CvePaqueteriasGuias, CvePersonal, CveTick)){
|
||||
if(!ObjGeneral.AsignarEntregasPorRealizar(CvePaqueteriasGuias, CvePersonal, CveAsignacionEntrega)){
|
||||
TieneError = true;
|
||||
}else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user