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/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..b4fbeae9e 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
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index 772323ed2..f7601b53f 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -5492,7 +5492,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 +6460,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 +6902,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 +7217,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
@@ -9410,8 +9410,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/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..be58d892f 100644
--- a/App_Code/ClsVentas.vb
+++ b/App_Code/ClsVentas.vb
@@ -1338,12 +1338,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")
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/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/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/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/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index ded8d8e1e..bc521b471 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -5361,6 +5361,11 @@ Partial Class Compras_Compras
Next
''insertar en prepólizas
+ 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
Next
End If
@@ -18018,11 +18023,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..bd8cb4bea 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()
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/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/Contratos/ContratoObra.aspx.vb b/Contratos/ContratoObra.aspx.vb
index bffda357c..5085ff361 100644
--- a/Contratos/ContratoObra.aspx.vb
+++ b/Contratos/ContratoObra.aspx.vb
@@ -986,8 +986,8 @@ Partial Class Contratos_ContratoObra
UpGVInsumos.Update()
UPGVInt.Update()
- TotalAvanceVentas = TmpDT.FiltraParametros("CveTipoPresupuesto=2 AND CveContratoDetalle > 0").SUM("Total").ToDecimal
- TotalAvanceInterno = TmpDT.FiltraParametros("CveTipoPresupuesto=1 AND CveContratoDetalle > 0").SUM("Total").ToDecimal
+ TotalAvanceVentas = TmpDT.FiltraParametros("CveTipoPresupuesto=2 AND CveContratoDetalle > 0").SUM("Total")
+ TotalAvanceInterno = TmpDT.FiltraParametros("CveTipoPresupuesto=1 AND CveContratoDetalle > 0").SUM("Total")
LbTotalGeneral.Text = TmpDT.FiltraParametros("CveTipoPresupuesto=2 AND CveContratoDetalle > 0").SUM("Total").FormatoNumero()
LbTotalGeneralInsumos.Text = TmpDT.FiltraParametros("CveTipoPresupuesto=1 AND CveContratoDetalle > 0").SUM("Total").FormatoNumero()
@@ -1031,11 +1031,11 @@ Partial Class Contratos_ContratoObra
- Dim TieneError = False
- Dim Modificado = False
+ Dim TieneError As Boolean = False
+ Dim Modificado As Boolean = False
' Dim Extension = Session("FileExtension").ToString
- Dim Archivo = Session("FileUpload").ToString
- Dim Ruta = Session("FileFolder").ToString
+ Dim Archivo As String = Session("FileUpload").ToString
+ Dim Ruta As String = Session("FileFolder").ToString
Dim Minimo, Maximo, Total As Double
@@ -1065,7 +1065,7 @@ Partial Class Contratos_ContratoObra
TipoContrato = DdlTipoContratoObra.SelectedValue.ToEntero
'Crear Contrato
- Dim ImporteSubTotal As Decimal = TmpDT.SUM("Total", " CveContratoDetalle > 0 AND CveTipoPresupuesto=2 ").ToDecimal
+ Dim ImporteSubTotal As Decimal = TmpDT.SUM("Total", " CveContratoDetalle > 0 AND CveTipoPresupuesto=2 ")
If Not CveContrato > 0 Then
Dim EstatusContrato As Integer = 1
@@ -4559,7 +4559,7 @@ Partial Class Contratos_ContratoObra
Dim FileExtension As String = "-1"
Dim Filesgral As List(Of Archivo) = TxtModalCargaPresupuesto.getfiles().Archivos
Dim Filename As String = ""
- Dim DTPS = New DataTable
+ Dim DTPS As New DataTable
For Each fileItem As Archivo In Filesgral
@@ -4573,8 +4573,8 @@ Partial Class Contratos_ContratoObra
Dim tempArray() As String
tempArray = fileItem.filename.ToString().Split("-".ToCharArray())
SpreadsheetInfo.SetLicense(Extensiones.SerialGemBoxSpreadsheet)
- Dim workbook = ExcelFile.Load(fileItem.FileUrl)
- Dim worksheet = workbook.Worksheets(Hoja)
+ Dim workbook As ExcelFile = ExcelFile.Load(fileItem.FileUrl)
+ Dim worksheet As ExcelWorksheet = workbook.Worksheets(Hoja)
DTPS = worksheet.CreateDataTable(New CreateDataTableOptions() With
{
.ColumnHeaders = True,
@@ -4613,9 +4613,9 @@ Partial Class Contratos_ContratoObra
DTCargaPresupuestoIndirectos.CaseSensitive = False
End If
- Dim ErrorProceso = False
+ Dim ErrorProceso As Boolean = False
- Dim DTPS = New DataTable
+ Dim DTPS As New DataTable
DTPS.Columns.Add("CveContratoDetalle", GetType(Integer))
DTPS.Columns.Add("Cantidad", GetType(Double))
DTPS.Columns.Add("CantidadContratada", GetType(Double))
diff --git a/Contratos/FacturacionMasiva.aspx.vb b/Contratos/FacturacionMasiva.aspx.vb
index b2f28a7b1..cce1c4e6a 100644
--- a/Contratos/FacturacionMasiva.aspx.vb
+++ b/Contratos/FacturacionMasiva.aspx.vb
@@ -211,13 +211,13 @@ Partial Class Contratos_FacturacionMasiva
End Sub
Private Sub EjecutarFacturacion(Optional FacturarTodos As Boolean = False)
- Dim FacturadoCorrecto = True
+ Dim FacturadoCorrecto As Boolean = True
Dim sb As New StringBuilder()
For Each row As GridViewRow In GvCiclosComerciales.Rows
If FacturarTodos OrElse row.FCCheckBox("chkDis").Checked Then
- Dim Resp = EmitirImprimir(row.DataKey("CveCicloComercial").ToString.ToEntero)
+ Dim Resp As MMensajeFacturacion = EmitirImprimir(row.DataKey("CveCicloComercial").ToString.ToEntero)
sb.AppendFormat("{0}", Resp.Mensaje)
@@ -471,11 +471,11 @@ Partial Class Contratos_FacturacionMasiva
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/CxC/RepCxC.aspx b/CxC/RepCxC.aspx
index 7d3879893..594340d1c 100644
--- a/CxC/RepCxC.aspx
+++ b/CxC/RepCxC.aspx
@@ -529,6 +529,24 @@
+
+
+ IVA Pend
+
+
+
+
+
+
+
+
+ IEPS Pend
+
+
+
+
+
+
@@ -556,6 +574,12 @@
+
+
+
+
+
+