private void writeCurrency ( ) { ProjectProperties props = m_projectFile . getProjectProperties ( ) ; CurrencyType currency = m_factory . createCurrencyType ( ) ; m_apibo . getCurrency ( ) . add ( currency ) ; String positiveSymbol = getCurrencyFormat ( props . getSymbolPosition ( ) ) ; String negativeSymbol = "(" + positiveSymbol + ")" ; currency . setDecimalPlaces ( props . getCurrencyDigits ( ) ) ; currency . setDecimalSymbol ( getSymbolName ( props . getDecimalSeparator ( ) ) ) ; currency . setDigitGroupingSymbol ( getSymbolName ( props . getThousandsSeparator ( ) ) ) ; currency . setExchangeRate ( Double . valueOf ( 1.0 ) ) ; currency . setId ( "CUR" ) ; currency . setName ( "Default Currency" ) ; currency . setNegativeSymbol ( negativeSymbol ) ; currency . setObjectId ( DEFAULT_CURRENCY_ID ) ; currency . setPositiveSymbol ( positiveSymbol ) ; currency . setSymbol ( props . getCurrencySymbol ( ) ) ; }
Create a handful of default currencies to keep Primavera happy .