diff --git a/Acarreos/CatChoferes.aspx.vb b/Acarreos/CatChoferes.aspx.vb
index 33eb8925e..251fd78bb 100644
--- a/Acarreos/CatChoferes.aspx.vb
+++ b/Acarreos/CatChoferes.aspx.vb
@@ -47,12 +47,12 @@ Partial Class Acarreos_CatChoferes
Dim Estatus = 0
If ChkEstatus.Checked Then Estatus = 1
If HdnModalidad.Value = "A" Then
- If ObjAcar.AddChofer(TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlTransportista.SelectedValue) Then
+ If ObjAcar.AddChofer(TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlTransportista.SelectedValue, TxtIdentificacion.Text.Trim, TxtDomicilio.Text.Trim, TxtTelefono.Text.Trim, TxtCiudad.Text.Trim, TxtLicencia.Text.Trim) Then
CargaDatos()
Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion)
End If
ElseIf HdnModalidad.Value = "U" Then
- If ObjAcar.UpdateChofer(HdnID.Value, TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Estatus, DdlTransportista.SelectedValue) Then
+ If ObjAcar.UpdateChofer(HdnID.Value, TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Estatus, DdlTransportista.SelectedValue, TxtIdentificacion.Text.Trim, TxtDomicilio.Text.Trim, TxtTelefono.Text.Trim, TxtCiudad.Text.Trim, TxtLicencia.Text.Trim) Then
CargaDatos()
Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion)
End If
@@ -71,6 +71,11 @@ Partial Class Acarreos_CatChoferes
BtnAgregarChofer.Text = "Actualizar"
myModalLabel.InnerText = "Actualizar Chofer"
TxtChofer.Text = GvRow.DataKey("Chofer")
+ TxtIdentificacion.Text = GvRow.DataKey("Identificacion")
+ TxtDomicilio.Text = GvRow.DataKey("Domicilio")
+ TxtTelefono.Text = GvRow.DataKey("Telefono")
+ TxtCiudad.Text = GvRow.DataKey("Ciudad")
+ TxtLicencia.Text = GvRow.DataKey("Licencia")
DdlTransportista.SelectedValueExist(GvRow.DataKey("CveTransportista"))
divEstatus.Visible = True
ChkEstatus.Checked = CBool(GvRow.DataKey("Estatus"))
@@ -84,6 +89,11 @@ Partial Class Acarreos_CatChoferes
BtnAgregarChofer.Text = "Agregar"
myModalLabel.InnerText = "Agregar Chofer"
TxtChofer.Text = ""
+ TxtIdentificacion.Text = ""
+ TxtDomicilio.Text = ""
+ TxtTelefono.Text = ""
+ TxtCiudad.Text = ""
+ TxtLicencia.Text = ""
ChkEstatus.Checked = True
divEstatus.Visible = False
UpAddChofer.Update()
diff --git a/App_Code/ClsAcarreos.vb b/App_Code/ClsAcarreos.vb
index c85f93087..e039cb589 100644
--- a/App_Code/ClsAcarreos.vb
+++ b/App_Code/ClsAcarreos.vb
@@ -109,7 +109,7 @@ Public Class ClsAcarreos
#Region "Choferes"
- Public Function AddChofer(Chofer As String, CveUsuario As Integer, CveEmpresa As Integer, CveTransportista As Integer) As Boolean
+ Public Function AddChofer(Chofer As String, CveUsuario As Integer, CveEmpresa As Integer, CveTransportista As Integer, Identificacion As String, Domicilio As String, Telefono As String, Ciudad As String, Licencia As String) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Acar_ChoferesAdd")
With SqlAdapter.SelectCommand.Parameters
@@ -117,6 +117,11 @@ Public Class ClsAcarreos
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveTransportista", SqlDbType.Int).Value = CveTransportista
+ .Add("@Identificacion", SqlDbType.VarChar).Value = Identificacion
+ .Add("@Domicilio", SqlDbType.VarChar).Value = Domicilio
+ .Add("@Telefono", SqlDbType.VarChar).Value = Telefono
+ .Add("@Ciudad", SqlDbType.VarChar).Value = Ciudad
+ .Add("@Licencia", SqlDbType.VarChar).Value = Licencia
End With
Try
SqlAdapter.Fill(Data)
@@ -128,7 +133,7 @@ Public Class ClsAcarreos
Return Retorno
End Function
- Public Function UpdateChofer(CveChofer As Integer, Chofer As String, CveUsuario As Integer, CveEmpresa As Integer, Estatus As Integer, CveTransportista As Integer) As Boolean
+ Public Function UpdateChofer(CveChofer As Integer, Chofer As String, CveUsuario As Integer, CveEmpresa As Integer, Estatus As Integer, CveTransportista As Integer, Identificacion As String, Domicilio As String, Telefono As String, Ciudad As String, Licencia As String) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Acar_ChoferesUpdate")
With SqlAdapter.SelectCommand.Parameters
@@ -138,7 +143,11 @@ Public Class ClsAcarreos
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Estatus", SqlDbType.Int).Value = Estatus
.Add("@CveTransportista", SqlDbType.Int).Value = CveTransportista
-
+ .Add("@Identificacion", SqlDbType.VarChar).Value = Identificacion
+ .Add("@Domicilio", SqlDbType.VarChar).Value = Domicilio
+ .Add("@Telefono", SqlDbType.VarChar).Value = Telefono
+ .Add("@Ciudad", SqlDbType.VarChar).Value = Ciudad
+ .Add("@Licencia", SqlDbType.VarChar).Value = Licencia
End With
Try
SqlAdapter.Fill(Data)
diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb
index dd3d1ade6..70be6dfdb 100644
--- a/App_Code/ClsInventarios.vb
+++ b/App_Code/ClsInventarios.vb
@@ -300,7 +300,8 @@ Public Class ClsInventarios
Return Retorno
End Function
- Public Function GetRepAlmacenes(FechaInicio As String, FechaFin As String, CveEmpresa As Integer, CveTipoAlmacen As String, Contabilizable As Integer, Inventariable As Boolean, Optional SoloMovimientosContables As Boolean = False) As Boolean
+ Public Function GetRepAlmacenes(FechaInicio As String, FechaFin As String, CveEmpresa As Integer, CveTipoAlmacen As String, Contabilizable As Integer, Inventariable As Boolean,
+ Optional SoloMovimientosContables As Boolean = False, Optional Almacenes As String = "-1", Optional CveSubProyecto As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_AlmacenesRepGet")
@@ -311,7 +312,9 @@ Public Class ClsInventarios
.Add("@CveTipoAlmacen", SqlDbType.VarChar).Value = CveTipoAlmacen
.Add("@Inventariable", SqlDbType.Bit).Value = Inventariable
.Add("@SoloMovimientosContables", SqlDbType.Bit).Value = SoloMovimientosContables
- .Add("@Modalidad", SqlDbType.Int).Value = Contabilizable
+ .Add("@Modalidad", SqlDbType.Int).Value = Contabilizable
+ .Add("@Almacenes", SqlDbType.VarChar).Value = Almacenes
+ .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
End With
Try
SqlAdapter.Fill(Data)
@@ -2415,15 +2418,15 @@ Public Class ClsInventarios
Return Retorno
End Function
- Public Function GetInventarioFisicoDetalle(CveInventarioFisico As Integer, CveUsuario As Integer) As Boolean
+ Public Function GetInventarioFisicoDetalle(CveInventarioFisico As Integer, CveUsuario As Integer, Optional Agrupar As Boolean = False) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_InventarioFisicoDetalleGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveInventarioFisico", SqlDbType.Int).Value = CveInventarioFisico
- .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
-
+ .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
+ .Add("@Agrupar", SqlDbType.Bit).Value = Agrupar
End With
Try
@@ -2438,10 +2441,10 @@ Public Class ClsInventarios
End Try
Return Retorno
- End Function
-
+ End Function
+
#End Region
-
+
#Region "I N V E N T A R I O - F I S I C O - R E S U L T A D O"
Public Function AddInventarioFisicoResultados(CveInventarioFisico As Integer, CveUsuario As Integer) As Boolean
Dim Retorno As Boolean = False
diff --git a/App_Code/ClsOS.vb b/App_Code/ClsOS.vb
index 1cfb6672d..c425d7c80 100644
--- a/App_Code/ClsOS.vb
+++ b/App_Code/ClsOS.vb
@@ -1574,16 +1574,16 @@ Public Class ClsOS
Return Retorno
End Function
- Public Function RemoveEstatusUsuarios(CveEstatusUsuarios As Integer) As Boolean
+ Public Function RemoveEstatusUsuarios(CveEstatus As Integer, CveUsuario As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_OS_EstatusUsuariosRemove")
With SqlAdapter.SelectCommand.Parameters
- SqlAdapter.SelectCommand.Parameters.Add("@CveEstatusUsuario", SqlDbType.Int).Value = CveEstatusUsuarios
+ .Add("@CveEstatusOrdenServicio", SqlDbType.Int).Value = CveEstatus
+ .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
End With
-
Try
SqlAdapter.Fill(Data)
Retorno = True
diff --git a/Bancos/RepProgramarRecursos.aspx b/Bancos/RepProgramarRecursos.aspx
index 2bcb515c3..cdb2fcca3 100644
--- a/Bancos/RepProgramarRecursos.aspx
+++ b/Bancos/RepProgramarRecursos.aspx
@@ -380,7 +380,6 @@
<%# Eval("RazonSocial")%>
-
/
diff --git a/Bancos/RepProgramarRecursos.aspx.vb b/Bancos/RepProgramarRecursos.aspx.vb
index 042f0f391..e859a9868 100644
--- a/Bancos/RepProgramarRecursos.aspx.vb
+++ b/Bancos/RepProgramarRecursos.aspx.vb
@@ -3,10 +3,10 @@ Imports Extensiones
Imports Microsoft.Reporting.WebForms
Partial Class Bancos_RepProgramarRecursos
- Inherits ClsPaginas
-
+ Inherits ClsPaginas
+
#Region "P R O P I E D A D E S"
-
+
Private Property DtDatos As DataTable
Get
Return CType(ViewState("DtDatos"), DataTable)
@@ -80,9 +80,9 @@ Partial Class Bancos_RepProgramarRecursos
Set(value As String)
ViewState("UsuarioProgramo") = value
End Set
- End Property
+ End Property
#End Region
-
+
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
DdlUsuarioProgramo.Visible = False
@@ -501,7 +501,6 @@ Partial Class Bancos_RepProgramarRecursos
Protected Sub BtnProgramar_Click(sender As Object, e As EventArgs) Handles BtnProgramar.Click
Dim CveUsuario As Integer = UsuarioActual.CveUsuario
-
If UsuarioActual.Empresa.Funcionalidad(138) = "1" Then
'Validación del SAT - DF 21/01/17
Dim Validada As Boolean = False
@@ -596,18 +595,18 @@ Partial Class Bancos_RepProgramarRecursos
MsgError &= "No se pudo programar la factura "
End If
End If
- Next
-
- TxtCodigoP.Text = ""
+ Next
+ Comp.Dispose()
+ TxtCodigoP.Text = ""
+
If MsgError <> "" Then
Alert(MsgError, TipoMensaje.MsgError)
Else
- Alert("La programación se guardó correctamente", TipoMensaje.MsgInformacion)
+ Alert("La programación se guardó correctamente", TipoMensaje.MsgInformacion)
+ EnviaCorreoNotificacion()
End If
-
- Comp.Dispose()
CargaDatos()
'Recarga DdlUsuarioProgramo
@@ -623,6 +622,105 @@ Partial Class Bancos_RepProgramarRecursos
End If
ObjUsuarios.Dispose()
End Sub
+ Private Sub EnviaCorreoNotificacion()
+ If UsuarioActual.CveEmpresa = 13 Then
+
+ Dim strBody As New StringBuilder
+ Try
+ strBody.Append(" ")
+ strBody.Append(" ")
+ strBody.Append(" ")
+ strBody.Append(" ")
+ strBody.Append(" ")
+ 'Cargo el detalle
+ strBody.Append("
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
diff --git a/Inventarios/InventarioFisicoDetalle.aspx.vb b/Inventarios/InventarioFisicoDetalle.aspx.vb
index 0f2a5afd9..ba4af4ee1 100644
--- a/Inventarios/InventarioFisicoDetalle.aspx.vb
+++ b/Inventarios/InventarioFisicoDetalle.aspx.vb
@@ -88,44 +88,42 @@ Partial Class Inventarios_InventarioFisicoDetalle
#Region " CARGA DATOS "
Private Sub CargaDatos(CveInventarioFisico As Integer, CveEmpresa As Integer, Optional CveUsuario As Integer = -1)
- Dim Inventario As New ClsInventarios
+ Dim ObjInventario As New ClsInventarios
+ If ObjInventario.GetInventarioFisico(CveInventarioFisico, CveEmpresa, -1, -1) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
+ Dim CveEstatus = ObjInventario.DtResultados.FiltroPrimeroValor("CveEstatus")
+ Select Case CveEstatus
+ Case "0" 'NUEVO
+ CveSubProyecto = ObjInventario.CveSubProyectoInventario
+ lbTitulo.Text = ObjInventario.InventarioFisico
+ lbObservaciones.Text = ObjInventario.Observaciones
+ lbSubProyecto.Text = ObjInventario.SubProyectoInventario
+ lbEstatus.Text = ObjInventario.Estatus
- If Inventario.GetInventarioFisico(CveInventarioFisico, CveEmpresa, -1, -1) Then
-
- Select Case Inventario.Estatus
- Case "Nuevo"
- CveSubProyecto = Inventario.CveSubProyectoInventario
- lbTitulo.Text = Inventario.InventarioFisico
- lbObservaciones.Text = Inventario.Observaciones
- lbSubProyecto.Text = Inventario.SubProyectoInventario
- lbEstatus.Text = Inventario.Estatus
-
- lbFechaF.Text = Inventario.FechaF
+ lbFechaF.Text = ObjInventario.FechaF
btnFin.Text = "Iniciar"
BtnGuardar.Enabled = False
btnFin.ToolTip = "Inicia el Inventario Físico"
- Case "Finalizado"
+ Case "3" 'FINALIZADO
GvIFD.Columns(6).Visible = False
- PAgregar.Visible = False
- 'BtnGuardar.Visible = False
+ PAgregar.Visible = False
+ BtnGuardar.Enabled = False
+ BtnGuardar.Visible = False
btnFin.Visible = False
- 'BtnGuardar.Enabled = False
- 'PAgregar.Visible = False
- CveSubProyecto = Inventario.CveSubProyectoInventario
- lbTitulo.Text = Inventario.InventarioFisico
- lbObservaciones.Text = Inventario.Observaciones
- lbSubProyecto.Text = Inventario.SubProyectoInventario
- lbEstatus.Text = Inventario.Estatus
- lbFechaI.Text = Inventario.FechaI
- lbFechaF.Text = Inventario.FechaF
- Case Else ' en proceso
- CveSubProyecto = Inventario.CveSubProyectoInventario
- lbTitulo.Text = Inventario.InventarioFisico
- lbObservaciones.Text = Inventario.Observaciones
- lbEstatus.Text = Inventario.Estatus
- lbSubProyecto.Text = Inventario.SubProyectoInventario
- lbFechaI.Text = Inventario.FechaI
- lbFechaF.Text = Inventario.FechaF
+ CveSubProyecto = ObjInventario.CveSubProyectoInventario
+ lbTitulo.Text = ObjInventario.InventarioFisico
+ lbObservaciones.Text = ObjInventario.Observaciones
+ lbSubProyecto.Text = ObjInventario.SubProyectoInventario
+ lbEstatus.Text = ObjInventario.Estatus
+ lbFechaI.Text = ObjInventario.FechaI
+ lbFechaF.Text = ObjInventario.FechaF
+ Case "1", "2" ' EN PROCESO,EN ESPERA
+ CveSubProyecto = ObjInventario.CveSubProyectoInventario
+ lbTitulo.Text = ObjInventario.InventarioFisico
+ lbObservaciones.Text = ObjInventario.Observaciones
+ lbEstatus.Text = ObjInventario.Estatus
+ lbSubProyecto.Text = ObjInventario.SubProyectoInventario
+ lbFechaI.Text = ObjInventario.FechaI
+ lbFechaF.Text = ObjInventario.FechaF
BtnGuardar.Enabled = True
btnFin.Text = "Finalizar"
LBAvance.Visible = UsuarioActual.TienePermisoProceso(178) ' si tiene permiso de ver el avance, se activa
@@ -133,8 +131,8 @@ Partial Class Inventarios_InventarioFisicoDetalle
GvIFD.Visible = False
DivBuscador.Visible = False
- If Inventario.GetInventarioFisicoDetallesAlmacen(CveInventarioFisico, UsuarioActual.CveEmpresa) Then
- Dim dt As DataTable = Inventario.DtResultados
+ If ObjInventario.GetInventarioFisicoDetallesAlmacen(CveInventarioFisico, UsuarioActual.CveEmpresa) Then
+ Dim dt As DataTable = ObjInventario.DtResultados
Dim str As New StringBuilder
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
@@ -144,8 +142,9 @@ Partial Class Inventarios_InventarioFisicoDetalle
End If
LblAlmacenes.Text = str.ToString
End If
- If Inventario.GetInventarioFisicoDetallesClasificacion(CveInventarioFisico, UsuarioActual.CveEmpresa) Then
- Dim dt As DataTable = Inventario.DtResultados
+
+ If ObjInventario.GetInventarioFisicoDetallesClasificacion(CveInventarioFisico, UsuarioActual.CveEmpresa) Then
+ Dim dt As DataTable = ObjInventario.DtResultados
Dim str As New StringBuilder
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
@@ -161,8 +160,9 @@ Partial Class Inventarios_InventarioFisicoDetalle
End If
End If
- If Inventario.GetInventarioFisicoDetallesProductosServicios(CveInventarioFisico, UsuarioActual.CveEmpresa) Then
- Dim dt As DataTable = Inventario.DtResultados
+
+ If ObjInventario.GetInventarioFisicoDetallesProductosServicios(CveInventarioFisico, UsuarioActual.CveEmpresa) Then
+ Dim dt As DataTable = ObjInventario.DtResultados
Dim str As New StringBuilder
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
@@ -179,18 +179,32 @@ Partial Class Inventarios_InventarioFisicoDetalle
End If
- If Inventario.GetInventarioFisicoDetalle(CveInventarioFisico, CveUsuario) Then
- If Inventario.DtResultados.Rows.Count > 0 Then
- GvIFDUltimoRegistrado.DataSource = Inventario.DtResultados.AsEnumerable.OrderByDescending(Function(k) k!CveInventarioFisicoDetalle).Take(1).CopyToDataTable
+ If ObjInventario.GetInventarioFisicoDetalle(CveInventarioFisico, CveUsuario) Then
+ If ObjInventario.DtResultados.Rows.Count > 0 Then
+ GvIFDUltimoRegistrado.DataSource = ObjInventario.DtResultados.AsEnumerable.OrderByDescending(Function(k) k!CveInventarioFisicoDetalle).Take(1).CopyToDataTable
Else
GvIFDUltimoRegistrado.DataSource = Nothing
End If
- DtDatos = Inventario.DtResultados
- End If
+ DtDatos = ObjInventario.DtResultados
+ End If
+ Else
+ GvIFD.Columns(6).Visible = False
+ PAgregar.Visible = False
+ BtnGuardar.Enabled = False
+ BtnGuardar.Visible = False
+ btnFin.Visible = False
+ CveSubProyecto = ObjInventario.CveSubProyectoInventario
+ lbTitulo.Text = ObjInventario.InventarioFisico
+ lbObservaciones.Text = ObjInventario.Observaciones
+ lbSubProyecto.Text = ObjInventario.SubProyectoInventario
+ lbEstatus.Text = ObjInventario.Estatus
+ lbFechaI.Text = ObjInventario.FechaI
+ lbFechaF.Text = ObjInventario.FechaF
+ Alert("Ocurrió un error al obterner el inventario fisico")
End If
- Inventario.Dispose()
+ ObjInventario.Dispose()
GvIFDUltimoRegistrado.DataBind()
'If (GvIFD.Rows.Count > 0) Then
@@ -397,20 +411,30 @@ Partial Class Inventarios_InventarioFisicoDetalle
#Region " VER AVANCE "
Protected Sub LBAvance_Click(sender As Object, e As EventArgs)
Response.Redirect($"~/Inventarios/RepAnomalias.aspx?CveInventarioFisico={CveInventarioFisico}&EsAvance=1")
- End Sub
-
-
+ End Sub
+
+
#End Region
-
+
#Region "I M P R I M I R"
Private Sub LnkPDF_Click(sender As Object, e As EventArgs) Handles LnkPDF.Click
Impimir(Formato:="PDF")
+ End Sub
+ Private Sub LnkPDFResumido_Click(sender As Object, e As EventArgs) Handles LnkPDFResumido.Click
+ Impimir(Formato:="PDF", Agrupar:=True)
End Sub
Private Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click
Impimir(Formato:="EXCEL")
End Sub
- Protected Sub Impimir(Optional Formato As String = "PDF")
+ Protected Sub Impimir(Optional Formato As String = "PDF", Optional Agrupar As Boolean = False)
+ Dim DtDatos As New DataTable
+ Dim ObjInventario As New ClsInventarios()
+ If ObjInventario.GetInventarioFisicoDetalle(CveInventarioFisico, UsuarioActual.CveUsuario, Agrupar:=Agrupar) Then
+ DtDatos = ObjInventario.DtResultados
+ End If
+ ObjInventario.Dispose()
+
If DtDatos IsNot Nothing Then
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/RepAnomalias.rdlc", UsuarioActual.Empresa.Ruta))
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
@@ -441,8 +465,8 @@ Partial Class Inventarios_InventarioFisicoDetalle
Else
Alert("No se encontraron resultado", TipoMensaje.MsgAdvertencia)
End If
- End Sub
-
+ End Sub
+
#End Region
-
+
End Class
diff --git a/Inventarios/RecepcionAlmacen.aspx.vb b/Inventarios/RecepcionAlmacen.aspx.vb
index 2c0623c7f..4bb7f050d 100644
--- a/Inventarios/RecepcionAlmacen.aspx.vb
+++ b/Inventarios/RecepcionAlmacen.aspx.vb
@@ -2111,7 +2111,17 @@ Partial Class Inventarios_RecepcionAlmacen
'ENTREGA DIRECTA
If EntregaDirecta Then
If Not ErrorMovInv Then
- CveMovtoSalidaDirecta = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, 3, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, TipoCambio:=If(DdlMonedaTC.SelectedValue.ToEntero = 1, -1, TipoCambio), MovimientoFijo:=True, CveMovimientoRelacionado:=CveMovimiento, Remision:=TxtRemision.Text, CveVendedor:=CveVendedor, CveCliente:=CveCliente)
+ Dim CveVenta As Integer = 0
+ Dim Dt As DataTable
+
+ If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
+ If ObjInventario.DtResultados.Rows.Count > 0 Then
+ Dt = ObjInventario.DtResultados
+ CveVenta = ObjInventario.DtResultados.Rows(0)("CveVenta").ToString.ToEntero
+ End If
+ End If
+
+ CveMovtoSalidaDirecta = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, 3, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, TipoCambio:=If(DdlMonedaTC.SelectedValue.ToEntero = 1, -1, TipoCambio), MovimientoFijo:=True, CveMovimientoRelacionado:=CveMovimiento, Remision:=TxtRemision.Text, CveVendedor:=CveVendedor, CveCliente:=CveCliente)
FolioSalidaDirecta = ObjInventario.Folio
If Not CveMovtoSalidaDirecta > 0 Then
@@ -2119,14 +2129,12 @@ Partial Class Inventarios_RecepcionAlmacen
End If
If Not ErrorMovInv Then
- If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
- For Each Dr As DataRow In ObjInventario.DtResultados.Rows
- If Not ObjInventario.AddMovimientoDetalle(CveMovtoSalidaDirecta, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDouble, Dr("CveAF").ToString.ToEntero, Dr("CveSeccionAlmacen").ToString.ToEntero, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
- ErrorMovInv = True
- Exit For
- End If
- Next
- End If
+ For Each Dr As DataRow In Dt.Rows
+ If Not ObjInventario.AddMovimientoDetalle(CveMovtoSalidaDirecta, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDouble, Dr("CveAF").ToString.ToEntero, Dr("CveSeccionAlmacen").ToString.ToEntero, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
+ ErrorMovInv = True
+ Exit For
+ End If
+ Next
End If
If Not ErrorMovInv Then
diff --git a/Inventarios/RepAlmacen.aspx b/Inventarios/RepAlmacen.aspx
index 589f572a3..5d4b16180 100644
--- a/Inventarios/RepAlmacen.aspx
+++ b/Inventarios/RepAlmacen.aspx
@@ -1,258 +1,277 @@
-<%@ Page Title="REPORTE DE ALMACÉN" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAlmacen.aspx.vb" Inherits="Inventarios_RepAlmacen" %>
-
-
-
-
-
-
-
- REPORTE DE ALMACÉN
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
diff --git a/Inventarios/RepAlmacen.aspx.vb b/Inventarios/RepAlmacen.aspx.vb
index 62e55a98d..6fd8c20ba 100644
--- a/Inventarios/RepAlmacen.aspx.vb
+++ b/Inventarios/RepAlmacen.aspx.vb
@@ -6,9 +6,9 @@ Imports System.Data
Imports Microsoft.Reporting.WebForms
Partial Class Inventarios_RepAlmacen
- Inherits ClsPaginas
-
-
+ Inherits ClsPaginas
+
+
#Region "PROPIEDADES"
Private Property TmpDT As DataTable
Get
@@ -25,7 +25,7 @@ Partial Class Inventarios_RepAlmacen
Set(value As DataTable)
ViewState("DtColor") = value
End Set
- End Property
+ End Property
#End Region
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then
@@ -39,6 +39,15 @@ Partial Class Inventarios_RepAlmacen
DdlTipoAlmacen.DataSource = GlobalDTTipoAlmacen(1)
DdlTipoAlmacen.DataBind()
DdlTipoAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
+
+ DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
+ DdlAlmacen.DataBind()
+ DdlAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
+
+ DdlSucursal.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, CveEstatus:=1)
+ DdlSucursal.DataBind()
+ DdlSucursal.Items.Insert(0, New ListItem("Todas", "-1"))
+
End Sub
Private Sub CargaDatos()
@@ -48,8 +57,11 @@ Partial Class Inventarios_RepAlmacen
FechaI = If(IsDate(TxtFechaI.Text.Trim()), TxtFechaI.Text.Trim(), "-1")
FechaF = If(IsDate(TxtFechaF.Text.Trim()), TxtFechaF.Text.Trim(), "-1")
Dim TipoAlmacen As String = If(DdlTipoAlmacen.GetSelectedValuesM = "", "-1", DdlTipoAlmacen.GetSelectedValuesM)
+ Dim Almacenes As String = If(DdlAlmacen.GetSelectedValuesM = "", "-1", DdlAlmacen.GetSelectedValuesM)
+ Dim CveSubProyecto As Integer = DdlSucursal.SelectedValue.ToEntero()
- If objInv.GetRepAlmacenes(FechaI, FechaF, UsuarioActual.CveEmpresa, TipoAlmacen, DdlModalidadFiltro.SelectedValue.ToEntero, ChkInventariable.Checked) Then
+ If objInv.GetRepAlmacenes(FechaI, FechaF, UsuarioActual.CveEmpresa, TipoAlmacen, DdlModalidadFiltro.SelectedValue.ToEntero, ChkInventariable.Checked,
+ Almacenes:=Almacenes, CveSubProyecto:=CveSubProyecto) Then
GVAlmacen.DataSource = objInv.DtResultados
TmpDT = objInv.DtResultados
End If
@@ -60,8 +72,9 @@ Partial Class Inventarios_RepAlmacen
Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
CargaDatos()
UpDatos.Update()
- End Sub
-
+ UPFiltros.Update()
+ End Sub
+
#Region "I M P R I M I R "
Protected Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
@@ -98,11 +111,11 @@ Partial Class Inventarios_RepAlmacen
e.Row.CssClass = "Totales"
End If
End If
- End Sub
+ End Sub
#End Region
-
+
#Region "GRAFICA"
-
+
Protected Sub LnkVerGrafica_Click(sender As Object, e As EventArgs)
If Not TmpDT IsNot Nothing AndAlso TmpDT.Rows.Count > 0 Then
Alert("No hay datos disponibles", TipoMensaje.MsgAdvertencia)
@@ -227,8 +240,8 @@ Partial Class Inventarios_RepAlmacen
Protected Sub DdlVer_SelectedIndexChanged(sender As Object, e As EventArgs)
CambioGrafica()
- End Sub
-
+ End Sub
+
#End Region
-
+
End Class
diff --git a/Inventarios/TraspasoAlmacen.aspx b/Inventarios/TraspasoAlmacen.aspx
index 234eb59d3..0dc78ba79 100644
--- a/Inventarios/TraspasoAlmacen.aspx
+++ b/Inventarios/TraspasoAlmacen.aspx
@@ -172,14 +172,14 @@
-
-
-
-
+
+
+
+
@@ -256,7 +256,8 @@
-
+
+
diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb
index 7dc7cd4a5..9a928c671 100644
--- a/Inventarios/TraspasoAlmacen.aspx.vb
+++ b/Inventarios/TraspasoAlmacen.aspx.vb
@@ -377,7 +377,7 @@ Partial Class Inventarios_TraspasoAlmacen
'Llena Choferes
Dim ObjAcar As New ClsAcarreos()
- If ObjAcar.GetChofer(-1, UsuarioActual.CveEmpresa, -1, -1) Then
+ If ObjAcar.GetChofer(-1, UsuarioActual.CveEmpresa, 1, -1) Then
DldChofer.DataSource = ObjAcar.DtResultados
DldChofer.DataBind()
End If
@@ -2408,5 +2408,19 @@ Partial Class Inventarios_TraspasoAlmacen
#End Region
+ Protected Sub DldChofer_SelectedIndexChanged(sender As Object, e As EventArgs)
+ Dim ObjAcar As New ClsAcarreos()
+ If ObjAcar.GetChofer(DldChofer.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 1, -1) Then
+ Dim dr As DataRow = ObjAcar.DtResultados.Rows(0)
+ If dr IsNot Nothing Then
+ TxtIdentificacion.Text = dr("Identificacion").ToString
+ TxtDomicilio.Text = dr("Domicilio").ToString
+ TxtTelefono.Text = dr("Telefono").ToString
+ TxtCiudad.Text = dr("Ciudad").ToString
+ TxtLicencia.Text = dr("Licencia").ToString
+ End If
+ End If
+ ObjAcar.Dispose()
+ End Sub
End Class
diff --git a/LogMail.txt b/LogMail.txt
index 00f4b2bed..f636678cd 100644
--- a/LogMail.txt
+++ b/LogMail.txt
@@ -4,4 +4,4 @@
en ClsSisMail.FinalSend(Mail ObjMail) en C:\inetpub\WWWSIGIT\App_Code\ClsSisMail.vb:línea 129
05/09/2019:12:31 p. m. From:'signotificaciones@adssistemas.mx' - Para:';' - Asunto:'Envío de complemento de pago' - CCP: '' - Adjuntos: 2
- Ocurrió un error al mandar correo.System.InvalidOperationException: Se debe especificar un destinatario.
en System.Net.Mail.SmtpClient.Send(MailMessage message)
- en ClsSisMail.FinalSend(Mail ObjMail) en C:\inetpub\WWWSIGIT\App_Code\ClsSisMail.vb:línea 129
\ No newline at end of file
+ en ClsSisMail.FinalSend(Mail ObjMail) en C:\inetpub\WWWSIGIT\App_Code\ClsSisMail.vb:línea 129
10/09/2019:12:16 p. m. From:'signotificaciones@adssistemas.mx' - Para:'DSDDS@hotmail.com' - Asunto:'SIG - La Orden Compra #26598 cambió de estatus.' - CCP: '' - Adjuntos: 0
10/09/2019:02:58 p. m. No se especifico a remitente - SIG - La Orden Compra #28107 cambió de estatus.
\ No newline at end of file
diff --git a/OS/CatEstatusOrdenServicio.aspx b/OS/CatEstatusOrdenServicio.aspx
index 4d4360e96..650836c10 100644
--- a/OS/CatEstatusOrdenServicio.aspx
+++ b/OS/CatEstatusOrdenServicio.aspx
@@ -119,7 +119,7 @@
-
+
@@ -302,70 +302,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Opciones
-
-
-
-
-
-
-
-
-
-
-
-
-
Inferior
-
-
-
-
-
Superior
-
-
-
-
-
-
-
-
Superior
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/OS/CatEstatusOrdenServicio.aspx.vb b/OS/CatEstatusOrdenServicio.aspx.vb
index c147d4075..2c6c42f99 100644
--- a/OS/CatEstatusOrdenServicio.aspx.vb
+++ b/OS/CatEstatusOrdenServicio.aspx.vb
@@ -30,7 +30,7 @@ Partial Class OS_CatEstatusOrdenServicio
Get
Return CType(ViewState("DTEstatusUsuarios"), DataTable)
End Get
- Set(value As DataTable)
+ Set(value As Data.DataTable)
ViewState("DTEstatusUsuarios") = value
End Set
End Property
@@ -39,17 +39,12 @@ Partial Class OS_CatEstatusOrdenServicio
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
+ CargaDatos()
CreaGrid("Req")
- CreaGrid("OC")
CargaGridEstatusUsuarios()
ViewState("Orden") = ""
- 'ViewState("TipoSeleccionado") = DdlTipo.SelectedValue
CveEstatuOS = -1
- CargaDatos()
-
- 'CargaProyectos()
- CargaUsuarios()
End If
End Sub
@@ -66,6 +61,12 @@ Partial Class OS_CatEstatusOrdenServicio
Else
Me.GvDatos.DataSource = Nothing
End If
+
+ If ObjEstatusOrdenServicios.GetEstatusUsuarios(-1, -1) Then
+ DTEstatusUsuarios = ObjEstatusOrdenServicios.DtResultados
+ Dim PermisosDeUsuario As DataTable = DTEstatusUsuarios
+ End If
+
OrdenaDatos()
ObjEstatusOrdenServicios.Dispose()
GvDatos.DataBind()
@@ -148,16 +149,8 @@ Partial Class OS_CatEstatusOrdenServicio
Dim Estado As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstado").Checked
Dim CveEstatusOrdenServicio As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
- 'If ObjEstatusOrdenServicios.UpdateEstatusOrdenServicio(EstatusOrdenServicio, Estado, CveEstatusOrdenServicio) Then
- ' GvDatos.EditIndex = -1
- ' ViewState("DTEstatusOrdenServicios") = ObjEstatusOrdenServicios.DtResultados '.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
- ' GlobalDTEstatusOrdenServicios = ObjEstatusOrdenServicios.DtResultados
- ' Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
- 'End If
-
ObjEstatusOrdenServicios.Dispose()
-
End Sub
#End Region
@@ -173,85 +166,50 @@ Partial Class OS_CatEstatusOrdenServicio
#End Region
#Region "Configuracion"
- Protected Sub ibOpciones1_Click(sender As Object, e As ImageClickEventArgs)
- Dim imgBtn As ImageButton = DirectCast(sender, System.Web.UI.WebControls.ImageButton)
-
- ddlSuperior.Items.Clear()
-
- If imgBtn.CommandArgument <> "" Then
- 'chkMostrarLimites.Visible = If(GlobalDTOCEstatus.FiltraParametros("CveEstatusSiguiente = " + imgBtn.CommandArgument)(0)("TipoTermino").ToString.ToEntero = 3, False, True)
- chkMostrarLimites.Style("display") = If(GlobalDTOCEstatus(UsuarioActual.CveEmpresa).FiltraParametros("CveEstatusSiguiente = " + imgBtn.CommandArgument)(0)("TipoTermino").ToString.ToEntero = 3, "none", "inline")
-
-
- 'ddlSuperior.DataSource = DTEstatusUsuarios.FiltraParametros(String.Format("CveEstatus = {0}", imgBtn.CommandArgument), "Nombre DESC")
- ddlSuperior.DataBind()
- ddlSuperior.Items.Insert(0, New ListItem("Todos los Superiores", "-1"))
- Try
- ddlSuperior.SelectedValue = hdnCveSuperior.Value
- Catch ex As Exception
-
- End Try
- tblSuperior.Visible = True
- Else
- tblSuperior.Visible = False
- End If
-
- UPSuperior.Update()
- UPPEmp.Update()
- RegistraScript("$('#DivSuperior').show(1000); PosicionaObjeto('" + imgBtn.ClientID + "','DivSuperior'); chkMostrarLimitesCambio();")
- End Sub
Private Sub CreaGrid(Tipo As String)
Dim i As Integer = 1
For Each Row As DataRow In GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).Rows
- GvEstatusUsuariosREQ.Columns(i).HeaderText = Row("EstatusOrdenServicio").ToString.ToUpper
- GvEstatusUsuariosREQ.Columns(i).FooterText = Row("CveEstatusOrdenServicio").ToString
+ GvEstatusUsuarios.Columns(i).HeaderText = Row("EstatusOrdenServicio").ToString.ToUpper
+ GvEstatusUsuarios.Columns(i).FooterText = Row("CveEstatusOrdenServicio").ToString
i += 1
Next
While i <= 10
- GvEstatusUsuariosREQ.Columns(i).Visible = False
+ GvEstatusUsuarios.Columns(i).Visible = False
i += 1
End While
End Sub
Protected Sub CargaGridEstatusUsuarios()
- GvEstatusUsuariosREQ.DataSource = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa)
- GvEstatusUsuariosREQ.DataBind()
+ GvEstatusUsuarios.DataSource = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa)
+ GvEstatusUsuarios.DataBind()
UPPEmp.Update()
End Sub
- Public Sub CargaUsuarios()
- ddlSuperior.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa)
- ddlSuperior.DataBind()
- End Sub
-
Protected Sub btnGuardarEstatusUsuariosREQ_Click(sender As Object, e As EventArgs) Handles btnGuardarEstatusUsuariosREQ.Click
Dim objEstatusOC As New ClsOS
objEstatusOC.IniciaTransacSQL()
Dim HuboErrores As Boolean = False
Dim CveSubProyecto = 59
-
- For Each Row As GridViewRow In GvEstatusUsuariosREQ.Rows
- Dim aux As String = Row.DataKey("CveUsuario").ToString
+ For Each Row As GridViewRow In GvEstatusUsuarios.Rows
Dim r As Integer = 1
For i = 0 To Row.Cells.Count - 1
- Dim CveEstatus As Integer = If(IsNumeric(GvEstatusUsuariosREQ.Columns(i).FooterText), GvEstatusUsuariosREQ.Columns(i).FooterText.ToEntero, 0)
+ Dim CveEstatus As Integer = If(IsNumeric(GvEstatusUsuarios.Columns(i).FooterText), GvEstatusUsuarios.Columns(i).FooterText.ToEntero, 0)
If CveEstatus > 0 Then
- If Row.FCCheckBox("chkEstatus" + r.ToString).Checked = False And Row.FCHiddenField("hdnCveEstatusUsuarios" + r.ToString).Value.ToEntero > 0 Then
+ If Row.FCCheckBox("chkEstatus" + r.ToString).Checked = False Then
'Eliminar el registro existente
- If Not objEstatusOC.RemoveEstatusUsuarios(Row.FCHiddenField("hdnCveEstatusUsuarios" + r.ToString).Value.ToEntero) Then
+ If Not objEstatusOC.RemoveEstatusUsuarios(CveEstatus, Row.DataKey("CveUsuario").ToString.ToEntero) Then
HuboErrores = True
Exit For
End If
ElseIf Row.FCCheckBox("chkEstatus" + r.ToString).Checked = True Then
- 'And Row.FCHiddenField("hdnCveEstatusUsuarios" + r.ToString).Value.ToEntero = -1
'Guardado masivo cuando sea SubProyecto "Todos"
If CveSubProyecto = -2 Then
For Each dr As DataRow In GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).Rows
@@ -292,7 +250,25 @@ Partial Class OS_CatEstatusOrdenServicio
End If
objEstatusOC.Dispose()
+ CargaDatos()
CargaGridEstatusUsuarios()
End Sub
+
+ Protected Sub GvEstatusUsuarios_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEstatusUsuarios.RowDataBound
+ If e.Row.RowType = DataControlRowType.DataRow Then
+ Dim PermisosDeUsuario As DataTable = DTEstatusUsuarios.FiltraParametros(String.Format("CveUsuario = {0}", e.Row.DBCampo("CveUsuario").ToString))
+ Dim CveUsuario As String = e.Row.DBCampo("CveUsuario").ToString
+ For i As Integer = 1 To 10
+ Dim CveEstatus As Integer = GvEstatusUsuarios.Columns(i).FooterText.ToEntero
+ If CveEstatus > 0 Then
+ Dim auxiliarBandera As DataRow = PermisosDeUsuario.FiltroPrimero(String.Format("CveEstatusOrdenServicio = {0}", CveEstatus.ToString))
+ If auxiliarBandera IsNot Nothing Then
+ Dim chkEstatus As CheckBox = e.Row.FCCheckBox(String.Format("chkEstatus{0}", i))
+ chkEstatus.Checked = True
+ End If
+ End If
+ Next
+ End If
+ End Sub
#End Region
End Class
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index fc07aca1c..857438dcd 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -9370,8 +9370,8 @@ Partial Class Ventas
Importe91 = Dr("Importe").ToString.ToDecimal
ImporteMN91 = Dr("Importe").ToString.ToDecimal * TipoCambioNC
ElseIf DdlMoneda.SelectedValue.ToEntero = 1 AndAlso Dr("TCCambioValuacion").ToString.ToDecimal > 1 Then
- Importe251 = Dr("Importe").ToString.ToDecimal
- Importe91 = Dr("Importe").ToString.ToDecimal
+
+ Importe91 = Dr("Importe").ToString.ToDecimal / TipoCambioNC
ImporteMN91 = Dr("Importe").ToString.ToDecimal
End If
@@ -9385,7 +9385,8 @@ Partial Class Ventas
ElseIf DdlMoneda.SelectedValue.ToEntero = 2 AndAlso Dr("TCCambioValuacion").ToString.ToDecimal > 1 Then
ImporteMN251 = Dr("Importe").ToString.ToDecimal * TCFluctuacion
ElseIf DdlMoneda.SelectedValue.ToEntero = 1 AndAlso Dr("TCCambioValuacion").ToString.ToDecimal > 1 Then
- ImporteMN251 = Dr("Importe").ToString.ToDecimal / TipoCambioNC
+ Importe251 = Dr("Importe").ToString.ToDecimal / TCFluctuacion
+ ImporteMN251 = Dr("Importe").ToString.ToDecimal
Else
ImporteMN251 = Dr("Importe").ToString.ToDecimal
End If
@@ -16526,18 +16527,32 @@ Partial Class Ventas
End Sub
Protected Sub LBDevolucionAlmacen_Click(sender As Object, e As EventArgs)
Dim ObjVentas As New ClsVentas
+ If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
+ If ObjVentas.DtResultados.Rows.Count > 0 Then
+ Dim DbRowVenta As DataRow = ObjVentas.DtResultados.Rows(0)
+ Me.DevolucionAlmacen = DbRowVenta("EsDevolucionVenta").ToString.ToEntero
+ End If
+ End If
- Dim EstatusDevolucion = If(DevolucionAlmacen = 0, 1, 0)
+ If Me.DevolucionAlmacen.Contiene(2) Then
+ InicializaDevolucionAlmacen()
+ UpnTools.Update()
+ Alert("El movimiento ya fue devuelto.", TipoMensaje.MsgAdvertencia)
+ ObjVentas.Dispose()
+ Exit Sub
+ End If
+
+ Dim EstatusDevolucion = If(Me.DevolucionAlmacen = 0, 1, 0)
If ObjVentas.UpdateVentasDevolucionAlmacen(EstatusDevolucion, CveVenta) Then
Alert("La solicitud de Devolución de Almacén se guardó correctamente")
End If
+ ObjVentas.Dispose()
- DevolucionAlmacen = EstatusDevolucion
+ Me.DevolucionAlmacen = EstatusDevolucion
InicializaDevolucionAlmacen()
UpnTools.Update()
- ObjVentas.Dispose()
End Sub
#End Region
@@ -19928,7 +19943,7 @@ Partial Class Ventas
Private Sub CargaCxC()
Dim ObjMovtos As New ClsMovimientos()
- If ObjMovtos.GetCxCClienteDetalle(ViewState("CveCliente").ToString.ToEntero, "-1", "-1", DdlMoneda.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa, DdlSucursalCliente.SelectedValue.ToEntero) Then
+ If ObjMovtos.GetCxCClienteDetalle(ViewState("CveCliente").ToString.ToEntero, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa, DdlSucursalCliente.SelectedValue.ToEntero) Then
Dim DtTemporal As DataTable = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act' AND CveVenta > 0", "Moneda, OrdenVencimiento, FechaVencimiento")
GvCxC.DataSource = DtTemporal
End If