Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.cpp
Show First 20 Lines • Show All 939 Lines • ▼ Show 20 Lines | bool CWallet::AccountMove(std::string strFrom, std::string strTo, | ||||
} | } | ||||
int64_t nNow = GetAdjustedTime(); | int64_t nNow = GetAdjustedTime(); | ||||
// Debit | // Debit | ||||
CAccountingEntry debit; | CAccountingEntry debit; | ||||
debit.nOrderPos = IncOrderPosNext(&walletdb); | debit.nOrderPos = IncOrderPosNext(&walletdb); | ||||
debit.strAccount = strFrom; | debit.strAccount = strFrom; | ||||
debit.nCreditDebit = -1 * nAmount; | debit.nCreditDebit = -nAmount; | ||||
debit.nTime = nNow; | debit.nTime = nNow; | ||||
debit.strOtherAccount = strTo; | debit.strOtherAccount = strTo; | ||||
debit.strComment = strComment; | debit.strComment = strComment; | ||||
AddAccountingEntry(debit, &walletdb); | AddAccountingEntry(debit, &walletdb); | ||||
// Credit | // Credit | ||||
CAccountingEntry credit; | CAccountingEntry credit; | ||||
credit.nOrderPos = IncOrderPosNext(&walletdb); | credit.nOrderPos = IncOrderPosNext(&walletdb); | ||||
▲ Show 20 Lines • Show All 3,623 Lines • Show Last 20 Lines |