mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
add default lot title
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9166 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
a39ca64f76
commit
158d953c60
@ -255,11 +255,21 @@ restart_loop:
|
||||
}
|
||||
else
|
||||
{
|
||||
gint64 id;
|
||||
char buff[200];
|
||||
|
||||
/* No lot was found. Start a new lot */
|
||||
PINFO ("start new lot");
|
||||
lot = gnc_lot_new (acc->book);
|
||||
gnc_lot_add_split (lot, split);
|
||||
split = NULL;
|
||||
|
||||
/* Provide a reasonable title for the new lot */
|
||||
id = kvp_frame_get_gint64 (xaccAccountGetSlots (acc), "/lot-mgmt/next-id");
|
||||
snprintf (buff, 200, _("Lot %lld"), id);
|
||||
kvp_frame_set_str (gnc_lot_get_slots (lot), "/title", buff);
|
||||
id ++;
|
||||
kvp_frame_set_gint64 (xaccAccountGetSlots (acc), "/lot-mgmt/next-id", id);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user