Guest User

Untitled

a guest
Jul 18th, 2018
148
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Local lnReg As Integer
  2. Local lnArea As Integer
  3. Local lnSubTotal As Decimal, lnIva21 As Decimal, lnIva105 As Decimal, lnIva27 As Decimal
  4. Local lnExento As Decimal, lnTasaVial As Decimal, lnOtrosImp as Decimal
  5.  
  6. lnArea = Select()
  7. Select("det")
  8. lnReg = Recno()
  9.  
  10. lnExento        = 0.00
  11. lnSubTotal      = 0.00
  12. lnIva21         = 0.00
  13. lnIva105        = 0.00
  14. lnIva27         = 0.00
  15. lnTasaVial      = 0.00
  16. lnOtrosImp      = 0.00
  17. Scan
  18.     Do Case
  19.     Case det.iva = 0
  20.         lnExento = lnExento + det.importe * det.iva / 100
  21.     Case det.iva = 21
  22.         lnIva21 = lnIva21 + det.importe * det.iva / 100
  23.     Case det.iva = 10.50
  24.         lnIva105 = lnIva105 + det.importe * 0.105
  25.     Case det.iva = 27
  26.         lnIva27 = lnIva27 + det.importe * det.iva / 100
  27.     Otherwise
  28.     Endcase
  29.     lnSubTotal = lnSubTotal + det.importe
  30. Endscan
  31.  
  32. Thisform.txtSubTotal.txtDato.Value = lnSubTotal
  33. Thisform.txtIVA21.txtDato.Value = lnIva21
  34. Thisform.txtIVA27.txtDato.Value = lnIva27
  35. Thisform.txtIVA105.txtDato.Value = lnIva105
  36. Thisform.txtExentos.txtDato.Value = lnExento
RAW Paste Data