mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
fix multiple SX-from-trans bugs
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5401 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
4e01f60900
commit
a6d6063e6a
@ -1,3 +1,9 @@
|
|||||||
|
2001-09-21 Robert Graham Merkel <rgmerk@mira.net>
|
||||||
|
|
||||||
|
* src/engine/SchedXaction.c: fix split account bugs.
|
||||||
|
|
||||||
|
* src/gnome/dialog-sx-from-trans.c: fix freqspec bugs.
|
||||||
|
|
||||||
2001-09-14 Dave Peticolas <dave@krondo.com>
|
2001-09-14 Dave Peticolas <dave@krondo.com>
|
||||||
|
|
||||||
* src/register/register-gnome: add new headers
|
* src/register/register-gnome: add new headers
|
||||||
|
@ -503,7 +503,7 @@ xaccSchedXactionIsDirty(SchedXaction *sx)
|
|||||||
|
|
||||||
|
|
||||||
static Split *
|
static Split *
|
||||||
pack_split_info(TTSplitInfo *s_info, Account *parent_acct)
|
pack_split_info(TTSplitInfo *s_info, Account *parent_acct, Transaction *parent_trans)
|
||||||
{
|
{
|
||||||
Split *split;
|
Split *split;
|
||||||
kvp_frame *split_frame, *sx_frame;
|
kvp_frame *split_frame, *sx_frame;
|
||||||
@ -519,8 +519,9 @@ pack_split_info(TTSplitInfo *s_info, Account *parent_acct)
|
|||||||
gnc_ttsplitinfo_get_action(s_info));
|
gnc_ttsplitinfo_get_action(s_info));
|
||||||
|
|
||||||
|
|
||||||
xaccSplitSetAccount(split,
|
xaccAccountInsertSplit(parent_acct,
|
||||||
parent_acct);
|
split);
|
||||||
|
|
||||||
split_frame = xaccSplitGetSlots(split);
|
split_frame = xaccSplitGetSlots(split);
|
||||||
|
|
||||||
tmp_value
|
tmp_value
|
||||||
@ -591,7 +592,7 @@ void xaccSchedXactionSetTemplateTrans(SchedXaction *sx, GList *t_t_list)
|
|||||||
split_list = split_list->next)
|
split_list = split_list->next)
|
||||||
{
|
{
|
||||||
s_info = split_list->data;
|
s_info = split_list->data;
|
||||||
new_split = pack_split_info(s_info, sx->template_acct);
|
new_split = pack_split_info(s_info, sx->template_acct, new_trans);
|
||||||
xaccTransAppendSplit(new_trans, new_split);
|
xaccTransAppendSplit(new_trans, new_split);
|
||||||
}
|
}
|
||||||
xaccTransCommitEdit(new_trans);
|
xaccTransCommitEdit(new_trans);
|
||||||
|
@ -220,7 +220,7 @@ sxftd_add_template_trans(SXFromTransInfo *sxfti)
|
|||||||
static guint
|
static guint
|
||||||
sxftd_compute_sx(SXFromTransInfo *sxfti)
|
sxftd_compute_sx(SXFromTransInfo *sxfti)
|
||||||
{
|
{
|
||||||
GtkWidget *w;
|
GtkWidget *w;
|
||||||
gchar *name;
|
gchar *name;
|
||||||
GDate date;
|
GDate date;
|
||||||
time_t trans_t;
|
time_t trans_t;
|
||||||
@ -229,7 +229,7 @@ GtkWidget *w;
|
|||||||
getEndTuple end_info;
|
getEndTuple end_info;
|
||||||
guint sxftd_errno = 0; /* 0 == OK, > 0 means dialog needs to be run again */
|
guint sxftd_errno = 0; /* 0 == OK, > 0 means dialog needs to be run again */
|
||||||
|
|
||||||
FreqSpec *fs;
|
FreqSpec *fs, *tmpfs;
|
||||||
|
|
||||||
SchedXaction *sx = sxfti->sx;
|
SchedXaction *sx = sxfti->sx;
|
||||||
|
|
||||||
@ -272,8 +272,13 @@ GtkWidget *w;
|
|||||||
|
|
||||||
case FREQ_WEEKLY:
|
case FREQ_WEEKLY:
|
||||||
g_date_add_days(&date, 7);
|
g_date_add_days(&date, 7);
|
||||||
xaccFreqSpecSetWeekly(fs, &date, 1);
|
|
||||||
|
tmpfs = xaccFreqSpecMalloc();
|
||||||
|
xaccFreqSpecSetComposite(fs);
|
||||||
|
xaccFreqSpecSetWeekly(tmpfs, &date, 1);
|
||||||
xaccFreqSpecSetUIType(fs, UIFREQ_WEEKLY);
|
xaccFreqSpecSetUIType(fs, UIFREQ_WEEKLY);
|
||||||
|
xaccFreqSpecCompositeAdd(fs,tmpfs);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FREQ_MONTHLY:
|
case FREQ_MONTHLY:
|
||||||
|
Loading…
Reference in New Issue
Block a user