teditor  1.8.0@@fee5e94
Terminal based editor written in C++
Public Member Functions | List of all members
teditor::ledger::Transaction Class Reference

#include <objects.h>

Public Member Functions

 Transaction (const std::string &dateStr, const std::string &n)
 
void add (const std::string &acct, double val)
 
void add (const std::string &acct)
 
void updateAccounts (Accounts &acc)
 
const std::string & name () const
 
const TimePointdate () const
 
int64_t rawBalance () const
 
double balance () const
 

Detailed Description

Represents a transaction in the ledger

Constructor & Destructor Documentation

◆ Transaction()

teditor::ledger::Transaction::Transaction ( const std::string &  dateStr,
const std::string &  n 
)
inline

Member Function Documentation

◆ add() [1/2]

void teditor::ledger::Transaction::add ( const std::string &  acct)
inline

default debit account which is the remaining of all the other credits

◆ add() [2/2]

void teditor::ledger::Transaction::add ( const std::string &  acct,
double  val 
)
inline

◆ balance()

double teditor::ledger::Transaction::balance ( ) const
inline

◆ date()

const TimePoint& teditor::ledger::Transaction::date ( ) const
inline

◆ name()

const std::string& teditor::ledger::Transaction::name ( ) const
inline

◆ rawBalance()

int64_t teditor::ledger::Transaction::rawBalance ( ) const
inline

total of all credits/debits. On a correct transaction, this must be 0

◆ updateAccounts()

void teditor::ledger::Transaction::updateAccounts ( Accounts acc)
inline

The documentation for this class was generated from the following file: