cambios de extensiones .SUM de double a decimal
This commit is contained in:
@@ -142,7 +142,7 @@ Partial Class Contratos_FacturacionMasiva
|
||||
End Sub
|
||||
|
||||
Protected Sub ImgFacturarTodos_Click(sender As Object, e As EventArgs) Handles BtnFacturar.Click
|
||||
Dim FacturadoCorrecto = True
|
||||
Dim FacturadoCorrecto As Boolean = True
|
||||
For Each row As GridViewRow In GvCiclosComerciales.Rows
|
||||
If row.FCCheckBox("chkDis").Checked Then
|
||||
FacturadoCorrecto = EmitirImprimir(row.DataKey("CveCicloComercial").ToString.ToEntero)
|
||||
@@ -239,7 +239,7 @@ Partial Class Contratos_FacturacionMasiva
|
||||
|
||||
If SeTimbro Then
|
||||
'XML
|
||||
Dim ArchivoXML = String.Format("{0}/XML/{1}/{2}.xml", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto, ObjFactura.SerieFolio)
|
||||
Dim ArchivoXML As String = String.Format("{0}/XML/{1}/{2}.xml", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto, ObjFactura.SerieFolio)
|
||||
If File.Exists(ArchivoXML) Then
|
||||
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar XML</a></li></ul>", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", ObjFactura.CveVenta, "XML", ObjFactura.SerieFolio, ObjFactura.TipoDocto)))
|
||||
End If
|
||||
@@ -251,7 +251,7 @@ Partial Class Contratos_FacturacionMasiva
|
||||
End If
|
||||
|
||||
'MUESTA ALERT OK
|
||||
Dim Liga = If(UsuarioActual.CveRol = 1165, "document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";", $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={ObjFactura.CveCliente}&Opt=3"";")
|
||||
Dim Liga As String = If(UsuarioActual.CveRol = 1165, "document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";", $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={ObjFactura.CveCliente}&Opt=3"";")
|
||||
Alert(MensajeAlert.ToString, TipoMensaje.MsgInformacion)
|
||||
|
||||
ObjFactura = Nothing
|
||||
@@ -377,7 +377,7 @@ Partial Class Contratos_FacturacionMasiva
|
||||
|
||||
If SeTimbro Then
|
||||
'XML
|
||||
Dim ArchivoXML = String.Format("{0}/XML/{1}/{2}.xml", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto, ObjFactura.SerieFolio)
|
||||
Dim ArchivoXML As String = String.Format("{0}/XML/{1}/{2}.xml", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto, ObjFactura.SerieFolio)
|
||||
If File.Exists(ArchivoXML) Then
|
||||
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar XML</a></li></ul>", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", ObjFactura.CveVenta, "XML", ObjFactura.SerieFolio, ObjFactura.TipoDocto)))
|
||||
End If
|
||||
@@ -389,7 +389,7 @@ Partial Class Contratos_FacturacionMasiva
|
||||
End If
|
||||
|
||||
'MUESTA ALERT OK
|
||||
Dim Liga = If(UsuarioActual.CveRol = 1165, "document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";", $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={ObjFactura.CveCliente}&Opt=3"";")
|
||||
Dim Liga As String = If(UsuarioActual.CveRol = 1165, "document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";", $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={ObjFactura.CveCliente}&Opt=3"";")
|
||||
retorno = True
|
||||
ObjFactura = Nothing
|
||||
Else
|
||||
@@ -555,7 +555,7 @@ Partial Class Contratos_FacturacionMasiva
|
||||
|
||||
objContratos.Dispose()
|
||||
Dim DtR As DataRow
|
||||
ObjFactura.SubTotal = SUM(DTDetalle, "PU").ToDecimal
|
||||
ObjFactura.SubTotal = SUM(DTDetalle, "PU")
|
||||
ObjFactura.IVA = ObjFactura.IVA * ObjFactura.SubTotal
|
||||
ObjFactura.Total = ObjFactura.SubTotal + ObjFactura.IVA
|
||||
ObjFactura.Serie = Serie
|
||||
@@ -606,8 +606,8 @@ Partial Class Contratos_FacturacionMasiva
|
||||
Dim Msgok As New StringBuilder
|
||||
Dim CveAlmacenTraspasoOrigen As Integer = -1
|
||||
Dim CveAlmacenTraspasoDestino As Integer = -1
|
||||
Dim EsDevolucionVenta = -1
|
||||
Dim CveSubProyecto = TmpDTDetalle.Rows(0)("CveSubProyecto").ToString.ToEntero
|
||||
Dim EsDevolucionVenta As Integer = -1
|
||||
Dim CveSubProyecto As Integer = TmpDTDetalle.Rows(0)("CveSubProyecto").ToString.ToEntero
|
||||
|
||||
|
||||
factura.CvePrePoliza = ObjConta.AddPrePolizas("FacMas/GuardarVenta", factura.CvePlantillaPoliza, factura.Total, factura.Total, factura.CveMoneda, factura.Fecha, factura.Cliente.Nombre, factura.CveUsuario, factura.CveEmpresa)
|
||||
@@ -634,8 +634,8 @@ Partial Class Contratos_FacturacionMasiva
|
||||
|
||||
'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(ObjFactura.ConvertirPesos, factura.TipoCambio, 1)), Row("IVA").ToString.ToDouble(If(ObjFactura.ConvertirPesos, factura.TipoCambio, 1)), Math.Round((Row("PU").ToString.ToDouble(If(ObjFactura.ConvertirPesos, factura.TipoCambio, 1)) * (1 + Row("IVA").ToString.ToDouble(If(ObjFactura.ConvertirPesos, factura.TipoCambio, 1)))), 3),
|
||||
If Not ObjVentas.AddVentaDetalle(ObjVentas.CveVenta, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDecimal, Row("CveUM").ToString.ToEntero,
|
||||
Row("PU").ToString.ToDecimal(If(ObjFactura.ConvertirPesos, factura.TipoCambio, 1)), Row("IVA").ToString.ToDecimal(If(ObjFactura.ConvertirPesos, factura.TipoCambio, 1)), Math.Round((Row("PU").ToString.ToDecimal(If(ObjFactura.ConvertirPesos, factura.TipoCambio, 1)) * (1 + Row("IVA").ToString.ToDecimal(If(ObjFactura.ConvertirPesos, factura.TipoCambio, 1)))), 3),
|
||||
TxtObservaciones.Text, 0, 0, Row("CveSubProyecto").ToString.ToEntero, -1,
|
||||
TiempoEntrega:="", CveVentaDetallePadre:=-1, CveContratoDetalle:=Row("CveContratoDetalle").ToString.ToEntero, CvePromocionDetalle:=-1, IEPS:=0) Then
|
||||
ErrorList.Add("Ocurrió un error al agregar un Producto o Servicio a la Factura.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||
|
||||
@@ -1447,8 +1447,8 @@ Partial Class GPS_Rastreo
|
||||
If e.Row.DBCampo("Vehiculo").ToString = "" Then
|
||||
e.Row.CssClass = "Totales"
|
||||
e.Row.Cells(0).Text = $"Total Kilometros Recorridos: {txtFechaI.Text.ToDateTime.ToShortDateString} - {txtFechaF.Text.ToDateTime.ToShortDateString} "
|
||||
e.Row.Cells(1).Text = $"{Decimal.Round(DtDatos.SUM("TiempoOperativo", "Vehiculo IS NOT NULL").ToDecimal / 60, 1).ToString("###,###,##0.##")} Hrs ({DtDatos.SUM("TiempoOperativo", "Vehiculo IS NOT NULL").ToDecimal.ToString("#,##0.##")} minutos)"
|
||||
e.Row.Cells(2).Text = $"{Decimal.Round(DtDatos.SUM("Dist", "Vehiculo IS NOT NULL").ToDecimal, 2).ToString("###,###,##0.00")} KM"
|
||||
e.Row.Cells(1).Text = $"{Decimal.Round(DtDatos.SUM("TiempoOperativo", "Vehiculo IS NOT NULL") / 60, 1).ToString("###,###,##0.##")} Hrs ({DtDatos.SUM("TiempoOperativo", "Vehiculo IS NOT NULL").ToString("#,##0.##")} minutos)"
|
||||
e.Row.Cells(2).Text = $"{Decimal.Round(DtDatos.SUM("Dist", "Vehiculo IS NOT NULL"), 2).ToString("###,###,##0.00")} KM"
|
||||
Else
|
||||
e.Row.Attributes.Add("idgv", e.Row.RowIndex.ToString)
|
||||
e.Row.Attributes.Add("onClick", $"DeleteMarkers();$('#HdnKM').val({e.Row.DBCampo("CveDispositivo")});doScaledCLickKM('#C_BtnCargaRecorrido',{e.Row.RowIndex});")
|
||||
@@ -1619,9 +1619,9 @@ Partial Class GPS_Rastreo
|
||||
'Next
|
||||
|
||||
'e.Row.Cells(1).Text = $"{Decimal.Round(DtDatos.SUM("TiempoOperativo", "Vehiculo IS NOT NULL").ToDecimal / 60, 1).ToString("###,###,##0.##")} Hrs ({DtDatos.SUM("TiempoOperativo", "Vehiculo IS NOT NULL").ToDecimal.ToString("#,##0.##")} minutos)"
|
||||
DtImprimir.Rows(0)("Dist") = DtDatos.SUM("Dist", "Vehiculo IS NOT NULL").ToDecimal
|
||||
DtImprimir.Rows(0)("TiempoOperativo") = DtDatos.SUM("TiempoOperativo", "Vehiculo IS NOT NULL").ToDecimal
|
||||
DtImprimir.Rows(0)("TiempoOperativoHR") = DtDatos.SUM("TiempoOperativoHR", "Vehiculo IS NOT NULL").ToDecimal
|
||||
DtImprimir.Rows(0)("Dist") = DtDatos.SUM("Dist", "Vehiculo IS NOT NULL")
|
||||
DtImprimir.Rows(0)("TiempoOperativo") = DtDatos.SUM("TiempoOperativo", "Vehiculo IS NOT NULL")
|
||||
DtImprimir.Rows(0)("TiempoOperativoHR") = DtDatos.SUM("TiempoOperativoHR", "Vehiculo IS NOT NULL")
|
||||
|
||||
'DtImprimir.Rows(0)("TiempoOperativo") = Decimal.Round(DtImprimir.SUM("TiempoOperativo", "Vehiculo IS NOT NULL").ToDecimal, 1)
|
||||
'DtImprimir.Rows(0)("TiempoOperativoHR") = Decimal.Round(DtImprimir.SUM("TiempoOperativoHR", "Vehiculo IS NOT NULL").ToDecimal, 1)
|
||||
|
||||
@@ -1361,8 +1361,8 @@ Partial Class GPS_Rastreo2
|
||||
If e.Row.DBCampo("Vehiculo").ToString = "" Then
|
||||
e.Row.CssClass = "Totales"
|
||||
e.Row.Cells(0).Text = $"Total Kilometros Recorridos: {txtFechaI.Text.ToDateTime.ToShortDateString} - {txtFechaF.Text.ToDateTime.ToShortDateString} "
|
||||
e.Row.Cells(1).Text = $"{Decimal.Round(DtDatos.SUM("TiempoOperativo", "Vehiculo IS NOT NULL").ToDecimal / 60, 1).ToString("###,###,##0.##")} Hrs ({DtDatos.SUM("TiempoOperativo", "Vehiculo IS NOT NULL").ToDecimal.ToString("#,##0.##")} minutos)"
|
||||
e.Row.Cells(2).Text = $"{Decimal.Round(DtDatos.SUM("Dist", "Vehiculo IS NOT NULL").ToDecimal, 2).ToString("###,###,##0.00")} KM"
|
||||
e.Row.Cells(1).Text = $"{Decimal.Round(DtDatos.SUM("TiempoOperativo", "Vehiculo IS NOT NULL") / 60, 1).ToString("###,###,##0.##")} Hrs ({DtDatos.SUM("TiempoOperativo", "Vehiculo IS NOT NULL").ToString("#,##0.##")} minutos)"
|
||||
e.Row.Cells(2).Text = $"{Decimal.Round(DtDatos.SUM("Dist", "Vehiculo IS NOT NULL"), 2).ToString("###,###,##0.00")} KM"
|
||||
Else
|
||||
e.Row.Attributes.Add("idgv", e.Row.RowIndex.ToString)
|
||||
e.Row.Attributes.Add("onClick", $"DeleteMarkers();$('#HdnKM').val({e.Row.DBCampo("CveDispositivo")});doScaledCLickKM('#C_BtnCargaRecorrido',{e.Row.RowIndex});")
|
||||
|
||||
Reference in New Issue
Block a user