00001 /********************************************************************\ 00002 * cap-gains.h -- Automatically Compute Capital Gains/Losses * 00003 * * 00004 * This program is free software; you can redistribute it and/or * 00005 * modify it under the terms of the GNU General Public License as * 00006 * published by the Free Software Foundation; either version 2 of * 00007 * the License, or (at your option) any later version. * 00008 * * 00009 * This program is distributed in the hope that it will be useful, * 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00012 * GNU General Public License for more details. * 00013 * * 00014 * You should have received a copy of the GNU General Public License* 00015 * along with this program; if not, contact: * 00016 * * 00017 * Free Software Foundation Voice: +1-617-542-5942 * 00018 * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 * 00019 * Boston, MA 02110-1301, USA gnu@gnu.org * 00020 \********************************************************************/ 00021 00080 #ifndef XACC_CAP_GAINS_H 00081 #define XACC_CAP_GAINS_H 00082 00083 #include "gnc-engine.h" 00084 00096 gnc_numeric xaccSplitGetCapGains(Split *); 00097 00107 gboolean xaccAccountHasTrades (const Account *); 00108 00120 GNCLot * xaccAccountFindEarliestOpenLot (Account *acc, 00121 gnc_numeric sign, 00122 gnc_commodity *currency); 00123 GNCLot * xaccAccountFindLatestOpenLot (Account *acc, 00124 gnc_numeric sign, 00125 gnc_commodity *currency); 00126 00136 Account * xaccAccountGetDefaultGainAccount (const Account *acc, const gnc_commodity * currency); 00137 00144 void xaccAccountSetDefaultGainAccount (Account *acc, const Account *gains_acct); 00145 00151 Split * xaccSplitGetCapGainsSplit (const Split *); 00152 00158 Split * xaccSplitGetGainsSourceSplit (const Split *); 00159 00183 gboolean xaccSplitAssign (Split *split); 00184 00203 Split * xaccSplitAssignToLot (Split *split, GNCLot *lot); 00204 00224 void xaccSplitComputeCapGains(Split *split, Account *gain_acc); 00225 void xaccLotComputeCapGains (GNCLot *lot, Account *gain_acc); 00226 00227 #endif /* XACC_CAP_GAINS_H */ 00228 00231 /* =========================== END OF FILE ======================= */
1.5.7.1