GnuCash c935c2f+
Loading...
Searching...
No Matches
cap-gains.h
Go to the documentation of this file.
1/********************************************************************\
2 * cap-gains.h -- Automatically Compute Capital Gains/Losses *
3 * *
4 * This program is free software; you can redistribute it and/or *
5 * modify it under the terms of the GNU General Public License as *
6 * published by the Free Software Foundation; either version 2 of *
7 * the License, or (at your option) any later version. *
8 * *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU General Public License*
15 * along with this program; if not, contact: *
16 * *
17 * Free Software Foundation Voice: +1-617-542-5942 *
18 * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
19 * Boston, MA 02110-1301, USA gnu@gnu.org *
20\********************************************************************/
21
80#ifndef XACC_CAP_GAINS_H
81#define XACC_CAP_GAINS_H
82
83#include "gnc-engine.h"
84
85#ifdef __cplusplus
86extern "C" {
87#endif
88
100gnc_numeric xaccSplitGetCapGains(Split *);
101
111gboolean xaccAccountHasTrades (const Account *);
112
125 gnc_numeric sign,
126 gnc_commodity *currency);
127GNCLot * xaccAccountFindLatestOpenLot (Account *acc,
128 gnc_numeric sign,
129 gnc_commodity *currency);
130
136Split * xaccSplitGetCapGainsSplit (const Split *);
137
143Split * xaccSplitGetGainsSourceSplit (const Split *);
144
168gboolean xaccSplitAssign (Split *split);
169
188Split * xaccSplitAssignToLot (Split *split, GNCLot *lot);
189
201gnc_numeric xaccLotFreeSplitCapGain(Split *split, GNCLot *lot);
202
203
223void xaccSplitComputeCapGains(Split *split, Account *gain_acc);
224void xaccLotComputeCapGains (GNCLot *lot, Account *gain_acc);
225
226#ifdef __cplusplus
227}
228#endif
229
230#endif /* XACC_CAP_GAINS_H */
234/* =========================== END OF FILE ======================= */
All type declarations for the whole Gnucash engine.
gboolean xaccAccountHasTrades(const Account *)
The xaccAccountHasTrades() method checks to see if the indicated account is used in the trading of co...
Definition cap-gains.cpp:80
Split * xaccSplitAssignToLot(Split *split, GNCLot *lot)
The xaccSplitAssignToLot() routine will fit the indicated split into the indicated lot,...
GNCLot * xaccAccountFindEarliestOpenLot(Account *acc, gnc_numeric sign, gnc_commodity *currency)
The xaccAccountFindEarliestOpenLot() method is a handy utility routine for finding the earliest open ...
gboolean xaccSplitAssign(Split *split)
The`xaccSplitAssign() routine will take the indicated split and, if it doesn't already belong to a lo...
Split * xaccSplitGetCapGainsSplit(const Split *)
The xaccSplitGetCapGainsSplit() routine returns the split that records the cap gains for this split.
gnc_numeric xaccSplitGetCapGains(Split *)
The xaccSplitGetCapGains() method returns the value of capital gains (if any) associated with the ind...
Split * xaccSplitGetGainsSourceSplit(const Split *)
The xaccSplitGetGainsSourceSplit() routine returns the split that is the source of the cap gains in t...
gnc_numeric xaccLotFreeSplitCapGain(Split *split, GNCLot *lot)
The xaccLotFreeSplitCapGain() method returns the value of capital gain (if any) associated with the i...
void xaccSplitComputeCapGains(Split *split, Account *gain_acc)
The xaccSplitComputeCapGains() routine computes the cap gains or losses for the indicated split.
STRUCTS.