mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
move write_flag to split
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@377 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
a0e9dfb56f
commit
91c11be711
10
src/FileIO.c
10
src/FileIO.c
@ -779,7 +779,7 @@ xaccResetWriteFlags (AccountGroup *grp)
|
||||
trans = getTransaction (acc, 0);
|
||||
n++;
|
||||
while (trans) {
|
||||
trans->write_flag = 0;
|
||||
trans->credit_split.write_flag = 0;
|
||||
trans = getTransaction (acc, n);
|
||||
n++;
|
||||
}
|
||||
@ -926,7 +926,7 @@ writeAccount( int fd, Account *acc )
|
||||
numUnwrittenTrans = 0;
|
||||
for( i=0; i<acc->numTrans; i++ ) {
|
||||
trans = getTransaction(acc,i);
|
||||
if (0 == trans->write_flag) numUnwrittenTrans ++;
|
||||
if (0 == trans->credit_split.write_flag) numUnwrittenTrans ++;
|
||||
}
|
||||
|
||||
ntrans = numUnwrittenTrans;
|
||||
@ -938,7 +938,7 @@ writeAccount( int fd, Account *acc )
|
||||
INFO_2 ("writeAccount(): will write %d trans\n", numUnwrittenTrans);
|
||||
for( i=0; i<acc->numTrans; i++ ) {
|
||||
trans = getTransaction(acc,i);
|
||||
if (0 == trans->write_flag) {
|
||||
if (0 == trans->credit_split.write_flag) {
|
||||
err = writeTransaction( fd, trans );
|
||||
}
|
||||
if( -1 == err ) return err;
|
||||
@ -984,8 +984,8 @@ writeTransaction( int fd, Transaction *trans )
|
||||
* it again. That is, prevent double-entry transactions
|
||||
* from being written twice
|
||||
*/
|
||||
if (trans->write_flag) return 4;
|
||||
trans->write_flag = 1;
|
||||
if (trans->credit_split.write_flag) return 4;
|
||||
trans->credit_split.write_flag = 1;
|
||||
|
||||
err = writeString( fd, trans->num );
|
||||
if( -1 == err )
|
||||
|
@ -145,8 +145,6 @@ initTransaction( Transaction * trans )
|
||||
trans->date.year = 1900;
|
||||
trans->date.month = 1;
|
||||
trans->date.day = 1;
|
||||
|
||||
trans->write_flag = 0;
|
||||
}
|
||||
|
||||
/********************************************************************\
|
||||
@ -198,7 +196,6 @@ implemented and tested.
|
||||
trans->date.month = 1;
|
||||
trans->date.day = 1;
|
||||
|
||||
trans->write_flag = 0;
|
||||
_free(trans);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user