diff --git a/src/engine/gnc-lot.c b/src/engine/gnc-lot.c index ebf9695968..b9334be9df 100644 --- a/src/engine/gnc-lot.c +++ b/src/engine/gnc-lot.c @@ -130,6 +130,12 @@ gnc_lot_lookup (const GUID *guid, GNCBook *book) guid, GNC_ID_LOT); } +GNCBook * +gnc_lot_get_book (GNCLot *lot) +{ + if (!lot) return NULL; + return lot->book; +} /* ============================================================= */ diff --git a/src/engine/gnc-lot.h b/src/engine/gnc-lot.h index 44306e09c6..4e4c14f0e1 100644 --- a/src/engine/gnc-lot.h +++ b/src/engine/gnc-lot.h @@ -45,7 +45,7 @@ void gnc_lot_destroy (GNCLot *); const GUID * gnc_lot_get_guid (GNCLot *p); GNCLot * gnc_lot_lookup (const GUID *guid, GNCBook *book); - +GNCBook * gnc_lot_get_book (GNCLot *); /* The gnc_lot_add_split() routine adds a split to this lot. Note * that *all* splits in a lot must also be in the same account.