Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/wizards/newinvestmentwizard/knewinvestmentwizard.cpp
Show First 20 Lines • Show All 175 Lines • ▼ Show 20 Line(s) | 167 | { | |||
---|---|---|---|---|---|
176 | try { | 176 | try { | ||
177 | // update all relevant attributes only, if we create a stock | 177 | // update all relevant attributes only, if we create a stock | ||
178 | // account and the security is unknown or we modifiy the security | 178 | // account and the security is unknown or we modifiy the security | ||
179 | MyMoneySecurity newSecurity(m_security); | 179 | MyMoneySecurity newSecurity(m_security); | ||
180 | newSecurity.setName(field("investmentName").toString()); | 180 | newSecurity.setName(field("investmentName").toString()); | ||
181 | newSecurity.setTradingSymbol(field("investmentSymbol").toString()); | 181 | newSecurity.setTradingSymbol(field("investmentSymbol").toString()); | ||
182 | newSecurity.setTradingMarket(field("tradingMarket").toString()); | 182 | newSecurity.setTradingMarket(field("tradingMarket").toString()); | ||
183 | newSecurity.setSmallestAccountFraction(field("fraction").value<MyMoneyMoney>().formatMoney("", 0, false).toUInt()); | 183 | newSecurity.setSmallestAccountFraction(field("fraction").value<MyMoneyMoney>().formatMoney("", 0, false).toUInt()); | ||
184 | newSecurity.setPricePrecision(MyMoneyMoney(field("pricePrecision").toUInt()).formatMoney("", 0, false).toUInt()); | ||||
184 | newSecurity.setTradingCurrency(field("tradingCurrencyEdit").value<MyMoneySecurity>().id()); | 185 | newSecurity.setTradingCurrency(field("tradingCurrencyEdit").value<MyMoneySecurity>().id()); | ||
185 | newSecurity.setSecurityType(type); | 186 | newSecurity.setSecurityType(type); | ||
186 | newSecurity.setRoundingMethod(roudingMethod); | 187 | newSecurity.setRoundingMethod(roudingMethod); | ||
187 | newSecurity.deletePair("kmm-online-source"); | 188 | newSecurity.deletePair("kmm-online-source"); | ||
188 | newSecurity.deletePair("kmm-online-quote-system"); | 189 | newSecurity.deletePair("kmm-online-quote-system"); | ||
189 | newSecurity.deletePair("kmm-online-factor"); | 190 | newSecurity.deletePair("kmm-online-factor"); | ||
190 | newSecurity.deletePair("kmm-security-id"); | 191 | newSecurity.deletePair("kmm-security-id"); | ||
191 | 192 | | |||
▲ Show 20 Lines • Show All 55 Lines • Show Last 20 Lines |