GnuCash  2.6.99
Macros | Functions
policy.c File Reference

Implement FIFO Accounting Policy. More...

#include "config.h"
#include <glib.h>
#include "Account.h"
#include "Transaction.h"
#include "TransactionP.h"
#include "cap-gains.h"
#include "gnc-engine.h"
#include "gnc-lot.h"
#include "policy.h"
#include "policy-p.h"
#include <glib/gi18n.h>

Go to the source code of this file.

Macros

#define FIFO_POLICY   "fifo"
 
#define FIFO_POLICY_DESC   N_("First In, First Out")
 
#define FIFO_POLICY_HINT   N_("Use oldest lots first.")
 
#define LIFO_POLICY   "lifo"
 
#define LIFO_POLICY_DESC   N_("Last In, First Out")
 
#define LIFO_POLICY_HINT   N_("Use newest lots first.")
 
#define AVERAGE_POLICY   "average"
 
#define AVERAGE_POLICY_DESC   N_("Average")
 
#define AVERAGE_POLICY_HINT   N_("Average cost of open lots.")
 
#define MANUAL_POLICY   "manual"
 
#define MANUAL_POLICY_DESC   N_("Manual")
 
#define MANUAL_POLICY_HINT   N_("Manually select lots.")
 

Functions

GList * gnc_get_valid_policy_list (void)
 Valid Policy List Provides a glist of implemented policies. More...
 
gboolean gnc_valid_policy_name (const gchar *policy_name)
 Valid Policy Name Uses the Valid Policy List to determine if a policy name is valid.
 
const char * PolicyGetName (const GNCPolicy *pcy)
 
const char * PolicyGetDescription (const GNCPolicy *pcy)
 
const char * PolicyGetHint (const GNCPolicy *pcy)
 
GNCPolicy * xaccGetFIFOPolicy (void)
 First-in, First-out Policy This policy will create FIFO Lots. More...
 
GNCPolicy * xaccGetLIFOPolicy (void)
 Last-in, Last-out Policy This policy will create LIFO Lots. More...
 

Detailed Description

Implement FIFO Accounting Policy.

Author
Created by Linas Vepstas August 2003
Copyright (c) 2003,2004 Linas Vepstas linas.nosp@m.@lin.nosp@m.as.or.nosp@m.g

This file implements the FIFO Accounting Policy (and, in the future, others as well). The Accounting Polciy determines how splits are assigned to lots.

Definition in file policy.c.