Click or drag to resize

ISaleAmountAsFloat Property

AmountAsFloat - same as Amount property but with decimals - changing this affects Earnings and/or Cost The total sale amount. Same as Amount property, but with decimals

Namespace:  SuperOffice.COM.SuperOfficeDB
Assembly:  SuperOfficeDB.Interop (in SuperOfficeDB.Interop.dll) Version: 8.0.0.0
Syntax
double AmountAsFloat { get; set; }

Property Value

Type: Double
Long – the amount of the sale Double – amount with decimals.
Examples

Amount

This text may be copied to the notepad, and saved as a *.vbs file. Remember to change the login information.

VB
Const enTableCurrency = 112 
set app = CreateObject("Superoffice.application")
set sale = app.Database.CreateSale
sale.AmountAsFloat = 100.57

msg = "100.57 in AmountAsFloat" & vbCrLf
msg = msg & "Amount=" & sale.Amount & vbCRLF
msg = msg & "AmountAsFloat=" & sale.AmountAsFloat & vbCRLF
msg = msg & "Amount and AmountAsFloat are the same value, with different precision"
msgbox msg,,"Amount 100.57"

msg = "OurCurrency = " &  sale.OurCurrency.Text & vbCRLF
sale.Currency = app.GetListItem( enTableCurrency, 44 ) ' 44 = Haiti Gourde (HTG)
msg = msg & "Currency = " & sale.Currency.Text & vbCRLF
sale.Amount = 100 ' 100 HTG

msg = msg & "Amount = " & sale.Amount & " " & sale.Currency.Text & " " & sale.Currency.Tooltip  & vbCRLF
msg = msg & "Amount in " & sale.OurCurrency.Text & " = " 
msg = msg & sale.ConvertToOurCurrency( sale.Amount ) & vbCRLF
msgbox msg ,, "Currency"

AmountAsFloat

This text may be copied to the notepad, and saved as a *.vbs file. Remember to change the login information.

VB
Const enTableCurrency = 112 
set app = CreateObject("Superoffice.application")
set sale = app.Database.CreateSale
sale.AmountAsFloat = 100.57

msg = "100.57 in AmountAsFloat" & vbCrLf
msg = msg & "Amount=" & sale.Amount & vbCRLF
msg = msg & "AmountAsFloat=" & sale.AmountAsFloat & vbCRLF
msg = msg & "Amount and AmountAsFloat are the same value, with different precision"
msgbox msg,,"Amount 100.57"

msg = "OurCurrency = " &  sale.OurCurrency.Text & vbCRLF
sale.Currency = app.GetListItem( enTableCurrency, 44 ) ' 44 = Haiti Gourde (HTG)
msg = msg & "Currency = " & sale.Currency.Text & vbCRLF
sale.Amount = 100 ' 100 HTG

msg = msg & "Amount = " & sale.Amount & " " & sale.Currency.Text & " " & sale.Currency.Tooltip  & vbCRLF
msg = msg & "Amount in " & sale.OurCurrency.Text & " = " 
msg = msg & sale.ConvertToOurCurrency( sale.Amount ) & vbCRLF
msgbox msg ,, "Currency"

See Also