diff --git a/ChangeLog b/ChangeLog index a850beaffa..40fa796856 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,15 @@ 2001-07-03 Dave Peticolas + * src/scm/commodity-utilities.scm: fix bug -- use srfi-1 to + make sure we get the right 'last' + + * src/scm/Makefile.am: same as below + + * src/scm/report/Makefile.am: fix bugs -- put modulized scm + files back into dist and strings targets + + * src/scm/report/taxtxf.scm: fix bug, eliminate use of append + * src/MultiLedger.c: same as below * src/register/table-allgui.c: same as below diff --git a/src/scm/Makefile.am b/src/scm/Makefile.am index 5224a43424..d96b117fce 100644 --- a/src/scm/Makefile.am +++ b/src/scm/Makefile.am @@ -61,16 +61,18 @@ gnc_regular_scm_files = \ gncscm_DATA = ${gnc_autogen_scm_files} ${gnc_regular_scm_files} +SCM_FILES = ${gncscm_DATA} ${gncscmmod_DATA} + EXTRA_DIST = \ .cvsignore \ bootstrap.scm.in \ design.txt \ startup-design.txt \ - ${gnc_regular_scm_files} + ${SCM_FILES} -guile-strings.c: ${gncscm_DATA} +guile-strings.c: ${SCM_FILES} rm -f guile-strings.c - guile -s ./xgettext.scm ${gncscm_DATA} + guile -s ./xgettext.scm ${SCM_FILES} CLEANFILES += guile-strings.c all-local: guile-strings.c diff --git a/src/scm/commodity-utilities.scm b/src/scm/commodity-utilities.scm index 9773f227ff..c252329bb8 100644 --- a/src/scm/commodity-utilities.scm +++ b/src/scm/commodity-utilities.scm @@ -23,6 +23,8 @@ (gnc:support "commodity-utilities.scm") (gnc:depend "report-utilities.scm") +(use-modules (srfi srfi-1)) + ;; Returns true if the commodity comm represents a currency, false if ;; it represents a stock or mutual-fund. (define (gnc:commodity-is-currency? comm) diff --git a/src/scm/report/Makefile.am b/src/scm/report/Makefile.am index 57072d1f1b..e51f091282 100644 --- a/src/scm/report/Makefile.am +++ b/src/scm/report/Makefile.am @@ -1,6 +1,15 @@ gncscmdir = ${GNC_SCM_INSTALL_DIR}/report +gncscm_DATA = \ + report-list.scm \ + stylesheet-fancy.scm \ + stylesheet-plain.scm \ + txf-export-help.scm \ + txf-export.scm \ + view-column.scm \ + welcome-to-gnucash.scm + gncscmmoddir = ${GNC_SHAREDIR}/guile-modules/gnucash/report gncscmmod_DATA = \ @@ -19,22 +28,15 @@ gncscmmod_DATA = \ taxtxf.scm \ transaction.scm -gncscm_DATA = \ - report-list.scm \ - stylesheet-fancy.scm \ - stylesheet-plain.scm \ - txf-export-help.scm \ - txf-export.scm \ - view-column.scm \ - welcome-to-gnucash.scm +SCM_FILES = ${gncscm_DATA} ${gncscmmod_DATA} EXTRA_DIST = \ .cvsignore \ - ${gncscm_DATA} + ${SCM_FILES} -guile-strings.c: ${gncscm_DATA} +guile-strings.c: ${SCM_FILES} rm -f guile-strings.c - guile -s ../xgettext.scm ${gncscm_DATA} + guile -s ../xgettext.scm ${SCM_FILES} CLEANFILES += guile-strings.c all-local: guile-strings.c diff --git a/src/scm/report/taxtxf.scm b/src/scm/report/taxtxf.scm index dd290783fa..a5d4b77ec9 100644 --- a/src/scm/report/taxtxf.scm +++ b/src/scm/report/taxtxf.scm @@ -396,16 +396,16 @@ ;; Don't check children if parent is valid. ;; Returns the Parent if a child or grandchild is valid. (define (validate accounts) - (apply append (map (lambda (a) - (if (gnc:account-get-tax-related a) - (list a) - ;; check children - (if (null? (validate - (gnc:group-get-subaccounts - (gnc:account-get-children a)))) - '() - (list a)))) - accounts))) + (filter (lambda (a) + (if (gnc:account-get-tax-related a) + #t + ;; check children + (if (null? (validate + (gnc:group-get-subaccounts + (gnc:account-get-children a)))) + #f + #t))) + accounts)) ;; returns 'html if html is chosen, 'txf if txf is chosen, ;; and #f otherwise @@ -434,7 +434,7 @@ ;; the number of account generations: children, grandchildren etc. (define (num-generations account gen) (let ((children (gnc:account-get-children account))) - (if (not children) + (if (eq? (gnc:group-get-num-accounts children) 0) (if (and (gnc:account-get-tax-related account) (txf-special-split? (gnc:account-get-txf-code account))) (+ gen 1) ; Est Fed Tax has a extra generation