-- manejo de centavo para tema de garantía
This commit is contained in:
@@ -14957,10 +14957,17 @@ Partial Class Ventas
|
|||||||
CveVentaAplicar = CveDevolucion
|
CveVentaAplicar = CveDevolucion
|
||||||
CveVentaAmortizacionAplicar = ObjFactura.CveVenta
|
CveVentaAmortizacionAplicar = ObjFactura.CveVenta
|
||||||
End If
|
End If
|
||||||
|
'verifico que el AF, tenga valores iguales cuando esté vacío o "-1"
|
||||||
|
Dim drs As DataRow() = TmpDTDetalle.Select(" CveActivoFijo IS NULL")
|
||||||
|
For Each dr As DataRow In drs
|
||||||
|
dr("CveActivoFijo") = "-1"
|
||||||
|
Next
|
||||||
|
TmpDTDetalle.AcceptChanges()
|
||||||
|
|
||||||
DT = TmpDTDetalle.FiltraParametros($"CvePS <> {CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA", "CveActivoFijo"})
|
DT = TmpDTDetalle.FiltraParametros($"CvePS <> {CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA", "CveActivoFijo"})
|
||||||
|
|
||||||
If DT.Rows.Count > 0 Then
|
If DT.Rows.Count > 0 Then
|
||||||
|
|
||||||
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
||||||
For Each Row2 As DataRow In DT.Rows
|
For Each Row2 As DataRow In DT.Rows
|
||||||
importeMovimiento = (TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} And CveSubProyecto = {1} AND PorcentajeIVA = {2} AND ISNULL(CveActivoFijo,-1) = {3}", Row2("CveClasificacion"), Row2("CveSubProyecto"), Row2("PorcentajeIVA"), If(Row2("CveActivoFijo").ToString().ToEntero() > 0, Row2("CveActivoFijo").ToString().ToEntero(), -1))).ToString().ToDecimal()) * ValorMultiplicador
|
importeMovimiento = (TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} And CveSubProyecto = {1} AND PorcentajeIVA = {2} AND ISNULL(CveActivoFijo,-1) = {3}", Row2("CveClasificacion"), Row2("CveSubProyecto"), Row2("PorcentajeIVA"), If(Row2("CveActivoFijo").ToString().ToEntero() > 0, Row2("CveActivoFijo").ToString().ToEntero(), -1))).ToString().ToDecimal()) * ValorMultiplicador
|
||||||
@@ -23276,7 +23283,12 @@ Partial Class Ventas
|
|||||||
|
|
||||||
'VALIDA PAGOS EN FACTURAS DE ING,ANT NUEVAS O FACTURACION DE REM O COTIZACIONES
|
'VALIDA PAGOS EN FACTURAS DE ING,ANT NUEVAS O FACTURACION DE REM O COTIZACIONES
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso RBLPago.SelectedValue = "2" AndAlso ((CveVenta <= 0 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant")) OrElse TipoDoctoViejo.Contiene("Rem", "Cot")) Then
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso RBLPago.SelectedValue = "2" AndAlso ((CveVenta <= 0 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant")) OrElse TipoDoctoViejo.Contiene("Rem", "Cot")) Then
|
||||||
|
Dim TotalPagadoGarantia As Decimal = 0
|
||||||
|
If TxtTotal.Text.ToDecimal = 0.01 AndAlso Me.EsGarantia = True Then
|
||||||
|
TotalPagadoGarantia = 0.01D
|
||||||
|
TienePagos = True
|
||||||
|
ViewState("SaldoVenta") = SaldoVenta - TotalPagadoGarantia
|
||||||
|
End If
|
||||||
If Not TienePagos AndAlso TxtTotal.Text.ToDecimal > 0 Then
|
If Not TienePagos AndAlso TxtTotal.Text.ToDecimal > 0 Then
|
||||||
If MostrarAlertas Then
|
If MostrarAlertas Then
|
||||||
Alert("Es necesario especificar un pago.", TipoMensaje.MsgAdvertencia)
|
Alert("Es necesario especificar un pago.", TipoMensaje.MsgAdvertencia)
|
||||||
@@ -23294,7 +23306,7 @@ Partial Class Ventas
|
|||||||
Dim TotalRNC As Decimal = If((ListaNCDesc IsNot Nothing AndAlso ListaNCDesc.Count > 0) OrElse (ListaNCBonificacion IsNot Nothing AndAlso ListaNCBonificacion.Count > 0), LblDescuentosRNC.Text.Trim().ToDecimal(), 0)
|
Dim TotalRNC As Decimal = If((ListaNCDesc IsNot Nothing AndAlso ListaNCDesc.Count > 0) OrElse (ListaNCBonificacion IsNot Nothing AndAlso ListaNCBonificacion.Count > 0), LblDescuentosRNC.Text.Trim().ToDecimal(), 0)
|
||||||
|
|
||||||
Dim ImporteTotal As Decimal = (TxtTotal.Text.ToDecimal).RoundSQL(2)
|
Dim ImporteTotal As Decimal = (TxtTotal.Text.ToDecimal).RoundSQL(2)
|
||||||
Dim TotalPagado As Decimal = (TotalPagoContado + TotalRNC + TotalProntoPago).RoundSQL(2)
|
Dim TotalPagado As Decimal = (TotalPagoContado + TotalRNC + TotalProntoPago + TotalPagadoGarantia).RoundSQL(2)
|
||||||
|
|
||||||
If TotalPagado <> ImporteTotal Then
|
If TotalPagado <> ImporteTotal Then
|
||||||
If MostrarAlertas Then
|
If MostrarAlertas Then
|
||||||
@@ -23316,10 +23328,7 @@ Partial Class Ventas
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'SI TIENE SALDO PENDIENTE VALIDA SI TIENE PAGOS
|
'SI TIENE SALDO PENDIENTE VALIDA SI TIENE PAGOS
|
||||||
|
|||||||
Reference in New Issue
Block a user