This commit is contained in:
2024-02-29 12:07:02 -07:00
12 changed files with 58 additions and 34 deletions

View File

@@ -2695,6 +2695,7 @@ Partial Class Ventas
If UsuarioActual.Empresa.Funcionalidad(714).ToEntero() > 0 Then
ViewState("CveCliente") = UsuarioActual.Empresa.Funcionalidad(714).ToEntero()
HdnCveCliente.Value = UsuarioActual.Empresa.Funcionalidad(714)
RBLPago.SelectedValue = "2"
CargaCliente(CveCliente)
End If
End If
@@ -12954,6 +12955,13 @@ Partial Class Ventas
'si el codigo objeto impuesto es 02 y no tiene desglose de impuestos por el descuento, debe asignar el valor 04 - Si objeto de impuesto y no causa impuesto
If concepto.Impuestos.Count = 0 AndAlso concepto.ObjetoImpuesto = "02" AndAlso (concepto.Importe - concepto.Descuento + concepto.ImporteGravaIVAAdicional).RoundSQL(2) = 0.00D Then
concepto.ObjetoImpuesto = "04"
'se ajusta a un centavo, para que se pueda emitir con un centavo.
If UsuarioActual.CveEmpresa = 140 Then
concepto.ObjetoImpuesto = "02"
concepto.Descuento = concepto.Descuento - 0.01D
Obj.SubTotal = Obj.SubTotal + 0.01D
Obj.Total = Obj.Total + 0.01D
End If
End If
Timbre.Conceptos.Add(concepto)
@@ -37319,7 +37327,7 @@ Partial Class Ventas
If HdnDescPS.Value.ToEntero() > 0 Then
Dim RowUpdate As DataRow = TmpDT.Select($"Consec = {HdnConsecPS.Value}").FirstOrDefault()
If RowUpdate IsNot Nothing Then
If HdnDescPS.Value.ToDecimal().RoundSQL(2) < RowUpdate("Total").ToString().ToDecimal() Then
If HdnDescPS.Value.ToDecimal().RoundSQL(2) <= RowUpdate("Total").ToString().ToDecimal() Then
RowUpdate("Descuento") = HdnDescPS.Value.ToDecimal().RoundSQL(2)
Dim TotalCalculableImpuestos = (RowUpdate("Cantidad").ToString().ToDecimal * RowUpdate("PU").ToString().ToDecimal) - RowUpdate("Descuento").ToString().ToDecimal()
@@ -37332,7 +37340,7 @@ Partial Class Ventas
CalculaTotalesVenta()
RegistraScript("$('#ModalDescPS').modal('hide');")
Else
Alert("El descuento no puede ser mayor o igual al total.", TipoMensaje.MsgAdvertencia)
Alert("El descuento no puede ser mayor al total.", TipoMensaje.MsgAdvertencia)
End If
End If