Click or drag to resize

ISaleOurCurrency Property

OurCurrency - what we are converting amounts to It is possible to sell in different currencies. This will return the leading currency for this system, what do we currency are all sale converted into.

Namespace:  SuperOffice.COM.SuperOfficeDB
Assembly:  SuperOfficeDB.Interop (in SuperOfficeDB.Interop.dll) Version: 8.0.0.0
Syntax
IListTextItem OurCurrency { get; }

Property Value

Type: IListTextItem
IListTextItem – From the currency table
Examples

OurCurrency

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