diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index a91bc04fa..d198effdb 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -1343,7 +1343,7 @@ Public Class ClsVentas 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 Integer = 0) As Boolean + 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 Dim Retorno As Boolean = False DataAdapter("PA_VentasDetalleAdd") @@ -1375,7 +1375,7 @@ Public Class ClsVentas .Add("@CuentaPredial", SqlDbType.VarChar).Value = CuentaPredial .Add("@CvePrecioLista", SqlDbType.Int).Value = CvePrecioLista .Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo - .Add("@NumTurnos", SqlDbType.Int).Value = NumTurnos + .Add("@NumTurnos", SqlDbType.Decimal).Value = NumTurnos End With Try diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 5b41cce53..f72859039 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -1008,7 +1008,7 @@
- +
@@ -1144,7 +1144,7 @@
- +
@@ -1165,7 +1165,7 @@
- +
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 998edea0a..9b7a3efa4 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -2748,8 +2748,8 @@ Partial Class Ventas TmpDT.Columns.Add("CveActivoFijo", GetType(Integer)) TmpDT.Columns.Add("AFDepreciacion", GetType(Decimal)) TmpDT.Columns.Add("AFValorInicial", GetType(Decimal)) - TmpDT.Columns.Add("NumTurnos", GetType(Integer)) - TmpDT.Columns("NumTurnos").DefaultValue = 0 + TmpDT.Columns.Add("NumTurnos", GetType(Decimal)) + TmpDT.Columns("NumTurnos").DefaultValue = 0D GvPS.DataSource = ObjVentas.DtResultados GvPS.DataBind() @@ -2780,8 +2780,8 @@ Partial Class Ventas TmpDT.Columns.Add("CveActivoFijo", GetType(Integer)) TmpDT.Columns.Add("AFDepreciacion", GetType(Decimal)) TmpDT.Columns.Add("AFValorInicial", GetType(Decimal)) - TmpDT.Columns.Add("NumTurnos", GetType(Integer)) - TmpDT.Columns("NumTurnos").DefaultValue = 0 + TmpDT.Columns.Add("NumTurnos", GetType(Decimal)) + TmpDT.Columns("NumTurnos").DefaultValue = 0D GvPS.DataSource = ObjVentas.DtResultados GvPS.DataBind() @@ -8165,7 +8165,7 @@ Partial Class Ventas e.Row.FCLiteral("LtlPrecioLista").Visible = True End If - If UsuarioActual.CveEmpresa.Contiene(7, 122) AndAlso e.Row.DBCampo("NumTurnos").ToEntero() > 0 Then + If UsuarioActual.CveEmpresa.Contiene(7, 122) AndAlso e.Row.DBCampo("NumTurnos").ToDecimal() > 0 Then e.Row.FCLiteral("LtlNumTurnos").Visible = True End If @@ -8475,9 +8475,9 @@ Partial Class Ventas ObjDescuento = CalcularDescuentos(GvPS.Rows(e.RowIndex).FCDropDownLost("DdlPS").SelectedValue.ToEntero(), Cantidad, PU) End If - Dim NumTurnos As Integer = 0 + Dim NumTurnos As Decimal = 0 If UsuarioActual.CveEmpresa.Contiene(7, 122) Then - NumTurnos = GvPS.Rows(e.RowIndex).FCTextBox("TxtNumTurnosEditar").Text.ToEntero() + NumTurnos = GvPS.Rows(e.RowIndex).FCTextBox("TxtNumTurnosEditar").Text.ToDecimal() End If TmpDT.Rows.Remove(TmpDT.Rows(e.RowIndex)) @@ -8557,9 +8557,9 @@ Partial Class Ventas TmpDT.Rows(e.RowIndex)("PorcentajeRetISR") = ClienteRetISR TmpDT.Rows(e.RowIndex)("CuentaPredial") = CuentaPredial - Dim NumTurnos As Integer = 0 + Dim NumTurnos As Decimal = 0 If UsuarioActual.CveEmpresa.Contiene(7, 122) Then - NumTurnos = GvPS.Rows(e.RowIndex).FCTextBox("TxtNumTurnosEditar").Text.ToEntero() + NumTurnos = GvPS.Rows(e.RowIndex).FCTextBox("TxtNumTurnosEditar").Text.ToDecimal() End If TmpDT.Rows(e.RowIndex)("NumTurnos") = NumTurnos @@ -13456,7 +13456,7 @@ Partial Class Ventas Row("PU").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("ImporteIVA").ToString().ToDouble, 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(), TiempoEntrega:=Row("TiempoEntrega").ToString(), CveVentaDetallePadre:=Row("CveVentaDetalle").ToString().ToEntero(), CveContratoDetalle:=Row("CveContratoDetalle").ToString().ToEntero(), CvePromocionDetalle:=Row("CvePromocionDetalle").ToString().ToEntero(), IEPS:=Row("ImporteIEPS").ToString().ToDouble, CveMovimientoDetallePedido:=Row("CveMovimientoDetallePedido").ToString().ToEntero(), ImporteRetIVA:=Row("ImporteRetIVA").ToString().ToDouble, ImporteRetISR:=Row("ImporteRetISR").ToString().ToDouble, - PorcentajeIVA:=Row("PorcentajeIVA").ToString().ToDecimal, PorcentajeIEPS:=Row("PorcentajeIEPS").ToString().ToDouble, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString().ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString().ToDouble, CuentaPredial:=Row("CuentaPredial").ToString(), CvePrecioLista:=Row("CvePrecioLista").ToString().ToEntero(), CveActivoFijo:=Row("CveActivoFijo").ToString().ToEntero(), NumTurnos:=Row("NumTurnos").ToString().ToEntero()) Then + PorcentajeIVA:=Row("PorcentajeIVA").ToString().ToDecimal, PorcentajeIEPS:=Row("PorcentajeIEPS").ToString().ToDouble, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString().ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString().ToDouble, CuentaPredial:=Row("CuentaPredial").ToString(), CvePrecioLista:=Row("CvePrecioLista").ToString().ToEntero(), CveActivoFijo:=Row("CveActivoFijo").ToString().ToEntero(), NumTurnos:=Row("NumTurnos").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 Else @@ -18843,9 +18843,9 @@ Partial Class Ventas End If End If - Dim NumTurnos As Integer = 0 + Dim NumTurnos As Decimal = 0 If UsuarioActual.CveEmpresa.Contiene(7, 122) Then - NumTurnos = TxtNumTurnos.Text.ToEntero() + NumTurnos = TxtNumTurnos.Text.ToDecimal() End If AgregarProductoServicio(Cantidad, DdlUnidadMedida.SelectedValue.ToEntero(), DdlUnidadMedida.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero(), DdlClasificacion.SelectedItem.Text, @@ -19045,7 +19045,7 @@ Partial Class Ventas Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0, Optional CuentaPredial As String = "", Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0, Optional SeActualiza As Boolean = False, Optional CvePromocionDetalle As Integer = -1, Optional EsCargo As Boolean = False, Optional ImporteProntoPago As Decimal = 0, Optional ByRef ObjDescuento As Modelos.VentaDescuentos = Nothing, Optional CvePrecioLista As Integer = -1, Optional PrecioLista As String = "", - Optional CveActivoFijo As Integer = -1, Optional AFDepreciacion As Decimal = 0D, Optional AFValorInicial As Decimal = 0D, Optional NumTurnos As Integer = 0) As Boolean + Optional CveActivoFijo As Integer = -1, Optional AFDepreciacion As Decimal = 0D, Optional AFValorInicial As Decimal = 0D, Optional NumTurnos As Decimal = 0D) As Boolean Dim Retorno As Boolean = False Try @@ -19554,7 +19554,7 @@ Partial Class Ventas TmpDT.Columns("TieneProntoPago").DefaultValue = "No" TmpDT.Columns("ImporteProntoPago").DefaultValue = 0 - TmpDT.Columns.Add("NumTurnos", GetType(Integer)) + TmpDT.Columns.Add("NumTurnos", GetType(Decimal)) TmpDT.Columns("NumTurnos").DefaultValue = 0 End Sub @@ -22287,7 +22287,7 @@ Partial Class Ventas Row("PU").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), Row("ImporteIVA").ToString().ToDouble, Math.Round((Row("Total").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)) * (1 + Row("PorcentajeIVA").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)))), 6), Row("Obs").ToString(), Row("Descuento").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), Row("TipoDescuento").ToString().ToEntero(), Row("CveSubProyecto").ToString().ToEntero(), Row("CvePresupuestoIngreso").ToString().ToEntero(), PorcentajeIVA:=Row("PorcentajeIVA").ToString().ToDecimal, IEPS:=Row("ImporteIEPS").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), PorcentajeIEPS:=Row("PorcentajeIEPS").ToString().ToDouble, 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), - ImporteRetIVA:=Row("ImporteRetIVA").ToString().ToDouble, ImporteRetISR:=Row("ImporteRetISR").ToString().ToDouble, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString().ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString().ToDouble, CuentaPredial:=Row("CuentaPredial").ToString(), CvePrecioLista:=Row("CvePrecioLista").ToString().ToEntero(), CveActivoFijo:=Row("CveActivoFijo").ToString().ToEntero()) Then + ImporteRetIVA:=Row("ImporteRetIVA").ToString().ToDouble, ImporteRetISR:=Row("ImporteRetISR").ToString().ToDouble, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString().ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString().ToDouble, CuentaPredial:=Row("CuentaPredial").ToString(), CvePrecioLista:=Row("CvePrecioLista").ToString().ToEntero(), CveActivoFijo:=Row("CveActivoFijo").ToString().ToEntero(), NumTurnos:=Row("NumTurnos").ToString().ToDecimal()) Then OcurrioError = True Exit For Else @@ -35452,8 +35452,8 @@ Partial Class Ventas TmpDT.Columns.Add("CveActivoFijo", GetType(Integer)) TmpDT.Columns.Add("AFDepreciacion", GetType(Decimal)) TmpDT.Columns.Add("AFValorInicial", GetType(Decimal)) - TmpDT.Columns.Add("NumTurnos", GetType(Integer)) - TmpDT.Columns("NumTurnos").DefaultValue = 0 + TmpDT.Columns.Add("NumTurnos", GetType(Decimal)) + TmpDT.Columns("NumTurnos").DefaultValue = 0D Return TmpDT End Function