All Values are now in fix point
This commit is contained in:
@@ -114,7 +114,7 @@ void GrisbiImportEngine::LoadOperation(const QXmlAttributes& attrs)
|
||||
op.day = date.day();
|
||||
op.month = date.month();
|
||||
op.year = date.year();
|
||||
op.amount = attrs.value("Am").toDouble();
|
||||
op.amount = attrs.value("Am").toInt();
|
||||
op.category = _categories[attrs.value("Ca").toInt()];
|
||||
op.description = attrs.value("No");
|
||||
|
||||
|
||||
@@ -319,7 +319,7 @@ std::vector<Operation>* ImportEngine::GetOperations(std::map<int, int>& accounts
|
||||
return &_operations;
|
||||
}
|
||||
|
||||
const std::map<AccountAmount, double, AccountAmount>& ImportEngine::GetAccountAmounts()
|
||||
const std::map<AccountAmount, int, AccountAmount>& ImportEngine::GetAccountAmounts()
|
||||
{
|
||||
return _accountAmounts;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
// Final Step
|
||||
virtual std::vector<Operation>* GetOperations(std::map<int, int>& accounts, std::map<int, int>& categories);
|
||||
|
||||
const std::map<AccountAmount, double, AccountAmount>& GetAccountAmounts();
|
||||
const std::map<AccountAmount, int, AccountAmount>& GetAccountAmounts();
|
||||
|
||||
void MatchPattern(QString& key, Operation& op);
|
||||
int UpdatePattern(int pos);
|
||||
@@ -77,7 +77,7 @@ protected:
|
||||
std::vector<Category> _unresolvedCategories;
|
||||
std::vector<Operation> _operations;
|
||||
std::map<int, QString> _descriptions;
|
||||
std::map<AccountAmount, double, AccountAmount> _accountAmounts;
|
||||
std::map<AccountAmount, int, AccountAmount> _accountAmounts;
|
||||
|
||||
void ApplyPattern(ImportPattern& pattern, Operation& op);
|
||||
QString FindPattern(QString& s1, QString& s2);
|
||||
|
||||
@@ -142,12 +142,12 @@ void XMLImportEngine::LoadAccount(const QXmlAttributes& attrs)
|
||||
void XMLImportEngine::LoadAccountAmount(const QXmlAttributes& attrs)
|
||||
{
|
||||
AccountAmount accountAmount;
|
||||
double amount;
|
||||
int amount;
|
||||
|
||||
accountAmount.account = attrs.value("account").toInt();
|
||||
accountAmount.month = attrs.value("month").toInt();
|
||||
accountAmount.year = attrs.value("year").toInt();
|
||||
amount = attrs.value("amount").toDouble();
|
||||
amount = attrs.value("amount").toInt();
|
||||
|
||||
_accountAmounts[accountAmount] = amount;
|
||||
}
|
||||
@@ -210,7 +210,7 @@ void XMLImportEngine::LoadOperation(const QXmlAttributes& attrs)
|
||||
op.day = attrs.value("day").toInt();
|
||||
op.month = attrs.value("month").toInt();
|
||||
op.year = attrs.value("year").toInt();
|
||||
op.amount = attrs.value("amount").toDouble();
|
||||
op.amount = attrs.value("amount").toInt();
|
||||
op.description = attrs.value("description");
|
||||
op.category = attrs.value("category").toInt();
|
||||
op.category = (attrs.value("fix_cost") == "1");
|
||||
|
||||
Reference in New Issue
Block a user