Deshabilitar saldo de anticipo si el saldo es 0
This commit is contained in:
@@ -3771,6 +3771,7 @@ Partial Class Ventas
|
|||||||
InicializaDTAnticiposAmortizacion()
|
InicializaDTAnticiposAmortizacion()
|
||||||
ChkAplicaNCAnticipo.Enabled = False
|
ChkAplicaNCAnticipo.Enabled = False
|
||||||
Else
|
Else
|
||||||
|
ChkAplicaNCAnticipo.Enabled = False
|
||||||
ChkAplicaNCAnticipo.Checked = False
|
ChkAplicaNCAnticipo.Checked = False
|
||||||
End If
|
End If
|
||||||
'If DbRowVenta("SaldoAnticipo").ToString().ToDouble <= 0 Then ChkAplicaNCAnticipo.Checked = False : ChkAplicaNCAnticipo.Enabled = False
|
'If DbRowVenta("SaldoAnticipo").ToString().ToDouble <= 0 Then ChkAplicaNCAnticipo.Checked = False : ChkAplicaNCAnticipo.Enabled = False
|
||||||
@@ -25937,39 +25938,39 @@ Partial Class Ventas
|
|||||||
If CveVenta <= 0 OrElse EsCreaApartirDe Then
|
If CveVenta <= 0 OrElse EsCreaApartirDe Then
|
||||||
|
|
||||||
If TmpDT IsNot Nothing AndAlso TmpDT.Rows.Count > 0 Then
|
If TmpDT IsNot Nothing AndAlso TmpDT.Rows.Count > 0 Then
|
||||||
For Each RowServicio As DataRow In TmpDT.Rows
|
For Each RowServicio As DataRow In TmpDT.Rows
|
||||||
Dim tClienteRetIVA = ClienteRetIVA
|
Dim tClienteRetIVA = ClienteRetIVA
|
||||||
If tClienteRetIVA <= 0 Then
|
If tClienteRetIVA <= 0 Then
|
||||||
If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
|
If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
|
||||||
tClienteRetIVA = 0.106667D
|
tClienteRetIVA = 0.106667D
|
||||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
|
ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
|
||||||
tClienteRetIVA = 0.04D
|
tClienteRetIVA = 0.04D
|
||||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("4") AndAlso CBool(RowServicio("EsOutSourcing").ToString()) Then
|
ElseIf DdlTipoRetencion.SelectedValue.Contiene("4") AndAlso CBool(RowServicio("EsOutSourcing").ToString()) Then
|
||||||
tClienteRetIVA = 0.06D
|
tClienteRetIVA = 0.06D
|
||||||
End If
|
|
||||||
ViewState("ClienteRetIVA") = tClienteRetIVA
|
|
||||||
End If
|
End If
|
||||||
|
ViewState("ClienteRetIVA") = tClienteRetIVA
|
||||||
Dim TotalCalculableImpuestos As Decimal = (RowServicio("Cantidad").ToString().ToDecimal() * RowServicio("PU").ToString().ToDecimal()) - RowServicio("Descuento").ToString().ToDecimal()
|
|
||||||
RowServicio("ImporteRetIVA") = (TotalCalculableImpuestos * ClienteRetIVA).RoundSQL()
|
|
||||||
RowServicio("PorcentajeRetIVA") = ClienteRetIVA
|
|
||||||
|
|
||||||
Next
|
|
||||||
TxtRetIVA.Text = TmpDT.SUM("ImporteRetIVA").ToDecimal().FormatoNumero(2)
|
|
||||||
Dim PorcentajeRetIVA = (TmpDT.MAX("PorcentajeRetIVA").ToDecimal() * 100)
|
|
||||||
LblRetIVA.Text = PorcentajeRetIVA.FormatoNumero(2)
|
|
||||||
If PorcentajeRetIVA > 0 Then
|
|
||||||
TrRetIVA.Style.Add("display", "")
|
|
||||||
UsuarioActual.Empresa.MostrarRetIVA = True
|
|
||||||
DdlTipoRetencion.Visible = True
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
GvPS.DataSource = TmpDT
|
Dim TotalCalculableImpuestos As Decimal = (RowServicio("Cantidad").ToString().ToDecimal() * RowServicio("PU").ToString().ToDecimal()) - RowServicio("Descuento").ToString().ToDecimal()
|
||||||
GvPS.DataBind()
|
RowServicio("ImporteRetIVA") = (TotalCalculableImpuestos * ClienteRetIVA).RoundSQL()
|
||||||
|
RowServicio("PorcentajeRetIVA") = ClienteRetIVA
|
||||||
|
|
||||||
|
Next
|
||||||
|
TxtRetIVA.Text = TmpDT.SUM("ImporteRetIVA").ToDecimal().FormatoNumero(2)
|
||||||
|
Dim PorcentajeRetIVA = (TmpDT.MAX("PorcentajeRetIVA").ToDecimal() * 100)
|
||||||
|
LblRetIVA.Text = PorcentajeRetIVA.FormatoNumero(2)
|
||||||
|
If PorcentajeRetIVA > 0 Then
|
||||||
|
TrRetIVA.Style.Add("display", "")
|
||||||
|
UsuarioActual.Empresa.MostrarRetIVA = True
|
||||||
|
DdlTipoRetencion.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
GvPS.DataSource = TmpDT
|
||||||
|
GvPS.DataBind()
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
UpPS.Update()
|
UpPS.Update()
|
||||||
@@ -26166,7 +26167,7 @@ Partial Class Ventas
|
|||||||
Private Sub CargaAuxiliarClienteCxC(CveCliente As Integer, CveVenta As Integer)
|
Private Sub CargaAuxiliarClienteCxC(CveCliente As Integer, CveVenta As Integer)
|
||||||
Dim ObjMovtos As New ClsMovimientos()
|
Dim ObjMovtos As New ClsMovimientos()
|
||||||
If ObjMovtos.GetCxCClienteAuxiliar(CveCliente, CveVenta) Then
|
If ObjMovtos.GetCxCClienteAuxiliar(CveCliente, CveVenta) Then
|
||||||
DtDatos = ObjMovtos.DtResultados
|
DTDatos = ObjMovtos.DtResultados
|
||||||
GVAuxiliar.DataSource = ObjMovtos.DtResultados
|
GVAuxiliar.DataSource = ObjMovtos.DtResultados
|
||||||
Else
|
Else
|
||||||
GVAuxiliar.DataSource = Nothing
|
GVAuxiliar.DataSource = Nothing
|
||||||
|
|||||||
Reference in New Issue
Block a user