-- manejo de garantía, que tengan un centavo de diferencia, para el tema de timbrado objetoimpuesto=02

This commit is contained in:
2024-03-02 09:12:20 -07:00
parent f980a9921e
commit c7e7e68227

View File

@@ -7378,11 +7378,17 @@ Partial Class PV
Dim strDate As Date = ($"20{TxtEtiqueta.Text.Substring(2, 2)}/{TxtEtiqueta.Text.Substring(0, 2)}/01").ToDate Dim strDate As Date = ($"20{TxtEtiqueta.Text.Substring(2, 2)}/{TxtEtiqueta.Text.Substring(0, 2)}/01").ToDate
Dim drg As DataRow = dtt.FiltroPrimero($" #{strDate.ToString("yyyy/MM/dd")}# >= FechaInicioVigencia ", "FechaInicioVigencia DESC") Dim drg As DataRow = dtt.FiltroPrimero($" #{strDate.ToString("yyyy/MM/dd")}# >= FechaInicioVigencia ", "FechaInicioVigencia DESC")
If drg IsNot Nothing Then If drg IsNot Nothing Then
Dim PorcentajeAjuste As Decimal = drg("Valor").ToString.ToDecimal
TxtPorcentajeAjuste.Text = (drg("Valor").ToString.ToDouble / 100).ToString TxtPorcentajeAjuste.Text = (PorcentajeAjuste / 100).ToString
TxtImporteAjuste.Text = (TxtPorcentajeAjuste.Text.ToDecimal * TxtPUFactura.Text.ToDecimal).FormatoNumero TxtImporteAjuste.Text = (TxtPorcentajeAjuste.Text.ToDecimal * TxtPUFactura.Text.ToDecimal).FormatoNumero
ImportePagarCliente = TxtImporteAjuste.Text.ToDecimal ImportePagarCliente = TxtImporteAjuste.Text.ToDecimal
''ajustar un centavo
If PorcentajeAjuste = 0 Then 'PONE UN PAGO DE UN CENTAVO, PARA EL TIMBRADO
' TxtImporteAjuste.Text = (TxtImporteAjuste.Text.ToDecimal - 0.01D).FormatoNumero
TxtImporteAjuste.Text = "0.01"
End If
Dim CargoVendido As Decimal = 0 Dim CargoVendido As Decimal = 0
Dim CargoGarantia As Decimal = 0 Dim CargoGarantia As Decimal = 0
Dim CveTamaño As Integer = 0 Dim CveTamaño As Integer = 0