GnuCash  4.12-74-g36b33262ad+
Transaction.h
Go to the documentation of this file.
1 /********************************************************************\
2  * This program is free software; you can redistribute it and/or *
3  * modify it under the terms of the GNU General Public License as *
4  * published by the Free Software Foundation; either version 2 of *
5  * the License, or (at your option) any later version. *
6  * *
7  * This program is distributed in the hope that it will be useful, *
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
10  * GNU General Public License for more details. *
11  * *
12  * You should have received a copy of the GNU General Public License*
13  * along with this program; if not, contact: *
14  * *
15  * Free Software Foundation Voice: +1-617-542-5942 *
16  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
17  * Boston, MA 02110-1301, USA gnu@gnu.org *
18  * *
19 \********************************************************************/
86 #ifndef XACC_TRANSACTION_H
87 #define XACC_TRANSACTION_H
88 
89 typedef struct _TransactionClass TransactionClass;
90 
91 #include <time.h>
92 
93 #include "gnc-commodity.h"
94 #include "gnc-engine.h"
95 #include "gnc-pricedb.h"
96 #include "Split.h"
97 
98 #ifdef __cplusplus
99 extern "C" {
100 #endif
101 
102 /* --- type macros --- */
103 #define GNC_TYPE_TRANSACTION (gnc_transaction_get_type ())
104 #define GNC_TRANSACTION(o) \
105  (G_TYPE_CHECK_INSTANCE_CAST ((o), GNC_TYPE_TRANSACTION, Transaction))
106 #define GNC_TRANSACTION_CLASS(k) \
107  (G_TYPE_CHECK_CLASS_CAST((k), GNC_TYPE_TRANSACTION, TransactionClass))
108 #define GNC_IS_TRANSACTION(o) \
109  (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNC_TYPE_TRANSACTION))
110 #define GNC_IS_TRANSACTION_CLASS(k) \
111  (G_TYPE_CHECK_CLASS_TYPE ((k), GNC_TYPE_TRANSACTION))
112 #define GNC_TRANSACTION_GET_CLASS(o) \
113  (G_TYPE_INSTANCE_GET_CLASS ((o), GNC_TYPE_TRANSACTION, TransactionClass))
114 GType gnc_transaction_get_type(void);
115 
116 
117 /* FIXME: These macros are not consistent with the type name */
118 #define GNC_IS_TRANS(obj) GNC_IS_TRANSACTION(obj)
119 #define GNC_TRANS(obj) GNC_TRANSACTION(obj)
120 
124 #define TXN_TYPE_UNCACHED '?'
125 #define TXN_TYPE_NONE '\0'
126 #define TXN_TYPE_INVOICE 'I'
127 #define TXN_TYPE_PAYMENT 'P'
128 #define TXN_TYPE_LINK 'L'
131 /* --------------------------------------------------------------- */
132 /* Transactions */
133 
141 Transaction * xaccMallocTransaction (QofBook *book);
142 
157 void xaccTransDestroy (Transaction *trans);
158 
163 Transaction * xaccTransClone (const Transaction *t);
164 
169 Transaction * xaccTransCloneNoKvp (const Transaction *t);
170 
194 gboolean xaccTransEqual(const Transaction *ta,
195  const Transaction *tb,
196  gboolean check_guids,
197  gboolean check_splits,
198  gboolean check_balances,
199  gboolean assume_ordered);
200 
204 void xaccTransBeginEdit (Transaction *trans);
205 
211 void xaccTransCommitEdit (Transaction *trans);
212 
218 void xaccTransRollbackEdit (Transaction *trans);
219 
226 gboolean xaccTransIsOpen (const Transaction *trans);
227 
231 /*@ dependent @*//*@ null @*/
232 Transaction * xaccTransLookup (const GncGUID *guid, QofBook *book);
233 #define xaccTransLookupDirect(g,b) xaccTransLookup(&(g),b)
234 
235 /*################## Added for Reg2 #################*/
236 
241 Transaction * xaccTransCopyToClipBoard(const Transaction *from_trans);
242 
246 void xaccTransCopyOnto(const Transaction *from_trans, Transaction *to_trans);
247 
265 void xaccTransCopyFromClipBoard(const Transaction *from_trans, Transaction *to_trans,
266  const Account *from_acc, Account *to_acc, gboolean no_date);
267 
268 /*################## Added for Reg2 #################*/
269 
270 
271 Split * xaccTransFindSplitByAccount(const Transaction *trans,
272  const Account *acc);
273 
281 void xaccTransScrubGains (Transaction *trans, Account *gain_acc);
282 
283 
288 guint gnc_book_count_transactions(QofBook *book);
289 
299 gboolean xaccTransUseTradingAccounts(const Transaction *trans);
300 
304 void xaccTransSortSplits (Transaction *trans);
305 
312 void xaccTransSetTxnType (Transaction *trans, char type);
313 
320 char xaccTransGetTxnType (Transaction *trans);
321 
327 void xaccTransSetNum (Transaction *trans, const char *num);
328 
330 void xaccTransSetDescription (Transaction *trans, const char *desc);
331 
333 void xaccTransSetDocLink (Transaction *trans, const char *doclink);
334 
338 void xaccTransSetNotes (Transaction *trans, const char *notes);
339 
345 const char * xaccTransGetNum (const Transaction *trans);
347 const char * xaccTransGetDescription (const Transaction *trans);
349 const char * xaccTransGetDocLink(const Transaction *trans);
353 const char * xaccTransGetNotes (const Transaction *trans);
354 
355 
357 void xaccTransSetIsClosingTxn (Transaction *trans, gboolean is_closing);
358 
360 gboolean xaccTransGetIsClosingTxn (const Transaction *trans);
361 
362 
370 #define xaccTransAppendSplit(t, s) xaccSplitSetParent((s), (t))
371 
381 Split* xaccTransGetSplit (const Transaction *trans, int i);
382 
384 int xaccTransGetSplitIndex(const Transaction *trans, const Split *split);
385 
391 /*@ dependent @*/
392 SplitList * xaccTransGetSplitList (const Transaction *trans);
393 
399 SplitList * xaccTransGetPaymentAcctSplitList (const Transaction *trans);
400 
406 SplitList * xaccTransGetAPARAcctSplitList (const Transaction *trans, gboolean strict);
407 
408 
409 gboolean xaccTransStillHasSplit(const Transaction *trans, const Split *s);
410 
417 Split * xaccTransGetFirstPaymentAcctSplit (const Transaction *trans);
418 
425 Split * xaccTransGetFirstAPARAcctSplit (const Transaction *trans, gboolean strict);
426 
432 void xaccTransSetReadOnly (Transaction *trans, const char *reason);
433 void xaccTransClearReadOnly (Transaction *trans);
434 
437 const char * xaccTransGetReadOnly (Transaction *trans);
438 
442 gboolean xaccTransIsReadonlyByPostedDate(const Transaction *trans);
443 
444 /*################## Added for Reg2 #################*/
445 
447 gboolean xaccTransInFutureByPostedDate (const Transaction *trans);
448 
449 /*################## Added for Reg2 #################*/
450 
452 int xaccTransCountSplits (const Transaction *trans);
453 
455 gboolean xaccTransHasReconciledSplits (const Transaction *trans);
457 gboolean xaccTransHasReconciledSplitsByAccount (const Transaction *trans,
458  const Account *account);
459 
461 gboolean xaccTransHasSplitsInState (const Transaction *trans, const char state);
463 gboolean xaccTransHasSplitsInStateByAccount (const Transaction *trans,
464  const char state,
465  const Account *account);
466 
467 
475 /*@ dependent @*/
476 gnc_commodity * xaccTransGetCurrency (const Transaction *trans);
477 
479 void xaccTransSetCurrency (Transaction *trans, gnc_commodity *curr);
480 
496 gnc_numeric xaccTransGetImbalanceValue (const Transaction * trans);
497 
504 MonetaryList *xaccTransGetImbalance (const Transaction * trans);
505 
508 gboolean xaccTransIsBalanced(const Transaction * trans);
509 
516 gnc_numeric xaccTransGetAccountValue (const Transaction *trans,
517  const Account *account);
518 
520 gnc_numeric xaccTransGetAccountAmount (const Transaction *trans,
521  const Account *account);
522 
523 /*################## Added for Reg2 #################*/
524 /* Gets the amt/val rate, i.e. rate from the transaction currency to
525  the 'split_com' */
526 gboolean
527 xaccTransGetRateForCommodity(const Transaction *trans,
528  const gnc_commodity *split_com,
529  const Split *split_to_exclude, gnc_numeric *rate);
530 /*################## Added for Reg2 #################*/
531 
532 /* Compute the conversion rate for the transaction to this account.
533  * Any "split value" (which is in the transaction currency),
534  * multiplied by this conversion rate, will give you the value you
535  * should display for this account.
536  *
537  * If 'acc' is NULL, return unity.
538  */
539 gnc_numeric xaccTransGetAccountConvRate(const Transaction *txn, const Account *acc);
540 
543 gnc_numeric xaccTransGetAccountBalance (const Transaction *trans,
544  const Account *account);
545 
564 int xaccTransOrder (const Transaction *ta, const Transaction *tb);
565 
566 
586 int xaccTransOrder_num_action (const Transaction *ta, const char *actna,
587  const Transaction *tb, const char *actnb);
588 
605 void xaccTransSetDate (Transaction *trans,
606  int day, int mon, int year);
607 
615 void xaccTransSetDatePostedGDate (Transaction *trans, GDate date);
616 
626 void xaccTransSetDatePostedSecs (Transaction *trans, time64 time);
627 
637 void xaccTransSetDatePostedSecsNormalized (Transaction *trans, time64 time);
638 
641 void xaccTransSetDateEnteredSecs (Transaction *trans, time64 time);
642 
644 void xaccTransSetDateDue (Transaction * trans, time64 time);
645 
650 time64 xaccTransGetDate (const Transaction *trans);
655 time64 xaccTransRetDatePosted (const Transaction *trans);
658 GDate xaccTransGetDatePostedGDate (const Transaction *trans);
659 
660 /*################## Added for Reg2 #################*/
663 time64 xaccTransGetDateEntered (const Transaction *trans);
664 /*################## Added for Reg2 #################*/
667 time64 xaccTransRetDateEntered (const Transaction *trans);
668 
670 time64 xaccTransRetDateDue (const Transaction *trans);
675 /********************************************************************\
676  * Miscellaneous utility routines.
677 \********************************************************************/
678 
679 
692 void xaccTransVoid(Transaction *transaction,
693  const char *reason);
694 
702 void xaccTransUnvoid(Transaction *transaction);
703 
715 Transaction * xaccTransReverse(Transaction *transaction);
716 
724 Transaction * xaccTransGetReversedBy(const Transaction *trans);
725 
733 gboolean xaccTransGetVoidStatus(const Transaction *transaction);
734 
742 const char *xaccTransGetVoidReason(const Transaction *transaction);
743 
751 time64 xaccTransGetVoidTime(const Transaction *tr);
757 #define TRANS_KVP "kvp"
758 #define TRANS_NUM "num"
759 #define TRANS_DESCRIPTION "desc"
760 #define TRANS_DATE_ENTERED "date-entered"
761 #define TRANS_DATE_POSTED "date-posted"
762 #define TRANS_DATE_DUE "date-due"
763 #define TRANS_IMBALANCE "trans-imbalance"
764 #define TRANS_IS_BALANCED "trans-balanced?"
765 #define TRANS_IS_CLOSING "trans-is-closing?"
766 #define TRANS_NOTES "notes"
767 #define TRANS_DOCLINK "doclink"
768 #define TRANS_TYPE "type"
769 #define TRANS_VOID_STATUS "void-p"
770 #define TRANS_VOID_REASON "void-reason"
771 #define TRANS_VOID_TIME "void-time"
772 #define TRANS_SPLITLIST "split-list" /* for guid_match_all */
773 
775 #ifdef DUMP_FUNCTIONS
776 void xaccTransDump (const Transaction *trans, const char *tag);
777 #endif
778 
785 void xaccTransRecordPrice (Transaction *trans, PriceSource source);
786 
787 
788 #define RECONCILED_MATCH_TYPE "reconciled-match"
789 
791 #define xaccTransGetBook(X) qof_instance_get_book (QOF_INSTANCE(X))
792 
793 #define xaccTransGetGUID(X) qof_entity_get_guid(QOF_INSTANCE(X))
794 
795 #define xaccTransReturnGUID(X) (X ? *(qof_entity_get_guid(QOF_INSTANCE(X))) : *(guid_null()))
796 
797 #ifdef __cplusplus
798 } /* extern "C" */
799 #endif
800 
801 #endif /* XACC_TRANSACTION_H */
802 
gboolean xaccTransHasReconciledSplits(const Transaction *trans)
FIXME: document me.
Definition: Transaction.c:2723
Transaction * xaccMallocTransaction(QofBook *book)
The xaccMallocTransaction() will malloc memory and initialize it.
Definition: Transaction.c:511
void xaccTransSetDatePostedSecsNormalized(Transaction *trans, time64 time)
This function sets the posted date of the transaction, specified by a time64 (see ctime(3))...
gboolean xaccTransHasSplitsInStateByAccount(const Transaction *trans, const char state, const Account *account)
FIXME: document me.
Definition: Transaction.c:2730
Split * xaccTransGetSplit(const Transaction *trans, int i)
Return a pointer to the indexed split in this transaction&#39;s split list.
time64 xaccTransGetDate(const Transaction *trans)
Retrieve the posted date of the transaction.
gboolean xaccTransUseTradingAccounts(const Transaction *trans)
Determine whether this transaction should use commodity trading accounts.
Definition: Transaction.c:1034
gboolean xaccTransIsReadonlyByPostedDate(const Transaction *trans)
Returns TRUE if this Transaction is read-only because its posted-date is older than the "auto-readonl...
Definition: Transaction.c:2635
gboolean xaccTransIsOpen(const Transaction *trans)
The xaccTransIsOpen() method returns TRUE if the transaction is open for editing. ...
a simple price database for gnucash
gnc_numeric xaccTransGetAccountBalance(const Transaction *trans, const Account *account)
Get the account balance for the specified account after the last split in the specified transaction...
Definition: Transaction.c:1329
char xaccTransGetTxnType(Transaction *trans)
Returns the Transaction Type: note this type will be derived from the transaction splits...
Definition: Transaction.c:2556
void xaccTransSetNotes(Transaction *trans, const char *notes)
Sets the transaction Notes.
const char * xaccTransGetVoidReason(const Transaction *transaction)
Returns the user supplied textual reason why a transaction was voided.
Definition: Transaction.c:2835
const char * xaccTransGetReadOnly(Transaction *trans)
Returns a non-NULL value if this Transaction was marked as read-only with some specific "reason" text...
Definition: Transaction.c:2596
void xaccTransSetDescription(Transaction *trans, const char *desc)
Sets the transaction Description.
void xaccTransSetNum(Transaction *trans, const char *num)
Sets the transaction Number (or ID) field; rather than use this function directly, see &#39;gnc_set_num_action&#39; in engine/engine-helpers.c & .h which takes a user-set book option for selecting the source for the num-cell (the transaction-number or the split-action field) in registers/reports into account automatically.
Definition: Transaction.c:2180
void xaccTransRecordPrice(Transaction *trans, PriceSource source)
The xaccTransRecordPrice() method iterates through the splits and and record the non-currency equival...
void xaccTransCopyOnto(const Transaction *from_trans, Transaction *to_trans)
Copy a transaction to another using the function below without changing any account information...
Definition: Transaction.c:727
API for Transactions and Splits (journal entries)
gboolean xaccTransIsBalanced(const Transaction *trans)
Returns true if the transaction is balanced according to the rules currently in effect.
Definition: Transaction.c:1143
const char * xaccTransGetNum(const Transaction *trans)
Gets the transaction Number (or ID) field; rather than use this function directly, see &#39;gnc_get_num_action&#39; and &#39;gnc_get_action_num&#39; in engine/engine-helpers.c & .h which takes a user-set book option for selecting the source for the num-cell (the transaction-number or the split-action field) in registers/reports into account automatically.
int xaccTransOrder_num_action(const Transaction *ta, const char *actna, const Transaction *tb, const char *actnb)
The xaccTransOrder_num_action(ta,actna,tb,actnb) method is useful for sorting.
Definition: Transaction.c:1932
Split * xaccTransGetFirstPaymentAcctSplit(const Transaction *trans)
The xaccTransGetFirstPaymentAcctSplit() method returns a pointer to the first split in this transacti...
Definition: Transaction.c:2369
void xaccTransSetDatePostedGDate(Transaction *trans, GDate date)
This method modifies posted date of the transaction, specified by a GDate.
Definition: Transaction.c:2035
const char * xaccTransGetDocLink(const Transaction *trans)
Gets the transaction Document Link.
Definition: Transaction.c:2425
gboolean xaccTransHasReconciledSplitsByAccount(const Transaction *trans, const Account *account)
FIXME: document me.
Definition: Transaction.c:2694
void xaccTransSetCurrency(Transaction *trans, gnc_commodity *curr)
Set the commodity of this transaction.
Definition: Transaction.c:1426
void xaccTransDestroy(Transaction *trans)
Destroys a transaction.
const char * xaccTransGetNotes(const Transaction *trans)
Gets the transaction Notes.
Transaction * xaccTransLookup(const GncGUID *guid, QofBook *book)
The xaccTransLookup() subroutine will return the transaction associated with the given id...
Definition: Transaction.c:1043
void xaccTransSetIsClosingTxn(Transaction *trans, gboolean is_closing)
Sets whether or not this transaction is a "closing transaction".
Definition: Transaction.c:2273
int xaccTransCountSplits(const Transaction *trans)
Returns the number of splits in this transaction.
Definition: Transaction.c:2404
void xaccTransSetTxnType(Transaction *trans, char type)
Set the Transaction Type: note the type will be saved into the Transaction kvp property as a backward...
Definition: Transaction.c:2111
GList SplitList
GList of Split.
Definition: gnc-engine.h:211
gboolean xaccTransHasSplitsInState(const Transaction *trans, const char state)
FIXME: document me.
Definition: Transaction.c:2753
gboolean xaccTransEqual(const Transaction *ta, const Transaction *tb, gboolean check_guids, gboolean check_splits, gboolean check_balances, gboolean assume_ordered)
Equality.
Definition: Transaction.c:875
gnc_numeric xaccTransGetImbalanceValue(const Transaction *trans)
The xaccTransGetImbalanceValue() method returns the total value of the transaction.
void xaccTransSetReadOnly(Transaction *trans, const char *reason)
Set the transaction to be ReadOnly by setting a non-NULL value as "reason".
Definition: Transaction.c:2147
void xaccTransVoid(Transaction *transaction, const char *reason)
xaccTransVoid voids a transaction.
Definition: Transaction.c:2785
Transaction * xaccTransClone(const Transaction *t)
The xaccTransClone() method will create a complete copy of an existing transaction.
Definition: Transaction.c:682
time64 xaccTransRetDatePosted(const Transaction *trans)
Retrieve the posted date of the transaction.
Definition: Transaction.c:2492
void xaccTransCopyFromClipBoard(const Transaction *from_trans, Transaction *to_trans, const Account *from_acc, Account *to_acc, gboolean no_date)
This function explicitly must robustly handle some unusual input.
Definition: Transaction.c:751
void xaccTransScrubGains(Transaction *trans, Account *gain_acc)
The xaccTransScrubGains() routine performs a number of cleanup functions on the indicated transaction...
Definition: Transaction.c:3010
Transaction * xaccTransCloneNoKvp(const Transaction *t)
The xaccTransCloneNoKvp() method will create a complete copy of an existing transaction except that ...
Definition: Transaction.c:645
gboolean xaccTransInFutureByPostedDate(const Transaction *trans)
Returns TRUE if this Transaction&#39;s posted-date is in the future.
Definition: Transaction.c:2675
const char * xaccTransGetDescription(const Transaction *trans)
Gets the transaction Description.
void xaccTransSetDate(Transaction *trans, int day, int mon, int year)
The xaccTransSetDate() method does the same thing as xaccTransSetDate[Posted]Secs(), but takes a convenient day-month-year format.
Definition: Transaction.c:2080
void xaccTransSetDateDue(Transaction *trans, time64 time)
Dates and txn-type for A/R and A/P "invoice" postings.
Definition: Transaction.c:2097
void xaccTransCommitEdit(Transaction *trans)
The xaccTransCommitEdit() method indicates that the changes to the transaction and its splits are com...
void xaccTransBeginEdit(Transaction *trans)
The xaccTransBeginEdit() method must be called before any changes are made to a transaction or any of...
int xaccTransGetSplitIndex(const Transaction *trans, const Split *split)
Inverse of xaccTransGetSplit()
Definition: Transaction.c:2311
SplitList * xaccTransGetAPARAcctSplitList(const Transaction *trans, gboolean strict)
The xaccTransGetAPARSplitList() method returns a GList of the splits in a transaction that belong to ...
Definition: Transaction.c:2341
void xaccTransUnvoid(Transaction *transaction)
xaccTransUnvoid restores a voided transaction to its original state.
Definition: Transaction.c:2869
All type declarations for the whole Gnucash engine.
time64 xaccTransGetVoidTime(const Transaction *tr)
Returns the time that a transaction was voided.
Definition: Transaction.c:2850
time64 xaccTransGetDateEntered(const Transaction *trans)
Retrieve the date of when the transaction was entered.
Definition: Transaction.c:2485
Transaction * xaccTransReverse(Transaction *transaction)
xaccTransReverse creates a Transaction that reverses the given transaction by inverting all the numer...
Definition: Transaction.c:2897
guint gnc_book_count_transactions(QofBook *book)
Definition: Transaction.c:2773
void xaccTransSetDatePostedSecs(Transaction *trans, time64 time)
The xaccTransSetDatePostedSecs() method will modify the posted date of the transaction, specified by a time64 (see ctime(3)).
Definition: Transaction.c:2019
Split * xaccTransGetFirstAPARAcctSplit(const Transaction *trans, gboolean strict)
The xaccTransGetFirstPaymentAcctSplit() method returns a pointer to the first split in this transacti...
Definition: Transaction.c:2380
gboolean xaccTransGetVoidStatus(const Transaction *transaction)
Retrieve information on whether or not a transaction has been voided.
Definition: Transaction.c:2828
SplitList * xaccTransGetPaymentAcctSplitList(const Transaction *trans)
The xaccTransGetPaymentAcctSplitList() method returns a GList of the splits in a transaction that bel...
Definition: Transaction.c:2327
gboolean xaccTransGetIsClosingTxn(const Transaction *trans)
Returns whether this transaction is a "closing transaction".
Definition: Transaction.c:2455
gnc_commodity * xaccTransGetCurrency(const Transaction *trans)
Returns the valuation commodity of this transaction.
Definition: Transaction.c:1367
MonetaryList * xaccTransGetImbalance(const Transaction *trans)
The xaccTransGetImbalance method returns a list giving the value of the transaction in each currency ...
Definition: Transaction.c:1071
void xaccTransSetDocLink(Transaction *trans, const char *doclink)
Sets the transaction Document Link.
Definition: Transaction.c:2211
PriceSource
Price source enum.
Definition: gnc-pricedb.h:169
Transaction * xaccTransGetReversedBy(const Transaction *trans)
Returns the transaction that reversed the given transaction.
Definition: Transaction.c:2937
int xaccTransOrder(const Transaction *ta, const Transaction *tb)
The xaccTransOrder(ta,tb) method is useful for sorting.
Definition: Transaction.c:1896
gint64 time64
Many systems, including Microsoft Windows and BSD-derived Unixes like Darwin, are retaining the int-3...
Definition: gnc-date.h:93
void xaccTransSetDateEnteredSecs(Transaction *trans, time64 time)
Modify the date of when the transaction was entered.
Definition: Transaction.c:2054
time64 xaccTransRetDateEntered(const Transaction *trans)
Retrieve the date of when the transaction was entered.
Definition: Transaction.c:2533
void xaccTransSortSplits(Transaction *trans)
Sorts the splits in a transaction, putting the debits first, followed by the credits.
Definition: Transaction.c:567
GDate xaccTransGetDatePostedGDate(const Transaction *trans)
Retrieve the posted date of the transaction.
Definition: Transaction.c:2498
The type used to store guids in C.
Definition: guid.h:75
time64 xaccTransRetDateDue(const Transaction *trans)
Dates and txn-type for A/R and A/P "invoice" postings.
Definition: Transaction.c:2539
SplitList * xaccTransGetSplitList(const Transaction *trans)
The xaccTransGetSplitList() method returns a GList of the splits in a transaction.
Commodity handling public routines.
void xaccTransRollbackEdit(Transaction *trans)
The xaccTransRollbackEdit() routine rejects all edits made, and sets the transaction back to where it...
Definition: Transaction.c:1730
Transaction * xaccTransCopyToClipBoard(const Transaction *from_trans)
Copy a transaction to the &#39;clipboard&#39; transaction using dupe_transaction.
Definition: Transaction.c:711
gnc_numeric xaccTransGetAccountAmount(const Transaction *trans, const Account *account)
Same as xaccTransGetAccountValue, but uses the Account&#39;s commodity.
Definition: Transaction.c:1205
gnc_numeric xaccTransGetAccountValue(const Transaction *trans, const Account *account)
The xaccTransGetAccountValue() method returns the total value applied to a particular account...
Definition: Transaction.c:1189