Every QofBook contains a GNCPriceDB, accessible via gnc_pricedb_get_db. Definition in file gnc-pricedb.h. See also https://code.gnucash.org/docs/head/gnc-pricedb_8h.html ''' GncPriceDB.add_methods_with_prefix('gnc_pricedb_') PriceDB_dict = { 'lookup_latest' : GncPrice, 'lookup_nearest_in_time64' : GncPrice, 'lookup_latest_before_t64' : GncPrice, 'convert_balance_latest_price' : GncNumeric, 'convert_balance_nearest_price_t64' : GncNumeric, } methods_return_instance(GncPriceDB,PriceDB_dict) GncPriceDB.get_prices = method_function_returns_instance_list( GncPriceDB.get_prices, GncPrice ) class GncCommodity(GnuCashCoreClass): pass class GncCommodityTable(GnuCashCoreClass): """A CommodityTable provides a way to store and lookup commodities. Commodities are primarily currencies, but other tradable things such as stocks, mutual funds, and material substances are possible. Users of this library should not create their own CommodityTable, instead the get_table method from the Book class should be used. This table is automatically populated with the GnuCash default commodity's which includes most of the world's currencies. """
Every QofBook contains a GNCPriceDB, accessible via gnc_pricedb_get_db. Definition in file gnc-pricedb.h. See also http://code.gnucash.org/docs/head/gnc-pricedb_8h.html ''' GncPriceDB.add_methods_with_prefix('gnc_pricedb_') PriceDB_dict = { 'lookup_latest' : GncPrice, 'lookup_nearest_in_time64' : GncPrice, 'lookup_latest_before_t64' : GncPrice, 'convert_balance_latest_price' : GncNumeric, 'convert_balance_nearest_price_t64' : GncNumeric, } methods_return_instance(GncPriceDB,PriceDB_dict) GncPriceDB.get_prices = method_function_returns_instance_list( GncPriceDB.get_prices, GncPrice ) class GncCommodity(GnuCashCoreClass): pass class GncCommodityTable(GnuCashCoreClass): """A CommodityTable provides a way to store and lookup commodities. Commodities are primarily currencies, but other tradable things such as stocks, mutual funds, and material substances are possible. Users of this library should not create their own CommodityTable, instead the get_table method from the Book class should be used. This table is automatically populated with the GnuCash default commodity's which includes most of the world's currencies. """