diff --git a/AC/CatOGClasificaciones.aspx.vb b/AC/CatOGClasificaciones.aspx.vb
index e41239c25..2ac9dd512 100644
--- a/AC/CatOGClasificaciones.aspx.vb
+++ b/AC/CatOGClasificaciones.aspx.vb
@@ -68,7 +68,7 @@ Partial Class AC_CatOGClasificaciones
Dim ObjClasificaciones As New ClsClasificaciones
If LbAgregar.Text = "Agregar" Then
- If ObjClasificaciones.AddClasificaciones(TxtOGClasificacion.Text.Trim, TxtCodigo.Text.Trim, -1, "", -1, "", -1, "", 0, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
+ If ObjClasificaciones.AddClasificaciones(TxtOGClasificacion.Text.Trim, TxtCodigo.Text.Trim, 0, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
TxtOGClasificacion.Text = ""
TxtCodigo.Text = ""
Alert("La Clasificacion de Objeto de Gasto se guardó correctamente.", TipoMensaje.MsgInformacion)
@@ -78,7 +78,7 @@ Partial Class AC_CatOGClasificaciones
End If
Else
- If ObjClasificaciones.UpdateClasificacion(TxtOGClasificacion.Text, TxtCodigo.Text, -1, "", -1, "", -1, "", ChkEstatus.Checked, ChkAfectable.Checked, 0, UsuarioActual.CveUsuario, CveClasificacion) Then
+ If ObjClasificaciones.UpdateClasificacion(TxtOGClasificacion.Text, TxtCodigo.Text, ChkEstatus.Checked, ChkAfectable.Checked, 0, UsuarioActual.CveUsuario, CveClasificacion) Then
GvDatos.EditIndex = -1
ViewState("DTOGClasificaciones") = ObjClasificaciones.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
GlobalDTClasificaciones(UsuarioActual.CveEmpresa) = Nothing
@@ -191,7 +191,7 @@ Partial Class AC_CatOGClasificaciones
Dim CveOGClasificacion As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
Dim Codigo As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtCodigo"), TextBox).Text.Trim
- If ObjOGClasificaciones.UpdateClasificacion(OGClasificacion, Codigo, -1, "", -1, "", -1, "", Estatus, Afectable, 0, UsuarioActual.CveUsuario, CveOGClasificacion) Then
+ If ObjOGClasificaciones.UpdateClasificacion(OGClasificacion, Codigo, Estatus, Afectable, 0, UsuarioActual.CveUsuario, CveOGClasificacion) Then
GvDatos.EditIndex = -1
ViewState("DTOGClasificaciones") = ObjOGClasificaciones.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
GlobalDTClasificaciones(UsuarioActual.CveEmpresa) = Nothing
diff --git a/App_Code/ClsAF.vb b/App_Code/ClsAF.vb
index 61265c606..e4535dd69 100644
--- a/App_Code/ClsAF.vb
+++ b/App_Code/ClsAF.vb
@@ -64,7 +64,6 @@ Public Class ClsAF
Public Property SubProyecto As String
Public Property CveProyecto As Integer
Public Property Proyecto As String
- Public Property Cuenta As Integer
Public Property CveEstadoActivoFijo As Integer
Public Property EstadoActivoFijo As String
Public Property PorDepreciacion As Double
@@ -219,7 +218,6 @@ Public Class ClsAF
Me.SubProyecto = Data.Rows(0)("SubProyecto").ToString
Me.CveProyecto = Data.Rows(0)("CveProyecto").ToString.ToEntero
Me.Proyecto = Data.Rows(0)("Proyecto").ToString
- Me.Cuenta = Data.Rows(0)("Cuenta").ToString.ToEntero
Me.CveEstadoActivoFijo = Data.Rows(0)("CveEstadoActivoFijo").ToString.ToEntero
Me.EstadoActivoFijo = Data.Rows(0)("EstadoActivoFijo").ToString
Me.PorDepreciacion = Data.Rows(0)("PorDepreciacion").ToString.ToDouble
@@ -343,7 +341,6 @@ Public Class ClsAF
Me.SubProyecto = Data.Rows(0)("SubProyecto").ToString
Me.CveProyecto = Data.Rows(0)("CveProyecto").ToString.ToEntero
Me.Proyecto = Data.Rows(0)("Proyecto").ToString
- Me.Cuenta = Data.Rows(0)("Cuenta").ToString.ToEntero
Me.CveEstadoActivoFijo = Data.Rows(0)("CveEstadoActivoFijo").ToString.ToEntero
Me.EstadoActivoFijo = Data.Rows(0)("EstadoActivoFijo").ToString
Me.PorDepreciacion = Data.Rows(0)("PorDepreciacion").ToString.ToDouble
diff --git a/App_Code/ClsClasificaciones.vb b/App_Code/ClsClasificaciones.vb
index 3c8597b3a..bb1535594 100644
--- a/App_Code/ClsClasificaciones.vb
+++ b/App_Code/ClsClasificaciones.vb
@@ -272,7 +272,7 @@ Public Class ClsClasificaciones
Return Retorno
End Function
- Public Function AddClasificaciones(Clasificacion As String, Codigo As String, IdCuentaGasto As Integer, CuentaGasto As String, IdCuentaCostos As Integer, CuentaCostos As String, IdCuentaIngreso As Integer, CuentaIngreso As String, CveCategoria As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional RequiereSerieLote As Integer = 0, Optional UsoClasificacion As Integer = -1, Optional CveSATPS As Integer = -1, Optional RequiereAFCompra As Boolean = False, Optional RequiereAFInsumo As Boolean = False, Optional RequierePersonal As Boolean = False,
+ Public Function AddClasificaciones(Clasificacion As String, Codigo As String, CveCategoria As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional RequiereSerieLote As Integer = 0, Optional UsoClasificacion As Integer = -1, Optional CveSATPS As Integer = -1, Optional RequiereAFCompra As Boolean = False, Optional RequiereAFInsumo As Boolean = False, Optional RequierePersonal As Boolean = False,
Optional EsAcumulador As Boolean = False, Optional TopVentas As Boolean = False, Optional TopCompras As Boolean = False, Optional PrecioBaseCosto As Decimal = -1) As Boolean
Dim Retorno As Boolean = False
Me.CveClasificacion = -1
@@ -281,20 +281,12 @@ Public Class ClsClasificaciones
With SqlAdapter.SelectCommand.Parameters
.Add("@Clasificacion", SqlDbType.VarChar).Value = Clasificacion
- .Add("@Codigo", SqlDbType.VarChar).Value = Codigo
- .Add("@IdCuentaGasto", SqlDbType.Int).Value = IdCuentaGasto
- .Add("@IdCuentaCostos", SqlDbType.Int).Value = IdCuentaCostos
- '.Add("@IdCuentaInventario", SqlDbType.Int).Value = IdCuentaInventario
- .Add("@CuentaGasto", SqlDbType.VarChar).Value = CuentaGasto
- .Add("@CuentaCostos", SqlDbType.VarChar).Value = CuentaCostos
- ' .Add("@CuentaInventario", SqlDbType.VarChar).Value = CuentaInventario
+ .Add("@Codigo", SqlDbType.VarChar).Value = Codigo
.Add("@CveCategoria", SqlDbType.Int).Value = CveCategoria
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
- .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
-
- 'Nuevo 10/06/2016
- .Add("@IdCuentaIngresos", SqlDbType.Int).Value = IdCuentaIngreso
- .Add("@CuentaIngresos", SqlDbType.VarChar).Value = CuentaIngreso
+ .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
+
+ 'Nuevo 10/06/2016
.Add("@RequiereSerieLote", SqlDbType.Int).Value = RequiereSerieLote
.Add("@UsoClasificacion", SqlDbType.Int).Value = UsoClasificacion
@@ -338,13 +330,7 @@ Public Class ClsClasificaciones
With SqlAdapter.SelectCommand.Parameters
.Add("@Clasificacion", SqlDbType.VarChar).Value = Clasificacion.Clasificacion
- .Add("@Codigo", SqlDbType.VarChar).Value = Clasificacion.Codigo
- '.Add("@IdCuentaGasto", SqlDbType.Int).Value = Clasificacion.IdCuentaGasto
- '.Add("@IdCuentaCostos", SqlDbType.Int).Value = Clasificacion.IdCuentaCostos
- '.Add("@IdCuentaInventario", SqlDbType.Int).Value = IdCuentaInventario
- '.Add("@CuentaGasto", SqlDbType.VarChar).Value = Clasificacion.CuentaGasto
- '.Add("@CuentaCostos", SqlDbType.VarChar).Value = Clasificacion.CuentaCostos
- ' .Add("@CuentaInventario", SqlDbType.VarChar).Value = CuentaInventario
+ .Add("@Codigo", SqlDbType.VarChar).Value = Clasificacion.Codigo
.Add("@CveCategoria", SqlDbType.Int).Value = Clasificacion.CveCategoria
.Add("@CveEmpresa", SqlDbType.Int).Value = Clasificacion.CveEmpresa
.Add("@CveUsuario", SqlDbType.Int).Value = Clasificacion.CveUsuario
@@ -384,29 +370,22 @@ Public Class ClsClasificaciones
Return Retorno
End Function
- Public Function UpdateClasificacion(Clasificacion As String, Codigo As String, IdCuentaGasto As Integer, CuentaGasto As String, IdCuentaCostos As Integer, CuentaCostos As String, IdCuentaIngresos As Integer, CuentaIngresos As String, Estatus As Boolean, Afectable As Boolean, CveCategoria As Integer, CveUsuario As Integer, CveClasificacion As Integer, Optional RequiereSerieLote As Integer = 0, Optional UsoClasificacion As Integer = -1, Optional CveSATPS As Integer = -1, Optional RequiereAFCompra As Boolean = True, Optional RequiereAFInsumo As Boolean = True, Optional RequierePersonal As Boolean = True,
+ Public Function UpdateClasificacion(Clasificacion As String, Codigo As String, Estatus As Boolean, Afectable As Boolean, CveCategoria As Integer, CveUsuario As Integer, CveClasificacion As Integer, Optional RequiereSerieLote As Integer = 0, Optional UsoClasificacion As Integer = -1, Optional CveSATPS As Integer = -1, Optional RequiereAFCompra As Boolean = True, Optional RequiereAFInsumo As Boolean = True, Optional RequierePersonal As Boolean = True,
Optional EsAcumulador As Boolean = False, Optional TopVentas As Boolean = False, Optional TopCompras As Boolean = False, Optional PrecioBaseCosto As Decimal = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_ClasificacionesUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@Clasificacion", SqlDbType.VarChar).Value = Clasificacion
- .Add("@Codigo", SqlDbType.VarChar).Value = Codigo
- .Add("@IdCuentaGasto", SqlDbType.Int).Value = IdCuentaGasto
- .Add("@IdCuentaCostos", SqlDbType.Int).Value = IdCuentaCostos
- ' .Add("@IdCuentaInventario", SqlDbType.Int).Value = IdCuentaInventario
- .Add("@CuentaGasto", SqlDbType.VarChar).Value = CuentaGasto
- .Add("@CuentaCostos", SqlDbType.VarChar).Value = CuentaCostos
- ' .Add("@CuentaInventario", SqlDbType.VarChar).Value = CuentaInventario
+ .Add("@Codigo", SqlDbType.VarChar).Value = Codigo
+
.Add("@Estatus", SqlDbType.Bit).Value = If(Estatus, 1, 0)
.Add("@Afectable", SqlDbType.Bit).Value = If(Afectable, 1, 0)
.Add("@CveCategoria", SqlDbType.Int).Value = CveCategoria
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
- .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
-
- 'Nuevo 10/06/2016
- .Add("@IdCuentaIngresos", SqlDbType.Int).Value = IdCuentaIngresos
- .Add("@CuentaIngresos", SqlDbType.VarChar).Value = CuentaIngresos
+ .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
+
+ 'Nuevo 10/06/2016
.Add("@RequiereSerieLote", SqlDbType.Int).Value = RequiereSerieLote
.Add("@UsoClasificacion", SqlDbType.Int).Value = UsoClasificacion
@@ -572,25 +551,13 @@ Public Class ClsClasificaciones
Return Retorno
End Function
- Public Function UpdateClasificacionSubProyecto(CveClasificacion As Integer, CveSubProyecto As Integer, IdCuentaGasto As Integer, CuentaGasto As String, IdCuentaCostos As Integer, CuentaCostos As String, IdCuentaIngresos As Integer, CuentaIngresos As String) As Boolean
+ Public Function UpdateClasificacionSubProyecto(CveClasificacion As Integer, CveSubProyecto As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_ClasificacionesSubProyectoUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
- .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
- .Add("@IdCuentaGasto", SqlDbType.Int).Value = IdCuentaGasto
- .Add("@IdCuentaCostos", SqlDbType.Int).Value = IdCuentaCostos
- '.Add("@IdCuentaInventario", SqlDbType.Int).Value = IdCuentaInventario
- .Add("@CuentaGasto", SqlDbType.VarChar).Value = CuentaGasto
- .Add("@CuentaCostos", SqlDbType.VarChar).Value = CuentaCostos
- '.Add("@CuentaInventario", SqlDbType.VarChar).Value = CuentaInventario
-
- .Add("@IdCuentaIngresos", SqlDbType.Int).Value = IdCuentaIngresos
- .Add("@CuentaIngresos", SqlDbType.VarChar).Value = CuentaIngresos
-
-
-
+ .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
End With
Try
diff --git a/App_Code/ClsClientes.vb b/App_Code/ClsClientes.vb
index 0d9be3e11..455e17b73 100644
--- a/App_Code/ClsClientes.vb
+++ b/App_Code/ClsClientes.vb
@@ -69,7 +69,6 @@ Public Class ClsClientes
Public Property Sucursal As String
Public Property RecepcionPagos As String
Public Property TipoPago As String
- Public Property CuentaContable As String
Public Property FormaFacturacion As String
Public Property Codigo As String
Public Property LimiteCredito As Double
@@ -319,7 +318,6 @@ Public Class ClsClientes
_PlazoCobranzaRemision = Data.Rows(0)("PlazoCobranzaRemision").ToString.ToEntero
_RecepcionPagos = Data.Rows(0)("RecepcionPagos").ToString
_TipoPago = Data.Rows(0)("TipoPago").ToString
- _CuentaContable = Data.Rows(0)("CuentaContable").ToString
_FormaFacturacion = Data(0)("FormaFacturacion").ToString
_LimiteCredito = Data(0)("LimiteCredito").ToString.ToDouble
'_NumCtaPago = Data(0)("NumCtaPago").ToString
diff --git a/App_Code/ClsCompProveedores.vb b/App_Code/ClsCompProveedores.vb
index aee9aab93..2d5d2f14d 100644
--- a/App_Code/ClsCompProveedores.vb
+++ b/App_Code/ClsCompProveedores.vb
@@ -402,9 +402,7 @@ Public Class ClsCompProveedores
CveProveedorClasificacion As Integer, CveUsuarioResponsable As Integer, Estatus As Boolean, NotificarA As String, CorreoCobranza As String, FolioDuplicado As Boolean, CveProveedor As Integer,
Optional CveTipoProveedor As Integer = 1, Optional CveMonedaPreferente As Integer = 1, Optional UsaLimiteCredito As Boolean = False, Optional DIOTCveTipoTercero As Integer = -1, Optional DIOTCveTipoOperacion As Integer = -1, Optional DIOTNumeroIDFiscal As String = "", Optional CveUsuarioModifico As Integer = -1,
Optional AplicarEvaluacion As Boolean = False, Optional FechaEvaluacion As String = "-1", Optional CicloEvaluacion As Integer = -1, Optional DIOTCvePais As Integer = -1, Optional CveUsuarioEvaluador As Integer = -1, Optional CP As Integer = 0, Optional DIOTNacionalidad As String = "",
- Optional CveConfianzaProveedor As Integer = -1, Optional CveRegimenFiscal As Integer = -1,
- Optional IdCtaContProveedores As Integer = -1, Optional CtaContProveedores As String = "", Optional IdCtaContExtranjera As Integer = -1, Optional CtaContExtranjera As String = "", Optional IdCtaContComplementaria As Integer = -1, Optional CtaContComplementaria As String = "",
- Optional IdCtaContAnticipos As Integer = -1, Optional CtaContAnticipos As String = "", Optional IdCtaContAnticiposExtranjera As Integer = -1, Optional CtaContAnticiposExtranjera As String = "", Optional IdCtaContAnticiposComplementaria As Integer = -1, Optional CtaContAnticiposComplementaria As String = "") As Boolean
+ Optional CveConfianzaProveedor As Integer = -1, Optional CveRegimenFiscal As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Comp_ProveedorUpdate")
@@ -458,21 +456,21 @@ Public Class ClsCompProveedores
.Add("@CveConfianzaProveedor", SqlDbType.Int).Value = CveConfianzaProveedor
.Add("@CveRegimenFiscal", SqlDbType.TinyInt).Value = CveRegimenFiscal
- 'Proveedores
- .Add("@IdCtaContProveedores", SqlDbType.Int).Value = IdCtaContProveedores
- .Add("@CtaContProveedores", SqlDbType.VarChar).Value = CtaContProveedores
- .Add("@IdCtaContExtranjera", SqlDbType.Int).Value = IdCtaContExtranjera
- .Add("@CtaContExtranjera", SqlDbType.VarChar).Value = CtaContExtranjera
- .Add("@IdCtaContComplementaria", SqlDbType.Int).Value = IdCtaContComplementaria
- .Add("@CtaContComplementaria", SqlDbType.VarChar).Value = CtaContComplementaria
+ ''Proveedores
+ '.Add("@IdCtaContProveedores", SqlDbType.Int).Value = IdCtaContProveedores
+ '.Add("@CtaContProveedores", SqlDbType.VarChar).Value = CtaContProveedores
+ '.Add("@IdCtaContExtranjera", SqlDbType.Int).Value = IdCtaContExtranjera
+ '.Add("@CtaContExtranjera", SqlDbType.VarChar).Value = CtaContExtranjera
+ '.Add("@IdCtaContComplementaria", SqlDbType.Int).Value = IdCtaContComplementaria
+ '.Add("@CtaContComplementaria", SqlDbType.VarChar).Value = CtaContComplementaria
- 'Anticipos
- .Add("@IdCtaContAnticipos", SqlDbType.Int).Value = IdCtaContAnticipos
- .Add("@CtaContAnticipos", SqlDbType.VarChar).Value = CtaContAnticipos
- .Add("@IdCtaContAnticiposExtranjera", SqlDbType.Int).Value = IdCtaContAnticiposExtranjera
- .Add("@CtaContAnticiposExtranjera", SqlDbType.VarChar).Value = CtaContAnticiposExtranjera
- .Add("@IdCtaContAnticiposComplementaria", SqlDbType.Int).Value = IdCtaContAnticiposComplementaria
- .Add("@CtaContAnticiposComplementaria", SqlDbType.VarChar).Value = CtaContAnticiposComplementaria
+ ''Anticipos
+ '.Add("@IdCtaContAnticipos", SqlDbType.Int).Value = IdCtaContAnticipos
+ '.Add("@CtaContAnticipos", SqlDbType.VarChar).Value = CtaContAnticipos
+ '.Add("@IdCtaContAnticiposExtranjera", SqlDbType.Int).Value = IdCtaContAnticiposExtranjera
+ '.Add("@CtaContAnticiposExtranjera", SqlDbType.VarChar).Value = CtaContAnticiposExtranjera
+ '.Add("@IdCtaContAnticiposComplementaria", SqlDbType.Int).Value = IdCtaContAnticiposComplementaria
+ '.Add("@CtaContAnticiposComplementaria", SqlDbType.VarChar).Value = CtaContAnticiposComplementaria
End With
@@ -522,11 +520,6 @@ Public Class ClsCompProveedores
Return Retorno
End Function
-
-
-
-
-
Public Function UpdateProveedorPagoElectronico(EstatusPagoElectronico As Boolean, CveUsuario As Integer, CveProveedor As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Comp_ProveedorUpdatePagoElectronico")
diff --git a/App_Code/ClsContPAQi.vb b/App_Code/ClsContPAQi.vb
index 1e8ddfe32..70eec9006 100644
--- a/App_Code/ClsContPAQi.vb
+++ b/App_Code/ClsContPAQi.vb
@@ -7329,6 +7329,52 @@ Public Class ClsContPAQi
Return Retorno
End Function
+ Public Function SincronizaCuentas(CveEmpresa As Integer) As Boolean
+ Dim Retorno As Boolean = False
+
+ StrSQL.Clear()
+ StrSQL.Append(" INSERT INTO [192.168.0.2].Ventas.dbo.Conta_Cuentas (CveClasificacionCuenta, Codigo, Nombre, Afectable,TipoCuenta,Estatus,FechaIng,CveUsuario,CveEmpresa,CveMoneda,IdCompaq,CvePadre) ")
+ StrSQL.Append("SELECT CASE ")
+ StrSQL.Append(" WHEN Tipo = 'A' THEN 1 ")
+ StrSQL.Append(" WHEN Tipo = 'B' THEN 2 ")
+ StrSQL.Append(" WHEN Tipo = 'C' THEN 3 ")
+ StrSQL.Append(" WHEN Tipo = 'D' THEN 4 ")
+ StrSQL.Append(" WHEN Tipo = 'E' THEN 5 ")
+ StrSQL.Append(" WHEN Tipo = 'F' THEN 6 ")
+ StrSQL.Append(" WHEN Tipo = 'G' THEN 7 ")
+ StrSQL.Append(" WHEN Tipo = 'H' THEN 8 ")
+ StrSQL.Append(" WHEN Tipo = 'I' THEN 9 ")
+ StrSQL.Append(" WHEN Tipo = 'J' THEN 10 ")
+ StrSQL.Append(" WHEN Tipo = 'K' THEN 11 ")
+ StrSQL.Append(" WHEN Tipo = 'L' THEN 12 ")
+ StrSQL.Append(" END AS CveClasificacionCuenta, ")
+ StrSQL.Append(" Codigo, Nombre, Afectable, CtaMayor AS TipoCuenta, 1 AS Estatus, Getdate() AS FechaIng, 100 ASCveUsuario, ")
+ StrSQL.Append(" @CveEmpresa AS CveEmpresa, ")
+ StrSQL.Append(" IdMoneda AS CveMoneda, C.Id AS IdCompaq, ")
+ StrSQL.Append(" (select cc.CveCuenta from [192.168.0.2].Ventas.dbo.Conta_Cuentas cc where cc.IdCompaq = a.IdCtaSup AND cc.CveEmpresa = @CveEmpresa ) as CvePadre ")
+ StrSQL.Append(" FROM Cuentas c ")
+ StrSQL.Append(" INNER JOIN Asociaciones a on c.Id = a.IdSubCtade ")
+ StrSQL.Append(" WHERE c.Id IN(SELECT CC.Id FROM Cuentas CC LEFT JOIN [192.168.0.2].Ventas.dbo.Conta_Cuentas CS on CC.Id = CS.IdCompaq AND CS.CveEmpresa = @CveEmpresa WHERE CC.Codigo NOT IN('_BPASIVO') AND CS.CveCuenta IS NULL) ")
+ StrSQL.Append(" ORDER BY Codigo; ")
+
+
+
+ SqlDataAdapter(StrSQL.ToString, CommandType.Text)
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ Me.OnError("Ocurrió un error al sincronizar cuentas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+
+ Return Retorno
+ End Function
+
+
#End Region
diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb
index 336499c97..13fde3fbe 100644
--- a/App_Code/ClsContabilidad.vb
+++ b/App_Code/ClsContabilidad.vb
@@ -1548,26 +1548,51 @@ Public Class ClsContabilidad
Return Retorno
End Function
- Public Function GetCuentaDobleConta(IdCtaContable As Integer, CveEmpresa As Integer) As Boolean
- Dim Retorno As Boolean = False
+ 'Public Function GetCuentaDobleConta(IdCtaContable As Integer, CveEmpresa As Integer) As Boolean
+ ' Dim Retorno As Boolean = False
- DataAdapter("PA_Conta_CuentaDobleContaGet")
+ ' DataAdapter("PA_Conta_CuentaDobleContaGet")
+ ' With SqlAdapter.SelectCommand.Parameters
+ ' .Add("@IdCtaContable", SqlDbType.Int).Value = IdCtaContable
+ ' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ ' End With
+
+ ' Try
+ ' SqlAdapter.Fill(Data)
+ ' Retorno = True
+ ' Catch ex As Exception
+ ' OnError("Ocurrió un error al obtener la cuenta doble.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ ' End Try
+
+ ' Return Retorno
+ 'End Function
+
+ Public Function GeneraCuentaDesglose(CveConceptoUnico As Integer, CveTipoSaldo As Integer, CveCuentaPadre As Integer, CveGeneral As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Integer
+ Dim Retorno As Integer = -1
+ DataAdapter("PA_Conta_CuentasGeneraDesglose")
With SqlAdapter.SelectCommand.Parameters
- .Add("@IdCtaContable", SqlDbType.Int).Value = IdCtaContable
+ .Add("@CveConceptoContableUnico", SqlDbType.Int).Value = CveConceptoUnico
+ .Add("@CveTipoSaldo", SqlDbType.Int).Value = CveTipoSaldo
+ .Add("@CveGeneral", SqlDbType.Int).Value = CveGeneral
+ .Add("@CveCuentaPadre", SqlDbType.Int).Value = CveCuentaPadre
+ .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@CveCuentaGenerada", SqlDbType.Int).Direction = ParameterDirection.Output
End With
Try
SqlAdapter.Fill(Data)
- Retorno = True
+ Retorno = SqlAdapter.SelectCommand.Parameters("@CveCuentaGenerada").Value.ToString.ToEntero
+
Catch ex As Exception
- OnError("Ocurrió un error al obtener la cuenta doble.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ OnError("Ocurrió un error al obtener Movimientos Prepolizas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
+
Public Function DesAplicarPago(CvePrePoliza As Integer, CveConcepto As Integer, CveVenta As Integer, CveVentaAmortizacion As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Conta_DesAplicarMovimiento")
@@ -6047,36 +6072,39 @@ Public Class ClsContabilidad
#End Region
#Region "VALIDACION POLIZA DESCUADRADA"
- Public Function ValidacionPrePolizaCuadre(CvePrePoliza As Integer, Opcion As Integer, Optional CveVenta As Integer = -1, Optional AutoConta As Boolean = True) As Boolean
- Dim Retorno As Boolean = False
+ 'Public Function ValidacionPrePolizaCuadre(CvePrePoliza As Integer, Opcion As Integer, Optional CveVenta As Integer = -1, Optional AutoConta As Boolean = True) As Boolean
+ ' Dim Retorno As Boolean = False
- DataAdapter("PA_Conta_PrePolizasValidacion")
- With SqlAdapter.SelectCommand.Parameters
- .Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
- .Add("@Opcion", SqlDbType.Int).Value = Opcion
- ' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
- .Add("@CveVenta", SqlDbType.Int).Value = CveVenta
- .Add("@AutoConta", SqlDbType.Int).Value = If(AutoConta, 1, 0)
- .Add("@Valor", SqlDbType.Int).Direction = ParameterDirection.Output
- .Add("@MsgSalida", SqlDbType.VarChar, 100).Direction = ParameterDirection.Output
- .Add("@MsgPrePolizaSalida", SqlDbType.VarChar, 8000).Direction = ParameterDirection.Output
- .Add("@Diferencia", SqlDbType.Float).Direction = ParameterDirection.Output
- End With
+ ' DataAdapter("PA_Conta_PrePolizasValidacion")
+ ' With SqlAdapter.SelectCommand.Parameters
+ ' .Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
+ ' .Add("@Opcion", SqlDbType.Int).Value = Opcion
+ ' ' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ ' .Add("@CveVenta", SqlDbType.Int).Value = CveVenta
+ ' .Add("@AutoConta", SqlDbType.Int).Value = If(AutoConta, 1, 0)
+ ' .Add("@Valor", SqlDbType.Int).Direction = ParameterDirection.Output
+ ' .Add("@MsgSalida", SqlDbType.VarChar, 100).Direction = ParameterDirection.Output
+ ' .Add("@MsgPrePolizaSalida", SqlDbType.VarChar, 8000).Direction = ParameterDirection.Output
+ ' .Add("@Diferencia", SqlDbType.Float).Direction = ParameterDirection.Output
+ ' .Add("@FolioPoliza", SqlDbType.Int).Direction = ParameterDirection.Output
+ ' End With
- Try
- SqlAdapter.Fill(Data)
- Retorno = True
- ValorPolizaDescuadre = SqlAdapter.SelectCommand.Parameters("@Valor").Value.ToString.ToEntero
- MensajePolizaDescuadre = SqlAdapter.SelectCommand.Parameters("@MsgSalida").Value.ToString
- ValorDiferencia = SqlAdapter.SelectCommand.Parameters("@Diferencia").Value.ToString
- Dim MsgPrePoliza As String = SqlAdapter.SelectCommand.Parameters("@MsgPrePolizaSalida").Value.ToString
- If MsgPrePoliza <> "" Then MsgPrePoliza.GuardaLogAD("LogPrePoliza")
- Catch ex As Exception
- OnError("Ocurrió un error al validar la PrePoliza.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
- End Try
+ ' Try
+ ' SqlAdapter.Fill(Data)
+ ' Retorno = True
+ ' ValorPolizaDescuadre = SqlAdapter.SelectCommand.Parameters("@Valor").Value.ToString.ToEntero
+ ' MensajePolizaDescuadre = SqlAdapter.SelectCommand.Parameters("@MsgSalida").Value.ToString
+ ' ValorDiferencia = SqlAdapter.SelectCommand.Parameters("@Diferencia").Value.ToString
+ ' Dim MsgPrePoliza As String = SqlAdapter.SelectCommand.Parameters("@MsgPrePolizaSalida").Value.ToString
+ ' ContaFolio = SqlAdapter.SelectCommand.Parameters("@FolioPoliza").Value.ToString.ToEntero
+ ' If MsgPrePoliza <> "" Then MsgPrePoliza.GuardaLogAD("LogPrePoliza")
- Return Retorno
- End Function
+ ' Catch ex As Exception
+ ' OnError("Ocurrió un error al validar la PrePoliza.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ ' End Try
+
+ ' Return Retorno
+ 'End Function
Public Function ValidacionesPrePoliza(CvePrePoliza As Integer, ByRef UsuarioActual As Usuario, Optional Opcion As Integer = 1,
Optional CveVenta As Integer = -1, Optional AutoConta As Boolean = True,
@@ -6094,6 +6122,7 @@ Public Class ClsContabilidad
.Add("@MsgSalida", SqlDbType.VarChar, 100).Direction = ParameterDirection.Output
.Add("@MsgPrePolizaSalida", SqlDbType.VarChar, 8000).Direction = ParameterDirection.Output
.Add("@Diferencia", SqlDbType.Float).Direction = ParameterDirection.Output
+ .Add("@FolioPoliza", SqlDbType.Int).Direction = ParameterDirection.Output
End With
Try
@@ -6103,6 +6132,7 @@ Public Class ClsContabilidad
MensajePolizaDescuadre = SqlAdapter.SelectCommand.Parameters("@MsgSalida").Value.ToString
ValorDiferencia = SqlAdapter.SelectCommand.Parameters("@Diferencia").Value.ToString
Dim MsgPrePoliza As String = SqlAdapter.SelectCommand.Parameters("@MsgPrePolizaSalida").Value.ToString
+ ContaFolio = SqlAdapter.SelectCommand.Parameters("@FolioPoliza").Value.ToString.ToEntero
If MsgPrePoliza <> "" Then MsgPrePoliza.GuardaLogAD("LogPrePoliza")
If MensajePolizaDescuadre = "" Then
diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb
index a28971f9e..782d554cf 100644
--- a/App_Code/ClsGenerales.vb
+++ b/App_Code/ClsGenerales.vb
@@ -179,7 +179,7 @@ Public Class ClsGenerales
SqlAdapter.Fill(Data)
retorno = True
Catch ex As Exception
- OnError("Ocurrió un error al obtener los registros de Conciliaciones SAT.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ OnError("Ocurrió un error al obtener los registros de Conciliaciones detalle SAT.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return retorno
End Function
@@ -197,11 +197,11 @@ Public Class ClsGenerales
SqlAdapter.Fill(Data)
retorno = True
Catch ex As Exception
- OnError("Ocurrió un error al obtener los registros de Conciliaciones SAT.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ OnError("Ocurrió un error al obtener las Conciliaciones SAT.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return retorno
End Function
- Public Function SAT_DescargaSolicitudesGET(CveEmpresa As Int32, tipo As Int32, fIngInicio As String, fIngFin As String, fSolInicio As String, fSolFin As String) As Boolean
+ Public Function SAT_DescargaSolicitudesGET(CveEmpresa As Integer, tipo As Integer, fIngInicio As String, fIngFin As String, fSolInicio As String, fSolFin As String) As Boolean
Dim retorno As Boolean = False
DataAdapter("[PA_SAT_DescargaSolicitudesGET]", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
@@ -216,7 +216,7 @@ Public Class ClsGenerales
SqlAdapter.Fill(Data)
retorno = True
Catch ex As Exception
- OnError("Ocurrió un error al obtener los registros de solicitudes CFDI SAT.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ OnError("Ocurrió un error al obtener los registros de solicitudes CFDI SAT4.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return retorno
End Function
@@ -231,7 +231,7 @@ Public Class ClsGenerales
SqlAdapter.Fill(Data)
retorno = True
Catch ex As Exception
- OnError("Ocurrió un error al obtener los registros de solicitudes CFDI SAT.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ OnError("Ocurrió un error al obtener los folios fiscales de solicitudes CFDI SAT1.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return retorno
End Function
@@ -248,7 +248,7 @@ Public Class ClsGenerales
SqlAdapter.Fill(Data)
retorno = True
Catch ex As Exception
- OnError("Ocurrió un error al obtener los registros de solicitudes CFDI SAT.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ OnError("Ocurrió un error al obtener las descargas de solicitudes CFDI SAT.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return retorno
End Function
@@ -262,7 +262,7 @@ Public Class ClsGenerales
SqlAdapter.Fill(Data)
retorno = True
Catch ex As Exception
- OnError("Ocurrió un error al obtener los registros de solicitudes CFDI SAT.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ OnError("Ocurrió un error al obtener los registros de descarga de solicitudes CFDI SAT.2", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return retorno
End Function
diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb
index 1699f61e8..b46e6a56d 100644
--- a/App_Code/ClsInventarios.vb
+++ b/App_Code/ClsInventarios.vb
@@ -1045,6 +1045,7 @@ Public Class ClsInventarios
.Add("@Licencia", SqlDbType.VarChar).Value = Licencia
.Add("@Modulo", SqlDbType.VarChar).Value = Modulo
.Add("@CveOP", SqlDbType.Int).Value = CveOP
+
.Add("@CveFolioGarantia", SqlDbType.Int).Value = CveFolioGarantia
End With
diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb
index 6d12c1f84..4ab276bd8 100644
--- a/App_Code/ClsNominas.vb
+++ b/App_Code/ClsNominas.vb
@@ -3363,9 +3363,6 @@ Public Class ClsNominas
Return retorno
End Function
- Public Sub addParameters(varsql As String, sqltipe As SqlDbType, valor As Object)
- SqlAdapter.SelectCommand.Parameters.Add(varsql, sqltipe).Value = valor
- End Sub
Public Function RunQuery(errormsg As String) As Boolean
Dim retorno As Boolean = False
Try
@@ -3684,6 +3681,43 @@ Public Class ClsNominas
Return retorno
End Function
+ Public Function ConceptosGetallnewEmpresa(CveEmpresaOrigen As Integer, CveEmpresaDestino As Integer) As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("PA_Nom_ConceptosGetallnewEmpresa", CommandType.StoredProcedure)
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveEmpresaOrigen", SqlDbType.Int).Value = CveEmpresaOrigen
+ .Add("@CveEmpresaDestino", SqlDbType.Int).Value = CveEmpresaDestino
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al clonar los conceptos de nominas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return retorno
+ End Function
+
+ Public Function CargaPeriodosEjercicio(ejercicio As Int32, cveTipoPeriodo As Int32, cveSubTipoPeriodo As Int32, numero As Int32, fechaInicio As String, cveEmpresa As Int32, cveUsuario As Int32) As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("PA_Nom_CargaPeriodosEjercicio", CommandType.StoredProcedure)
+ addParameters("@Ejercicio", SqlDbType.Int, ejercicio)
+ addParameters("@CveTipoPeriodo", SqlDbType.Int, cveTipoPeriodo)
+ addParameters("@CveSubTipoPeriodo", SqlDbType.Int, cveSubTipoPeriodo)
+ addParameters("@Numero", SqlDbType.Int, numero)
+ addParameters("@FechaInicio", SqlDbType.VarChar, fechaInicio)
+ addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa)
+ addParameters("@CveUsuario", SqlDbType.Int, cveUsuario)
+ retorno = RunQuery("Ocurrió un error al realizar la carga de periodos.")
+ Return retorno
+ End Function
+
+
+
+
+
+ Public Sub addParameters(varsql As String, sqltipe As SqlDbType, valor As Object)
+ SqlAdapter.SelectCommand.Parameters.Add(varsql, sqltipe).Value = valor
+ End Sub
#Region "IDisposable Support"
' IDisposable
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
diff --git a/App_Code/ClsOS.vb b/App_Code/ClsOS.vb
index 64b381f1d..171d0f8bf 100644
--- a/App_Code/ClsOS.vb
+++ b/App_Code/ClsOS.vb
@@ -378,7 +378,7 @@ Public Class ClsOS
Return Retorno
End Function
- Public Function AddEstatusOrdenServicio(EstatusOrdenServicio As String, TipoEstatus As Integer, Estado As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
+ Public Function AddEstatusOrdenServicio(EstatusOrdenServicio As String, TipoEstatus As Integer, Estado As Integer, CveUsuario As Integer, CveEmpresa As Integer, BackgroundColor As String) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_OS_EstatusOrdenServicioAdd")
@@ -389,7 +389,7 @@ Public Class ClsOS
.Add("@Estado", SqlDbType.Bit).Value = Estado
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
-
+ .Add("@BackgroundColor", SqlDbType.VarChar).Value = BackgroundColor
End With
Try
@@ -407,7 +407,7 @@ Public Class ClsOS
Return Retorno
End Function
- Public Function UpdateEstatusOrdenServicio(EstatusOrdenServicio As String, TipoEstatus As Integer, Estado As Integer, CveEstatusOrdenServicio As Integer) As Boolean
+ Public Function UpdateEstatusOrdenServicio(EstatusOrdenServicio As String, TipoEstatus As Integer, Estado As Integer, CveEstatusOrdenServicio As Integer, BackgroundColor As String) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_OS_EstatusOrdenServicioUpdate")
@@ -417,6 +417,7 @@ Public Class ClsOS
.Add("@TipoEstatus", SqlDbType.Int).Value = TipoEstatus
.Add("@Estado", SqlDbType.Bit).Value = Estado
.Add("@CveEstatusOrdenServicio", SqlDbType.Int).Value = CveEstatusOrdenServicio
+ .Add("@BackgroundColor", SqlDbType.VarChar).Value = BackgroundColor
End With
Try
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index 0af6d6c27..f925e5065 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -8326,46 +8326,42 @@ Public Class ClsPaginas
PaginaDict.Add("/General/FolioFechaCancelacion.aspx".ToUpper(), -1)
#Region "####### Q U I T A R #######"
- PaginaDict.Add("/Contratos/Estimaciones.aspx".ToUpper(), -1)
- PaginaDict.Add("/Contratos/RepContratos.aspx".ToUpper(), -1)
- PaginaDict.Add("/Contratos/RepContratosDetalle.aspx".ToUpper(), -1)
- PaginaDict.Add("/Contratos/RepContratosAvances.aspx".ToUpper(), -1)
- PaginaDict.Add("/Contratos/RepContratosPresupuesto.aspx".ToUpper(), -1)
- PaginaDict.Add("/Contratos/CatContratosTipos.aspx".ToUpper(), -1)
- PaginaDict.Add("/SCT/RepGISSucesos.aspx".ToUpper(), -1)
- PaginaDict.Add("/SCT/RepLicencias.aspx".ToUpper(), -1)
- PaginaDict.Add("/SCT/Licencias.aspx".ToUpper(), -1)
- PaginaDict.Add("/SCT/LicenciasDetalle.aspx".ToUpper(), -1)
- PaginaDict.Add("/Prospectos/Prospectos.aspx".ToUpper(), -1)
- PaginaDict.Add("/XXXEjemplosPaola/Agenda/page_calendar.aspx".ToUpper(), -1)
- PaginaDict.Add("/Orlando/Default.aspx".ToUpper(), -1)
- PaginaDict.Add("/Orlando/Ventas.aspx".ToUpper(), -1)
- PaginaDict.Add("/Armonizacion/RepPresupuesto.aspx".ToUpper(), -1)
- PaginaDict.Add("/Armonizacion/PresupuestoIngreso.aspx".ToUpper(), -1)
- PaginaDict.Add("/Armonizacion/PresupuestoEgresos.aspx".ToUpper(), -1)
- PaginaDict.Add("/Compras/CatProveedoresCuentas.aspx".ToUpper(), -1)
- PaginaDict.Add("/123/DefaultGrid.aspx".ToUpper(), -1)
- PaginaDict.Add("/123/Default.aspx".ToUpper(), -1)
- PaginaDict.Add("/Ventas/EnviarCorreosPrueba.aspx".ToUpper(), -1)
- PaginaDict.Add("/Daniel/index.aspx".ToUpper(), -1)
- PaginaDict.Add("/Daniel/CatCiudades.aspx".ToUpper(), -1)
- PaginaDict.Add("/Daniel/Rodolfo.aspx".ToUpper(), -1)
- PaginaDict.Add("/MaquinariaFlotillas/CatEstatusMF.aspx".ToUpper(), -1)
- PaginaDict.Add("/TiposGastos/CatGastos.aspx".ToUpper(), -1)
- PaginaDict.Add("/Daniel/ProyectoFinal.aspx".ToUpper(), -1)
- PaginaDict.Add("/Daniel/ProyectoFinalTAP.aspx".ToUpper(), -1)
- PaginaDict.Add("/Daniel/Ejercicio.aspx".ToUpper(), -1)
- PaginaDict.Add("/Ventas/Ventas10.aspx".ToUpper(), -1)
- PaginaDict.Add("/Contabilidad/CatTipoPolizas.aspx".ToUpper(), 571)
- PaginaDict.Add("/Bancos/RepSaldoFianzas.aspx".ToUpper(), -1)
- PaginaDict.Add("/Hiram/Ventas.aspx".ToUpper(), -1)
- PaginaDict.Add("/RH/RepCursos.aspx".ToUpper(), -1)
- PaginaDict.Add("/OS/OrdenesServiciosPrueba.aspx".ToUpper(), -1)
- PaginaDict.Add("/OS/CatTiposCuentasEquiposPrueba.aspx".ToUpper(), -1)
- PaginaDict.Add("/Contabilidad/DIOTChilo.aspx".ToUpper(), -1)
- PaginaDict.Add("/Bancos/SaldarCajaChica.aspx".ToUpper(), -1)
- PaginaDict.Add("/Bancos/IngresosEgresosPorComprobar.aspx".ToUpper(), -1)
- PaginaDict.Add("/Bancos/ClientesAbonar.aspx".ToUpper(), -1)
+ 'PaginaDict.Add("/Contratos/Estimaciones.aspx".ToUpper(), -1)
+ 'PaginaDict.Add("/Contratos/RepContratos.aspx".ToUpper(), -1)
+ 'PaginaDict.Add("/Contratos/RepContratosDetalle.aspx".ToUpper(), -1)
+ 'PaginaDict.Add("/Contratos/RepContratosAvances.aspx".ToUpper(), -1)
+ 'PaginaDict.Add("/Contratos/RepContratosPresupuesto.aspx".ToUpper(), -1)
+ 'PaginaDict.Add("/Contratos/CatContratosTipos.aspx".ToUpper(), -1)
+ 'PaginaDict.Add("/SCT/RepGISSucesos.aspx".ToUpper(), -1)
+ 'PaginaDict.Add("/SCT/RepLicencias.aspx".ToUpper(), -1)
+ 'PaginaDict.Add("/SCT/Licencias.aspx".ToUpper(), -1)
+ 'PaginaDict.Add("/SCT/LicenciasDetalle.aspx".ToUpper(), -1)
+ 'PaginaDict.Add("/Prospectos/Prospectos.aspx".ToUpper(), -1)
+ 'PaginaDict.Add("/XXXEjemplosPaola/Agenda/page_calendar.aspx".ToUpper(), -1)
+ 'PaginaDict.Add("/Orlando/Default.aspx".ToUpper(), -1)
+ 'PaginaDict.Add("/Orlando/Ventas.aspx".ToUpper(), -1)
+ 'PaginaDict.Add("/Armonizacion/RepPresupuesto.aspx".ToUpper(), -1)
+ 'PaginaDict.Add("/Armonizacion/PresupuestoIngreso.aspx".ToUpper(), -1)
+ 'PaginaDict.Add("/Armonizacion/PresupuestoEgresos.aspx".ToUpper(), -1)
+ 'PaginaDict.Add("/Compras/CatProveedoresCuentas.aspx".ToUpper(), -1)
+ 'PaginaDict.Add("/Ventas/EnviarCorreosPrueba.aspx".ToUpper(), -1)
+ 'PaginaDict.Add("/Daniel/index.aspx".ToUpper(), -1)
+ 'PaginaDict.Add("/Daniel/CatCiudades.aspx".ToUpper(), -1)
+ 'PaginaDict.Add("/Daniel/Rodolfo.aspx".ToUpper(), -1)
+ 'PaginaDict.Add("/MaquinariaFlotillas/CatEstatusMF.aspx".ToUpper(), -1)
+ 'PaginaDict.Add("/TiposGastos/CatGastos.aspx".ToUpper(), -1)
+ 'PaginaDict.Add("/Daniel/ProyectoFinal.aspx".ToUpper(), -1)
+ 'PaginaDict.Add("/Daniel/ProyectoFinalTAP.aspx".ToUpper(), -1)
+ 'PaginaDict.Add("/Daniel/Ejercicio.aspx".ToUpper(), -1)
+ 'PaginaDict.Add("/Ventas/Ventas10.aspx".ToUpper(), -1)
+ 'PaginaDict.Add("/Contabilidad/CatTipoPolizas.aspx".ToUpper(), 571)
+ 'PaginaDict.Add("/Bancos/RepSaldoFianzas.aspx".ToUpper(), -1)
+ 'PaginaDict.Add("/Hiram/Ventas.aspx".ToUpper(), -1)
+ 'PaginaDict.Add("/RH/RepCursos.aspx".ToUpper(), -1)
+ 'PaginaDict.Add("/OS/OrdenesServiciosPrueba.aspx".ToUpper(), -1)
+ 'PaginaDict.Add("/OS/CatTiposCuentasEquiposPrueba.aspx".ToUpper(), -1)
+ 'PaginaDict.Add("/Bancos/IngresosEgresosPorComprobar.aspx".ToUpper(), -1)
+ 'PaginaDict.Add("/Bancos/ClientesAbonar.aspx".ToUpper(), -1)
#End Region
#Region "AC"
PaginaDict.Add("/AC/CatFuentesRecaudacion.aspx".ToUpper(), 268)
diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb
index 3b544ba40..4c7c41706 100644
--- a/App_Code/ClsProductosServicios.vb
+++ b/App_Code/ClsProductosServicios.vb
@@ -412,7 +412,7 @@ Public Class ClsProductosServicios
Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False,
Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0,
Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1,
- Optional NombreComercial As String = "", Optional NotasAdicionales As String = "", Optional EcommerceEtiquetas As String = "", Optional ActivoEcommerce As Boolean = False, Optional EcommercePrecio As Decimal = 0, Optional CveClasificacionEcommerce As Integer = -1) As Integer
+ Optional NombreComercial As String = "", Optional NotasAdicionales As String = "", Optional EcommerceEtiquetas As String = "", Optional ActivoEcommerce As Boolean = False, Optional EcommercePrecio As Decimal = 0, Optional CveClasificacionEcommerce As Integer = -1, Optional EcommerceCantidad As Decimal = 0) As Integer
Dim Retorno As Integer = -1
DataAdapter("PA_ProductosServiciosAdd")
@@ -516,6 +516,8 @@ Public Class ClsProductosServicios
.Add("@ActivoEcommerce", SqlDbType.VarChar).Value = ActivoEcommerce
.Add("@EcommercePrecio", SqlDbType.SmallMoney).Value = EcommercePrecio
.Add("@CveClasificacionEcommerce", SqlDbType.Int).Value = CveClasificacionEcommerce
+ .Add("@EcommerceCantidad", SqlDbType.SmallMoney).Value = EcommerceCantidad
+
End With
@@ -651,7 +653,7 @@ Public Class ClsProductosServicios
Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False, Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False,
Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0,
Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1,
- Optional NombreComercial As String = "", Optional NotasAdicionales As String = "", Optional EcommerceEtiquetas As String = "", Optional ActivoEcommerce As Boolean = False, Optional EcommercePrecio As Decimal = 0, Optional CveClasificacionEcommerce As Integer = -1) As Boolean
+ Optional NombreComercial As String = "", Optional NotasAdicionales As String = "", Optional EcommerceEtiquetas As String = "", Optional ActivoEcommerce As Boolean = False, Optional EcommercePrecio As Decimal = 0, Optional CveClasificacionEcommerce As Integer = -1, Optional EcommerceCantidad As Decimal = 0) As Boolean
Dim Retorno As Boolean = False
@@ -755,7 +757,7 @@ Public Class ClsProductosServicios
.Add("@ActivoEcommerce", SqlDbType.VarChar).Value = ActivoEcommerce
.Add("@EcommercePrecio", SqlDbType.SmallMoney).Value = EcommercePrecio
.Add("@CveClasificacionEcommerce", SqlDbType.Int).Value = CveClasificacionEcommerce
-
+ .Add("@EcommerceCantidad", SqlDbType.SmallMoney).Value = EcommerceCantidad
End With
Try
diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb
index e1eab6eec..4c1bf4982 100644
--- a/App_Code/ClsVentas.vb
+++ b/App_Code/ClsVentas.vb
@@ -419,7 +419,7 @@ Public Class ClsVentas
Optional DiasCredito As Integer = 0, Optional EsDiasCreditoFijo As Boolean = False, Optional AnticipoEspecial As Boolean = False, Optional Kilometraje As Double = 0, Optional EsAmortizacion As Boolean = False, Optional CveTipoRetencion As Integer = 0,
Optional CorreoNotificacion As String = "", Optional FormaPaqueteria As Integer = 1, Optional FacturarSucursal As Boolean = False, Optional VentaDesglosaIEPS As Boolean = False, Optional ServicioDomicilio As Boolean = False, Optional RFCReceptor As String = "", Optional Adjunto As String = "-1",
Optional DevolucionImportePagado As Decimal = 0, Optional EsGarantia As Boolean = False, Optional CveLineaAdicional As Integer = -1, Optional DescripcionVenta As String = "",
- Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveTipoVenta As Integer = -1
+ Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveTipoVenta As Integer = -1, Optional RequiereOS As Boolean = False
) As Boolean
Dim Retorno As Boolean = False
@@ -524,6 +524,8 @@ Public Class ClsVentas
.Add("@CveMedico", SqlDbType.Int).Value = CveMedico
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
.Add("@CveTipoVenta", SqlDbType.Int).Value = CveTipoVenta
+ .Add("@RequiereOS", SqlDbType.Int).Value = RequiereOS
+
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
End With
@@ -552,7 +554,9 @@ Public Class ClsVentas
Optional TipoDocto As String = "Cot", Optional Vigencia As Date = MinFecha, Optional CondicionesPago As Integer = -1,
Optional AtencionA As String = "-1", Optional PedidoContrato As String = "-1", Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1,
Optional CveCliente As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional OrdenCompra As String = "-1", Optional RetIVA As Double = -1,
- Optional RetISR As Double = -1, Optional Kilometraje As Double = 0, Optional CveUsoCFDi As Integer = -1, Optional ServicioDomicilio As Boolean = False, Optional CveVendedor As Integer = -1) As Boolean
+ Optional RetISR As Double = -1, Optional Kilometraje As Double = 0, Optional CveUsoCFDi As Integer = -1, Optional ServicioDomicilio As Boolean = False, Optional CveVendedor As Integer = -1,
+ Optional RequiereOS As Boolean = False) As Boolean
+
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_VentasUpdate")
@@ -586,6 +590,7 @@ Public Class ClsVentas
.Add("@CveUsoCFDi", SqlDbType.SmallInt).Value = CveUsoCFDi
.Add("@ServicioDomicilio", SqlDbType.Bit).Value = ServicioDomicilio
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
+ .Add("@RequiereOS", SqlDbType.Int).Value = RequiereOS
End With
Try
@@ -5989,7 +5994,8 @@ Public Class ClsVentas
- Public Function AddMedico(Medico As String, CedulaProfesional As String, FechaNacimiento As Date, Notas As String, DiasAtencion As String, Horario As String, Lugar As String, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
+ Public Function AddMedico(Medico As String, CedulaProfesional As String, FechaNacimiento As Date, Notas As String, DiasAtencion As String, Horario As String, Lugar As String, Estatus As Boolean, CveUsuario As Integer,
+ CveEmpresa As Integer, Telefono As String, Mail As String, Especialidad As String) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_MedicosAdd")
@@ -6005,6 +6011,11 @@ Public Class ClsVentas
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@Telefono", SqlDbType.VarChar).Value = Telefono
+ .Add("@Mail", SqlDbType.VarChar).Value = Mail
+ .Add("@Especialidad", SqlDbType.VarChar).Value = Especialidad
+
+
End With
Try
SqlAdapter.Fill(Data)
@@ -6016,7 +6027,8 @@ Public Class ClsVentas
End Function
- Public Function UpdateMedico(CveMedico As Integer, Medico As String, CedulaProfesional As String, FechaNacimiento As Date, Notas As String, DiasAtencion As String, Horario As String, Lugar As String, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
+ Public Function UpdateMedico(CveMedico As Integer, Medico As String, CedulaProfesional As String, FechaNacimiento As Date, Notas As String, DiasAtencion As String, Horario As String, Lugar As String, Estatus As Boolean, CveUsuario As Integer,
+ CveEmpresa As Integer, Telefono As String, Mail As String, Especialidad As String) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_MedicosUpdate")
@@ -6032,6 +6044,9 @@ Public Class ClsVentas
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@Telefono", SqlDbType.VarChar).Value = Telefono
+ .Add("@Mail", SqlDbType.VarChar).Value = Mail
+ .Add("@Especialidad", SqlDbType.VarChar).Value = Especialidad
End With
Try
SqlAdapter.Fill(Data)
diff --git a/Ashx/CargaEventos.ashx b/Ashx/CargaEventos.ashx
index 3e8039f23..fbcce7d3e 100644
--- a/Ashx/CargaEventos.ashx
+++ b/Ashx/CargaEventos.ashx
@@ -100,6 +100,10 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
DT_SubProyectos.Columns.Add("CveSubProyecto", GetType(Integer))
DT_SubProyectos.Columns.Add("backgroundColor")
+ Dim DT_EstatusOS = New DataTable
+ DT_EstatusOS.Columns.Add("", GetType(Integer))
+
+
'son 26
Dim Colores() As String = {"#006699", "#0099cc", "#0066cc", "#0033cc", "#0000ff", "#3333ff", "#3333ff", "#6600ff", "#9933ff", "#cc00ff", "#cc00cc", "#cc0099", "#cc3399", "#cc6699", "#cc0066", "#009933", "#00cc00", "#00cc66", "#009999", "#669900", "#99cc00", "#cccc00", "#cc9900", "#ff9900", "#006666", "#669999"}
@@ -140,6 +144,8 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
End If
+
+
Dim EsCoordinador As Boolean = False
Dim usuarioActual_ As Usuario = UsuarioActual(context)
@@ -239,17 +245,24 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
If usuarioActual_.Empresa.Funcionalidad(578) = "1" Then
- If dr("TipoEstatusOS").ToString.ToEntero.Contiene(1, 2, 3) Then
- cevent.backgroundColor = "#006699"
- ElseIf dr("TipoEstatusOS").ToString.ToEntero.Contiene(4) Then
- cevent.backgroundColor = "#025716"
- ElseIf dr("TipoEstatusOS").ToString.ToEntero.Contiene(5) Then
- cevent.backgroundColor = "#730505"
+ Dim colorString As String = dr("BackgroundColorOS").ToString.Trim
+
+ If colorString.Length > 0 AndAlso IsValidHtmlColor(colorString) Then
+ cevent.backgroundColor = $"#{colorString}"
Else
- cevent.backgroundColor = "#006699"
+ If dr("TipoEstatusOS").ToString.ToEntero.Contiene(1, 2, 3) Then
+ cevent.backgroundColor = "#006699"
+ ElseIf dr("TipoEstatusOS").ToString.ToEntero.Contiene(4) Then
+ cevent.backgroundColor = "#025716"
+ ElseIf dr("TipoEstatusOS").ToString.ToEntero.Contiene(5) Then
+ cevent.backgroundColor = "#730505"
+ Else
+ cevent.backgroundColor = "#006699"
+ End If
End If
+
End If
'VERIFICAMOS SI TIENE O NO RECURRENCIA
@@ -420,9 +433,20 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
ReadOnly Property UsuarioActual(ByVal context As HttpContext) As Usuario
Get
- UsuarioActual = DirectCast(context.Session("UsuarioSIG"), Usuario)
+ UsuarioActual = DirectCast(If(context IsNot Nothing, context.Session("UsuarioSIG", Nothing)), Usuario)
End Get
End Property
+ Private Function IsValidHtmlColor(colorString As String) As Boolean
+ Try
+ Dim color As System.Drawing.Color = System.Drawing.ColorTranslator.FromHtml(colorString)
+ ' Si no se produce una excepción, el color es válido
+ Return True
+ Catch ex As Exception
+ ' Se produce una excepción, el color no es válido
+ Return False
+ End Try
+ End Function
+
End Class
diff --git a/Bancos/Devoluciones.aspx.cs b/Bancos/Devoluciones.aspx.cs
index 3155be9f3..d9521500b 100644
--- a/Bancos/Devoluciones.aspx.cs
+++ b/Bancos/Devoluciones.aspx.cs
@@ -356,8 +356,7 @@ public partial class Bancos_Devoluciones : ClsPaginas
int CveTipoPoliza = 1;// tipo ingreso
int CvePrePoliza = 0;
int CveMoneda = get_GlobalDTBancosCuentas(-1, CveEmpresa: UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveCuenta = {DdlCuenta.SelectedValue.ToEntero()}").ToEntero();
- int FolioFijo = 0;
- int IDPoliza = 0;
+ int FolioFijo = 0;
int cveProveedor = (DdlProveedores.SelectedValue.ToEntero() > 0) ? DdlProveedores.SelectedValue.ToEntero() : -1;
int cvePersonal = (DdlPersonal.SelectedValue.ToEntero() > 0) ? DdlPersonal.SelectedValue.ToEntero() : -1;
int cveCliente = (DdlCliente.SelectedValue.ToEntero() > 0) ? DdlCliente.SelectedValue.ToEntero() : -1;
@@ -567,28 +566,15 @@ public partial class Bancos_Devoluciones : ClsPaginas
}
//VALIDA QUE CUADRE LA PREPOLIZA
- if (ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, -1))
+ Usuario UA = UsuarioActual;
+ if (ObjMov.ValidacionesPrePoliza(CvePrePoliza, ref UA))
{
if (ObjMov.ValorPolizaDescuadre > 0)
{
MsgError = ObjMov.MensajePolizaDescuadre;
ModExtensiones.GuardaLogAD($"Bancos/IE DEVOLUCIONES | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas");
}
- }
-
- //CONTABILIZA
- if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals(""))
- {
- if (ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa))
- {
- IDPoliza = ObjMov.ContaIdPoliza;
- }
- else
- {
- Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError);
- }
- }
-
+ }
if (MsgError.Equals(""))
{
if (Msg.ToString().Equals(""))
diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb
index b1442d461..81155906e 100644
--- a/Bancos/IE.aspx.vb
+++ b/Bancos/IE.aspx.vb
@@ -2856,24 +2856,6 @@ Partial Class Bancos_IE
End If
End If
-
- 'El movimiento 1 es el de Venta
-
- 'Conta ContPAQ
- If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then
- Dim AutoConta As Boolean = True
-
- If AutoConta Then
- If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
- IDPoliza = ObjMov.ContaIdPoliza
- Else
- Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
- MsgError = "Error al contabilizar."
- End If
- End If
-
- End If
-
If MsgError = "" Then
'IMPRIME CHEQUE
'GeneraChequePDF(CveIE, UsuarioActual.Empresa, IDPoliza)
diff --git a/Bancos/PagoAcreedor.aspx.cs b/Bancos/PagoAcreedor.aspx.cs
index 42b3d4f01..52c647ae7 100644
--- a/Bancos/PagoAcreedor.aspx.cs
+++ b/Bancos/PagoAcreedor.aspx.cs
@@ -382,28 +382,15 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
}
//VALIDA QUE CUADRE LA PREPOLIZA
- if (MsgError == "" && ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 5))
+ Usuario UA = UsuarioActual;
+ if (MsgError == "" && ObjMov.ValidacionesPrePoliza(CvePrePoliza, ref UA,Opcion:5))
{
if (ObjMov.ValorPolizaDescuadre > 0)
{
MsgError = ObjMov.MensajePolizaDescuadre;
ModExtensiones.GuardaLogAD($"Bancos/IE PAGO ACREEDOR | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas");
}
- }
-
- //CONTABILIZA
- if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals(""))
- {
-
- if (ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa))
- {
- IDPoliza = ObjMov.ContaIdPoliza;
- }
- else
- {
- Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError);
- }
- }
+ }
if (MsgError.Equals(""))
{
@@ -617,27 +604,15 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
}
//VALIDA QUE CUADRE LA POLIZA
- if (ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 5))
+ Usuario UA = UsuarioActual;
+ if (MsgError == "" && ObjMov.ValidacionesPrePoliza(CvePrePoliza, ref UA, Opcion: 5))
{
if (ObjMov.ValorPolizaDescuadre > 0)
{
MsgError = ObjMov.MensajePolizaDescuadre;
ModExtensiones.GuardaLogAD($"Bancos/IE PAGO ACREEDOR | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas");
}
- }
-
- //CONTABILIZA
- if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals(""))
- {
- if (ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa))
- {
- IDPoliza = ObjMov.ContaIdPoliza;
- }
- else
- {
- Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError);
- }
- }
+ }
if (MsgError.Equals(""))
{
diff --git a/Bancos/PagoDeudor.aspx.cs b/Bancos/PagoDeudor.aspx.cs
index fe400ea7b..020ac979b 100644
--- a/Bancos/PagoDeudor.aspx.cs
+++ b/Bancos/PagoDeudor.aspx.cs
@@ -308,25 +308,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas
$"Bancos/IE PAGO Deudor | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}".GuardaLogAD("LogPrePolizas");
}
}
-
- //bool AutoConta = UsuarioActual.Empresa.Funcionalidad(200).Equals("1");
- //// if (UsuarioActual.CveEmpresa == 119) AutoConta = false;
-
- //if (AutoConta && MsgError.Equals(""))
- //{
- // //JJMQ:20190103: Cambio la siguiente linea porque esta validando siempre una complementaria aunque el movto sea dlls
- // //Y se valida la moneda con el siguiente IF
-
- // if (ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa))
- // {
- // IDPoliza = ObjMov.ContaIdPoliza;
- // }
- // else
- // {
- // Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError);
- // }
- //}
-
+
if (MsgError.Equals(""))
{
if (Msg.ToString().Equals(""))
@@ -686,23 +668,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas
MsgError = ObjMov.MensajePolizaDescuadre;
$"Bancos/IE PAGO Deudor | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}".GuardaLogAD("LogPrePolizas");
}
- }
-
-
- //bool AutoConta = UsuarioActual.Empresa.Funcionalidad(200).Equals("1");
- ////if (UsuarioActual.CveEmpresa == 119) AutoConta = false;
-
- //if (AutoConta && MsgError.Equals(""))
- //{
- // if (ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa))
- // {
- // IDPoliza = ObjMov.ContaIdPoliza;
- // }
- // else
- // {
- // Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError);
- // }
- //}
+ }
}
else
{
diff --git a/Bancos/PolizaCheque.aspx.vb b/Bancos/PolizaCheque.aspx.vb
index 7fda562fd..c54a4ae23 100644
--- a/Bancos/PolizaCheque.aspx.vb
+++ b/Bancos/PolizaCheque.aspx.vb
@@ -861,19 +861,6 @@ Partial Class Bancos_PolizaCheque
End If
End If
- 'El movimiento 2 es el de Pago
- If UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" Then
-
- If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
- IDPoliza = ObjMov.ContaIdPoliza
- Else
- MsgError = "Error al contabilizar"
- Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
- End If
-
- End If
-
-
If MsgError = "" Then
ObjIE.Commit()
diff --git a/Bancos/PopIECompras.aspx.vb b/Bancos/PopIECompras.aspx.vb
index a093792e9..cdda5974c 100644
--- a/Bancos/PopIECompras.aspx.vb
+++ b/Bancos/PopIECompras.aspx.vb
@@ -1456,7 +1456,6 @@ Partial Class Bancos_PopIECompras
If MsgError = "" Then
Dim VentaActual As New Venta(UsuarioActual) With {.CveVenta = rw.DataKey("CveVenta").ToEntero, .ClienteNombre = NombreCliente, .SerieFolio = rw.DataKey("SerieFolio"), .CveCliente = rw.DataKey("CveCliente").ToEntero, .IVA = rw.DataKey("IVA").ToDecimal, .IEPS = rw.DataKey("IEPS").ToDecimal, .RetIVA = rw.DataKey("RetIVA").ToDecimal, .RetISR = rw.DataKey("RetISR").ToDecimal, .Total = rw.DataKey("Total").ToDecimal, .PorcentajeIVA = rw.DataKey("PorcentajeIVA").ToDecimal, .CveSubProyecto = rw.DataKey("CveSubProyecto").ToEntero, .CveMoneda = rw.DataKey("CveMoneda").ToEntero}
Dim PagoVenta As New VentaPago
-
PagoVenta.CveMonedaPago = rw.DataKey("CveMoneda").ToEntero
PagoVenta.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal
PagoVenta.ImportePagoVenta = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal
diff --git a/Bancos/PopIEVentas.aspx b/Bancos/PopIEVentas.aspx
index 078ca609f..851a7d32a 100644
--- a/Bancos/PopIEVentas.aspx
+++ b/Bancos/PopIEVentas.aspx
@@ -217,8 +217,8 @@
-
+
@@ -350,7 +350,7 @@
-
diff --git a/Bancos/PopIEVentas.aspx.vb b/Bancos/PopIEVentas.aspx.vb
index d037f2d73..b05648ad7 100644
--- a/Bancos/PopIEVentas.aspx.vb
+++ b/Bancos/PopIEVentas.aspx.vb
@@ -118,7 +118,7 @@ Partial Class Bancos_PopIEVentas
Private Property TipoTransaccion As String
Get
- Return ViewState("TipoTransaccion").ToString
+ Return IfNull(ViewState("TipoTransaccion"), "").ToString
End Get
Set(value As String)
ViewState("TipoTransaccion") = value
@@ -772,7 +772,7 @@ Partial Class Bancos_PopIEVentas
Dim Folio As Long
Dim dr As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("CveCuenta = " & DdlCuenta.SelectedValue)
- Dim TCveMoneda = -1
+ Dim TCveMoneda As Integer = -1
If dr IsNot Nothing Then
If ChkPagarPesos.Checked Then
@@ -1175,7 +1175,7 @@ Partial Class Bancos_PopIEVentas
Dim CvePlantillaPoliza As Integer = 11
Dim ConceptoPoliza As String = String.Format("{0} {1}", NombreCliente, SerieFolio)
Dim CveCuentaDeposito As Integer = If(DdlCuentaDeposito.Items.Count > 0, DdlCuentaDeposito.SelectedValue.ToEntero, 0)
- Dim FechaDocumento = FechaVenta
+ Dim FechaDocumento As Date = FechaVenta
Dim StrMsg As New StringBuilder
'Saca moneda en que se va a pagar segun metodo de pago
@@ -1310,9 +1310,33 @@ Partial Class Bancos_PopIEVentas
Case "5" 'Compras
If CveVenta > 0 Then
ImportePagado = TxtImporte.Text.Trim.ToDecimal
- CveConceptoPrePoliza = 2
- 'CveConcepto2 = 43
CveIE = -1
+ For Each rw As GridViewRow In GvCompras.Rows
+ If rw.FCCheckBox("Chk").Checked AndAlso rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal <> 0 Then
+ Pago.CveMonedaPago = 1
+ Pago.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal
+ Pago.ImportePagoVenta = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal
+ Pago.TipoPago = "Compra"
+ If AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then
+ MsgError = "No se pudo insertar la póliza"
+ End If
+ If MsgError = "" Then
+ Dim CompraActual As New Compra() With {.CveCompra = rw.DataKey("CveCompra").ToEntero, .ProveedorNombre = NombreCliente, .SerieFolio = rw.DataKey("SerieFolio"), .CveProveedor = rw.DataKey("CveProveedor").ToEntero, .IVA = rw.DataKey("IVA").ToDecimal, .IEPS = rw.DataKey("IEPS").ToDecimal, .RetIVA = rw.DataKey("RetIVA").ToDecimal, .RetISR = rw.DataKey("RetISR").ToDecimal, .Total = rw.DataKey("Total").ToDecimal, .PorcentajeIVA = rw.DataKey("PorcentajeIVA").ToDecimal, .CveSubProyecto = rw.DataKey("CveSubProyecto").ToEntero, .CveMoneda = rw.DataKey("CveMoneda").ToEntero, .CveTipoConceptoProveedor = rw.DataKey("CveTipoConcepto").ToEntero}
+ Dim PagoCompra As New CompraPago
+
+ PagoCompra.CveMonedaPago = rw.DataKey("CveMoneda").ToEntero
+ PagoCompra.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal
+ PagoCompra.TCPago = rw.DataKey("TipoCambio").ToDecimal
+ PagoCompra.CveProveedor = rw.DataKey("CveProveedor").ToEntero
+ PagoCompra.CveVentaRelacionada = CveVenta
+ PagoCompra.TipoPago = "Venta"
+ If AplicaPrePolizaPagoCompra(CompraActual, PagoCompra, CvePrePoliza, ObjMov) Then
+ MsgError = "No se pudo insertar la póliza"
+ End If
+ End If
+
+ End If
+ Next
End If
Case Else
'NO SE HA DEFINIDO PARA FUNCIONARIO Y EMPLEADO
@@ -1350,7 +1374,7 @@ Partial Class Bancos_PopIEVentas
'07-05-2018 - Timbra Complemento de pago
Dim TextoComplementoPago As String = ""
- StrMsg.AppendFormat("Folio {0} ", ObjIE.Folio)
+ If ObjIE.Folio <> "" Then StrMsg.AppendFormat("Folio {0} ", ObjIE.Folio)
If RBLContado.SelectedValue = "1" And ChkComplementoPago.Checked Then
Dim SeriesPago As New List(Of String)
diff --git a/Bancos/PrestamoPersonal.aspx.cs b/Bancos/PrestamoPersonal.aspx.cs
index 00075eb97..0583bf6d1 100644
--- a/Bancos/PrestamoPersonal.aspx.cs
+++ b/Bancos/PrestamoPersonal.aspx.cs
@@ -315,30 +315,18 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
else
{
MsgError = "No se pudo insertar la póliza";
- }
-
- // VALIDA QUE CUADRE LA PREPOLIZA
- if (ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 5))
+ }
+
+ // VALIDA QUE CUADRE LA PREPOLIZA
+ Usuario UA = UsuarioActual;
+ if (MsgError == "" && ObjMov.ValidacionesPrePoliza(CvePrePoliza, ref UA, Opcion: 5))
{
if (ObjMov.ValorPolizaDescuadre > 0)
{
MsgError = ObjMov.MensajePolizaDescuadre;
ModExtensiones.GuardaLogAD($"Bancos/IE PAGO ACREEDOR | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas");
}
- }
-
- //CONTABILIZA
- if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals(""))
- {
- if (ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa))
- {
- IDPoliza = ObjMov.ContaIdPoliza;
- }
- else
- {
- Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError);
- }
- }
+ }
if (MsgError.Equals(""))
{
@@ -593,30 +581,18 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
else
{
MsgError = "No se pudo insertar la póliza";
- }
-
- //VALIDA QUE CUADRE LA POLIZA
- if (ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 5))
+ }
+
+ //VALIDA QUE CUADRE LA POLIZA
+ Usuario UA = UsuarioActual;
+ if (MsgError == "" && ObjMov.ValidacionesPrePoliza(CvePrePoliza, ref UA, Opcion: 5))
{
if (ObjMov.ValorPolizaDescuadre > 0)
{
MsgError = ObjMov.MensajePolizaDescuadre;
ModExtensiones.GuardaLogAD($"Bancos/IE PAGO ACREEDOR | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas");
}
- }
-
- //CONTABILIZA
- if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals(""))
- {
- if (ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa))
- {
- IDPoliza = ObjMov.ContaIdPoliza;
- }
- else
- {
- Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError);
- }
- }
+ }
if (MsgError.Equals(""))
{
diff --git a/Bancos/ProductosFinancieros.aspx.vb b/Bancos/ProductosFinancieros.aspx.vb
index 142179554..4836de357 100644
--- a/Bancos/ProductosFinancieros.aspx.vb
+++ b/Bancos/ProductosFinancieros.aspx.vb
@@ -366,25 +366,7 @@ Partial Class Bancos_ProductosFinancieros
If Not ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=4) Then
ErrorTransaccion = True
End If
-
- 'Por el momento no hay movimiento para estas plantillas y no debe entrar aqui
- If UsuarioActual.Empresa.Funcionalidad(200).ToEntero > 0 And Not ErrorTransaccion Then
- If idCuentaContabilizacion > 0 Then
- If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
- Alert(alertaContabilizacion, ModExtensiones.TipoMensaje.MsgInformacion)
- Else
- Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico")
- End If
- Else
- Alert(String.Format("No se puede contabilizar la Prepoliza debido a que las siguientes cuentas son invalidas: {0}", CuentasContablesInvalidas))
- End If
- End If
-
-
End If
-
-
-
Else
ErrorTransaccion = True
End If
diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb
index 23f8c212d..9f7dd2e45 100644
--- a/Bancos/ProveedoresAbonar.aspx.vb
+++ b/Bancos/ProveedoresAbonar.aspx.vb
@@ -841,23 +841,12 @@ Partial Class Bancos_ProveedoresAbonar
End If
End If
- If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 5) Then
+ If MsgError = "" AndAlso ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=5) Then
If ObjMov.ValorPolizaDescuadre > 0 Then
MsgError = ObjMov.MensajePolizaDescuadre + " " + ObjMov.ValorDiferencia
GuardaLogAD($"Bancos/ProveedoresAbonar | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
End If
End If
-
- 'Conta ContPAQ
- If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then
- 'If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjConta) Then
- If ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, ObjConta:=ObjConta) Then
- IDPoliza = ObjMov.ContaIdPoliza
- Else
- Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
- MsgError = "Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico"
- End If
- End If
Else
MsgError = "No se pudo insertar la póliza"
End If
diff --git a/Bancos/RepEgresosSinComprobante.aspx.vb b/Bancos/RepEgresosSinComprobante.aspx.vb
index decc73eb3..4c564e10d 100644
--- a/Bancos/RepEgresosSinComprobante.aspx.vb
+++ b/Bancos/RepEgresosSinComprobante.aspx.vb
@@ -333,12 +333,6 @@ Partial Class Bancos_RepEgresosSinComprobante
Exit For
End If
- If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
- If Not ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
- Alert("Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
- End If
- End If
-
End If
Next
Catch ex As Exception
diff --git a/Bancos/SaldarCajaChica.aspx b/Bancos/SaldarCajaChica.aspx
deleted file mode 100644
index 75ee03b93..000000000
--- a/Bancos/SaldarCajaChica.aspx
+++ /dev/null
@@ -1,48 +0,0 @@
-<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="SaldarCajaChica.aspx.cs" Inherits="Bancos_SaldarCajaChica" %>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Ver Póliza", ObjMov.ContaIdPoliza)
- End If
- Else
- MsgError = "Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico"
- End If
- End If
-
If CveIE > 0 Then
AlertaGlobal.AppendFormat("
Movimiento: {1}", CveIE, FolioOrigen)
End If
diff --git a/CRM/Acercamiento.aspx b/CRM/Acercamiento.aspx
index 47b1508a6..b726cbc25 100644
--- a/CRM/Acercamiento.aspx
+++ b/CRM/Acercamiento.aspx
@@ -454,7 +454,7 @@
<%----%>
-
+
", ObjConta.ContaIdPoliza, ObjConta.ContaFolio)
- End If
- End If
-
If MsgError = "" Then
ObjConta.Commit()
If MensajeAlert.ToString <> "" Then
diff --git a/Compras/RepRembolsoComprobaciones.aspx.vb b/Compras/RepRembolsoComprobaciones.aspx.vb
index 4f611595d..98cbd2dd3 100644
--- a/Compras/RepRembolsoComprobaciones.aspx.vb
+++ b/Compras/RepRembolsoComprobaciones.aspx.vb
@@ -160,7 +160,7 @@ Partial Class Compras_RepRembolsoComprobaciones
End If
- If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then
+ If ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then
If ObjMov.ValorPolizaDescuadre > 0 Then
GuardaLogAD($"Compras/RepRembolsoComprobaciones - Unificar | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
Alert(ObjMov.MensajePolizaDescuadre, TipoMensaje.MsgError)
@@ -171,25 +171,11 @@ Partial Class Compras_RepRembolsoComprobaciones
If Not TieneError Then
Msg.AppendFormat("Se unificaron todas las compras con éxito")
End If
-
- If UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" AndAlso Not TieneError Then
- ObjAC = New ClsContPAQi(UsuarioActual.Empresa)
- ObjAC.IniciaTransacSQL()
-
- If Not TieneError Then
- If Not ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjAC) Then
- TieneError = True
- Alert($"Ocurrio un error al contabilizar {ObjMov.AlertaMensaje}", TipoMensaje.MsgAdvertencia)
- Else
- IdPoliza = ObjMov.ContaIdPoliza
- End If
- End If
-
- If IdPoliza > 0 AndAlso Not TieneError Then
- Msg.AppendFormat("
Ver Póliza", IdPoliza)
- End If
-
+ IdPoliza = ObjMov.ContaIdPoliza
+ If IdPoliza > 0 AndAlso Not TieneError Then
+ Msg.AppendFormat("
Ver Póliza", IdPoliza)
End If
+
Catch ex As Exception
TieneError = True
OnError("Ocurrió un error al unificar las compras", ex)
diff --git a/Contabilidad/PopUpAuxiliar.aspx.vb b/Contabilidad/PopUpAuxiliar.aspx.vb
index 02ec5fce4..9cdaaff03 100644
--- a/Contabilidad/PopUpAuxiliar.aspx.vb
+++ b/Contabilidad/PopUpAuxiliar.aspx.vb
@@ -277,7 +277,7 @@ Partial Class PopUpAuxiliar
TieneError = True
End If
- If Not TieneError AndAlso Conta.ValidacionPrePolizaCuadre(ClavePrePoliza, -1) Then
+ If Not TieneError AndAlso Conta.ValidacionesPrePoliza(ClavePrePoliza, UsuarioActual) Then
If Conta.ValorPolizaDescuadre > 0 Then
TieneError = True
End If
diff --git a/Contabilidad/RegPrePoliza.aspx.vb b/Contabilidad/RegPrePoliza.aspx.vb
index 222bc4852..a9832af7d 100644
--- a/Contabilidad/RegPrePoliza.aspx.vb
+++ b/Contabilidad/RegPrePoliza.aspx.vb
@@ -1100,29 +1100,29 @@ Partial Class ContabilidadC_RegPrePoliza
' End If
'End If
- If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 1) Then
+ If ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then
If ObjMov.ValorPolizaDescuadre > 0 Then
GuardaLogAD($"Contabilidad/RegPrePolizas | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
MsgError = ObjMov.MensajePolizaDescuadre & "-"
End If
End If
- 'El movimiento 2 es el de Pago
- If ChkAutoConta.Checked AndAlso MsgError = "" Or UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" Then
- If idCuentaContabilizacion > 0 Then
- If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
+ ''El movimiento 2 es el de Pago
+ 'If ChkAutoConta.Checked AndAlso MsgError = "" Or UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" Then
+ ' If idCuentaContabilizacion > 0 Then
+ ' If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
- 'MENSAJE PRINCIPAL
- MensajeAlert.AppendFormat("
Folio de Póliza: {1}", ObjMov.ContaIdPoliza, ObjMov.ContaFolio)
- MensajeAlert.AppendFormat("
Prepóliza: {1}", CvePrePoliza, ObjMov.ContaFolio)
- 'Alert(MensajeAlert.Tostring(), ModExtensiones.TipoMensaje.MsgInformacion)
- Else
- Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico")
- End If
- Else
- Alert("No se puede contabilizar la Prepoliza debido a que una o mas cuentas son inválidas")
- End If
- End If
+ ' 'MENSAJE PRINCIPAL
+ ' MensajeAlert.AppendFormat("
Folio de Póliza: {1}", ObjMov.ContaIdPoliza, ObjMov.ContaFolio)
+ ' MensajeAlert.AppendFormat("
Prepóliza: {1}", CvePrePoliza, ObjMov.ContaFolio)
+ ' 'Alert(MensajeAlert.Tostring(), ModExtensiones.TipoMensaje.MsgInformacion)
+ ' Else
+ ' Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico")
+ ' End If
+ ' Else
+ ' Alert("No se puede contabilizar la Prepoliza debido a que una o mas cuentas son inválidas")
+ ' End If
+ 'End If
Else
MsgError = "No se pudo insertar la póliza"
diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb
index 66f677d93..04a1d755f 100644
--- a/Contabilidad/RegPrePolizaS.aspx.vb
+++ b/Contabilidad/RegPrePolizaS.aspx.vb
@@ -2915,7 +2915,7 @@ Partial Class ContabilidadC_RegPrePolizaS
End If
Next
- If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 1) Then
+ If MsgError = "" AndAlso ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=1) Then
If ObjMov.ValorPolizaDescuadre > 0 Then
GuardaLogAD($"Contabilidad/RegPrePolizas | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
MsgError = ObjMov.MensajePolizaDescuadre
diff --git a/Contabilidad/RepAnexoCatalogo.aspx.vb b/Contabilidad/RepAnexoCatalogo.aspx.vb
index e3dd29e2a..1ce96c44a 100644
--- a/Contabilidad/RepAnexoCatalogo.aspx.vb
+++ b/Contabilidad/RepAnexoCatalogo.aspx.vb
@@ -71,6 +71,10 @@ Partial Class AC_RepAnexoCatalogo
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
+ If UsuarioActual.Empresa.TipoContabilidad = 1 Then
+ Response.Redirect($"/Contabilidad2/RepAnexoCatalogo.aspx")
+ End If
+
If UsuarioActual.Empresa.UsaContabilidad Or UsuarioActual.Empresa.UsaAC Then
InicializaValores()
CargaURLParametros()
diff --git a/Contabilidad2/CatCuentasAsignaciones.aspx.vb b/Contabilidad2/CatCuentasAsignaciones.aspx.vb
index 7a8c0c868..2bc12af94 100644
--- a/Contabilidad2/CatCuentasAsignaciones.aspx.vb
+++ b/Contabilidad2/CatCuentasAsignaciones.aspx.vb
@@ -72,7 +72,14 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
Private Sub CargaDatosModal()
DdlConceptoNomina.DataSource = GlobalDTNomConceptos(UsuarioActual.CveEmpresa)
- DdlConceptoNomina.DataBind()
+ DdlConceptoNomina.DataBind()
+
+ If UsuarioActual.Empresa.TipoContabilidad = 2 Then
+ Dim Con As New ClsContPAQi(UsuarioActual.Empresa)
+ Con.SincronizaCuentas(UsuarioActual.CveEmpresa)
+ Con.Dispose()
+ End If
+
Dim ObjConta As New ClsContabilidad
If ObjConta.GetConta_ConceptosContables() Then
@@ -84,7 +91,8 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
DdlCuenta.DataSource = ObjConta.DtResultados
DdlCuentaGlobal.DataSource = ObjConta.DtResultados
End If
- ObjConta.Dispose()
+ ObjConta.Dispose()
+
DdlProveedor.setEsWebService(True) 'GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
DdlClientes.setEsWebService(True)
diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb
index e82447db1..9cd0a75ed 100644
--- a/General/SaldosIniciales.aspx.vb
+++ b/General/SaldosIniciales.aspx.vb
@@ -751,8 +751,7 @@ Partial Class General_SaldosIniciales
If Not CveClasificacion > 0 AndAlso Clasificacion <> "" Then
- If ObjClas.AddClasificaciones(Clasificacion, "", -1, "-1", -1, "-1", -1, "-1",
- GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCategoria", "").ToString().ToEntero(), UsuarioActual.CveUsuario,
+ If ObjClas.AddClasificaciones(Clasificacion, "", GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCategoria", "").ToString().ToEntero(), UsuarioActual.CveUsuario,
UsuarioActual.CveEmpresa) Then
GlobalDTClasificaciones(UsuarioActual.CveEmpresa) = Nothing
CveClasificacion = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", $"Clasificacion = '{Clasificacion}'").ToString().ToEntero()
@@ -840,8 +839,7 @@ Partial Class General_SaldosIniciales
End If
If CveClasificacion2 = 0 Then
- If ObjClas.AddClasificaciones(Clasificacion2, "", -1, "-1", -1, "-1", -1, "-1", CveCategoria, UsuarioActual.CveUsuario,
- UsuarioActual.CveEmpresa) Then
+ If ObjClas.AddClasificaciones(Clasificacion2, "", CveCategoria, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
If ObjClas.GetClasificaciones(Tipo:=4) Then Application("GlobalDTClasificaciones2") = ObjClas.DtResultados
CveClasificacion2 = GlobalDTClasificaciones2(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", $"Clasificacion = '{Clasificacion2}'").ToString().ToEntero()
End If
@@ -950,7 +948,7 @@ Partial Class General_SaldosIniciales
End If
Next
- For Each Row As DataRow In dt.Rows
+ For Each Row As DataRow In dt.FiltraParametros("RazonSocial <> ''").Rows
Dim RazonSocial As String = Row("RazonSocial").ToString()
If Not (Row("TipoProveedor").ToString().Trim.ToUpper).Contiene("PROVEEDOR", "ACREEDOR") Then
sbErrores.AppendLine($"Proveedor {RazonSocial} TipoProveedor {Row("TipoProveedor")} invalido. ")
@@ -2324,7 +2322,7 @@ Partial Class General_SaldosIniciales
If CveAlmacen > 0 Then
Dim movimientoCabecera As Integer = ObjMovimientos.AddMovimiento(CveAlmacen, DdlConceptoAlmacen.SelectedValue.ToEntero(), 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1)
- listadoMovimientos += $"movimiento con folio {ObjMovimientos.Folio} "
+ listadoMovimientos += $"movimiento con folio {ObjMovimientos.Folio} "
If movimientoCabecera > 0 Then
For Each nuevaEntrada As DataRow In dt.FiltraParametros($"TRIM(Almacen) = '{almacenActual}'").Rows
@@ -2337,12 +2335,12 @@ Partial Class General_SaldosIniciales
Dim Cantidad As Decimal = nuevaEntrada("Existencia").ToString().ToDecimal
Dim Valor As Decimal = nuevaEntrada("Valor").ToString().ToDecimal
Dim Serie As String = If(dt.Columns.Contains("Serie"), nuevaEntrada("Serie").ToString().Trim, "")
-
+ Dim Lote As String = If(dt.Columns.Contains("Lote"), nuevaEntrada("Lote").ToString().Trim, "-1")
+ Dim FechaCaducidad As Date = If(dt.Columns.Contains("FechaCaducidad"), nuevaEntrada("FechaCaducidad").ToString().Trim.ToDate, MinFecha)
Dim PU As Decimal = If(Valor = 0, 0, (Valor / Cantidad))
-
- If Not ObjMovimientos.AddMovimientoDetalle(movimientoCabecera, Cantidad, CveUM, CvePS, PU, -1, -1, Serie:=Serie) Then
+ If Not ObjMovimientos.AddMovimientoDetalle(movimientoCabecera, Cantidad, CveUM, CvePS, PU, -1, -1, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad) Then
mensajeError = "No se logró generar el detalle del movimiento"
Throw New Exception()
End If
@@ -2527,7 +2525,7 @@ Partial Class General_SaldosIniciales
If Not CveClasificacion > 0 Then
- If ObjClasificaciones.AddClasificaciones(Clasificacion, "", -1, "-1", -1, "-1", -1, "-1", CveCategoria, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, RequiereSerieLote:=0, UsoClasificacion:=CveUsoClasificacion,
+ If ObjClasificaciones.AddClasificaciones(Clasificacion, "", CveCategoria, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, RequiereSerieLote:=0, UsoClasificacion:=CveUsoClasificacion,
CveSATPS:=-1, RequiereAFCompra:=False, RequiereAFInsumo:=False, RequierePersonal:=False, EsAcumulador:=False, TopVentas:=False, TopCompras:=False, PrecioBaseCosto:=-1) Then
CveClasificacion = ObjClasificaciones.CveClasificacion
@@ -2548,7 +2546,7 @@ Partial Class General_SaldosIniciales
End If
Else
- If Not ObjClasificaciones.UpdateClasificacion(Clasificacion, "-1", -1, "-1", -1, "-1", -1, "-1", True, True, CveCategoria, UsuarioActual.CveUsuario, CveClasificacion, UsoClasificacion:=CveUsoClasificacion) Then
+ If Not ObjClasificaciones.UpdateClasificacion(Clasificacion, "-1", True, True, CveCategoria, UsuarioActual.CveUsuario, CveClasificacion, UsoClasificacion:=CveUsoClasificacion) Then
ErrorProceso = True
End If
@@ -2950,7 +2948,6 @@ Partial Class General_SaldosIniciales
If Not ErrorProceso Then
DTAnticipoCliente.AcceptChanges()
End If
-
End If
@@ -2966,8 +2963,6 @@ Partial Class General_SaldosIniciales
ErrorProceso = True
Exit For
End If
-
-
Dim CveIE As Integer = ObjBancos.AddBancos_IE(CveCuentaBancaria, 3, Fecha, FolioStr.ToString(), "", Importe, CveMoneda,
TipoCambio, Descripcion, "", False, False, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
@@ -2976,9 +2971,6 @@ Partial Class General_SaldosIniciales
Contador = Contador + 1
Next
-
-
-
If Not ErrorProceso Then
Alert($"Se agregaron {Contador} Anticipos.")
ObjBancos.Commit()
@@ -2988,11 +2980,6 @@ Partial Class General_SaldosIniciales
ObjBancos.Dispose()
-
-
-
-
-
End Sub
diff --git a/Inventarios/CatAlmacenes.aspx b/Inventarios/CatAlmacenes.aspx
index c76f3f83a..6325655e6 100644
--- a/Inventarios/CatAlmacenes.aspx
+++ b/Inventarios/CatAlmacenes.aspx
@@ -151,7 +151,7 @@
-
+
diff --git a/Inventarios/CatAlmacenes.aspx.vb b/Inventarios/CatAlmacenes.aspx.vb
index 64e9d577f..a65f93a13 100644
--- a/Inventarios/CatAlmacenes.aspx.vb
+++ b/Inventarios/CatAlmacenes.aspx.vb
@@ -166,11 +166,6 @@ Partial Class Inventarios_CatAlmacenes
'e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Center
'e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Center
- If e.Row.DBCampo("IdCtaContable").ToEntero > 0 Then
- e.Row.FCLiteral("LtlCuentaContable").Text = DtCuentasContables.FiltroPrimeroValor("CtaCodigo", $"Id = {e.Row.DBCampo("IdCtaContable")}")
- 'Else
- ' e.Row.FCLiteral("LtlCuentaContable").Text = "Sin Cuenta"
- End If
End If
If e.Row.RowType = DataControlRowType.DataRow Then
@@ -243,7 +238,7 @@ Partial Class Inventarios_CatAlmacenes
Private Sub BtnAgregarAlmacen_Click(sender As Object, e As EventArgs) Handles BtnAgregarAlmacen.Click
'CargaSucursal()
Dim ObjAlmacen As New ClsInventarios
- Dim TieneError = False
+ Dim TieneError As Boolean = False
Dim Estatus As Boolean = False
If ChkEstatus.Checked Then Estatus = True
Dim CuentaContable As Integer = 0
@@ -331,7 +326,6 @@ Partial Class Inventarios_CatAlmacenes
DdlInventariable.SelectedValueExist(If((GvRow.DataKey("Inventariable")) = "True", 1, 0))
DdlModalidad.SelectedValueExist(If((GvRow.DataKey("Modalidad")) = "Solo Existencia", 0, 1))
divddlcc.Visible = If((DdlModalidad.SelectedValue.ToEntero) = 1, True, False)
- DdlCuentasContables.SelectedValueExist(GvRow.DataKey("IdCtaContable"))
DdlCuentasSig.SelectedValueExist(-1)
DdlCuentasSig.SelectedValueExist(GvRow.DataKey("CveCuenta"))
DdlSubProyecto.SelectedValueExist(GvRow.DataKey("CveSubProyecto"))
diff --git a/Inventarios/Consignaciones.aspx.vb b/Inventarios/Consignaciones.aspx.vb
index e211666af..0f32c6301 100644
--- a/Inventarios/Consignaciones.aspx.vb
+++ b/Inventarios/Consignaciones.aspx.vb
@@ -839,7 +839,7 @@ Partial Class Inventarios_Consignaciones
ErrorMovInv = True
End If
- If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 6) Then
+ If ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=6) Then
If ObjConta.ValorPolizaDescuadre > 0 Then
GuardaLogAD($"Consig | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
ErrorMovInv = True
@@ -1017,7 +1017,7 @@ Partial Class Inventarios_Consignaciones
ErrorMovInv = True
End If
- If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 6) Then
+ If ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=6) Then
If ObjConta.ValorPolizaDescuadre > 0 Then
GuardaLogAD($"Consig | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
ErrorMovInv = True
@@ -1569,7 +1569,7 @@ Partial Class Inventarios_Consignaciones
ErrorMovInv = True
End If
- If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 6) Then
+ If ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=6) Then
If ObjConta.ValorPolizaDescuadre > 0 Then
GuardaLogAD($"Consig | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
ErrorMovInv = True
diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb
index 67afe9096..91c9a70b6 100644
--- a/Inventarios/EntradasSalidas.aspx.vb
+++ b/Inventarios/EntradasSalidas.aspx.vb
@@ -1968,7 +1968,7 @@ Partial Class Inventarios_EntradasSalidas
'Dim Total As Decimal = 0
If CveConceptoContable.Contiene(181, 78, 51, 69) Then
Dim Dt As DataTable = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"}).Copy
- 'Dim IdCuentaGasto As Integer = 0
+
For Each Dr As DataRow In Dt.Rows
Dim Total As Decimal = ObjInventario.DtResultados.FiltraParametros($"CveClasificacion = {Dr("CveClasificacion")}").SUM("Total").RoundSQL()
@@ -2002,15 +2002,6 @@ Partial Class Inventarios_EntradasSalidas
'End If
End If
- 'If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, OpcionPrePoliza) Then
- ' If ObjConta.ValorPolizaDescuadre > 0 Then
- ' ErrorMovInv = True
- ' GuardaLogAD($"Inv/ES | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
- ' Alert("No se pudo validar la prepoliza de cuadre.", TipoMensaje.MsgAdvertencia)
- ' End If
- 'Else
- ' Alert("No se pudo validar la prepoliza de cuadre.", TipoMensaje.MsgAdvertencia)
- 'End If
End If
'------------------------------------------------
@@ -4639,14 +4630,6 @@ Partial Class Inventarios_EntradasSalidas
' ErrorPrepolizaDescuadre = True
'End If
End If
-
- 'If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then
- ' ObjConta.GetPrePolizasDetalle(CvePrePoliza, UsuarioActual.CveEmpresa)
- ' If ObjConta.ValorPolizaDescuadre > 0 Then
- ' ErrorMovInv = True
- ' Mensaje = "Ocurrió un error al validar los movimientos contables"
- ' End If
- 'End If
End If
Dim RetornoVirtual As MMovimientoVirtual = Nothing
diff --git a/Inventarios/EntregaAlmacen.aspx b/Inventarios/EntregaAlmacen.aspx
index 277f7e9b2..80305b09f 100644
--- a/Inventarios/EntregaAlmacen.aspx
+++ b/Inventarios/EntregaAlmacen.aspx
@@ -367,7 +367,7 @@
-
+
diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb
index 03580d33e..9fc025498 100644
--- a/Inventarios/EntregaAlmacen.aspx.vb
+++ b/Inventarios/EntregaAlmacen.aspx.vb
@@ -106,7 +106,18 @@ Partial Class Inventarios_EntregaAlmacen
Set(value As Integer)
ViewState("CveVentaSurtir") = value
End Set
- End Property
+ End Property
+
+ Private Property CveOSSurtir As Integer
+ Get
+ Return CType(ViewState("CveOSSurtir"), Integer)
+ End Get
+ Set(value As Integer)
+ ViewState("CveOSSurtir") = value
+ End Set
+ End Property
+
+
Private Property TipoEstatus As Integer
Get
Return CType(ViewState("TipoEstatus"), Integer)
@@ -547,6 +558,10 @@ Partial Class Inventarios_EntregaAlmacen
Protected Sub BtnSurtir_Click(sender As Object, e As EventArgs)
Dim Boton As LinkButton = CType(sender, LinkButton)
+
+ Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
+ Dim CveOS As Integer = GvRow.DataKey("CveOS").ToEntero
+
CveVentaAD = -1
If Boton.CommandArgument.ToEntero() > 0 Then
@@ -560,7 +575,7 @@ Partial Class Inventarios_EntregaAlmacen
Select Case CType(Boton.NamingContainer, GridViewRow).DataKey("TipoEntrega").ToEntero()
Case 1 ' VENTA
- CargaVentaPorSurtir(CType(sender, LinkButton).CommandArgument.ToEntero())
+ CargaVentaPorSurtir(CType(sender, LinkButton).CommandArgument.ToEntero(), CveOS:=CveOS)
Case 2 ' TRASPASO
DivTransitorio1.Visible = True
CargaTraspasoPorSurtir(CType(Boton.NamingContainer, GridViewRow).DataKey("CveTraspasoSolicitud").ToEntero())
@@ -573,15 +588,17 @@ Partial Class Inventarios_EntregaAlmacen
CveVentaAD = -2
CargaVentaPorSurtir(DdlFolio.SelectedValue.ToEntero())
End Sub
- Private Sub CargaVentaPorSurtir(CveVenta As Integer, Optional CveAlmacen As Integer = -1)
+ Private Sub CargaVentaPorSurtir(CveVenta As Integer, Optional CveAlmacen As Integer = -1, Optional CveOS As Integer = -1)
LbSurtida.Visible = False
CveContrato = -1
CveSubProyecto = -1
CveOP = -1
DtDatos = Nothing
TipoEntrega = 1
- BtnGuardar.Visible = True
-
+ BtnGuardar.Visible = True
+
+
+
Dim StrAlmacenes As String = "CveTipoAlmacen IN (1,2,26)"
If UsuarioActual.CveSubProyecto = 8804 Then
@@ -642,6 +659,7 @@ Partial Class Inventarios_EntregaAlmacen
trObsAlmacen.Visible = drE("ObservacionesAlmacen").ToString() <> ""
LbObservacionesAlmacen.Text = drE("ObservacionesAlmacen").ToString()
CveVentaSurtir = CveVenta
+ CveOSSurtir = CveOS
CveAlmacenTraspasoDestino = drE(If(EsDevolucionVenta = 1 And TipoDocto <> "Rem", "CveAlmacenTraspasoOrigen", "CveAlmacenTraspasoDestino")).ToString().ToEntero()
CveAlmacenTraspasoOrigen = drE(If(EsDevolucionVenta = 1 And TipoDocto <> "Rem", "CveAlmacenTraspasoDestino", "CveAlmacenTraspasoOrigen")).ToString().ToEntero()
CveContrato = drE("CveContrato").ToString().ToEntero()
@@ -857,6 +875,7 @@ Partial Class Inventarios_EntregaAlmacen
EsInterno = CBool(DtDatos.Rows(0)("EsInterno").ToString())
CveOP = DtDatos.Rows(0)("CveOP").ToString().ToEntero()
CveVentaSurtir = -1
+ CveOSSurtir = -1
If DtDatos.SUM("CantidadS") <= 0 Then
GvDatos.CssClass = "table table-striped table-hover Widthall ScrollAD gvInventario gvEscondeColumna"
Else
@@ -945,7 +964,7 @@ Partial Class Inventarios_EntregaAlmacen
'SugerirFecha()
If DdlAlmacen.SelectedValue.ToEntero > 0 And CveVentaSurtir > 0 Then
- CargaVentaPorSurtir(CveVentaSurtir, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero)
+ CargaVentaPorSurtir(CveVentaSurtir, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero, CveOS:=CveOSSurtir)
If CargaBitacora Then
CargaBitacoraSerie()
@@ -2002,7 +2021,7 @@ Partial Class Inventarios_EntregaAlmacen
If Not CveMovimientoSalida > 0 Then
- CveMovimientoSalida = ObjInventario.AddMovimiento(Dr2("CveAlmacen").ToString().ToEntero(), CveConceptoSalidaSinCosto, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1,
+ CveMovimientoSalida = ObjInventario.AddMovimiento(Dr2("CveAlmacen").ToString().ToEntero(), CveConceptoSalidaSinCosto, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir,
Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, Modulo:="RE/GSC1")
FolioSalida = ObjInventario.Folio
@@ -2052,7 +2071,7 @@ Partial Class Inventarios_EntregaAlmacen
CveMovimientoSalida = DtTraspasos.FiltroPrimeroValor("CveMovimientoSalida", $"CveAlmacen = {Dr1("CveAlmacen")}").ToEntero()
If Not CveMovimientoSalida > 0 Then
- CveMovimientoSalida = ObjInventario.AddMovimiento(Dr1("CveAlmacen").ToString().ToEntero(), CveConceptoSalidaSinCosto, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1,
+ CveMovimientoSalida = ObjInventario.AddMovimiento(Dr1("CveAlmacen").ToString().ToEntero(), CveConceptoSalidaSinCosto, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir,
Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, Modulo:="RE/GSC3")
FolioSalida = ObjInventario.Folio
@@ -2112,7 +2131,7 @@ Partial Class Inventarios_EntregaAlmacen
Dim CveAlmacenExA As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveTipoAlmacen:=10).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={CveSubProyecto}").ToEntero()
- CveMovimientoEntradaApartado = ObjInventario.AddMovimiento(CveAlmacenExA, 9, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1,
+ CveMovimientoEntradaApartado = ObjInventario.AddMovimiento(CveAlmacenExA, 9, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir,
Observaciones:=TxtObservaciones.Text.Trim, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero(), CveMovimientoRelacionado:=CveMovimientoSalida,
Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=CveCliente, Modulo:="RE/G4")
FolioEntrada = ObjInventario.Folio
@@ -2194,7 +2213,7 @@ Partial Class Inventarios_EntregaAlmacen
CveMovimientoSalida = DtTraspasos.FiltroPrimeroValor("CveMovimientoSalida", $"CveAlmacen = {Dr2("CveAlmacen")}").ToEntero()
If Not CveMovimientoSalida > 0 Then
- CveMovimientoSalida = ObjInventario.AddMovimiento(Dr2("CveAlmacen").ToString().ToEntero(), 8, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1,
+ CveMovimientoSalida = ObjInventario.AddMovimiento(Dr2("CveAlmacen").ToString().ToEntero(), 8, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir,
Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente),
CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero(), Modulo:="RE/G1")
FolioSalida = ObjInventario.Folio
@@ -2248,7 +2267,7 @@ Partial Class Inventarios_EntregaAlmacen
CveMovimientoSalida = DtTraspasos.FiltroPrimeroValor("CveMovimientoSalida", $"CveAlmacen = {Dr2("CveAlmacen")}").ToEntero()
If Not CveMovimientoSalida > 0 Then
- CveMovimientoSalida = ObjInventario.AddMovimiento(Dr2("CveAlmacen").ToString().ToEntero(), 8, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim,
+ CveMovimientoSalida = ObjInventario.AddMovimiento(Dr2("CveAlmacen").ToString().ToEntero(), 8, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir, Observaciones:=TxtObservaciones.Text.Trim,
Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente),
CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero(), Modulo:="RE/G2")
FolioSalida = ObjInventario.Folio
@@ -2301,7 +2320,7 @@ Partial Class Inventarios_EntregaAlmacen
If Not CveMovimientoSalida > 0 Then
- CveMovimientoSalida = ObjInventario.AddMovimiento(Dr1("CveAlmacen").ToString().ToEntero(), 8, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1,
+ CveMovimientoSalida = ObjInventario.AddMovimiento(Dr1("CveAlmacen").ToString().ToEntero(), 8, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir,
Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor,
CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero(), Modulo:="RE/G3")
FolioSalida = ObjInventario.Folio
@@ -2359,7 +2378,7 @@ Partial Class Inventarios_EntregaAlmacen
For Each Dr1 As DataRow In DtTraspasos.Select("CveTipoAlmacen = 9")
CveMovimientoSalida = Dr1("CveMovimientoSalida").ToString().ToEntero()
- CveMovimientoEntradaApartado = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero(), 9, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1,
+ CveMovimientoEntradaApartado = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero(), 9, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir,
Observaciones:=TxtObservaciones.Text.Trim, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero(), CveMovimientoRelacionado:=CveMovimientoSalida,
Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=CveCliente, Modulo:="RE/G4")
FolioEntrada = ObjInventario.Folio
@@ -2403,7 +2422,7 @@ Partial Class Inventarios_EntregaAlmacen
End If
If DtGarantias IsNot Nothing AndAlso DtGarantias.Rows.Count > 0 AndAlso CveAlmacenGarantia > 0 Then
- CveMovimientoGarantia = ObjInventario.AddMovimiento(CveAlmacenGarantia, 14, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, Modulo:="EA/G5")
+ CveMovimientoGarantia = ObjInventario.AddMovimiento(CveAlmacenGarantia, 14, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, Modulo:="EA/G5")
FolioGarantia = ObjInventario.Folio
For Each RowGarantia As DataRow In DtGarantias.Rows
@@ -2455,7 +2474,7 @@ Partial Class Inventarios_EntregaAlmacen
'Dim AlmacenSinCosto As String = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveTipoAlmacen:=26).FiltroPrimeroValor("Almacen", $"CveAlmacen={CveAlmacenSinCosto}").ToString()
- Dim CveMovimientoDevolucionSinCosto As Integer = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero(), 41, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1,
+ Dim CveMovimientoDevolucionSinCosto As Integer = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero(), 41, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir,
Observaciones:=TxtObservaciones.Text.Trim, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero(), CveMovimientoRelacionado:=CveMovimientoSalida,
Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=CveCliente, Modulo:="RE/G4")
Dim FolioDevSinCosto As Integer = ObjInventario.Folio
@@ -2539,7 +2558,7 @@ Partial Class Inventarios_EntregaAlmacen
ConceptoMovimiento = 41
End If
- CveMovimiento = ObjInventario.AddMovimiento(Almacen1, ConceptoMovimiento, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text,
+ CveMovimiento = ObjInventario.AddMovimiento(Almacen1, ConceptoMovimiento, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text,
CveContrato:=CveContrato, CveAlmacenDestino:=tCveAlmacenTraspasoDestino, Modulo:="RE/G7")
Folio = ObjInventario.Folio
@@ -2640,7 +2659,7 @@ Partial Class Inventarios_EntregaAlmacen
'ENTRADA POR TRASPASO CUANDO ES REMISION
If Not ErrorMovInv Then
If tCveAlmacenTraspasoDestino > 0 AndAlso Not (TipoMovimiento = 2 And TipoDocto = "Dev" And EsDevolucionVenta = 1) Then ' TRASPASO CUANDO ES REMISION
- CveMovimientoEntrada = ObjInventario.AddMovimiento(tCveAlmacenTraspasoDestino, 9, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato,
+ CveMovimientoEntrada = ObjInventario.AddMovimiento(tCveAlmacenTraspasoDestino, 9, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato,
CveMovimientoRelacionado:=CveMovimiento, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero(), Modulo:="RE/G8")
FolioEntrada = ObjInventario.Folio
Dim ImporteAlmacen As Decimal = 0
@@ -2695,7 +2714,7 @@ Partial Class Inventarios_EntregaAlmacen
For Each Dr As DataRow In DtTempApartados.Rows
If CveMovimientoSalidaApartado = -1 Or CveAlmacenApartado <> Dr("CveAlmacen").ToString().ToEntero() Then
- CveMovimientoSalidaApartado = ObjInventario.AddMovimiento(CveAlmacenOrigen, 8, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1,
+ CveMovimientoSalidaApartado = ObjInventario.AddMovimiento(CveAlmacenOrigen, 8, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir,
Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=CveCliente,
CveAlmacenDestino:=Dr("CveAlmacen").ToString().ToEntero(), Modulo:="RE/G9")
FolioSalida = ObjInventario.Folio
@@ -2742,7 +2761,7 @@ Partial Class Inventarios_EntregaAlmacen
CveMovimientoSalida = Dr1("CveMovimientoSalida").ToString().ToEntero()
CveMovimientoEntradaApartado = ObjInventario.AddMovimiento(Dr1("CveAlmacen").ToString().ToEntero(), 9, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
- -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero(),
+ -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir, Observaciones:=TxtObservaciones.Text.Trim, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero(),
CveMovimientoRelacionado:=CveMovimientoSalida, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor,
CveCliente:=CveCliente, Modulo:="RE/G10")
FolioEntrada = ObjInventario.Folio
@@ -2880,7 +2899,7 @@ Partial Class Inventarios_EntregaAlmacen
End If
If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 AndAlso CveAlmacenVirtual > 0 AndAlso CveConceptoMovimientoVirtual > 0 Then
- CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1,
+ CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir,
Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveMovimientoRelacionado:=CveMovimientoRelacionadoVirtual, Modulo:="RE/G6")
FolioVirtual = ObjInventario.Folio
@@ -2941,9 +2960,12 @@ Partial Class Inventarios_EntregaAlmacen
'AGREGA BITACORA A VENTA
If Not ErrorMovInv Then
Dim MensajeBitacora As String = If(TipoMovimiento = 1, "Surtida", "Devuelta")
- If Not ObjEventos.AddEventoBitacora(String.Format("Venta {2} en Folio: {1}", CveMovimiento, Folio, MensajeBitacora), "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveVentaSurtir) Then
+ Dim LigaVenta As String = String.Format("Venta {2} en Folio: {1}", CveMovimiento, Folio, MensajeBitacora)
+
+ If Not ObjEventos.AddEventoBitacora(LigaVenta, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveVentaSurtir, CveOS:=CveOSSurtir) Then
ErrorMovInv = True
End If
+
End If
'Paqueterias guias
@@ -3609,7 +3631,9 @@ Partial Class Inventarios_EntregaAlmacen
CargaFolios()
'VARIABLES GENERALES
- CveVentaSurtir = -1
+ CveVentaSurtir = -1
+ CveOSSurtir = -1
+
DtDatosDetalle = Nothing
DtDatosDetalleLote = Nothing
DtDatos = Nothing
@@ -4122,27 +4146,28 @@ Partial Class Inventarios_EntregaAlmacen
DtDatos = TempDT
- End Sub
-
+ End Sub
+
#End Region
-
-
- 'Protected void LnkEditarDir_Click(Object sender, EventArgs e)
- '{
-
-
- ' int CveCliente = GvRow.DataKey("CveCliente").ToEntero();
- ' int CveDireccion = GvRow.DataKey("CveDireccionEnvio").ToEntero();
-
- ' HdnCveVenta.Value = GvRow.DataKey("CveVenta");
- ' CargaModalCombosDirecciones(CveCliente, CveDireccion);
-
- ' UpModalEditarentrega.Update();
- ' RegistraScript("$('#DivEditarEntrega').modal('show');");
- '}
-
-
-
+
+
+ 'Protected void LnkEditarDir_Click(Object sender, EventArgs e)
+ '{
+
+
+ ' int CveCliente = GvRow.DataKey("CveCliente").ToEntero();
+ ' int CveDireccion = GvRow.DataKey("CveDireccionEnvio").ToEntero();
+
+ ' HdnCveVenta.Value = GvRow.DataKey("CveVenta");
+ ' CargaModalCombosDirecciones(CveCliente, CveDireccion);
+
+
+ ' UpModalEditarentrega.Update();
+ ' RegistraScript("$('#DivEditarEntrega').modal('show');");
+ '}
+
+
+
Protected Sub LnkEditarDir_Click(sender As Object, e As EventArgs)
HdnCveVenta.Value = CveVentaSurtir.ToString
diff --git a/Inventarios/KardexAlmacenHorizontal.aspx.vb b/Inventarios/KardexAlmacenHorizontal.aspx.vb
index a99613ff7..cc49574e7 100644
--- a/Inventarios/KardexAlmacenHorizontal.aspx.vb
+++ b/Inventarios/KardexAlmacenHorizontal.aspx.vb
@@ -69,7 +69,7 @@ Partial Class Inventarios_KardexAlmacen
End Sub
Private Sub CargaClasificaciones()
- Dim CveClasificacion = If(Request("CveClasificacion") IsNot Nothing, Request("CveClasificacion").ToString, "-1")
+ Dim CveClasificacion As Integer = If(Request("CveClasificacion") IsNot Nothing, Request("CveClasificacion").ToString, "-1").ToEntero
Dim ObjClasificaciones As New ClsClasificaciones
If UsuarioActual.Empresa.UsaAC Then
@@ -159,7 +159,7 @@ Partial Class Inventarios_KardexAlmacen
If ObjMovimientos.DtResultados IsNot Nothing AndAlso ObjMovimientos.DtResultados.Rows.Count > 0 Then
dt = ObjMovimientos.DtResultados
Dim ListaBorrar As New List(Of DataColumn)
- For index = 3 To dt.Columns.Count - 1
+ For index As Integer = 3 To dt.Columns.Count - 1
Dim TotColumna As Double = 0
For Each Dr As DataRow In dt.Rows
TotColumna += Dr.Item(index).ToString.ToDouble
@@ -283,19 +283,19 @@ Partial Class Inventarios_KardexAlmacen
GemBox.Spreadsheet.SpreadsheetInfo.SetLicense("ESWN-4QFD-26JF-1SZ8")
Dim excel As GemBox.Spreadsheet.ExcelFile
- Dim options = GemBox.Spreadsheet.LoadOptions.HtmlDefault
- Using htmlStream = New MemoryStream(options.Encoding.GetBytes(sw.ToString()))
+ Dim options As HtmlLoadOptions = GemBox.Spreadsheet.LoadOptions.HtmlDefault
+ Using htmlStream As New MemoryStream(options.Encoding.GetBytes(sw.ToString()))
excel = GemBox.Spreadsheet.ExcelFile.Load(htmlStream, options)
If Usuario IsNot Nothing Then
Dim TotalRowHeader As Integer = 8
Dim TotalRowFooter As Integer = 2
- Dim worksheet = excel.Worksheets(0)
+ Dim worksheet As ExcelWorksheet = excel.Worksheets(0)
worksheet.Rows.InsertEmpty(0, TotalRowHeader)
- Dim celdasConTexto = worksheet.GetUsedCellRange(True)
+ Dim celdasConTexto As CellRange = worksheet.GetUsedCellRange(True)
celdasConTexto.Style.Font.Name = "Calibri Light"
- Dim RangoNombreEmpresa = worksheet.Cells.GetSubrangeAbsolute(1, celdasConTexto.FirstColumnIndex, 1, celdasConTexto.LastColumnIndex)
+ Dim RangoNombreEmpresa As CellRange = worksheet.Cells.GetSubrangeAbsolute(1, celdasConTexto.FirstColumnIndex, 1, celdasConTexto.LastColumnIndex)
RangoNombreEmpresa.Merged = True
RangoNombreEmpresa.Value = Usuario.Empresa.Empresa
RangoNombreEmpresa.Style.Font.Size = 18 * 20
@@ -304,7 +304,7 @@ Partial Class Inventarios_KardexAlmacen
RangoNombreEmpresa.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
- Dim RangoFiltros = worksheet.Cells.GetSubrangeAbsolute(6, celdasConTexto.FirstColumnIndex, 6, celdasConTexto.LastColumnIndex)
+ Dim RangoFiltros As CellRange = worksheet.Cells.GetSubrangeAbsolute(6, celdasConTexto.FirstColumnIndex, 6, celdasConTexto.LastColumnIndex)
RangoFiltros.Merged = True
RangoFiltros.Value = Filtros
RangoFiltros.Style.Font.Size = 15 * 20
@@ -313,7 +313,7 @@ Partial Class Inventarios_KardexAlmacen
RangoFiltros.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
- Dim RangoTitulo = worksheet.Cells.GetSubrangeAbsolute(3, celdasConTexto.FirstColumnIndex, 3, celdasConTexto.LastColumnIndex)
+ Dim RangoTitulo As CellRange = worksheet.Cells.GetSubrangeAbsolute(3, celdasConTexto.FirstColumnIndex, 3, celdasConTexto.LastColumnIndex)
RangoTitulo.Merged = True
RangoTitulo.Value = Titulo
RangoTitulo.Style.Font.Size = 20 * 20
@@ -321,7 +321,7 @@ Partial Class Inventarios_KardexAlmacen
RangoTitulo.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
RangoTitulo.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
- For i = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex
+ For i As Integer = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex
worksheet.Rows(8).Cells(i).Style.Font.Size = 12 * 20
worksheet.Rows(8).Cells(i).Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
worksheet.Rows(8).Cells(i).Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
diff --git a/Inventarios/PaquetesArmadoDesarmado.aspx.vb b/Inventarios/PaquetesArmadoDesarmado.aspx.vb
index 9299a4f7b..65355c496 100644
--- a/Inventarios/PaquetesArmadoDesarmado.aspx.vb
+++ b/Inventarios/PaquetesArmadoDesarmado.aspx.vb
@@ -619,8 +619,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
TieneError = True
End If
-
- If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 6) Then
+ If ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=6) Then
If ObjConta.ValorPolizaDescuadre > 0 Then
GuardaLogAD($"Inventarios/RecepcionAlmacen-PPCompOC | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
TieneError = True
@@ -743,8 +742,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
TieneError = True
End If
-
- If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 6) Then
+ If ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=6) Then
If ObjConta.ValorPolizaDescuadre > 0 Then
GuardaLogAD($"Inventarios/RecepcionAlmacen-PPCompOC | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
TieneError = True
@@ -753,7 +751,6 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
End Select
-
If Not TieneError Then
Dim Msg As New StringBuilder
diff --git a/Inventarios/RecepcionUsados.aspx.vb b/Inventarios/RecepcionUsados.aspx.vb
index ee0c1f8f5..a78ec0fb7 100644
--- a/Inventarios/RecepcionUsados.aspx.vb
+++ b/Inventarios/RecepcionUsados.aspx.vb
@@ -1487,7 +1487,7 @@ Partial Class Inventarios_RecepcionUsados
Correcto = False
End If
- If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then
+ If ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=-1) Then
If ObjConta.ValorPolizaDescuadre > 0 Then
GuardaLogAD($"Inventarios/RecepcionUsados-PPCompOC | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
Correcto = False
@@ -3286,9 +3286,9 @@ Partial Class Inventarios_RecepcionUsados
Dim CargoActual As Double = 0
Dim Row As DataRow = Nothing
- Dim EsNuevo As Boolean = true
+ Dim EsNuevo As Boolean = True
- Dim RowsAjustes = TmpDTAjustes.Select($"ConsecutivoVenta = {ConsecutivoVenta}")
+ Dim RowsAjustes As DataRow() = TmpDTAjustes.Select($"ConsecutivoVenta = {ConsecutivoVenta}")
If RowsAjustes IsNot Nothing AndAlso RowsAjustes.Length > 0 Then
Row = RowsAjustes(0)
diff --git a/Nomina/CatPeriodos.aspx b/Nomina/CatPeriodos.aspx
index d465b23fd..cd697aca8 100644
--- a/Nomina/CatPeriodos.aspx
+++ b/Nomina/CatPeriodos.aspx
@@ -19,7 +19,10 @@
- Agregar
+ Agregar
+
+
+ Carga Masiva
@@ -477,6 +480,72 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Ejercicio:
+
+
+
+
+
+
+
Tipo Periodo:
+
+
+
+
Subtipo Periodo:
+
+
+
+
+
+
+
+ Numero:
+
+
+
+
+
+ Fecha Inicio:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Nomina/CatPeriodos.aspx.vb b/Nomina/CatPeriodos.aspx.vb
index de0124619..7c08c724d 100644
--- a/Nomina/CatPeriodos.aspx.vb
+++ b/Nomina/CatPeriodos.aspx.vb
@@ -60,9 +60,11 @@ Partial Class Nomina_CatPeriodos
Private Sub CargaTipoPeriodo()
DdlTipoPeriodo.DataSource = GlobalDTTipoPeriodo
DdlTipoPeriodoAdd.DataSource = GlobalDTTipoPeriodo
+ DdlTipoPeriodoCM.DataSource = GlobalDTTipoPeriodo
DdlTipoPeriodo.DataBind()
DdlTipoPeriodoAdd.DataBind()
+ DdlTipoPeriodoCM.DataBind()
End Sub
@@ -71,11 +73,14 @@ Partial Class Nomina_CatPeriodos
Dim ObjNom_Periodos As New ClsNominas
If ObjNom_Periodos.GetEjercicios(UsuarioActual.CveEmpresa) Then
DdlEjercicio.DataSource = ObjNom_Periodos.DtResultados
+ DdlEjercicioCM.DataSource = ObjNom_Periodos.DtResultados
Else
DdlEjercicio.DataSource = Nothing
+ DdlEjercicioCM.DataSource = Nothing
End If
ObjNom_Periodos.Dispose()
DdlEjercicio.DataBind()
+ DdlEjercicioCM.DataBind()
DdlEjercicio.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub
@@ -368,4 +373,23 @@ Partial Class Nomina_CatPeriodos
Next
UpModalPerido.Update()
End Sub
+
+ Protected Sub LnkCargaMasiva_Click(sender As Object, e As EventArgs)
+ Dim ejercicio As Integer = DdlEjercicioCM.SelectedValue.ToEntero()
+ Dim cveTipoPeriodo As Integer = DdlTipoPeriodoCM.SelectedValue.ToEntero()
+ Dim cveSubTipoPeriodo As Integer = TxtCveSubTipoPeriodoCM.Text.ToEntero()
+ Dim numero As Integer = TxtNumeroCM.Text.ToEntero()
+ Dim fechaInicio As String = TxtFechaInicioCM.Text
+
+ Using onom As New ClsNominas
+ If onom.CargaPeriodosEjercicio(ejercicio, cveTipoPeriodo, cveSubTipoPeriodo, numero, fechaInicio, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
+ Alert("Se cargo satisfactoriamente.")
+ End If
+ End Using
+
+ End Sub
+
+ Protected Sub LnkCargaMasivaModal_Click(sender As Object, e As EventArgs)
+ RegistraScript("$('#divCargaMasiva').modal('show');")
+ End Sub
End Class
diff --git a/Nomina/Nomina.aspx b/Nomina/Nomina.aspx
index 701a78495..c209bef0c 100644
--- a/Nomina/Nomina.aspx
+++ b/Nomina/Nomina.aspx
@@ -323,7 +323,7 @@
-
+
@@ -4672,7 +4672,72 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Ejercicio:
+
+
+
+
+
+
+
Tipo Periodo:
+
+
+
+
Subtipo Periodo:
+
+
+
+
+
+
+
+ Numero:
+
+
+
+
+
+ Fecha Inicio:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Nomina/Nomina.aspx.cs b/Nomina/Nomina.aspx.cs
index a1d7eb776..0a477f5dd 100644
--- a/Nomina/Nomina.aspx.cs
+++ b/Nomina/Nomina.aspx.cs
@@ -21,7 +21,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
{
get { return 5; }
}
-
+
private DateTime FechaInicioPeriodo
{
get
@@ -448,8 +448,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
}
DdlEjercicios.DataSource = dtejercicio;
DdlEjerciciosCM.DataSource = dtejercicio;
+ DdlEjercicioCM.DataSource = dtejercicio;
DdlEjercicios.DataBind();
DdlEjerciciosCM.DataBind();
+ DdlEjercicioCM.DataBind();
ListItem litem = null;
if ((dtejercicio != null) && dtejercicio.Rows.Count > 0)
{
@@ -487,6 +489,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
DdlTipoPeriodo.DataSource = get_GlobalDTTipoPeriodos(UsuarioActual.CveEmpresa);
DdlTipoPeriodoCM.DataSource = DdlTipoPeriodo.DataSource;
DdlTipoPeriodoSim.DataSource = DdlTipoPeriodo.DataSource;
+ DdlTipoPeriodoCMB.DataSource = DdlTipoPeriodo.DataSource;
+ DdlTipoPeriodoCMB.DataBind();
DdlTipoPeriodoSim.DataBind();
DdlTipoPeriodoCM.DataBind();
DdlTipoPeriodo.DataBind();
@@ -507,6 +511,11 @@ public partial class Nomina_Nomina2 : ClsPaginas
{
if (objperiodos.GetPeriodos(tipoPeriodo, UsuarioActual.CveEmpresa, ejercicio, -1, -1))
{
+ if (objperiodos.DtResultados.Rows.Count == 0)
+ {
+
+ Alert("No existen periodos registrados en este año y tipo de periodo,¿desea registrarlos masivamente?",TipoMensaje.MsgConfirmacion, "$(\"#divCargaMasiva\").modal(\"show\");",TextoConfirmacion:"Aceptar",TextoSegundoBoton:"No");
+ }
dtPeriodos = objperiodos.DtResultados.FiltraParametros("Estatus IN (1,2,3,4,5)");
}
}
@@ -518,14 +527,13 @@ public partial class Nomina_Nomina2 : ClsPaginas
}
protected void DdlEjercicios_SelectedIndexChanged(object sender, EventArgs e)
- {
- cargaPeriodos();
+ {
+ cargaPeriodos();
}
protected void DdlTipoPeriodo_SelectedIndexChanged(object sender, EventArgs e)
{
- cargaPeriodos();
- DdlEjercicios.AutoPostBack = true;
+ cargaPeriodos();
}
protected void DdlPeriodo_SelectedIndexChanged(object sender, EventArgs e)
@@ -10943,4 +10951,22 @@ public partial class Nomina_Nomina2 : ClsPaginas
+
+ protected void LnkCargaMasiva_Click(object sender, EventArgs e)
+ {
+
+ int ejercicio = DdlEjercicioCM.SelectedValue.ToEntero();
+ int cveTipoPeriodo = DdlTipoPeriodoCMB.SelectedValue.ToEntero();
+ int cveSubTipoPeriodo = TxtCveSubTipoPeriodoCM.Text.ToEntero();
+ int numero = TxtNumeroCM.Text.ToEntero();
+ string fechaInicio = TxtFechaInicioCM.Text;
+
+ using (ClsNominas onom = new ClsNominas())
+ {
+ if (onom.CargaPeriodosEjercicio(ejercicio, cveTipoPeriodo, cveSubTipoPeriodo, numero, fechaInicio, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario))
+ {
+ Alert("Se cargo satisfactoriamente.");
+ }
+ }
+ }
}
\ No newline at end of file
diff --git a/OS/Asignaciones.aspx.vb b/OS/Asignaciones.aspx.vb
index 66c3de3e1..f7ad121bc 100644
--- a/OS/Asignaciones.aspx.vb
+++ b/OS/Asignaciones.aspx.vb
@@ -394,7 +394,7 @@ Partial Class OS_Asignaciones
lrds.Add(rds)
lrds.Add(rds2)
- ObjOS.Dispose()
+
Dim ReporteByte As Byte() = StreamPDF(RutaReporte.FullName, lrds, params, NombreArchivo:=String.Format("OrdenServicio-{0}", CveFolio))
diff --git a/OS/CatEstatusOrdenServicio.aspx b/OS/CatEstatusOrdenServicio.aspx
index c6f3a8e0f..44fed26a7 100644
--- a/OS/CatEstatusOrdenServicio.aspx
+++ b/OS/CatEstatusOrdenServicio.aspx
@@ -102,7 +102,7 @@
-
+
@@ -203,6 +203,15 @@
+
+
+
+
+
+
+
+
+
diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb
index 5d7f0d632..cef31ed3f 100644
--- a/Ventas/ProductosServicios.aspx.vb
+++ b/Ventas/ProductosServicios.aspx.vb
@@ -984,6 +984,7 @@ Partial Class ProductosyServicios
TxtEcommerceEtiquetas.Text = ObjProductosServicios.DtResultados.Rows(0)("EcommerceEtiquetas").ToString
TxtEcommercePrecio.Text = ObjProductosServicios.DtResultados.Rows(0)("EcommercePrecio").ToString.ToDecimal.ToString("#,###.####")
DdlEcommerceClasificacion.SelectedValueExist(ObjProductosServicios.DtResultados.Rows(0)("CveClasificacionEcommerce").ToString)
+ TxtEcommerceCantidad.Text = ObjProductosServicios.DtResultados.Rows(0)("EcommerceCantidad").ToString.ToDecimal.ToString("#,###.####")
Try
DdlClasificacion_SelectedIndexChanged(DdlClasificacion, Nothing)
@@ -1470,7 +1471,7 @@ Partial Class ProductosyServicios
CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked,
CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim,
CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, Litraje:=TxtLitraje.Text.ToDecimal, RegistroRSCO:=TxtRegistroRSCO.Text, FechaVigenciaRSCO:=TxtFechaVigenciaRSCO.Text.ToDate, VigenciaIndeterminadaRSCO:=ChkFechaIndeterminadaRSCO.Checked,
- NombreComercial:=TxtNombreComercial.Text.Trim, NotasAdicionales:=TxtEcommerceNota.Text.Trim, EcommerceEtiquetas:=TxtEcommerceEtiquetas.Text.Trim, EcommercePrecio:=TxtEcommercePrecio.Text.Trim.ToDecimal, CveClasificacionEcommerce:=DdlEcommerceClasificacion.SelectedValue.ToEntero) > 0 Then
+ NombreComercial:=TxtNombreComercial.Text.Trim, NotasAdicionales:=TxtEcommerceNota.Text.Trim, EcommerceEtiquetas:=TxtEcommerceEtiquetas.Text.Trim, EcommercePrecio:=TxtEcommercePrecio.Text.Trim.ToDecimal, CveClasificacionEcommerce:=DdlEcommerceClasificacion.SelectedValue.ToEntero, EcommerceCantidad:=TxtEcommerceCantidad.Text.Trim.ToDecimal) > 0 Then
ViewState("CvePS") = ObjProductosServicios.CvePS
For Each GVR As GridViewRow In GvImpuestosLocales.Rows
If GVR.FCCheckBox("ChkDeduccion").Checked Then
@@ -1542,7 +1543,7 @@ Partial Class ProductosyServicios
CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim,
CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, Litraje:=TxtLitraje.Text.ToDecimal,
RegistroRSCO:=TxtRegistroRSCO.Text, FechaVigenciaRSCO:=TxtFechaVigenciaRSCO.Text.ToDate, VigenciaIndeterminadaRSCO:=ChkFechaIndeterminadaRSCO.Checked,
- NombreComercial:=TxtNombreComercial.Text.Trim, NotasAdicionales:=TxtEcommerceNota.Text.Trim, EcommerceEtiquetas:=TxtEcommerceEtiquetas.Text.Trim, ActivoEcommerce:=ChkActivoEcommerce.Checked, EcommercePrecio:=TxtEcommercePrecio.Text.Trim.ToDecimal, CveClasificacionEcommerce:= DdlEcommerceClasificacion.SelectedValue.toentero) Then
+ NombreComercial:=TxtNombreComercial.Text.Trim, NotasAdicionales:=TxtEcommerceNota.Text.Trim, EcommerceEtiquetas:=TxtEcommerceEtiquetas.Text.Trim, ActivoEcommerce:=ChkActivoEcommerce.Checked, EcommercePrecio:=TxtEcommercePrecio.Text.Trim.ToDecimal, CveClasificacionEcommerce:=DdlEcommerceClasificacion.SelectedValue.ToEntero, EcommerceCantidad:=TxtEcommerceCantidad.Text.Trim.ToDecimal) Then
If Not ObjProductosServicios.LimpiaImpuestosLocales(CvePS) Then
TieneError = True
diff --git a/Ventas/RepNCxAplicar.aspx.cs b/Ventas/RepNCxAplicar.aspx.cs
index e1f32d2d0..b8153eccf 100644
--- a/Ventas/RepNCxAplicar.aspx.cs
+++ b/Ventas/RepNCxAplicar.aspx.cs
@@ -211,8 +211,8 @@ public partial class Ventas_RepNCxAplicar : ClsPaginas
{
MsgError = "Ocurrio un error al saldar el movimiento";
}
-
- if (ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, -1))
+ Usuario UA = UsuarioActual;
+ if (MsgError == "" && ObjConta.ValidacionesPrePoliza(CvePrePoliza, ref UA, Opcion: -1))
{
if (ObjConta.ValorPolizaDescuadre > 0)
{
diff --git a/Ventas/RepProductosServicios.aspx.vb b/Ventas/RepProductosServicios.aspx.vb
index 257116385..e14b4dea6 100644
--- a/Ventas/RepProductosServicios.aspx.vb
+++ b/Ventas/RepProductosServicios.aspx.vb
@@ -178,7 +178,7 @@ Partial Class Ventas_RepProductosServicios
DdlProveedor.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
End If
- Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
+ Dim EsWS As Boolean = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
If EsWS Then
DdlClientes.setEsWebService(True)
Else
@@ -197,11 +197,11 @@ Partial Class Ventas_RepProductosServicios
txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString
txtFechaF.Text = NowADS().ToShortDateString
- If UsuarioActual.TienePermisoProceso(339) Then
- GvDatos.Columns(2).Visible = False
+ If UsuarioActual.TienePermisoProceso(339) Then
GvDatos.Columns(3).Visible = False
GvDatos.Columns(4).Visible = False
GvDatos.Columns(5).Visible = False
+ GvDatos.Columns(6).Visible = False
End If
End Sub
@@ -463,22 +463,22 @@ Partial Class Ventas_RepProductosServicios
FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.ToDate, MinFecha)
FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.ToDate, MaxFecha)
- Dim Cliente = If(DdlClientes.SelectedText = "", "", $" Cliente: {DdlClientes.SelectedText}")
- Dim Proveedor = If(DdlProveedor.SelectedValue = "", "", $" Proveedor: {DdlProveedor.SelectedText}")
- Dim FechaInicio = If(txtFechaI.Text = "", "", $" Fecha Inicio: {txtFechaI.Text}")
- Dim FechaFin = If(txtFechaF.Text = "", "", $" Fecha Fin: {txtFechaF.Text}")
- Dim Grupo = If(DdlGrupo.SelectedValue = "-1", "", $" Agrupado por: {DdlGrupo.SelectedItem.Text}")
- Dim Categoria = If(DdlCategoria.SelectedValue = "-1", "", $" Categoria: {DdlCategoria.SelectedItem.Text }")
- Dim Clasificacion = If(DdlClasificacion.SelectedValue = "-1", "", $" Clasificación: {DdlClasificacion.SelectedItem.Text}")
- Dim PS = If(DdlPS.SelectedValue = "-1", "", $" P.S.: {DdlPS.SelectedText}")
- Dim Proyecto = If(DdlSubProyecto.SelectedValue = "-1", "", $" Proyecto: {DdlSubProyecto.SelectedItem.Text}")
- Dim Estatus = If(DdlEstatus.SelectedValue = "-1", "", $" Estatus: {DdlEstatus.SelectedItem.Text}")
- Dim Usuario = If(DdlUsuario.SelectedValue = "-1", "", $" Usuario: {DdlUsuario.SelectedItem.Text}")
+ Dim Cliente As String = If(DdlClientes.SelectedText = "", "", $" Cliente: {DdlClientes.SelectedText}")
+ Dim Proveedor As String = If(DdlProveedor.SelectedValue = "", "", $" Proveedor: {DdlProveedor.SelectedText}")
+ Dim FechaInicio As String = If(txtFechaI.Text = "", "", $" Fecha Inicio: {txtFechaI.Text}")
+ Dim FechaFin As String = If(txtFechaF.Text = "", "", $" Fecha Fin: {txtFechaF.Text}")
+ Dim Grupo As String = If(DdlGrupo.SelectedValue = "-1", "", $" Agrupado por: {DdlGrupo.SelectedItem.Text}")
+ Dim Categoria As String = If(DdlCategoria.SelectedValue = "-1", "", $" Categoria: {DdlCategoria.SelectedItem.Text }")
+ Dim Clasificacion As String = If(DdlClasificacion.SelectedValue = "-1", "", $" Clasificación: {DdlClasificacion.SelectedItem.Text}")
+ Dim PS As String = If(DdlPS.SelectedValue = "-1", "", $" P.S.: {DdlPS.SelectedText}")
+ Dim Proyecto As String = If(DdlSubProyecto.SelectedValue = "-1", "", $" Proyecto: {DdlSubProyecto.SelectedItem.Text}")
+ Dim Estatus As String = If(DdlEstatus.SelectedValue = "-1", "", $" Estatus: {DdlEstatus.SelectedItem.Text}")
+ Dim Usuario As String = If(DdlUsuario.SelectedValue = "-1", "", $" Usuario: {DdlUsuario.SelectedItem.Text}")
If DtVentas IsNot Nothing AndAlso DtVentas.Rows.Count > 0 Then
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
- Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
+ Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("FechaInicio", If(txtFechaI.Text <> "", FechaI.ToShortDateString, "")))
diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx
index 1ec86ce0b..3569a58bf 100644
--- a/Ventas/Ventas.aspx
+++ b/Ventas/Ventas.aspx
@@ -9,7 +9,7 @@
padding: 0px 5px;
}
- .nolineheight {
+ .nolineheight {ChkRequiereTecnico
line-height: 1;
}
@@ -559,6 +559,41 @@
+
+
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index a5ce52ad5..522b4753f 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -978,6 +978,15 @@ Partial Class Ventas
Return ViewState("CveOS").ToString().ToEntero()
End Get
End Property
+
+ Private Property CveOSVentaMedica As Integer
+ Get
+ Return ViewState("CveOSVentaMedica").ToString().ToEntero()
+ End Get
+ Set(value As Integer)
+ ViewState("CveOSVentaMedica") = value
+ End Set
+ End Property
Private ReadOnly Property SaldoVenta As Decimal
Get
Return If(IsNothing(ViewState("SaldoVenta")), 0, ViewState("SaldoVenta").ToString().ToDecimal)
@@ -2443,6 +2452,8 @@ Partial Class Ventas
CveAlmacenDevolucion = 0
Me.CveEstadoCancelacion = 0
+ TxtFechaOS.Text = NowADS().ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T")
+
txtFechaICot.Text = NowADS().AddMonths(-3).ToShortDateString
TxtFechaIRem.Text = NowADS().AddMonths(-3).ToShortDateString
TxtFechaIPed.Text = NowADS().AddMonths(-3).ToShortDateString
@@ -2591,9 +2602,15 @@ Partial Class Ventas
CargaFormaEntrega()
CargaCuentasTerminal()
CargaDdlNCPS()
-
CargarCamiones()
+
+ CargaMedicos()
+ CargaProcedimientos()
+ CargaDdlClientes()
+
+
+
'SI USUARIO USA AMORTIZACIÓN CONTABLE, se carga las tablas para usarlas mas adelante
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC Then
@@ -3020,7 +3037,6 @@ Partial Class Ventas
CveEstatus = 2
End If
End If
-
End If
End If
@@ -3433,6 +3449,12 @@ Partial Class Ventas
End If
End If
+
+ If CveVenta <= 0 AndAlso UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 AndAlso Request("VM") IsNot Nothing AndAlso IsNumeric(Request("VM")) AndAlso Request("VM").ToEntero() = 1 Then
+ EsVentaMedica = True
+ CargaTiposVenta()
+ End If
+
End If
End Sub
@@ -6408,7 +6430,6 @@ Partial Class Ventas
End If
ViewState("Vendedor") = ObjCliente.Vendedor
- ViewState("CtaContable") = ObjCliente.CuentaContable
ViewState("CodCliente") = ObjCliente.Codigo
ViewState("CvePrecioLista") = ObjCliente.CvePrecioLista
@@ -7705,6 +7726,60 @@ Partial Class Ventas
'DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
DdlClasificacion.DataBind()
End Sub
+
+
+
+
+ Private Sub CargaTiposVenta()
+
+ ' 
+ 'Dim Dttemp = GlobalDTTipoVenta().FiltraParametros("Estatus = 'True' ").FiltraParametros("", {"", ""})
+
+ RBLTipoVenta.DataSource = GlobalDTTipoVenta().FiltraParametros("Estatus = 'True' ")
+ RBLTipoVenta.DataBind()
+
+ TrVentasMedicas1.Visible = True
+ TrVentasMedicas2.Visible = True
+
+
+ For Each item As ListItem In RBLTipoVenta.Items
+ item.Text = $"  {item.Text}"
+ Next
+
+ RegistraScript("$('#DvModalTipoVenta').modal({ backdrop: 'static', keyboard: false });")
+ End Sub
+
+ Private Sub CargaProcedimientos()
+ DdlMedico.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
+ DdlMedico.DataBind()
+
+ DdlMedicoModal.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
+ DdlMedicoModal.DataBind()
+ End Sub
+
+ Private Sub CargaMedicos()
+ DdlProcedimiento.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
+ DdlProcedimiento.DataBind()
+
+ DdlProcedimientoModal.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
+ DdlProcedimientoModal.DataBind()
+
+ End Sub
+
+ Private Sub CargaDdlClientes()
+ If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
+ DdlClientesWS.setEsWebService(True)
+ Else
+ DdlClientesWS.setEsWebService(False)
+ If Not UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
+ DdlClientesWS.ddl.Items.Clear()
+ DdlClientesWS.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
+ DdlClientesWS.DataBind()
+ DdlClientesWS.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
+ End If
+ End If
+ End Sub
+
Private Sub CargaPS(CveClasificacion As Integer, Objeto As ADServerControl.Dropdownlost, Optional AplicaParaVenta As Boolean = True)
Objeto.setEsWebService(UsuarioActual.Empresa.Funcionalidad(141).ToString() = "1")
@@ -10122,6 +10197,8 @@ Partial Class Ventas
DebeTimbrar = False
End If
+
+
If DebeTimbrar AndAlso ObjFactura.TipoDocto.Contiene("Ing", "Egs", "Ant", "Dev") Then
If UsuarioActual.Empresa.TipoFacturacion = "CFDi" AndAlso (UsuarioActual.Empresa.FacturaProduccion OrElse UsuarioActual.CveEmpresa = 1) Then
@@ -13077,7 +13154,8 @@ Partial Class Ventas
DiasCredito:=factura.DiasCredito, EsDiasCreditoFijo:=factura.EsDiasCreditoFijo, AnticipoEspecial:=If(TrAntEspecial.Visible, ChkAntEspecial.Checked, False),
Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion, CveTipoRetencion:=factura.CveTipoRetencion, CorreoNotificacion:=TxtCorreoNotificaciones.Text,
FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero, FacturarSucursal:=factura.FacturarSucursal, VentaDesglosaIEPS:=factura.VentaDesglosaIEPS, RFCReceptor:=RFCReceptor, Adjunto:=Adjunto, DevolucionImportePagado:=factura.DevolucionImportePagado, EsGarantia:=factura.EsGarantia, ServicioDomicilio:=TrServicioDomicilio.Visible,
- CveLineaAdicional:=DdlLineaAdicional.SelectedValue.ToEntero(), DescripcionVenta:=DescripcionVenta) Then
+ CveLineaAdicional:=DdlLineaAdicional.SelectedValue.ToEntero(), DescripcionVenta:=DescripcionVenta,
+ CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=RBLTipoVenta.SelectedValue.ToEntero, RequiereOS:=ChkRequiereTecnico.Checked) Then
ErrorList.Add("Ocurrió un error al Generar la Venta. Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
Else
If factura.TipoDocto.Contiene("Dev", "Egs") OrElse DtVentasNC IsNot Nothing OrElse CveEstatusRefacturacion > 0 OrElse CveAnticipoPadre > 0 Then
@@ -13416,6 +13494,18 @@ Partial Class Ventas
End If
End If
+ If EsVentaMedica AndAlso ErrorList.Count = 0 AndAlso ChkRequiereTecnico.Checked Then
+ GeneraOS(ObjVentas.IniciaTransacSQL, ErrorList)
+
+ If ErrorList.Count = 0 Then
+ If Not ObjOS.UpdateVentaOS(factura.CveVenta, CveOSVentaMedica) Then
+ ErrorList.Add("Ocurrió un error al guardar la venta en Ordenes de Servicio")
+ End If
+ End If
+
+ End If
+
+
'Si viene de OS, Se guarda CveVenta en OS
If CveOS > 0 Then
If Not ObjOS.UpdateVentaOS(factura.CveVenta, CveOS) Then
@@ -14010,7 +14100,7 @@ Partial Class Ventas
End If
Next
- If Not ErrorPrepoliza AndAlso ObjConta.ValidacionPrePolizaCuadre(ObjFactura.CvePrePoliza, 5, AutoConta:=AutoConta) Then
+ If Not ErrorPrepoliza AndAlso ObjConta.ValidacionesPrePoliza(ObjFactura.CvePrePoliza, UsuarioActual, Opcion:=5, AutoConta:=AutoConta) Then
If ObjConta.ValorPolizaDescuadre > 0 Then
'ErrorPrepoliza = True
GuardaLogAD($"Ventas/Ventas-ProcesoPrePolizas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{ObjFactura.CvePrePoliza}", "LogPrePolizas")
@@ -14083,7 +14173,7 @@ Partial Class Ventas
End If
End If
- If ObjConta.ValidacionPrePolizaCuadre(ObjFactura.CvePrePoliza, 2, AutoConta:=AutoConta) Then
+ If ObjConta.ValidacionesPrePoliza(ObjFactura.CvePrePoliza, UsuarioActual, Opcion:=2, AutoConta:=AutoConta) Then
If ObjConta.ValorPolizaDescuadre > 0 Then
GuardaLogAD($"Ventas/Ventas-ProcesoPrePolizas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{ObjFactura.CvePrePoliza}", "LogPrePolizas")
End If
@@ -14822,7 +14912,7 @@ Partial Class Ventas
End If
End If
- If ObjConta.ValidacionPrePolizaCuadre(ObjFactura.CvePrePoliza, 2, AutoConta:=AutoConta) Then
+ If ObjConta.ValidacionesPrePoliza(ObjFactura.CvePrePoliza, UsuarioActual, Opcion:=2, AutoConta:=AutoConta) Then
If ObjConta.ValorPolizaDescuadre > 0 Then
If ObjConta.ValorPolizaDescuadre = 2 Then
ErrorPrepoliza = True
@@ -15861,7 +15951,7 @@ Partial Class Ventas
ErrorConta = True
End If
- If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 3) Then
+ If ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, 3) Then
If ObjConta.ValorPolizaDescuadre > 0 Then
GuardaLogAD($"Ventas/Ventas-Anticipos | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
ErrorConta = True
@@ -21394,7 +21484,7 @@ Partial Class Ventas
End If
End If
- If ObjConta.ValidacionPrePolizaCuadre(-1, 2, CveVenta) Then
+ If ObjConta.ValidacionesPrePoliza(-1, UsuarioActual, Opcion:=2, CveVenta:=CveVenta) Then
If ObjConta.ValorPolizaDescuadre > 0 Then
If ObjConta.ValorPolizaDescuadre = 2 Then
OcurrioError = True
@@ -25828,11 +25918,7 @@ Partial Class Ventas
MsgError = "Ocurrio un error al saldar el movimiento"
End If
- 'If Descuentos > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not SubtotalMovto, Descuentos, SerieFolio, 103, ConceptoPartida, FechaPago, IdCuentaContableNoDeducible, -1, CveCliente:=CveCliente, CveVenta:=CveVenta, ImporteMX:=Descuentos, CveCuenta:=-1, TipoCambio:=TCVenta, TipoCambioPago:=TCPago, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto) Then
- ' MsgError = "Ocurrio un error al saldar el movimiento"
- 'End If
-
- If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 5) Then
+ If ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, 5) Then
If ObjConta.ValorPolizaDescuadre > 0 Then
MsgError = ObjConta.MensajePolizaDescuadre + " " + ObjConta.ValorDiferencia
GuardaLogAD($"Ventas/ClientesAbonar | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
@@ -29841,14 +29927,6 @@ Partial Class Ventas
End If
End If
- 'If ObjConta.ValidacionPrePolizaCuadre(-1, 2, CveVenta) Then
- ' If ObjConta.ValorPolizaDescuadre > 0 Then
- ' If ObjConta.ValorPolizaDescuadre = 2 Then
- ' OcurrioError = True
- ' MensajeError = ObjConta.MensajePolizaDescuadre
- ' End If
- ' End If
- 'End If
Catch ex As Exception
OcurrioError = True
OnError("Ocurrió un error al guardar la cotización", ex)
@@ -30685,6 +30763,8 @@ Partial Class Ventas
CambiaTipoComprobante()
Dim MensajeRemisiones As New StringBuilder
+ Dim MensajeRemisionesMedicas As New StringBuilder
+ Dim EsRemisionMedica As Boolean = False
Dim ObsOC As New StringBuilder
Dim ObsPedido As New StringBuilder
Dim ObsInv As New StringBuilder
@@ -30694,6 +30774,17 @@ Partial Class Ventas
Dim MetodoPagoDif As Boolean = False
For Each Dr As DataRow In dtSeleccionadas.Rows
+
+ If Dr("Medico").ToString.Length > 0 Then
+ MensajeRemisionesMedicas.Append($"Dr. {Dr("MEdico").ToString}{vbCrLf}")
+ EsRemisionMedica = True
+ End If
+ If Dr("Medico").ToString.Length > 0 Then
+ MensajeRemisionesMedicas.Append($"Procedimiento {Dr("Procedimiento")}{vbCrLf}")
+ EsRemisionMedica = True
+ End If
+ MensajeRemisionesMedicas.Append($"Rem. {Dr("Folio")} {If(Dr("ObsFact").ToString().Length > 0, $"({Dr("ObsFact")})", "")}{vbCrLf}")
+
MensajeRemisiones.AppendFormat("{0} {1}, ", Dr("Folio"), If(Dr("ObsFact").ToString().Length > 0, $"({Dr("ObsFact")})", ""))
ObsOC.AppendFormat("{0}, ", Dr("ObsOC"))
ObsPedido.AppendFormat("{0}, ", Dr("ObsPedido"))
@@ -30704,7 +30795,14 @@ Partial Class Ventas
End If
CveMetodoPago = Dr("CveMetodoPago33").ToString().ToEntero()
Next
- TxtObsFact.Text = If(MensajeRemisiones.ToString().Length > 0, MensajeRemisiones.ToString().Substring(0, MensajeRemisiones.ToString().Length - 2), "")
+
+ If EsRemisionMedica Then
+ TxtObsFact.Text = If(MensajeRemisionesMedicas.ToString().Length > 0, MensajeRemisionesMedicas.ToString().Substring(0, MensajeRemisionesMedicas.ToString().Length - 2), "")
+ Else
+ TxtObsFact.Text = If(MensajeRemisiones.ToString().Length > 0, MensajeRemisiones.ToString().Substring(0, MensajeRemisiones.ToString().Length - 2), "")
+ End If
+
+
TxtOrdenCompra.Text = If(ObsOC.ToString().Length > 0, ObsOC.ToString().Substring(0, ObsOC.ToString().Length - 2), "")
TxtPedidoContrato.Text = If(ObsPedido.ToString().Length > 0, ObsPedido.ToString().Substring(0, ObsPedido.ToString().Length - 2), "")
TxtObsAlmacen.Text = If(ObsInv.ToString().Length > 0, ObsInv.ToString().Substring(0, ObsInv.ToString().Length - 2), "")
@@ -34471,6 +34569,22 @@ Partial Class Ventas
End Set
End Property
+ Property EsVentaMedica As Boolean
+ Get
+ If ViewState("EsVentaMedica") Is Nothing Then
+ ViewState("EsVentaMedica") = False
+ End If
+
+ Return Boolean.Parse(ViewState("EsVentaMedica").ToString)
+
+ End Get
+ Set(value As Boolean)
+ ViewState("EsVentaMedica") = value
+ End Set
+ End Property
+
+
+
'Property SucursalOrigenCP As Modelos.SucursalModel
' Get
' If ViewState("SucursalOrigenCP") Is Nothing Then
@@ -35434,5 +35548,229 @@ Partial Class Ventas
DdlFormaCliente.DataBind()
End Sub
+
+
+#Region "VENTAS MEDICAS"
+
+ Protected Sub ChkRequiereTecnico_CheckedChanged(sender As Object, e As EventArgs)
+ TdFechaOS2.Visible = ChkRequiereTecnicoModal.Checked
+ UpCliente.Update()
+ End Sub
+
+ Protected Sub RBLTipoVenta_SelectedIndexChanged(sender As Object, e As EventArgs)
+
+ If RBLTipoVenta.SelectedValue.ToEntero > 0 Then
+
+ DvModalTipoVentaPasoTipo.Visible = False
+ DvModalTipoVentaPasoCliente.Visible = True
+ DvModalTipoVentaPasoRequiereOS.Visible = True
+ DvModalTipoVentaPasoMedicoProcedimiento.Visible = True
+ TxtFechaModal.Text = NowADS.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T")
+ LnkDvModalTipoVentaAceptar.Visible = True
+
+ 'si es A - Vista o ,Fuera De Linea requiere tecnico
+ If RBLTipoVenta.SelectedValue.ToEntero.Contiene(1, 3) Then
+ ChkRequiereTecnicoModal.Checked = True
+ ChkRequiereTecnicoModal.Enabled = False
+ DvModalRequiereOSFecha.Visible = True
+ End If
+
+
+ End If
+ UpDvModalTipoVenta.Update()
+ End Sub
+
+ 'Protected Sub DdlClientesWS_selectedindexchange(sender As Object, e As EventArgs)
+
+ ' If DdlClientesWS.SelectedValue.ToEntero > 0 Then
+
+ ' DvModalTipoVentaPasoCliente.Visible = False
+ ' DvModalTipoVentaPasoRequiereOS.Visible = True
+
+
+
+ ' 'si es A - Vista o ,Fuera De Linea requiere tecnico
+ ' If RBLTipoVenta.SelectedValue.ToEntero.Contiene(1, 3) Then
+ ' ChkRequiereTecnicoModal.Checked = True
+ ' ChkRequiereTecnicoModal.Enabled = False
+ ' DvModalRequiereOSFecha.Visible = True
+ ' End If
+
+ ' End If
+
+ ' UpDvModalTipoVenta.Update()
+
+ 'End Sub
+
+ 'Protected Sub DdlMedicoModal_SelectedIndexChanged(sender As Object, e As EventArgs)
+ ' ModalValidaMedicoProcedimiento()
+ 'End Sub
+
+ 'Protected Sub DdlProcedimientoModal_SelectedIndexChanged(sender As Object, e As EventArgs)
+ ' ModalValidaMedicoProcedimiento()
+ 'End Sub
+
+ Protected Sub ModalValidaMedicoProcedimiento()
+
+ If DdlMedicoModal.SelectedValue.ToEntero > 0 AndAlso DdlProcedimientoModal.SelectedValue.ToEntero > 0 Then
+ LnkDvModalTipoVentaAceptar.Visible = True
+ Else
+ LnkDvModalTipoVentaAceptar.Visible = False
+ End If
+
+ UpDvModalTipoVenta.Update()
+
+ End Sub
+
+ Protected Sub LnkDvModalTipoVentaCancelar_Click(sender As Object, e As EventArgs)
+
+ LnkDvModalTipoVentaAceptar.Visible = False
+
+ DvModalTipoVentaPasoTipo.Visible = True
+ DvModalTipoVentaPasoCliente.Visible = False
+ DvModalTipoVentaPasoRequiereOS.Visible = False
+ DvModalTipoVentaPasoMedicoProcedimiento.Visible = False
+
+ ChkRequiereTecnicoModal.Enabled = True
+
+ DdlClientesWS.txtText.Value = ""
+ DdlClientesWS.txtValue.Value = ""
+ DdlClientesWS.ddl.SelectedValueExist(-1)
+
+ DvModalRequiereOSFecha.Visible = False
+ ChkRequiereTecnicoModal.Checked = False
+
+ RBLTipoVenta.SelectedValue = Nothing
+
+ DdlMedicoModal.SelectedValueExist(-1)
+ DdlProcedimientoModal.SelectedValueExist(-1)
+
+ UpDvModalTipoVenta.Update()
+
+ End Sub
+
+
+ Protected Sub LnkDvModalTipoVentaAceptar_Click(sender As Object, e As EventArgs)
+
+ If DdlClientesWS.SelectedValue.ToEntero > 0 Then
+ ViewState("CveCliente") = DdlClientesWS.SelectedValue.ToEntero
+ Else
+ Alert("Debe de seleccionar un cliente.", TipoMensaje.MsgAdvertencia)
+ Exit Sub
+ End If
+
+ If ChkRequiereTecnicoModal.Checked Then
+ If Not IsDate(TxtFechaModal.Text.Replace(",", "")) Then
+ Alert("El campo fecha no es valido.", TipoMensaje.MsgAdvertencia)
+ Exit Sub
+ End If
+ End If
+
+ ChkRequiereTecnico.Checked = ChkRequiereTecnicoModal.Checked
+ TxtFechaOS.Text = TxtFechaModal.Text
+
+ If ChkRequiereTecnicoModal.Checked Then
+ TdFechaOS1.Visible = True
+ TdFechaOS2.Visible = True
+ Else
+ TdFechaOS1.Visible = False
+ TdFechaOS2.Visible = False
+ End If
+
+ DdlMedico.SelectedValueExist(DdlMedicoModal.SelectedValue)
+ DdlProcedimiento.SelectedValueExist(DdlProcedimientoModal.SelectedValue)
+
+ 'si es A - Vista o ,Fuera De Linea requiere tecnico
+ If RBLTipoVenta.SelectedValue.ToEntero.Contiene(1, 3) Then
+ TdFechaOS1.Visible = True
+ TdFechaOS2.Visible = True
+ ChkRequiereTecnico.Checked = True
+ ChkRequiereTecnico.Enabled = False
+ DdlTipoComprobante.SelectedValueExist("Rem")
+ Else
+
+ DdlTipoComprobante.SelectedValueExist("Ing")
+ End If
+ DdlTipoComprobante.Enabled = False
+
+ TdRequiereTecnico1.Visible = True
+ TdRequiereTecnico2.Visible = True
+
+
+ CargaCliente(CveCliente)
+
+ DdlTipoComprobante_SelectedIndexChanged(sender, Nothing)
+
+ RegistraScript("$('#DvModalTipoVenta').modal('hide');")
+
+ UpCliente.Update()
+
+ End Sub
+
+ Protected Sub ChkRequiereTecnicoModal_CheckedChanged(sender As Object, e As EventArgs)
+
+ DvModalRequiereOSFecha.Visible = ChkRequiereTecnicoModal.Checked
+ UpDvModalTipoVenta.Update()
+
+ End Sub
+
+
+ Private Function GeneraOS(ByRef TransacSQL As SqlTransaction, ByRef errorList As List(Of String)) As Boolean
+
+
+ Dim Errores As Boolean = False
+
+ Dim ObjOrdenServicio As New ClsOS(TransacSQL)
+
+ Dim CveOSTipo As Integer = -1
+
+ If ObjOrdenServicio.GetTipoOrdenesServicios(UsuarioActual.CveEmpresa) Then
+ CveOSTipo = ObjOrdenServicio.DtResultados.FiltroPrimeroValor("CveOrdenServicioTipo", " Estatus = 'Activo' ").ToEntero
+ End If
+
+ Dim EstatusOrdenServicio As Integer = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveEstatusOrdenServicio", "TipoEstatus = 1").ToEntero
+
+ If ObjOrdenServicio.AddOrdenesServicios(CveCliente, DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.Nombre, TxtFecha.Text.Replace(",", "").ToDateTime, $"Venta: {LblSerie.Text}-{TxtFolio.Text}", UsuarioActual.CveUsuario, EstatusOrdenServicio,
+ UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, CveOSTipo, CveClienteSucursal:=DdlSubProyectoDatos.SelectedValue.ToEntero,
+ Direccion:="", Telefono:="", CveModeloAuto:=-1, Año:="", CveMedico:=DdlMedico.SelectedValue.ToEntero,
+ CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=RBLTipoVenta.SelectedValue.ToEntero, FechaCita:=TxtFecha.Text.Replace(",", "").ToDateTime) Then
+ CveOSVentaMedica = ObjOrdenServicio.CveOS
+ Else
+ errorList.Add("Se presento un error al guardar la orden de servicio.")
+ Errores = True
+ End If
+
+ Dim CvePSDetalle As Integer = UsuarioActual.Empresa.Funcionalidad(708).ToEntero
+
+ If Not CvePSDetalle > 0 Then
+ errorList.Add("No se tiene asignado un producto para la orden de servicio (FNC 708).")
+ Errores = True
+ End If
+
+ If Not Errores Then
+
+ Dim CveOsDetalle = ObjOrdenServicio.AddOrdenesServiciosDetalle(ObjOrdenServicio.CveOS, CvePSDetalle, 1, -1, -1, $"Venta: {LblSerie.Text}-{TxtFolio.Text}", False, True, False, -1, "-1", "-1", "-1", "", UsuarioActual.CveUsuario, Archivo:="")
+
+ If CveOsDetalle > 0 Then
+ 'MENSAJE PRINCIPAL
+ Dim MensajeAlertOS As New StringBuilder
+ MensajeAlertOS.AppendFormat(String.Format(" La Orden de Servicio: {0} se generó correctamente.
", Encripta(String.Format("OP=OS&CVEOS={0}", ObjOrdenServicio.CveOS)))
+ Dim Liga = $"document.location.href=""/OS/RepOrdenesServicios.aspx"";"
+ Alert(MensajeAlertOS.ToString, TipoMensaje.MsgInformacion, Liga)
+ Else
+ errorList.Add("Se presento un error al guardar la el detalle de la orden de servicio.")
+ Errores = True
+ End If
+
+
+ End If
+
+ Return If(Errores, False, True)
+
+ End Function
+
+#End Region
+
End Class
diff --git a/Ventas/VentasMedicas.aspx b/Ventas/VentasMedicas.aspx
index 82c40dfee..7bf65e2a3 100644
--- a/Ventas/VentasMedicas.aspx
+++ b/Ventas/VentasMedicas.aspx
@@ -321,7 +321,9 @@
-
+
+
+
Medico:
@@ -335,7 +337,7 @@
-
+
Requiere Técnico:
@@ -349,6 +351,7 @@
+
@@ -1522,9 +1525,12 @@
+
+ Producto Servicio:
-
+ <%----%>
+
@@ -1591,29 +1597,98 @@
+
-
-
+
-
-
+
+
+
-
Tipo de Venta
+
+
+ Tipo de Venta
+
+
-
-
-
+
+
+ <%--Tipo Venta--%>
+
+
+
+
+
+ <%--Cliente--%>
+
+
+
+ Cliente:
+
+
+
+
+
+ <%-- Requiere Os y Fecha OS --%>
+
+
+
+ Requiere Técnico::
+
+
+
+ Fecha De Orden:
+
+
+
+
+
+
+
+
+
+
+
+ <%--Medico Procedimiento--%>
+
+
+
+ Medico:
+
+ Seleccione uno
+
+
+
+ Procedimiento:
+
+ Seleccione uno
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
diff --git a/Ventas/VentasMedicas.aspx.vb b/Ventas/VentasMedicas.aspx.vb
index c69f6c102..36378f2aa 100644
--- a/Ventas/VentasMedicas.aspx.vb
+++ b/Ventas/VentasMedicas.aspx.vb
@@ -2414,7 +2414,7 @@ Partial Class VentasMedicas
Me.CveEstadoCancelacion = 0
- TxtFecha.Text = NowADS().ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T")
+ TxtFechaOS.Text = NowADS().ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T")
If UsuarioActual.TienePermisoProceso(177) Then
DdlTipoComprobante.Items.Insert(4, New ListItem("Pedido de Contrato", "Ped"))
@@ -2422,11 +2422,7 @@ Partial Class VentasMedicas
- 'If UsuarioActual.Empresa.Funcionalidad(595) = "1" Then
- ' ImgDescPU.Visible = False
- ' ImgDescConcepto.Visible = False
- ' DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("Autorización", "PA"))
- 'End If
+
If Not UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
LnkAgregarCliente.Visible = False
@@ -2439,18 +2435,8 @@ Partial Class VentasMedicas
End If
-
-
-
- 'If UsuarioActual.Empresa.Funcionalidad(561).ToString() = "1" Then
- ' thPoliza.Visible = True
- ' thPoliza2.Visible = True
- 'End If
-
-
-
-
SetValues()
+
CvePresupuesto = 0
'MODALIDADES
@@ -2473,8 +2459,7 @@ Partial Class VentasMedicas
LblUsuario.Text = UsuarioActual.Usuario
LblFechaRegistro.Text = NowADS().ToShortDateString()
- 'ImgDescPU.Attributes.Add("onclick", "javascript:$('#ModalDescuento').modal(); $get('LblTitulo1').style.display = ''; $get('LblTitulo2').style.display = 'none'; $get('LblTituloTipo1').style.display = ''; $get('LblTituloTipo2').style.display = 'none'; $get('HdnTipoDescuento').value = '0'; $get('LblPrecio1').style.display = ''; $get('LblTotalPS1').style.display = 'none'; $get('LblSubTotal1').style.display = 'none'; $get('LblAmort').style.display = 'none'; $get('BtnAplicarDescP').style.display = ''; $get('BtnAplicarDescG').style.display = 'none'; $get('TrMotivoDescuento').style.display = '';")
- 'ImgDescConcepto.Attributes.Add("onclick", "javascript:$('#ModalDescuento').modal(); $get('LblTitulo1').style.display = ''; $get('LblTitulo2').style.display = 'none'; $get('LblTituloTipo1').style.display = ''; $get('LblTituloTipo2').style.display = 'none'; $get('HdnTipoDescuento').value = '1'; $get('LblPrecio1').style.display = 'none'; $get('LblTotalPS1').style.display = ''; $get('LblSubTotal1').style.display = 'none'; $get('LblAmort').style.display = 'none'; $get('BtnAplicarDescP').style.display = ''; $get('BtnAplicarDescG').style.display = 'none'; $get('TrMotivoDescuento').style.display = '';")
+
ImgDescTotal.Visible = False
ImgDescTotal.Attributes.Add("onclick", "javascript:$('#ModalDescuento').modal(); $get('LblTitulo1').style.display = ''; $get('LblTitulo2').style.display = 'none'; $get('LblTituloTipo1').style.display = ''; $get('LblTituloTipo2').style.display = 'none'; $get('HdnTipoDescuento').value = '2'; $get('LblPrecio1').style.display = 'none'; $get('LblTotalPS1').style.display = 'none'; $get('LblSubTotal1').style.display = ''; $get('LblAmort').style.display = 'none'; $get('BtnAplicarDescP').style.display = 'none'; $get('BtnAplicarDescG').style.display = ''; $get('TrMotivoDescuento').style.display = '';")
@@ -2501,6 +2486,7 @@ Partial Class VentasMedicas
CargaAgentes()
CargaProcedimientos()
CargaTiposVenta()
+ CargaDdlClientes()
@@ -2833,6 +2819,20 @@ Partial Class VentasMedicas
End Sub
+ Private Sub CargaDdlClientes()
+ If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
+ DdlClientesWS.setEsWebService(True)
+ Else
+ DdlClientesWS.setEsWebService(False)
+ If Not UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
+ DdlClientesWS.ddl.Items.Clear()
+ DdlClientesWS.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
+ DdlClientesWS.DataBind()
+ DdlClientesWS.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
+ End If
+ End If
+ End Sub
+
Private Sub BloqueaClasificaciones()
If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then
@@ -4337,11 +4337,18 @@ Partial Class VentasMedicas
Private Sub CargaProcedimientos()
DdlMedico.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
DdlMedico.DataBind()
+
+ DdlMedicoModal.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
+ DdlMedicoModal.DataBind()
End Sub
Private Sub CargaAgentes()
DdlProcedimiento.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
DdlProcedimiento.DataBind()
+
+ DdlProcedimientoModal.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
+ DdlProcedimientoModal.DataBind()
+
End Sub
Private Sub CargaPSRemision(CveClasificacion As Integer, Objeto As ADServerControl.Dropdownlost)
@@ -14283,29 +14290,152 @@ Partial Class VentasMedicas
CargaFormaPago(DdlMetodoPago33.SelectedValue.ToEntero())
End Sub
+ Protected Sub ChkRequiereTecnico_CheckedChanged(sender As Object, e As EventArgs)
+ TdFechaOS2.Visible = ChkRequiereTecnicoModal.Checked
+ UpCliente.Update()
+ End Sub
+
Protected Sub RBLTipoVenta_SelectedIndexChanged(sender As Object, e As EventArgs)
If RBLTipoVenta.SelectedValue.ToEntero > 0 Then
+ DvModalTipoVentaPasoTipo.Visible = False
+ DvModalTipoVentaPasoCliente.Visible = True
+ 'DvModalTipoVentaPasoRequiereOS.Visible = False
+ 'DvModalTipoVentaPasoMedicoProcedimiento.Visible = False
+ End If
+ UpDvModalTipoVenta.Update()
+ End Sub
- If RBLTipoVenta.SelectedValue.ToEntero = 2 Then
- TdRequiereTecnico1.Visible = True
- TdRequiereTecnico2.Visible = True
+ Protected Sub DdlClientesWS_selectedindexchange(sender As Object, e As EventArgs)
+
+ If DdlClientesWS.SelectedValue.ToEntero > 0 Then
+
+ DvModalTipoVentaPasoCliente.Visible = False
+ DvModalTipoVentaPasoRequiereOS.Visible = True
+
+ TxtFechaModal.Text = NowADS.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T")
+
+ 'si es A - Vista o ,Fuera De Linea requiere tecnico
+ If RBLTipoVenta.SelectedValue.ToEntero.Contiene(1, 3) Then
+ ChkRequiereTecnicoModal.Checked = True
+ ChkRequiereTecnicoModal.Enabled = False
+ DvModalRequiereOSFecha.Visible = True
End If
- RegistraScript("$('#DvModalTipoVenta').modal('hide');")
- UpCliente.Update()
End If
+ UpDvModalTipoVenta.Update()
+
End Sub
- Protected Sub ChkRequiereTecnico_CheckedChanged(sender As Object, e As EventArgs)
+ Protected Sub LnkDvModalTipoVentaSeuigenteRequiereTecnico_Click(sender As Object, e As EventArgs)
- TdFechaOS1.Visible = ChkRequiereTecnico.Checked
- TdFechaOS2.Visible = ChkRequiereTecnico.Checked
+ If ChkRequiereTecnicoModal.Checked Then
+ If Not IsDate(TxtFechaModal.Text.Replace(",", "")) Then
+ Alert("El campo fecha no es valido.", TipoMensaje.MsgAdvertencia)
+ Exit Sub
+ End If
+ End If
+
+ DvModalTipoVentaPasoRequiereOS.Visible = False
+ DvModalTipoVentaPasoMedicoProcedimiento.Visible = True
+
+ UpDvModalTipoVenta.Update()
+
+ End Sub
+
+ Protected Sub DdlMedicoModal_SelectedIndexChanged(sender As Object, e As EventArgs)
+ ModalValidaMedicoProcedimiento()
+ End Sub
+
+ Protected Sub DdlProcedimientoModal_SelectedIndexChanged(sender As Object, e As EventArgs)
+ ModalValidaMedicoProcedimiento()
+ End Sub
+
+ Protected Sub ModalValidaMedicoProcedimiento()
+
+ If DdlMedicoModal.SelectedValue.ToEntero > 0 AndAlso DdlProcedimientoModal.SelectedValue.ToEntero > 0 Then
+ LnkDvModalTipoVentaAceptar.Visible = True
+ Else
+ LnkDvModalTipoVentaAceptar.Visible = False
+ End If
+
+ UpDvModalTipoVenta.Update()
+
+ End Sub
+
+ Protected Sub LnkDvModalTipoVentaCancelar_Click(sender As Object, e As EventArgs)
+
+ LnkDvModalTipoVentaAceptar.Visible = False
+
+ DvModalTipoVentaPasoTipo.Visible = True
+ DvModalTipoVentaPasoCliente.Visible = False
+ DvModalTipoVentaPasoRequiereOS.Visible = False
+ DvModalTipoVentaPasoMedicoProcedimiento.Visible = False
+
+ DdlClientesWS.txtText.Value = ""
+ DdlClientesWS.txtValue.Value = ""
+ DdlClientesWS.ddl.SelectedValueExist(-1)
+
+ DvModalRequiereOSFecha.Visible = False
+ ChkRequiereTecnicoModal.Checked = False
+
+ RBLTipoVenta.SelectedValue = Nothing
+
+ DdlMedicoModal.SelectedValueExist(-1)
+ DdlProcedimientoModal.SelectedValueExist(-1)
+
+ UpDvModalTipoVenta.Update()
+
+ End Sub
+
+
+ Protected Sub LnkDvModalTipoVentaAceptar_Click(sender As Object, e As EventArgs)
+
+ ChkRequiereTecnico.Checked = ChkRequiereTecnicoModal.Checked
+ TxtFecha.Text = TxtFechaModal.Text
+
+ If ChkRequiereTecnicoModal.Checked Then
+ TdFechaOS1.Visible = True
+ TdFechaOS2.Visible = True
+ Else
+ TdFechaOS1.Visible = False
+ TdFechaOS2.Visible = False
+ End If
+
+ DdlMedico.SelectedValueExist(DdlMedicoModal.SelectedValue)
+ DdlProcedimiento.SelectedValueExist(DdlProcedimientoModal.SelectedValue)
+
+ 'si es A - Vista o ,Fuera De Linea requiere tecnico
+ If RBLTipoVenta.SelectedValue.ToEntero.Contiene(1, 3) Then
+ TdFechaOS1.Visible = True
+ TdFechaOS2.Visible = True
+ ChkRequiereTecnico.Checked = True
+ ChkRequiereTecnico.Enabled = False
+ End If
+
+ TdRequiereTecnico1.Visible = True
+ TdRequiereTecnico2.Visible = True
+
+ CargaCliente(DdlClientesWS.SelectedValue.ToEntero)
+
+ RegistraScript("$('#DvModalTipoVenta').modal('hide');")
UpCliente.Update()
+ End Sub
+
+ Protected Sub ChkRequiereTecnicoModal_CheckedChanged(sender As Object, e As EventArgs)
+
+ DvModalRequiereOSFecha.Visible = ChkRequiereTecnicoModal.Checked
+ UpDvModalTipoVenta.Update()
End Sub
+
+
+
+
+
+
End Class