mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fix some reports.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5084 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
27a9362d92
commit
f71ea51e9b
@ -1,4 +1,4 @@
|
||||
SUBDIRS=file ${SQL_DIR} ${RPC_DIR}
|
||||
|
||||
|
||||
DIST_SUBDIRS=file postgres rpc
|
||||
|
||||
|
@ -502,6 +502,15 @@ xaccAccountGetGUID (Account *account)
|
||||
return &account->guid;
|
||||
}
|
||||
|
||||
GUID
|
||||
xaccAccountReturnGUID (Account *account)
|
||||
{
|
||||
if (!account)
|
||||
return *xaccGUIDNULL();
|
||||
|
||||
return account->guid;
|
||||
}
|
||||
|
||||
/********************************************************************\
|
||||
\********************************************************************/
|
||||
|
||||
|
@ -140,12 +140,15 @@ void xaccAccountSetSlots_nc(Account *account, kvp_frame *frame);
|
||||
/*
|
||||
* The xaccAccountGetGUID() subroutine will return the
|
||||
* globally unique id associated with that account.
|
||||
* xaccAccountReturnGUID() returns the same as a
|
||||
* struct.
|
||||
*
|
||||
* The xaccAccountLookup() subroutine will return the
|
||||
* account associated with the given id, or NULL
|
||||
* if there is no such account.
|
||||
*/
|
||||
const GUID * xaccAccountGetGUID (Account *account);
|
||||
GUID xaccAccountReturnGUID (Account *account);
|
||||
Account * xaccAccountLookup (const GUID *guid);
|
||||
|
||||
/*
|
||||
|
@ -847,6 +847,14 @@ description of the nature of a particular account.")
|
||||
'((<gnc:Account*> a) (<gw:bool> tax-related))
|
||||
"Set the tax-related flag of the account.")
|
||||
|
||||
(gw:wrap-function
|
||||
mod
|
||||
'gnc:account-get-guid
|
||||
'<gnc:guid-scm>
|
||||
"xaccAccountReturnGUID"
|
||||
'((<gnc:Account*> a))
|
||||
"Get the GUID of Account a.")
|
||||
|
||||
(gw:wrap-function
|
||||
mod
|
||||
'gnc:account-get-type-string
|
||||
|
@ -19,16 +19,12 @@
|
||||
|
||||
(gnc:support "report-utilities.scm")
|
||||
|
||||
(define (gnc:amount->string amount info)
|
||||
(d-gnc:amount->string-helper (exact->inexact amount) info))
|
||||
|
||||
(define (gnc:commodity-amount->string amount info)
|
||||
(gnc:amount->string-helper amount info))
|
||||
(define gnc:amount->string gnc:amount->string-helper)
|
||||
|
||||
;; pair is a list of one gnc:commodity and one gnc:numeric
|
||||
;; value. Deprecated -- use <gnc-monetary> instead.
|
||||
(define (gnc:commodity-value->string pair)
|
||||
(gnc:commodity-amount->string
|
||||
(gnc:amount->string
|
||||
(cadr pair) (gnc:commodity-print-info (car pair) #t)))
|
||||
|
||||
;; Just for convenience. But in reports you should rather stick to the
|
||||
|
@ -33,6 +33,9 @@
|
||||
|
||||
(use-modules (srfi srfi-1))
|
||||
|
||||
(use-modules (gnucash gnc-module))
|
||||
(gnc:module-load "gnucash/engine" 0)
|
||||
|
||||
;; account summary report
|
||||
;; prints a table of account information with clickable
|
||||
;; links to open the corresponding register window.
|
||||
|
@ -9,6 +9,9 @@
|
||||
|
||||
(define-module (gnucash report hello-world))
|
||||
|
||||
(use-modules (gnucash gnc-module))
|
||||
(gnc:module-load "gnucash/engine" 0)
|
||||
|
||||
;; This function will generate a set of options that GnuCash
|
||||
;; will use to display a dialog where the user can select
|
||||
;; values for your report's parameters.
|
||||
@ -396,7 +399,9 @@ new, totally cool report, consult the mailing list %s.")
|
||||
(gnc:html-markup/format
|
||||
(_ "The number option formatted as currency is %s.")
|
||||
(gnc:html-markup-b
|
||||
(gnc:amount->string num-val (gnc:default-print-info #f)))))))
|
||||
(gnc:amount->string
|
||||
(gnc:make-gnc-numeric (inexact->exact num-val) 1)
|
||||
(gnc:default-print-info #f)))))))
|
||||
|
||||
;; you can add as many objects as you want. Here's another
|
||||
;; one. We'll make a single-column table of the selected list
|
||||
|
@ -36,6 +36,9 @@
|
||||
|
||||
(define-module (gnucash report taxtxf))
|
||||
|
||||
(use-modules (gnucash gnc-module))
|
||||
(gnc:module-load "gnucash/engine" 0)
|
||||
|
||||
(use-modules (srfi srfi-1))
|
||||
(use-modules (ice-9 slib))
|
||||
(require 'printf)
|
||||
|
Loading…
Reference in New Issue
Block a user