diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb
index 911f89a07..4085f9b24 100644
--- a/App_Code/ClsContabilidad.vb
+++ b/App_Code/ClsContabilidad.vb
@@ -253,7 +253,7 @@ Public Class ClsContabilidad
Public Function UpdatePrepolizasDetalle(CvePrePolizaDetalle As Integer, Concepto As String, CveSubProyecto As Integer, IdCtaContable As Integer, TipoMovto As Boolean, ImporteMN As Decimal, Optional CveTipoGasto As Integer = -1,
Optional CveConceptoContable As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveCompra As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveCliente As Integer = -1, Optional CveVenta As Integer = -1,
- Optional Referencia As String = "-1") As Boolean
+ Optional Referencia As String = "-1", Optional CveUsuarioModifico As Integer = -1) As Boolean
Dim Retorno As Boolean = False
@@ -274,6 +274,7 @@ Public Class ClsContabilidad
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
+ .Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
End With
Try
@@ -1360,7 +1361,7 @@ Public Class ClsContabilidad
End If
If Not OcurrioError Then
- If Not UpdatePrePoliza(Fecha, ObjConta.Folio, CveTipoPoliza, tIdPoliza, CvePrePoliza, Empresa.CveEmpresa) Then
+ If Not UpdatePrePoliza(Fecha, ObjConta.Folio, CveTipoPoliza, tIdPoliza, CvePrePoliza, Empresa.CveEmpresa, CveUsuarioModifico:=CveUsuario) Then
OcurrioError = True
End If
End If
@@ -1506,7 +1507,8 @@ Public Class ClsContabilidad
End Function
- Public Function UpdatePrePoliza(FechaConta As Date, FolioPoliza As Integer, CveTipoPoliza As Integer, IdPoliza As Integer, CvePrePoliza As Integer, CveEmpresa As Integer, Optional Concepto As String = "-1", Optional FechaPoliza As Date = MinFecha, Optional xxx As Integer = -1) As Boolean
+ Public Function UpdatePrePoliza(FechaConta As Date, FolioPoliza As Integer, CveTipoPoliza As Integer, IdPoliza As Integer, CvePrePoliza As Integer, CveEmpresa As Integer,
+ Optional Concepto As String = "-1", Optional FechaPoliza As Date = MinFecha, Optional xxx As Integer = -1, Optional CveUsuarioModifico As Integer = -1) As Boolean
Dim Retorno As Boolean = False
@@ -1521,6 +1523,7 @@ Public Class ClsContabilidad
.Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
.Add("@Concepto", SqlDbType.VarChar).Value = Concepto
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
End With
Try
diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb
index 69f64de00..2b82c5a1b 100644
--- a/App_Code/ClsGenerales.vb
+++ b/App_Code/ClsGenerales.vb
@@ -2410,7 +2410,7 @@ Public Class ClsGenerales
Public Function GetHistorialBitacora(CveAcarreo As Integer, CveOrdenCompra As Integer, CveActivoFijo As Integer,
CveOS As Integer, CvePS As Integer, CveCompra As Integer, CveIE As Integer,
CveEmpresa As Integer, Optional CveUsuario As Integer = -1, Optional CvePersonal As Integer = -1,
- Optional IdPoliza As Integer = -1) As Boolean
+ Optional IdPoliza As Integer = -1, Optional CvePrePoliza As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Gral_HistorialBitacoraGet")
@@ -2422,6 +2422,7 @@ Public Class ClsGenerales
.Add("@CvePS", SqlDbType.Int).Value = CvePS
.Add("@CveCompra", SqlDbType.Int).Value = CveCompra
.Add("@CveIE", SqlDbType.Int).Value = CveIE
+ .Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
diff --git a/App_Code/ClsMovimientos.vb b/App_Code/ClsMovimientos.vb
index 845ac3d6b..836be534b 100644
--- a/App_Code/ClsMovimientos.vb
+++ b/App_Code/ClsMovimientos.vb
@@ -319,7 +319,7 @@ Public Class ClsMovimientos
End Function
Public Function GetCxCDetalle(FechaI As String, FechaF As String, CveCliente As Integer, CveSubProyecto As Integer, CveVendedor As Integer, CveUsuario As Integer, Anio As Integer, Mes As Integer,
- AnioMes As String, Fecha As String, CveClienteSucursal As Integer, Opcion As String, CveEstatus As Integer, IVA As String, Agrupador As Integer, CveEmpresa As Integer,
+ AnioMes As String, Fecha As String, CveClienteSucursal As Integer, Opcion As String, CveEstatus As Integer, IVA As String, Agrupador As Integer, CveEmpresa As Integer,
CveResponsable As Integer, TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional TipoDocto As String = "-1",
Optional FechaVI As String = "-1", Optional FechaVF As String = "1", Optional FechaCorte As Date = Nothing, Optional CveUsuarioConsulta As Integer = -1,
Optional CveCobranzaEstatus As Integer = -1, Optional CveClienteClasificacion As Integer = -1, Optional LimiteCredito As Decimal = -1,
@@ -361,10 +361,10 @@ Public Class ClsMovimientos
.Add("@CveCobranzaEstatus", SqlDbType.Int).Value = CveCobranzaEstatus
.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion
.Add("@LimiteCredito", SqlDbType.Float).Value = LimiteCredito
- .Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
- .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
- .Add("@EstatusCliente", SqlDbType.Int).Value = EstatusCliente
-
+ .Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
+ .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
+ .Add("@EstatusCliente", SqlDbType.Int).Value = EstatusCliente
+
End With
Try
@@ -545,7 +545,7 @@ Public Class ClsMovimientos
- Try
+ Try
SqlAdapter.SelectCommand.CommandTimeout = 0
SqlAdapter.Fill(Data)
@@ -863,8 +863,8 @@ Public Class ClsMovimientos
DataAdapter("PA_Banc_ReporteChequesFYEGet")
With SqlAdapter.SelectCommand.Parameters
- .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
- .Add("@FechaI", SqlDbType.DateTime).Value = FechaI
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@FechaI", SqlDbType.DateTime).Value = FechaI
.Add("@FechaF", SqlDbType.DateTime).Value = FechaF
End With
@@ -1190,9 +1190,9 @@ Public Class ClsMovimientos
Public Function GetCxPDetalle(FechaI As String, FechaF As String, CveProveedor As Integer, CveProveedorClasificacion As Integer, CveProveedorSucursal As Integer, CveUsuario As Integer,
CveUsuarioResponsable As Integer, Anio As Integer, Mes As Integer, AnioMes As String, CveMoneda As Integer, CveSubProyecto As Integer,
- CveEstatusFactura As Integer, Fecha As String, Agrupador As Integer, Opcion As String, CveEmpresa As Integer, CveSucursal As Integer,
- TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional FechaVI As String = "-1", Optional FechaVF As String = "1",
- Optional FechaCorte As Date = Nothing, Optional CveUsuarioConsulta As Integer = -1, Optional CveTipoProveedor As Integer = -1,
+ CveEstatusFactura As Integer, Fecha As String, Agrupador As Integer, Opcion As String, CveEmpresa As Integer, CveSucursal As Integer,
+ TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional FechaVI As String = "-1", Optional FechaVF As String = "1",
+ Optional FechaCorte As Date = Nothing, Optional CveUsuarioConsulta As Integer = -1, Optional CveTipoProveedor As Integer = -1,
Optional Comprobaciones As Integer = -1, Optional AplicaNC As Integer = -1) As Boolean
Dim Retorno As Boolean = False
@@ -1292,8 +1292,8 @@ Public Class ClsMovimientos
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
.Add("@CveCajaChica", SqlDbType.Int).Value = CveCajaChica
- .Add("@NumeroReembolso", SqlDbType.VarChar).Value = NumeroReembolso
- .Add("@FechaI", SqlDbType.DateTime).Value = FechaI
+ .Add("@NumeroReembolso", SqlDbType.VarChar).Value = NumeroReembolso
+ .Add("@FechaI", SqlDbType.DateTime).Value = FechaI
.Add("@FechaF", SqlDbType.DateTime).Value = FechaF
End With
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index e124244e4..c8384b872 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -3786,6 +3786,7 @@ Public Class ClsPaginas
PaginaDict.Add("/Prospectos/PopUpBuscarProspectos.aspx".ToUpper(), -1)
PaginaDict.Add("/Sistemas/PopUpCambiaUsuario.aspx".ToUpper(), -1)
+ PaginaDict.Add("/Sistemas/PopUpCambiaUsuarioEmpresa.aspx".ToUpper(), -1)
PaginaDict.Add("/Sistemas/CatDistribuidores.aspx".ToUpper(), -1)
PaginaDict.Add("/Sistemas/CatPlataformas.aspx".ToUpper(), -1)
PaginaDict.Add("/Sistemas/PopUpAddUsuario.aspx".ToUpper(), -1)
diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb
index 0ca3ae809..a654c7650 100644
--- a/App_Code/ClsVentas.vb
+++ b/App_Code/ClsVentas.vb
@@ -1620,7 +1620,7 @@ Public Class ClsVentas
Public Function GetRepPSEcono(CveSubProyecto As Integer, CvePS As Integer, FechaI As Date, FechaF As Date, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1, Optional GPO As Integer = -1,
Optional CveMoneda As Integer = -1, Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = 0,
- Optional Clasificacion As String = "-1", Optional Linea As String = "-1", Optional Marca As String = "-1") As Boolean
+ Optional Clasificacion As String = "-1", Optional Linea As String = "-1", Optional Marca As String = "-1", Optional orden As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_RepPSEconoGet")
@@ -1638,6 +1638,7 @@ Public Class ClsVentas
.Add("@Clasificacion", SqlDbType.VarChar).Value = Clasificacion
.Add("@Linea", SqlDbType.VarChar).Value = Linea
.Add("@Marca", SqlDbType.VarChar).Value = Marca
+ .Add("@Orden", SqlDbType.VarChar).Value = orden
End With
Try
diff --git a/App_Code/Usuario.vb b/App_Code/Usuario.vb
index 76c8a15e6..3a6066805 100644
--- a/App_Code/Usuario.vb
+++ b/App_Code/Usuario.vb
@@ -71,6 +71,16 @@ Public Class Usuario
End If
End Get
End Property
+ Private _modoSimulacionXEmpresa As Boolean = False
+ Public Property ModoSimulacionXEmpresa As Boolean
+ Get
+ Return Not ModoSimulacion AndAlso (_modoSimulacionXEmpresa OrElse TienePermisoProceso(308))
+ End Get
+ Set(value As Boolean)
+
+ _modoSimulacionXEmpresa = value
+ End Set
+ End Property
Public Property Sesion(Campo As String) As String
Get
diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx
index 4afd58c6e..2edbabca2 100644
--- a/Compras/Compras.aspx
+++ b/Compras/Compras.aspx
@@ -37,9 +37,6 @@
Los cambios se realizaran al dar click en vincular
@@ -5112,8 +5100,14 @@
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index 3c40bd9b8..14d802679 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -1533,7 +1533,7 @@ Partial Class Compras_Compras
If UsuarioActual.Empresa.CvePlataforma = 2 Then
TabActivosFijos.Visible = False
VerRefacturacion.Visible = False
- liServicios.Visible = False
+ 'liServicios.Visible = False
DivConsignaciones.Visible = False
End If
CargarCentrosDeCosto(DdlAsignarProyecto, DdlAsignaSubProyecto, LitHProyecto, LblSubProyectoHeader)
@@ -9545,7 +9545,7 @@ Partial Class Compras_Compras
Retorno = False
End If
- If Not ObjContabilidad.UpdatePrePoliza(MinFecha, -1, -1, Nothing, CvePrePoliza, UsuarioActual.CveEmpresa) Then
+ If Not ObjContabilidad.UpdatePrePoliza(MinFecha, -1, -1, Nothing, CvePrePoliza, UsuarioActual.CveEmpresa, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
Retorno = False
End If
End If
@@ -9987,7 +9987,7 @@ Partial Class Compras_Compras
Retorno = False
End If
- If Not ObjContabilidad.UpdatePrePoliza(MinFecha, -1, -1, IdPoliza, CvePrePoliza, UsuarioActual.CveEmpresa) Then
+ If Not ObjContabilidad.UpdatePrePoliza(MinFecha, -1, -1, IdPoliza, CvePrePoliza, UsuarioActual.CveEmpresa, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
Retorno = False
End If
End If
@@ -14642,7 +14642,7 @@ Partial Class Compras_Compras
dt = ObjContabilidad.DtResultados
For Each dr As DataRow In dt.Rows
- If Not ObjContabilidad.UpdatePrepolizasDetalle(dr("CvePrePolizaDetalle").ToString.ToEntero, dr("Concepto").ToString, dr("CveSubProyecto").ToString.ToEntero, dr("IdCtaContable").ToString.ToEntero, CBool(dr("TipoMovto").ToString), 0) Then
+ If Not ObjContabilidad.UpdatePrepolizasDetalle(dr("CvePrePolizaDetalle").ToString.ToEntero, dr("Concepto").ToString, dr("CveSubProyecto").ToString.ToEntero, dr("IdCtaContable").ToString.ToEntero, CBool(dr("TipoMovto").ToString), 0, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
ErrorCancelar = True : Exit For
End If
Next
@@ -15892,71 +15892,71 @@ Partial Class Compras_Compras
End Sub
Protected Sub BtnFiltrar_Click(sender As Object, e As EventArgs)
- If DdlTipo.SelectedValue.ToEntero = 1 Then
+ 'POR SI LLEGARA A TRONAR
+ If DtServicios Is Nothing Then CreaDTServicios()
+ DtServicios.Rows.Clear()
- 'POR SI LLEGARA A TRONAR
- If DtServicios Is Nothing Then CreaDTServicios()
- DtServicios.Rows.Clear()
+ Dim objps As New ClsProductosServicios
+ Dim dr As DataRow
+ dvFacturas.Visible = False
+ GvFacturas.Visible = False
- Dim objps As New ClsProductosServicios
- Dim dr As DataRow
- dvFacturas.Visible = False
- GvFacturas.Visible = False
-
- For Each DrGv As DataRow In TmpDT.Rows
- If DrGv("CvePS").ToString.ToEntero > 0 Then
- If objps.GetPS(DrGv("CvePS").ToString.ToEntero, -1, UsuarioActual.CveEmpresa) Then
- If objps.DtResultados(0)("CveTipoPS").ToString.ToEntero = 1 Then
- dr = DtServicios.NewRow()
- dr("Consec") = DrGv("Consec").ToString.ToEntero
- dr("Total") = DrGv("Total").ToString.ToDecimal
- dr("CvePS") = DrGv("CvePS").ToString.ToEntero
- dr("PS") = DrGv("PS").ToString
- DtServicios.Rows.Add(dr)
- End If
+ For Each DrGv As DataRow In TmpDT.Rows
+ If DrGv("CvePS").ToString.ToEntero > 0 Then
+ If objps.GetPS(DrGv("CvePS").ToString.ToEntero, -1, UsuarioActual.CveEmpresa) Then
+ If objps.DtResultados(0)("CveTipoPS").ToString.ToEntero = 1 Then
+ dr = DtServicios.NewRow()
+ dr("Consec") = DrGv("Consec").ToString.ToEntero
+ dr("Total") = DrGv("Total").ToString.ToDecimal
+ dr("CvePS") = DrGv("CvePS").ToString.ToEntero
+ dr("PS") = DrGv("PS").ToString
+ DtServicios.Rows.Add(dr)
End If
End If
- Next
-
- '[IPP] COMENTADO - MIRAS DE ELIMINAR - 8/FEBRERO/2018
- 'For Each gvr As GridViewRow In GvPS.Rows
- ' If objps.GetPS(gvr.DataKey("CvePS").ToEntero, -1, UsuarioActual.CveEmpresa) Then
- ' If objps.DtResultados(0)("CveTipoPS").ToString.ToEntero = 1 Then
- ' dr = DtServicios.NewRow()
- ' dr("Consec") = gvr.FCLabel("LtlConsecutivo").Text.ToEntero
- ' dr("Total") = gvr.FCLiteral("LtlTotal").Text.ToDecimal
- ' dr("PS") = gvr.DataKey("PS").ToString
- ' DtServicios.Rows.Add(dr)
- ' End If
- ' End If
- 'Next
- objps.Dispose()
-
- If DtServicios.Rows.Count > 0 Then
- GVServicios.DataSource = DtServicios
- GVServicios.DataBind()
- GVServicios.Visible = True
- Else
- GVServicios.DataSource = Nothing
- GVServicios.DataBind()
End If
+ Next
- UpGVServicios.Update()
- UpFacturas.Update()
- UPGVFacturas.Update()
-
- ElseIf DdlTipo.SelectedValue.ToEntero = 2 Then
- GVServicios.Visible = False
- dvFacturas.Visible = True
- DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
- DdlProveedores.DataBind()
- DdlProveedores.Items.Insert(0, New ListItem("Seleccione", "-1"))
- UpFacturas.Update()
- UpGVServicios.Update()
-
+ '[IPP] COMENTADO - MIRAS DE ELIMINAR - 8/FEBRERO/2018
+ 'For Each gvr As GridViewRow In GvPS.Rows
+ ' If objps.GetPS(gvr.DataKey("CvePS").ToEntero, -1, UsuarioActual.CveEmpresa) Then
+ ' If objps.DtResultados(0)("CveTipoPS").ToString.ToEntero = 1 Then
+ ' dr = DtServicios.NewRow()
+ ' dr("Consec") = gvr.FCLabel("LtlConsecutivo").Text.ToEntero
+ ' dr("Total") = gvr.FCLiteral("LtlTotal").Text.ToDecimal
+ ' dr("PS") = gvr.DataKey("PS").ToString
+ ' DtServicios.Rows.Add(dr)
+ ' End If
+ ' End If
+ 'Next
+ objps.Dispose()
+ If DtServicios.Rows.Count > 0 Then
+ GVServicios.DataSource = DtServicios
+ GVServicios.DataBind()
+ GVServicios.Visible = True
+ Else
+ GVServicios.DataSource = Nothing
+ GVServicios.DataBind()
End If
+ UpGVServicios.Update()
+ UpFacturas.Update()
+ UPGVFacturas.Update()
+ 'If DdlTipo.SelectedValue.ToEntero = 1 Then
+
+
+ 'ElseIf DdlTipo.SelectedValue.ToEntero = 2 Then
+ ' GVServicios.Visible = False
+ ' dvFacturas.Visible = True
+ ' DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
+ ' DdlProveedores.DataBind()
+ ' DdlProveedores.Items.Insert(0, New ListItem("Seleccione", "-1"))
+ ' UpFacturas.Update()
+ ' UpGVServicios.Update()
+
+
+ 'End If
+
End Sub
Public Sub btnAgregarFlete_Click(sender As Object, e As EventArgs) Handles BtnAgregarFlete.Click
@@ -16212,7 +16212,7 @@ Partial Class Compras_Compras
End If
If UsuarioActual.Empresa.UsaInventarios And UsuarioActual.Empresa.CvePlataforma <> 2 Then
- liServicios.Visible = True
+ 'liServicios.Visible = True
liFletesImportaciones.Visible = True
End If
@@ -20040,6 +20040,17 @@ Partial Class Compras_Compras
End If
End Sub
+ Protected Sub RblGastosVincularCrear_Click(sender As Object, e As EventArgs)
+ Dim MostrarGastosServicios As Boolean = RblGastosVincularCrear.SelectedValue = "1"
+
+ DivGastosyServicios.Visible = MostrarGastosServicios
+ DivGastosyServiciosFooter.Visible = MostrarGastosServicios
+
+ DivVincularCrear.Visible = Not MostrarGastosServicios
+ DivVincularCrearFooter.Visible = Not MostrarGastosServicios
+
+ End Sub
+
End Class
diff --git a/Contabilidad/RegPoliza.aspx.vb b/Contabilidad/RegPoliza.aspx.vb
index 4aa040ece..42de3dde7 100644
--- a/Contabilidad/RegPoliza.aspx.vb
+++ b/Contabilidad/RegPoliza.aspx.vb
@@ -1143,7 +1143,7 @@ Partial Class RegPoliza
End If
End If
- If Not ObjContabilidad.UpdatePrePoliza(TxtFechaPoliza.Text.ToDate, TxtNumeroPoliza.Text.ToEntero, DdlTipoPoliza.SelectedValue.ToEntero, IDPoliza, CvePrePoliza, UsuarioActual.CveEmpresa, TxtConcepto.Text.Trim, TxtFechaPoliza.Text.ToDate) Then
+ If Not ObjContabilidad.UpdatePrePoliza(TxtFechaPoliza.Text.ToDate, TxtNumeroPoliza.Text.ToEntero, DdlTipoPoliza.SelectedValue.ToEntero, IDPoliza, CvePrePoliza, UsuarioActual.CveEmpresa, TxtConcepto.Text.Trim, TxtFechaPoliza.Text.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
OcurrioError = True
End If
diff --git a/Contabilidad/RegPrePoliza.aspx b/Contabilidad/RegPrePoliza.aspx
index 691ac28d4..734a5ec1a 100644
--- a/Contabilidad/RegPrePoliza.aspx
+++ b/Contabilidad/RegPrePoliza.aspx
@@ -497,6 +497,42 @@
+
+
+
+
+
+
+
+
+ Historial de Modificación
+
+
+
+
+
+
+
+
+
+
+ Fecha
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Contabilidad/RegPrePoliza.aspx.vb b/Contabilidad/RegPrePoliza.aspx.vb
index 8286d7e17..914c95ef6 100644
--- a/Contabilidad/RegPrePoliza.aspx.vb
+++ b/Contabilidad/RegPrePoliza.aspx.vb
@@ -209,6 +209,7 @@ Partial Class ContabilidadC_RegPrePoliza
ViewState("CvePrePoliza") = Request("CvePrePoliza").ToEntero
CreaDT()
CargaPrePoliza()
+ CargaGvBitacora()
If IfNull(Request("Tipo"), "").ToString <> "NOMPROV" Then
GvPrePoliza.Columns(4).Visible = False
GvConcepto.Columns(4).Visible = False
@@ -463,9 +464,10 @@ Partial Class ContabilidadC_RegPrePoliza
End If
End If
-
+ CargaGvBitacora()
ObjContabilidad.Dispose()
UpPoliza.Update()
+ UpBitacora.Update()
End Sub
Private Sub GvPrePoliza_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvPrePoliza.RowDataBound
@@ -536,7 +538,7 @@ Partial Class ContabilidadC_RegPrePoliza
End Sub
Private Sub DdlConceptosContables_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlConceptosContables.SelectedIndexChanged
- If DdlConceptosContables.SelectedValue.ToEntero.Contiene(5, 17, 201, 206, 14, 15, 16, 19, 25, 26, 21) Then
+ If DdlConceptosContables.SelectedValue.ToEntero.Contiene(5, 17, 201, 205, 206, 14, 15, 16, 19, 25, 26, 21) Then
CargaProveedores()
DdlProveedores.Visible = True
DdlCompras.Visible = True
@@ -1011,7 +1013,7 @@ Partial Class ContabilidadC_RegPrePoliza
- If ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate) Then
+ If ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
@@ -1019,7 +1021,7 @@ Partial Class ContabilidadC_RegPrePoliza
If row.DataKey("CvePrePolizaDetalle").ToEntero > 0 Then
If Not ObjContabilidad.UpdatePrepolizasDetalle(row.DataKey("CvePrePolizaDetalle").ToEntero, row.FCTextBox("TxtConcepto").Text, row.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero,
row.FCDropDownList("DdlCtaContable").SelectedValue.ToEntero, If(row.FCTextBox("TxtCargo").Text.ToDecimal <> 0, False, True), If(row.FCTextBox("TxtCargo").Text.ToDecimal <> 0,
- row.FCTextBox("TxtCargo").Text.ToDecimal, row.FCTextBox("TxtAbono").Text.ToDecimal), CveTipoGasto:=If(DdlTipoGasto.Visible, row.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero, row.DataKey("CveTipoGasto").ToEntero)) Then
+ row.FCTextBox("TxtCargo").Text.ToDecimal, row.FCTextBox("TxtAbono").Text.ToDecimal), CveTipoGasto:=If(DdlTipoGasto.Visible, row.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero, row.DataKey("CveTipoGasto").ToEntero), CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
OcurrioError = True
Exit For
End If
@@ -1643,5 +1645,15 @@ Partial Class ContabilidadC_RegPrePoliza
End If
ObjCompras.Dispose()
End Sub
+
+ Private Sub CargaGvBitacora()
+ ' COMENTADO POR IPP PARA SUBIR 5 ABRIL 2017
+ Dim ObjGral As New ClsGenerales()
+ If ObjGral.GetHistorialBitacora(-1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa, CvePrePoliza:=CvePrePoliza) Then
+ GvBitacora.DataSource = ObjGral.DtResultados
+ GvBitacora.DataBind()
+ End If
+ ObjGral.Dispose()
+ End Sub
End Class
diff --git a/Contabilidad/RegPrePoliza1.aspx.vb b/Contabilidad/RegPrePoliza1.aspx.vb
index cee888e0f..bfa0a695d 100644
--- a/Contabilidad/RegPrePoliza1.aspx.vb
+++ b/Contabilidad/RegPrePoliza1.aspx.vb
@@ -926,7 +926,7 @@ Partial Class ContabilidadC_RegPrePoliza
Dim ObjContabilidad As New ClsContabilidad
ObjContabilidad.IniciaTransacSQL()
- ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate)
+ ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario)
For Each row As GridViewRow In GvPrePoliza.Rows
If row.DataKey("CvePrePolizaDetalle").ToEntero > 0 Then
@@ -934,7 +934,7 @@ Partial Class ContabilidadC_RegPrePoliza
row.DataKey("IdCtaContable").ToEntero, If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, False, True), If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0,
row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), CveTipoGasto:=If(DdlTipoGasto.Visible, row.DataKey("CveTipoGasto").ToEntero, row.DataKey("CveTipoGasto").ToEntero),
CveConceptoContable:=row.DataKey("CveConceptoContable").ToEntero, CveProveedor:=row.DataKey("CveProveedor").ToEntero, CveCompra:=row.DataKey("CveCompra").ToEntero,
- CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero, CvePersonal:=row.DataKey("CvePersonal").ToEntero, Referencia:=row.FCLiteral("TxtRef").Text) Then
+ CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero, CvePersonal:=row.DataKey("CvePersonal").ToEntero, Referencia:=row.FCLiteral("TxtRef").Text, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
OcurrioError = True
Exit For
End If
diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb
index 55009d5a3..074017309 100644
--- a/Contabilidad/RegPrePolizaS.aspx.vb
+++ b/Contabilidad/RegPrePolizaS.aspx.vb
@@ -914,7 +914,7 @@ Partial Class ContabilidadC_RegPrePolizaS
Dim ObjContabilidad As New ClsContabilidad
ObjContabilidad.IniciaTransacSQL()
- ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate)
+ ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario)
For Each row As GridViewRow In GvPrePoliza.Rows
If row.DataKey("CvePrePolizaDetalle").ToEntero > 0 Then
@@ -922,7 +922,7 @@ Partial Class ContabilidadC_RegPrePolizaS
row.DataKey("IdCtaContable").ToEntero, If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, False, True), If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0,
row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), CveTipoGasto:=If(DdlTipoGasto.Visible, row.DataKey("CveTipoGasto").ToEntero, row.DataKey("CveTipoGasto").ToEntero),
CveConceptoContable:=row.DataKey("CveConceptoContable").ToEntero, CveProveedor:=row.DataKey("CveProveedor").ToEntero, CveCompra:=row.DataKey("CveCompra").ToEntero,
- CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero, CvePersonal:=row.DataKey("CvePersonal").ToEntero, Referencia:=row.FCLiteral("TxtRef").Text) Then
+ CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero, CvePersonal:=row.DataKey("CvePersonal").ToEntero, Referencia:=row.FCLiteral("TxtRef").Text, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
OcurrioError = True
Exit For
End If
diff --git a/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx.vb b/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx.vb
index 6d168533d..77d5c0459 100644
--- a/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx.vb
+++ b/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx.vb
@@ -130,11 +130,11 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
TxtFechaDel.Text = FechaInicio.ToShortDateString
End If
- 'If Request("CveSubProyecto") IsNot Nothing Then
- ' If IsNumeric(Request("CveSubProyecto")) Then
- ' CveSubProyecto = Request("CveSubProyecto").ToString
- ' End If
- 'End If
+ If Request("CveSubProyecto") IsNot Nothing Then
+ If IsNumeric(Request("CveSubProyecto")) Then
+ DdlSubproyecto.SelectedValueExist(Request("CveSubProyecto").ToString)
+ End If
+ End If
ErrorParametros = False
diff --git a/Inventarios/EntregaAlmacen.aspx b/Inventarios/EntregaAlmacen.aspx
index 8d4ff3ea1..f3198fa5e 100644
--- a/Inventarios/EntregaAlmacen.aspx
+++ b/Inventarios/EntregaAlmacen.aspx
@@ -1,4 +1,4 @@
-<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="EntregaAlmacen.aspx.vb" Inherits="Inventarios_EntregaAlmacen" %>
+<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="EntregaAlmacen.aspx.vb" Inherits="Inventarios_EntregaAlmacen" enableEventValidation="false" %>
diff --git a/Inventarios/ResguardoMaterial.aspx.vb b/Inventarios/ResguardoMaterial.aspx.vb
index 460a99f76..320899cee 100644
--- a/Inventarios/ResguardoMaterial.aspx.vb
+++ b/Inventarios/ResguardoMaterial.aspx.vb
@@ -346,6 +346,11 @@ Partial Class Inventarios_ResguardoMaterial
ThSerie.Visible = True
TrSerie.Visible = True
TxtnSerie.Visible = True
+ Else
+ ThSerie.Visible = False
+ TrSerie.Visible = False
+ TxtnSerie.Visible = False
+ TxtnSerie.Text = ""
End If
'activa seccion
@@ -368,13 +373,19 @@ Partial Class Inventarios_ResguardoMaterial
If CBool(drp("AplicaLote")) Then
ThLote.Visible = True
TrLote.Visible = True
- 'TxtLote.Visible = True
+ Else
+ ThLote.Visible = False
+ TrLote.Visible = False
+ TxtLote.Text = ""
End If
'activa caducidad
If CBool(drp("AplicaCaducidad")) Then
ThCaducidad.Visible = True
TrCaducidad.Visible = True
- 'TxtCaducidad.Visible = True
+ Else
+ ThCaducidad.Visible = False
+ TrCaducidad.Visible = False
+ TxtCaducidad.Text = ""
End If
Else
diff --git a/Inventarios/TrasladoSolicitud.aspx b/Inventarios/TrasladoSolicitud.aspx
index a210fbb38..5e5b351c2 100644
--- a/Inventarios/TrasladoSolicitud.aspx
+++ b/Inventarios/TrasladoSolicitud.aspx
@@ -259,8 +259,7 @@
data-toggle="confirmation" data-popout="true" data-original-title="¿Confirmar autorización?" data-btn-ok-label="Si" OnClick="LnkAceptarTraslado_Click">
-
+
@@ -500,6 +499,51 @@
+
+
+
+
+
+
+
+
+
+ Rechazar solicitud
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Inventarios/TrasladoSolicitud.aspx.vb b/Inventarios/TrasladoSolicitud.aspx.vb
index 85eec4810..13286849f 100644
--- a/Inventarios/TrasladoSolicitud.aspx.vb
+++ b/Inventarios/TrasladoSolicitud.aspx.vb
@@ -36,19 +36,19 @@ Partial Class Inventarios_TrasladoSolicitud
ViewState("CveDireccionEnvio") = value
End Set
End Property
- 'Private Property CveUsuarioAutoriza As Integer
- ' Get
- ' If ViewState("CveUsuarioAutoriza") Is Nothing Then
- ' Return -1
- ' Else
- ' Return CType(ViewState("CveUsuarioAutoriza"), Integer)
- ' End If
+ Private Property CveUsuarioSolicita As Integer
+ Get
+ If ViewState("CveUsuarioSolicita") Is Nothing Then
+ Return -1
+ Else
+ Return CType(ViewState("CveUsuarioSolicita"), Integer)
+ End If
- ' End Get
- ' Set(value As Integer)
- ' ViewState("CveUsuarioAutoriza") = value
- ' End Set
- 'End Property
+ End Get
+ Set(value As Integer)
+ ViewState("CveUsuarioSolicita") = value
+ End Set
+ End Property
#End Region
@@ -178,6 +178,8 @@ Partial Class Inventarios_TrasladoSolicitud
HplContrato.Text = ObjInventarios.DtResultados.Rows(0)("DescripcionContrato").ToString
HplContrato.NavigateUrl = $"/Contratos/Contrato.aspx?CveContrato={ObjInventarios.DtResultados.Rows(0)("CveContrato").ToString.ToEntero}"
+ CveUsuarioSolicita = ObjInventarios.DtResultados.Rows(0)("CveUsuario").ToString.ToEntero
+
'25/04/2018
CveDireccionEnvio = ObjInventarios.DtResultados.Rows(0)("CveDireccionEnvio").ToString.ToEntero
If CveDireccionEnvio > 0 And ObjClientes.DireccionEnvioGet(CveDireccionEnvio, -1, -1) Then
@@ -994,15 +996,85 @@ Partial Class Inventarios_TrasladoSolicitud
CargaDatos()
End Sub
+
Protected Sub LnkRechazarTraslado_Click(sender As Object, e As EventArgs)
+ TxtMotivoRechazo.Text = ""
+ UpModalRechazo.Update()
+ RegistraScript("$('#ModalRechazarTraslado').modal();")
+
+ End Sub
+
+
+ Protected Sub BtnModalRechazo_Click(sender As Object, e As EventArgs)
+ RechazarTraslado()
+ End Sub
+
+ Private Sub RechazarTraslado()
+
+ Dim ErrorProceso As Boolean = False
+
+ If TxtMotivoRechazo.Text.Trim.Length.ToEntero = 0 Then
+ Alert("El motivo de rechazo es necesario", TipoMensaje.MsgAdvertencia)
+ End If
+
+
Dim ObjInven As New ClsInventarios
+
If ObjInven.UpdateTrasladoAutorizar(CveTraspasoSolicitud, UsuarioActual.CveEmpresa, 3, UsuarioActual.CveUsuario, Now) Then
Alert("Rechazado correctamente.")
+ ErrorProceso = False
+ Else
+ ErrorProceso = True
End If
+
ObjInven.Dispose()
- CargaDatos()
+ If Not ErrorProceso Then
+ MandaCorreoRechazo(LbFolio.Text.ToEntero, CveTraspasoSolicitud, CveUsuarioSolicita, TxtMotivoRechazo.Text)
+ CargaDatos()
+ RegistraScript("$('#ModalRechazarTraslado').modal('hide');")
+ End If
+
+ End Sub
+
+
+ Private Sub MandaCorreoRechazo(Folio As Integer, CveTraspasoSolicitud As Integer, CveUsuarioSolicita As Integer, MotivoRechazo As String)
+
+ Dim SB As New StringBuilder
+
+ Dim CorreoDestino As String = GlobalDTUsuarios(CveUsuarioSolicita)(0)("Correo").ToString.Trim
+
+
+ If CorreoDestino.Length > 0 Then
+
+
+ SB.AppendLine($"
Se ha rechazado la solicitud de traspaso con folio {Folio}, el traspaso fue rechazado por el usuario {UsuarioActual.Nombre }, el traspaso fue rechazado por el motivo: {MotivoRechazo}
")
+
+
+
+ SB.AppendLine(" ")
+ SB.AppendLine("
")
+ SB.AppendLine("
Cantidad
U.M.
Producto
Observaciones
")
+
+ For Each GvRow As GridViewRow In GvDatos.Rows
+
+ If GvRow.RowType = DataControlRowType.DataRow Then
+ SB.AppendLine($"
{GvRow.DataKey("Cantidad")}
{GvRow.DataKey("UnidadMedida")}
{GvRow.DataKey("CodigoPS")}
{GvRow.DataKey("Observaciones")}
")
+ End If
+
+ Next
+ SB.AppendLine("
")
+ SB.AppendLine(" ")
+
+ SB.AppendLine($"Ir a solicitud de traspaso folio {Folio}")
+
+
+
+ Dim MandaCorre As New ClsSisMail
+ MandaCorre.SendMail(ClsPaginas.EmpresaNotificaciones, CorreoDestino, $"Rechazo de Autorización de traspaso #{Folio}", SB.ToString, Displayname:="SIG Notificaciones: Rechazo de Traspaso")
+
+ End If
End Sub
@@ -1057,5 +1129,6 @@ Partial Class Inventarios_TrasladoSolicitud
Next
GvDatos.Columns(5).Visible = Mostrar
End Sub
+
End Class
diff --git a/Inventarios/TraspasoAlmacen.aspx b/Inventarios/TraspasoAlmacen.aspx
index 392b44f2c..b347d8638 100644
--- a/Inventarios/TraspasoAlmacen.aspx
+++ b/Inventarios/TraspasoAlmacen.aspx
@@ -164,7 +164,7 @@
-
+
diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb
index 1d6b6c93f..edb1228f1 100644
--- a/Inventarios/TraspasoAlmacen.aspx.vb
+++ b/Inventarios/TraspasoAlmacen.aspx.vb
@@ -204,7 +204,10 @@ Partial Class Inventarios_TraspasoAlmacen
Else
DivCodigoSeriePS.Visible = False
End If
- If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(0);$('#DivGastoIndirecto').show(0);$('#DivDocChofer').show(0);")
+ If ChkTransitorio.Checked Then
+ RegistraScript("$('#DivTransitorio').show(0);$('#DivGastoIndirecto').show(0);$('#DivDocChofer').show(0);")
+ DivTransitorio2.Visible = True
+ End If
If UsuarioActual.CveEmpresa.Contiene(1, 119) Then
DivEmitirTimbrado.Visible = True
@@ -226,7 +229,10 @@ Partial Class Inventarios_TraspasoAlmacen
TipoSeccionAlmacen = 0
Else
- If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(0);$('#DivGastoIndirecto').show(0);$('#DivDocChofer').show(0);")
+ If ChkTransitorio.Checked Then
+ RegistraScript("$('#DivTransitorio').show(0);$('#DivGastoIndirecto').show(0);$('#DivDocChofer').show(0);")
+ DivTransitorio2.Visible = True
+ End If
End If
End Sub
@@ -643,21 +649,21 @@ Partial Class Inventarios_TraspasoAlmacen
If TxtResponsable.Text.Trim = "" And Not UsuarioActual.CveEmpresa.Contiene(119) Then
Alert("Debe seleccionar un responsable para el traspaso transitorio.", TipoMensaje.MsgAdvertencia)
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
- If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(200);")
+ If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(200);") : DivTransitorio2.Visible = True
Exit Sub
End If
If DdlAlmacenTransitorio.SelectedValue.ToEntero <= 0 Then
Alert("Debe seleccionar un almacen transitorio.", TipoMensaje.MsgAdvertencia)
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
- If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(200);")
+ If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(200);") : DivTransitorio2.Visible = True
Exit Sub
End If
If DdlChofer.SelectedValue.ToEntero <= 0 And UsuarioActual.CveEmpresa.Contiene(119) Then
Alert("Debe seleccionar un Chofer", TipoMensaje.MsgAdvertencia)
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
- If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(200);")
+ If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(200);") : DivTransitorio2.Visible = True
Exit Sub
End If
End If
@@ -693,7 +699,7 @@ Partial Class Inventarios_TraspasoAlmacen
Alert("Por ser un traspaso entre sucursales es necesario indicar que el traspaso es transitorio.", TipoMensaje.MsgAdvertencia)
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'');", "SonidoError")
ChkTransitorio.Checked = True
- If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(200);", "MuestraDivTransitorio")
+ If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(200);", "MuestraDivTransitorio") : DivTransitorio2.Visible = True
Exit Sub
End If
End If
@@ -711,7 +717,7 @@ Partial Class Inventarios_TraspasoAlmacen
For Each dr As DataRow In DtMovimientos.Rows
If dr("EstatusExistencia").ToString = "-1" Then
Alert("Tiene que rectificar los movimientos con error.", TipoMensaje.MsgError)
- If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(200);")
+ If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(200);") : DivTransitorio2.Visible = True
Exit Sub
End If
Next
@@ -1456,10 +1462,11 @@ Partial Class Inventarios_TraspasoAlmacen
TxtResponsable.Text = ""
TxtGastoIndirecto.Text = ""
RegistraScript("$('#DivTransitorio').show(200);$('#DivGastoIndirecto').show(100);$('#DivDocChofer').show(100);")
-
+ DivTransitorio2.Visible = True
ChkEmitirTimbrado.Checked = LblEmitirTimbrado.Visible
Else
RegistraScript("$('#DivTransitorio').hide(500);$('#DivGastoIndirecto').hide(500);$('#DivDocChofer').hide(500);")
+ DivTransitorio2.Visible = True
End If
CargaAlmacenDestino()
@@ -1974,7 +1981,7 @@ Partial Class Inventarios_TraspasoAlmacen
CargaRecepcion()
Else
Alert("No hay movimientos para el traspaso", TipoMensaje.MsgAdvertencia)
- If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(200);")
+ If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(200);") : DivTransitorio2.Visible = True
End If
End Sub
diff --git a/Nomina/Nomina2.aspx b/Nomina/Nomina2.aspx
index 3e5c523e2..a77d05f1b 100644
--- a/Nomina/Nomina2.aspx
+++ b/Nomina/Nomina2.aspx
@@ -253,19 +253,19 @@
+
+
+
+
+
+
+
+
+
diff --git a/Sistemas/PopUpCambiaUsuarioEmpresa.aspx.vb b/Sistemas/PopUpCambiaUsuarioEmpresa.aspx.vb
new file mode 100644
index 000000000..25c34bee9
--- /dev/null
+++ b/Sistemas/PopUpCambiaUsuarioEmpresa.aspx.vb
@@ -0,0 +1,187 @@
+Imports ADSSession
+Imports Extensiones
+Imports System.Data
+
+Partial Class Sistemas_PopUpCambiaUsuarioEmpresa
+ Inherits ClsPaginas
+
+ Property DTUsuarios() As Data.DataTable
+ Get
+ Return CType(ViewState("DTUsuarios"), DataTable)
+ End Get
+ Set(value As Data.DataTable)
+ ViewState("DTUsuarios") = value
+ End Set
+ End Property
+
+
+ Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
+ If Not Page.IsPostBack Then
+
+ ViewState("Orden") = ""
+
+ If Not (UsuarioActual.CveRol = 1 OrElse UsuarioActual.ModoSimulacionXEmpresa) Then
+ PnlGral.Visible = False
+ RegistraScript("window.close();")
+ End If
+
+ 'Dim DtEmp As DataTable = GlobalDTEmpresas.Copy
+ Dim NombreEmp As String = UsuarioActual.Empresa.Empresa
+ '''condición para ocultar los nombres de las empresas y ponerles "mi empresa de venta (xxx)"
+ ''If UsuarioActual.CveUsuario = 100 Then
+
+ '' Dim customerRow() As Data.DataRow
+ '' customerRow = DtEmp.Select("")
+
+ '' For Each drt As DataRow In customerRow
+ '' drt("Empresa") = "Mi Empresa de ventas (" & drt("CveEmpresa") & ")"
+ '' Next
+
+
+ ''End If
+
+ CType(Me.Master, BaseMasterPage).EsPopup = True
+ LblUsuario.Text = String.Format("{0} - {1}", UsuarioActual.Nombre, UsuarioActual.Empresa.Empresa)
+
+
+ 'DdlEmpresa.DataSource = DtEmp '.FiltraParametros(If(UsuarioActual.CveRol = 1, "CvePlataforma IN (1,2)", $"CvePlataforma={UsuarioActual.Empresa.CvePlataforma}"))
+ Dim CveEmpresa As String = UsuarioActual.CveEmpresa.ToString()
+
+ Dim splitedtext As String() = Request.Url.AbsoluteUri.Replace("http://", "").Replace("https://", "").Split("."c)
+ If Request.Url.AbsoluteUri.Contains("sig.agrojam.com.mx") Then
+ CveEmpresa = 119
+ End If
+
+ If splitedtext.Length > 0 Then
+ Select Case splitedtext(0).ToUpper()
+ Case "VSH" : CveEmpresa = "7"
+ Case "JAM" : CveEmpresa = "119"
+ Case "COMPUPROVEEDORES" : CveEmpresa = "72"
+ Case "DNDIFUSA" : CveEmpresa = "80"
+ Case "SOGO" : CveEmpresa = "8"
+ Case "BDH" : CveEmpresa = "140"
+ Case "ECONOLLANTAS" : CveEmpresa = "141"
+ End Select
+ End If
+ 'DdlEmpresa.DataBind()
+ 'DdlEmpresa.SelectedValue = CveEmpresa
+
+ 'DdlRol.DataSource = GlobalDTRoles(DdlEmpresa.SelectedValue.ToEntero)
+ 'DdlRol.DataBind()
+ 'DdlRol.Items.Insert(0, New ListItem("Todos", "-1"))
+
+ TxtBusqueda.Attributes.Add("data-table", gvUsuarios.ClientID)
+
+ CargaUsuarios()
+ 'LblUsuario.Text = usuarioactual.
+
+ End If
+ End Sub
+
+
+ Protected Sub gvUsuarios_RowCommand(ByVal sender As Object, ByVal e As GridViewCommandEventArgs) Handles gvUsuarios.RowCommand
+ If e.CommandName = "Usuarios" Then
+ Dim gvr As GridViewRow = DirectCast(DirectCast(e.CommandSource, LinkButton).BindingContainer, GridViewRow)
+ 'Dim Dt As DataTable = GlobalDTUsuarios(e.CommandArgument.ToString.ToEntero)
+ Dim multiempresa As Boolean = ADSSessionConfig.sessionUser.MultipleEmpresa
+ Dim objempresa As Empresa = ADSSessionConfig.sessionUser.Empresa
+ If gvr IsNot Nothing Then
+
+ Dim tUsuario, tContraseña As String
+ Dim tCveEmpresa As Integer
+ tUsuario = gvr.DataKey("Usuario").ToString
+ tContraseña = gvr.DataKey("Contraseña").ToString
+ tCveEmpresa = gvr.DataKey("CveEmpresa").ToString.ToEntero
+
+ Dim ObjUsuario As New ClsSisUsuarios
+ Dim Usuario As Usuario
+ 'Dim UsuarioAsignaciones As Usuario
+
+ Usuario = ObjUsuario.ValidaUsuario(tUsuario, tContraseña, IMEI, tCveEmpresa)
+ 'UsuarioAsignaciones = ObjUsuario.ValidaUsuarioAsignacion(Usuario.CveUsuario, Usuario.CveEmpresa)
+ ObjUsuario.Dispose()
+
+ If Usuario IsNot Nothing Then
+ Dim dt As Data.DataTable = GlobalDTUsuarios(Usuario.CveUsuario)
+ ADSSessionConfig.sessionUser = Usuario
+ ADSSessionConfig.sessionUser.CvePlataforma = 1
+ If Usuario.CveRol = 1200 Then
+ ADSSessionConfig.sessionUser.CvePlataforma = 3
+ End If
+ ADSSessionConfig.sessionDpage = False
+ ADSSessionConfig.sessionUser.MultipleEmpresa = multiempresa
+ ADSSessionConfig.sessionUser.ModoSimulacion = False
+ ADSSessionConfig.sessionUser.ModoSimulacionXEmpresa = True
+
+ UsuarioActual.Empresa = objempresa
+ dt.Dispose()
+
+ If UsuarioActual.CveCliente > 0 Then
+ CargaZonasHorarias(UsuarioActual)
+ End If
+ End If
+
+ RegistraScript("gotourl();")
+
+ End If
+
+ End If
+ End Sub
+ Private Sub CargaZonasHorarias(ByRef UsuarioActual As Usuario)
+ Dim ObjClientes As New ClsClientes
+ Try
+ If ObjClientes.GetClientes(UsuarioActual.CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, -1, Estatus:=1) Then
+ If ObjClientes.DtResultados.Rows.Count = 1 Then
+ UsuarioActual.UTCOffset = ObjClientes.DtResultados(0)("UTCOffset").ToString().ToEntero()
+ End If
+ End If
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener la zona horaria.", ex)
+ Finally
+ ObjClientes.Dispose()
+ End Try
+ End Sub
+
+ Protected Sub BtnFiltrar_Click(sender As Object, e As EventArgs) Handles BtnFiltrar.Click
+ CargaUsuarios()
+ End Sub
+
+#Region "O R D E N A M I E N T O"
+ Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
+ Dim Orden As String = ""
+ Dim Campo As String = ""
+ Dim Literal As Literal = Nothing
+ Const OrdenInicial As String = ""
+ Dim Arg(2) As String
+
+ Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
+ Campo = Arg(0)
+ Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
+
+ If ViewState(String.Format("O{0}", Campo)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo)).ToString = String.Format("{0} DESC", Campo) Then
+ ViewState(String.Format("O{0}", Campo)) = String.Format("{0} ASC", Campo)
+ Literal.Text = String.Format("")
+ Else
+ ViewState(String.Format("O{0}", Campo)) = String.Format("{0} DESC", Campo)
+ Literal.Text = String.Format("")
+ End If
+ Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString
+ ViewState("Orden") = Orden
+ CargaUsuarios(Orden)
+ End Sub
+
+ Private Sub CargaUsuarios(Optional Orden As String = "Nombre")
+ Dim dtt As DataTable = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros("CveRol <> 1")
+ dtt = dtt.FiltraParametros("Estatus = 1", Orden, {"CveUsuario", "Usuario", "Nombre", "Contraseña", "CveEmpresa", "Rol"})
+ gvUsuarios.DataSource = dtt
+ gvUsuarios.DataBind()
+
+ If (gvUsuarios.Rows.Count > 0) Then
+ gvUsuarios.UseAccessibleHeader = True
+ gvUsuarios.HeaderRow.TableSection = TableRowSection.TableHeader
+ End If
+ TxtBusqueda.Focus()
+ End Sub
+
+#End Region
+End Class
diff --git a/Site.master b/Site.master
index ac198d1a4..5c6489dad 100644
--- a/Site.master
+++ b/Site.master
@@ -267,6 +267,7 @@
diff --git a/Site.master.vb b/Site.master.vb
index 42789c4a8..a2c4eb732 100644
--- a/Site.master.vb
+++ b/Site.master.vb
@@ -168,6 +168,10 @@ Partial Class Site
DivCambiarUsuario.Visible = True
BtnCambiarUsuario.Attributes.Add("onclick", "javascript:AbrirVentana('/Sistemas/PopUpCambiaUsuario.aspx');")
End If
+ If UsuarioActual.ModoSimulacionXEmpresa Then '.TienePermisoProceso(ADSSession.ADSSessionConfig.procesomodosimulacion) Then
+ DivCambiarUsuarioEmpresa.Visible = True
+ BtnCambiarUsuarioEmpresa.Attributes.Add("onclick", "javascript:AbrirVentana('/Sistemas/PopUpCambiaUsuarioEmpresa.aspx');")
+ End If
If UsuarioActual.MultipleEmpresa Then
BtnCambiarEmpresa.Attributes.Add("onclick", "javascript:AbrirVentana('/Sistemas/PopUpSeleccionarEmpresa.aspx');")
DivCambiarEmpresa.Visible = True
diff --git a/Ventas/RepPS.aspx b/Ventas/RepPS.aspx
index b3f9052f4..1d4e762d4 100644
--- a/Ventas/RepPS.aspx
+++ b/Ventas/RepPS.aspx
@@ -159,6 +159,28 @@
+
+
+
+
+
+
+
+
+
+
+
+ <%--
+
+
+
+
+
+
+
+
+
--%>
+
diff --git a/Ventas/RepPS.aspx.vb b/Ventas/RepPS.aspx.vb
index 00101529a..66fb8aea5 100644
--- a/Ventas/RepPS.aspx.vb
+++ b/Ventas/RepPS.aspx.vb
@@ -21,6 +21,20 @@ Partial Class Ventas_RepPS
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
+ pnlOrden.Visible = False
+ If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
+ pnlOrden.Visible = True
+ DdlOrden.SelectedValue = "2"
+ 'Using ObjPS As New ClsProductosServicios
+ ' If ObjPS.GetMarcas(UsuarioActual.CveEmpresa) Then
+ ' DdlMarca.DataSource = ObjPS.DtResultados.Copy()
+ ' End If
+ 'End Using
+ 'DdlMarca.DataBind()
+ 'DdlMarca.Items.Insert(0, New ListItem("Todos", "-1"))
+ End If
+
+
CargaDatosIniciales()
CargaCombos()
CargaDatos()
@@ -69,6 +83,7 @@ Partial Class Ventas_RepPS
End Sub
Private Sub CargaTipoCentroCosto()
+ Dim index As Integer = 17
If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Then
DdlSubProyecto.Items.Clear()
@@ -88,13 +103,19 @@ Partial Class Ventas_RepPS
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 3 Then
DdlGrupo.Items.Insert(0, New ListItem("Proyecto", "1"))
DdlGrupo.Items.Insert(1, New ListItem("SubProyecto", "2"))
- DdlGrupo.Items.Insert(17, New ListItem("SubProyecto Ejec.", "19"))
+ If DdlGrupo.Items.Count < 17 Then
+ index = DdlGrupo.Items.Count
+ End If
+ DdlGrupo.Items.Insert(index, New ListItem("SubProyecto Ejec.", "19"))
DdlGrupo.DataBind()
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 4 Then
LblSubProyecto.InnerText = "Proyecto:"
DdlGrupo.Items.Insert(0, New ListItem("Proyecto", "1"))
DdlGrupo.Items.Insert(1, New ListItem("SubProyecto", "2"))
- DdlGrupo.Items.Insert(17, New ListItem("SubProyecto Ejec.", "19"))
+ If DdlGrupo.Items.Count < 17 Then
+ index = DdlGrupo.Items.Count
+ End If
+ DdlGrupo.Items.Insert(index, New ListItem("SubProyecto Ejec.", "19"))
DdlGrupo.DataBind()
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 5 Then
LblSubProyecto.InnerText = "Sucursal:"
@@ -117,7 +138,7 @@ Partial Class Ventas_RepPS
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha)
Dim ObjVentas As New ClsVentas()
- If ObjVentas.GetRepPSEcono(CveSubProyecto, CvePS, FechaI, FechaF, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, GPO:=Grupo, CveMoneda:=CveMoneda, TipoCambio:=TC, TCEspecifico:=TCEspecifico, Clasificacion:=Clasificacion, Linea:=Linea, Marca:=Marca) Then
+ If ObjVentas.GetRepPSEcono(CveSubProyecto, CvePS, FechaI, FechaF, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, GPO:=Grupo, CveMoneda:=CveMoneda, TipoCambio:=TC, TCEspecifico:=TCEspecifico, Clasificacion:=Clasificacion, Linea:=Linea, Marca:=Marca, orden:=DdlOrden.SelectedValue.ToEntero()) Then
DtReporte = ObjVentas.DtResultados.Copy()
GvDatos.DataSource = DtReporte
Else
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index 15f20d270..9d25b9949 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -5388,6 +5388,7 @@ Partial Class Ventas
' RegistraScript("$('#DivDocsClienteUpload').modal({ backdrop: 'static', keyboard: false});", "modalOC")
End If
BloqueaCondiconesPago()
+ DeshabilitarAplicarNotaDeCredito(LblRFC.Text)
End Sub
Private Sub CargaRestriccionesCreditoCliente(Optional Alertas As Boolean = False, Optional CveVenta As Integer = -1)
@@ -26927,6 +26928,15 @@ Partial Class Ventas
ObjVentas.Dispose()
End Sub
+ Private Sub DeshabilitarAplicarNotaDeCredito(RFC As String)
+
+ If UsuarioActual.CveEmpresa = 119 AndAlso RFC.Contiene("XAXX010101000", "XEXX010101000") Then
+ LBNotaCredito.Visible = False
+ UpnTools.Update()
+ End If
+
+ End Sub
+
#Region "Auxiliar"
Private Sub CargarSaldoAuxiliar(CveCliente As Integer)
diff --git a/vwd.webinfo b/vwd.webinfo
index a5848e16b..10e72764b 100644
--- a/vwd.webinfo
+++ b/vwd.webinfo
@@ -108,6 +108,8 @@
+
+