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/AF/AF.aspx.vb b/AF/AF.aspx.vb
index ab530b603..f900e0f50 100644
--- a/AF/AF.aspx.vb
+++ b/AF/AF.aspx.vb
@@ -1172,8 +1172,8 @@ Partial Class AF_AF
End If
If Adjunto.Trim.Length > 0 Then
- Dim linkDescarga = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/AF/Placas/" & Adjunto & "." & extencion
- Dim linkDescargaArchivo = UsuarioActual.Empresa.Ruta & "AF/Placas/" & Adjunto & "." & extencion
+ Dim linkDescarga As String = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/AF/Placas/" & Adjunto & "." & extencion
+ Dim linkDescargaArchivo As String = UsuarioActual.Empresa.Ruta & "AF/Placas/" & Adjunto & "." & extencion
If File.Exists(linkDescargaArchivo) Then
ImgDownLoad.Visible = True
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/ClsAcumuladores.vb b/App_Code/ClsAcumuladores.vb
index 54581d959..120c6bcdb 100644
--- a/App_Code/ClsAcumuladores.vb
+++ b/App_Code/ClsAcumuladores.vb
@@ -760,9 +760,15 @@ Public Class ClsAcumuladores
End With
Try
SqlAdapter.Fill(Data)
- Retorno = True
- Catch ex As SqlException
- OnError("Ocurrió un al agregar la garantia detalle. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ Retorno = True
+ Catch ex As SqlException
+ If ex.Message.Contains("Número: 2627;") And ex.Message.Contains("UK_Acum_GarantiasDetalle_Folio_Ensamble_Inspeccion_Comprobante") Then
+ Alert(String.Format("las condiciones ya se encuentran registradas. Comprobante:'{0}', CodigoEnsamble:'{1}', CodigoInspeccion:'{2}' ", Comprobante, CodigoEnsamble, CodigoInspeccion), TipoMensaje.MsgAdvertencia)
+ GuardaLogAD(String.Format("el folio ya se encuentra registrado {0} {1}", ex.Message, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()))
+ Else
+ OnError("Ocurrió un al agregar la garantia detalle. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End If
+
End Try
Return Retorno
End Function
diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb
index f12d507c9..b9bcdf016 100644
--- a/App_Code/ClsBancos.vb
+++ b/App_Code/ClsBancos.vb
@@ -61,7 +61,7 @@ Public Class ClsBancos
Public Property FechaDocumento As DateTime
Public Property Folio As String
Public Property PagueseA As String
- Public Property Importe As Double
+ Public Property Importe As Decimal
Public Property CveMoneda As Integer
Public Property Moneda As String
Public Property TipoCambio As Decimal
@@ -728,7 +728,7 @@ Public Class ClsBancos
Me.FechaDocumento = Data.Rows(0)("FechaDocumento").ToString.ToDate
Me.Folio = Data.Rows(0)("Folio").ToString
Me.PagueseA = Data.Rows(0)("PagueseA").ToString
- Me.Importe = Data.Rows(0)("Importe").ToString.ToDouble
+ Me.Importe = Data.Rows(0)("Importe").ToString.ToDecimal
Me.CveMoneda = Data.Rows(0)("CveMoneda").ToString.ToEntero
Me.Moneda = Data.Rows(0)("Moneda").ToString
Me.TipoCambio = Data.Rows(0)("TipoCambio").ToString.ToDecimal
@@ -1040,58 +1040,58 @@ Public Class ClsBancos
Select Case dr("ClaveFormaPagoSAT").ToString
Case "02"
If Cuentapago <> "" AndAlso Not Cuentapago.Length.Contiene(11, 18) Then
- Mensaje = "La cuenta ordenante no cumple con el formato esperado."
+ Mensaje = $"La cuenta ordenante {Cuentapago} no cumple con el formato esperado 11, 18 caracteres."
End If
If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 11, 15, 16, 18, 50)) Then
- Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado."
+ Mensaje = $"{Mensaje} La Cuenta Beneficiario {CuentaBeneficiario} no cumple con el formato esperado 10, 11, 15, 16, 18, 50 caracteres."
End If
Case "03"
If Cuentapago <> "" AndAlso Not Cuentapago.Length.Contiene(10, 16, 18) Then
- Mensaje = "La cuenta ordenante no cumple con el formato esperado."
+ Mensaje = $"La cuenta ordenante {Cuentapago} no cumple con el formato esperado 10, 16, 18 caracteres."
End If
If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 18)) Then
- Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado."
+ Mensaje = $"{Mensaje} La Cuenta Beneficiario {CuentaBeneficiario} no cumple con el formato esperado 10, 18 caracteres."
End If
Case "04"
If Cuentapago <> "" AndAlso Not Cuentapago.Length.Contiene(16) Then
- Mensaje = "La cuenta ordenante no cumple con el formato esperado."
+ Mensaje = $"La cuenta ordenante {Cuentapago} no cumple con el formato esperado 16 caracteres."
End If
If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 11, 15, 16, 18, 50)) Then
- Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado."
+ Mensaje = $"{Mensaje} La Cuenta Beneficiario {CuentaBeneficiario} no cumple con el formato esperado 10, 11, 15, 16, 18, 50 caracteres."
End If
Case "05"
If Cuentapago <> "" AndAlso Not Cuentapago.Length.Contiene(10, 11, 15, 16, 18, 50) Then
- Mensaje = "La cuenta ordenante no cumple con el formato esperado."
+ Mensaje = $"La cuenta ordenante {Cuentapago} no cumple con el formato esperado 10, 11, 15, 16, 18, 50 caracteres."
End If
If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 11, 15, 16, 18, 50)) Then
- Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado."
+ Mensaje = $"{Mensaje} La Cuenta Beneficiario {CuentaBeneficiario} no cumple con el formato esperado 10, 11, 15, 16, 18, 50 caracteres."
End If
Case "06"
If Cuentapago <> "" AndAlso Not Cuentapago.Length.Contiene(10) Then
- Mensaje = "La cuenta ordenante no cumple con el formato esperado."
+ Mensaje = $"La cuenta ordenante {Cuentapago} no cumple con el formato esperado 10 caracteres."
End If
CuentaBeneficiario = ""
Case "28"
If Cuentapago <> "" AndAlso Not Cuentapago.Length.Contiene(16) Then
- Mensaje = "La cuenta ordenante no cumple con el formato esperado."
+ Mensaje = $"La cuenta ordenante {Cuentapago} no cumple con el formato esperado 16 caracteres."
End If
If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 11, 15, 16, 18, 50)) Then
- Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado."
+ Mensaje = $"{Mensaje} La Cuenta Beneficiario {CuentaBeneficiario} no cumple con el formato esperado 10, 11, 15, 16, 18, 50 caracteres."
End If
Case "29"
If Cuentapago <> "" AndAlso Not Cuentapago.Length.Contiene(15, 16) Then
- Mensaje = "La cuenta ordenante no cumple con el formato esperado."
+ Mensaje = $"La cuenta ordenante {Cuentapago} no cumple con el formato esperado 15, 16 caracteres."
End If
If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 11, 15, 16, 18, 50)) Then
- Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado."
+ Mensaje = $"{Mensaje} La Cuenta Beneficiario {CuentaBeneficiario} no cumple con el formato esperado 10, 11, 15, 16, 18, 50 caracteres."
End If
Case Else
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/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb
index 72954ea76..4a132fe6b 100644
--- a/App_Code/ClsContabilidad.vb
+++ b/App_Code/ClsContabilidad.vb
@@ -6094,6 +6094,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 +6104,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
@@ -6435,6 +6437,10 @@ Public Class ClsContabilidad
Try
SqlAdapter.Fill(Data)
Retorno = True
+ Catch ex As sqlException
+ If ex.Message.Contains("50015;") Then
+ OnError("No se puede registrar una póliza en un ejercicio Cerrado", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End If
Catch ex As Exception
Me.OnError("Ocurrió un error al obtener traspasar las Prepolizas", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
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/ClsOS.vb b/App_Code/ClsOS.vb
index 2e7b3b93f..171d0f8bf 100644
--- a/App_Code/ClsOS.vb
+++ b/App_Code/ClsOS.vb
@@ -67,6 +67,10 @@ Public Class ClsOS
Public Property SubProyecto As String
Public Property Condiciones As String
+ Public Property CveMedico As Integer = -1
+ Public Property CveProcedimiento As Integer = -1
+ Public Property CveTipoVenta As Integer = -1
+
Private Class Especificaciones
@@ -374,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")
@@ -385,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
@@ -403,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")
@@ -413,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
@@ -547,6 +552,11 @@ Public Class ClsOS
Me.SubProyecto = Data.Rows(0)("SubProyecto").ToString
Me.Condiciones = Data.Rows(0)("Condiciones").ToString
+ Me.CveMedico = Data.Rows(0)("CveMedico").ToString.ToEntero
+ Me.CveProcedimiento = Data.Rows(0)("CveProcedimiento").ToString.ToEntero
+ Me.CveTipoVenta = Data.Rows(0)("CveTipoVenta").ToString.ToEntero
+
+
End If
Retorno = True
Catch ex As Exception
@@ -601,7 +611,7 @@ Public Class ClsOS
Public Function AddOrdenesServicios(CveCliente As Integer, CveSubProyecto As Integer, PersonaSolicito As String, FechaRecepcion As Date, Descripcion As String, CveUsuarioRecibio As Integer, CveEstatusOrdenServicio As Integer,
CveUsuario As Integer, CveEmpresa As Integer, CveCotizacion As Integer, CveVenta As Integer, CveOSPadre As Integer, CveOSTipo As Integer, Optional CveClienteSucursal As Integer = -1,
Optional Direccion As String = "-1", Optional Telefono As String = "", Optional CveModeloAuto As Integer = -1, Optional Año As String = "-1", Optional Correo As String = "",
- Optional Condiciones As String = "") As Boolean
+ Optional Condiciones As String = "", Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveTipoVenta As Integer = -1, Optional FechaCita As DateTime = MinFecha) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_OS_OrdenesServiciosAdd")
@@ -628,6 +638,10 @@ Public Class ClsOS
.Add("@Año", SqlDbType.VarChar).Value = Año
.Add("@Correo", SqlDbType.VarChar).Value = Correo
.Add("@Condiciones", SqlDbType.VarChar).Value = Condiciones
+ .Add("@CveMedico", SqlDbType.Int).Value = CveMedico
+ .Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
+ .Add("@CveTipoVenta", SqlDbType.Int).Value = CveTipoVenta
+ .Add("@FechaCita", SqlDbType.DateTime).Value = FechaCita
.Add("@CveOS", SqlDbType.Int).Direction = ParameterDirection.Output
.Add("@vFolio", SqlDbType.Int).Direction = ParameterDirection.Output
@@ -672,7 +686,8 @@ Public Class ClsOS
End Function
Public Function UpdateOrdenesServicios(PersonaSolicito As String, FechaRecepcion As String, Descripcion As String, CveUsuarioRecibio As Integer, CveEstatusOrdenServicio As Integer, CveOS As Integer, CveUsuarioModifico As Integer,
CveOSTipo As Integer, Optional CveClienteSucursal As Integer = -1, Optional Direccion As String = "-1", Optional Telefono As String = "", Optional CveModeloAuto As Integer = -1,
- Optional Año As String = "-1", Optional CveSubProyecto As Integer = -1, Optional Correo As String = "-1", Optional Condiciones As String = "") As Boolean
+ Optional Año As String = "-1", Optional CveSubProyecto As Integer = -1, Optional Correo As String = "-1", Optional Condiciones As String = "",
+ Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveTipoVenta As Integer = -1, Optional FechaCita As DateTime = MinFecha) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_OS_OrdenesServiciosUpdate")
@@ -695,6 +710,10 @@ Public Class ClsOS
.Add("@Año", SqlDbType.VarChar).Value = Año
.Add("@Correo", SqlDbType.VarChar).Value = Correo
.Add("@Condiciones", SqlDbType.VarChar).Value = Condiciones
+ .Add("@CveMedico", SqlDbType.Int).Value = CveMedico
+ .Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
+ .Add("@CveTipoVenta", SqlDbType.Int).Value = CveTipoVenta
+ .Add("@FechaCita", SqlDbType.DateTime).Value = FechaCita
End With
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index 772323ed2..0af6d6c27 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -2123,6 +2123,60 @@ Public Class ClsPaginas
HttpContext.Current.Application(AppNombre) = value
End Set
End Property
+
+ Property GlobalDTTipoVenta(Optional CveEmpresa As Integer = -1) As DataTable
+ Get
+ Dim AppNombre As String = $"GlobalDTTipoVenta"
+ 'sino existe, recarga los datos
+ If Application(AppNombre) Is Nothing Then
+ Dim ObjVentas As New ClsVentas
+ If ObjVentas.GetTipoVenta() Then Application(AppNombre) = ObjVentas.DtResultados
+ ObjVentas.Dispose()
+ End If
+ GlobalDTTipoVenta = DirectCast(Application(AppNombre), DataTable)
+ End Get
+ Set(value As DataTable)
+ Dim AppNombre As String = $"GlobalDTTipoVenta"
+ Application(AppNombre) = value
+ End Set
+ End Property
+
+ Property GlobalDTMedicos(CveEmpresa As Integer) As DataTable
+ Get
+ Dim AppNombre As String = $"GlobalDTAgentes-{CveEmpresa}"
+ 'sino existe, recarga los datos
+ If Application(AppNombre) Is Nothing Then
+ Dim ObjVentas As New ClsVentas
+ If ObjVentas.GetMedicos(-1, CveEmpresa, -1) Then Application(AppNombre) = ObjVentas.DtResultados
+ ObjVentas.Dispose()
+ End If
+ GlobalDTMedicos = DirectCast(Application(AppNombre), DataTable)
+ End Get
+ Set(value As DataTable)
+ Dim AppNombre As String = $"GlobalDTAgentes-{CveEmpresa}"
+ Application(AppNombre) = value
+ End Set
+ End Property
+
+
+
+
+ Property GlobalDTProcedimientos(CveEmpresa As Integer) As DataTable
+ Get
+ Dim AppNombre As String = $"GlobalDTProcedimientos-{CveEmpresa}"
+ 'sino existe, recarga los datos
+ If Application(AppNombre) Is Nothing Then
+ Dim ObjVentas As New ClsVentas
+ If ObjVentas.GetProcedimientos(-1, CveEmpresa, -1) Then Application(AppNombre) = ObjVentas.DtResultados
+ ObjVentas.Dispose()
+ End If
+ GlobalDTProcedimientos = DirectCast(Application(AppNombre), DataTable)
+ End Get
+ Set(value As DataTable)
+ Dim AppNombre As String = $"GlobalDTProcedimientos-{CveEmpresa}"
+ Application(AppNombre) = value
+ End Set
+ End Property
Public Shared Property GlobalDTClientesCorporativo(CveEmpresa As Integer) As DataTable
Get
Dim AppNombre As String = $"GlobalDTClientesCorporativo-{CveEmpresa}"
@@ -5492,7 +5546,7 @@ Public Class ClsPaginas
params.Add(New ReportParameter("RetIVA", Vta.RetIVA.ToString.FormatoNumero(2)))
params.Add(New ReportParameter("RetISR", Vta.RetISR.ToString.FormatoNumero(2)))
params.Add(New ReportParameter("Total", Vta.Total.ToString.FormatoNumero(2)))
- params.Add(New ReportParameter("ImporteLetra", Vta.Total.ToString.ToDouble.Texto2Letras(Vta.CveMoneda)))
+ params.Add(New ReportParameter("ImporteLetra", Vta.Total.ToString.ToDecimal.Texto2Letras(Vta.CveMoneda)))
'DATOS GENERALES
If UsuarioActual.CveEmpresa.Contiene(15) Then
@@ -6460,7 +6514,7 @@ Public Class ClsPaginas
params.Add(New ReportParameter("RetISR", ObjOC.RetISR.ToString.FormatoNumero(2)))
params.Add(New ReportParameter("IEPS", ObjOC.IEPS.ToString.FormatoNumero(2)))
params.Add(New ReportParameter("Total", ObjOC.Total.ToString))
- params.Add(New ReportParameter("ImporteLetra", (ObjOC.Total).ToString.ToDouble.Texto2Letras(ObjOC.CveMoneda)))
+ params.Add(New ReportParameter("ImporteLetra", (ObjOC.Total).ToString.ToDecimal.Texto2Letras(ObjOC.CveMoneda)))
params.Add(New ReportParameter("CorreoControl", If(drAut IsNot Nothing, drAut("Correo").ToString, "")))
params.Add(New ReportParameter("Moneda", ObjOC.Moneda))
params.Add(New ReportParameter("TipoCambio", TipoCambio))
@@ -6902,7 +6956,7 @@ Public Class ClsPaginas
RptParametro.Add(New ReportParameter("Total", If(indemnizacion, ajusteindemnizacion, ObjNomina.Total - ajusteindemnizacion).ToString()))
Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar()
cQr = CBB.GenerarCBBBytes(UsuarioActual.Empresa.RFC, ObjPersonal.RFC, ObjNomina.Total.ToString().ToDecimal(), FolioFiscal)
- RptParametro.Add(New ReportParameter("ImporteLetra", ObjNomina.Total.ToString.ToDouble.Texto2Letras))
+ RptParametro.Add(New ReportParameter("ImporteLetra", ObjNomina.Total.ToString.ToDecimal.Texto2Letras))
RptParametro.Add(New ReportParameter("Clave", "84111505"))
Else
TieneError = True
@@ -7217,7 +7271,7 @@ Public Class ClsPaginas
Dr("FormaDePagoP") = GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPagoSAT", $"ClaveFormaPagoSAT= '{Pagos.Attributes("FormaDePagoP").Value}'")
Dr("FechaPago") = Pagos.Attributes("FechaPago").Value
FechaRecibo = Pagos.Attributes("FechaPago").Value
- TotalLetra = Pagos.Attributes("Monto").Value.ToString.ToDouble.Texto2Letras(CveMoneda)
+ TotalLetra = Pagos.Attributes("Monto").Value.ToString.ToDecimal.Texto2Letras(CveMoneda)
DTConceptosPago.Rows.Add(Dr)
For Each Relacionado As XmlNode In Pagos.SelectNodes(String.Format("//{0}:DoctoRelacionado", PagoVersion), namespaces)
Dim DrRelacionado As DataRow = DTConceptosPagoRelacionado.NewRow
@@ -9340,11 +9394,11 @@ Public Class ClsPaginas
PaginaDict.Add("/Ventas/RepCancelacionesVentas.aspx".ToUpper(), 1325)
PaginaDict.Add("/Ventas/RepLineasAdicionales.aspx".ToUpper(), 1331)
PaginaDict.Add("/Ventas/RepLineasAdicionales.aspx?OP=OP".ToUpper(), 1332)
-
PaginaDict.Add("/Ventas/FacturacionAcarreos.aspx".ToUpper(), 784)
-
-
PaginaDict.Add("/Ventas/RepIndicadoresPorProyecto.aspx".ToUpper(), 617)
+ PaginaDict.Add("/Ventas/CatMedicos.aspx".ToUpper(), 1343)
+ PaginaDict.Add("/Ventas/CatProcedimientos.aspx".ToUpper(), 1344)
+ PaginaDict.Add("/Ventas/VentasMedicas.aspx".ToUpper(), 1345)
@@ -9410,8 +9464,13 @@ Public Class ClsPaginas
PaginaDict.Add("/Acumuladores/RepPolizasVirtuales.aspx".ToUpper(), 1322)
PaginaDict.Add("/Acumuladores/RepAcumuladoresVigencia.aspx".ToUpper(), 174)
+#End Region
+
+#Region "Transportes"
+ PaginaDict.Add("/Transportes/ContratoTransporte.aspx".ToUpper(), 598)
#End Region
'Antes de aquí.
+
Application("GlobalSIGAppPaginas") = PaginaDict
Else
PaginaDict = DirectCast(Application("GlobalSIGAppPaginas"), Hashtable)
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/ClsRH.vb b/App_Code/ClsRH.vb
index 5788f496d..0a5030349 100644
--- a/App_Code/ClsRH.vb
+++ b/App_Code/ClsRH.vb
@@ -7156,7 +7156,7 @@ Public Class ClsRH
End If
ListaTagsDocumentost.Add(New TagsDocumentos("{Sexo}", DtResultados(0)("Genero").ToString))
- Dim SalarioDiarioTag As String = DtResultados(0)("SalarioDiario").ToString.ToDouble.Texto2Letras()
+ Dim SalarioDiarioTag As String = DtResultados(0)("SalarioDiario").ToString.ToDecimal.Texto2Letras()
ListaTagsDocumentost.Add(New TagsDocumentos("{Sueldo}", DtResultados(0)("SalarioDiario").ToString.ToDouble.ToString("###,###,###.00")))
ListaTagsDocumentost.Add(New TagsDocumentos("{SueldoLetra}", SalarioDiarioTag))
ListaTagsDocumentost.Add(New TagsDocumentos("{Nacionalidad}", DtResultados(0)("ClaveSATPaisDescripcion").ToString))
diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb
index fa6c2089a..4c1bf4982 100644
--- a/App_Code/ClsVentas.vb
+++ b/App_Code/ClsVentas.vb
@@ -418,7 +418,9 @@ Public Class ClsVentas
Optional CveTipoAmortizacionAnticipo As Integer = -1, Optional CveVentaRelacion As Integer = -1, Optional ImporteRelacion As Decimal = -1, Optional CveEmpresaCRM As Integer = -1, Optional EsInterno As Integer = -1, Optional CveAcercamientoCRM As Integer = -1,
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 = "") As Boolean
+ 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 RequiereOS As Boolean = False
+ ) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_VentasAdd")
@@ -518,6 +520,13 @@ Public Class ClsVentas
.Add("@EsGarantia", SqlDbType.Bit).Value = EsGarantia
.Add("@CveLineaAdicional", SqlDbType.Int).Value = CveLineaAdicional
.Add("@DescripcionVenta", SqlDbType.VarChar).Value = DescripcionVenta
+
+ .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
'SqlTypes.SqlDateTime.Null
@@ -545,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")
@@ -579,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
@@ -1338,12 +1350,12 @@ Public Class ClsVentas
Return Retorno
End Function
- Public Function AddVentaDetalle(CveVenta As Integer, CvePS As Integer, Cantidad As Double, CveUnidadMedida As Integer, PU As Double, IVA As Double,
- Total As Double, Observaciones As String, Descuento As Double, TipoDescuento As Integer, CveSubProyecto As Integer,
+ Public Function AddVentaDetalle(CveVenta As Integer, CvePS As Integer, Cantidad As Decimal, CveUnidadMedida As Integer, PU As Decimal, IVA As Decimal,
+ Total As Decimal, Observaciones As String, Descuento As Decimal, TipoDescuento As Integer, CveSubProyecto As Integer,
CvePresupuestoIngreso As Integer, Optional TiempoEntrega As String = "", Optional CveVentaDetallePadre As Integer = -1,
- Optional CveContratoDetalle As Integer = -1, Optional PorcentajeIVA As Decimal = 0, Optional IEPS As Double = -1, Optional PorcentajeIEPS As Double = 0, Optional CvePromocionDetalle As Integer = -1,
- Optional CveMovimientoDetallePedido As Integer = -1, Optional ImporteRetIVA As Double = 0, Optional PorcentajeRetIVA As Double = 0,
- Optional ImporteRetISR As Double = 0, Optional PorcentajeRetISR As Double = 0, Optional CuentaPredial As String = "", Optional CvePrecioLista As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional NumTurnos As Decimal = 0D) As Boolean
+ Optional CveContratoDetalle As Integer = -1, Optional PorcentajeIVA As Decimal = 0, Optional IEPS As Decimal = -1, Optional PorcentajeIEPS As Double = 0, Optional CvePromocionDetalle As Integer = -1,
+ Optional CveMovimientoDetallePedido As Integer = -1, Optional ImporteRetIVA As Decimal = 0, Optional PorcentajeRetIVA As Double = 0,
+ Optional ImporteRetISR As Decimal = 0, Optional PorcentajeRetISR As Decimal = 0, Optional CuentaPredial As String = "", Optional CvePrecioLista As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional NumTurnos As Decimal = 0D) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_VentasDetalleAdd")
@@ -5939,6 +5951,214 @@ Public Class ClsVentas
+#Region "TIPO VENTA"
+
+ Public Function GetTipoVenta() As Boolean
+
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_Vta_TipoVentaGet")
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener los Tipos de Venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return Retorno
+
+ End Function
+
+#End Region
+
+#Region "AGENTES"
+
+ Public Function GetMedicos(CveMedico As Integer, CveEmpresa As Integer, Estatus As Integer) As Boolean
+
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_Vta_MedicosGet")
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveMedico", SqlDbType.Int).Value = CveMedico
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@Estatus", SqlDbType.Int).Value = Estatus
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener los Medicos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return Retorno
+
+ End Function
+
+
+
+
+ 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")
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CedulaProfesional", SqlDbType.VarChar).Value = CedulaProfesional
+ .Add("@Medico", SqlDbType.VarChar).Value = Medico
+ .Add("@FechaNacimiento", SqlDbType.Date).Value = FechaNacimiento
+ .Add("@Notas", SqlDbType.VarChar).Value = Notas
+ .Add("@DiasAtencion", SqlDbType.VarChar).Value = DiasAtencion
+ .Add("@Horario", SqlDbType.VarChar).Value = Horario
+ .Add("@Lugar", SqlDbType.VarChar).Value = Lugar
+ .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)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al guardar el Medico.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return Retorno
+
+ 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, Telefono As String, Mail As String, Especialidad As String) As Boolean
+
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_Vta_MedicosUpdate")
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveMedico", SqlDbType.Int).Value = CveMedico
+ .Add("@Medico", SqlDbType.VarChar).Value = Medico
+ .Add("@CedulaProfesional", SqlDbType.VarChar).Value = CedulaProfesional
+ .Add("@FechaNacimiento", SqlDbType.Date).Value = FechaNacimiento
+ .Add("@Notas", SqlDbType.VarChar).Value = Notas
+ .Add("@DiasAtencion", SqlDbType.VarChar).Value = DiasAtencion
+ .Add("@Horario", SqlDbType.VarChar).Value = Horario
+ .Add("@Lugar", SqlDbType.VarChar).Value = Lugar
+ .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)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al actualizar el Medico.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return Retorno
+
+ End Function
+
+ Public Function RemoveMedico(CveMedico As Integer, CveEmpresa As Integer) As Boolean
+
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_Vta_MedicosRemove")
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveMedico", SqlDbType.Int).Value = CveMedico
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al eliminar el Medico.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return Retorno
+
+ End Function
+
+#End Region
+#Region "PRODEDIMIENTOS"
+
+ Public Function GetProcedimientos(CveProcedimiento As Integer, CveEmpresa As Integer, Estatus As Integer) As Boolean
+
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_Vta_ProcedimientosGet")
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@Estatus", SqlDbType.Int).Value = Estatus
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener los Procedimientos .", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return Retorno
+
+ End Function
+
+ Public Function AddProcedimiento(Procedimiento As String, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
+
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_Vta_ProcedimientosAdd")
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@Procedimiento", SqlDbType.VarChar).Value = Procedimiento
+ .Add("@Estatus", SqlDbType.Int).Value = Estatus
+ .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al guardar el Procedimiento.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return Retorno
+
+ End Function
+
+ Public Function UpdateProcedimiento(CveProcedimiento As Integer, Procedimiento As String, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
+
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_Vta_ProcedimientosUpdate")
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
+ .Add("@Procedimiento", SqlDbType.VarChar).Value = Procedimiento
+ .Add("@Estatus", SqlDbType.Int).Value = Estatus
+ .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al actualizar el Procedimiento.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return Retorno
+
+ End Function
+
+ Public Function RemoveProcedimiento(CveProcedimiento As Integer, CveEmpresa As Integer) As Boolean
+
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_Vta_ProcedimientosRemove")
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al eliminar el Procedimiento.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return Retorno
+
+ End Function
+
+#End Region
+
#Region "IDisposable Support"
diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb
index 841e529e5..ff11bd35f 100644
--- a/App_Code/Modelos.vb
+++ b/App_Code/Modelos.vb
@@ -18,9 +18,9 @@ Namespace Modelos
Public Property ConceptoP As String
Public Property LabelValorP As String
Public Property CveConceptoP As Integer
- Public Property ImporteP As Double
- Public Property ImporteGravadoP As Double
- Public Property ValorP As Double
+ Public Property ImporteP As Decimal
+ Public Property ImporteGravadoP As Decimal
+ Public Property ValorP As Decimal
Public Property EstatusP As Integer
Public Property isSavedP As Integer
Public Property isEditedP As Integer
@@ -32,9 +32,9 @@ Namespace Modelos
Public Property ConceptoD As String
Public Property LabelValorD As String
Public Property CveConceptoD As Integer
- Public Property ImporteD As Double
- Public Property ImporteGravadoD As Double
- Public Property ValorD As Double
+ Public Property ImporteD As Decimal
+ Public Property ImporteGravadoD As Decimal
+ Public Property ValorD As Decimal
Public Property EstatusD As Integer
Public Property isSavedD As Integer
Public Property isEditedD As Integer
@@ -46,9 +46,9 @@ Namespace Modelos
Public Property ConceptoO As String
Public Property LabelValorO As String
Public Property CveConceptoO As Integer
- Public Property ImporteO As Double
- Public Property ImporteGravadoO As Double
- Public Property ValorO As Double
+ Public Property ImporteO As Decimal
+ Public Property ImporteGravadoO As Decimal
+ Public Property ValorO As Decimal
Public Property EstatusO As Integer
Public Property isEditedO As Integer
Public Property isOnlyBisibleO As Integer
@@ -548,50 +548,21 @@ Namespace Modelos
End Sub
Private Sub IniciaValores()
- Me.FolioFiscal = ""
- Me.CveContratoSecciones = ""
- Me.Version = "3.3"
+
If UsuarioActual IsNot Nothing Then
Me.CveUsuario = UsuarioActual.CveUsuario
Me.CveEmpresa = UsuarioActual.CveEmpresa
Me.UsuarioCreo = UsuarioActual.Usuario
End If
- Me.TipoCambio = 0
- Me.ConvertirPesos = False
+
Me.CveMoneda = 1
- Me.Moneda = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {CveMoneda} ")
- Me.MonedaSAT = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {CveMoneda} ")
- Me.RefDocto = ""
- ' Me.CveMesa = -1
+ Me.Moneda = "Pesos" 'ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {CveMoneda} ")
+ Me.MonedaSAT = "MXN" 'ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {CveMoneda} ")
+
Me.Fecha = ClsPaginas.NowADS()
- Me.CvePrePoliza = -1
Me.FechaPago = ClsPaginas.NowADS()
- Me.MotivoDescuento = ""
- Me.Observaciones = ""
Me.FechaEjecucion = ClsPaginas.NowADS()
- Me.CveCondicionEntrega = -1
- Me.CondicionEntrega = ""
- Me.NumeroCuenta = ""
- Me.CondicionesPago = 0
- Me.FormaPago = 0
- Me.PedidoContrato = ""
- Me.NumeroContrato = ""
- Me.DescripcionContrato = ""
- Me.CveCorte = -1
- Me.Alfa1 = ""
- Me.Alfa2 = ""
- Me.Alfa3 = ""
- Me.Descuento = 0
- Me.Amortizacion = 0
- Me.CveContrato = 0
- Me.SubTotal = 0
- Me.Descuento = 0
- Me.Amortizacion = 0
- Me.IVA = IVA
- Me.RetIVA = 0
- Me.RetISR = 0
- Me.IEPS = 0
- Me.CveAlmacenTraspasoOrigen = 0
+
End Sub
Private Sub IniciaValoresVentas(Optional EsCancelacion As Boolean = False)
If CveVenta > 0 AndAlso CveEmpresa > 0 Then
@@ -1289,10 +1260,10 @@ Namespace Modelos
ObjFactura.Version = "4.0"
ObjFactura.CveUsuario = UsuarioActual.CveUsuario
ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa
- ObjFactura.CveMoneda = CveMoneda
- ObjFactura.Moneda = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {ObjFactura.CveMoneda} ")
- ObjFactura.MonedaSAT = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {ObjFactura.CveMoneda}")
- ObjFactura.TipoCambio = If(ObjFactura.CveMoneda = 1, 1, ClsPaginas.GlobalTipoCambio(ClsPaginas.NowADS()).ToDecimal())
+ 'ObjFactura.CveMoneda = CveMoneda
+ 'ObjFactura.Moneda = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {ObjFactura.CveMoneda} ")
+ 'ObjFactura.MonedaSAT = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {ObjFactura.CveMoneda}")
+ 'ObjFactura.TipoCambio = If(ObjFactura.CveMoneda = 1, 1, ClsPaginas.GlobalTipoCambio(ClsPaginas.NowADS()).ToDecimal())
ObjFactura.TipoDocto = TipoDocto
ObjFactura.Folio = -1
ObjFactura.Serie = "-1"
@@ -1304,8 +1275,6 @@ Namespace Modelos
ObjFactura.FechaEjecucion = DateTime.Today
ObjFactura.UsuarioCreo = UsuarioActual.Usuario
ObjFactura.CondicionesPago = 0
-
-
ObjFactura.TipoDocumento = "Factura"
'Totales, Y se llena TmpDTImpuestos
@@ -1957,13 +1926,13 @@ Namespace Modelos
factura.DtDetalle = tmpcon
- Dim TotalSubTotal As Decimal = tmpcon.SUM("TotalImporte").ToDecimal
- Dim TotalDescuentos As Decimal = tmpcon.SUM("Descuento").ToDecimal
+ Dim TotalSubTotal As Decimal = tmpcon.SUM("TotalImporte")
+ Dim TotalDescuentos As Decimal = tmpcon.SUM("Descuento")
- Dim TotalIVA As Decimal = tmpcon.SUM("ImporteIVA").ToDecimal
- Dim TotalIEPS As Decimal = tmpcon.SUM("ImporteIEPS").ToDecimal
- Dim TotalRetIVA As Decimal = tmpcon.SUM("ImporteRetIVA").ToDecimal
- Dim TotalRetISR As Decimal = tmpcon.SUM("ImporteRetISR").ToDecimal
+ Dim TotalIVA As Decimal = tmpcon.SUM("ImporteIVA")
+ Dim TotalIEPS As Decimal = tmpcon.SUM("ImporteIEPS")
+ Dim TotalRetIVA As Decimal = tmpcon.SUM("ImporteRetIVA")
+ Dim TotalRetISR As Decimal = tmpcon.SUM("ImporteRetISR")
Dim Total As Decimal = 0
Dim TotalImpuestosLocales As Decimal = 0
Total = (TotalSubTotal - TotalDescuentos + TotalIVA + TotalIEPS - TotalRetIVA - TotalRetISR - TotalImpuestosLocales)
@@ -2219,14 +2188,14 @@ Namespace Modelos
'Se agregan los PS
For Each Row As DataRow In TmpDTDetalle.Rows
- If Not ObjVentas.AddVentaDetalle(ObjVentas.CveVenta, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("CveUM").ToString.ToEntero,
- Row("PU").ToString.ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("ImporteIVA").ToString.ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Math.Round((Row("Total").ToString.ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)) * (1 + Row("PorcentajeIVA").ToString.ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)))), 6),
- Row("Obs").ToString, Row("Descuento").ToString.ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("TipoDescuento").ToString.ToEntero, Row("CveSubProyecto").ToString.ToEntero, Row("CvePresupuestoIngreso").ToString.ToEntero,
+ If Not ObjVentas.AddVentaDetalle(ObjVentas.CveVenta, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDecimal, Row("CveUM").ToString.ToEntero,
+ Row("PU").ToString.ToDecimal(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("ImporteIVA").ToString.ToDecimal(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Math.Round((Row("Total").ToString.ToDecimal(If(factura.ConvertirPesos, factura.TipoCambio, 1)) * (1 + Row("PorcentajeIVA").ToString.ToDecimal(If(factura.ConvertirPesos, factura.TipoCambio, 1)))), 6),
+ Row("Obs").ToString, Row("Descuento").ToString.ToDecimal(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("TipoDescuento").ToString.ToEntero, Row("CveSubProyecto").ToString.ToEntero, Row("CvePresupuestoIngreso").ToString.ToEntero,
TiempoEntrega:=Row("TiempoEntrega").ToString, CveVentaDetallePadre:=Row("CveVentaDetalle").ToString.ToEntero, CveContratoDetalle:=Row("CveContratoDetalle").ToString.ToEntero,
CvePromocionDetalle:=If(DtPromociones IsNot Nothing, DtPromociones.FiltroPrimeroValor("CvePromocionDetalle", $"CvePS={Row("CvePS").ToString}").ToEntero, -1),
- IEPS:=Row("ImporteIEPS").ToString.ToDouble, CveMovimientoDetallePedido:=Row("CveMovimientoDetallePedido").ToString.ToEntero,
- ImporteRetIVA:=Row("ImporteRetIVA").ToString.ToDouble, ImporteRetISR:=Row("ImporteRetISR").ToString.ToDouble,
- PorcentajeIEPS:=Row("PorcentajeIEPS").ToString.ToDouble, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString.ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString.ToDouble, CuentaPredial:=Row("CuentaPredial").ToString,
+ IEPS:=Row("ImporteIEPS").ToString.ToDecimal, CveMovimientoDetallePedido:=Row("CveMovimientoDetallePedido").ToString.ToEntero,
+ ImporteRetIVA:=Row("ImporteRetIVA").ToString.ToDecimal, ImporteRetISR:=Row("ImporteRetISR").ToString.ToDecimal,
+ PorcentajeIEPS:=Row("PorcentajeIEPS").ToString.ToDecimal, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString.ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString.ToDecimal, CuentaPredial:=Row("CuentaPredial").ToString,
PorcentajeIVA:=Row("PorcentajeIVA").ToString.ToDecimal) Then
ErrorList.Add("Ocurrió un error al agregar un Producto o Servicio a la factura. Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
Exit For
@@ -4591,7 +4560,7 @@ Namespace Modelos
Next
If Not OcurrioError Then
- ValorInventario = (DtCostos.SUM("Total", "").ToDecimal).RoundSQL
+ ValorInventario = (DtCostos.SUM("Total", "")).RoundSQL
If Not ObjConta.AddPrePolizasDetalle(Me.CvePrePoliza, True, ValorInventario, ValorInventario, 68, Me.SerieFolio, Me.SerieFolio, CveVenta:=CveVenta, CveCliente:=Me.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, CveSubProyecto:=Me.CveSubProyecto) Then
OcurrioError = True
End If
@@ -7163,7 +7132,7 @@ Namespace Modelos
Public Property SubProyectoMatriz As Modelos.SubProyectoModel
'CFDi
- Public Property Version As String = ""
+ Public Property Version As String = "4.0"
Public Property Serie As String = ""
Public Property Folio As Integer = -1
@@ -7298,7 +7267,7 @@ Namespace Modelos
End Property
Public Property CveUsuario As Integer
Public Property SerieFolioPadre As String
- Public Property CveMoneda As Integer
+ Public Property CveMoneda As Integer = 1
Public Property Moneda As String
Public Property MonedaSAT As String
Public Property UsuarioCreo As String
@@ -7473,7 +7442,7 @@ Namespace Modelos
Public Property FechaPago As Date
Public Property CveNCaVincular As Integer
- Public Property FolioFiscal As String
+ Public Property FolioFiscal As String = ""
Public Property NoSerieCertificado As String
Public Property SelloCFDi As String = ""
Public Property SelloSAT As String = ""
@@ -7694,7 +7663,7 @@ Namespace Modelos
End Set
End Property
- Public Property CveContratoSecciones As String
+ Public Property CveContratoSecciones As String = ""
Public Property CveEstatus As Integer
Public Property GenerarPDFFactura As Boolean = False
#End Region
diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb
index 644e8ed38..f0f2001cf 100644
--- a/App_Code/modExtensiones.vb
+++ b/App_Code/modExtensiones.vb
@@ -275,8 +275,8 @@ Namespace Extensiones
Public Function GetTagValue(Obj As String, tag As String) As String
Try
- Dim Regex = New Regex($"<{tag}>(.*){tag}>")
- Dim match = Regex.Match(Obj)
+ Dim Regex As New Regex($"<{tag}>(.*){tag}>")
+ Dim match As RegularExpressions.Match = Regex.Match(Obj)
Return match.Groups(1).ToString()
Catch ex As Exception
Return ""
@@ -461,7 +461,7 @@ Namespace Extensiones
Dim Plus As String = ClsPaginas.NowADS().Ticks.ToString
Dim headerclas As String = ""
- Dim showalert = True
+ Dim showalert As Boolean = True
Mensaje = Mensaje.Replace("'"c, "\'").Replace(vbCrLf, "").Replace("""", "\'").Replace(vbLf, " ")
JSBtnAceptar = JSBtnAceptar.Replace("'"c, "\'")
Dim onEscape As String = ""
@@ -823,7 +823,7 @@ Namespace Extensiones
End Function
- Public Function Texto2Letras(ByVal Importe As Double, Optional CveMoneda As Integer = 1) As String
+ Public Function Texto2Letras(ByVal Importe As Decimal, Optional CveMoneda As Integer = 1) As String
Dim Moneda, AbrevMoneda As String
Select Case CveMoneda
Case 2 : Moneda = "Dólares" : AbrevMoneda = "USD"
@@ -1171,7 +1171,7 @@ Namespace Extensiones
Public Function FiltraPorIndices(dt As DataTable, Inicio As Integer, Fin As Integer) As DataTable
Dim TmpDt As DataTable = dt.Clone()
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
- For i = Inicio To Fin
+ For i As Integer = Inicio To Fin
Dim Row As DataRow = TmpDt.NewRow
Row.ItemArray = dt.Rows(i).ItemArray
TmpDt.Rows.Add(Row)
@@ -1215,7 +1215,7 @@ Namespace Extensiones
Dim Query As New StringBuilder
For Each groupitem As String In item
row(groupitem) = GroupRow(groupitem)
- Dim coltipo = TmpDt.Columns(groupitem).DataType.ToString().ToUpper
+ Dim coltipo As String = TmpDt.Columns(groupitem).DataType.ToString().ToUpper
If GroupRow.IsNull(groupitem) Then
Query.AppendFormat("{0} {1} IS NULL", prefix, groupitem)
Else
@@ -1264,7 +1264,7 @@ Namespace Extensiones
End If
If indexgrupo = 2 Then
Dim query2 As New StringBuilder
- Dim coltipo = TmpDt.Columns(item(0)).DataType.ToString().ToUpper
+ Dim coltipo As String = TmpDt.Columns(item(0)).DataType.ToString().ToUpper
If GroupRow.IsNull(item(0)) Then
query2.AppendFormat("{0} {1} IS NULL", "", item(0))
Else
@@ -1289,7 +1289,7 @@ Namespace Extensiones
Next
TmpDt.AcceptChanges()
indexgrupo -= 1
- For i = 1 To indexgrupo Step 1
+ For i As Integer = 1 To indexgrupo Step 1
order2.AppendFormat("GroupADS{0},", i)
Next
order2.Append("GroupADSType")
@@ -1417,8 +1417,8 @@ Namespace Extensiones
End Function
- Public Function SUM(DT As DataTable, Campo As String, Optional ByVal Filtro As String = "") As Double
- Return If(DT IsNot Nothing, DT.Compute(String.Format("SUM({0})", Campo), Filtro).ToString.ToDouble, 0)
+ Public Function SUM(DT As DataTable, Campo As String, Optional ByVal Filtro As String = "") As Decimal
+ Return If(DT IsNot Nothing, DT.Compute(String.Format("SUM({0})", Campo), Filtro).ToString.ToDecimal, 0)
End Function
Public Function SUMD(DT As DataTable, Campo As String, Optional ByVal Filtro As String = "") As Decimal
@@ -1713,7 +1713,7 @@ Namespace Extensiones
name = name.ToLower()
Dim headerCells As TableCellCollection = Nothing
If gv.Columns.Count > 0 Then
- For i = 0 To gv.Columns.Count - 1 'Si las columnas son autogeneradas, el número de columnas siempre es 0
+ For i As Integer = 0 To gv.Columns.Count - 1 'Si las columnas son autogeneradas, el número de columnas siempre es 0
Dim col = gv.Columns(i)
If TypeOf col Is BoundField Then
Dim field As BoundField = CType(col, BoundField)
@@ -1783,7 +1783,7 @@ Namespace Extensiones
Dim Folio, Observacion, UsuarioRegistro, TextoImporte, PagueseA, Ruta, Banco, NumCuenta, AbonoCuenta, SubProyecto, NotificarA, RefCrediproveedor As String
Dim FechaExpedicion As Date = ClsPaginas.NowADS()
- Dim Importe As Double
+ Dim Importe As Decimal
Dim tCveEmpresa As Integer = tEmpresa.CveEmpresa
Dim CveTipoTransaccion, CveProveedor, CvePersonal As Integer
Dim ObjIE As New ClsBancos()
@@ -1994,13 +1994,13 @@ Namespace Extensiones
Dim htw1 As New HtmlTextWriter(sw1)
GridView.RenderControl(htw1)
- Dim options = GemBox.Spreadsheet.LoadOptions.HtmlDefault
+ Dim options As HtmlLoadOptions = GemBox.Spreadsheet.LoadOptions.HtmlDefault
- Dim htmlStream1 = New MemoryStream(options.Encoding.GetBytes(sw1.ToString()))
+ Dim htmlStream1 As New MemoryStream(options.Encoding.GetBytes(sw1.ToString()))
htmlStream1.Position = 0
Dim sr1 As New StreamReader(htmlStream1)
- Dim myStr1 = sr1.ReadToEnd()
+ Dim myStr1 As String = sr1.ReadToEnd()
sr1.Dispose()
htmlStream1.Dispose()
sw1.Dispose()
@@ -2009,7 +2009,7 @@ Namespace Extensiones
HtmlCompleto = Regex.Replace(HtmlCompleto, "\<[\/]*a[^\>]*\>", "")
- Dim htmlStream5 = New MemoryStream(options.Encoding.GetBytes(HtmlCompleto))
+ Dim htmlStream5 As New MemoryStream(options.Encoding.GetBytes(HtmlCompleto))
GemBox.Spreadsheet.SpreadsheetInfo.SetLicense(SerialGemBoxSpreadsheet)
@@ -2023,13 +2023,13 @@ Namespace Extensiones
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)
If celdasConTexto Is Nothing Then Exit Sub 'No se recuperaron datos, salir de sin guardar porque soltará error
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
@@ -2038,7 +2038,7 @@ Namespace Extensiones
RangoNombreEmpresa.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
@@ -2047,7 +2047,7 @@ Namespace Extensiones
RangoTitulo.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
If DatoTituloExtra.Length > 0 Then
- Dim RangoDatoTituloExtra = worksheet.Cells.GetSubrangeAbsolute(TotalRowHeader, celdasConTexto.FirstColumnIndex, TotalRowHeader, celdasConTexto.LastColumnIndex)
+ Dim RangoDatoTituloExtra As CellRange = worksheet.Cells.GetSubrangeAbsolute(TotalRowHeader, celdasConTexto.FirstColumnIndex, TotalRowHeader, celdasConTexto.LastColumnIndex)
RangoDatoTituloExtra.Merged = True
RangoDatoTituloExtra.Value = DatoTituloExtra
RangoDatoTituloExtra.Style.Font.Size = 20 * 20
@@ -2062,7 +2062,7 @@ Namespace Extensiones
Dim Arreglo As String() = DatosFiltros.Split("|"c)
worksheet.Rows.InsertEmpty(TotalRowHeader, Arreglo.Count)
For Each TextoFiltro As String In Arreglo
- Dim RangoDatoTituloExtra = worksheet.Cells.GetSubrangeAbsolute(TotalRowHeader, celdasConTexto.FirstColumnIndex, TotalRowHeader, celdasConTexto.LastColumnIndex)
+ Dim RangoDatoTituloExtra As CellRange = worksheet.Cells.GetSubrangeAbsolute(TotalRowHeader, celdasConTexto.FirstColumnIndex, TotalRowHeader, celdasConTexto.LastColumnIndex)
RangoDatoTituloExtra.Merged = True
RangoDatoTituloExtra.Value = TextoFiltro
RangoDatoTituloExtra.Style.Font.Size = 12 * 20
@@ -2076,7 +2076,7 @@ Namespace Extensiones
' TotalRowHeader += 2
- For i = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex
+ For i As Integer = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex
worksheet.Rows(TotalRowHeader).Cells(i).Style.Font.Size = 12 * 20
worksheet.Rows(TotalRowHeader).Cells(i).Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
@@ -2114,21 +2114,18 @@ Namespace Extensiones
End If
- For I = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex
+ For I As Integer = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex
If I > 0 Then
-
If 1 = 1 Then
worksheet.Columns(I + 1).Style.NumberFormat = "#,##0.00"
Else
worksheet.Columns(I + 1).Style.NumberFormat = "#,##"
End If
-
Try
worksheet.Columns(I).AutoFit(1)
Catch ex As Exception
End Try
-
End If
Next
@@ -2148,8 +2145,8 @@ Namespace Extensiones
'excel.Worksheets.Add(NombreTabla)
- Dim workbookDTExtra = New ExcelFile
- Dim worksheetDTExtra = workbookDTExtra.Worksheets.Add(NombreTabla)
+ Dim workbookDTExtra As New ExcelFile
+ Dim worksheetDTExtra As ExcelWorksheet = workbookDTExtra.Worksheets.Add(NombreTabla)
worksheetDTExtra.InsertDataTable(DTExtra,
@@ -2161,7 +2158,7 @@ Namespace Extensiones
- Dim columnCount = worksheetDTExtra.CalculateMaxUsedColumns()
+ Dim columnCount As Integer = worksheetDTExtra.CalculateMaxUsedColumns()
For i As Integer = 0 To columnCount - 1
worksheetDTExtra.Columns(i).AutoFit(1, worksheetDTExtra.Rows(1), worksheetDTExtra.Rows(worksheetDTExtra.Rows.Count - 1))
worksheetDTExtra.Cells(0, i).Style.FillPattern.SetSolid(Drawing.ColorTranslator.FromHtml("#4b77be"))
@@ -2370,21 +2367,21 @@ Namespace Extensiones
GemBox.Spreadsheet.SpreadsheetInfo.SetLicense(SerialGemBoxSpreadsheet)
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.Name = ValidFileName(NombreArchivoXLSx, 31)
worksheet.Rows.InsertEmpty(0, TotalRowHeader)
- Dim celdasConTexto = worksheet.GetUsedCellRange(True)
+ Dim celdasConTexto As CellRange = worksheet.GetUsedCellRange(True)
celdasConTexto.Style.Font.Name = "Calibri Light"
celdasConTexto.Style.Borders = Nothing
- 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
@@ -2392,7 +2389,7 @@ Namespace Extensiones
RangoNombreEmpresa.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
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
@@ -2400,7 +2397,7 @@ Namespace Extensiones
RangoFiltros.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Left
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
@@ -2408,7 +2405,7 @@ Namespace Extensiones
RangoTitulo.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
RangoTitulo.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
- Dim RangoColTitulos = worksheet.Cells.GetSubrangeAbsolute(8, celdasConTexto.FirstColumnIndex, 8, celdasConTexto.LastColumnIndex)
+ Dim RangoColTitulos As CellRange = worksheet.Cells.GetSubrangeAbsolute(8, celdasConTexto.FirstColumnIndex, 8, celdasConTexto.LastColumnIndex)
RangoColTitulos.Style.Font.Size = 12 * 20
RangoColTitulos.Style.Font.Name = "Calibri"
RangoColTitulos.Style.Font.Weight = GemBox.Spreadsheet.ExcelFont.BoldWeight
@@ -2417,7 +2414,7 @@ Namespace Extensiones
RangoColTitulos.Style.FillPattern.SetSolid(GemBox.Spreadsheet.SpreadsheetColor.FromArgb(75, 119, 190))
RangoColTitulos.Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)
- For i = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex
+ For i As Integer = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex
Try
worksheet.Columns(i).AutoFit(0.95)
Catch ex As Exception
@@ -2457,7 +2454,7 @@ Namespace Extensiones
If Dt.TableName Is Nothing Then Dt.TableName = NombreArchivoXLSx
Dim excel As New GemBox.Spreadsheet.ExcelFile
- Dim item = excel.Worksheets.Add(ValidFileName(Dt.TableName, 31))
+ Dim item As ExcelWorksheet = excel.Worksheets.Add(ValidFileName(Dt.TableName, 31))
item.InsertDataTable(Dt, New InsertDataTableOptions() With
{
@@ -2470,14 +2467,14 @@ Namespace Extensiones
Dim TotalRowHeader As Integer = 8
Dim TotalRowFooter As Integer = 2
- Dim worksheet = excel.Worksheets(0)
+ Dim worksheet As ExcelWorksheet = excel.Worksheets(0)
'worksheet.Name = ValidFileName(NombreArchivoXLSx, 31)
worksheet.Rows.InsertEmpty(0, TotalRowHeader)
- Dim celdasConTexto = worksheet.GetUsedCellRange(True)
+ Dim celdasConTexto As CellRange = worksheet.GetUsedCellRange(True)
celdasConTexto.Style.Font.Name = "Calibri Light"
celdasConTexto.Style.Borders = Nothing
- 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
@@ -2485,7 +2482,7 @@ Namespace Extensiones
RangoNombreEmpresa.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
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
@@ -2493,7 +2490,7 @@ Namespace Extensiones
RangoFiltros.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Left
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
@@ -2501,7 +2498,7 @@ Namespace Extensiones
RangoTitulo.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
RangoTitulo.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
- Dim RangoColTitulos = worksheet.Cells.GetSubrangeAbsolute(8, celdasConTexto.FirstColumnIndex, 8, celdasConTexto.LastColumnIndex)
+ Dim RangoColTitulos As CellRange = worksheet.Cells.GetSubrangeAbsolute(8, celdasConTexto.FirstColumnIndex, 8, celdasConTexto.LastColumnIndex)
RangoColTitulos.Style.Font.Size = 12 * 20
RangoColTitulos.Style.Font.Name = "Calibri"
RangoColTitulos.Style.Font.Weight = GemBox.Spreadsheet.ExcelFont.BoldWeight
@@ -2510,7 +2507,7 @@ Namespace Extensiones
RangoColTitulos.Style.FillPattern.SetSolid(GemBox.Spreadsheet.SpreadsheetColor.FromArgb(75, 119, 190))
RangoColTitulos.Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)
- For i = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex
+ For i As Integer = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex
Try
worksheet.Columns(i).AutoFit(0.95)
Catch ex As Exception
@@ -2864,21 +2861,21 @@ Namespace Extensiones
Dim pdfDoc As New PdfDocument(New PdfWriter(HttpContext.Current.Response.OutputStream))
Dim document As New Document(pdfDoc, PageSize.A4)
document.SetMargins(10.0F, 10.0F, 0.0F, 10.0F)
- Dim request = HttpContext.Current.Request
- Dim baseUrl = request.Url.OriginalString.Replace(request.Url.PathAndQuery, "") + request.ApplicationPath
+ Dim request As HttpRequest = HttpContext.Current.Request
+ Dim baseUrl As String = request.Url.OriginalString.Replace(request.Url.PathAndQuery, "") + request.ApplicationPath
Dim properties As New ConverterProperties()
properties.SetBaseUri(baseUrl) 'Se tiene que usar la URL en vez del BaseDirectory para que cargue correctamente los StyleBundle que son paths virtuales en el servidor
properties.SetFontProvider(New DefaultFontProvider(True, False, False))
'SECCIÓN ENCABEZADO REPORTE
- Dim table = New Element.Table(UnitValue.CreatePercentArray(New Single() {10, 50, 40})).UseAllAvailableWidth()
+ Dim table As Element.Table = New Element.Table(UnitValue.CreatePercentArray(New Single() {10, 50, 40})).UseAllAvailableWidth()
Dim Imagen As New FileInfo(String.Format("{0}/Logo.png", usuario.Empresa.Ruta))
If Imagen.Exists Then
Dim Ruta As String = String.Format("{0}/Logo.png", usuario.Empresa.Ruta)
Using sr As New StreamReader(Ruta)
Dim ms As New MemoryStream()
sr.BaseStream.CopyTo(ms)
- Dim logo = New Element.Image(iText.IO.Image.ImageDataFactory.Create(Imagen.FullName))
+ Dim logo As New Element.Image(iText.IO.Image.ImageDataFactory.Create(Imagen.FullName))
table.AddCell(New Element.Cell(2, 1).Add(logo.SetAutoScale(True)).SetVerticalAlignment(VerticalAlignment.MIDDLE))
End Using
Else
@@ -2973,13 +2970,13 @@ Namespace Extensiones
Public Function ToBase64Encode(ByVal plainText As String) As String
- Dim plainTextBytes = System.Text.Encoding.UTF8.GetBytes(plainText)
+ Dim plainTextBytes As Byte() = System.Text.Encoding.UTF8.GetBytes(plainText)
Return System.Convert.ToBase64String(plainTextBytes)
End Function
Public Function ToBase64Decode(ByVal base64EncodedData As String) As String
- Dim base64EncodedBytes = System.Convert.FromBase64String(base64EncodedData)
+ Dim base64EncodedBytes As Byte() = System.Convert.FromBase64String(base64EncodedData)
Return System.Text.Encoding.UTF8.GetString(base64EncodedBytes)
End Function
Public Function DecriptaConexion() As String
@@ -3169,7 +3166,7 @@ Namespace Extensiones
End Function
Public Function EncodeGeocerca(GeoCerca As String) As String
- Dim Str = New StringBuilder
+ Dim Str As New StringBuilder
Dim PrimerSplit As Boolean = True
GeoCerca = GeoCerca.Replace("POLYGON ((", "").Replace("))", "")
Dim S() As String = GeoCerca.Split(","c)
@@ -3186,7 +3183,7 @@ Namespace Extensiones
End Function
Public Function Encode(lats As Double, lngs As Double) As String
- Dim str = New StringBuilder()
+ Dim str As New StringBuilder()
Dim encodeDiff = DirectCast(Function(diff) As Integer
Dim shifted As Integer = diff << 1
If diff < 0 Then
@@ -3212,7 +3209,7 @@ Namespace Extensiones
End Function
Public Function EncodeGeocercaString(GeoCerca As String) As String
- Dim Str = New StringBuilder
+ Dim Str As New StringBuilder
Dim PrimerSplit As Boolean = True
GeoCerca = GeoCerca.Replace("POLYGON ((", "").Replace("))", "")
Dim S() As String = GeoCerca.Split(","c)
diff --git a/Ashx/CargaEventos.ashx b/Ashx/CargaEventos.ashx
index d40007c3b..91874be2f 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"}
@@ -117,6 +121,8 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
Dim ColorIndex As Integer = 0
+
+
If DtTempSubproyectos.Rows.Count > 0 Then
For Each drow As DataRow In DtTempSubproyectos.Rows
@@ -138,11 +144,13 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
End If
+
+
Dim EsCoordinador As Boolean = False
+ Dim usuarioActual_ As Usuario = UsuarioActual(context)
If context IsNot Nothing AndAlso CveOS = -2 Then
- Dim usuario As Usuario = UsuarioActual(context)
- If usuario.TienePermisoProceso(348) Then
+ If usuarioActual_.TienePermisoProceso(348) Then
EsCoordinador = True
End If
End If
@@ -234,6 +242,29 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
cevent.backgroundColor = If(cevent.backgroundColor.Trim = "", "#1BBC9B", cevent.backgroundColor.Trim)
End If
+
+ If usuarioActual_.Empresa.Funcionalidad(578) = "1" Then
+
+ Dim colorString As String = dr("BackgroundColorOS").ToString.Trim
+
+ If colorString.Length > 0 AndAlso IsValidHtmlColor(colorString) Then
+ cevent.backgroundColor = $"#{colorString}"
+ Else
+ 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
If Not cevent.recurrenciatipo > 0 Then
@@ -406,5 +437,16 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
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
\ No newline at end of file
+
+End Class
diff --git a/Ashx/E119.ashx b/Ashx/E119.ashx
index 8a967d3cf..24e9e93bf 100644
--- a/Ashx/E119.ashx
+++ b/Ashx/E119.ashx
@@ -142,9 +142,12 @@ Public Class E119 : Implements IHttpHandler
Catch ex As Exception
context.Response.ContentType = "text/html"
- retorno = ex.ToString()
- ex.GuardaLog(ex.ToString())
+ Dim respuesta As New AuthMessage
+ respuesta.ErrorMessage = New ResponseMsgError() With {.message = "La solicitud no se pudo procesar."}
+ respuesta.IsSucces = False
+ respuesta.StatusCode = 200
+ retorno = JsonConvert.SerializeObject(respuesta.ErrorMessage)
context.Response.Write(retorno)
End Try
End Sub
@@ -343,154 +346,141 @@ Public Class E119 : Implements IHttpHandler
If JsonRequest Is Nothing Then
TieneError = True
End If
+ Else
+ TieneError = True
End If
End Using
End If
If TieneError Then
+ RespuestaError.message = "No se pudo procesar la solicitud - Formato mal formado"
context.Response.StatusCode = 200
- Return JsonConvert.SerializeObject("xx")
+ Return JsonConvert.SerializeObject(RespuestaError)
+
End If
If Not TieneError Then
Dim Usuario As Usuario = ValidaUsuarioSistema(100, CveEmpresa)
- Dim ObjFactura As Modelos.Factura
+ Dim ObjFactura As Modelos.Factura = Nothing
Dim Resp As New Modelos.Factura.MMensajeFactura
If Usuario IsNot Nothing Then
- End If
-
- Dim ObjClientes As New ClsClientes()
- Dim ObjInventario As New ClsInventarios(ObjClientes.IniciaTransacSQL())
-
- Dim CveSubProyecto, CveCliente, CveMoneda, CvePS As Integer
- Dim Cantidad, PU, Descuento As Decimal
- Dim Obs As String = ""
- CveSubProyecto = 12659 ' fijo Ecommerce
- CveCliente = 0
- CveMoneda = 1
- Descuento = 0
- Dim RFC As String = If(JsonRequest("billing") Is Nothing, "", JsonRequest("billing")("first_name").ToString())
- Dim NombreCliente As String = If(JsonRequest("billing") Is Nothing, "", JsonRequest("billing")("first_name").ToString() & " " & JsonRequest("billing")("last_name").ToString())
- 'BUSCAR SI ESTÁ REGISTRADO EL CLIENTE
- If ObjClientes.GetClientes(-1, "-1", "-1", "-1", RFC, "-1", "-1", -1, CveEmpresa, 1, TipoCliente:=-1, TopSelect:=1) Then
- If ObjClientes.DtResultados.Rows.Count > 0 Then
- 'Resp.TieneError = False
- CveCliente = ObjClientes.CveCliente
- 'Resp.Mensajes.Add("El RFC ya existe en el sistema")
+ Dim ObjClientes As New ClsClientes()
+ Dim ObjInventario As New ClsInventarios(ObjClientes.IniciaTransacSQL())
+ Dim CveSubProyecto, CveCliente, CveMoneda, CvePS As Integer
+ Dim Cantidad, PU, Descuento As Decimal
+ Dim Obs As String = ""
+ CveSubProyecto = 12659 ' fijo Ecommerce
+ CveCliente = 0
+ CveMoneda = 1
+ Descuento = 0
+ Dim RFC As String = If(JsonRequest("billing") Is Nothing, "", JsonRequest("billing")("first_name").ToString())
+ Dim NombreCliente As String = If(JsonRequest("billing") Is Nothing, "", JsonRequest("billing")("first_name").ToString() & " " & JsonRequest("billing")("last_name").ToString())
+ 'BUSCAR SI ESTÁ REGISTRADO EL CLIENTE
+ If ObjClientes.GetClientes(-1, "-1", "-1", "-1", RFC, "-1", "-1", -1, CveEmpresa, 1, TipoCliente:=-1, TopSelect:=1) Then
+ If ObjClientes.DtResultados.Rows.Count > 0 Then
+ 'Resp.TieneError = False
+ CveCliente = ObjClientes.CveCliente
+ 'Resp.Mensajes.Add("El RFC ya existe en el sistema")
+ End If
End If
- End If
- If CveCliente = 0 Then
- ' 'DATOS DE BILLING
- If JsonRequest("billing") IsNot Nothing Then
- Dim CveEstado As Integer = -1
- Dim Direccion As String = If(JsonRequest("billing")("address_1") Is Nothing, "", JsonRequest("billing")("address_1").ToString())
- Dim NumExt As String = ""
- Dim NumInt As String = ""
- Dim Colonia As String = ""
- Dim Ciudad As String = If(JsonRequest("billing")("city") Is Nothing, "", JsonRequest("billing")("city").ToString())
- Dim Localidad As String = If(JsonRequest("billing")("city") Is Nothing, "", JsonRequest("billing")("city").ToString())
- Dim CP As String = If(JsonRequest("billing")("postcode") Is Nothing, "", JsonRequest("billing")("postcode").ToString())
- Dim Telefono As String = If(JsonRequest("billing")("phone") Is Nothing, "", JsonRequest("billing")("phone").ToString())
- Dim Correo As String = If(JsonRequest("billing")("email") Is Nothing, "", JsonRequest("billing")("email").ToString())
- Dim Estado As String = If(JsonRequest("billing")("state") Is Nothing, "", JsonRequest("billing")("state").ToString())
- If Not String.IsNullOrEmpty(Estado) Then
- CveEstado = ClsPaginas.GlobalDTGralEstados("MEX").FiltroPrimeroValor("CveEstado", $"NombreEstado = '{Estado.Trim}'").ToEntero()
- If CveEstado <= 0 Then 'SI NO ENCUENTRA EL ESTADO INGRESA EL DE SONORA
+ If CveCliente = 0 Then
+ ' 'DATOS DE BILLING
+ If JsonRequest("billing") IsNot Nothing Then
+ Dim CveEstado As Integer = -1
+ Dim Direccion As String = If(JsonRequest("billing")("address_1") Is Nothing, "", JsonRequest("billing")("address_1").ToString())
+ Dim NumExt As String = ""
+ Dim NumInt As String = ""
+ Dim Colonia As String = ""
+ Dim Ciudad As String = If(JsonRequest("billing")("city") Is Nothing, "", JsonRequest("billing")("city").ToString())
+ Dim Localidad As String = If(JsonRequest("billing")("city") Is Nothing, "", JsonRequest("billing")("city").ToString())
+ Dim CP As String = If(JsonRequest("billing")("postcode") Is Nothing, "", JsonRequest("billing")("postcode").ToString())
+ Dim Telefono As String = If(JsonRequest("billing")("phone") Is Nothing, "", JsonRequest("billing")("phone").ToString())
+ Dim Correo As String = If(JsonRequest("billing")("email") Is Nothing, "", JsonRequest("billing")("email").ToString())
+ Dim Estado As String = If(JsonRequest("billing")("state") Is Nothing, "", JsonRequest("billing")("state").ToString())
+ If Not String.IsNullOrEmpty(Estado) Then
+ CveEstado = ClsPaginas.GlobalDTGralEstados("MEX").FiltroPrimeroValor("CveEstado", $"NombreEstado = '{Estado.Trim}'").ToEntero()
+ If CveEstado <= 0 Then 'SI NO ENCUENTRA EL ESTADO INGRESA EL DE SONORA
+ CveEstado = 26
+ End If
+ Else
CveEstado = 26
End If
- Else
- CveEstado = 26
- End If
- If ObjClientes.AgregarClienteNoFrecuente(NombreCliente, Direccion, NumExt, NumInt, Colonia, Localidad, Ciudad, CveEstado, RFC, CP, Telefono, Correo, CveSubProyecto, CveUsuario, CveEmpresa, "", -1, -1) Then
- If ObjClientes.DtResultados.Rows.Count > 0 Then
- CveCliente = ObjClientes.DtResultados(0)("CveCliente").ToString().ToEntero()
+ If ObjClientes.AgregarClienteNoFrecuente(NombreCliente, Direccion, NumExt, NumInt, Colonia, Localidad, Ciudad, CveEstado, RFC, CP, Telefono, Correo, CveSubProyecto, CveUsuario, CveEmpresa, "", -1, -1) Then
+ If ObjClientes.DtResultados.Rows.Count > 0 Then
+ CveCliente = ObjClientes.DtResultados(0)("CveCliente").ToString().ToEntero()
+ End If
End If
End If
+
End If
- End If
+ Try
- Try
+ ObjFactura = Modelos.Factura.CrearVentaNueva(Usuario, CveSubProyecto, CveCliente, CveMoneda, "Rem")
+ Dim ListaPS As JArray = JArray.Parse(JsonRequest("line_items").ToString())
+ Dim Consec As Integer = 1
+ For Each JsonPS As JObject In ListaPS
+ Cantidad = JsonPS("quantity").ToString.ToDecimal()
+ PU = JsonPS("price").ToString.ToDecimal()
+ CvePS = ClsPaginas.GlobalDTPSSimplificado(CveEmpresa, Codigo:=JsonPS("sku").ToString()).FiltroPrimeroValor("CvePS").ToEntero()
- ObjFactura = Modelos.Factura.CrearVentaNueva(Usuario, CveSubProyecto, CveCliente, CveMoneda, "Rem")
- Dim ListaPS As JArray = JArray.Parse(JsonRequest("line_items").ToString())
- Dim Consec As Integer = 1
- For Each JsonPS As JObject In ListaPS
- Cantidad = JsonPS("quantity").ToString.ToDecimal()
- PU = JsonPS("price").ToString.ToDecimal()
- CvePS = ClsPaginas.GlobalDTPSSimplificado(CveEmpresa, Codigo:=JsonPS("sku").ToString()).FiltroPrimeroValor("CvePS").ToEntero()
+ ObjFactura.AgregarPS(CvePS, Cantidad, PU, Descuento, Obs, CveSubProyecto:=CveSubProyecto)
- ObjFactura.AgregarPS(CvePS, Cantidad, PU, Descuento, Obs, CveSubProyecto:=CveSubProyecto)
-
- ''VALIDAR QUE SEA EL MISMO PRODUCTO
- If CvePS <= 0 Then
- TieneError = True
- 'Retorno.Mensajes.Add(String.Format("No se encontró el producto: {0}", JsonPS("name").ToString()))
- Exit For
- End If
-
- ''VALIDA EXISTENCIA ANTES DE GENERAR LA FACTURA
- 'If ObjFactura.TipoDocto = "Ing" AndAlso DrPS("CveTipoPS").ToString() = "2" Then
- ' Dim Existencia As Decimal = ObjInventarios.GetExistenciasPS(DrPS("CvePS").ToString.ToEntero, DrPS("CveUnidadMedida").ToString.ToEntero, UsuarioActual.CveEmpresa, ObjFactura.CveAlmacen, CveSubProyecto:=ObjFactura.CveSubProyecto, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), ExcluyeAdelantado:=1, PendientePorSurtir:=1, RestringirAlmacenes:=1, ExcluyeApartados:=-1)
-
- ' If Cantidad > Existencia Then
- ' Retorno.TieneError = True
- ' Retorno.Mensajes.Add(String.Format("No hay existencia suficiente para este producto: {0}, cuenta con : {1}", DrPS("PSCodigo").ToString(), Existencia))
- ' Exit For
- ' End If
- 'End If
- Consec += 1
- Next
+ ''VALIDAR QUE SEA EL MISMO PRODUCTO
+ If CvePS <= 0 Then
+ TieneError = True
+ 'Retorno.Mensajes.Add(String.Format("No se encontró el producto: {0}", JsonPS("name").ToString()))
+ Exit For
+ End If
+ Consec += 1
+ Next
- ObjFactura.CalculaTotales()
+ ObjFactura.CalculaTotales()
- If ObjFactura IsNot Nothing Then
- Resp = ObjFactura.EmitirFactura(False, Transac:=ObjClientes.IniciaTransacSQL())
+ If ObjFactura IsNot Nothing Then
+ Resp = ObjFactura.EmitirFactura(False, Transac:=ObjClientes.IniciaTransacSQL())
- If Resp.CveVenta > 0 Then
- Respuesta.status = "success"
- Respuesta.data = Resp.SerieFolio
+ If Resp.CveVenta > 0 Then
+ Respuesta.status = "success"
+ Respuesta.data = Resp.SerieFolio
+ Else
+ TieneError = True
+ End If
+
+ If TieneError Then
+ Dim sb As New StringBuilder()
+ For Each msg As String In Resp.Mensajes
+ sb.AppendFormat("{0}. ", msg)
+ Next
+ RespuestaError.message = sb.ToString()
+ End If
Else
TieneError = True
- End If
-
- If TieneError Then
Dim sb As New StringBuilder()
For Each msg As String In Resp.Mensajes
sb.AppendFormat("{0}. ", msg)
Next
RespuestaError.message = sb.ToString()
End If
- Else
+
+ Catch ex As Exception
TieneError = True
- Dim sb As New StringBuilder()
- For Each msg As String In Resp.Mensajes
- sb.AppendFormat("{0}. ", msg)
- Next
- RespuestaError.message = sb.ToString()
+ End Try
+
+ If TieneError Then
+ ObjClientes.RollBack()
+ ObjClientes.Dispose()
+ ObjInventario.Dispose()
+ Else
+ ObjClientes.Commit()
+ ObjClientes.Dispose()
+ ObjInventario.Dispose()
End If
-
- Catch ex As Exception
- TieneError = True
- End Try
-
- If TieneError Then
- ObjClientes.RollBack()
- ObjClientes.Dispose()
- ObjInventario.Dispose()
- Else
- ObjClientes.Commit()
- ObjClientes.Dispose()
- ObjInventario.Dispose()
-
+ If ObjFactura IsNot Nothing Then ObjFactura.Dispose()
End If
-
- If ObjFactura IsNot Nothing Then ObjFactura.Dispose()
- 'End If
-
End If
If TieneError Then
diff --git a/Ashx/SIGFacturacion.ashx b/Ashx/SIGFacturacion.ashx
index 70cfe6ec9..f223e5237 100644
--- a/Ashx/SIGFacturacion.ashx
+++ b/Ashx/SIGFacturacion.ashx
@@ -63,7 +63,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
'EnviarCorreoFactura(New Modelos.Factura(Usuario, 844966, 1, context.ModExtensiones.DirectorioBaseEmpresas), Usuario)
If String.IsNullOrEmpty(pFechaI) AndAlso String.IsNullOrEmpty(pFechaF) Then
- Dim FechaReferencia = ClsPaginas.NowADS()
+ Dim FechaReferencia As Date = ClsPaginas.NowADS()
If FechaReferencia.DayOfWeek = DayOfWeek.Sunday Then
Dim Sabado = FechaReferencia.AddDays(-1)
Dim DomingoAnterior = FechaReferencia.AddDays(-7)
@@ -273,7 +273,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
End If
ObjFolios.Dispose()
- Dim ObjFactura = New Modelos.Factura(UsuarioActual)
+ Dim ObjFactura As New Modelos.Factura(UsuarioActual)
ObjFactura.TipoMensajeRespuesta = Modelos.TipoMensajeRespuesta.TextoLimpio
ObjFactura.Serie = Serie
ObjFactura.Folio = Folio.ToEntero()
@@ -361,12 +361,12 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
ObjFactura.DtRemisionesPS = DTRemisionesPS
- Dim TotalImporte As Decimal = ObjFactura.DtDetalle.SUM("TotalImporte").ToDecimal()
- Dim ImporteIVA As Decimal = ObjFactura.DtDetalle.SUM("ImporteIVA").ToDecimal()
- Dim ImporteRetIVA As Decimal = ObjFactura.DtDetalle.SUM("ImporteRetIVA").ToDecimal()
- Dim ImporteRetISR As Decimal = ObjFactura.DtDetalle.SUM("ImporteRetISR").ToDecimal()
- Dim ImporteIEPS As Decimal = ObjFactura.DtDetalle.SUM("ImporteIEPS").ToDecimal()
- Dim Descuento As Decimal = ObjFactura.DtDetalle.SUM("Descuento").ToDecimal()
+ Dim TotalImporte As Decimal = ObjFactura.DtDetalle.SUM("TotalImporte")
+ Dim ImporteIVA As Decimal = ObjFactura.DtDetalle.SUM("ImporteIVA")
+ Dim ImporteRetIVA As Decimal = ObjFactura.DtDetalle.SUM("ImporteRetIVA")
+ Dim ImporteRetISR As Decimal = ObjFactura.DtDetalle.SUM("ImporteRetISR")
+ Dim ImporteIEPS As Decimal = ObjFactura.DtDetalle.SUM("ImporteIEPS")
+ Dim Descuento As Decimal = ObjFactura.DtDetalle.SUM("Descuento")
Dim Amortizacion As Decimal = 0
Dim Total As Decimal = (TotalImporte + ImporteIVA + ImporteIEPS) - (ImporteRetIVA + ImporteRetISR + Descuento + Amortizacion)
@@ -530,7 +530,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
Return Timbre
End Function
Private Function CreaDTDetalle(ByRef Retorno As Modelos.Factura.MMensajeFactura, UsuarioActual As Usuario, DtRemisionesPS As DataTable) As DataTable
- Dim TmpDT = New DataTable
+ Dim TmpDT As New DataTable
TmpDT.Columns.Add("CveVenta", GetType(Integer))
TmpDT.Columns.Add("Consec", GetType(Integer))
TmpDT.Columns.Add("Cantidad", GetType(Decimal))
@@ -770,9 +770,9 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
Dim Url = New Uri(String.Format("{0}Compras/PopUpVerFactura.aspx?P={1}", ClsPaginas.UrlSitio, Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta))))
Dim File As Byte() = Nothing
Try
- Using httpClient = New HttpClient()
+ Using httpClient As New HttpClient()
httpClient.Timeout = New TimeSpan(0, 15, 0)
- Using request = New HttpRequestMessage(HttpMethod.Get, Url)
+ Using request As New HttpRequestMessage(HttpMethod.Get, Url)
request.Headers.Add("ADSToken", Encripta(String.Format("CVEEMPRESA={0}&TICKS={1}&CVEUSUARIO=100", CveEmpresa, DateTime.UtcNow.Ticks)))
Dim response = httpClient.SendAsync(request).Result
If response.StatusCode = Net.HttpStatusCode.OK Then
@@ -795,8 +795,8 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
Dim Mail As String = ""
Dim MailCC As String = ""
- Dim ArchivoXML = ""
- Dim ArchivoPDF = ""
+ Dim ArchivoXML As String = ""
+ Dim ArchivoPDF As String = ""
Dim ArchivoPDFBytes As Byte() = Nothing
Dim ExistePDF As Boolean = False
Try
@@ -812,7 +812,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
If ObjFactura.CveClienteSucursal > 0 Then
If ObjCliente.GetSucursales(ObjFactura.CveCliente, ObjFactura.CveClienteSucursal) Then
If ObjCliente.DtResultados.Rows.Count > 0 Then
- Dim Correo = ObjCliente.DtResultados.Rows(0)("Correo").ToString
+ Dim Correo As String = ObjCliente.DtResultados.Rows(0)("Correo").ToString
If Correo.Trim.Length > 0 Then
Mail = Correo
End If
@@ -839,7 +839,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
Dim Cuerpo As String = String.Empty
Dim ResultadoMail As Integer = 0
- Dim TipoComprobante = ""
+ Dim TipoComprobante As String = ""
If ObjFactura.TipoDocto = "Ing" Then TipoComprobante = "Factura"
If ObjFactura.TipoDocto = "Egs" Then TipoComprobante = "Nota de Crédito"
diff --git a/Ashx/SIGFacturacionCiclica.ashx b/Ashx/SIGFacturacionCiclica.ashx
index 8e5998a6a..d123a32f1 100644
--- a/Ashx/SIGFacturacionCiclica.ashx
+++ b/Ashx/SIGFacturacionCiclica.ashx
@@ -106,7 +106,7 @@ Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionSt
If DTCicloComercial IsNot Nothing Then
For Each RowEmpresa As DataRow In DTCicloComercial.FiltraParametros("", DistinctColumns:={"CveEmpresa"}).Rows
Dim CveEmpresa As Integer = RowEmpresa("CveEmpresa").ToString().ToEntero()
- Dim UsuarioActual = ValidaUsuarioSistema(CveEmpresa)
+ Dim UsuarioActual As Usuario = ValidaUsuarioSistema(CveEmpresa)
If UsuarioActual IsNot Nothing Then
Retorno = EjecutarFacturacionMasiva(UsuarioActual, DTCicloComercial.FiltraParametros($"CveEmpresa = {CveEmpresa}"))
End If
@@ -158,7 +158,7 @@ Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionSt
Private Function EmitirImprimir(UsuarioActual As Usuario, RowCiclo As DataRow) As Modelos.Factura.MMensajeFactura
Dim Resp As New Modelos.Factura.MMensajeFactura
- Dim ObjFactura = CreaObjetosVenta(UsuarioActual, RowCiclo)
+ Dim ObjFactura As Modelos.Factura = CreaObjetosVenta(UsuarioActual, RowCiclo)
If ObjFactura Is Nothing Then
Resp.Mensajes.Add("Ocurrió un error al procesar los datos de la Venta ")
@@ -181,7 +181,7 @@ Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionSt
#Region "P R E P A R A - V E N T A"
Private Function CreaDTVentas() As DataTable
- Dim TmpDT = New DataTable
+ Dim TmpDT As New DataTable
TmpDT.Columns.Add("CveVenta", GetType(Integer))
TmpDT.Columns.Add("Consec", GetType(Integer))
TmpDT.Columns.Add("Cantidad", GetType(Decimal))
@@ -218,7 +218,7 @@ Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionSt
TmpDT.Columns.Add("TotalImporte", GetType(Decimal))
TmpDT.Columns.Add("Total", GetType(Decimal))
'Para uso del módulo contable
- TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer))
+ TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer))
TmpDT.Columns.Add("AplicaParaConcepto", GetType(Boolean))
TmpDT.Columns.Add("CveProyecto", GetType(Integer))
TmpDT.Columns.Add("Proyecto", GetType(String))
@@ -270,7 +270,7 @@ Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionSt
Return TmpDT
End Function
Private Function CreaObjetosVenta(UsuarioActual As Usuario, DR As DataRow) As Modelos.Factura
- Dim ObjFactura = New Modelos.Factura(UsuarioActual)
+ Dim ObjFactura As New Modelos.Factura(UsuarioActual)
Try
ObjFactura.DirectorioServidor = HttpContext.Current.Server.MapPath("/")
@@ -350,11 +350,11 @@ Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionSt
objContratos.Dispose()
Dim DtR As DataRow
- ObjFactura.SubTotal = SUM(DtDetalle, "Total").ToDecimal
- ObjFactura.IVA = SUM(DtDetalle, "ImporteIVA").ToDecimal
- ObjFactura.RetIVA = SUM(DtDetalle, "ImporteRetIVA").ToDecimal
- ObjFactura.RetISR = SUM(DtDetalle, "ImporteRetISR").ToDecimal
- ObjFactura.IEPS = SUM(DtDetalle, "ImporteIEPS").ToDecimal
+ ObjFactura.SubTotal = SUM(DtDetalle, "Total")
+ ObjFactura.IVA = SUM(DtDetalle, "ImporteIVA")
+ ObjFactura.RetIVA = SUM(DtDetalle, "ImporteRetIVA")
+ ObjFactura.RetISR = SUM(DtDetalle, "ImporteRetISR")
+ ObjFactura.IEPS = SUM(DtDetalle, "ImporteIEPS")
ObjFactura.Total = ObjFactura.SubTotal + ObjFactura.IVA + ObjFactura.IEPS - (ObjFactura.RetIVA + ObjFactura.RetISR)
For Each row As DataRow In DtDetalle.Rows
diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb
index 1746f7e3f..b1442d461 100644
--- a/Bancos/IE.aspx.vb
+++ b/Bancos/IE.aspx.vb
@@ -3609,7 +3609,7 @@ Partial Class Bancos_IE
Dim Retorno As String = ""
If contextKey.ToDouble >= 0 Then
- Retorno = String.Format("---{0}---", contextKey.ToDouble.Texto2Letras(tCveMoneda))
+ Retorno = String.Format("---{0}---", contextKey.ToDecimal.Texto2Letras(tCveMoneda))
End If
Return Retorno
@@ -4387,7 +4387,7 @@ Partial Class Bancos_IE
BtnGuardar.Enabled = False
Else
TxtImporte.Text = DrOC("ImporteAnticipo").ToString.FormatoNumero
- TxtImporteLetra.Text = DrOC("ImporteAnticipo").ToString.ToDouble.Texto2Letras(DrOC("CveMoneda").ToString.ToEntero)
+ TxtImporteLetra.Text = DrOC("ImporteAnticipo").ToString.ToDecimal.Texto2Letras(DrOC("CveMoneda").ToString.ToEntero)
ImporteOriginalDolaras = DrOC("ImporteAnticipo").ToString.ToDecimal
End If
@@ -4728,7 +4728,7 @@ Partial Class Bancos_IE
If ObjBancos.GetSolicitudesViaticos(CveSolicitudViatico, UsuarioActual.CveEmpresa) AndAlso ObjBancos.DtResultados.Rows.Count > 0 Then
TxtImporte.Text = ObjBancos.DtResultados.FiltroPrimeroValor("Importe").ToString.FormatoNumero
- TxtImporteLetra.Text = ObjBancos.DtResultados.FiltroPrimeroValor("Importe").ToString.ToDouble.Texto2Letras()
+ TxtImporteLetra.Text = ObjBancos.DtResultados.FiltroPrimeroValor("Importe").ToString.ToDecimal.Texto2Letras()
TxtObservaciones.Text = $"SOLICITUD DE VIÁTICOS - FOLIO {ObjBancos.DtResultados.FiltroPrimeroValor("Folio").ToString()}: {ObjBancos.DtResultados.FiltroPrimeroValor("Asunto").ToString()}."
End If
ObjBancos.Dispose()
@@ -4762,7 +4762,7 @@ Partial Class Bancos_IE
'TxtImporte.Attributes.Add("onkeyup", $"FormatoMoneda(this);ValidarCantidad(this,{UrlParametros("SALDO").ToString});")
TxtDevolución.Attributes.Add("onkeyup", $"FormatoMoneda(this);ValidarCantidadDev( {UrlParametros("SALDO").ToString});")
TxtOtrosIngresosEgresos.Attributes.Add("onkeyup", $"ValidarCantidadDev();")
- TxtImporteLetra.Text = UrlParametros("SALDO").ToString.ToDouble.Texto2Letras(UrlParametros("CVEMONEDA").ToString.ToEntero)
+ TxtImporteLetra.Text = UrlParametros("SALDO").ToString.ToDecimal.Texto2Letras(UrlParametros("CVEMONEDA").ToString.ToEntero)
CargaCliente(CveCliente)
'BuscarCliente()
@@ -4792,7 +4792,7 @@ Partial Class Bancos_IE
ImporteOriginalDevDin = UrlParametros("ORIGINAL").ToString.ToDecimal.RoundSQL(6)
TxtImporte.Text = UrlParametros("SALDO").ToString.FormatoNumero()
TxtImporte.Attributes.Add("onkeyup", $"FormatoMoneda(this);ValidarCantidad(this,{UrlParametros("SALDO").ToString});")
- TxtImporteLetra.Text = UrlParametros("SALDO").ToString.ToDouble.Texto2Letras(UrlParametros("CVEMONEDA").ToString.ToEntero)
+ TxtImporteLetra.Text = UrlParametros("SALDO").ToString.ToDecimal.Texto2Letras(UrlParametros("CVEMONEDA").ToString.ToEntero)
CargaProveedor(CveProveedor, "-1")
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/ProveedoresCreditos.aspx.vb b/Bancos/ProveedoresCreditos.aspx.vb
index 99759eb43..4af9d468c 100644
--- a/Bancos/ProveedoresCreditos.aspx.vb
+++ b/Bancos/ProveedoresCreditos.aspx.vb
@@ -507,9 +507,9 @@ Partial Class Bancos_ProveedoresCreditos
GvV.DataSource = ObjBancos.DtResultados
End If
- TxtImporte.Text = ObjBancos.DtResultados.SUM("Total").ToString().ToDouble.Texto2Letras(CveMoneda)
+ TxtImporte.Text = ObjBancos.DtResultados.SUM("Total").ToString().ToDecimal.Texto2Letras(CveMoneda)
- TxtImporteLetra.Text = "---" & ObjBancos.DtResultados.SUM("Total").ToString().ToDouble.Texto2Letras(CveMoneda) & "---"
+ TxtImporteLetra.Text = "---" & TxtImporte.Text & "---"
ObjBancos.Dispose()
GvV.DataBind()
@@ -773,7 +773,7 @@ Partial Class Bancos_ProveedoresCreditos
Dim Dep As New ClsGenerales
If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor) Then
- Dim Row = Dep.DtResultados.FiltroPrimero(String.Format("CveCuentaDeposito = {0}", DdlCuentaDeposito.SelectedValue.ToEntero))
+ Dim Row As DataRow = Dep.DtResultados.FiltroPrimero(String.Format("CveCuentaDeposito = {0}", DdlCuentaDeposito.SelectedValue.ToEntero))
If Row IsNot Nothing AndAlso Row("Estatus").ToString = "False" Then
Alert("La cuenta depósito del proveedor esta inactiva.", TipoMensaje.MsgAdvertencia)
Dep.Dispose()
@@ -853,7 +853,7 @@ Partial Class Bancos_ProveedoresCreditos
If Not gvr.FCCheckBox("ChkPagar").Checked Then
Continue For
End If
- Dim importeMovimiento = gvr.DataKey("Total").ToDecimal
+ Dim importeMovimiento As Decimal = gvr.DataKey("Total").ToDecimal
Dim CveCreditoDetalle As Integer = gvr.DataKey("CveCreditoDetalle").ToEntero
Dim CveCredito As Integer = gvr.DataKey("CveCredito").ToEntero
Dim DtDetallesCredito As DataTable
@@ -979,21 +979,21 @@ Partial Class Bancos_ProveedoresCreditos
End If
- Dim CreditoMensualidad = DtDetallesCredito.FiltroPrimeroValor("Mensualidad", $"CveCreditoDetalle = {CveCreditoDetalle}").ToString.ToDecimal
- Dim CreditoIvaCapital = DtDetallesCredito.FiltroPrimeroValor("IVACapital", $"CveCreditoDetalle = {CveCreditoDetalle}").ToString.ToDecimal
- Dim CreditoIvaIntereses = DtDetallesCredito.FiltroPrimeroValor("IVAIntereses", $"CveCreditoDetalle = {CveCreditoDetalle}").ToString.ToDecimal
+ Dim CreditoMensualidad As Decimal = DtDetallesCredito.FiltroPrimeroValor("Mensualidad", $"CveCreditoDetalle = {CveCreditoDetalle}").ToString.ToDecimal
+ Dim CreditoIvaCapital As Decimal = DtDetallesCredito.FiltroPrimeroValor("IVACapital", $"CveCreditoDetalle = {CveCreditoDetalle}").ToString.ToDecimal
+ Dim CreditoIvaIntereses As Decimal = DtDetallesCredito.FiltroPrimeroValor("IVAIntereses", $"CveCreditoDetalle = {CveCreditoDetalle}").ToString.ToDecimal
- Dim CreditoIntereses = DtDetallesCredito.FiltroPrimeroValor("Intereses", $"CveCreditoDetalle = {CveCreditoDetalle}").ToString.ToDecimal
+ Dim CreditoIntereses As Decimal = DtDetallesCredito.FiltroPrimeroValor("Intereses", $"CveCreditoDetalle = {CveCreditoDetalle}").ToString.ToDecimal
If ObjMov.GetPlantillaConceptos(UsuarioActual.CveEmpresa, CvePlantillaPoliza) AndAlso ObjMov.DtResultados.Rows.Count > 0 Then
- Dim DtPlantilla = ObjMov.DtResultados
+ Dim DtPlantilla As DataTable = ObjMov.DtResultados
- Dim ConceptoContable = 0
- Dim TipoMovimiento = False
- Dim Concepto = ""
- Dim Referencia = $"Crédito: {TxtFolio.Text}"
- Dim FechaMovimiento = NowADS().ToDate
+ Dim ConceptoContable As Integer = 0
+ Dim TipoMovimiento As Boolean = False
+ Dim Concepto As String = ""
+ Dim Referencia As String = $"Crédito: {TxtFolio.Text}"
+ Dim FechaMovimiento As Date = NowADS().ToDate
For Each Row As DataRow In DtPlantilla.Rows
@@ -1232,7 +1232,7 @@ Partial Class Bancos_ProveedoresCreditos
Dim Retorno As String = ""
If contextKey.ToDouble >= 0 Then
- Retorno = String.Format("---{0}---", contextKey.ToDouble.Texto2Letras(tCveMoneda))
+ Retorno = String.Format("---{0}---", contextKey.ToDecimal.Texto2Letras(tCveMoneda))
End If
Return Retorno
diff --git a/Bin/ADSNetLibrary.dll b/Bin/ADSNetLibrary.dll
index effde59a8..f8f0cd514 100644
Binary files a/Bin/ADSNetLibrary.dll and b/Bin/ADSNetLibrary.dll differ
diff --git a/CGame/AsignacionEmpaque.aspx.cs b/CGame/AsignacionEmpaque.aspx.cs
index fc4331e0c..65ca283bd 100644
--- a/CGame/AsignacionEmpaque.aspx.cs
+++ b/CGame/AsignacionEmpaque.aspx.cs
@@ -103,7 +103,7 @@ public partial class CGame_AsignacionEmpaque : ClsPaginas
{
ClsCGame ObjCGame = new ClsCGame();
- Double TotalCajas = 0, TotalBins = 0;
+ decimal TotalCajas = 0, TotalBins = 0;
if (ObjCGame.GetProduccionResultado(-1, CveEmpresa: UsuarioActual.CveEmpresa))
{
@@ -333,7 +333,7 @@ public partial class CGame_AsignacionEmpaque : ClsPaginas
int CveCalidad = DdlCalidad.SelectedValue.ToEntero();
int CveEtiqueta = DdlEtiqueta.SelectedValue.ToEntero();
- Double TotalCajas = 0, TotalBins = 0;
+ decimal TotalCajas = 0, TotalBins = 0;
ClsCGame ObjCGame = new ClsCGame();
if (ObjCGame.GetProduccionResultado(-1, -1, -1, UsuarioActual.CveEmpresa, -1, CveHuerta, CveFruto, CveVariedad, CveTipoProduccion, CveTamaño, CveCalidad, CveEtiqueta, CveTipoEmpaque))
diff --git a/CGame/AsignacionEmpaque2.aspx.cs b/CGame/AsignacionEmpaque2.aspx.cs
index 1f404259f..df703a80b 100644
--- a/CGame/AsignacionEmpaque2.aspx.cs
+++ b/CGame/AsignacionEmpaque2.aspx.cs
@@ -152,7 +152,7 @@ public partial class CGame_AsignacionEmpaque2 : ClsPaginas
{
ClsCGame ObjCGame = new ClsCGame();
- Double TotalCajas = 0, TotalBins = 0;
+ decimal TotalCajas = 0, TotalBins = 0;
int CveHuerta = DdlHuerta.SelectedValue.ToEntero();
int CveFruto = DdlFruto.SelectedValue.ToEntero();
diff --git a/CGame/Liquidacion.aspx.cs b/CGame/Liquidacion.aspx.cs
index 39055f314..2e74ac2cf 100644
--- a/CGame/Liquidacion.aspx.cs
+++ b/CGame/Liquidacion.aspx.cs
@@ -172,7 +172,7 @@ public partial class CGame_Liquidacion : ClsPaginas
DtIngresosAgrupados= ObjCGame.DtResultados;
}
ObjCGame.Dispose();
- double TotIngresosPri = 0, TotIngresosSeg = 0, TotIngresosJug = 0, TotPesoPri = 0, TotPesoSeg = 0, TotPesoJug = 0, TotCantidadPri = 0, TotCantidadSeg = 0, TotCantidadJug = 0, Merma = 0;
+ decimal TotIngresosPri = 0, TotIngresosSeg = 0, TotIngresosJug = 0, TotPesoPri = 0, TotPesoSeg = 0, TotPesoJug = 0, TotCantidadPri = 0, TotCantidadSeg = 0, TotCantidadJug = 0, Merma = 0;
if (DtIngresos.Rows.Count > 0)
{
TotIngresosPri = DtIngresos.SUM("ImportePrimera");
@@ -184,7 +184,7 @@ public partial class CGame_Liquidacion : ClsPaginas
TotCantidadPri = DtIngresos.SUM("CantidadPrimera");
TotCantidadSeg = DtIngresos.SUM("CantidadSegunda");
TotCantidadJug = DtIngresos.SUM("CantidadJugo");
- Merma = DtIngresos.Rows[0]["Merma"].ToString().ToDouble();
+ Merma = DtIngresos.Rows[0]["Merma"].ToString().ToDecimal();
LblPesoNeto.Text = DtIngresos.Rows[0]["PesoNeto"].ToString().FormatoNumero();
HplNumCortes.Text = DtIngresos.Rows[0]["NumCortes"].ToString().FormatoNumero(0);
if (DtGastosTotales.Rows.Count > 0)
@@ -258,7 +258,7 @@ public partial class CGame_Liquidacion : ClsPaginas
{
if ((DtIngresos.Rows.Count > 0 || DtGastosTotales.Rows.Count > 0))
{
- double TotIngresosPri = 0, TotIngresosSeg = 0, TotIngresosJug = 0, TotPesoPri = 0, TotPesoSeg = 0, TotPesoJug = 0, TotCantidadPri = 0, TotCantidadSeg = 0, TotCantidadJug = 0, Merma = 0,PesoNeto=0;
+ decimal TotIngresosPri = 0, TotIngresosSeg = 0, TotIngresosJug = 0, TotPesoPri = 0, TotPesoSeg = 0, TotPesoJug = 0, TotCantidadPri = 0, TotCantidadSeg = 0, TotCantidadJug = 0, Merma = 0,PesoNeto=0;
if (DtIngresos.Rows.Count > 0)
{
TotIngresosPri = DtIngresos.SUM("ImportePrimera");
@@ -270,8 +270,8 @@ public partial class CGame_Liquidacion : ClsPaginas
TotCantidadPri = DtIngresos.SUM("CantidadPrimera");
TotCantidadSeg = DtIngresos.SUM("CantidadSegunda");
TotCantidadJug = DtIngresos.SUM("CantidadJugo");
- Merma = DtIngresos.Rows[0]["Merma"].ToString().ToDouble();
- PesoNeto = DtIngresos.Rows[0]["PesoNeto"].ToString().ToDouble();
+ Merma = DtIngresos.Rows[0]["Merma"].ToString().ToDecimal();
+ PesoNeto = DtIngresos.Rows[0]["PesoNeto"].ToString().ToDecimal();
}
System.IO.FileInfo Imagen = new System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png");
diff --git a/CGame/OrdenProduccion.aspx.vb b/CGame/OrdenProduccion.aspx.vb
index 27f74b826..c91d9ee7f 100644
--- a/CGame/OrdenProduccion.aspx.vb
+++ b/CGame/OrdenProduccion.aspx.vb
@@ -1693,7 +1693,7 @@ Partial Class CGame_OrdenProduccion
If Dt.Rows.Count > 0 Then
params.Add(New ReportParameter("Manifiesto", Dt.Rows(0)("Manifiesto").ToString))
params.Add(New ReportParameter("SubTotal", Dt.SUM("Importe").ToString.FormatoNumero()))
- params.Add(New ReportParameter("CantidadConLetra", Texto2Letras(Dt.SUM("Importe").ToString.ToDouble, 2)))
+ params.Add(New ReportParameter("CantidadConLetra", Texto2Letras(Dt.SUM("Importe").ToString.ToDecimal, 2)))
End If
End If
ImprimirPDF("Empresas/Grales/Formatos/Manifiesto.rdlc", Dt, params, String.Format("Manifiesto -{0}", NowADS().ToDateTime.ToShortDateString))
diff --git a/CRM/Acercamiento.aspx b/CRM/Acercamiento.aspx
index 4a287efb1..b726cbc25 100644
--- a/CRM/Acercamiento.aspx
+++ b/CRM/Acercamiento.aspx
@@ -441,6 +441,56 @@
diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx
index 9d9280b60..cd06d558c 100644
--- a/Compras/Compras.aspx
+++ b/Compras/Compras.aspx
@@ -6312,8 +6312,8 @@
if ($get("C_Tab_TabOC_LbRetIVAOC1")) {
$get("C_Tab_TabOC_LbRetIVAOC1").innerText = FormatoNumero(SumaRetIVA, 2);
}
- if ($get("C_Tab_TabOC_LbRetISROC1")) {
- $get("C_Tab_TabOC_LbRetISROC1").innerText = FormatoNumero(SumaRetISR, 2);
+ if ($get("C_Tab_TabOC_LblRetISROC1")) {
+ $get("C_Tab_TabOC_LblRetISROC1").innerText = FormatoNumero(SumaRetISR, 2);
}
if ($get("C_Tab_TabOC_LbTotalOC1")) {
$get("C_Tab_TabOC_LbTotalOC1").innerText = FormatoNumero(SumaTotal, 2);
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index ded8d8e1e..d63b87da1 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -871,19 +871,19 @@ Partial Class Compras_Compras
#End Region
#Region " PROPIEDADES DE TOTALES "
- Private Property SubTotalOriginal As Double
+ Private Property SubTotalOriginal As Decimal
Get
- Return ViewState("SubTotalOriginal").ToString.ToDouble
+ Return ViewState("SubTotalOriginal").ToString.ToDecimal
End Get
- Set(value As Double)
+ Set(value As Decimal)
ViewState("SubTotalOriginal") = value
End Set
End Property
- Private Property SubTotal2Original As Double
+ Private Property SubTotal2Original As Decimal
Get
- Return ViewState("SubTotal2Original").ToString.ToDouble
+ Return ViewState("SubTotal2Original").ToString.ToDecimal
End Get
- Set(value As Double)
+ Set(value As Decimal)
ViewState("SubTotal2Original") = value
End Set
End Property
@@ -2471,7 +2471,7 @@ Partial Class Compras_Compras
If TipoCambio <> TipoCambioOriginal Then LblTCO.Text = String.Format(" TC Original: {0}", TipoCambioOriginal.ToString("N4"))
- AsignaValoresOriginales(TxtSubTotal.Text.ToDouble, TxtSubTotal2.Text.ToDouble, TxtIVA.Text.ToDouble, TxtRetIVA.Text.ToDouble, TxtRetISR.Text.ToDouble, TxtTotal.Text.ToDecimal)
+ AsignaValoresOriginales(TxtSubTotal.Text.ToDecimal, TxtSubTotal2.Text.ToDecimal, TxtIVA.Text.ToDouble, TxtRetIVA.Text.ToDouble, TxtRetISR.Text.ToDouble, TxtTotal.Text.ToDecimal)
CalculaTotalPorDevengar()
TxtDocumentoImporteFE.Text = dr("Total").ToString
RVDocumentoImporte.MaximumValue = dr("Total").ToString.FormatoNumero(2)
@@ -5361,6 +5361,14 @@ Partial Class Compras_Compras
Next
''insertar en prepólizas
+ If CveMovimientoAlmacen > 0 Then
+ Dim tImporte As Decimal
+ If ObjInventario.GetMovimientosDetalle(CveMovimientoAlmacen, UsuarioActual.CveEmpresa) Then
+ tImporte = ObjInventario.DtResultados.SUM("Total")
+ End If
+ ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, tImporte, tImporte, 68, ObjInventario.Folio.ToString, ObjInventario.Folio.ToString, CveMovimientoAlmacen:=CveMovimientoInventario)
+ End If
+
End If
Next
End If
@@ -6069,8 +6077,7 @@ Partial Class Compras_Compras
If importeMN <> 0 Then
-
- If (TxtFecha.Text <> NowADS().ToString("dd/MM/yyyy")) And Not EntradaComoGastoConAlmacen Then
+ If Not UsuarioActual.CveEmpresa.Contiene(7, 11, 12, 122, 145) AndAlso (TxtFecha.Text.ToDate.LastDayOfMonth <> NowADS.LastDayOfMonth And Not EntradaComoGastoConAlmacen) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN.RoundSQL(2), importeMN.RoundSQL(2), 205, Referencia, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveCreditoDetalle:=CveCreditoDetalle, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=ContabilizableAlmacen) Then
ErrorPrepoliza = True
@@ -8591,7 +8598,9 @@ Partial Class Compras_Compras
If Not ObjCompra.UpdateCompraDetalle(Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDecimal, Row("PU").ToString.ToDecimal, Row("IVA").ToString.ToDecimal, Row("Total").ToString.ToDecimal,
Row("Descuento").ToString.ToDecimal, Row("Obs").ToString, Row("CveSubProyecto").ToString.ToEntero, Row("CvePresupuestoEgreso").ToString.ToEntero, CveAF, Row("CveCompraDetalle").ToString.ToEntero, CvePersonal:=CvePersonal, CveTipoGasto:=Row("CveTipoGasto").ToString.ToEntero, AF_Medida:=Row("AFMedida").ToString.ToEntero, AF_TipoMantenimiento:=Row("AFTipoMantenimiento").ToString.ToEntero, Referencia:=Referencia,
RetIVA:=Row("RetIVA").ToString.ToDecimal, RetISR:=Row("RetISR").ToString.ToDecimal, IEPSPS:=Row("IEPSPS").ToString.ToDecimal, IEPSPSIVA:=Row("IEPSPSIVA").ToString.ToDecimal,
- IVAPorcentaje:=Row("IVAPorcentaje").ToString.ToDecimal, RetIVAPorcentaje:=Row("RetIVAPorcentaje").ToString.ToDecimal, RetISRPorcentaje:=Row("RetISRPorcentaje").ToString.ToDecimal, IEPSPSPorcentaje:=Row("IEPSPSPorcentaje").ToString.ToDecimal, IEPSPSIVAPorcentaje:=Row("IEPSPSIVAPorcentaje").ToString.ToDecimal, NoDeducible:=If((Row("NoDeducible").ToString().ToUpper().Contiene("TRUE", "1")) AndAlso ChkEsNoDeducible.Checked, True, False), CveContratoDetalle:=Row("CveContratoDetalle").ToString.ToEntero) Then
+ IVAPorcentaje:=Row("IVAPorcentaje").ToString.ToDecimal, RetIVAPorcentaje:=Row("RetIVAPorcentaje").ToString.ToDecimal, RetISRPorcentaje:=Row("RetISRPorcentaje").ToString.ToDecimal,
+ IEPSPSPorcentaje:=Row("IEPSPSPorcentaje").ToString.ToDecimal, IEPSPSIVAPorcentaje:=Row("IEPSPSIVAPorcentaje").ToString.ToDecimal, NoDeducible:=If((Row("NoDeducible").ToString().ToUpper().Contiene("TRUE", "1")) AndAlso ChkEsNoDeducible.Checked, True, False),
+ CveContratoDetalle:=Row("CveContratoDetalle").ToString.ToEntero) Then
Retorno = False
Exit For
@@ -10886,7 +10895,7 @@ Partial Class Compras_Compras
Try
- TmpDT.Rows(Index)("CveActivoFijo") = Nothing
+ TmpDT.Rows(Index)("CveActivoFijo") = -1
TmpDT.AcceptChanges()
Catch ex As Exception
@@ -14278,7 +14287,7 @@ Partial Class Compras_Compras
OCVinculada = True
UpPSS.Update()
- AsignaValoresOriginales(TxtSubTotal.Text.ToDouble, TxtSubTotal2.Text.ToDouble, TxtIVA.Text.ToDouble, TxtRetIVA.Text.ToDouble, TxtRetISR.Text.ToDouble, TxtTotal.Text.ToDecimal)
+ AsignaValoresOriginales(TxtSubTotal.Text.ToDecimal, TxtSubTotal2.Text.ToDecimal, TxtIVA.Text.ToDouble, TxtRetIVA.Text.ToDouble, TxtRetISR.Text.ToDouble, TxtTotal.Text.ToDecimal)
If UsuarioActual.Empresa.Funcionalidad(562).ToEntero > 0 Then CargaGastosServicios(UsuarioActual.Empresa.Funcionalidad(562).ToEntero)
@@ -15623,8 +15632,8 @@ Partial Class Compras_Compras
TxtTotal.Text = (TmpDT.SUMD("Total") + TmpDT.SUMD("IVA") + TmpDT.SUMD("IEPSPS") - TmpDT.SUMD("RetIVA") - TmpDT.SUMD("RetISR")).FormatoNumero
- SubTotalOriginal = TxtSubTotal.Text.ToDouble
- SubTotal2Original = TxtSubTotal2.Text.ToDouble
+ SubTotalOriginal = TxtSubTotal.Text.ToDecimal
+ SubTotal2Original = TxtSubTotal2.Text.ToDecimal
If TrDescuento.Visible Then TxtDescuento.Text = (TmpDT.SUMD("Descuento")).ToString.FormatoNumero
If TrRetIVA.Visible Then TxtRetIVA.Text = (TmpDT.SUMD("RetIVA")).ToString.FormatoNumero
@@ -15644,7 +15653,7 @@ Partial Class Compras_Compras
#End Region
#Region " TOTALES: VALIDA Y CALCULA "
- Private Sub AsignaValoresOriginales(SubTotal As Double, SubTotal2 As Double, IVA As Double, RetIVA As Double, RetISR As Double, Total As Decimal)
+ Private Sub AsignaValoresOriginales(SubTotal As Decimal, SubTotal2 As Decimal, IVA As Double, RetIVA As Double, RetISR As Double, Total As Decimal)
SubTotalOriginal = SubTotal
SubTotal2Original = SubTotal2
IVAOriginal = IVA
@@ -15807,8 +15816,8 @@ Partial Class Compras_Compras
TempSubTotal = TxtSubTotal.Text.ToDouble
- SubTotalOriginal = TxtSubTotal.Text.ToDouble
- SubTotal2Original = TxtSubTotal2.Text.ToDouble
+ SubTotalOriginal = TxtSubTotal.Text.ToDecimal
+ SubTotal2Original = TxtSubTotal2.Text.ToDecimal
TempDescuentos = TxtDescuento.Text.Trim.ToDouble + Amortizacion
TempSubTotal2 = TempSubTotal - TempDescuentos
TempIVA = TxtIVA.Text.ToDouble
@@ -15825,8 +15834,8 @@ Partial Class Compras_Compras
ElseIf DifTotales <> 0 Then
TxtSubTotal2.Text = (TxtSubTotal2.Text.ToDouble + DifTotales).ToString
TxtSubTotal.Text = (TxtSubTotal.Text.ToDouble + DifTotales).ToString
- SubTotalOriginal = TxtSubTotal.Text.ToDouble
- SubTotal2Original = TxtSubTotal2.Text.ToDouble
+ SubTotalOriginal = TxtSubTotal.Text.ToDecimal
+ SubTotal2Original = TxtSubTotal2.Text.ToDecimal
End If
Dim DiferenciaSubtotales As Decimal = 0.0D
@@ -18018,11 +18027,11 @@ Partial Class Compras_Compras
Continue For
End If
CveMovimientoInventario = DtInv.MAX("CveMovimiento", $"CveCompraDetalle = {Row2("CveCompraDetalle")}").ToEntero
- ImporteMovimiento = DtInv.SUM(If(DdlMoneda.SelectedValue = "1", "Total", "TotalExtranjero"), $"CveCompraDetalle = {Row2("CveCompraDetalle")}").ToDecimal
+ ImporteMovimiento = DtInv.SUM(If(DdlMoneda.SelectedValue = "1", "Total", "TotalExtranjero"), $"CveCompraDetalle = {Row2("CveCompraDetalle")}")
ImporteMovimiento = If(ImporteMovimiento > Row2("Total").ToString.ToDecimal, Row2("Total").ToString.ToDecimal, ImporteMovimiento) * Multiplicador
'VALIDA QUE CUANDO SEA DOLARES TENGA PUEXTRANJERO EN EL MOVTO DE ALMACEN
- If DdlMoneda.SelectedValue = "2" And ImporteMovimiento = 0 And DtInv.SUM("Total", $"CveCompraDetalle = {Row2("CveCompraDetalle")}").ToDecimal > 0 Then
+ If DdlMoneda.SelectedValue = "2" And ImporteMovimiento = 0 And DtInv.SUM("Total", $"CveCompraDetalle = {Row2("CveCompraDetalle")}") > 0 Then
TieneError = True
Exit For
End If
diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb
index fc8cd8d8b..0f0b5de52 100644
--- a/Compras/PopUpVerFactura.aspx.vb
+++ b/Compras/PopUpVerFactura.aspx.vb
@@ -3447,7 +3447,7 @@ Partial Class PopUpVerFactura
If CveTipoAlmacenRelacionado.Contiene(24, 25) Then
If ObjInventarios.GetMovimientosDetalle(CveMovimientoRelacionado, UsuarioActual.CveEmpresa) Then
Dim DtUsados As DataTable = ObjInventarios.DtResultados.Copy()
- CantidadUsados = DtUsados.SUM("Cantidad").ToDecimal()
+ CantidadUsados = DtUsados.SUM("Cantidad")
Dim IndexInicialUsados As Integer = DtMovimientos.Rows.Count + 1
For Each Dr As DataRow In DtUsados.Rows
@@ -3474,7 +3474,7 @@ Partial Class PopUpVerFactura
If ObjInventarios.GetMovimientosTransitorios(CveAlmacenRecepcion, -1, CveAlmacenTransitorioRecepcion, -1, FolioBusquedaTrasitorio, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
DtMovimientos = ObjInventarios.DtResultados.FiltraParametros(String.Format("CveTipoAlmacenDestino <> 4 AND CvePS > 0"))
- CantidadProductos = DtMovimientos.SUM("Cantidad").ToDecimal()
+ CantidadProductos = DtMovimientos.SUM("Cantidad")
If Not DtMovimientos.Columns.Contains("No") Then
DtMovimientos.Columns.Add("No", GetType(Integer))
@@ -3490,7 +3490,7 @@ Partial Class PopUpVerFactura
Else
If ObjInventarios.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa, Resumen:=Resumen) Then
DtMovimientos = ObjInventarios.DtResultados.Copy()
- CantidadProductos = DtMovimientos.SUM("Cantidad").ToDecimal()
+ CantidadProductos = DtMovimientos.SUM("Cantidad")
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CveMovimientoRelacionado > 0 Then
If ObjInventarios.GetMovimientos(CveMovimientoRelacionado, -1, -1, UsuarioActual.CveEmpresa) Then
Dim CveAlmacenRelacionado As Integer = ObjInventarios.CveAlmacen
@@ -3500,7 +3500,7 @@ Partial Class PopUpVerFactura
If CveTipoAlmacenRelacionado.Contiene(24, 25) Then
If ObjInventarios.GetMovimientosDetalle(CveMovimientoRelacionado, UsuarioActual.CveEmpresa) Then
Dim DtUsados As DataTable = ObjInventarios.DtResultados.Copy()
- CantidadUsados = DtUsados.SUM("Cantidad").ToDecimal()
+ CantidadUsados = DtUsados.SUM("Cantidad")
Dim IndexInicialUsados As Integer = DtMovimientos.Rows.Count + 1
For Each Dr As DataRow In DtUsados.Rows
@@ -3686,7 +3686,7 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("RFCProveedor", If(CveCompra > 0, dr("RFC").ToString, "")))
params.Add(New ReportParameter("TelefonoProveedor", If(CveCompra > 0, dr("Telefono").ToString, "")))
params.Add(New ReportParameter("ContactoProveedor", If(CveCompra > 0, dr("ContactoNombre").ToString, "")))
- params.Add(New ReportParameter("ImporteLetra", String.Format("({0})", DtMovimientos.SUM("Total").ToString.ToDouble.Texto2Letras(CveMoneda).ToUpper)))
+ params.Add(New ReportParameter("ImporteLetra", String.Format("({0})", DtMovimientos.SUM("Total").ToString.ToDecimal.Texto2Letras(CveMoneda).ToUpper)))
params.Add(New ReportParameter("SubTotal", If(CveCompra > 0, (dr("SubTotal").ToString.ToDouble).FormatoNumero, "")))
params.Add(New ReportParameter("Descuentos", If(CveCompra > 0, (dr("Descuentos").ToString.ToDouble).FormatoNumero(2), "")))
params.Add(New ReportParameter("IVA", If(CveCompra > 0, (dr("IVA").ToString.ToDouble).FormatoNumero, "")))
@@ -3745,7 +3745,7 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("Descuentos", If(CveCompra > 0, (dr("Descuentos").ToString.ToDouble).FormatoNumero(2), "")))
params.Add(New ReportParameter("IVA", If(CveCompra > 0, dr("IVA").ToString.FormatoNumero(2), "")))
params.Add(New ReportParameter("Total", If(CveCompra > 0, dr("Total").ToString.FormatoNumero(2), "")))
- params.Add(New ReportParameter("TotalLetra", If(CveCompra > 0, String.Format("({0})", dr("Total").ToString.ToDouble.Texto2Letras(dr("CveMoneda").ToString.ToEntero).ToUpper), "")))
+ params.Add(New ReportParameter("TotalLetra", If(CveCompra > 0, String.Format("({0})", dr("Total").ToString.ToDecimal.Texto2Letras(dr("CveMoneda").ToString.ToEntero).ToUpper), "")))
params.Add(New ReportParameter("Observaciones", If(CveCompra > 0, dr("Observaciones").ToString, "")))
params.Add(New ReportParameter("Capturo", If(CveCompra > 0, dr("NombreCapturo").ToString, "")))
@@ -4550,7 +4550,7 @@ Partial Class PopUpVerFactura
'ObjInventarios.Dispose()
Dim UrlParametros As Hashtable = Parametros(Decripta((Request("P").ToString)))
If ObjInventarios.GetMovimientosDetalle(UrlParametros("CVEMOVIMIENTO").ToString.ToEntero, UsuarioActual.CveEmpresa) Then
- Dim TotalFinal As Double = ObjInventarios.DtResultados.SUM("Total") * 1.16
+ Dim TotalFinal As Decimal = ObjInventarios.DtResultados.SUM("Total") * 1.16D
Dim dr As DataRow = ObjInventarios.DtResultados.Rows(0)
'params.Add(New ReportParameter("IVA", dr("IVA").ToString))
params.Add(New ReportParameter("TotalLetra", String.Format("({0})", TotalFinal.Texto2Letras().ToUpper)))
@@ -4612,7 +4612,7 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("Descuentos", (dr("Descuentos").ToString.ToDouble).FormatoNumero(2)))
params.Add(New ReportParameter("IVA", dr("IVA").ToString.FormatoNumero(2)))
params.Add(New ReportParameter("Total", dr("Total").ToString.FormatoNumero(2)))
- params.Add(New ReportParameter("TotalLetra", String.Format("({0})", dr("Total").ToString.ToDouble.Texto2Letras(dr("CveMoneda").ToString.ToEntero).ToUpper)))
+ params.Add(New ReportParameter("TotalLetra", String.Format("({0})", dr("Total").ToString.ToDecimal.Texto2Letras(dr("CveMoneda").ToString.ToEntero).ToUpper)))
params.Add(New ReportParameter("Observaciones", dr("Observaciones").ToString))
params.Add(New ReportParameter("Capturo", dr("NombreCapturo").ToString))
@@ -6011,7 +6011,7 @@ Partial Class PopUpVerFactura
If CveTipoTransaccion = 1 Then
Dim Folio As String = ObjIE.Folio
- Dim Importe As Double = ObjIE.Importe
+ Dim Importe As Decimal = ObjIE.Importe
Dim Observacion As String = ObjIE.Observaciones
Dim ImporteLetra As String = String.Format("--- {0} ---", Importe.Texto2Letras(ObjIE.CveMoneda))
Dim Beneficiario As String = ObjIE.PagueseA
@@ -6106,7 +6106,7 @@ Partial Class PopUpVerFactura
Dim Folio, Observacion, UsuarioRegistro, TextoImporte, PagueseA, Ruta, Banco, NumCuenta, AbonoCuenta, SubProyecto, NotificarA, RefCrediproveedor As String
Dim FechaExpedicion As Date = NowADS()
- Dim Importe As Double
+ Dim Importe As Decimal
Dim FormatoCheque As String = ""
Dim CveProveedor, CvePersonal, CveCuentaDeposito As Integer
@@ -6219,7 +6219,7 @@ Partial Class PopUpVerFactura
Dim Folio As String = "", Observacion As String = "", UsuarioRegistro As String = "", TextoImporte As String = "", PagueseA As String = ""
Dim Ruta As String = UsuarioActual.Empresa.Ruta
Dim FechaExpedicion As Date = NowADS()
- Dim Importe As Double
+ Dim Importe As Decimal
Dim FormatoCheque As String = ""
DtDetalle = Nothing
@@ -6449,9 +6449,9 @@ Partial Class PopUpVerFactura
Reporte.Dictionary.Variables("DomicilioExpedicion").Value = Venta.SubProyecto.Direccion
- Dim SubtTotal As Double = (Venta.DtDetalle.SUM("PU") * Venta.DtDetalle.SUM("Cantidad")) '* 0.16 lleva el IVA?
- Dim IVA As Double = SubtTotal * 0.16 'lleva IVA?
- Dim Total As Double = SubtTotal + IVA
+ Dim SubtTotal As Decimal = (Venta.DtDetalle.SUM("PU") * Venta.DtDetalle.SUM("Cantidad")) '* 0.16 lleva el IVA?
+ Dim IVA As Decimal = SubtTotal * 0.16D 'lleva IVA?
+ Dim Total As Decimal = SubtTotal + IVA
'Reporte.Dictionary.Variables("Importe").Value =
Reporte.Dictionary.Variables("ImporteLetra").Value = Total.Texto2Letras()
@@ -6607,7 +6607,10 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("PS", PS))
params.Add(New ReportParameter("Lote", Lote))
params.Add(New ReportParameter("FechaCad", FechaCaducidad.ToString("dd/MM/yyyy")))
- Return StreamPDF("Empresas/Grales/Formatos/EtiquetaDeRecepcion.rdlc", New DataTable, params)
+ Dim tRuta As String = String.Format("{0}Formatos/EtiquetaDeRecepcion.rdlc", UsuarioActual.Empresa.Ruta)
+
+ If Not IO.File.Exists(tRuta) Then tRuta = "Empresas/Grales/Formatos/EtiquetaDeRecepcion.rdlc"
+ Return StreamPDF(tRuta, New DataTable, params)
End Function
#End Region
diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb
index ffd74af0e..84c730ac7 100644
--- a/Compras/Proveedores.aspx.vb
+++ b/Compras/Proveedores.aspx.vb
@@ -946,13 +946,13 @@ Partial Class Compras_Proveedores
'Proveedores
Dim drr As DataRow = ObjProveedor.DtResultados.Rows(0)
- If drr("IdCtaContProveedores").ToString <> "" Then DdlCtaContProveedores.Items.Add(New ListItem(drr("CtaContProveedores").ToString, drr("IdCtaContProveedores").ToString)) : DdlCtaContProveedores.SelectedValueExist(drr("IdCtaContProveedores").ToString)
- If drr("IdCtaContExtranjera").ToString <> "" Then DdlCtaContExtranjera.Items.Add(New ListItem(drr("CtaContExtranjera").ToString, drr("IdCtaContExtranjera").ToString)) : DdlCtaContExtranjera.SelectedValue = drr("IdCtaContExtranjera").ToString
- If drr("IdCtaContComplementaria").ToString <> "" Then DdlCtaContComplementaria.Items.Add(New ListItem(drr("CtaContComplementaria").ToString, drr("IdCtaContComplementaria").ToString)) : DdlCtaContComplementaria.SelectedValue = drr("IdCtaContComplementaria").ToString
+ 'If drr("IdCtaContProveedores").ToString <> "" Then DdlCtaContProveedores.Items.Add(New ListItem(drr("CtaContProveedores").ToString, drr("IdCtaContProveedores").ToString)) : DdlCtaContProveedores.SelectedValueExist(drr("IdCtaContProveedores").ToString)
+ 'If drr("IdCtaContExtranjera").ToString <> "" Then DdlCtaContExtranjera.Items.Add(New ListItem(drr("CtaContExtranjera").ToString, drr("IdCtaContExtranjera").ToString)) : DdlCtaContExtranjera.SelectedValue = drr("IdCtaContExtranjera").ToString
+ 'If drr("IdCtaContComplementaria").ToString <> "" Then DdlCtaContComplementaria.Items.Add(New ListItem(drr("CtaContComplementaria").ToString, drr("IdCtaContComplementaria").ToString)) : DdlCtaContComplementaria.SelectedValue = drr("IdCtaContComplementaria").ToString
- If drr("IdCtaContAnticipos").ToString <> "" Then DdlCtaContAnticipos.Items.Add(New ListItem(drr("CtaContAnticipos").ToString, drr("IdCtaContAnticipos").ToString)) : DdlCtaContAnticipos.SelectedValueExist(drr("IdCtaContAnticipos").ToString)
- If drr("IdCtaContAnticiposExtranjera").ToString <> "" Then DdlCtaContAnticiposExtranjera.Items.Add(New ListItem(drr("CtaContAnticiposExtranjera").ToString, drr("IdCtaContAnticiposExtranjera").ToString)) : DdlCtaContAnticiposExtranjera.SelectedValue = drr("IdCtaContAnticiposExtranjera").ToString
- If drr("IdCtaContAnticiposComplementaria").ToString <> "" Then DdlCtaContAnticiposComplementaria.Items.Add(New ListItem(drr("CtaContAnticiposComplementaria").ToString, drr("IdCtaContAnticiposComplementaria").ToString)) : DdlCtaContAnticiposComplementaria.SelectedValue = drr("IdCtaContAnticiposComplementaria").ToString
+ 'If drr("IdCtaContAnticipos").ToString <> "" Then DdlCtaContAnticipos.Items.Add(New ListItem(drr("CtaContAnticipos").ToString, drr("IdCtaContAnticipos").ToString)) : DdlCtaContAnticipos.SelectedValueExist(drr("IdCtaContAnticipos").ToString)
+ 'If drr("IdCtaContAnticiposExtranjera").ToString <> "" Then DdlCtaContAnticiposExtranjera.Items.Add(New ListItem(drr("CtaContAnticiposExtranjera").ToString, drr("IdCtaContAnticiposExtranjera").ToString)) : DdlCtaContAnticiposExtranjera.SelectedValue = drr("IdCtaContAnticiposExtranjera").ToString
+ 'If drr("IdCtaContAnticiposComplementaria").ToString <> "" Then DdlCtaContAnticiposComplementaria.Items.Add(New ListItem(drr("CtaContAnticiposComplementaria").ToString, drr("IdCtaContAnticiposComplementaria").ToString)) : DdlCtaContAnticiposComplementaria.SelectedValue = drr("IdCtaContAnticiposComplementaria").ToString
DdlCtaContProveedores.Attributes.Add("onclick", "CargaCuentas(1);")
DdlCtaContAcreedores.Attributes.Add("onclick", "CargaCuentas(6);")
@@ -1852,13 +1852,7 @@ Partial Class Compras_Proveedores
DdlCveClasificacionProveedor.SelectedValue.ToEntero, DdlCveUsuarioResponsable.SelectedValue.ToEntero, ChkEstado.Checked, TxtNotificarA.Text.Trim, TxtCorreoCobranza.Text.Trim, ChkFolioDuplicado.Checked, CveProveedor,
DdlCveTipoProveedor.SelectedValue.ToEntero, DdlMonedaPrefente.SelectedValue.ToEntero, UsaLimiteCredito:=ChkUsaLimiteCredito.Checked, DIOTCveTipoTercero:=DDlDIOTTipoTercero.SelectedValue.ToEntero, DIOTCveTipoOperacion:=DdlDIOTTipoOperacion.SelectedValue.ToEntero, DIOTNumeroIDFiscal:=TxtDIOTNumIDFiscal.Text, CveUsuarioModifico:=UsuarioActual.CveUsuario,
DIOTCvePais:=DdlDIOTPais.SelectedValue.ToEntero, AplicarEvaluacion:=ChkAplicarEvaluacion.Checked, FechaEvaluacion:=FechaEvaluacion, CicloEvaluacion:=CicloEvaluacion, CveUsuarioEvaluador:=DdlUsuarioEvaluador.SelectedValue.ToEntero(), CP:=TxtCP.Text.ToEntero, DIOTNacionalidad:=TxtDIOTNacionalidad.Text,
- CveConfianzaProveedor:=DdlConfianzaProveedor.SelectedValue.ToEntero(), CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero,
- IdCtaContProveedores:=DdlCtaContProveedores.SelectedValue.ToEntero, CtaContProveedores:=DdlCtaContProveedores.SelectedItem.Text,
- IdCtaContExtranjera:=DdlCtaContExtranjera.SelectedValue.ToEntero, CtaContExtranjera:=DdlCtaContExtranjera.SelectedItem.Text,
- IdCtaContComplementaria:=DdlCtaContComplementaria.SelectedValue.ToEntero, CtaContComplementaria:=DdlCtaContComplementaria.SelectedItem.Text,
- IdCtaContAnticipos:=DdlCtaContAnticipos.SelectedValue.ToEntero, CtaContAnticipos:=DdlCtaContAnticipos.SelectedItem.Text,
- IdCtaContAnticiposExtranjera:=DdlCtaContAnticiposExtranjera.SelectedValue.ToEntero, CtaContAnticiposExtranjera:=DdlCtaContAnticiposExtranjera.SelectedItem.Text,
- IdCtaContAnticiposComplementaria:=DdlCtaContAnticiposComplementaria.SelectedValue.ToEntero, CtaContAnticiposComplementaria:=DdlCtaContAnticiposComplementaria.SelectedItem.Text) Then
+ CveConfianzaProveedor:=DdlConfianzaProveedor.SelectedValue.ToEntero(), CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero) Then
GlobalDTCompProveedores(UsuarioActual.CveEmpresa) = Nothing
@@ -4293,8 +4287,8 @@ Partial Class Compras_Proveedores
End Sub
Protected Sub BtnAgregaCuentaContable(ByVal sender As Object, ByVal e As EventArgs)
- Dim CuentaContable = DirectCast(sender, Button).CommandArgument.ToString
- Dim Button = DirectCast(sender, Button)
+ Dim CuentaContable As String = DirectCast(sender, Button).CommandArgument.ToString
+ Dim Button As Button = DirectCast(sender, Button)
Select Case CuentaContable
Case "Proveedores"
AgregarCuentaContable(Button, DdlCtaContProveedores)
@@ -4315,7 +4309,7 @@ Partial Class Compras_Proveedores
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaContabilidad = True Then
Dim IdCuentaContable As Integer = -1
Dim CtaCodigo As String = ""
- Dim TieneError = False
+ Dim TieneError As Boolean = False
Dim CveConceptoContable As Integer = -1
Dim Codigo As String = ""
@@ -4325,7 +4319,7 @@ Partial Class Compras_Proveedores
ObjContaAC.IniciaTransacSQL()
ObjProveedores.IniciaTransacSQL()
- Dim CuentaPadre = -1
+ Dim CuentaPadre As Integer = -1
Dim TipoCuenta As String = "D"
@@ -4357,13 +4351,13 @@ Partial Class Compras_Proveedores
End Select
'SI EL NOMBRE DEL PROVEEDOR ES MAYOR DE 50 LO CORTAMOS
- Dim NombreCuenta = If(TxtRazonSocial.Text.Trim.Length > 50, TxtRazonSocial.Text.Trim.Substring(0, 50), TxtRazonSocial.Text.Trim)
+ Dim NombreCuenta As String = If(TxtRazonSocial.Text.Trim.Length > 50, TxtRazonSocial.Text.Trim.Substring(0, 50), TxtRazonSocial.Text.Trim)
IdCuentaContable = ObjContaAC.AddSiguienteCuentaHijo(CuentaPadre, NombreCuenta, "D", 2)
If IdCuentaContable > 0 Then
ObjContaAC.GetCuentas(IdCuentaContable, "-1", -1)
- Dim dt = ObjContaAC.DtResultados
+ Dim dt As DataTable = ObjContaAC.DtResultados
If dt.Rows.Count = 1 Then
diff --git a/Compras/RepCxP.aspx.vb b/Compras/RepCxP.aspx.vb
index 18fc3d0ee..c34aa197e 100644
--- a/Compras/RepCxP.aspx.vb
+++ b/Compras/RepCxP.aspx.vb
@@ -270,7 +270,7 @@ Partial Class Compras_RepCxP
GvCxP.DataBind()
UPPDatos.Update()
Else
- If DtDatos.Rows.Count > 0 Then
+ If DtDatos IsNot Nothing AndAlso DtDatos.Rows.Count > 0 Then
GvCxP.Columns(2).Visible = False
GvCxP.Columns(3).Visible = False
GvCxP.Columns(4).Visible = False
diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb
index 17042909b..03bb31698 100644
--- a/Compras/eFacturas.aspx.vb
+++ b/Compras/eFacturas.aspx.vb
@@ -1457,8 +1457,8 @@ Partial Class Compras_eFacturas
Dim FechaF As String = txtFechaF.Text
If txtFechaI.Text = "" Then FechaI = "-1"
If txtFechaF.Text = "" Then FechaF = "-1"
- Dim Folio = If(TxtFolio.Text.Trim.Length > 0, String.Format("%{0}%", TxtFolio.Text.Trim.ToUpper), "-1")
- Dim Proveedor = If(TxtProveedor.Text.Trim.Length > 0, String.Format("%{0}%", TxtProveedor.Text.Trim.ToUpper.Replace(" ", "%")), "-1")
+ Dim Folio As String = If(TxtFolio.Text.Trim.Length > 0, String.Format("%{0}%", TxtFolio.Text.Trim.ToUpper), "-1")
+ Dim Proveedor As String = If(TxtProveedor.Text.Trim.Length > 0, String.Format("%{0}%", TxtProveedor.Text.Trim.ToUpper.Replace(" ", "%")), "-1")
Dim dt As DataTable = Nothing
If ObjDatos.GetFacturas(-1, Folio, txtFechaI.Text.Trim.ToDate, txtFechaF.Text.Trim.ToDate, "-1", Proveedor, DdlValidado.SelectedValue.ToEntero, DdlResponsable.SelectedValue.ToEntero, DdlClasificacionProv.SelectedValue.ToEntero, DdlCveTipoProveedor.SelectedValue.ToEntero, DdlTipoComprobante.SelectedValue.ToString, UsuarioActual.CveEmpresa) Then
@@ -1663,7 +1663,7 @@ Partial Class Compras_eFacturas
swTiempo.AppendFormat("BorrarInicio: ({0}) {1} ", sw.ElapsedMilliseconds - swmili, sw.ElapsedMilliseconds)
swmili = sw.ElapsedMilliseconds
sw.Start()
- For Each filePath In ListXML
+ For Each filePath As String In ListXML
Try
File.Delete(filePath)
Catch ex As Exception
@@ -2468,7 +2468,7 @@ Partial Class Compras_eFacturas
parametros.Add(New ReportParameter("EmiNombre", EmiNombre))
parametros.Add(New ReportParameter("EmiRFC", EmiRFC))
parametros.Add(New ReportParameter("NoSerieCertificado", NoSerieCertificado))
- parametros.Add(New ReportParameter("TotalLetra", Total.ToDouble().Texto2Letras(CveMoneda:=If(Moneda = "MXN", 1, If(Moneda = "USD", 2, 3)))))
+ parametros.Add(New ReportParameter("TotalLetra", Total.ToDecimal.Texto2Letras(CveMoneda:=If(Moneda = "MXN", 1, If(Moneda = "USD", 2, 3)))))
parametros.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
'params.Add(New ReportParameter("DTConceptos", DTConceptos))
@@ -3800,15 +3800,12 @@ Partial Class Compras_eFacturas
' Exit Sub
'End If
- Dim TieneError = False
+ Dim TieneError As Boolean = False
Dim ObjCompra As New ClsCompras
ObjCompra.IniciaTransacSQL()
-
For Each Gv As GridViewRow In GVPDocumentosRelacionadosPagos.Rows
-
-
If Gv.DataKey("CveCompra").ToEntero > 0 And Gv.DataKey("CveIE").ToEntero > 0 Then
If Not ObjCompra.AddComplementoPago(Gv.DataKey("CveIE").ToEntero, Gv.DataKey("CveCompra").ToEntero, Gv.DataKey("ImpPagado").ToDecimal, Gv.DataKey("CvePrePolizaDetalle").ToEntero, CveFacturaPago) > 0 Then
@@ -3850,22 +3847,17 @@ Partial Class Compras_eFacturas
Dim objEventos As New ClsOIEventos(ObjCompra.IniciaTransacSQL)
If ViculacionConPUE Then
-
-
- For Each CveCompraVinculada In ListaComprasPUE
+ For Each CveCompraVinculada As Integer In ListaComprasPUE
objEventos.AddEventoBitacora($"Complemento { ComplementoConPUE } vinculado manualmente (Compra PUE) ", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra:=CveCompraVinculada)
Next
-
End If
-
For Each Gv As GridViewRow In GVPDocumentosRelacionadosPagos.Rows
If Boolean.Parse(Gv.DataKey("Manual").ToString) Then
objEventos.AddEventoBitacora($"Complemento { LblSerieFolioPago.Text} vinculado manualmente a compra {Gv.DataKey("SerieFolio").ToString} y Pago { Gv.DataKey("FolioPago").ToString }", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra:=Gv.DataKey("CveCompra").ToString.ToEntero)
End If
Next
-
'If HdnCveIE.Value.ToEntero > 0 Then
' For Each dRow As DataRow In DT_ComprasSinIE.Rows
@@ -3991,12 +3983,9 @@ Partial Class Compras_eFacturas
Dim Vinculados As Integer = 0
Dim TodoVinculado As Boolean = False
- Dim Diferencia As Boolean = If(Math.Abs(DTGVPagosVinculacion.SUM("ImpPagado") - DTGVPagosVinculacion.SUM("ImportePago")).ToDecimal > 0.1D, True, False)
+ Dim Diferencia As Boolean = If(Math.Abs(DTGVPagosVinculacion.SUM("ImpPagado") - DTGVPagosVinculacion.SUM("ImportePago")) > 0.1D, True, False)
Dim VinculacionManual As Boolean = If(DTGVPagosVinculacion.FiltraParametros("Manual = 1").Rows.Count > 0, True, False)
-
-
-
Dim PermisoVinculacionDiferencia As Boolean = UsuarioActual.TienePermisoProceso(286)
Dim PermisoVinculacionManual As Boolean = UsuarioActual.TienePermisoProceso(286)
@@ -4111,10 +4100,8 @@ Partial Class Compras_eFacturas
LiteralVincular.Text = "-"
End If
e.Row.Cells(6).Controls.Add(LiteralVincular)
-
End If
-
Else
e.Row.Cells(4).Text = ""
e.Row.ToolTip = "Factura recibida sin registrar"
@@ -4129,11 +4116,8 @@ Partial Class Compras_eFacturas
End Sub
-
#End Region
-
-
Public Sub ImprimirPDFXML(NombreArchivo As String, rutaxml As String)
Dim objxml As XmlSatCFDI = XmlSatCFDI.readXML(rutaxml)
@@ -6851,7 +6835,7 @@ Public Class Compra2
End If
Dim Msg As String = ""
- Dim SubtotalTemp As Decimal = TmpDT.SUMD("Total") + Math.Round(TmpDT.SUM("Descuento") + Math.Round(TmpDT.SUM("Amortizacion")), 2).ToDecimal
+ Dim SubtotalTemp As Decimal = TmpDT.SUMD("Total") + Math.Round(TmpDT.SUM("Descuento") + Math.Round(TmpDT.SUM("Amortizacion")), 2)
Dim DescuentosTemp As Decimal = TmpDT.SUMD("Descuento")
Dim Subtotal2Temp As Decimal = TmpDT.SUMD("Total")
Dim IVATemp As Decimal = TmpDT.SUMD("IVA")
diff --git a/Contabilidad/ContabilizacionVentas.aspx.cs b/Contabilidad/ContabilizacionVentas.aspx.cs
index 2549a4512..c565f3bdc 100644
--- a/Contabilidad/ContabilizacionVentas.aspx.cs
+++ b/Contabilidad/ContabilizacionVentas.aspx.cs
@@ -97,8 +97,8 @@ public partial class Contabilidad_ContabilizacionVentas : ClsPaginas
{
if (contP.DtResultados.Rows.Count > 0)
{
- Double Abonos = 0;
- Double Cargos = 0;
+ decimal Abonos = 0;
+ decimal Cargos = 0;
Abonos = contP.DtResultados.SUM("Abono");
Cargos = contP.DtResultados.SUM("Cargo");
diff --git a/Contabilidad/DiarioCompras.aspx.vb b/Contabilidad/DiarioCompras.aspx.vb
index 3d3477894..eae076218 100644
--- a/Contabilidad/DiarioCompras.aspx.vb
+++ b/Contabilidad/DiarioCompras.aspx.vb
@@ -239,7 +239,7 @@ Partial Class Contabilidad_DiarioCompras
If contextKey.ToEntero > 0 Then
- Retorno = String.Format("---{0}---", contextKey.ToDouble.Texto2Letras)
+ Retorno = String.Format("---{0}---", contextKey.ToDecimal.Texto2Letras)
End If
Return Retorno
diff --git a/Contabilidad/DiarioPagos.aspx.vb b/Contabilidad/DiarioPagos.aspx.vb
index c903edb12..b92daaddf 100644
--- a/Contabilidad/DiarioPagos.aspx.vb
+++ b/Contabilidad/DiarioPagos.aspx.vb
@@ -1309,7 +1309,7 @@ Partial Class Contabilidad_DiarioPagos
If contextKey.ToEntero > 0 Then
- Retorno = String.Format("---{0}---", contextKey.ToDouble.Texto2Letras)
+ Retorno = String.Format("---{0}---", contextKey.ToDecimal.Texto2Letras)
End If
Return Retorno
diff --git a/Contabilidad2/CatCuentas.aspx.vb b/Contabilidad2/CatCuentas.aspx.vb
index ce3ff3bfb..f8cd86cfe 100644
--- a/Contabilidad2/CatCuentas.aspx.vb
+++ b/Contabilidad2/CatCuentas.aspx.vb
@@ -488,13 +488,18 @@ Partial Class Contabilidad2_CatCuentas
DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString, CveConceptoAdmin:=CveConceptoAdmin, CveProveedor:=CveProveedor, CveCliente:=CveCliente,
CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeImpuesto, CveBancoCuenta:=CveBancoCuenta)
If idnew > 0 Then
- If Not ObjConta.UpdateTraspasoPrepoliza(UsuarioActual.CveEmpresa, IDSelected, idnew) Then
+ If ObjConta.UpdateTraspasoPrepoliza(UsuarioActual.CveEmpresa, IDSelected, idnew) Then
If Not ObjConta.UpdateCuenta(IDSelected.ToEntero, NombreCuenta, TipoCuenta, CuentaMayor, CveMoneda,
DigAgrup, CveAgrupadorSat, NomIdioma) Then
+ TieneError = True
ObjConta.RollBack()
ObjConta.Dispose()
Exit Sub
End If
+ Else
+ TieneError = True
+ ObjConta.RollBack()
+ ObjConta.Dispose()
End If
End If
End If
diff --git a/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb b/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb
index e11cceb97..70b743efd 100644
--- a/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb
+++ b/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb
@@ -817,25 +817,25 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
TotalAnterior += dr("ImporteAcumulado").ToString.ToDecimal
Next
- Dim Enero As Decimal = (DtIngresosMesH.SUM("Enero", "NOT CtaMayor in (3,4)")).ToDecimal
- Dim Febrero As Decimal = (DtIngresosMesH.SUM("Febrero", "NOT CtaMayor in (3,4)")).ToDecimal
- Dim Marzo As Decimal = (DtIngresosMesH.SUM("Marzo", "NOT CtaMayor in (3,4)")).ToDecimal
- Dim Abril As Decimal = (DtIngresosMesH.SUM("Abril", "NOT CtaMayor in (3,4)")).ToDecimal
- Dim Mayo As Decimal = (DtIngresosMesH.SUM("Mayo", "NOT CtaMayor in (3,4)")).ToDecimal
- Dim Junio As Decimal = (DtIngresosMesH.SUM("Junio", "NOT CtaMayor in (3,4)")).ToDecimal
- Dim Julio As Decimal = (DtIngresosMesH.SUM("Julio", "NOT CtaMayor in (3,4)")).ToDecimal
- Dim Agosto As Decimal = (DtIngresosMesH.SUM("Agosto", "NOT CtaMayor in (3,4)")).ToDecimal
- Dim Septiembre As Decimal = (DtIngresosMesH.SUM("Septiembre", "NOT CtaMayor in (3,4)")).ToDecimal
- Dim Octubre As Decimal = (DtIngresosMesH.SUM("Octubre", "NOT CtaMayor in (3,4)")).ToDecimal
- Dim Noviembre As Decimal = (DtIngresosMesH.SUM("Noviembre", "NOT CtaMayor in (3,4)")).ToDecimal
- Dim Diciembre As Decimal = (DtIngresosMesH.SUM("Diciembre", "NOT CtaMayor in (3,4)")).ToDecimal
- Dim Tri1 As Decimal = (DtIngresosMesH.SUM("Tri1", "NOT CtaMayor in (3,4)")).ToDecimal
- Dim Tri2 As Decimal = (DtIngresosMesH.SUM("Tri2", "NOT CtaMayor in (3,4)")).ToDecimal
- Dim Tri3 As Decimal = (DtIngresosMesH.SUM("Tri3", "NOT CtaMayor in (3,4)")).ToDecimal
- Dim Tri4 As Decimal = (DtIngresosMesH.SUM("Tri4", "NOT CtaMayor in (3,4)")).ToDecimal
- Dim Cua1 As Decimal = (DtIngresosMesH.SUM("Cua1", "NOT CtaMayor in (3,4)")).ToDecimal
- Dim Cua2 As Decimal = (DtIngresosMesH.SUM("Cua2", "NOT CtaMayor in (3,4)")).ToDecimal
- Dim Cua3 As Decimal = (DtIngresosMesH.SUM("Cua3", "NOT CtaMayor in (3,4)")).ToDecimal
+ Dim Enero As Decimal = (DtIngresosMesH.SUM("Enero", "NOT CtaMayor in (3,4)"))
+ Dim Febrero As Decimal = (DtIngresosMesH.SUM("Febrero", "NOT CtaMayor in (3,4)"))
+ Dim Marzo As Decimal = (DtIngresosMesH.SUM("Marzo", "NOT CtaMayor in (3,4)"))
+ Dim Abril As Decimal = (DtIngresosMesH.SUM("Abril", "NOT CtaMayor in (3,4)"))
+ Dim Mayo As Decimal = (DtIngresosMesH.SUM("Mayo", "NOT CtaMayor in (3,4)"))
+ Dim Junio As Decimal = (DtIngresosMesH.SUM("Junio", "NOT CtaMayor in (3,4)"))
+ Dim Julio As Decimal = (DtIngresosMesH.SUM("Julio", "NOT CtaMayor in (3,4)"))
+ Dim Agosto As Decimal = (DtIngresosMesH.SUM("Agosto", "NOT CtaMayor in (3,4)"))
+ Dim Septiembre As Decimal = (DtIngresosMesH.SUM("Septiembre", "NOT CtaMayor in (3,4)"))
+ Dim Octubre As Decimal = (DtIngresosMesH.SUM("Octubre", "NOT CtaMayor in (3,4)"))
+ Dim Noviembre As Decimal = (DtIngresosMesH.SUM("Noviembre", "NOT CtaMayor in (3,4)"))
+ Dim Diciembre As Decimal = (DtIngresosMesH.SUM("Diciembre", "NOT CtaMayor in (3,4)"))
+ Dim Tri1 As Decimal = (DtIngresosMesH.SUM("Tri1", "NOT CtaMayor in (3,4)"))
+ Dim Tri2 As Decimal = (DtIngresosMesH.SUM("Tri2", "NOT CtaMayor in (3,4)"))
+ Dim Tri3 As Decimal = (DtIngresosMesH.SUM("Tri3", "NOT CtaMayor in (3,4)"))
+ Dim Tri4 As Decimal = (DtIngresosMesH.SUM("Tri4", "NOT CtaMayor in (3,4)"))
+ Dim Cua1 As Decimal = (DtIngresosMesH.SUM("Cua1", "NOT CtaMayor in (3,4)"))
+ Dim Cua2 As Decimal = (DtIngresosMesH.SUM("Cua2", "NOT CtaMayor in (3,4)"))
+ Dim Cua3 As Decimal = (DtIngresosMesH.SUM("Cua3", "NOT CtaMayor in (3,4)"))
Row.Item("Enero") = Enero
@@ -909,45 +909,45 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
TotalAnterior += dr("ImporteAcumulado").ToString.ToDecimal
Next
- Dim Enero As Decimal = (DtGastosMesH.SUM("Enero", "NOT CtaMayor in (3,4)")).ToDecimal
- Dim Febrero As Decimal = (DtGastosMesH.SUM("Febrero", "NOT CtaMayor in (3,4)")).ToDecimal
- Dim Marzo As Decimal = (DtGastosMesH.SUM("Marzo", "NOT CtaMayor in (3,4)")).ToDecimal
- Dim Abril As Decimal = (DtGastosMesH.SUM("Abril", "NOT CtaMayor in (3,4)")).ToDecimal
- Dim Mayo As Decimal = (DtGastosMesH.SUM("Mayo", "NOT CtaMayor in (3,4)")).ToDecimal
- Dim Junio As Decimal = (DtGastosMesH.SUM("Junio", "NOT CtaMayor in (3,4)")).ToDecimal
- Dim Julio As Decimal = (DtGastosMesH.SUM("Julio", "NOT CtaMayor in (3,4)")).ToDecimal
- Dim Agosto As Decimal = (DtGastosMesH.SUM("Agosto", "NOT CtaMayor in (3,4)")).ToDecimal
- Dim Septiembre As Decimal = (DtGastosMesH.SUM("Septiembre", "NOT CtaMayor in (3,4)")).ToDecimal
- Dim Octubre As Decimal = (DtGastosMesH.SUM("Octubre", "NOT CtaMayor in (3,4)")).ToDecimal
- Dim Noviembre As Decimal = (DtGastosMesH.SUM("Noviembre", "NOT CtaMayor in (3,4)")).ToDecimal
- Dim Diciembre As Decimal = (DtGastosMesH.SUM("Diciembre", "NOT CtaMayor in (3,4)")).ToDecimal
- Dim Tri1 As Decimal = (DtGastosMesH.SUM("Tri1", "NOT CtaMayor in (3,4)")).ToDecimal
- Dim Tri2 As Decimal = (DtGastosMesH.SUM("Tri2", "NOT CtaMayor in (3,4)")).ToDecimal
- Dim Tri3 As Decimal = (DtGastosMesH.SUM("Tri3", "NOT CtaMayor in (3,4)")).ToDecimal
- Dim Tri4 As Decimal = (DtGastosMesH.SUM("Tri4", "NOT CtaMayor in (3,4)")).ToDecimal
- Dim Cua1 As Decimal = (DtGastosMesH.SUM("Cua1", "NOT CtaMayor in (3,4)")).ToDecimal
- Dim Cua2 As Decimal = (DtGastosMesH.SUM("Cua2", "NOT CtaMayor in (3,4)")).ToDecimal
- Dim Cua3 As Decimal = (DtGastosMesH.SUM("Cua3", "NOT CtaMayor in (3,4)")).ToDecimal
+ Dim Enero As Decimal = (DtGastosMesH.SUM("Enero", "NOT CtaMayor in (3,4)"))
+ Dim Febrero As Decimal = (DtGastosMesH.SUM("Febrero", "NOT CtaMayor in (3,4)"))
+ Dim Marzo As Decimal = (DtGastosMesH.SUM("Marzo", "NOT CtaMayor in (3,4)"))
+ Dim Abril As Decimal = (DtGastosMesH.SUM("Abril", "NOT CtaMayor in (3,4)"))
+ Dim Mayo As Decimal = (DtGastosMesH.SUM("Mayo", "NOT CtaMayor in (3,4)"))
+ Dim Junio As Decimal = (DtGastosMesH.SUM("Junio", "NOT CtaMayor in (3,4)"))
+ Dim Julio As Decimal = (DtGastosMesH.SUM("Julio", "NOT CtaMayor in (3,4)"))
+ Dim Agosto As Decimal = (DtGastosMesH.SUM("Agosto", "NOT CtaMayor in (3,4)"))
+ Dim Septiembre As Decimal = (DtGastosMesH.SUM("Septiembre", "NOT CtaMayor in (3,4)"))
+ Dim Octubre As Decimal = (DtGastosMesH.SUM("Octubre", "NOT CtaMayor in (3,4)"))
+ Dim Noviembre As Decimal = (DtGastosMesH.SUM("Noviembre", "NOT CtaMayor in (3,4)"))
+ Dim Diciembre As Decimal = (DtGastosMesH.SUM("Diciembre", "NOT CtaMayor in (3,4)"))
+ Dim Tri1 As Decimal = (DtGastosMesH.SUM("Tri1", "NOT CtaMayor in (3,4)"))
+ Dim Tri2 As Decimal = (DtGastosMesH.SUM("Tri2", "NOT CtaMayor in (3,4)"))
+ Dim Tri3 As Decimal = (DtGastosMesH.SUM("Tri3", "NOT CtaMayor in (3,4)"))
+ Dim Tri4 As Decimal = (DtGastosMesH.SUM("Tri4", "NOT CtaMayor in (3,4)"))
+ Dim Cua1 As Decimal = (DtGastosMesH.SUM("Cua1", "NOT CtaMayor in (3,4)"))
+ Dim Cua2 As Decimal = (DtGastosMesH.SUM("Cua2", "NOT CtaMayor in (3,4)"))
+ Dim Cua3 As Decimal = (DtGastosMesH.SUM("Cua3", "NOT CtaMayor in (3,4)"))
- Dim Ingreso_Enero As Decimal = (DtIngresosMesH.SUM("Enero", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
- Dim Ingreso_Febrero As Decimal = (DtIngresosMesH.SUM("Febrero", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
- Dim Ingreso_Marzo As Decimal = (DtIngresosMesH.SUM("Marzo", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
- Dim Ingreso_Abril As Decimal = (DtIngresosMesH.SUM("Abril", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
- Dim Ingreso_Mayo As Decimal = (DtIngresosMesH.SUM("Mayo", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
- Dim Ingreso_Junio As Decimal = (DtIngresosMesH.SUM("Junio", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
- Dim Ingreso_Julio As Decimal = (DtIngresosMesH.SUM("Julio", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
- Dim Ingreso_Agosto As Decimal = (DtIngresosMesH.SUM("Agosto", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
- Dim Ingreso_Septiembre As Decimal = (DtIngresosMesH.SUM("Septiembre", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
- Dim Ingreso_Octubre As Decimal = (DtIngresosMesH.SUM("Octubre", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
- Dim Ingreso_Noviembre As Decimal = (DtIngresosMesH.SUM("Noviembre", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
- Dim Ingreso_Diciembre As Decimal = (DtIngresosMesH.SUM("Diciembre", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
- Dim Ingreso_Tri1 As Decimal = (DtIngresosMesH.SUM("Tri1", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
- Dim Ingreso_Tri2 As Decimal = (DtIngresosMesH.SUM("Tri2", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
- Dim Ingreso_Tri3 As Decimal = (DtIngresosMesH.SUM("Tri3", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
- Dim Ingreso_Tri4 As Decimal = (DtIngresosMesH.SUM("Tri4", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
- Dim Ingreso_Cua1 As Decimal = (DtIngresosMesH.SUM("Cua1", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
- Dim Ingreso_Cua2 As Decimal = (DtIngresosMesH.SUM("Cua2", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
- Dim Ingreso_Cua3 As Decimal = (DtIngresosMesH.SUM("Cua3", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
+ Dim Ingreso_Enero As Decimal = (DtIngresosMesH.SUM("Enero", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
+ Dim Ingreso_Febrero As Decimal = (DtIngresosMesH.SUM("Febrero", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
+ Dim Ingreso_Marzo As Decimal = (DtIngresosMesH.SUM("Marzo", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
+ Dim Ingreso_Abril As Decimal = (DtIngresosMesH.SUM("Abril", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
+ Dim Ingreso_Mayo As Decimal = (DtIngresosMesH.SUM("Mayo", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
+ Dim Ingreso_Junio As Decimal = (DtIngresosMesH.SUM("Junio", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
+ Dim Ingreso_Julio As Decimal = (DtIngresosMesH.SUM("Julio", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
+ Dim Ingreso_Agosto As Decimal = (DtIngresosMesH.SUM("Agosto", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
+ Dim Ingreso_Septiembre As Decimal = (DtIngresosMesH.SUM("Septiembre", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
+ Dim Ingreso_Octubre As Decimal = (DtIngresosMesH.SUM("Octubre", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
+ Dim Ingreso_Noviembre As Decimal = (DtIngresosMesH.SUM("Noviembre", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
+ Dim Ingreso_Diciembre As Decimal = (DtIngresosMesH.SUM("Diciembre", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
+ Dim Ingreso_Tri1 As Decimal = (DtIngresosMesH.SUM("Tri1", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
+ Dim Ingreso_Tri2 As Decimal = (DtIngresosMesH.SUM("Tri2", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
+ Dim Ingreso_Tri3 As Decimal = (DtIngresosMesH.SUM("Tri3", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
+ Dim Ingreso_Tri4 As Decimal = (DtIngresosMesH.SUM("Tri4", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
+ Dim Ingreso_Cua1 As Decimal = (DtIngresosMesH.SUM("Cua1", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
+ Dim Ingreso_Cua2 As Decimal = (DtIngresosMesH.SUM("Cua2", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
+ Dim Ingreso_Cua3 As Decimal = (DtIngresosMesH.SUM("Cua3", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
Row.Item("Enero") = Enero
Row.Item("Febrero") = Febrero
@@ -1011,46 +1011,46 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
Row = DTTotalesMesH.NewRow
- Dim ImporteAcumuladoTotal As Decimal = (DtIngresosMesH.SUM("ImporteAcumulado", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("ImporteAcumulado", "NOT CtaMayor in (-1,3,4)")).ToDecimal
- Dim Enero As Decimal = (DtIngresosMesH.SUM("Enero", "Not CtaMayor In (-1, 3, 4)") - DtGastosMesH.SUM("Enero", "Not CtaMayor in (-1,3,4)")).ToDecimal
- Dim Febrero As Decimal = (DtIngresosMesH.SUM("Febrero", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Febrero", "NOT CtaMayor in (-1,3,4)")).ToDecimal
- Dim Marzo As Decimal = (DtIngresosMesH.SUM("Marzo", "Not CtaMayor In (-1, 3, 4)") - DtGastosMesH.SUM("Marzo", "Not CtaMayor in (-1,3,4)")).ToDecimal
- Dim Abril As Decimal = (DtIngresosMesH.SUM("Abril", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Abril", "NOT CtaMayor in (-1,3,4)")).ToDecimal
- Dim Mayo As Decimal = (DtIngresosMesH.SUM("Mayo", "Not CtaMayor In (-1, 3, 4)") - DtGastosMesH.SUM("Mayo", "Not CtaMayor in (-1,3,4)")).ToDecimal
- Dim Junio As Decimal = (DtIngresosMesH.SUM("Junio", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Junio", "NOT CtaMayor in (-1,3,4)")).ToDecimal
- Dim Julio As Decimal = (DtIngresosMesH.SUM("Julio", "Not CtaMayor In (-1, 3, 4)") - DtGastosMesH.SUM("Julio", "Not CtaMayor in (-1,3,4)")).ToDecimal
- Dim Agosto As Decimal = (DtIngresosMesH.SUM("Agosto", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Agosto", "NOT CtaMayor in (-1,3,4)")).ToDecimal
- Dim Septiembre As Decimal = (DtIngresosMesH.SUM("Septiembre", "Not CtaMayor In (-1, 3, 4)") - DtGastosMesH.SUM("Septiembre", "Not CtaMayor in (-1,3,4)")).ToDecimal
- Dim Octubre As Decimal = (DtIngresosMesH.SUM("Octubre", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Octubre", "NOT CtaMayor in (-1,3,4)")).ToDecimal
- Dim Noviembre As Decimal = (DtIngresosMesH.SUM("Noviembre", "Not CtaMayor In (-1, 3, 4)") - DtGastosMesH.SUM("Noviembre", "Not CtaMayor in (-1,3,4)")).ToDecimal
- Dim Diciembre As Decimal = (DtIngresosMesH.SUM("Diciembre", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Diciembre", "NOT CtaMayor in (-1,3,4)")).ToDecimal
- Dim Tri1 As Decimal = (DtIngresosMesH.SUM("Tri1", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Tri1", "NOT CtaMayor in (-1,3,4)")).ToDecimal
- Dim Tri2 As Decimal = (DtIngresosMesH.SUM("Tri2", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Tri2", "NOT CtaMayor in (-1,3,4)")).ToDecimal
- Dim Tri3 As Decimal = (DtIngresosMesH.SUM("Tri3", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Tri3", "NOT CtaMayor in (-1,3,4)")).ToDecimal
- Dim Tri4 As Decimal = (DtIngresosMesH.SUM("Tri4", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Tri4", "NOT CtaMayor in (-1,3,4)")).ToDecimal
- Dim Cua1 As Decimal = (DtIngresosMesH.SUM("Cua1", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Cua1", "NOT CtaMayor in (-1,3,4)")).ToDecimal
- Dim Cua2 As Decimal = (DtIngresosMesH.SUM("Cua2", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Cua2", "NOT CtaMayor in (-1,3,4)")).ToDecimal
- Dim Cua3 As Decimal = (DtIngresosMesH.SUM("Cua3", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Cua3", "NOT CtaMayor in (-1,3,4)")).ToDecimal
+ Dim ImporteAcumuladoTotal As Decimal = (DtIngresosMesH.SUM("ImporteAcumulado", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("ImporteAcumulado", "NOT CtaMayor in (-1,3,4)"))
+ Dim Enero As Decimal = (DtIngresosMesH.SUM("Enero", "Not CtaMayor In (-1, 3, 4)") - DtGastosMesH.SUM("Enero", "Not CtaMayor in (-1,3,4)"))
+ Dim Febrero As Decimal = (DtIngresosMesH.SUM("Febrero", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Febrero", "NOT CtaMayor in (-1,3,4)"))
+ Dim Marzo As Decimal = (DtIngresosMesH.SUM("Marzo", "Not CtaMayor In (-1, 3, 4)") - DtGastosMesH.SUM("Marzo", "Not CtaMayor in (-1,3,4)"))
+ Dim Abril As Decimal = (DtIngresosMesH.SUM("Abril", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Abril", "NOT CtaMayor in (-1,3,4)"))
+ Dim Mayo As Decimal = (DtIngresosMesH.SUM("Mayo", "Not CtaMayor In (-1, 3, 4)") - DtGastosMesH.SUM("Mayo", "Not CtaMayor in (-1,3,4)"))
+ Dim Junio As Decimal = (DtIngresosMesH.SUM("Junio", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Junio", "NOT CtaMayor in (-1,3,4)"))
+ Dim Julio As Decimal = (DtIngresosMesH.SUM("Julio", "Not CtaMayor In (-1, 3, 4)") - DtGastosMesH.SUM("Julio", "Not CtaMayor in (-1,3,4)"))
+ Dim Agosto As Decimal = (DtIngresosMesH.SUM("Agosto", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Agosto", "NOT CtaMayor in (-1,3,4)"))
+ Dim Septiembre As Decimal = (DtIngresosMesH.SUM("Septiembre", "Not CtaMayor In (-1, 3, 4)") - DtGastosMesH.SUM("Septiembre", "Not CtaMayor in (-1,3,4)"))
+ Dim Octubre As Decimal = (DtIngresosMesH.SUM("Octubre", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Octubre", "NOT CtaMayor in (-1,3,4)"))
+ Dim Noviembre As Decimal = (DtIngresosMesH.SUM("Noviembre", "Not CtaMayor In (-1, 3, 4)") - DtGastosMesH.SUM("Noviembre", "Not CtaMayor in (-1,3,4)"))
+ Dim Diciembre As Decimal = (DtIngresosMesH.SUM("Diciembre", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Diciembre", "NOT CtaMayor in (-1,3,4)"))
+ Dim Tri1 As Decimal = (DtIngresosMesH.SUM("Tri1", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Tri1", "NOT CtaMayor in (-1,3,4)"))
+ Dim Tri2 As Decimal = (DtIngresosMesH.SUM("Tri2", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Tri2", "NOT CtaMayor in (-1,3,4)"))
+ Dim Tri3 As Decimal = (DtIngresosMesH.SUM("Tri3", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Tri3", "NOT CtaMayor in (-1,3,4)"))
+ Dim Tri4 As Decimal = (DtIngresosMesH.SUM("Tri4", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Tri4", "NOT CtaMayor in (-1,3,4)"))
+ Dim Cua1 As Decimal = (DtIngresosMesH.SUM("Cua1", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Cua1", "NOT CtaMayor in (-1,3,4)"))
+ Dim Cua2 As Decimal = (DtIngresosMesH.SUM("Cua2", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Cua2", "NOT CtaMayor in (-1,3,4)"))
+ Dim Cua3 As Decimal = (DtIngresosMesH.SUM("Cua3", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Cua3", "NOT CtaMayor in (-1,3,4)"))
- Dim Ingreso_Enero As Decimal = (DtIngresosMesH.SUM("Enero", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
- Dim Ingreso_Febrero As Decimal = (DtIngresosMesH.SUM("Febrero", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
- Dim Ingreso_Marzo As Decimal = (DtIngresosMesH.SUM("Marzo", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
- Dim Ingreso_Abril As Decimal = (DtIngresosMesH.SUM("Abril", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
- Dim Ingreso_Mayo As Decimal = (DtIngresosMesH.SUM("Mayo", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
- Dim Ingreso_Junio As Decimal = (DtIngresosMesH.SUM("Junio", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
- Dim Ingreso_Julio As Decimal = (DtIngresosMesH.SUM("Julio", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
- Dim Ingreso_Agosto As Decimal = (DtIngresosMesH.SUM("Agosto", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
- Dim Ingreso_Septiembre As Decimal = (DtIngresosMesH.SUM("Septiembre", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
- Dim Ingreso_Octubre As Decimal = (DtIngresosMesH.SUM("Octubre", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
- Dim Ingreso_Noviembre As Decimal = (DtIngresosMesH.SUM("Noviembre", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
- Dim Ingreso_Diciembre As Decimal = (DtIngresosMesH.SUM("Diciembre", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
- Dim Ingreso_Tri1 As Decimal = (DtIngresosMesH.SUM("Tri1", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
- Dim Ingreso_Tri2 As Decimal = (DtIngresosMesH.SUM("Tri2", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
- Dim Ingreso_Tri3 As Decimal = (DtIngresosMesH.SUM("Tri3", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
- Dim Ingreso_Tri4 As Decimal = (DtIngresosMesH.SUM("Tri4", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
- Dim Ingreso_Cua1 As Decimal = (DtIngresosMesH.SUM("Cua1", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
- Dim Ingreso_Cua2 As Decimal = (DtIngresosMesH.SUM("Cua2", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
- Dim Ingreso_Cua3 As Decimal = (DtIngresosMesH.SUM("Cua3", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal
+ Dim Ingreso_Enero As Decimal = (DtIngresosMesH.SUM("Enero", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
+ Dim Ingreso_Febrero As Decimal = (DtIngresosMesH.SUM("Febrero", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
+ Dim Ingreso_Marzo As Decimal = (DtIngresosMesH.SUM("Marzo", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
+ Dim Ingreso_Abril As Decimal = (DtIngresosMesH.SUM("Abril", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
+ Dim Ingreso_Mayo As Decimal = (DtIngresosMesH.SUM("Mayo", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
+ Dim Ingreso_Junio As Decimal = (DtIngresosMesH.SUM("Junio", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
+ Dim Ingreso_Julio As Decimal = (DtIngresosMesH.SUM("Julio", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
+ Dim Ingreso_Agosto As Decimal = (DtIngresosMesH.SUM("Agosto", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
+ Dim Ingreso_Septiembre As Decimal = (DtIngresosMesH.SUM("Septiembre", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
+ Dim Ingreso_Octubre As Decimal = (DtIngresosMesH.SUM("Octubre", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
+ Dim Ingreso_Noviembre As Decimal = (DtIngresosMesH.SUM("Noviembre", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
+ Dim Ingreso_Diciembre As Decimal = (DtIngresosMesH.SUM("Diciembre", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
+ Dim Ingreso_Tri1 As Decimal = (DtIngresosMesH.SUM("Tri1", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
+ Dim Ingreso_Tri2 As Decimal = (DtIngresosMesH.SUM("Tri2", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
+ Dim Ingreso_Tri3 As Decimal = (DtIngresosMesH.SUM("Tri3", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
+ Dim Ingreso_Tri4 As Decimal = (DtIngresosMesH.SUM("Tri4", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
+ Dim Ingreso_Cua1 As Decimal = (DtIngresosMesH.SUM("Cua1", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
+ Dim Ingreso_Cua2 As Decimal = (DtIngresosMesH.SUM("Cua2", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
+ Dim Ingreso_Cua3 As Decimal = (DtIngresosMesH.SUM("Cua3", "NOT CtaMayor in (3,4) AND CveCuenta > 0 "))
Row.Item("Enero") = Enero
Row.Item("Febrero") = Febrero
diff --git a/Contabilidad2/Reportes/RepSituacionFinanciera.rdlc b/Contabilidad2/Reportes/RepSituacionFinanciera.rdlc
index 88f3e7afc..40ceecb3d 100644
--- a/Contabilidad2/Reportes/RepSituacionFinanciera.rdlc
+++ b/Contabilidad2/Reportes/RepSituacionFinanciera.rdlc
@@ -382,7 +382,7 @@
- 2.6512cm
+ 2.36545cm0.31432cm1.65cm10.42504cm
@@ -703,7 +703,7 @@
- 4.74417cm
+ 4.45842cm0.31432cm1.65cm10.42504cm
@@ -1028,7 +1028,7 @@
- 2.6512cm
+ 2.36545cm10.77464cm1.65cm9.69396cm
@@ -1347,7 +1347,7 @@
- 4.74417cm
+ 4.45842cm10.77464cm1.65cm9.69396cm
@@ -1379,7 +1379,7 @@
Textbox28
- 1.91009cm
+ 1.62434cm0.31432cm0.6cm10.46032cm
@@ -1413,7 +1413,7 @@
Textbox28
- 1.91009cm
+ 1.62434cm10.77464cm0.6cm9.69395cm
@@ -1741,7 +1741,7 @@
- 8.30193cm
+ 8.01618cm10.77464cm1.65cm9.69396cm
@@ -1774,7 +1774,7 @@
Textbox28
- 7.52554cm
+ 7.23979cm10.77464cm0.6cm9.69395cm
@@ -1811,7 +1811,7 @@
Textbox45
- 10.22837cm
+ 9.94262cm10.77464cm0.6cm4.89717cm
@@ -1848,7 +1848,7 @@
Textbox45
- 10.22837cm
+ 9.94262cm18.55801cm0.6cm1.91058cm
@@ -1888,7 +1888,7 @@
Textbox45
- 10.22837cm
+ 9.94262cm15.67181cm0.6cm2.88621cm
@@ -1925,7 +1925,7 @@
Textbox45
- 11.12267cm
+ 10.83692cm10.77464cm0.6cm4.89717cm
@@ -1962,7 +1962,7 @@
Textbox45
- 11.12267cm
+ 10.83692cm18.55801cm0.6cm1.91058cm
@@ -2002,7 +2002,7 @@
Textbox45
- 11.12267cm
+ 10.83692cm15.67181cm0.6cm2.88621cm
@@ -2039,7 +2039,7 @@
Textbox45
- 6.57056cm
+ 6.28481cm10.77464cm0.6cm5.21467cm
@@ -2076,7 +2076,7 @@
Textbox45
- 6.53528cm
+ 6.24953cm18.55801cm0.63528cm1.91058cm
@@ -2116,7 +2116,7 @@
Textbox45
- 6.57056cm
+ 6.28481cm15.98931cm0.6cm2.56871cm
@@ -2151,7 +2151,7 @@
Textbox73
- 11.81312cm
+ 11.52737cm10.77464cm0.6cm9.69395cm
@@ -2172,7 +2172,7 @@
FitProportional0.03141cm0.31432cm
- 1.5cm
+ 1.46783cm5.36361cm18
- 4.88706in
+ 4.77456in