r21987 - gnucash/trunk/src/report/business-reports - Update invoice reports to use the new entry value getters.

Geert Janssens gjanssens at code.gnucash.org
Fri Feb 10 10:32:47 EST 2012


Author: gjanssens
Date: 2012-02-10 10:32:47 -0500 (Fri, 10 Feb 2012)
New Revision: 21987
Trac: http://svn.gnucash.org/trac/changeset/21987

Modified:
   gnucash/trunk/src/report/business-reports/easy-invoice.scm
   gnucash/trunk/src/report/business-reports/invoice.scm
Log:
Update invoice reports to use the new entry value getters.

Modified: gnucash/trunk/src/report/business-reports/easy-invoice.scm
===================================================================
--- gnucash/trunk/src/report/business-reports/easy-invoice.scm	2012-02-10 15:32:38 UTC (rev 21986)
+++ gnucash/trunk/src/report/business-reports/easy-invoice.scm	2012-02-10 15:32:47 UTC (rev 21987)
@@ -139,11 +139,11 @@
 	value
 	(gnc-numeric-neg value)))
 
-(define (update-account-hash hash values credit-note?)
+(define (update-account-hash hash values)
   (for-each
    (lambda (item)
      (let* ((acct (car item))
-	    (val (inv-or-cn-value(cdr item) credit-note?))
+	    (val (cdr item))
 	    (ref (hash-ref hash acct)))
 
        (hash-set! hash acct (if ref (gnc-numeric-add-fixed ref val) val))))
@@ -524,8 +524,8 @@
 					      cust-doc? credit-note?)))
 
 	    (if display-all-taxes
-		(let ((tax-list (gncEntryGetIntTaxValues current cust-doc?)))
-		  (update-account-hash acct-hash tax-list credit-note?))
+		(let ((tax-list (gncEntryGetDocTaxValues current cust-doc? credit-note?)))
+		  (update-account-hash acct-hash tax-list))
 		(tax-collector 'add
 			       (gnc:gnc-monetary-commodity (cdr entry-values))
 			       (gnc:gnc-monetary-amount (cdr entry-values))))

Modified: gnucash/trunk/src/report/business-reports/invoice.scm
===================================================================
--- gnucash/trunk/src/report/business-reports/invoice.scm	2012-02-10 15:32:38 UTC (rev 21986)
+++ gnucash/trunk/src/report/business-reports/invoice.scm	2012-02-10 15:32:47 UTC (rev 21987)
@@ -133,11 +133,11 @@
 	value
 	(gnc-numeric-neg value)))
 
-(define (update-account-hash hash values credit-note?)
+(define (update-account-hash hash values)
   (for-each
    (lambda (item)
      (let* ((acct (car item))
-	    (val (inv-or-cn-value(cdr item) credit-note?))
+	    (val (cdr item))
 	    (ref (hash-ref hash acct)))
 
        (hash-set! hash acct (if ref (gnc-numeric-add-fixed ref val) val))))
@@ -165,10 +165,10 @@
   (let* ((row-contents '())
 	 (entry-value (gnc:make-gnc-monetary
 		       currency
-		       (inv-or-cn-value (gncEntryGetIntValue entry #t cust-doc?) credit-note?)))
+		       (gncEntryGetDocValue entry #t cust-doc? credit-note?)))
 	 (entry-tax-value (gnc:make-gnc-monetary
 			   currency
-			   (inv-or-cn-value (gncEntryGetIntTaxValue entry #t cust-doc?) credit-note?))))
+			   (gncEntryGetDocTaxValue entry #t cust-doc? credit-note?))))
 
     (if (date-col column-vector)
         (addto! row-contents
@@ -328,7 +328,7 @@
   (gnc:register-inv-option
    (gnc:make-simple-boolean-option
     (N_ "Display") (N_ "Payments")
-    "tc" (N_ "Display the payments applied to this cust-doc?") #f))
+    "tc" (N_ "Display the payments applied to this invoice?") #f))
 
   (gnc:register-inv-option
    (gnc:make-text-option
@@ -469,7 +469,8 @@
 		   (lambda (split)
 		     (if (not (equal? (xaccSplitGetParent split) txn))
 			 (add-payment-row table used-columns
-					  split total-collector reverse-payments?)))
+					  split total-collector
+					  reverse-payments?)))
 		   splits)))
 
 	    (add-subtotal-row table used-columns total-collector
@@ -491,8 +492,8 @@
 					      cust-doc? credit-note?)))
 
 	    (if display-all-taxes
-		(let ((tax-list (gncEntryGetIntTaxValues current cust-doc?)))
-		  (update-account-hash acct-hash tax-list credit-note?))
+		(let ((tax-list (gncEntryGetDocTaxValues current cust-doc? credit-note?)))
+		  (update-account-hash acct-hash tax-list))
 		(tax-collector 'add
 			       (gnc:gnc-monetary-commodity (cdr entry-values))
 			       (gnc:gnc-monetary-amount (cdr entry-values))))



More information about the gnucash-changes mailing list