1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
7 SDESC[standard]= Financial accounting software
8 HOMEPAGE= https://www.gnucash.org/
12 SITES[main]= SF/gnucash/gnucash%20%28stable%29/3.10
13 DISTFILE[1]= gnucash-3.10.tar.bz2:main
15 SPKGS[standard]= complete
20 OPTIONS_AVAILABLE= none
21 OPTIONS_STANDARD= none
23 BUILD_DEPENDS= gmp:static:standard
24 appstream-glib:primary:standard
25 BUILDRUN_DEPENDS= gnome-keyring:single:standard
27 libsecret:primary:standard
28 boost-libraries:rest:python_default
29 boehm_garbage_collector:single:threaded
30 fontconfig:primary:standard
31 freetype:primary:standard
32 libsoup:primary:standard
33 aqbanking:single:standard
34 libdbi-drivers:primary:sqlite
35 libofx:primary:standard
36 guile22:single:standard
38 RUN_DEPENDS= perl-Date-Manip:single:perl_default
39 perl-Finance-Quote:single:perl_default
40 perl-libwww-perl:single:perl_default
42 USES= cmake:insource desktop-utils:primary
43 gnome-icons:primary pkgconfig gettext-tools
44 gettext-runtime libtool perl shebangfix zlib
45 GNOME_COMPONENTS= gtk3 libxslt intltool
48 DISTNAME= gnucash-3.10
50 LICENSE= GPLv2+:primary GPLv3+:primary
51 LICENSE_TERMS= primary:{{WRKDIR}}/TERMS
52 LICENSE_FILE= GPLv2+:stock
54 LICENSE_AWK= TERMS:"^The text of the GNU GPL"
55 LICENSE_SOURCE= TERMS:{{WRKSRC}}/LICENSE
58 FPC_EQUIVALENT= finance/gnucash
59 GLIB_SCHEMAS= org.gnucash.dialogs.business.gschema.xml
60 org.gnucash.dialogs.checkprinting.gschema.xml
61 org.gnucash.dialogs.commodities.gschema.xml
62 org.gnucash.dialogs.export.csv.gschema.xml
63 org.gnucash.dialogs.gschema.xml
64 org.gnucash.dialogs.import.csv.gschema.xml
65 org.gnucash.dialogs.import.generic.gschema.xml
66 org.gnucash.dialogs.import.hbci.gschema.xml
67 org.gnucash.dialogs.import.ofx.gschema.xml
68 org.gnucash.dialogs.import.qif.gschema.xml
69 org.gnucash.dialogs.reconcile.gschema.xml
70 org.gnucash.dialogs.sxs.gschema.xml
71 org.gnucash.dialogs.totd.gschema.xml
72 org.gnucash.general.finance-quote.gschema.xml
73 org.gnucash.gschema.xml
74 org.gnucash.history.gschema.xml
75 org.gnucash.warnings.gschema.xml
76 org.gnucash.window.pages.account.tree.gschema.xml
77 org.gnucash.window.pages.gschema.xml
78 SHEBANG_FILES= common/gnc-test-env.pl
80 MAKE_ENV= XDG_CACHE_HOME={{WRKDIR}}/.cache
83 CMAKE_ARGS= -DWITH_AQBANKING:BOOL=true
86 -DCOMPILE_GSCHEMAS=OFF
91 # disable testing and fix XDG_DATA_DIRS
93 ${FIND} . -type f -name CMakeLists.txt \
94 -exec ${REINPLACE_CMD} \
95 -e 's|/usr/local/share|${PREFIX}/share|' \
97 -e '/add_subdirectory *(test.*)/d' \
98 -e '/enable_testing()/d' -e '/include (GncAddTest)/d' \
99 -e '/INCLUDE (GncAddTest)/d' \
100 -e '/gnc_gtest_configure()/d' {} +)
101 ${SED} -i.flag -e '/-Wno-deprecated-register/d' \
102 ${WRKSRC}/libgnucash/engine/CMakeLists.txt
103 ${MKDIR} ${WRKSRC}/bin
106 (cd ${STAGEDIR}${PREFIX}/etc/gnucash && \
107 ${MV} environment environment.sample)
108 (cd ${STAGEDIR}${PREFIX}/share/gnucash/icons/hicolor && \
109 ${RM} -r 22x22 32x32 48x48 64x64 96x96 \
110 128x128 256x256 scalable)
111 ${RMDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/*/actions
112 ${RMDIR} ${STAGEDIR}${PREFIX}/share/gnucash/icons/hicolor/16x16/apps
113 ${RMDIR} ${STAGEDIR}${PREFIX}/share/gnucash/icons/hicolor/24x24/apps
114 ${RM} ${STAGEDIR}${STD_DOCDIR}/ChangeLog*
115 ${RM} ${STAGEDIR}${STD_DOCDIR}/LICENSE
116 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/gnucash/*.${LIBEXT}
117 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/*.${LIBEXT}
118 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/gnucash
120 [FILE:431:descriptions/desc.primary]
121 Gnucash is the next generation of money manager created from a merger of
122 X-Accountant and GnoMoney.
124 Its features include:
125 * Ability to import Quicken files ( a must )
126 * Reports, Graphs, and all of those goodies that you find in Quicken.
127 * Gnome compliant ( if that is the correct way to put it )
128 * Separate the GUI from the actual "account/transaction engine"
129 * Multiple accounts ( Check, Credit, Cash, Mutual Funds, etc.. )
133 b60772c276a63639964d1e24c795fbb9a7c0c6c45959168fe5cdfe08eb796f16 14166587 gnucash-3.10.tar.bz2
136 [FILE:30360:manifests/plist.primary]
137 @sample etc/gnucash/environment.sample
162 assistant-xml-encoding.h
175 dialog-custom-report.h
178 dialog-object-references.h
182 dialog-report-column-view.h
183 dialog-report-style-sheet.h
184 dialog-reset-warnings.h
189 engine-helpers-guile.h
197 gnc-accounting-period.h
200 gnc-aqbanking-templates.h
203 gnc-cell-renderer-date.h
204 gnc-cell-renderer-popup-entry.h
205 gnc-cell-renderer-popup.h
209 gnc-component-manager.h
216 gnc-dense-cal-model.h
217 gnc-dense-cal-store.h
219 gnc-embedded-window.h
221 gnc-entry-quickfill.h
248 gnc-menu-extensions.h
254 gnc-plugin-file-history.h
256 gnc-plugin-menu-additions.h
257 gnc-plugin-page-report.h
263 gnc-rational-rounding.hpp
270 gnc-sx-instance-dense-cal-adapter.h
271 gnc-sx-instance-model.h
272 gnc-sx-list-tree-model-adapter.h
274 gnc-tree-control-split-reg.h
275 gnc-tree-model-account-types.h
276 gnc-tree-model-account.h
277 gnc-tree-model-budget.h
278 gnc-tree-model-commodity.h
279 gnc-tree-model-owner.h
280 gnc-tree-model-price.h
281 gnc-tree-model-split-reg.h
283 gnc-tree-util-split-reg.h
284 gnc-tree-view-account.h
285 gnc-tree-view-commodity.h
286 gnc-tree-view-owner.h
287 gnc-tree-view-price.h
288 gnc-tree-view-split-reg.h
289 gnc-tree-view-sx-list.h
364 window-main-summarybar.h
367 libgnc-backend-sql.so
368 libgnc-backend-xml-utils.so
374 libgncmod-app-utils.so
375 libgncmod-aqbanking.so
376 libgncmod-backend-dbi.so
377 libgncmod-backend-xml.so
378 libgncmod-bi-import.so
379 libgncmod-csv-export.so
380 libgncmod-csv-import.so
381 libgncmod-customer-import.so
383 libgncmod-generic-import.so
384 libgncmod-gnome-search.so
385 libgncmod-gnome-utils.so
387 libgncmod-ledger-core.so
388 libgncmod-locale-reports-us.so
389 libgncmod-log-replay.so
391 libgncmod-qif-import.so
392 libgncmod-register-core.so
393 libgncmod-register-gnome.so
394 libgncmod-report-gnome.so
395 libgncmod-report-system.so
396 libgncmod-stylesheets.so
398 lib/gnucash/scm/ccache/2.2/
403 commodity-utilities.go
408 gnc-menu-extensions.go
437 lib/gnucash/scm/ccache/2.2/gnucash/
447 lib/gnucash/scm/ccache/2.2/gnucash/import-export/
450 lib/gnucash/scm/ccache/2.2/gnucash/report/
456 eguile-html-utilities.go
473 stylesheet-head-or-tail.go
481 welcome-to-gnucash.go
482 lib/gnucash/scm/ccache/2.2/gnucash/report/locale-specific/
485 lib/gnucash/scm/ccache/2.2/gnucash/report/report-system/
488 lib/gnucash/scm/ccache/2.2/gnucash/report/standard-reports/
491 advanced-portfolio.go
496 budget-balance-sheet.go
499 budget-income-statement.go
508 income-gst-statement.go
517 lib/gnucash/scm/ccache/2.2/gnucash/tax/
520 lib/gnucash/scm/ccache/2.2/json/
524 lib/gnucash/scm/ccache/2.2/qif-import/
534 share/applications/gnucash.desktop
535 share/glib-2.0/schemas/
536 org.gnucash.dialogs.business.gschema.xml
537 org.gnucash.dialogs.checkprinting.gschema.xml
538 org.gnucash.dialogs.commodities.gschema.xml
539 org.gnucash.dialogs.export.csv.gschema.xml
540 org.gnucash.dialogs.gschema.xml
541 org.gnucash.dialogs.import.csv.gschema.xml
542 org.gnucash.dialogs.import.generic.gschema.xml
543 org.gnucash.dialogs.import.hbci.gschema.xml
544 org.gnucash.dialogs.import.ofx.gschema.xml
545 org.gnucash.dialogs.import.qif.gschema.xml
546 org.gnucash.dialogs.reconcile.gschema.xml
547 org.gnucash.dialogs.sxs.gschema.xml
548 org.gnucash.dialogs.totd.gschema.xml
549 org.gnucash.general.finance-quote.gschema.xml
550 org.gnucash.gschema.xml
551 org.gnucash.history.gschema.xml
552 org.gnucash.warnings.gschema.xml
553 org.gnucash.window.pages.account.tree.gschema.xml
554 org.gnucash.window.pages.gschema.xml
556 make-prefs-migration-script.xsl
559 share/gnucash/accounts/C/
560 acctchrt_brokerage.gnucash-xea
561 acctchrt_business.gnucash-xea
562 acctchrt_carloan.gnucash-xea
563 acctchrt_cdmoneymkt.gnucash-xea
564 acctchrt_checkbook.gnucash-xea
565 acctchrt_childcare.gnucash-xea
566 acctchrt_common.gnucash-xea
567 acctchrt_eduloan.gnucash-xea
568 acctchrt_fixedassets.gnucash-xea
569 acctchrt_homeloan.gnucash-xea
570 acctchrt_homeown.gnucash-xea
571 acctchrt_otherloan.gnucash-xea
572 acctchrt_renter.gnucash-xea
573 acctchrt_retiremt.gnucash-xea
574 acctchrt_spouseinc.gnucash-xea
575 acctchrt_spouseretire.gnucash-xea
576 share/gnucash/accounts/ca/
577 acctchrt_brokerage.gnucash-xea
578 acctchrt_carloan.gnucash-xea
579 acctchrt_cdmoneymkt.gnucash-xea
580 acctchrt_childcare.gnucash-xea
581 acctchrt_common.gnucash-xea
582 acctchrt_currency.gnucash-xea
583 acctchrt_eduloan.gnucash-xea
584 acctchrt_fixedassets.gnucash-xea
585 acctchrt_homeloan.gnucash-xea
586 acctchrt_homeown.gnucash-xea
587 acctchrt_otherloan.gnucash-xea
588 acctchrt_renter.gnucash-xea
589 acctchrt_retiremt.gnucash-xea
590 acctchrt_spouseinc.gnucash-xea
591 acctchrt_spouseretire.gnucash-xea
592 share/gnucash/accounts/cs/
593 acctchrt_brokerage.gnucash-xea
594 acctchrt_carloan.gnucash-xea
595 acctchrt_cdmoneymkt.gnucash-xea
596 acctchrt_childcare.gnucash-xea
597 acctchrt_common.gnucash-xea
598 acctchrt_currency.gnucash-xea
599 acctchrt_eduloan.gnucash-xea
600 acctchrt_fixedassets.gnucash-xea
601 acctchrt_homeloan.gnucash-xea
602 acctchrt_homeown.gnucash-xea
603 acctchrt_otherloan.gnucash-xea
604 acctchrt_renter.gnucash-xea
605 acctchrt_retiremt.gnucash-xea
606 acctchrt_spouseinc.gnucash-xea
607 acctchrt_spouseretire.gnucash-xea
608 share/gnucash/accounts/da/
609 acctchrt_car.gnucash-xea
610 acctchrt_common.gnucash-xea
611 acctchrt_homeloan.gnucash-xea
612 acctchrt_homeown.gnucash-xea
613 share/gnucash/accounts/de_AT/
614 acctchrt_auto.gnucash-xea
615 acctchrt_autoloan.gnucash-xea
616 acctchrt_brokerage.gnucash-xea
617 acctchrt_business.gnucash-xea
618 acctchrt_common.gnucash-xea
619 acctchrt_ekr2017.gnucash-xea
620 acctchrt_houseown.gnucash-xea
621 acctchrt_investment.gnucash-xea
622 acctchrt_kids.gnucash-xea
623 share/gnucash/accounts/de_CH/
624 acctchrt_brokerage.gnucash-xea
625 acctchrt_common.gnucash-xea
626 acctchrt_kids.gnucash-xea
627 acctchrt_kmu.gnucash-xea
628 acctchrt_otherasset.gnucash-xea
629 acctchrt_otherloan.gnucash-xea
630 share/gnucash/accounts/de_DE/
631 acctchrt_auto.gnucash-xea
632 acctchrt_autoloan.gnucash-xea
633 acctchrt_brokerage.gnucash-xea
634 acctchrt_common.gnucash-xea
635 acctchrt_houseown.gnucash-xea
636 acctchrt_investment.gnucash-xea
637 acctchrt_kids.gnucash-xea
638 acctchrt_otherasset.gnucash-xea
639 acctchrt_otherloan.gnucash-xea
640 acctchrt_skr03.gnucash-xea
641 acctchrt_skr04.gnucash-xea
642 acctchrt_skr49.gnucash-xea
643 acctchrt_studium.gnucash-xea
644 acctchrt_wohnungsw.gnucash-xea
645 share/gnucash/accounts/el_GR/
646 acctchrt_brokerage.gnucash-xea
647 acctchrt_carloan.gnucash-xea
648 acctchrt_common.gnucash-xea
649 share/gnucash/accounts/en_GB/
650 acctchrt_brokerage.gnucash-xea
651 acctchrt_business.gnucash-xea
652 acctchrt_carloan.gnucash-xea
653 acctchrt_cdmoneymkt.gnucash-xea
654 acctchrt_checkbook.gnucash-xea
655 acctchrt_childcare.gnucash-xea
656 acctchrt_common.gnucash-xea
657 acctchrt_eduloan.gnucash-xea
658 acctchrt_fixedassets.gnucash-xea
659 acctchrt_homeloan.gnucash-xea
660 acctchrt_homeown.gnucash-xea
661 acctchrt_otherloan.gnucash-xea
662 acctchrt_renter.gnucash-xea
663 acctchrt_retiremt.gnucash-xea
664 acctchrt_spouseinc.gnucash-xea
665 acctchrt_spouseretire.gnucash-xea
667 share/gnucash/accounts/en_IN/acctchrt_gstindia.gnucash-xea
668 share/gnucash/accounts/es_ES/
669 acctchrt_brokerage.gnucash-xea
670 acctchrt_carloan.gnucash-xea
671 acctchrt_cdmoneymkt.gnucash-xea
672 acctchrt_childcare.gnucash-xea
673 acctchrt_common.gnucash-xea
674 acctchrt_currency.gnucash-xea
675 acctchrt_eduloan.gnucash-xea
676 acctchrt_fixedassets.gnucash-xea
677 acctchrt_homeloan.gnucash-xea
678 acctchrt_homeown.gnucash-xea
679 acctchrt_otherloan.gnucash-xea
680 acctchrt_renter.gnucash-xea
681 acctchrt_retiremt.gnucash-xea
682 acctchrt_spouseinc.gnucash-xea
683 acctchrt_spouseretire.gnucash-xea
684 share/gnucash/accounts/es_MX/
685 acctchrt_brokerage.gnucash-xea
686 acctchrt_carloan.gnucash-xea
687 acctchrt_cdmoneymkt.gnucash-xea
688 acctchrt_childcare.gnucash-xea
689 acctchrt_common.gnucash-xea
690 acctchrt_currency.gnucash-xea
691 acctchrt_eduloan.gnucash-xea
692 acctchrt_fixedassets.gnucash-xea
693 acctchrt_homeloan.gnucash-xea
694 acctchrt_homeown.gnucash-xea
695 acctchrt_otherloan.gnucash-xea
696 acctchrt_renter.gnucash-xea
697 acctchrt_retiremt.gnucash-xea
698 acctchrt_spouseinc.gnucash-xea
699 acctchrt_spouseretire.gnucash-xea
700 share/gnucash/accounts/fi_FI/
701 acctchrt_common.gnucash-xea
702 acctchrt_ry.gnucash-xea
703 acctchrt_sbr-xbrl.gnucash-xea
704 share/gnucash/accounts/fr_BE/
705 acctchrt_brokerage.gnucash-xea
706 acctchrt_business.gnucash-xea
707 acctchrt_carloan.gnucash-xea
708 acctchrt_cdmoneymkt.gnucash-xea
709 acctchrt_childcare.gnucash-xea
710 acctchrt_common.gnucash-xea
711 acctchrt_currency.gnucash-xea
712 acctchrt_eduloan.gnucash-xea
713 acctchrt_fixedassets.gnucash-xea
714 acctchrt_homeloan.gnucash-xea
715 acctchrt_homeown.gnucash-xea
716 acctchrt_otherloan.gnucash-xea
717 acctchrt_renter.gnucash-xea
718 acctchrt_retiremt.gnucash-xea
719 acctchrt_spouseinc.gnucash-xea
720 acctchrt_spouseretire.gnucash-xea
721 share/gnucash/accounts/fr_CA/
722 acctchrt_actifsfixes.gnucash-xea
723 acctchrt_automobile.gnucash-xea
724 acctchrt_basecommune.gnucash-xea
725 acctchrt_cdmarchemon.gnucash-xea
726 acctchrt_chequier.gnucash-xea
727 acctchrt_conjointretraite.gnucash-xea
728 acctchrt_conjointrev.gnucash-xea
729 acctchrt_courtage.gnucash-xea
730 acctchrt_etudeemprunt.gnucash-xea
731 acctchrt_garderie.gnucash-xea
732 acctchrt_locataire.gnucash-xea
733 acctchrt_proprietaire.gnucash-xea
734 acctchrt_retraite.gnucash-xea
735 acctchrt_revenus.gnucash-xea
736 share/gnucash/accounts/fr_CH/
737 acctchrt_brokerage.gnucash-xea
738 acctchrt_business.gnucash-xea
739 acctchrt_carloan.gnucash-xea
740 acctchrt_cdmoneymkt.gnucash-xea
741 acctchrt_childcare.gnucash-xea
742 acctchrt_common.gnucash-xea
743 acctchrt_currency.gnucash-xea
744 acctchrt_eduloan.gnucash-xea
745 acctchrt_fixedassets.gnucash-xea
746 acctchrt_homeloan.gnucash-xea
747 acctchrt_homeown.gnucash-xea
748 acctchrt_otherloan.gnucash-xea
749 acctchrt_renter.gnucash-xea
750 acctchrt_retiremt.gnucash-xea
751 acctchrt_spouseinc.gnucash-xea
752 acctchrt_spouseretire.gnucash-xea
753 share/gnucash/accounts/fr_FR/
754 acctchrt_brokerage.gnucash-xea
755 acctchrt_business.gnucash-xea
756 acctchrt_carloan.gnucash-xea
757 acctchrt_cdmoneymkt.gnucash-xea
758 acctchrt_childcare.gnucash-xea
759 acctchrt_common.gnucash-xea
760 acctchrt_currency.gnucash-xea
761 acctchrt_eduloan.gnucash-xea
762 acctchrt_fixedassets.gnucash-xea
763 acctchrt_homeloan.gnucash-xea
764 acctchrt_homeown.gnucash-xea
765 acctchrt_otherloan.gnucash-xea
766 acctchrt_renter.gnucash-xea
767 acctchrt_retiremt.gnucash-xea
768 acctchrt_spouseinc.gnucash-xea
769 acctchrt_spouseretire.gnucash-xea
770 share/gnucash/accounts/he/
771 acctchrt_brokerage.gnucash-xea
772 acctchrt_business.gnucash-xea
773 acctchrt_carloan.gnucash-xea
774 acctchrt_cdmoneymkt.gnucash-xea
775 acctchrt_checkbook.gnucash-xea
776 acctchrt_childcare.gnucash-xea
777 acctchrt_common.gnucash-xea
778 acctchrt_eduloan.gnucash-xea
779 acctchrt_fixedassets.gnucash-xea
780 acctchrt_homeloan.gnucash-xea
781 acctchrt_homeown.gnucash-xea
782 acctchrt_otherloan.gnucash-xea
783 acctchrt_renter.gnucash-xea
784 acctchrt_retiremt.gnucash-xea
785 acctchrt_spouseinc.gnucash-xea
786 acctchrt_spouseretire.gnucash-xea
787 share/gnucash/accounts/hr/
788 acctchrt_car.gnucash-xea
789 acctchrt_cdmoneymkt.gnucash-xea
790 acctchrt_checkbook.gnucash-xea
791 acctchrt_common.gnucash-xea
792 acctchrt_homeloan.gnucash-xea
793 acctchrt_homeown.gnucash-xea
794 acctchrt_otherloan.gnucash-xea
795 acctchrt_renter.gnucash-xea
796 share/gnucash/accounts/hu/
797 acctchrt_brokerage.gnucash-xea
798 acctchrt_business.gnucash-xea
799 acctchrt_carloan.gnucash-xea
800 acctchrt_cdmoneymkt.gnucash-xea
801 acctchrt_checkbook.gnucash-xea
802 acctchrt_childcare.gnucash-xea
803 acctchrt_common.gnucash-xea
804 acctchrt_eduloan.gnucash-xea
805 acctchrt_fixedassets.gnucash-xea
806 acctchrt_homeloan.gnucash-xea
807 acctchrt_homeown.gnucash-xea
808 acctchrt_otherloan.gnucash-xea
809 acctchrt_renter.gnucash-xea
810 acctchrt_retiremt.gnucash-xea
811 acctchrt_spouseinc.gnucash-xea
812 acctchrt_spouseretire.gnucash-xea
813 share/gnucash/accounts/it/
814 acctchrt_brokerage.gnucash-xea
815 acctchrt_carloan.gnucash-xea
816 acctchrt_checkbook.gnucash-xea
817 acctchrt_childcare.gnucash-xea
818 acctchrt_common.gnucash-xea
819 acctchrt_fixedassets.gnucash-xea
820 acctchrt_homeloan.gnucash-xea
821 acctchrt_homeown.gnucash-xea
822 acctchrt_otherloan.gnucash-xea
823 acctchrt_renter.gnucash-xea
824 acctchrt_retiremt.gnucash-xea
825 acctchrt_spouseinc.gnucash-xea
826 acctchrt_spouseretire.gnucash-xea
827 share/gnucash/accounts/ja/
828 acctchrt_brokerage.gnucash-xea
829 acctchrt_business.gnucash-xea
830 acctchrt_carloan.gnucash-xea
831 acctchrt_cdmoneymkt.gnucash-xea
832 acctchrt_checkbook.gnucash-xea
833 acctchrt_childcare.gnucash-xea
834 acctchrt_common.gnucash-xea
835 acctchrt_eduloan.gnucash-xea
836 acctchrt_fixedassets.gnucash-xea
837 acctchrt_full.gnucash-xea
838 acctchrt_homeloan.gnucash-xea
839 acctchrt_homeown.gnucash-xea
840 acctchrt_otherloan.gnucash-xea
841 acctchrt_renter.gnucash-xea
842 acctchrt_retiremt.gnucash-xea
843 acctchrt_spouseinc.gnucash-xea
844 acctchrt_spouseretire.gnucash-xea
845 share/gnucash/accounts/ko/
846 acctchrt_brokerage.gnucash-xea
847 acctchrt_business.gnucash-xea
848 acctchrt_carloan.gnucash-xea
849 acctchrt_cdmoneymkt.gnucash-xea
850 acctchrt_checkbook.gnucash-xea
851 acctchrt_childcare.gnucash-xea
852 acctchrt_common.gnucash-xea
853 acctchrt_eduloan.gnucash-xea
854 acctchrt_fixedassets.gnucash-xea
855 acctchrt_homeloan.gnucash-xea
856 acctchrt_homeown.gnucash-xea
857 acctchrt_otherloan.gnucash-xea
858 acctchrt_renter.gnucash-xea
859 acctchrt_retiremt.gnucash-xea
860 acctchrt_spouseinc.gnucash-xea
861 acctchrt_spouseretire.gnucash-xea
862 share/gnucash/accounts/lt/acctchrt_business.gnucash-xea
863 share/gnucash/accounts/lv/
864 acctchrt_brokerage.gnucash-xea
865 acctchrt_business.gnucash-xea
866 acctchrt_carloan.gnucash-xea
867 acctchrt_cdmoneymkt.gnucash-xea
868 acctchrt_checkbook.gnucash-xea
869 acctchrt_childcare.gnucash-xea
870 acctchrt_common.gnucash-xea
871 acctchrt_eduloan.gnucash-xea
872 acctchrt_fixedassets.gnucash-xea
873 acctchrt_homeloan.gnucash-xea
874 acctchrt_homeown.gnucash-xea
875 acctchrt_otherloan.gnucash-xea
876 acctchrt_renter.gnucash-xea
877 acctchrt_retiremt.gnucash-xea
878 acctchrt_spouseinc.gnucash-xea
879 acctchrt_spouseretire.gnucash-xea
880 share/gnucash/accounts/nb/
881 acctchrt_brokerage.gnucash-xea
882 acctchrt_business.gnucash-xea
883 acctchrt_carloan.gnucash-xea
884 acctchrt_cdmoneymkt.gnucash-xea
885 acctchrt_checkbook.gnucash-xea
886 acctchrt_childcare.gnucash-xea
887 acctchrt_common.gnucash-xea
888 acctchrt_eduloan.gnucash-xea
889 acctchrt_fixedassets.gnucash-xea
890 acctchrt_full.gnucash-xea
891 acctchrt_homeloan.gnucash-xea
892 acctchrt_homeown.gnucash-xea
893 acctchrt_otherloan.gnucash-xea
894 acctchrt_renter.gnucash-xea
895 acctchrt_retiremt.gnucash-xea
896 acctchrt_spouseinc.gnucash-xea
897 acctchrt_spouseretire.gnucash-xea
898 share/gnucash/accounts/nl/
899 acctchrt_checkbook.gnucash-xea
900 acctchrt_full.gnucash-xea
901 acctchrt_rgs_1.1.gnucash-xea
902 share/gnucash/accounts/pl/
903 acctchrt_brokerage.gnucash-xea
904 acctchrt_business.gnucash-xea
905 acctchrt_carloan.gnucash-xea
906 acctchrt_cdmoneymkt.gnucash-xea
907 acctchrt_checkbook.gnucash-xea
908 acctchrt_childcare.gnucash-xea
909 acctchrt_common.gnucash-xea
910 acctchrt_eduloan.gnucash-xea
911 acctchrt_fixedassets.gnucash-xea
912 acctchrt_homeloan.gnucash-xea
913 acctchrt_homeown.gnucash-xea
914 acctchrt_otherloan.gnucash-xea
915 acctchrt_renter.gnucash-xea
916 acctchrt_retiremt.gnucash-xea
917 acctchrt_spouseinc.gnucash-xea
918 acctchrt_spouseretire.gnucash-xea
919 share/gnucash/accounts/pt_BR/
920 acctchrt_brokerage.gnucash-xea
921 acctchrt_carloan.gnucash-xea
922 acctchrt_cdmoneymkt.gnucash-xea
923 acctchrt_childcare.gnucash-xea
924 acctchrt_common.gnucash-xea
925 acctchrt_currency.gnucash-xea
926 acctchrt_eduloan.gnucash-xea
927 acctchrt_fixedassets.gnucash-xea
928 acctchrt_homeloan.gnucash-xea
929 acctchrt_homeown.gnucash-xea
930 acctchrt_otherloan.gnucash-xea
931 acctchrt_renter.gnucash-xea
932 acctchrt_retiremt.gnucash-xea
933 acctchrt_spouseinc.gnucash-xea
934 acctchrt_spouseretire.gnucash-xea
935 share/gnucash/accounts/pt_PT/
936 acctchrt_brokerage.gnucash-xea
937 acctchrt_carloan.gnucash-xea
938 acctchrt_cdmoneymkt.gnucash-xea
939 acctchrt_childcare.gnucash-xea
940 acctchrt_common.gnucash-xea
941 acctchrt_eduloan.gnucash-xea
942 acctchrt_fixedassets.gnucash-xea
943 acctchrt_homeloan.gnucash-xea
944 acctchrt_homeown.gnucash-xea
945 acctchrt_otherloan.gnucash-xea
946 acctchrt_renter.gnucash-xea
947 acctchrt_retiremt.gnucash-xea
948 acctchrt_spouseinc.gnucash-xea
949 acctchrt_spouseretire.gnucash-xea
950 share/gnucash/accounts/ru/
951 acctchrt_auto.gnucash-xea
952 acctchrt_autoloan.gnucash-xea
953 acctchrt_common.gnucash-xea
954 acctchrt_homeloan.gnucash-xea
955 acctchrt_homeown.gnucash-xea
956 acctchrt_kids.gnucash-xea
957 acctchrt_otherloan.gnucash-xea
958 acctchrt_renter.gnucash-xea
959 share/gnucash/accounts/sk/
960 acctchrt_brokerage.gnucash-xea
961 acctchrt_carloan.gnucash-xea
962 acctchrt_cdmoneymkt.gnucash-xea
963 acctchrt_childcare.gnucash-xea
964 acctchrt_common.gnucash-xea
965 acctchrt_currency.gnucash-xea
966 acctchrt_eduloan.gnucash-xea
967 acctchrt_fixedassets.gnucash-xea
968 acctchrt_homeloan.gnucash-xea
969 acctchrt_homeown.gnucash-xea
970 acctchrt_otherloan.gnucash-xea
971 acctchrt_renter.gnucash-xea
972 acctchrt_retiremt.gnucash-xea
973 acctchrt_spouseinc.gnucash-xea
974 acctchrt_spouseretire.gnucash-xea
975 share/gnucash/accounts/sv_AX/
976 acctchrt_common.gnucash-xea
977 acctchrt_rf.gnucash-xea
978 acctchrt_sbr-xbrl.gnucash-xea
979 share/gnucash/accounts/sv_FI/
980 acctchrt_common.gnucash-xea
981 acctchrt_rf.gnucash-xea
982 acctchrt_sbr-xbrl.gnucash-xea
983 share/gnucash/accounts/sv_SE/
984 acctchrt_common.gnucash-xea
985 bas_2019_k1.gnucash-xea
986 bas_2019_k2_grund.gnucash-xea
987 share/gnucash/accounts/tr_TR/
988 acctchrt_TEKDUZ.gnucash-xea
989 acctchrt_brokerage.gnucash-xea
990 acctchrt_carloan.gnucash-xea
991 acctchrt_cdmoneymkt.gnucash-xea
992 acctchrt_checkbook.gnucash-xea
993 acctchrt_common.gnucash-xea
994 acctchrt_fixedassets.gnucash-xea
995 acctchrt_homeloan.gnucash-xea
996 share/gnucash/accounts/zh_CN/
997 acctchrt_brokerage.gnucash-xea
998 acctchrt_business.gnucash-xea
999 acctchrt_carloan.gnucash-xea
1000 acctchrt_cdmoneymkt.gnucash-xea
1001 acctchrt_checkbook.gnucash-xea
1002 acctchrt_childcare.gnucash-xea
1003 acctchrt_common.gnucash-xea
1004 acctchrt_eduloan.gnucash-xea
1005 acctchrt_fixedassets.gnucash-xea
1006 acctchrt_homeloan.gnucash-xea
1007 acctchrt_homeown.gnucash-xea
1008 acctchrt_otherloan.gnucash-xea
1009 acctchrt_renter.gnucash-xea
1010 acctchrt_retiremt.gnucash-xea
1011 acctchrt_spouseinc.gnucash-xea
1012 acctchrt_spouseretire.gnucash-xea
1013 share/gnucash/accounts/zh_HK/acctchrt_business.gnucash-xea
1014 share/gnucash/accounts/zh_TW/acctchrt_business.gnucash-xea
1015 share/gnucash/checks/
1020 quicken_check_21.chk
1023 share/gnucash/gtkbuilder/
1024 assistant-ab-initial.glade
1025 assistant-acct-period.glade
1026 assistant-csv-account-import.glade
1027 assistant-csv-export.glade
1028 assistant-csv-price-import.glade
1029 assistant-csv-trans-import.glade
1030 assistant-hierarchy.glade
1031 assistant-loan.glade
1032 assistant-qif-import.glade
1033 assistant-stock-split.glade
1034 assistant-xml-encoding.glade
1035 business-options-gnome.glade
1036 business-prefs.glade
1037 dialog-ab-pref.glade
1039 dialog-account-picker.glade
1040 dialog-account.glade
1041 dialog-bi-import-gui.glade
1042 dialog-billterms.glade
1043 dialog-book-close.glade
1044 dialog-choose-owner.glade
1045 dialog-commodities.glade
1046 dialog-commodity.glade
1047 dialog-custom-report.glade
1048 dialog-customer-import-gui.glade
1049 dialog-customer.glade
1050 dialog-date-close.glade
1051 dialog-employee.glade
1052 dialog-file-access.glade
1053 dialog-fincalc.glade
1054 dialog-find-account.glade
1055 dialog-imap-editor.glade
1057 dialog-invoice.glade
1059 dialog-lot-viewer.glade
1060 dialog-new-user.glade
1061 dialog-object-references.glade
1062 dialog-options.glade
1064 dialog-payment.glade
1065 dialog-preferences.glade
1067 dialog-print-check.glade
1068 dialog-progress.glade
1069 dialog-query-view.glade
1071 dialog-reset-warnings.glade
1074 dialog-tax-info.glade
1075 dialog-tax-table.glade
1077 dialog-trans-assoc.glade
1078 dialog-transfer.glade
1079 dialog-userpass.glade
1081 gnc-date-format.glade
1083 gnc-plugin-page-budget.glade
1084 gnc-plugin-page-register.glade
1085 gnc-plugin-page-register2.glade
1086 gnc-recurrence.glade
1087 gnc-tree-view-owner.glade
1088 window-autoclear.glade
1089 window-reconcile.glade
1090 share/gnucash/icons/hicolor/16x16/actions/
1091 gnc-account-delete.png
1092 gnc-account-edit.png
1094 gnc-account-open.png
1095 gnc-account-report.png
1098 gnc-invoice-duplicate.png
1099 gnc-invoice-edit.png
1102 gnc-invoice-post.png
1103 gnc-invoice-unpost.png
1109 share/gnucash/icons/hicolor/24x24/actions/
1110 gnc-account-delete.png
1111 gnc-account-edit.png
1113 gnc-account-open.png
1114 gnc-account-report.png
1117 gnc-invoice-duplicate.png
1118 gnc-invoice-edit.png
1121 gnc-invoice-post.png
1122 gnc-invoice-unpost.png
1128 share/gnucash/jqplot/
1129 jqplot.BezierCurveRenderer.js
1130 jqplot.barRenderer.js
1131 jqplot.blockRenderer.js
1132 jqplot.bubbleRenderer.js
1133 jqplot.canvasAxisLabelRenderer.js
1134 jqplot.canvasAxisTickRenderer.js
1135 jqplot.canvasTextRenderer.js
1136 jqplot.categoryAxisRenderer.js
1139 jqplot.dateAxisRenderer.js
1140 jqplot.donutRenderer.js
1142 jqplot.enhancedLegendRenderer.js
1143 jqplot.funnelRenderer.js
1144 jqplot.highlighter.js
1146 jqplot.logAxisRenderer.js
1147 jqplot.mekkoAxisRenderer.js
1148 jqplot.mekkoRenderer.js
1149 jqplot.meterGaugeRenderer.js
1150 jqplot.ohlcRenderer.js
1151 jqplot.pieRenderer.js
1152 jqplot.pointLabels.js
1157 share/gnucash/pixmaps/
1158 gnucash-icon-48x48.bmp
1162 business-options.scm
1166 commodity-utilities.scm
1168 engine-interface.scm
1169 engine-utilities.scm
1171 gnc-menu-extensions.scm
1183 html-style-sheet.scm
1189 options-utilities.scm
1192 report-utilities.scm
1200 share/gnucash/scm/gnucash/
1210 share/gnucash/scm/gnucash/import-export/
1213 share/gnucash/scm/gnucash/report/
1216 balsheet-eg.eguile.scm
1218 business-reports.scm
1219 customer-summary.scm
1221 eguile-html-utilities.scm
1222 eguile-utilities.scm
1228 new-owner-report.scm
1237 standard-reports.scm
1239 stylesheet-footer.scm
1240 stylesheet-head-or-tail.scm
1241 stylesheet-plain.scm
1244 taxinvoice.eguile.scm
1250 welcome-to-gnucash.scm
1251 share/gnucash/scm/gnucash/report/locale-specific/
1254 share/gnucash/scm/gnucash/report/report-system/
1256 report-collectors.scm
1257 share/gnucash/scm/gnucash/report/standard-reports/
1258 account-piecharts.scm
1260 advanced-portfolio.scm
1262 balance-forecast.scm
1265 budget-balance-sheet.scm
1268 budget-income-statement.scm
1271 cashflow-barchart.scm
1272 category-barchart.scm
1274 equity-statement.scm
1277 income-gst-statement.scm
1278 income-statement.scm
1282 reconcile-report.scm
1286 share/gnucash/scm/gnucash/tax/
1289 share/gnucash/scm/json/
1293 share/gnucash/scm/qif-import/
1294 qif-dialog-utils.scm
1298 qif-merge-groups.scm
1304 gnc-main-window-ui.xml
1305 gnc-plugin-account-tree-ui.xml
1306 gnc-plugin-aqbanking-ui.xml
1307 gnc-plugin-basic-commands-ui.xml
1308 gnc-plugin-bi-import-ui.xml
1309 gnc-plugin-budget-ui.xml
1310 gnc-plugin-business-ui.xml
1311 gnc-plugin-csv-export-ui.xml
1312 gnc-plugin-csv-import-ui.xml
1313 gnc-plugin-customer-import-ui.xml
1314 gnc-plugin-file-history-ui.xml
1315 gnc-plugin-log-replay-ui.xml
1316 gnc-plugin-ofx-ui.xml
1317 gnc-plugin-page-account-tree-ui.xml
1318 gnc-plugin-page-account-tree2-ui.xml
1319 gnc-plugin-page-budget-ui.xml
1320 gnc-plugin-page-invoice-ui.xml
1321 gnc-plugin-page-owner-tree-ui.xml
1322 gnc-plugin-page-register-ui.xml
1323 gnc-plugin-page-register2-ui.xml
1324 gnc-plugin-page-report-ui.xml
1325 gnc-plugin-page-sx-list-ui.xml
1326 gnc-plugin-page-sx-list2-ui.xml
1327 gnc-plugin-page-sxregister-ui.xml
1328 gnc-plugin-qif-import-ui.xml
1329 gnc-plugin-register-ui.xml
1330 gnc-plugin-register2-ui.xml
1331 gnc-plugin-register22-ui.xml
1332 gnc-plugin-stylesheets-ui.xml
1333 gnc-reconcile-window-ui.xml
1334 gnc-sxed-to-create-window-ui.xml
1335 gnc-sxed-window-ui-full.xml
1336 gnc-sxed-window-ui.xml
1337 gnc-windows-menu-ui-quartz.xml
1338 gnc-windows-menu-ui.xml
1340 share/icons/hicolor/128x128/apps/gnucash-icon.png
1341 share/icons/hicolor/16x16/apps/gnucash-icon.png
1342 share/icons/hicolor/22x22/apps/gnucash-icon.png
1343 share/icons/hicolor/24x24/apps/gnucash-icon.png
1344 share/icons/hicolor/256x256/apps/gnucash-icon.png
1345 share/icons/hicolor/32x32/apps/gnucash-icon.png
1346 share/icons/hicolor/48x48/apps/gnucash-icon.png
1347 share/icons/hicolor/64x64/apps/gnucash-icon.png
1348 share/icons/hicolor/96x96/apps/gnucash-icon.png
1349 share/icons/hicolor/scalable/apps/gnucash-icon.svg
1354 share/metainfo/gnucash.appdata.xml
1357 [FILE:2220:manifests/plist.nls]
1358 share/locale/ar/LC_MESSAGES/gnucash.mo
1359 share/locale/as/LC_MESSAGES/gnucash.mo
1360 share/locale/az/LC_MESSAGES/gnucash.mo
1361 share/locale/bg/LC_MESSAGES/gnucash.mo
1362 share/locale/brx/LC_MESSAGES/gnucash.mo
1363 share/locale/ca/LC_MESSAGES/gnucash.mo
1364 share/locale/cs/LC_MESSAGES/gnucash.mo
1365 share/locale/da/LC_MESSAGES/gnucash.mo
1366 share/locale/de/LC_MESSAGES/gnucash.mo
1367 share/locale/doi/LC_MESSAGES/gnucash.mo
1368 share/locale/el/LC_MESSAGES/gnucash.mo
1369 share/locale/en_GB/LC_MESSAGES/gnucash.mo
1370 share/locale/es/LC_MESSAGES/gnucash.mo
1371 share/locale/es_NI/LC_MESSAGES/gnucash.mo
1372 share/locale/eu/LC_MESSAGES/gnucash.mo
1373 share/locale/fa/LC_MESSAGES/gnucash.mo
1374 share/locale/fi/LC_MESSAGES/gnucash.mo
1375 share/locale/fr/LC_MESSAGES/gnucash.mo
1376 share/locale/gu/LC_MESSAGES/gnucash.mo
1377 share/locale/he/LC_MESSAGES/gnucash.mo
1378 share/locale/hi/LC_MESSAGES/gnucash.mo
1379 share/locale/hr/LC_MESSAGES/gnucash.mo
1380 share/locale/hu/LC_MESSAGES/gnucash.mo
1381 share/locale/it/LC_MESSAGES/gnucash.mo
1382 share/locale/ja/LC_MESSAGES/gnucash.mo
1383 share/locale/kn/LC_MESSAGES/gnucash.mo
1384 share/locale/ko/LC_MESSAGES/gnucash.mo
1385 share/locale/kok/LC_MESSAGES/gnucash.mo
1386 share/locale/kok@latin/LC_MESSAGES/gnucash.mo
1387 share/locale/ks/LC_MESSAGES/gnucash.mo
1388 share/locale/lt/LC_MESSAGES/gnucash.mo
1389 share/locale/lv/LC_MESSAGES/gnucash.mo
1390 share/locale/mai/LC_MESSAGES/gnucash.mo
1391 share/locale/mni/LC_MESSAGES/gnucash.mo
1392 share/locale/mni@bengali/LC_MESSAGES/gnucash.mo
1393 share/locale/mr/LC_MESSAGES/gnucash.mo
1394 share/locale/nb/LC_MESSAGES/gnucash.mo
1395 share/locale/ne/LC_MESSAGES/gnucash.mo
1396 share/locale/nl/LC_MESSAGES/gnucash.mo
1397 share/locale/pl/LC_MESSAGES/gnucash.mo
1398 share/locale/pt/LC_MESSAGES/gnucash.mo
1399 share/locale/pt_BR/LC_MESSAGES/gnucash.mo
1400 share/locale/ro/LC_MESSAGES/gnucash.mo
1401 share/locale/ru/LC_MESSAGES/gnucash.mo
1402 share/locale/rw/LC_MESSAGES/gnucash.mo
1403 share/locale/sk/LC_MESSAGES/gnucash.mo
1404 share/locale/sr/LC_MESSAGES/gnucash.mo
1405 share/locale/sv/LC_MESSAGES/gnucash.mo
1406 share/locale/ta/LC_MESSAGES/gnucash.mo
1407 share/locale/te/LC_MESSAGES/gnucash.mo
1408 share/locale/tr/LC_MESSAGES/gnucash.mo
1409 share/locale/uk/LC_MESSAGES/gnucash.mo
1410 share/locale/ur/LC_MESSAGES/gnucash.mo
1411 share/locale/vi/LC_MESSAGES/gnucash.mo
1412 share/locale/zh_CN/LC_MESSAGES/gnucash.mo
1413 share/locale/zh_TW/LC_MESSAGES/gnucash.mo
1416 [FILE:686:manifests/plist.docs]
1423 Money95mfunds_fr.qif
1424 Money95stocks_fr.qif
1427 README-ca.win32-bin.txt
1428 README-de.win32-bin.txt
1429 README-fr.win32-bin.txt
1430 README-hr.win32-bin.txt
1431 README-it.win32-bin.txt
1432 README-lv.win32-bin.txt
1433 README-nl.win32-bin.txt
1434 README-zh_CN.win32-bin.txt
1435 README-zh_TW.win32-bin.txt
1439 README.win32-bin.txt
1445 currency_tree_xml.gnucash
1458 [FILE:328:patches/patch-CMakeLists.txt]
1459 --- CMakeLists.txt.orig 2020-04-11 16:29:32 UTC
1461 @@ -33,6 +33,7 @@ include (MacroAppendForeach)
1462 include (MacroAddSourceFileCompileFlags)
1463 include (GncAddSwigCommand)
1464 include (CheckIncludeFiles)
1465 +include (CheckSymbolExists)
1466 include (GncAddSchemeTargets)
1467 include (GncAddGSchemaTargets)
1468 include (GncAddTest)
1471 [FILE:286:patches/patch-gnucash_report_locale-specific_us_CMakeLists.txt]
1472 --- gnucash/report/locale-specific/us/CMakeLists.txt.orig 2020-04-11 16:28:19 UTC
1473 +++ gnucash/report/locale-specific/us/CMakeLists.txt
1474 @@ -36,7 +36,6 @@ set(GUILE_DEPENDS
1484 [FILE:303:patches/patch-libgnucash_app-utils_guile-util.c]
1485 --- libgnucash/app-utils/guile-util.c.orig 2020-04-11 16:28:19 UTC
1486 +++ libgnucash/app-utils/guile-util.c
1487 @@ -996,6 +996,8 @@ gnc_parse_time_to_time64 (const gchar *s
1489 g_return_val_if_fail(s && format, -1);
1491 + bzero(&tm, sizeof(tm));
1493 if (!strptime(s, format, &tm))
1498 [FILE:482:patches/patch-libgnucash_quotes_CMakeLists.txt]
1499 --- libgnucash/quotes/CMakeLists.txt.orig 2020-03-29 18:50:03 UTC
1500 +++ libgnucash/quotes/CMakeLists.txt
1501 @@ -15,7 +15,7 @@ foreach(file gnc-fq-dump gnc-fq-helper)
1502 list(APPEND _MAN_FILES ${_MAN_OUTPUT})
1504 OUTPUT ${_MAN_OUTPUT}
1505 - COMMAND ${CMAKE_COMMAND} -E env ${PERL_EXECUTABLE} ${POD2MAN_EXECUTABLE} ${_POD_INPUT} ${_MAN_OUTPUT}
1506 + COMMAND ${POD2MAN_EXECUTABLE} ${_POD_INPUT} ${_MAN_OUTPUT}
1507 DEPENDS ${_POD_INPUT}
1512 [FILE:55306:patches/patch-missing-files]
1513 --- /dev/null 2020-04-12 16:41:47 UTC
1514 +++ src/optional/python-bindings/__init__.py
1516 +# import all the symbols from gnucash_core, so basic gnucash stuff can be
1518 +# >>> from gnucash import thingy
1520 +# >>> from gnucash.gnucash_core import thingy
1521 +from gnucash_core import *
1523 +# @brief helper file for the importing of gnucash
1524 +# @author Mark Jenkins, ParIT Worker Co-operative <mark@parit.ca>
1525 +# @author Jeff Green, ParIT Worker Co-operative <jeff@parit.ca>
1526 +# @ingroup python_bindings
1527 --- /dev/null 2020-04-12 16:41:47 UTC
1528 +++ src/optional/python-bindings/function_class.py
1530 +# function_class.py -- Library for making python classes from a set
1533 +# Copyright (C) 2008 ParIT Worker Co-operative <paritinfo@parit.ca>
1534 +# This program is free software; you can redistribute it and/or
1535 +# modify it under the terms of the GNU General Public License as
1536 +# published by the Free Software Foundation; either version 2 of
1537 +# the License, or (at your option) any later version.
1539 +# This program is distributed in the hope that it will be useful,
1540 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
1541 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1542 +# GNU General Public License for more details.
1544 +# You should have received a copy of the GNU General Public License
1545 +# along with this program; if not, contact:
1546 +# Free Software Foundation Voice: +1-617-542-5942
1547 +# 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
1548 +# Boston, MA 02110-1301, USA gnu@gnu.org
1550 +# @author Mark Jenkins, ParIT Worker Co-operative <mark@parit.ca>
1553 +# @brief Library for making python classes from a set of functions.
1554 +# @author Mark Jenkins, ParIT Worker Co-operative <mark@parit.ca>
1555 +# @author Jeff Green, ParIT Worker Co-operative <jeff@parit.ca>
1556 +# @ingroup python_bindings
1558 +INSTANCE_ARGUMENT = "instance"
1560 +class ClassFromFunctions(object):
1561 + """Inherit this class to give yourself a python class that wraps a set of
1562 + functions that together constitute the methods of the class.
1564 + The method functions must all have as a first argument an object
1565 + holding the instance data. There must also be a function that
1566 + returns a new instance of the class, the constructor.
1568 + Your subclass must define
1569 + _module - The module where the method functions, including the
1570 + constructor can be found
1571 + _new_instance - The name of a function that serves as a constructor,
1572 + returning the instance data.
1574 + To access the instance data, use the read-only property instance.
1576 + To add some functions from _module as methods, call classmethods like
1577 + add_method and add_methods_with_prefix.
1579 + def __new__(cls, *args, **kargs):
1580 + # why reimpliment __new__? Because later on we're going to
1581 + # use new to avoid creating new instances when existing instances
1582 + # already exist with the same __instance value, or equivalent __instance
1583 + # values, where this is desirable...
1584 + return super(ClassFromFunctions, cls).__new__(cls)
1586 + def __init__(self, *args, **kargs):
1587 + """Construct a new instance, using either the function
1588 + self._module[self._new_instance] or using existing instance
1589 + data. (specified with the keyword argument, instance)
1591 + Pass the arguments that should be passed on to
1592 + self._module[self._new_instance] . Any arguments of that
1593 + are instances of ClassFromFunctions will be switched with the instance
1594 + data. (by calling the .instance property)
1596 + if INSTANCE_ARGUMENT in kargs:
1597 + self.__instance = kargs[INSTANCE_ARGUMENT]
1599 + self.__instance = getattr(self._module, self._new_instance)(
1600 + *process_list_convert_to_instance(args) )
1602 + def get_instance(self):
1603 + """Get the instance data.
1605 + You can also call the instance property
1607 + return self.__instance
1609 + instance = property(get_instance)
1614 + def add_method(cls, function_name, method_name):
1615 + """Add the function, method_name to this class as a method named name
1617 + def method_function(self, *meth_func_args):
1618 + return getattr(self._module, function_name)(
1620 + *process_list_convert_to_instance(meth_func_args) )
1622 + setattr(cls, method_name, method_function)
1623 + setattr(method_function, "__name__", method_name)
1624 + return method_function
1627 + def ya_add_classmethod(cls, function_name, method_name):
1628 + """Add the function, method_name to this class as a classmethod named name
1630 + Taken from function_class and slightly modified.
1632 + def method_function(self, *meth_func_args):
1633 + return getattr(self._module, function_name)(
1635 + *process_list_convert_to_instance(meth_func_args) )
1637 + setattr(cls, method_name, classmethod(method_function))
1638 + setattr(method_function, "__name__", method_name)
1639 + return method_function
1642 + def ya_add_method(cls, function_name, method_name):
1643 + """Add the function, method_name to this class as a method named name
1645 + Taken from function_class and slightly modified.
1647 + def method_function(self, *meth_func_args):
1648 + return getattr(self._module, function_name)(
1650 + *process_list_convert_to_instance(meth_func_args) )
1652 + setattr(cls, method_name, method_function)
1653 + setattr(method_function, "__name__", method_name)
1654 + return method_function
1657 + def add_methods_with_prefix(cls, prefix):
1658 + """Add a group of functions with the same prefix
1660 + for function_name, function_value, after_prefix in \
1661 + extract_attributes_with_prefix(cls._module, prefix):
1662 + cls.add_method(function_name, after_prefix)
1665 + def add_constructor_and_methods_with_prefix(cls, prefix, constructor):
1666 + """Add a group of functions with the same prefix, and set the
1667 + _new_instance attribute to prefix + constructor
1669 + cls.add_methods_with_prefix(prefix)
1670 + cls._new_instance = prefix + constructor
1673 + def decorate_functions(cls, decorator, *args):
1674 + for function_name in args:
1675 + setattr( cls, function_name,
1676 + decorator( getattr(cls, function_name) ) )
1678 +def method_function_returns_instance(method_function, cls):
1679 + """A function decorator that is used to decorate method functions that
1680 + return instance data, to return instances instead.
1682 + You can't use this decorator with @, because this function has a second
1685 + assert( 'instance' == INSTANCE_ARGUMENT )
1686 + def new_function(*args):
1687 + kargs = { INSTANCE_ARGUMENT : method_function(*args) }
1688 + if kargs['instance'] == None:
1691 + return cls( **kargs )
1693 + return new_function
1695 +def method_function_returns_instance_list(method_function, cls):
1696 + def new_function(*args):
1697 + return [ cls( **{INSTANCE_ARGUMENT: item} )
1698 + for item in method_function(*args) ]
1699 + return new_function
1701 +def methods_return_instance_lists(cls, function_dict):
1702 + for func_name, instance_name in function_dict.iteritems():
1703 + setattr(cls, func_name,
1704 + method_function_returns_instance_list(
1705 + getattr(cls, func_name), instance_name))
1707 +def default_arguments_decorator(function, *args):
1708 + """Decorates a function to give it default, positional arguments
1710 + You can't use this decorator with @, because this function has more
1711 + than one argument.
1713 + def new_function(*function_args):
1714 + new_argset = list(function_args)
1715 + new_argset.extend( args[ len(function_args): ] )
1716 + return function( *new_argset )
1717 + return new_function
1719 +def return_instance_if_value_has_it(value):
1720 + """Return value.instance if value is an instance of ClassFromFunctions,
1723 + if isinstance(value, ClassFromFunctions):
1724 + return value.instance
1728 +def process_list_convert_to_instance( value_list ):
1729 + """Return a list built from value_list, where if a value is in an instance
1730 + of ClassFromFunctions, we put value.instance in the list instead.
1732 + Things that are not instances of ClassFromFunctions are returned to
1733 + the new list unchanged.
1735 + return [ return_instance_if_value_has_it(value)
1736 + for value in value_list ]
1738 +def extract_attributes_with_prefix(obj, prefix):
1739 + """Generator that iterates through the attributes of an object and
1740 + for any attribute that matches a prefix, this yields
1741 + the attribute name, the attribute value, and the text that appears
1742 + after the prefix in the name
1744 + for attr_name, attr_value in obj.__dict__.iteritems():
1745 + if attr_name.startswith(prefix):
1746 + after_prefix = attr_name[ len(prefix): ]
1747 + yield attr_name, attr_value, after_prefix
1749 +def methods_return_instance(cls, function_dict):
1750 + """Iterates through a dictionary of function name strings and instance names
1751 + and sets the function to return the associated instance
1753 + for func_name, instance_name in function_dict.iteritems():
1754 + setattr(cls, func_name,
1755 + method_function_returns_instance( getattr(cls, func_name), instance_name))
1757 --- /dev/null 2020-04-12 16:41:47 UTC
1758 +++ src/optional/python-bindings/gnucash_business.py
1760 +# gnucash_business.py -- High level python wrapper classes for the business
1763 +# Copyright (C) 2008,2010 ParIT Worker Co-operative <paritinfo@parit.ca>
1764 +# This program is free software; you can redistribute it and/or
1765 +# modify it under the terms of the GNU General Public License as
1766 +# published by the Free Software Foundation; either version 2 of
1767 +# the License, or (at your option) any later version.
1769 +# This program is distributed in the hope that it will be useful,
1770 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
1771 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1772 +# GNU General Public License for more details.
1774 +# You should have received a copy of the GNU General Public License
1775 +# along with this program; if not, contact:
1776 +# Free Software Foundation Voice: +1-617-542-5942
1777 +# 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
1778 +# Boston, MA 02110-1301, USA gnu@gnu.org
1780 +# @author Mark Jenkins, ParIT Worker Co-operative <mark@parit.ca>
1781 +# @author Jeff Green, ParIT Worker Co-operative <jeff@parit.ca>
1783 +# @brief High level python wrapper classes for the business parts of GnuCash
1784 +# @author Mark Jenkins, ParIT Worker Co-operative <mark@parit.ca>
1785 +# @author Jeff Green, ParIT Worker Co-operative <jeff@parit.ca>
1786 +# @ingroup python_bindings
1788 +import gnucash_core_c
1790 +from function_class import \
1791 + ClassFromFunctions, extract_attributes_with_prefix, \
1792 + default_arguments_decorator, method_function_returns_instance, \
1793 + methods_return_instance, methods_return_instance_lists
1795 +from gnucash_core import \
1796 + GnuCashCoreClass, GncNumeric, GncCommodity, Transaction, \
1797 + Split, Book, GncLot, Account
1799 +from gnucash_core_c import GNC_OWNER_CUSTOMER, GNC_OWNER_JOB, \
1800 + GNC_OWNER_EMPLOYEE, GNC_OWNER_VENDOR, \
1801 + GNC_PAYMENT_CASH, GNC_PAYMENT_CARD, \
1802 + GNC_DISC_PRETAX, GNC_DISC_SAMETIME, GNC_DISC_POSTTAX, \
1803 + GNC_TAXINCLUDED_YES, GNC_TAXINCLUDED_NO, GNC_TAXINCLUDED_USEGLOBAL, \
1804 + GNC_AMT_TYPE_VALUE, GNC_AMT_TYPE_PERCENT, GNC_ID_INVOICE
1808 +class GnuCashBusinessEntity(GnuCashCoreClass):
1809 + def __init__(self, book=None, id=None, currency=None, name=None,
1811 + if instance == None:
1812 + if book==None or id==None or currency==None:
1814 + "you must call GnuCashBusinessEntity.__init__ "
1815 + "with either a book, id, and currency, or an existing "
1816 + "low level swig proxy in the argument instance")
1817 + GnuCashCoreClass.__init__(self, book)
1820 + self.SetCurrency(currency)
1822 + self.SetName(name)
1825 + GnuCashCoreClass.__init__(self, instance=instance)
1827 +class Customer(GnuCashBusinessEntity): pass
1829 +class Employee(GnuCashBusinessEntity): pass
1831 +class Vendor(GnuCashBusinessEntity): pass
1833 +class Job(GnuCashBusinessEntity):
1834 + # override the superclass constructor, as Job doesn't require
1835 + # a currency but it does require an owner
1836 + def __init__(self, book=None, id=None, owner=None, name=None,
1838 + if instance == None:
1839 + if book==None or id==None or owner==None:
1841 + "you must call Job.__init__ "
1842 + "with either a book, id, and owner or an existing "
1843 + "low level swig proxy in the argument instance")
1844 + GnuCashCoreClass.__init__(self, book)
1846 + self.SetOwner(owner)
1848 + self.SetName(name)
1850 + GnuCashCoreClass.__init__(self, instance=instance)
1852 +class Address(GnuCashCoreClass): pass
1854 +class BillTerm(GnuCashCoreClass): pass
1856 +class TaxTable(GnuCashCoreClass):
1857 + def __init__(self, book=None, name=None, first_entry=None, instance=None):
1858 + if instance == None:
1859 + if book==None or name==None or first_entry==None:
1861 + "you must call TaxTable.__init__ with either a "
1862 + "book, name, and first_entry, or an existing "
1863 + "low level swig proxy in the argument instance")
1864 + GnuCashCoreClass.__init__(self, book)
1865 + self.SetName(name)
1866 + self.AddEntry(first_entry)
1868 + GnuCashCoreClass.__init__(self, instance=instance)
1870 +class TaxTableEntry(GnuCashCoreClass):
1871 + def __init__(self, account=None, percent=True, amount=None, instance=None):
1872 + """TaxTableEntry constructor
1874 + You must provide an account, or be initizing this with an existing
1875 + swig proxy object via the instance keyword argument.
1877 + You may also optionally set the percent keyword argument to False to get
1878 + a fixed value instead of percentage based tax (which is the default, or
1879 + when percent=True).
1881 + The tax will be zero percent or zero unless you set the amount keyword
1882 + argument to a GncNumeric value as well.
1885 + if instance == None:
1888 + "you must call TaxTableEntry.__init__ with either a "
1889 + "account or an existing "
1890 + "low level swig proxy in the argument instance")
1891 + GnuCashCoreClass.__init__(self)
1892 + self.SetAccount(account)
1894 + self.SetType(GNC_AMT_TYPE_PERCENT)
1896 + self.SetType(GNC_AMT_TYPE_VALUE)
1897 + if amount != None:
1898 + self.SetAmount(amount)
1900 + GnuCashCoreClass.__init__(self, instance=instance)
1902 +class Invoice(GnuCashCoreClass):
1903 + def __init__(self, book=None, id=None, currency=None, owner=None,
1904 + date_opened=None, instance=None):
1905 + """Invoice Contstructor
1907 + You must provide a book, id, currency and owner
1908 + (Customer, Job, Employee, Vendor) or an existing swig proxy object
1909 + in the keyword argument instance.
1911 + Optionally, you may provide a date the invoice is opened on
1912 + (datetime.date or datetime.datetime), otherwise today's date is used.
1914 + if instance == None:
1915 + if book==None or id==None or currency==None or owner==None:
1917 + "you must call Invoice.__init__ "
1918 + "with either a book, id, currency and owner, or an existing"
1919 + "low level swig proxy in the argument instance")
1920 + GnuCashCoreClass.__init__(self, book)
1923 + self.SetCurrency(currency)
1924 + self.SetOwner(owner)
1925 + if date_opened == None:
1926 + date_opened = datetime.date.today()
1927 + self.SetDateOpened(date_opened)
1930 + GnuCashCoreClass.__init__(self, instance=instance)
1932 +class Bill(Invoice):
1935 +def decorate_to_return_instance_instead_of_owner(dec_function):
1936 + def new_get_owner_function(self):
1937 + (owner_type, instance) = dec_function(self)
1938 + if owner_type == GNC_OWNER_CUSTOMER:
1939 + return Customer(instance=instance)
1940 + elif owner_type == GNC_OWNER_JOB:
1941 + return Job(instance=instance)
1942 + elif owner_type == GNC_OWNER_EMPLOYEE:
1943 + return Employee(instance=instance)
1944 + elif owner_type == GNC_OWNER_VENDOR:
1945 + return Vendor(instance=instance)
1948 + return new_get_owner_function
1950 +class Entry(GnuCashCoreClass):
1951 + def __init__(self, book=None, invoice=None, date=None, instance=None):
1952 + """Invoice Entry constructor
1954 + You must provide a book or be initizing this with an existing
1955 + swig proxy object via the instance keyword argument.
1957 + The optional invoice argument can be set to a Bill or Invoice
1958 + that you would like to associate the entry with. You might as well
1959 + assign one now, as an Entry can't exist without one, but you can
1960 + always use Invoice.AddEntry or Bill.AddEntry later on.
1962 + By default, the entry will be set to today's date unless you
1963 + override with the date argument.
1965 + if instance == None:
1968 + "you must call Entry.__init__ with either a "
1969 + "book or an existing "
1970 + "low level swig proxy in the argument instance")
1971 + GnuCashCoreClass.__init__(self, book)
1974 + date = datetime.date.today()
1975 + self.SetDate(date)
1976 + if invoice != None:
1977 + invoice.AddEntry(self)
1980 + GnuCashCoreClass.__init__(self, instance=instance)
1982 + def test_type(self, invoice):
1983 + if invoice.GetTypeString() == "Invoice" and self.GetInvoice() == None:
1984 + raise Exception("Entry type error. Check that Entry type matches Invoice.")
1985 + if invoice.GetTypeString() == "Bill" and self.GetBill() == None:
1986 + raise Exception("Entry type error. Check that Entry type matches Bill.")
1990 +GnuCashBusinessEntity.add_methods_with_prefix('gncOwner')
1993 + 'GetCustomer' : Customer,
1994 + 'GetVendor' : Vendor,
1995 + 'GetEmployee' : Employee,
1997 + 'GetAddr' : Address,
1998 + 'GetCurrency' : GncCommodity,
1999 + 'GetEndOwner': GnuCashBusinessEntity,
2000 + 'GetBalanceInCurrency': GncNumeric,
2002 +methods_return_instance(GnuCashBusinessEntity, owner_dict)
2004 +methods_return_instance_lists(
2005 + GnuCashBusinessEntity, {
2006 + 'GetCommoditiesList': GncCommodity
2010 +Customer.add_constructor_and_methods_with_prefix('gncCustomer', 'Create')
2013 + 'GetAddr' : Address,
2014 + 'GetShipAddr' : Address,
2015 + 'GetDiscount' : GncNumeric,
2016 + 'GetCredit' : GncNumeric,
2017 + 'GetTerms' : BillTerm,
2018 + 'GetCurrency' : GncCommodity,
2019 + 'GetTaxTable': TaxTable,
2021 +methods_return_instance(Customer, customer_dict)
2024 +Employee.add_constructor_and_methods_with_prefix('gncEmployee', 'Create')
2028 + 'GetAddr' : Address,
2029 + 'GetWorkday' : GncNumeric,
2030 + 'GetRate' : GncNumeric,
2031 + 'GetCurrency' : GncCommodity
2033 +methods_return_instance(Employee, employee_dict)
2036 +Vendor.add_constructor_and_methods_with_prefix('gncVendor', 'Create')
2039 + 'GetAddr' : Address,
2040 + 'GetTerms' : BillTerm,
2041 + 'GetCurrency' : GncCommodity,
2042 + 'GetTaxTable': TaxTable,
2044 +methods_return_instance(Vendor, vendor_dict)
2047 +Job.add_constructor_and_methods_with_prefix('gncJob', 'Create')
2048 +Job.decorate_functions(
2049 + decorate_to_return_instance_instead_of_owner,
2053 +Address.add_constructor_and_methods_with_prefix('gncAddress', 'Create')
2056 +BillTerm.add_constructor_and_methods_with_prefix('gncBillTerm', 'Create')
2059 + 'LookupByName' : BillTerm,
2060 + 'GetDiscount' : GncNumeric,
2061 + 'GetParent' : BillTerm,
2062 + 'ReturnChild' : BillTerm
2064 +methods_return_instance(BillTerm, billterm_dict)
2067 +TaxTable.add_constructor_and_methods_with_prefix('gncTaxTable', 'Create')
2070 + 'GetParent': TaxTable,
2072 +methods_return_instance(TaxTable, taxtable_dict)
2075 +TaxTableEntry.add_constructor_and_methods_with_prefix(
2076 + 'gncTaxTableEntry', 'Create')
2078 +taxtableentry_dict = {
2079 + 'GetAccount': Account,
2080 + 'GetAmount': GncNumeric,
2084 +Invoice.add_constructor_and_methods_with_prefix('gncInvoice', 'Create')
2085 +methods_return_instance_lists(
2086 + Invoice, { 'GetEntries': Entry })
2089 +Bill.add_methods_with_prefix('gncBill')
2092 + 'GetTerms': BillTerm,
2093 + 'GetCurrency': GncCommodity,
2094 + 'GetToChargeAmount': GncNumeric,
2095 + 'GetPostedLot': GncLot,
2096 + 'GetPostedTxn': Transaction,
2097 + 'GetPostedAcc': Account,
2098 + 'GetTotal': GncNumeric,
2099 + 'GetTotalOf': GncNumeric,
2100 + 'GetTotalSubtotal': GncNumeric,
2101 + 'GetTotalTax': GncNumeric,
2102 + 'PostToAccount': Transaction,
2105 +methods_return_instance(Invoice, invoice_dict)
2106 +Invoice.decorate_functions(
2107 + decorate_to_return_instance_instead_of_owner,
2108 + 'GetOwner', 'GetBillTo')
2111 +Entry.add_constructor_and_methods_with_prefix('gncEntry', 'Create')
2114 + 'GetQuantity': GncNumeric,
2115 + 'GetInvAccount': Account,
2116 + 'GetInvPrice': GncNumeric,
2117 + 'GetInvDiscount': GncNumeric,
2118 + 'GetInvTaxTable': TaxTable,
2119 + 'GetBillAccount': Account,
2120 + 'GetBillPrice': GncNumeric,
2121 + 'GetBillTaxTable': TaxTable,
2123 + 'GetInvoice': Invoice,
2124 + 'GetBill': Invoice
2126 +methods_return_instance(Entry, entry_dict)
2127 +Entry.decorate_functions(
2128 + decorate_to_return_instance_instead_of_owner,
2130 --- /dev/null 2020-04-12 16:41:47 UTC
2131 +++ src/optional/python-bindings/gnucash_core.py
2133 +# gnucash_core.py -- High level python wrapper classes for the core parts
2136 +# Copyright (C) 2008 ParIT Worker Co-operative <paritinfo@parit.ca>
2137 +# This program is free software; you can redistribute it and/or
2138 +# modify it under the terms of the GNU General Public License as
2139 +# published by the Free Software Foundation; either version 2 of
2140 +# the License, or (at your option) any later version.
2142 +# This program is distributed in the hope that it will be useful,
2143 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
2144 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2145 +# GNU General Public License for more details.
2147 +# You should have received a copy of the GNU General Public License
2148 +# along with this program; if not, contact:
2149 +# Free Software Foundation Voice: +1-617-542-5942
2150 +# 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
2151 +# Boston, MA 02110-1301, USA gnu@gnu.org
2153 +# @author Mark Jenkins, ParIT Worker Co-operative <mark@parit.ca>
2154 +# @author Jeff Green, ParIT Worker Co-operative <jeff@parit.ca>
2156 +# The following is for doxygen
2158 +# @brief High level python wrapper classes for the core parts of GnuCash
2159 +# @author Mark Jenkins, ParIT Worker Co-operative <mark@parit.ca>
2160 +# @author Jeff Green, ParIT Worker Co-operative <jeff@parit.ca>
2161 +# @ingroup python_bindings
2163 +import gnucash_core_c
2165 +from function_class import \
2166 + ClassFromFunctions, extract_attributes_with_prefix, \
2167 + default_arguments_decorator, method_function_returns_instance, \
2168 + methods_return_instance, process_list_convert_to_instance, \
2169 + method_function_returns_instance_list, methods_return_instance_lists
2171 +from gnucash_core_c import gncInvoiceLookup, gncInvoiceGetInvoiceFromTxn, \
2172 + gncInvoiceGetInvoiceFromLot, gncEntryLookup, gncInvoiceLookup, \
2173 + gncCustomerLookup, gncVendorLookup, gncJobLookup, gncEmployeeLookup, \
2174 + gncTaxTableLookup, gncTaxTableLookupByName, gnc_search_invoice_on_id, \
2175 + gnc_search_customer_on_id, gnc_search_bill_on_id , gnc_search_vendor_on_id, \
2176 + gncInvoiceNextID, gncCustomerNextID, gncTaxTableGetTables, gncVendorNextID
2178 +class GnuCashCoreClass(ClassFromFunctions):
2179 + _module = gnucash_core_c
2181 + def do_lookup_create_oo_instance(self, lookup_function, cls, *args):
2182 + thing = lookup_function(self.get_instance(), *args)
2184 + thing = cls(instance=thing)
2188 +class GnuCashBackendException(Exception):
2189 + def __init__(self, msg, errors):
2190 + Exception.__init__(self, msg)
2191 + self.errors = errors
2193 +class Session(GnuCashCoreClass):
2194 + """A GnuCash book editing session
2196 + To commit changes to the session you may need to call save,
2197 + (this is always the case with the file backend).
2199 + When you're down with a session you may need to call end()
2201 + Every Session has a Book in the book attribute, which you'll definitely
2202 + be interested in, as every GnuCash entity (Transaction, Split, Vendor,
2203 + Invoice..) is associated with a particular book where it is stored.
2206 + def __init__(self, book_uri=None, ignore_lock=False, is_new=False,
2207 + force_new= False):
2208 + """A convenient constructor that allows you to specify a book URI,
2209 + begin the session, and load the book.
2211 + This can give you the power of calling
2212 + qof_session_new, qof_session_begin, and qof_session_load all in one!
2214 + book_uri can be None to skip the calls to qof_session_begin and
2215 + qof_session_load, or it can be a string like "file:/test.xac"
2217 + qof_session_load is only called if is_new is set to False
2219 + is_new is passed to qof_session_begin as the argument create,
2220 + and force_new as the argument force. Is_new will create a new
2221 + database or file; force will force creation even if it will
2222 + destroy an existing dataset.
2224 + ignore_lock is passed to qof_session_begin's argument of the
2225 + same name and is used to break an existing lock on a dataset.
2229 + This function can raise a GnuCashBackendException. If it does,
2230 + you don't need to cleanup and call end() and destroy(), that is handled
2231 + for you, and the exception is raised.
2233 + GnuCashCoreClass.__init__(self)
2234 + if book_uri is not None:
2236 + self.begin(book_uri, ignore_lock, is_new, force_new)
2237 + # Take care of backend inconsistency
2238 + # New xml file can't be loaded, new sql store
2239 + # has to be loaded before it can be altered
2240 + # Any existing store obviously has to be loaded
2241 + # More background: https://bugzilla.gnome.org/show_bug.cgi?id=726891
2242 + if book_uri[:3] != "xml" or not is_new:
2244 + except GnuCashBackendException, backend_exception:
2249 + def raise_backend_errors(self, called_function="qof_session function"):
2250 + """Raises a GnuCashBackendException if there are outstanding
2251 + QOF_BACKEND errors.
2253 + set called_function to name the function that was last called
2255 + errors = self.pop_all_errors()
2257 + raise GnuCashBackendException(
2258 + "call to %s resulted in the "
2259 + "following errors, %s" % (called_function, backend_error_dict[errors[0]]),
2262 + def generate_errors(self):
2263 + """A generator that yields any outstanding QofBackend errors
2265 + while self.get_error() is not ERR_BACKEND_NO_ERR:
2266 + error = self.pop_error()
2269 + def pop_all_errors(self):
2270 + """Returns any accumulated qof backend errors as a tuple
2272 + return tuple( self.generate_errors() )
2276 + def raise_backend_errors_after_call(function):
2277 + """A function decorator that results in a call to
2278 + raise_backend_errors after execution.
2280 + def new_function(self, *args):
2281 + return_value = function(self, *args)
2282 + self.raise_backend_errors(function.__name__)
2283 + return return_value
2284 + return new_function
2286 +class Book(GnuCashCoreClass):
2287 + """A Book encapsulates all of the GnuCash data, it is the place where
2288 + all GnuCash entities (Transaction, Split, Vendor, Invoice...), are
2289 + stored. You'll notice that all of the constructors for those entities
2290 + need a book to be associated with.
2292 + The most common way to get a book is through the book property in the
2293 + Session class, that is, create a session that connects to some storage,
2294 + such as through 'my_session = Session('file:my_books.xac')', and access
2295 + the book via the book property, 'my_session.book'
2297 + If you would like to create a Book without any backing storage, call the
2298 + Book constructor without any parameters, 'Book()'. You can later merge
2299 + such a book into a book with actual store by using merge_init.
2301 + Methods of interest
2302 + get_root_account -- Returns the root level Account
2303 + get_table -- Returns a commodity lookup table, of type GncCommodityTable
2305 + def InvoiceLookup(self, guid):
2306 + from gnucash_business import Invoice
2307 + return self.do_lookup_create_oo_instance(
2308 + gncInvoiceLookup, Invoice, guid.get_instance() )
2310 + def EntryLookup(self, guid):
2311 + from gnucash_business import Entr
2312 + return self.do_lookup_create_oo_instance(
2313 + gncEntryLookup, Entry, guid.get_instance() )
2315 + def CustomerLookup(self, guid):
2316 + from gnucash_business import Customer
2317 + return self.do_lookup_create_oo_instance(
2318 + gncCustomerLookup, Customer, guid.get_instance())
2320 + def JobLookup(self, guid):
2321 + from gnucash_business import Job
2322 + return self.do_lookup_create_oo_instance(
2323 + gncJobLookup, Job, guid.get_instance() )
2325 + def VendorLookup(self, guid):
2326 + from gnucash_business import Vendor
2327 + return self.do_lookup_create_oo_instance(
2328 + gncVendorLookup, Vendor, guid.get_instance() )
2330 + def EmployeeLookup(self, guid):
2331 + from gnucash_business import Employee
2332 + return self.do_lookup_create_oo_instance(
2333 + gncEmployeeLookup, Employee, guid.get_instance() )
2335 + def TaxTableLookup(self, guid):
2336 + from gnucash_business import TaxTable
2337 + return self.do_lookup_create_oo_instance(
2338 + gncTaxTableLookup, TaxTable, guid.get_instance() )
2340 + def TaxTableLookupByName(self, name):
2341 + from gnucash_business import TaxTable
2342 + return self.do_lookup_create_oo_instance(
2343 + gncTaxTableLookupByName, TaxTable, name)
2345 + def TaxTableGetTables(self):
2346 + from gnucash_business import TaxTable
2347 + return [ TaxTable(instance=item) for item in gncTaxTableGetTables(self.instance) ]
2349 + def BillLoookupByID(self, id):
2350 + from gnucash_business import Bill
2351 + return self.do_lookup_create_oo_instance(
2352 + gnc_search_bill_on_id, Bill, id)
2354 + def InvoiceLookupByID(self, id):
2355 + from gnucash_business import Invoice
2356 + return self.do_lookup_create_oo_instance(
2357 + gnc_search_invoice_on_id, Invoice, id)
2359 + def CustomerLookupByID(self, id):
2360 + from gnucash_business import Customer
2361 + return self.do_lookup_create_oo_instance(
2362 + gnc_search_customer_on_id, Customer, id)
2364 + def VendorLookupByID(self, id):
2365 + from gnucash_business import Vendor
2366 + return self.do_lookup_create_oo_instance(
2367 + gnc_search_vendor_on_id, Vendor, id)
2369 + def InvoiceNextID(self, customer):
2370 + ''' Return the next invoice ID.
2371 + This works but I'm not entirely happy with it. FIX ME'''
2372 + from gnucash.gnucash_core_c import gncInvoiceNextID
2373 + return gncInvoiceNextID(self.get_instance(),customer.GetEndOwner().get_instance()[1])
2375 + def BillNextID(self, vendor):
2376 + ''' Return the next Bill ID. '''
2377 + from gnucash.gnucash_core_c import gncInvoiceNextID
2378 + return gncInvoiceNextID(self.get_instance(),vendor.GetEndOwner().get_instance()[1])
2380 + def CustomerNextID(self):
2381 + ''' Return the next Customer ID. '''
2382 + from gnucash.gnucash_core_c import gncCustomerNextID
2383 + return gncCustomerNextID(self.get_instance())
2385 + def VendorNextID(self):
2386 + ''' Return the next Vendor ID. '''
2387 + from gnucash.gnucash_core_c import gncVendorNextID
2388 + return gncVendorNextID(self.get_instance())
2390 +class GncNumeric(GnuCashCoreClass):
2391 + """Object used by GnuCash to store all numbers. Always consists of a
2392 + numerator and denominator.
2394 + The constants GNC_DENOM_AUTO,
2395 + GNC_HOW_RND_FLOOR, GNC_HOW_RND_CEIL, GNC_HOW_RND_TRUNC,
2396 + GNC_HOW_RND_PROMOTE, GNC_HOW_RND_ROUND_HALF_DOWN,
2397 + GNC_HOW_RND_ROUND_HALF_UP, GNC_HOW_RND_ROUND, GNC_HOW_RND_NEVER,
2398 + GNC_HOW_DENOM_EXACT, GNC_HOW_DENOM_REDUCE, GNC_HOW_DENOM_LCD,
2399 + and GNC_HOW_DENOM_FIXED are available for arithmetic
2400 + functions like GncNumeric.add
2402 + Look at gnc-numeric.h to see how to use these
2405 + def __init__(self, num=0, denom=1, **kargs):
2406 + """Constructor that allows you to set the numerator and denominator or
2407 + leave them blank with a default value of 0 (not a good idea since there
2408 + is currently no way to alter the value after instantiation)
2410 + GnuCashCoreClass.__init__(self, num, denom, **kargs)
2411 + #if INSTANCE_ARG in kargs:
2412 + # GnuCashCoreClass.__init__(**kargs)
2414 + # self.set_denom(denom) # currently undefined
2415 + # self.set_num(num) # currently undefined
2417 + def __unicode__(self):
2418 + """Returns a human readable numeric value string as UTF8."""
2419 + if self.denom() == 0:
2420 + return "Division by zero"
2422 + value_float = self.to_double()
2423 + value_str = u"{0:.{1}f}".format(value_float,2) ## The second argument is the precision. It would be nice to be able to make it configurable.
2426 + def __str__(self):
2427 + """returns a human readable numeric value string as bytes."""
2428 + return unicode(self).encode('utf-8')
2430 +class GncPrice(GnuCashCoreClass):
2432 + Each priceEach price in the database represents an "instantaneous"
2433 + quote for a given commodity with respect to another commodity.
2434 + For example, a given price might represent the value of LNUX in USD on 2001-02-03.
2437 + * commodity: the item being priced.
2438 + * currency: the denomination of the value of the item being priced.
2439 + * value: the value of the item being priced.
2440 + * time: the time the price was valid.
2441 + * source: a string describing the source of the quote. These strings will be something like this:
2442 + "Finance::Quote", "user:misc", "user:foo", etc. If the quote came from a user, as a matter of policy,
2443 + you *must* prefix the string you give with "user:". For now, the only other reserved values are
2444 + "Finance::Quote" and "old-file-import". Any string used must be added to the source_list array in
2445 + dialog-price-edit-db.c so that it can be properly translated. (There are unfortunately many strings
2446 + in users' databases, so this string must be translated on output instead of always being used in untranslated form).
2447 + * type: the type of quote - types possible right now are bid, ask, last, nav, and
2448 + unknown.Each price in the database represents an "instantaneous" quote for a given
2449 + commodity with respect to another commodity.
2450 + For example, a given price might represent the value of LNUX in USD on 2001-02-03.
2452 + See also http://code.gnucash.org/docs/head/group__Price.html
2455 +GncPrice.add_methods_with_prefix('gnc_price_')
2458 +class GncPriceDB(GnuCashCoreClass):
2460 + a simple price database for gnucash.
2461 + The PriceDB is intended to be a database of price quotes, or more specifically,
2462 + a database of GNCPrices. For the time being, it is still a fairly simple
2463 + database supporting only fairly simple queries. It is expected that new
2464 + queries will be added as needed, and that there is some advantage to delaying
2465 + complex queries for now in the hope that we get a real DB implementation
2466 + before they're really needed.
2468 + Every QofBook contains a GNCPriceDB, accessible via gnc_pricedb_get_db.
2470 + Definition in file gnc-pricedb.h.
2471 + See also http://code.gnucash.org/docs/head/gnc-pricedb_8h.html
2474 +GncPriceDB.add_methods_with_prefix('gnc_pricedb_')
2476 + 'lookup_latest' : GncPrice,
2477 + 'lookup_nearest_in_time' : GncPrice,
2478 + 'lookup_latest_before' : GncPrice,
2479 + 'convert_balance_latest_price' : GncNumeric,
2480 + 'convert_balance_nearest_price' : GncNumeric,
2482 +methods_return_instance(GncPriceDB,PriceDB_dict)
2483 +GncPriceDB.get_prices = method_function_returns_instance_list(
2484 + GncPriceDB.get_prices, GncPrice )
2487 +class GncCommodity(GnuCashCoreClass): pass
2489 +class GncCommodityTable(GnuCashCoreClass):
2490 + """A CommodityTable provides a way to store and lookup commodities.
2491 + Commodities are primarily currencies, but other tradable things such as
2492 + stocks, mutual funds, and material substances are possible.
2494 + Users of this library should not create their own CommodityTable, instead
2495 + the get_table method from the Book class should be used.
2497 + This table is automatically populated with the GnuCash default commodity's
2498 + which includes most of the world's currencies.
2503 +class GncCommodityNamespace(GnuCashCoreClass):
2506 +class GncLot(GnuCashCoreClass):
2507 + def GetInvoiceFromLot(self):
2508 + from gnucash_business import Invoice
2509 + return self.do_lookup_create_oo_instance(
2510 + gncInvoiceGetInvoiceFromLot, Invoice )
2512 +class Transaction(GnuCashCoreClass):
2513 + """A GnuCash Transaction
2515 + Consists of at least one (generally two) splits to represent a transaction
2516 + between two accounts.
2519 + Has a GetImbalance() method that returns a list of all the imbalanced
2520 + currencies. Each list item is a two element tuple, the first element is
2521 + the imbalanced commodity, the second element is the value.
2523 + Warning, the commodity.get_instance() value can be None when there
2524 + is no currency set for the transaction.
2526 + _new_instance = 'xaccMallocTransaction'
2527 + def GetNthSplit(self, n):
2528 + return self.GetSplitList().pop(n)
2530 + def GetInvoiceFromTxn(self):
2531 + from gnucash_business import Transaction
2532 + return self.do_lookup_create_oo_instance(
2533 + gncInvoiceGetInvoiceFromTxn, Transaction )
2535 +def decorate_monetary_list_returning_function(orig_function):
2536 + def new_function(self):
2537 + # warning, item.commodity has been shown to be None
2538 + # when the transaction doesn't have a currency
2539 + return [(GncCommodity(instance=item.commodity),
2540 + GncNumeric(instance=item.value))
2541 + for item in orig_function(self) ]
2542 + return new_function
2544 +class Split(GnuCashCoreClass):
2545 + """A GnuCash Split
2547 + The most basic representation of a movement of currency from one account to
2550 + _new_instance = 'xaccMallocSplit'
2552 +class Account(GnuCashCoreClass):
2553 + """A GnuCash Account.
2555 + A fundamental entity in accounting, an Account provides representation
2556 + for a financial object, such as a ACCT_TYPE_BANK account, an
2557 + ACCT_TYPE_ASSET (like a building),
2558 + a ACCT_TYPE_LIABILITY (such as a bank loan), a summary of some type of
2559 + ACCT_TYPE_EXPENSE, or a summary of some source of ACCT_TYPE_INCOME .
2561 + The words in upper case are the constants that GnuCash and this library uses
2562 + to describe account type. Here is the full list:
2563 + ACCT_TYPE_ASSET, ACCT_TYPE_BANK, ACCT_TYPE_CASH, ACCT_TYPE_CHECKING, \
2564 + ACCT_TYPE_CREDIT, ACCT_TYPE_EQUITY, ACCT_TYPE_EXPENSE, ACCT_TYPE_INCOME, \
2565 + ACCT_TYPE_LIABILITY, ACCT_TYPE_MUTUAL, ACCT_TYPE_PAYABLE, \
2566 + ACCT_TYPE_RECEIVABLE, ACCT_TYPE_STOCK, ACCT_TYPE_ROOT, ACCT_TYPE_TRADING
2568 + These are not strings, they are attributes you can import from this
2571 + _new_instance = 'xaccMallocAccount'
2573 +class GUID(GnuCashCoreClass):
2574 + _new_instance = 'guid_new_return'
2577 +Session.add_constructor_and_methods_with_prefix('qof_session_', 'new')
2579 +def one_arg_default_none(function):
2580 + return default_arguments_decorator(function, None, None)
2581 +Session.decorate_functions(one_arg_default_none, "load", "save")
2583 +Session.decorate_functions( Session.raise_backend_errors_after_call,
2584 + "begin", "load", "save", "end")
2585 +Session.get_book = method_function_returns_instance(
2586 + Session.get_book, Book )
2588 +Session.book = property( Session.get_book )
2590 +# import all of the session backend error codes into this module
2591 +this_module_dict = globals()
2592 +for error_name, error_value, error_name_after_prefix in \
2593 + extract_attributes_with_prefix(gnucash_core_c, 'ERR_'):
2594 + this_module_dict[ error_name ] = error_value
2596 +#backend error codes used for reverse lookup
2597 +backend_error_dict = {}
2598 +for error_name, error_value, error_name_after_prefix in \
2599 + extract_attributes_with_prefix(gnucash_core_c, 'ERR_'):
2600 + backend_error_dict[ error_value ] = error_name
2602 +# GncNumeric denominator computation schemes
2603 +# Used for the denom argument in arithmetic functions like GncNumeric.add
2604 +from gnucash.gnucash_core_c import GNC_DENOM_AUTO
2606 +# GncNumeric rounding instructions
2607 +# used for the how argument in arithmetic functions like GncNumeric.add
2608 +from gnucash.gnucash_core_c import \
2609 + GNC_HOW_RND_FLOOR, GNC_HOW_RND_CEIL, GNC_HOW_RND_TRUNC, \
2610 + GNC_HOW_RND_PROMOTE, GNC_HOW_RND_ROUND_HALF_DOWN, \
2611 + GNC_HOW_RND_ROUND_HALF_UP, GNC_HOW_RND_ROUND, GNC_HOW_RND_NEVER
2613 +# GncNumeric denominator types
2614 +# used for the how argument in arithmetic functions like GncNumeric.add
2615 +from gnucash.gnucash_core_c import \
2616 + GNC_HOW_DENOM_EXACT, GNC_HOW_DENOM_REDUCE, GNC_HOW_DENOM_LCD, \
2617 + GNC_HOW_DENOM_FIXED
2619 +# import account types
2620 +from gnucash.gnucash_core_c import \
2621 + ACCT_TYPE_ASSET, ACCT_TYPE_BANK, ACCT_TYPE_CASH, ACCT_TYPE_CHECKING, \
2622 + ACCT_TYPE_CREDIT, ACCT_TYPE_EQUITY, ACCT_TYPE_EXPENSE, ACCT_TYPE_INCOME, \
2623 + ACCT_TYPE_LIABILITY, ACCT_TYPE_MUTUAL, ACCT_TYPE_PAYABLE, \
2624 + ACCT_TYPE_RECEIVABLE, ACCT_TYPE_STOCK, ACCT_TYPE_ROOT, ACCT_TYPE_TRADING
2627 +Book.add_constructor_and_methods_with_prefix('qof_book_', 'new')
2628 +Book.add_method('gnc_book_get_root_account', 'get_root_account')
2629 +Book.add_method('gnc_book_set_root_account', 'set_root_account')
2630 +Book.add_method('gnc_commodity_table_get_table', 'get_table')
2631 +Book.add_method('gnc_pricedb_get_db', 'get_price_db')
2632 +Book.add_method('qof_book_increment_and_format_counter', 'increment_and_format_counter')
2634 +#Functions that return Account
2635 +Book.get_root_account = method_function_returns_instance(
2636 + Book.get_root_account, Account )
2637 +#Functions that return GncCommodityTable
2638 +Book.get_table = method_function_returns_instance(
2639 + Book.get_table, GncCommodityTable )
2640 +#Functions that return GNCPriceDB
2641 +Book.get_price_db = method_function_returns_instance(
2642 + Book.get_price_db, GncPriceDB)
2645 +GncNumeric.add_constructor_and_methods_with_prefix('gnc_numeric_', 'create')
2647 +gncnumeric_dict = {
2648 + 'same' : GncNumeric,
2649 + 'add' : GncNumeric,
2650 + 'sub' : GncNumeric,
2651 + 'mul' : GncNumeric,
2652 + 'div' : GncNumeric,
2653 + 'neg' : GncNumeric,
2654 + 'abs' : GncNumeric,
2655 + 'add_fixed' : GncNumeric,
2656 + 'sub_fixed' : GncNumeric,
2657 + 'add_with_error' : GncNumeric,
2658 + 'sub_with_error' : GncNumeric,
2659 + 'mul_with_error' : GncNumeric,
2660 + 'div_with_error' : GncNumeric,
2661 + 'convert' : GncNumeric,
2662 + 'reduce' : GncNumeric
2664 +methods_return_instance(GncNumeric, gncnumeric_dict)
2667 +GncCommodity.add_constructor_and_methods_with_prefix('gnc_commodity_', 'new')
2668 +#Functions that return GncCommodity
2669 +GncCommodity.clone = method_function_returns_instance(
2670 + GncCommodity.clone, GncCommodity )
2672 +# GncCommodityTable
2673 +GncCommodityTable.add_methods_with_prefix('gnc_commodity_table_')
2674 +commoditytable_dict = {
2675 + 'lookup' : GncCommodity,
2676 + 'lookup_unique' : GncCommodity,
2677 + 'find_full' : GncCommodity,
2678 + 'insert' : GncCommodity,
2679 + 'add_namespace': GncCommodityNamespace,
2680 + 'find_namespace': GncCommodityNamespace,
2682 +methods_return_instance(GncCommodityTable, commoditytable_dict)
2684 +methods_return_instance_lists(
2685 + GncCommodityTable, { 'get_namespaces': GncCommodityNamespace,
2686 + 'get_namespaces_list': GncCommodityNamespace,
2687 + 'get_commodities': GncCommodity,
2688 + 'get_quotable_commodities': GncCommodity,
2692 +# GncCommodityNamespace
2693 +GncCommodityNamespace.add_methods_with_prefix('gnc_commodity_namespace_')
2694 +GncCommodityNamespace.get_commodity_list = \
2695 + method_function_returns_instance_list(
2696 + GncCommodityNamespace.get_commodity_list, GncCommodity )
2699 +GncLot.add_constructor_and_methods_with_prefix('gnc_lot_', 'new')
2702 + 'get_account' : Account,
2703 + 'get_book' : Book,
2704 + 'get_earliest_split' : Split,
2705 + 'get_latest_split' : Split,
2706 + 'get_balance' : GncNumeric,
2707 + 'lookup' : GncLot,
2708 + 'make_default' : GncLot
2710 +methods_return_instance(GncLot, gnclot_dict)
2713 +Transaction.add_methods_with_prefix('xaccTrans')
2714 +Transaction.add_method('gncTransGetGUID', 'GetGUID');
2717 + 'GetSplit': Split,
2718 + 'FindSplitByAccount': Split,
2719 + 'Clone': Transaction,
2720 + 'Reverse': Transaction,
2721 + 'GetReversedBy': Transaction,
2722 + 'GetImbalanceValue': GncNumeric,
2723 + 'GetAccountValue': GncNumeric,
2724 + 'GetAccountAmount': GncNumeric,
2725 + 'GetAccountConvRate': GncNumeric,
2726 + 'GetAccountBalance': GncNumeric,
2727 + 'GetCurrency': GncCommodity,
2731 +methods_return_instance(Transaction, trans_dict)
2732 +methods_return_instance_lists(
2733 + Transaction, { 'GetSplitList': Split,
2735 +Transaction.decorate_functions(
2736 + decorate_monetary_list_returning_function, 'GetImbalance')
2739 +Split.add_methods_with_prefix('xaccSplit')
2740 +Split.add_method('gncSplitGetGUID', 'GetGUID');
2744 + 'GetAccount': Account,
2745 + 'GetParent': Transaction,
2747 + 'GetOtherSplit': Split,
2748 + 'GetAmount': GncNumeric,
2749 + 'GetValue': GncNumeric,
2750 + 'GetSharePrice': GncNumeric,
2751 + 'ConvertAmount': GncNumeric,
2752 + 'GetBaseValue': GncNumeric,
2753 + 'GetBalance': GncNumeric,
2754 + 'GetClearedBalance': GncNumeric,
2755 + 'GetReconciledBalance': GncNumeric,
2756 + 'VoidFormerAmount': GncNumeric,
2757 + 'VoidFormerValue': GncNumeric,
2760 +methods_return_instance(Split, split_dict)
2762 +Split.account = property( Split.GetAccount, Split.SetAccount )
2763 +Split.parent = property( Split.GetParent, Split.SetParent )
2766 +Account.add_methods_with_prefix('xaccAccount')
2767 +Account.add_methods_with_prefix('gnc_account_')
2768 +Account.add_method('gncAccountGetGUID', 'GetGUID');
2771 + 'get_book' : Book,
2772 + 'Lookup' : Account,
2773 + 'get_parent' : Account,
2774 + 'get_root' : Account,
2775 + 'nth_child' : Account,
2776 + 'lookup_by_code' : Account,
2777 + 'lookup_by_name' : Account,
2778 + 'lookup_by_full_name' : Account,
2779 + 'FindTransByDesc' : Transaction,
2780 + 'FindSplitByDesc' : Split,
2781 + 'GetBalance' : GncNumeric,
2782 + 'GetClearedBalance' : GncNumeric,
2783 + 'GetReconciledBalance' : GncNumeric,
2784 + 'GetPresentBalance' : GncNumeric,
2785 + 'GetProjectedMinimumBalance' : GncNumeric,
2786 + 'GetBalanceAsOfDate' : GncNumeric,
2787 + 'ConvertBalanceToCurrency' : GncNumeric,
2788 + 'ConvertBalanceToCurrencyAsOfDate' : GncNumeric,
2789 + 'GetBalanceInCurrency' : GncNumeric,
2790 + 'GetClearedBalanceInCurrency' : GncNumeric,
2791 + 'GetReconciledBalanceInCurrency' : GncNumeric,
2792 + 'GetPresentBalanceInCurrency' : GncNumeric,
2793 + 'GetProjectedMinimumBalanceInCurrency' : GncNumeric,
2794 + 'GetBalanceAsOfDateInCurrency' : GncNumeric,
2795 + 'GetBalanceChangeForPeriod' : GncNumeric,
2796 + 'GetCommodity' : GncCommodity,
2799 +methods_return_instance(Account, account_dict)
2800 +methods_return_instance_lists(
2801 + Account, { 'GetSplitList': Split,
2802 + 'get_children': Account,
2803 + 'get_children_sorted': Account,
2804 + 'get_descendants': Account,
2805 + 'get_descendants_sorted': Account
2807 +Account.name = property( Account.GetName, Account.SetName )
2810 +GUID.add_methods_with_prefix('guid_')
2811 +GUID.add_method('xaccAccountLookup', 'AccountLookup')
2812 +GUID.add_method('xaccTransLookup', 'TransLookup')
2813 +GUID.add_method('xaccSplitLookup', 'SplitLookup')
2815 +## define addition methods for GUID object - do we need these
2816 +GUID.add_method('guid_to_string', 'to_string')
2817 +#GUID.add_method('string_to_guid', 'string_to_guid')
2821 + 'TransLookup': Transaction,
2822 + 'AccountLookup': Account,
2823 + 'SplitLookup': Split
2825 +methods_return_instance(GUID, guid_dict)
2828 +class GUIDString(GnuCashCoreClass):
2831 +GUIDString.add_constructor_and_methods_with_prefix('string_', 'to_guid')
2834 +from gnucash_core_c import \
2841 +from gnucash_core_c import \
2842 + QOF_STRING_MATCH_NORMAL, \
2843 + QOF_STRING_MATCH_CASEINSENSITIVE
2845 +from gnucash_core_c import \
2847 + QOF_COMPARE_LTE, \
2848 + QOF_COMPARE_EQUAL, \
2850 + QOF_COMPARE_GTE, \
2853 +from gnucash_core_c import \
2856 +from gnucash_core_c import \
2859 +class Query(GnuCashCoreClass):
2862 +Query.add_constructor_and_methods_with_prefix('qof_query_', 'create')
2864 +Query.add_method('qof_query_set_book', 'set_book')
2865 +Query.add_method('qof_query_search_for', 'search_for')
2866 +Query.add_method('qof_query_run', 'run')
2867 +Query.add_method('qof_query_add_term', 'add_term')
2868 +Query.add_method('qof_query_add_boolean_match', 'add_boolean_match')
2869 +Query.add_method('qof_query_destroy', 'destroy')
2871 +class QueryStringPredicate(GnuCashCoreClass):
2874 +QueryStringPredicate.add_constructor_and_methods_with_prefix('qof_query_', 'string_predicate')
2876 +class QueryBooleanPredicate(GnuCashCoreClass):
2879 +QueryBooleanPredicate.add_constructor_and_methods_with_prefix('qof_query_', 'boolean_predicate')
2881 +class QueryInt32Predicate(GnuCashCoreClass):
2884 +QueryInt32Predicate.add_constructor_and_methods_with_prefix('qof_query_', 'int32_predicate')