r14956 - gnucash/branches/swig-redo/src/business - Automated rename of swig-wrapped functions for the business module:

Chris Shoemaker chris at cvs.gnucash.org
Mon Oct 9 19:52:01 EDT 2006


Author: chris
Date: 2006-10-09 19:51:59 -0400 (Mon, 09 Oct 2006)
New Revision: 14956
Trac: http://svn.gnucash.org/trac/changeset/14956

Modified:
   gnucash/branches/swig-redo/src/business/business-core/business-core.scm
   gnucash/branches/swig-redo/src/business/business-reports/aging.scm
   gnucash/branches/swig-redo/src/business/business-reports/business-reports.scm
   gnucash/branches/swig-redo/src/business/business-reports/easy-invoice.scm
   gnucash/branches/swig-redo/src/business/business-reports/fancy-invoice.scm
   gnucash/branches/swig-redo/src/business/business-reports/invoice.scm
   gnucash/branches/swig-redo/src/business/business-reports/owner-report.scm
   gnucash/branches/swig-redo/src/business/business-utils/business-options.scm
Log:
Automated rename of swig-wrapped functions for the business module:

s/gnc:invoice-lookup /gncInvoiceLookupFlip /g
s/gnc:invoice-get-guid /gncInvoiceReturnGUID /g
s/gnc:invoice-get-owner /gncInvoiceGetOwner /g
s/gnc:invoice-get-id /gncInvoiceGetID /g
s/gnc:invoice-get-book /gncInvoiceGetBook /g
s/gnc:invoice-get-posted-lot /gncInvoiceGetPostedLot /g
s/gnc:invoice-get-posted-txn /gncInvoiceGetPostedTxn /g
s/gnc:invoice-get-currency /gncInvoiceGetCurrency /g
s/gnc:invoice-get-date-posted /gncInvoiceGetDatePosted /g
s/gnc:invoice-get-date-due /gncInvoiceGetDateDue /g
s/gnc:invoice-get-entries /gncInvoiceGetEntries /g
s/gnc:invoice-get-billing-id /gncInvoiceGetBillingID /g
s/gnc:invoice-get-terms /gncInvoiceGetTerms /g
s/gnc:invoice-get-notes /gncInvoiceGetNotes /g
s/gnc:invoice-get-invoice-from-lot /gncInvoiceGetInvoiceFromLot /g
s/gnc:invoice-get-invoice-from-txn /gncInvoiceGetInvoiceFromTxn /g

s/gnc:owner-get-type/gncOwnerGetType/g
s/gnc:owner-get-guid /gncOwnerReturnGUID /g
s/gnc:owner-get-end-owner /gncOwnerGetEndOwner /g
s/gnc:owner-get-name /gncOwnerGetName /g

s/gnc:owner-create /gncOwnerCreate /g
s/gnc:owner-create)/gncOwnerCreate)/g
s/gnc:owner-destroy /gncOwnerDestroy /g
s/gnc:owner-init-customer/gncOwnerInitCustomer/g
s/gnc:owner-init-employee/gncOwnerInitEmployee/g
s/gnc:owner-init-job/gncOwnerInitJob/g
s/gnc:owner-init-vendor/gncOwnerInitVendor/g
s/gnc:owner-get-customer /gncOwnerGetCustomer /g
s/gnc:owner-get-employee /gncOwnerGetEmployee /g
s/gnc:owner-get-job /gncOwnerGetJob /g
s/gnc:owner-get-vendor /gncOwnerGetVendor /g
s/gnc:owner-get-owner-from-list /gncOwnerGetOwnerFromLot /g
s/gnc:owner-copy-into-owner /gncOwnerCopy /g
s/gnc:owner-is-valid? /gncOwnerIsValid /g

s/'gnc-owner-customer/GNC-OWNER-CUSTOMER/g
s/'gnc-owner-vendor/GNC-OWNER-VENDOR/g
s/'gnc-owner-employee/GNC-OWNER-EMPLOYEE/g
s/'gnc-owner-job/GNC-OWNER-JOB/g
s/(gnc-owner-customer)/(eqv? type GNC-OWNER-CUSTOMER)/g
s/(gnc-owner-vendor)/(eqv? type GNC-OWNER-VENDOR)/g
s/(gnc-owner-employee)/(eqv? type GNC-OWNER-EMPLOYEE)/g
s/(gnc-owner-job)/(eqv? type GNC-OWNER-JOB)/g

s/'gnc-amount-type-value/GNC-AMT-TYPE-VALUE/g
s/'gnc-amount-type-percent/GNC-AMT-TYPE-PERCENT/g


s/gnc:taxtable-lookup /gncTaxTableLookupFlip /g
s/gnc:taxtable-get-guid /gncTaxTableReturnGUID /g

s/gnc:vendor-lookup /gncVendorLookupFlip /g
s/gnc:vendor-get-id /gncVendorGetID /g
s/gnc:vendor-get-guid /gncVendorReturnGUID /g
s/gnc:vendor-get-addr /gncVendorGetAddr /g


s/gnc:address-get-addr1 /gncAddressGetAddr1 /g
s/gnc:address-get-addr2 /gncAddressGetAddr2 /g
s/gnc:address-get-addr3 /gncAddressGetAddr3 /g
s/gnc:address-get-addr4 /gncAddressGetAddr4 /g

s/gnc:bill-term-get-description /gncBillTermGetDescription /g

s/gnc:customer-lookup /gncCustomerLookupFlip /g
s/gnc:customer-get-id /gncCustomerGetID /g
s/gnc:customer-get-name /gncCustomerGetName /g
s/gnc:customer-get-addr /gncCustomerGetAddr /g
s/gnc:customer-get-shipaddr /gncCustomerGetShipAddr /g
s/gnc:customer-get-notes /gncCustomerGetNotes /g
s/gnc:customer-get-currency /gncCustomerGetCurrency /g
s/gnc:customer-get-id /gncCustomerGetID /g
s/gnc:customer-get-guid /gncCustomerReturnGUID /g


s/gnc:employee-lookup /gncEmployeeLookupFlip /g
s/gnc:employee-get-id /gncEmployeeGetID /g
s/gnc:employee-get-guid /gncEmployeeReturnGUID /g
s/gnc:employee-get-addr /gncEmployeeGetAddr /g

s/gnc:entry-get-date /gncEntryGetDate /g
s/gnc:entry-get-description /gncEntryGetDescription /g
s/gnc:entry-get-action /gncEntryGetAction /g
s/gnc:entry-get-quantity /gncEntryGetQuantity /g
s/gnc:entry-get-inv-price /gncEntryGetInvPrice /g
s/gnc:entry-get-inv-discount /gncEntryGetInvDiscount /g
s/gnc:entry-get-inv-discount-type /gncEntryGetInvDiscountType /g
s/gnc:entry-get-bill-price /gncEntryGetBillPrice /g
s/gnc:entry-get-inv-taxable /gncEntryGetInvTaxable /g
s/gnc:entry-get-inv-tax-table /gncEntryGetInvTaxTable /g
s/gnc:entry-get-bill-taxable /gncEntryGetBillTaxable /g
s/gnc:entry-get-bill-tax-table /gncEntryGetBillTaxTable /g
s/gnc:entry-get-value /gncEntryReturnValue /g
s/gnc:entry-get-tax-value /gncEntryReturnTaxValue /g
s/gnc:entry-get-discount-value /gncEntryReturnDiscountValue /g
s/gnc:entry-get-tax-values /gncEntryReturnTaxValues /g
s/gnc:entry-get-invoice /gncEntryGetInvoice /g
s/gnc:entry-get-bill /gncEntryGetBill /g
s/gnc:entry-get-Order /gncEntryGetOrder /g

s/gnc:job-lookup /gncJobLookupFlip /g
s/gnc:job-get-guid /gncJobReturnGUID /g
s/gnc:job-get-owner /gncJobGetOwner /g

s/gnc:order-get-reference /gncOrderGetReference /g

s/gnc:url-type-customer/URL-TYPE-CUSTOMER/g
s/gnc:url-type-vendor/URL-TYPE-VENDOR/g
s/gnc:url-type-employee/URL-TYPE-EMPLOYEE/g
s/gnc:url-type-invoice/URL-TYPE-INVOICE/g
s/gnc:url-type-ownerreport/URL-TYPE-OWNERREPORT/g
s/gnc:url-type-job/URL-TYPE-JOB/g




Modified: gnucash/branches/swig-redo/src/business/business-core/business-core.scm
===================================================================
--- gnucash/branches/swig-redo/src/business/business-core/business-core.scm	2006-10-09 23:50:41 UTC (rev 14955)
+++ gnucash/branches/swig-redo/src/business/business-core/business-core.scm	2006-10-09 23:51:59 UTC (rev 14956)
@@ -4,20 +4,20 @@
 (gnc:module-load "gnucash/engine" 0)
 
 (define (gnc:owner-get-address owner)
-  (let ((type (gnc:owner-get-type owner)))
+  (let ((type (gncOwnerGetType owner)))
     (cond
-      ((gnc-owner-customer)
-       (let ((c (gnc:owner-get-customer owner)))
-	 (gnc:customer-get-addr c)))
-      ((gnc-owner-vendor)
-       (let ((v (gnc:owner-get-vendor owner)))
-	 (gnc:vendor-get-addr v)))
-      ((gnc-owner-employee)
-       (let ((e (gnc:owner-get-employee owner)))
-	 (gnc:employee-get-addr e)))
-      ((gnc-owner-job)
+      ((eqv? type GNC-OWNER-CUSTOMER)
+       (let ((c (gncOwnerGetCustomer owner)))
+	 (gncCustomerGetAddr c)))
+      ((eqv? type GNC-OWNER-VENDOR)
+       (let ((v (gncOwnerGetVendor owner)))
+	 (gncVendorGetAddr v)))
+      ((eqv? type GNC-OWNER-EMPLOYEE)
+       (let ((e (gncOwnerGetEmployee owner)))
+	 (gncEmployeeGetAddr e)))
+      ((eqv? type GNC-OWNER-JOB)
        (gnc:owner-get-address (gnc:job-get-owner
-			       (gnc:owner-get-job owner))))
+			       (gncOwnerGetJob owner))))
       (else '()))))
 
 ;
@@ -35,12 +35,12 @@
   (define (just-name name)
     (if name name ""))
 
-  (let ((type (gnc:owner-get-type owner)))
+  (let ((type (gncOwnerGetType owner)))
     (cond
-      ((gnc-owner-job)
+      ((eqv? type GNC-OWNER-JOB)
        (gnc:owner-get-name-dep (gnc:job-get-owner
-				(gnc:owner-get-job owner))))
-      (else (just-name (gnc:owner-get-name owner))))))
+				(gncOwnerGetJob owner))))
+      (else (just-name (gncOwnerGetName owner))))))
 
 (define (gnc:owner-get-address-dep owner)
   (define (add-if-exists lst new)
@@ -54,10 +54,10 @@
      (else (string-append (build-string (cdr lst)) "\n" (car lst)))))
   (let ((lst '())
 	(addr (gnc:owner-get-address owner)))
-    (set! lst (add-if-exists lst (gnc:address-get-addr1 addr)))
-    (set! lst (add-if-exists lst (gnc:address-get-addr2 addr)))
-    (set! lst (add-if-exists lst (gnc:address-get-addr3 addr)))
-    (set! lst (add-if-exists lst (gnc:address-get-addr4 addr)))
+    (set! lst (add-if-exists lst (gncAddressGetAddr1 addr)))
+    (set! lst (add-if-exists lst (gncAddressGetAddr2 addr)))
+    (set! lst (add-if-exists lst (gncAddressGetAddr3 addr)))
+    (set! lst (add-if-exists lst (gncAddressGetAddr4 addr)))
     (build-string lst)))
 
 (define (gnc:owner-get-name-and-address-dep owner)
@@ -68,44 +68,44 @@
 	addr)))
 
 (define (gnc:owner-get-owner-id owner)
-  (let ((type (gnc:owner-get-type owner)))
+  (let ((type (gncOwnerGetType owner)))
     (cond
-      ((gnc-owner-customer)
-       (let ((c (gnc:owner-get-customer owner)))
-	 (gnc:customer-get-id c)))
-      ((gnc-owner-vendor)
-       (let ((v (gnc:owner-get-vendor owner)))
-	 (gnc:vendor-get-id v)))
-      ((gnc-owner-employee)
-       (let ((e (gnc:owner-get-employee owner)))
-	 (gnc:employee-get-id e)))
-      ((gnc-owner-job)
-       (gnc:owner-get-owner-id (gnc:job-get-owner (gnc:owner-get-job owner))))
+      ((eqv? type GNC-OWNER-CUSTOMER)
+       (let ((c (gncOwnerGetCustomer owner)))
+	 (gncCustomerGetID c)))
+      ((eqv? type GNC-OWNER-VENDOR)
+       (let ((v (gncOwnerGetVendor owner)))
+	 (gncVendorGetID v)))
+      ((eqv? type GNC-OWNER-EMPLOYEE)
+       (let ((e (gncOwnerGetEmployee owner)))
+	 (gncEmployeeGetID e)))
+      ((eqv? type GNC-OWNER-JOB)
+       (gnc:owner-get-owner-id (gncJobGetOwner (gncOwnerGetJob owner))))
       (else ""))))
 
 (define (gnc:entry-type-percent-p type-val)
   (let ((type type-val))
-    (equal? type 'gnc-amount-type-percent)))
+    (equal? type GNC-AMT-TYPE-PERCENT)))
 
 (define (gnc:owner-from-split split result-owner)
   (let* ((trans (gnc:split-get-parent split))
-	 (invoice (gnc:invoice-get-invoice-from-txn trans))
-	 (temp-owner (gnc:owner-create))
+	 (invoice (gncInvoiceGetInvoiceFromTxn trans))
+	 (temp-owner (gncOwnerCreate))
 	 (owner #f))
 
     (if invoice
-	(set! owner (gnc:invoice-get-owner invoice))
+	(set! owner (gncInvoiceGetOwner invoice))
 	(let ((split-list (gnc:transaction-get-splits trans)))
 	  (define (check-splits splits)
 	    (if (and splits (not (null? splits)))
 		(let* ((split (car splits))
 		       (lot (gnc:split-get-lot split)))
 		  (if lot
-		      (let* ((invoice (gnc:invoice-get-invoice-from-lot lot))
+		      (let* ((invoice (gncInvoiceGetInvoiceFromLot lot))
 			     (owner? (gnc:owner-get-owner-from-lot
 				      lot temp-owner)))
 			(if invoice
-			    (set! owner (gnc:invoice-get-owner invoice))
+			    (set! owner (gncInvoiceGetOwner invoice))
 			    (if owner?
 				(set! owner temp-owner)
 				(check-splits (cdr splits)))))
@@ -114,12 +114,12 @@
 
     (if owner
 	(begin
-	  (gnc:owner-copy-into-owner (gnc:owner-get-end-owner owner) result-owner)
-	  (gnc:owner-destroy temp-owner)
+	  (gncOwnerCopy (gncOwnerGetEndOwner owner) result-owner)
+	  (gncOwnerDestroy temp-owner)
 	  result-owner)
 	(begin
-	  (gnc:owner-destroy temp-owner)
-	  #f))))
+	  (gncOwnerDestroy temp-owner)
+	  #f)))) ;; FIXME!
 
 
 (export gnc:owner-get-address)

Modified: gnucash/branches/swig-redo/src/business/business-reports/aging.scm
===================================================================
--- gnucash/branches/swig-redo/src/business/business-reports/aging.scm	2006-10-09 23:50:41 UTC (rev 14955)
+++ gnucash/branches/swig-redo/src/business/business-reports/aging.scm	2006-10-09 23:51:59 UTC (rev 14956)
@@ -180,12 +180,12 @@
 
   (define (do-update value)
     (let* ((transaction (gnc:split-get-parent split))
-	   (temp-owner (gnc:owner-create))
+	   (temp-owner (gncOwnerCreate))
 	   (owner (gnc:owner-from-split split temp-owner)))
 
       (if
        owner
-       (let* ((guid (gnc:owner-get-guid owner))
+       (let* ((guid (gncOwnerReturnGUID owner))
 	      (this-currency (gnc:transaction-get-currency transaction))
 	      (this-date (gnc:transaction-get-date-posted transaction))
 	      (company-info (hash-ref hash guid)))
@@ -198,13 +198,13 @@
 	     ;; if it's an existing company, destroy the temp owner and
 	     ;; then make sure the currencies match
 	     (begin
-	       (gnc:owner-destroy temp-owner)
+	       (gncOwnerDestroy temp-owner)
 	       (if (not (gnc:commodity-equiv?
 			 this-currency
 			 (company-get-currency company-info)))
 		   (cons #f (sprintf
 			     (_ "Transactions relating to '%s' contain \
-more than one currency.  This report is not designed to cope with this possibility.")  (gnc:owner-get-name owner)))
+more than one currency.  This report is not designed to cope with this possibility.")  (gncOwnerGetName owner)))
 		   (begin
 		     (gnc:debug "it's an old company")
 		     (if (gnc:numeric-negative-p value)
@@ -223,7 +223,7 @@
 		 (hash-set! hash guid new-company))
 	       (cons #t guid))))
        ; else (no owner)
-       (gnc:owner-destroy temp-owner))))
+       (gncOwnerDestroy temp-owner))))
   
   ;; figure out if this split is part of a closed lot
   ;; also save the split value...
@@ -386,7 +386,7 @@
 
   (define (get-name a)
     (let* ((owner (company-get-owner-obj (cdr a))))
-      (gnc:owner-get-name owner)))
+      (gncOwnerGetName owner)))
 
   ;; Predicates for sorting the companys once the data has been collected
 
@@ -602,7 +602,7 @@
 						(cdr company-list-entry))))
 			       (owner (company-get-owner-obj
 				       (cdr company-list-entry)))
-			       (company-name (gnc:owner-get-name owner)))
+			       (company-name (gncOwnerGetName owner)))
 
 			  (add-to-column-totals total-collector-list
 						monetary-list)
@@ -627,7 +627,7 @@
 				    (gnc:owner-anchor-text owner)
 				    company-name))
 				  monetary-list))
-			  (gnc:owner-destroy owner)))			
+			  (gncOwnerDestroy owner)))
 		      company-list)
 
 	    ;; add the totals

Modified: gnucash/branches/swig-redo/src/business/business-reports/business-reports.scm
===================================================================
--- gnucash/branches/swig-redo/src/business/business-reports/business-reports.scm	2006-10-09 23:50:41 UTC (rev 14955)
+++ gnucash/branches/swig-redo/src/business/business-reports/business-reports.scm	2006-10-09 23:51:59 UTC (rev 14956)
@@ -28,7 +28,7 @@
 (gnc:module-load "gnucash/report/standard-reports" 0)
 (gnc:module-load "gnucash/business-utils" 0)
 
-;; this defines gnc:url-type-ownerreport and pulls in gnome-utils
+;; this defines URL-TYPE-OWNERREPORT and pulls in gnome-utils
 ;; to define gnc:html-build-url
 (gnc:module-load "gnucash/business-gnome" 0)
 
@@ -38,62 +38,62 @@
   (gnc:html-build-url type (string-append idstr guid) #f))
 
 (define (gnc:customer-anchor-text customer)
-  (guid-ref "customer=" gnc:url-type-customer (gnc:customer-get-guid customer)))
+  (guid-ref "customer=" URL-TYPE-CUSTOMER (gncCustomerReturnGUID customer)))
 
 (define (gnc:job-anchor-text job)
-  (guid-ref "job=" gnc:url-type-job (gnc:job-get-guid job)))
+  (guid-ref "job=" URL-TYPE-JOB (gncJobReturnGUID job)))
 
 (define (gnc:vendor-anchor-text vendor)
-  (guid-ref "vendor=" gnc:url-type-vendor (gnc:vendor-get-guid vendor)))
+  (guid-ref "vendor=" URL-TYPE-VENDOR (gncVendorReturnGUID vendor)))
 
 (define (gnc:employee-anchor-text employee)
-  (guid-ref "employee=" gnc:url-type-employee (gnc:employee-get-guid employee)))
+  (guid-ref "employee=" URL-TYPE-EMPLOYEE (gncEmployeeReturnGUID employee)))
 
 (define (gnc:invoice-anchor-text invoice)
-  (guid-ref "invoice=" gnc:url-type-invoice (gnc:invoice-get-guid invoice)))
+  (guid-ref "invoice=" URL-TYPE-INVOICE (gncInvoiceReturnGUID invoice)))
 
 (define (gnc:owner-anchor-text owner)
-  (let ((type (gnc:owner-get-type (gnc:owner-get-end-owner owner))))
+  (let ((type (gncOwnerGetType (gncOwnerGetEndOwner owner))))
     (cond
-      ((gnc-owner-customer)
-       (gnc:customer-anchor-text (gnc:owner-get-customer owner)))
+      ((eqv? type GNC-OWNER-CUSTOMER)
+       (gnc:customer-anchor-text (gncOwnerGetCustomer owner)))
 
-      ((gnc-owner-vendor)
-       (gnc:vendor-anchor-text (gnc:owner-get-vendor owner)))
+      ((eqv? type GNC-OWNER-VENDOR)
+       (gnc:vendor-anchor-text (gncOwnerGetVendor owner)))
 
-      ((gnc-owner-employee)
-       (gnc:employee-anchor-text (gnc:owner-get-employee owner)))
+      ((eqv? type GNC-OWNER-EMPLOYEE)
+       (gnc:employee-anchor-text (gncOwnerGetEmployee owner)))
 
-      ((gnc-owner-job)
-       (gnc:job-anchor-text (gnc:owner-get-job owner)))
+      ((eqv? type GNC-OWNER-JOB)
+       (gnc:job-anchor-text (gncOwnerGetJob owner)))
 
       (else
        ""))))
 
 (define (gnc:owner-report-text owner acc)
-  (let* ((end-owner (gnc:owner-get-end-owner owner))
-	 (type (gnc:owner-get-type end-owner))
+  (let* ((end-owner (gncOwnerGetEndOwner owner))
+	 (type (gncOwnerGetType end-owner))
 	 (ref #f))
 
     (cond
-      ((gnc-owner-customer)
+      ((eqv? type GNC-OWNER-CUSTOMER)
        (set! ref "owner=c:"))
 
-      ((gnc-owner-vendor)
+      ((eqv? type GNC-OWNER-VENDOR)
        (set! ref "owner=v:"))
 
-      ((gnc-owner-employee)
+      ((eqv? type GNC-OWNER-EMPLOYEE)
        (set! ref "owner=e:"))
 
       (else (set! ref "unknown-type=")))
 
     (if ref
 	(begin
-	  (set! ref (string-append ref (gnc:owner-get-guid end-owner)))
+	  (set! ref (string-append ref (gncOwnerReturnGUID end-owner)))
 	  (if acc
 	      (set! ref (string-append ref "&acct="
 				       (gnc:account-get-guid acc))))
-	  (gnc:html-build-url gnc:url-type-ownerreport ref #f))
+	  (gnc:html-build-url URL-TYPE-OWNERREPORT ref #f))
 	ref)))
 
 (export gnc:menuname-business-reports)

Modified: gnucash/branches/swig-redo/src/business/business-reports/easy-invoice.scm
===================================================================
--- gnucash/branches/swig-redo/src/business/business-reports/easy-invoice.scm	2006-10-09 23:50:41 UTC (rev 14955)
+++ gnucash/branches/swig-redo/src/business/business-reports/easy-invoice.scm	2006-10-09 23:51:59 UTC (rev 14956)
@@ -167,54 +167,54 @@
   (let* ((row-contents '())
 	 (entry-value (gnc:make-gnc-monetary
 		       currency
-		       (gnc:entry-get-value entry invoice?)))
+		       (gncEntryReturnValue entry invoice?)))
 	 (entry-tax-value (gnc:make-gnc-monetary
 			   currency
-			   (gnc:entry-get-tax-value entry invoice?))))
+			   (gncEntryReturnTaxValue entry invoice?))))
 
     (if (date-col column-vector)
         (addto! row-contents
-                (gnc:print-date (gnc:entry-get-date entry))))
+                (gnc:print-date (gncEntryGetDate entry))))
 
     (if (description-col column-vector)
         (addto! row-contents
-		(gnc:entry-get-description entry)))
+		(gncEntryGetDescription entry)))
 
     (if (action-col column-vector)
         (addto! row-contents
-		(gnc:entry-get-action entry)))
+		(gncEntryGetAction entry)))
 
     (if (quantity-col column-vector)
 	(addto! row-contents
 		(gnc:make-html-table-cell/markup
 		 "number-cell"
-		 (gnc:entry-get-quantity entry))))
+		 (gncEntryGetQuantity entry))))
 
     (if (price-col column-vector)
 	(addto! row-contents
 		(gnc:make-html-table-cell/markup
 		 "number-cell"
 		 (gnc:make-gnc-monetary
-		  currency (if invoice? (gnc:entry-get-inv-price entry)
-			       (gnc:entry-get-bill-price entry))))))
+		  currency (if invoice? (gncEntryGetInvPrice entry)
+			       (gncEntryGetBillPrice entry))))))
 
     (if (discount-col column-vector)
 	(addto! row-contents
 		(if invoice?
 		    (gnc:make-html-table-cell/markup
 		     "number-cell"
-		     (monetary-or-percent (gnc:entry-get-inv-discount entry)
+		     (monetary-or-percent (gncEntryGetInvDiscount entry)
 					  currency
-					  (gnc:entry-get-inv-discount-type entry)))
+					  (gncEntryGetInvDiscountType entry)))
 		    "")))
 
     (if (tax-col column-vector)
 	(addto! row-contents
 		(if (if invoice?
-			(and (gnc:entry-get-inv-taxable entry)
-			     (gnc:entry-get-inv-tax-table entry))
-			(and (gnc:entry-get-bill-taxable entry)
-			     (gnc:entry-get-bill-tax-table entry)))
+			(and (gncEntryGetInvTaxable entry)
+			     (gncEntryGetInvTaxTable entry))
+			(and (gncEntryGetBillTaxable entry)
+			     (gncEntryGetBillTaxTable entry)))
 		    ;; This "T" is supposed to be an abbrev. for Tax?
 		    (_ "T") "")))
 
@@ -376,9 +376,9 @@
 
   (let ((show-payments (opt-val "Display" "Payments"))
 	(display-all-taxes (opt-val "Display" "Individual Taxes"))
-	(lot (gnc:invoice-get-posted-lot invoice))
-	(txn (gnc:invoice-get-posted-txn invoice))
-	(currency (gnc:invoice-get-currency invoice)))
+	(lot (gncInvoiceGetPostedLot invoice))
+	(txn (gncInvoiceGetPostedTxn invoice))
+	(currency (gncInvoiceGetCurrency invoice)))
 
     (define (colspan monetary used-columns)
       (cond
@@ -506,7 +506,7 @@
 					      invoice?)))
 
 	    (if display-all-taxes
-		(let ((tax-list (gnc:entry-get-tax-values current invoice?)))
+		(let ((tax-list (gncEntryReturnTaxValues current invoice?)))
 		  (update-account-hash acct-hash tax-list))
 		(tax-collector 'add
 			       (gnc:gnc-monetary-commodity (cdr entry-values))
@@ -539,7 +539,7 @@
     (let* ((table (gnc:make-html-table))
 	   (used-columns (build-column-used options))
 	   (width (num-columns-required used-columns))
-	   (entries (gnc:invoice-get-entries invoice))
+	   (entries (gncInvoiceGetEntries invoice))
 	   (totals (gnc:make-commodity-collector)))
 
       (gnc:html-table-set-col-headers!
@@ -591,7 +591,7 @@
      (list "<br>"))
     (for-each
      (lambda (order)
-       (let* ((reference (gnc:order-get-reference order)))
+       (let* ((reference (gncOrderGetReference order)))
 	 (if (and reference (> (string-length reference) 0))
 	     (gnc:html-table-append-row!
 	      table
@@ -674,7 +674,7 @@
 	 (table '())
 	 (orders '())
 	 (invoice (opt-val invoice-page invoice-name))
-	 (owner #f)
+	 (owner '())
 	 (references? (opt-val "Display" "References"))
 	 (title (_ "Invoice"))
 	 (invoice? #f))
@@ -685,18 +685,18 @@
 
     (if invoice
 	(begin
-	  (set! owner (gnc:invoice-get-owner invoice))
-	  (let ((type (gnc:owner-get-type
-			(gnc:owner-get-end-owner owner))))
+	  (set! owner (gncInvoiceGetOwner invoice))
+	  (let ((type (gncOwnerGetType
+			(gncOwnerGetEndOwner owner))))
 	    (cond
-	      ((gnc-owner-customer)
+	      ((eqv? type GNC-OWNER-CUSTOMER)
 	       (set! invoice? #t))
-	      ((gnc-owner-vendor)
+	      ((eqv? type GNC-OWNER-VENDOR)
 	       (set! title (_ "Bill")))
-	      ((gnc-owner-employee)
+	      ((eqv? type GNC-OWNER-EMPLOYEE)
 	       (set! title (_ "Expense Voucher")))))
 	  (set! title (sprintf #f (_"%s #%d") title
-			       (gnc:invoice-get-id invoice)))))
+			       (gncInvoiceGetID invoice)))))
 
 ;    (gnc:html-document-set-title! document title)
 
@@ -714,12 +714,12 @@
         (add-html! document "<td align='left'>")
         (add-html! document "<b><u>")
 	(add-html! document (sprintf #f (_ "Invoice #%d")
-				     (gnc:invoice-get-id invoice)))
+				     (gncInvoiceGetID invoice)))
         (add-html! document "</u></b></td>")
         (add-html! document "<td align='right'>")
 
         (if (opt-val "Display" "My Company ID")
-          (let* ((book (gnc:invoice-get-book invoice))
+          (let* ((book (gncInvoiceGetBook invoice))
                  (slots (gnc:book-get-slots book))
 	         (taxid (gnc:kvp-frame-get-slot-path
 		    slots (append gnc:*kvp-option-path*
@@ -737,7 +737,7 @@
         (make-break! document)
 
         ; add the client and company name table
-	(let ((book (gnc:invoice-get-book invoice)))
+	(let ((book (gncInvoiceGetBook invoice)))
 	  (set! table (make-entry-table invoice
 					(gnc:report-options report-obj)
 					add-order invoice?))
@@ -759,9 +759,8 @@
         )
 
         ; add the date
-        (let ((date-table #f)
-              (post-date (gnc:invoice-get-date-posted invoice))
-              (due-date (gnc:invoice-get-date-due invoice)))
+        (let ((post-date (gncInvoiceGetDatePosted invoice))
+              (due-date (gncInvoiceGetDateDue invoice)))
           (if (not (equal? post-date (cons 0 0)))
             (begin
               (add-html! document "<table border=0><tr>")
@@ -790,7 +789,7 @@
         (make-break! document)
 
         (if (opt-val "Display" "Billing ID")
-          (let ((billing-id (gnc:invoice-get-billing-id invoice)))
+          (let ((billing-id (gncInvoiceGetBillingID invoice)))
             (if (and billing-id (> (string-length billing-id) 0))
               (begin
                 (gnc:html-document-add-object!
@@ -802,8 +801,8 @@
                 (make-break! document)))))
 
         (if (opt-val "Display" "Billing Terms")
-          (let* ((term (gnc:invoice-get-terms invoice))
-            (terms (gnc:bill-term-get-description term)))
+          (let* ((term (gncInvoiceGetTerms invoice))
+            (terms (gncBillTermGetDescription term)))
             (if (and terms (> (string-length terms) 0))
               (gnc:html-document-add-object!
                 document
@@ -828,7 +827,7 @@
 
 	(if (opt-val "Display" "Invoice Notes")
           (begin
-            (let ((notes (gnc:invoice-get-notes invoice)))
+            (let ((notes (gncInvoiceGetNotes invoice)))
               (gnc:html-document-add-object!
                document
                (gnc:make-html-text

Modified: gnucash/branches/swig-redo/src/business/business-reports/fancy-invoice.scm
===================================================================
--- gnucash/branches/swig-redo/src/business/business-reports/fancy-invoice.scm	2006-10-09 23:50:41 UTC (rev 14955)
+++ gnucash/branches/swig-redo/src/business/business-reports/fancy-invoice.scm	2006-10-09 23:51:59 UTC (rev 14956)
@@ -173,54 +173,54 @@
   (let* ((row-contents '())
 	 (entry-value (gnc:make-gnc-monetary
 		       currency
-		       (gnc:entry-get-value entry invoice?)))
+		       (gncEntryReturnValue entry invoice?)))
 	 (entry-tax-value (gnc:make-gnc-monetary
 			   currency
-			   (gnc:entry-get-tax-value entry invoice?))))
+			   (gncEntryReturnTaxValue entry invoice?))))
 
     (if (date-col column-vector)
         (addto! row-contents
-                (gnc:print-date (gnc:entry-get-date entry))))
+                (gnc:print-date (gncEntryGetDate entry))))
 
     (if (description-col column-vector)
         (addto! row-contents
-		(gnc:entry-get-description entry)))
+		(gncEntryGetDescription entry)))
 
     (if (action-col column-vector)
         (addto! row-contents
-		(gnc:entry-get-action entry)))
+		(gncEntryGetAction entry)))
 
     (if (quantity-col column-vector)
 	(addto! row-contents
 		(gnc:make-html-table-cell/markup
 		 "number-cell"
-		 (gnc:entry-get-quantity entry))))
+		 (gncEntryGetQuantity entry))))
 
     (if (price-col column-vector)
 	(addto! row-contents
 		(gnc:make-html-table-cell/markup
 		 "number-cell"
 		 (gnc:make-gnc-monetary
-		  currency (if invoice? (gnc:entry-get-inv-price entry)
-			       (gnc:entry-get-bill-price entry))))))
+		  currency (if invoice? (gncEntryGetInvPrice entry)
+			       (gncEntryGetBillPrice entry))))))
 
     (if (discount-col column-vector)
 	(addto! row-contents
 		(if invoice?
 		    (gnc:make-html-table-cell/markup
 		     "number-cell"
-		     (monetary-or-percent (gnc:entry-get-inv-discount entry)
+		     (monetary-or-percent (gncEntryGetInvDiscount entry)
 					  currency
-					  (gnc:entry-get-inv-discount-type entry)))
+					  (gncEntryGetInvDiscountType entry)))
 		    "")))
 
     (if (tax-col column-vector)
 	(addto! row-contents
 		(if (if invoice?
-			(and (gnc:entry-get-inv-taxable entry)
-			     (gnc:entry-get-inv-tax-table entry))
-			(and (gnc:entry-get-bill-taxable entry)
-			     (gnc:entry-get-bill-tax-table entry)))
+			(and (gncEntryGetInvTaxable entry)
+			     (gncEntryGetInvTaxTable entry))
+			(and (gncEntryGetBillTaxable entry)
+			     (gncEntryGetBillTaxTable entry)))
 		    (_ "T") "")))
 
     (if (taxvalue-col column-vector)
@@ -389,9 +389,9 @@
 
   (let ((show-payments (opt-val "Display" "Payments"))
 	(display-all-taxes (opt-val "Display" "Individual Taxes"))
-	(lot (gnc:invoice-get-posted-lot invoice))
-	(txn (gnc:invoice-get-posted-txn invoice))
-	(currency (gnc:invoice-get-currency invoice))
+	(lot (gncInvoiceGetPostedLot invoice))
+	(txn (gncInvoiceGetPostedTxn invoice))
+	(currency (gncInvoiceGetCurrency invoice))
 	(entries-added 0))
 
     (define (colspan monetary used-columns)
@@ -534,7 +534,7 @@
 					      invoice?)))
 
 	    (if display-all-taxes
-		(let ((tax-list (gnc:entry-get-tax-values current invoice?)))
+		(let ((tax-list (gncEntryReturnTaxValues current invoice?)))
 		  (update-account-hash acct-hash tax-list))
 		(tax-collector 'add
 			       (gnc:gnc-monetary-commodity (cdr entry-values))
@@ -569,7 +569,7 @@
     (let* ((table (gnc:make-html-table))
 	   (used-columns (build-column-used options))
 	   (width (num-columns-required used-columns))
-	   (entries (gnc:invoice-get-entries invoice))
+	   (entries (gncInvoiceGetEntries invoice))
 	   (totals (gnc:make-commodity-collector)))
 
       (gnc:html-table-set-col-headers!
@@ -628,7 +628,7 @@
      (list "<br>"))
     (for-each
      (lambda (order)
-       (let* ((reference (gnc:order-get-reference order)))
+       (let* ((reference (gncOrderGetReference order)))
 	 (if (and reference (> (string-length reference) 0))
 	     (gnc:html-table-append-row!
 	      table
@@ -757,7 +757,7 @@
 	 (table '())
 	 (orders '())
 	 (invoice (opt-val invoice-page invoice-name))
-	 (owner #f)
+	 (owner '())
 	 (references? (opt-val "Display" "References"))
 	 (title (_ "Invoice"))
 	 (invoice? #f))
@@ -768,24 +768,24 @@
 
     (if invoice
 	(begin
-	  (set! owner (gnc:invoice-get-owner invoice))
-	  (let ((type (gnc:owner-get-type
-                       (gnc:owner-get-end-owner owner))))
+	  (set! owner (gncInvoiceGetOwner invoice))
+	  (let ((type (gncOwnerGetType
+                       (gncOwnerGetEndOwner owner))))
 	    (cond
-	      ((gnc-owner-customer)
+	      ((eqv? type GNC-OWNER-CUSTOMER)
 	       (set! invoice? #t))
-	      ((gnc-owner-vendor)
+	      ((eqv? type GNC-OWNER-VENDOR)
 	       (set! title (_ "Bill")))
-	      ((gnc-owner-employee)
+	      ((eqv? type GNC-OWNER-EMPLOYEE)
 	       (set! title (_ "Expense Voucher")))))
 	  (set! title (sprintf #f (_"%s #%d") title
-			       (gnc:invoice-get-id invoice)))))
+			       (gncInvoiceGetID invoice)))))
     ;; oli-custom - title redundant, "Invoice" moved to myname-table,
     ;; invoice number moved below
     ;;(gnc:html-document-set-title! document title)
 
     (if invoice
-	(let* ((book (gnc:invoice-get-book invoice))
+	(let* ((book (gncInvoiceGetBook invoice))
 	      (slots (gnc:book-get-slots book))
 	      (date-object #f)
 	      (helper-table (gnc:make-html-table)))
@@ -834,8 +834,8 @@
 	   'attribute (list "width" "100%"))
 
 	  (set! date-object (let ((date-table #f)
-		(post-date (gnc:invoice-get-date-posted invoice))
-		(due-date (gnc:invoice-get-date-due invoice)))
+		(post-date (gncInvoiceGetDatePosted invoice))
+		(due-date (gncInvoiceGetDateDue invoice)))
 
 	    (if (not (equal? post-date (cons 0 0)))
 		(begin
@@ -843,7 +843,7 @@
 		  ;; oli-custom - moved invoice number here
 		  (gnc:html-table-append-row!
 		   date-table (list (sprintf #f (_ "Invoice&nbsp;#&nbsp;%d")
-                                             (gnc:invoice-get-id invoice))))
+                                             (gncInvoiceGetID invoice))))
 		  (make-date-row! date-table (_ "Invoice&nbsp;Date") post-date)
 		  (make-date-row! date-table (_ "Due&nbsp;Date") due-date)
 		  date-table)
@@ -875,7 +875,7 @@
 	  (make-break! document)
 
 	  (if (opt-val "Display" "Billing ID")
-	      (let ((billing-id (gnc:invoice-get-billing-id invoice)))
+	      (let ((billing-id (gncInvoiceGetBillingID invoice)))
 		(if (and billing-id (> (string-length billing-id) 0))
 		    (begin
 		      (gnc:html-document-add-object!
@@ -887,8 +887,8 @@
 		      (make-break! document)))))
 
 	  (if (opt-val "Display" "Billing Terms")
-	      (let* ((term (gnc:invoice-get-terms invoice))
-		     (terms (gnc:bill-term-get-description term)))
+	      (let* ((term (gncInvoiceGetTerms invoice))
+		     (terms (gncBillTermGetDescription term)))
 		(if (and terms (> (string-length terms) 0))
 		    (gnc:html-document-add-object!
 		     document
@@ -905,7 +905,7 @@
 	  (make-break! document)
 
 	  (if (opt-val "Display" "Invoice Notes")
-	      (let ((notes (gnc:invoice-get-notes invoice)))
+	      (let ((notes (gncInvoiceGetNotes invoice)))
 		(gnc:html-document-add-object!
 		 document
 		 (gnc:make-html-text

Modified: gnucash/branches/swig-redo/src/business/business-reports/invoice.scm
===================================================================
--- gnucash/branches/swig-redo/src/business/business-reports/invoice.scm	2006-10-09 23:50:41 UTC (rev 14955)
+++ gnucash/branches/swig-redo/src/business/business-reports/invoice.scm	2006-10-09 23:51:59 UTC (rev 14956)
@@ -161,54 +161,54 @@
   (let* ((row-contents '())
 	 (entry-value (gnc:make-gnc-monetary
 		       currency
-		       (gnc:entry-get-value entry invoice?)))
+		       (gncEntryReturnValue entry invoice?)))
 	 (entry-tax-value (gnc:make-gnc-monetary
 			   currency
-			   (gnc:entry-get-tax-value entry invoice?))))
+			   (gncEntryReturnTaxValue entry invoice?))))
 
     (if (date-col column-vector)
         (addto! row-contents
-                (gnc:print-date (gnc:entry-get-date entry))))
+                (gnc:print-date (gncEntryGetDate entry))))
 
     (if (description-col column-vector)
         (addto! row-contents
-		(gnc:entry-get-description entry)))
+		(gncEntryGetDescription entry)))
 
     (if (action-col column-vector)
         (addto! row-contents
-		(gnc:entry-get-action entry)))
+		(gncEntryGetAction entry)))
 
     (if (quantity-col column-vector)
 	(addto! row-contents
 		(gnc:make-html-table-cell/markup
 		 "number-cell"
-		 (gnc:entry-get-quantity entry))))
+		 (gncEntryGetQuantity entry))))
 
     (if (price-col column-vector)
 	(addto! row-contents
 		(gnc:make-html-table-cell/markup
 		 "number-cell"
 		 (gnc:make-gnc-monetary
-		  currency (if invoice? (gnc:entry-get-inv-price entry)
-			       (gnc:entry-get-bill-price entry))))))
+		  currency (if invoice? (gncEntryGetInvPrice entry)
+			       (gncEntryGetBillPrice entry))))))
 
     (if (discount-col column-vector)
 	(addto! row-contents
 		(if invoice?
 		    (gnc:make-html-table-cell/markup
 		     "number-cell"
-		     (monetary-or-percent (gnc:entry-get-inv-discount entry)
+		     (monetary-or-percent (gncEntryGetInvDiscount entry)
 					  currency
-					  (gnc:entry-get-inv-discount-type entry)))
+					  (gncEntryGetInvDiscountType entry)))
 		    "")))
 
     (if (tax-col column-vector)
 	(addto! row-contents
 		(if (if invoice?
-			(and (gnc:entry-get-inv-taxable entry)
-			     (gnc:entry-get-inv-tax-table entry))
-			(and (gnc:entry-get-bill-taxable entry)
-			     (gnc:entry-get-bill-tax-table entry)))
+			(and (gncEntryGetInvTaxable entry)
+			     (gncEntryGetInvTaxTable entry))
+			(and (gncEntryGetBillTaxable entry)
+			     (gncEntryGetBillTaxTable entry)))
 		    (_ "T") "")))
 
     (if (taxvalue-col column-vector)
@@ -342,9 +342,9 @@
 
   (let ((show-payments (opt-val "Display" "Payments"))
 	(display-all-taxes (opt-val "Display" "Individual Taxes"))
-	(lot (gnc:invoice-get-posted-lot invoice))
-	(txn (gnc:invoice-get-posted-txn invoice))
-	(currency (gnc:invoice-get-currency invoice)))
+	(lot (gncInvoiceGetPostedLot invoice))
+	(txn (gncInvoiceGetPostedTxn invoice))
+	(currency (gncInvoiceGetCurrency invoice)))
 
     (define (colspan monetary used-columns)
       (cond
@@ -470,7 +470,7 @@
 					      invoice?)))
 
 	    (if display-all-taxes
-		(let ((tax-list (gnc:entry-get-tax-values current invoice?)))
+		(let ((tax-list (gncEntryReturnTaxValues current invoice?)))
 		  (update-account-hash acct-hash tax-list))
 		(tax-collector 'add
 			       (gnc:gnc-monetary-commodity (cdr entry-values))
@@ -503,7 +503,7 @@
     (let* ((table (gnc:make-html-table))
 	   (used-columns (build-column-used options))
 	   (width (num-columns-required used-columns))
-	   (entries (gnc:invoice-get-entries invoice))
+	   (entries (gncInvoiceGetEntries invoice))
 	   (totals (gnc:make-commodity-collector)))
 
       (gnc:html-table-set-col-headers!
@@ -555,7 +555,7 @@
      (list "<br>"))
     (for-each
      (lambda (order)
-       (let* ((reference (gnc:order-get-reference order)))
+       (let* ((reference (gncOrderGetReference order)))
 	 (if (and reference (> (string-length reference) 0))
 	     (gnc:html-table-append-row!
 	      table
@@ -627,7 +627,7 @@
 	 (table '())
 	 (orders '())
 	 (invoice (opt-val invoice-page invoice-name))
-	 (owner #f)
+	 (owner '())
 	 (references? (opt-val "Display" "References"))
 	 (title (_ "Invoice"))
 	 (invoice? #f))
@@ -638,23 +638,23 @@
 
     (if invoice
 	(begin
-	  (set! owner (gnc:invoice-get-owner invoice))
-	  (let ((type (gnc:owner-get-type
-                       (gnc:owner-get-end-owner owner))))
+	  (set! owner (gncInvoiceGetOwner invoice))
+	  (let ((type (gncOwnerGetType
+                       (gncOwnerGetEndOwner owner))))
 	    (cond
-	      ((gnc-owner-customer)
+	      ((eqv? type GNC-OWNER-CUSTOMER)
 	       (set! invoice? #t))
-	      ((gnc-owner-vendor)
+	      ((eqv? type GNC-OWNER-VENDOR)
 	       (set! title (_ "Bill")))
-	      ((gnc-owner-employee)
+	      ((eqv? type GNC-OWNER-EMPLOYEE)
 	       (set! title (_ "Expense Voucher")))))
 	  (set! title (sprintf #f (_"%s #%d") title
-			       (gnc:invoice-get-id invoice)))))
+			       (gncInvoiceGetID invoice)))))
 
     (gnc:html-document-set-title! document title)
 
     (if invoice
-	(let ((book (gnc:invoice-get-book invoice)))
+	(let ((book (gncInvoiceGetBook invoice)))
 	  (set! table (make-entry-table invoice
 					(gnc:report-options report-obj)
 					add-order invoice?))
@@ -670,8 +670,8 @@
 	   (make-myname-table book (opt-val "Display" "Today Date Format")))
 
 	  (let ((date-table #f)
-		(post-date (gnc:invoice-get-date-posted invoice))
-		(due-date (gnc:invoice-get-date-due invoice)))
+		(post-date (gncInvoiceGetDatePosted invoice))
+		(due-date (gncInvoiceGetDateDue invoice)))
 
 	    (if (not (equal? post-date (cons 0 0)))
 		(begin
@@ -695,7 +695,7 @@
 	  (make-break! document)
 
 	  (if (opt-val "Display" "Billing ID")
-	      (let ((billing-id (gnc:invoice-get-billing-id invoice)))
+	      (let ((billing-id (gncInvoiceGetBillingID invoice)))
 		(if (and billing-id (> (string-length billing-id) 0))
 		    (begin
 		      (gnc:html-document-add-object!
@@ -707,8 +707,8 @@
 		      (make-break! document)))))
 
 	  (if (opt-val "Display" "Billing Terms")
-	      (let* ((term (gnc:invoice-get-terms invoice))
-		     (terms (gnc:bill-term-get-description term)))
+	      (let* ((term (gncInvoiceGetTerms invoice))
+		     (terms (gncBillTermGetDescription term)))
 		(if (and terms (> (string-length terms) 0))
 		    (gnc:html-document-add-object!
 		     document
@@ -725,7 +725,7 @@
 	  (make-break! document)
 
 	  (if (opt-val "Display" "Invoice Notes")
-	      (let ((notes (gnc:invoice-get-notes invoice)))
+	      (let ((notes (gncInvoiceGetNotes invoice)))
 		(gnc:html-document-add-object!
 		 document
 		 (gnc:make-html-text

Modified: gnucash/branches/swig-redo/src/business/business-reports/owner-report.scm
===================================================================
--- gnucash/branches/swig-redo/src/business/business-reports/owner-report.scm	2006-10-09 23:50:41 UTC (rev 14955)
+++ gnucash/branches/swig-redo/src/business/business-reports/owner-report.scm	2006-10-09 23:51:59 UTC (rev 14956)
@@ -156,8 +156,8 @@
     (for-each
      (lambda (lot)
        (let* ((bal (gnc:lot-get-balance lot))
-	      (invoice (gnc:invoice-get-invoice-from-lot lot))
-	      (post-date (gnc:invoice-get-date-posted invoice)))
+	      (invoice (gncInvoiceGetInvoiceFromLot lot))
+	      (post-date (gncInvoiceGetDatePosted invoice)))
 
 	 (if (not (gnc:numeric-zero-p bal))
 	     (begin
@@ -197,7 +197,7 @@
 	 (due-date #f)
 	 (value (gnc:transaction-get-account-value txn acc))
 	 (split (gnc:transaction-get-split txn 0))
-	 (invoice (gnc:invoice-get-invoice-from-txn txn))
+	 (invoice (gncInvoiceGetInvoiceFromTxn txn))
 	 (currency (gnc:transaction-get-currency txn))
 	 (type-str
 	  (cond
@@ -256,7 +256,7 @@
 	  
 	  ; Now print out the invoice row
 	  (if invoice
-	      (set! due-date (gnc:invoice-get-date-due invoice)))
+	      (set! due-date (gncInvoiceGetDateDue invoice)))
 
 	  (let ((row (make-row date due-date (gnc:transaction-get-num txn)
 			       type-str (gnc:split-get-memo split) value))
@@ -403,13 +403,13 @@
   gnc:*report-options*)
 	     
 (define (customer-options-generator)
-  (options-generator '(receivable) 'gnc-owner-customer (_ "Invoice") #f))
+  (options-generator '(receivable) GNC-OWNER-CUSTOMER (_ "Invoice") #f))
 
 (define (vendor-options-generator)
-  (options-generator '(payable) 'gnc-owner-vendor (_ "Bill") #t))
+  (options-generator '(payable) GNC-OWNER-VENDOR (_ "Bill") #t))
 
 (define (employee-options-generator)
-  (options-generator '(payable) 'gnc-owner-employee (_ "Expense Report") #t))
+  (options-generator '(payable) GNC-OWNER-EMPLOYEE (_ "Expense Report") #t))
 
 (define (string-expand string character replace-string)
   (define (car-line chars)
@@ -430,7 +430,7 @@
   (line-helper (string->list string)))
 
 (define (setup-query q owner account end-date)
-  (let* ((guid (gnc:owner-get-guid (gnc:owner-get-end-owner owner))))
+  (let* ((guid (gncOwnerReturnGUID (gncOwnerGetEndOwner owner))))
 
     (gnc:query-add-guid-match
      q 
@@ -545,23 +545,23 @@
 	 (type-str ""))
 
     (cond
-      ((gnc-owner-customer)
+      ((eqv? type GNC-OWNER-CUSTOMER)
        (set! type-str (N_ "Customer")))
-      ((gnc-owner-vendor)
+      ((eqv? type GNC-OWNER-VENDOR)
        (set! type-str (N_ "Vendor")))
-      ((gnc-owner-employee)
+      ((eqv? type GNC-OWNER-EMPLOYEE)
        (set! type-str (N_ "Employee"))))
 
     (gnc:html-document-set-title!
      document (string-append (_ type-str) " " (_ "Report")))
 
-    (if (gnc:owner-is-valid? owner)
+    (if (gncOwnerIsValid owner)
 	(begin
 	  (setup-query query owner account end-date)
 
 	  (gnc:html-document-set-title!
 	   document
-           (string-append (_ type-str ) " " (_ "Report:") " " (gnc:owner-get-name owner)))
+           (string-append (_ type-str ) " " (_ "Report:") " " (gncOwnerGetName owner)))
 
            (gnc:html-document-set-headline!
             document (gnc:html-markup
@@ -570,7 +570,7 @@
                       " " (_ "Report:") " "
                       (gnc:html-markup-anchor
                        (gnc:owner-anchor-text owner)
-                       (gnc:owner-get-name owner))))
+                       (gncOwnerGetName owner))))
 	  
 	  (if account
 	      (begin
@@ -625,7 +625,7 @@
 (define (find-first-account type)
   (define (find-first group num index)
     (if (>= index num)
-	#f
+	#f ;; FIXME
 	(let* ((this-account (gnc:group-get-account group index))
 	       (account-type (gnc:account-get-type this-account)))
 	  (if (eq? account-type type)
@@ -637,22 +637,22 @@
 			current-group)))
     (if (> num-accounts 0)
 	(find-first current-group num-accounts 0)
-	#f)))
+	#f))) ;; FIXME
 
 (define (find-first-account-for-owner owner)
-  (let ((type (gnc:owner-get-type (gnc:owner-get-end-owner owner))))
+  (let ((type (gncOwnerGetType (gncOwnerGetEndOwner owner))))
     (cond
-      ((gnc-owner-customer)
+      ((eqv? type GNC-OWNER-CUSTOMER)
        (find-first-account 'receivable))
 
-      ((gnc-owner-vendor)
+      ((eqv? type GNC-OWNER-VENDOR)
        (find-first-account 'payable))
 
-      ((gnc-owner-employee)
+      ((eqv? type GNC-OWNER-EMPLOYEE)
        (find-first-account 'payable))
 
-      ((gnc-owner-job)
-       (find-first-account-for-owner (gnc:owner-get-end-owner owner)))
+      ((eqv? type GNC-OWNER-JOB)
+       (find-first-account-for-owner (gncOwnerGetEndOwner owner)))
 
       (else
        #f))))  ;;FIXME: remember to convert
@@ -691,15 +691,15 @@
     (gnc:make-report report-name options)))
 
 (define (owner-report-create owner account)
-  (let ((type (gnc:owner-get-type (gnc:owner-get-end-owner owner))))
+  (let ((type (gncOwnerGetType (gncOwnerGetEndOwner owner))))
     (cond
-      ((gnc-owner-customer)
+      ((eqv? type GNC-OWNER-CUSTOMER)
        (owner-report-create-internal (N_ "Customer Report") owner account))
 
-      ((gnc-owner-vendor)
+      ((eqv? type GNC-OWNER-VENDOR)
        (owner-report-create-internal (N_ "Vendor Report") owner account))
 
-      ((gnc-owner-employee)
+      ((eqv? type GNC-OWNER-EMPLOYEE)
        (owner-report-create-internal (N_ "Employee Report") owner account))
 
       (else #f))))
@@ -715,14 +715,14 @@
 	 account split query journal? double? title
 	 debit-string credit-string)
 
-  (let* ((temp-owner (gnc:owner-create))
+  (let* ((temp-owner (gncOwnerCreate))
 	 (owner (gnc:owner-from-split split temp-owner))
 	 (res #f))
 
     (if owner
 	(set! res (gnc:owner-report-create owner account)))
 
-    (gnc:owner-destroy temp-owner)
+    (gncOwnerDestroy temp-owner)
     res))
 
 (gnc:register-report-hook 'receivable #t

Modified: gnucash/branches/swig-redo/src/business/business-utils/business-options.scm
===================================================================
--- gnucash/branches/swig-redo/src/business/business-utils/business-options.scm	2006-10-09 23:50:41 UTC (rev 14955)
+++ gnucash/branches/swig-redo/src/business/business-utils/business-options.scm	2006-10-09 23:51:59 UTC (rev 14956)
@@ -37,11 +37,11 @@
   (define (convert-to-guid item)
     (if (string? item)
         item
-        (gnc:invoice-get-guid item)))
+        (gncInvoiceReturnGUID item)))
 
   (define (convert-to-invoice item)
     (if (string? item)
-        (gnc:invoice-lookup item (gnc:get-current-book))
+        (gncInvoiceLookupFlip item (gnc:get-current-book))
         item))
 
   (let* ((option (convert-to-guid (default-getter)))
@@ -98,11 +98,11 @@
   (define (convert-to-guid item)
     (if (string? item)
         item
-        (gnc:customer-get-guid item)))
+        (gncCustomerReturnGUID item)))
 
   (define (convert-to-customer item)
     (if (string? item)
-        (gnc:customer-lookup item (gnc:get-current-book))
+        (gncCustomerLookupFlip item (gnc:get-current-book))
         item))
 
   (let* ((option (convert-to-guid (default-getter)))
@@ -159,11 +159,11 @@
   (define (convert-to-guid item)
     (if (string? item)
         item
-        (gnc:vendor-get-guid item)))
+        (gncVendorReturnGUID item)))
 
   (define (convert-to-vendor item)
     (if (string? item)
-        (gnc:vendor-lookup item (gnc:get-current-book))
+        (gncVendorLookupFlip item (gnc:get-current-book))
         item))
 
   (let* ((option (convert-to-guid (default-getter)))
@@ -220,11 +220,11 @@
   (define (convert-to-guid item)
     (if (string? item)
         item
-        (gnc:employee-get-guid item)))
+        (gncEmployeeReturnGUID item)))
 
   (define (convert-to-employee item)
     (if (string? item)
-        (gnc:employee-lookup item (gnc:get-current-book))
+        (gncEmployeeLookupFlip item (gnc:get-current-book))
         item))
 
   (let* ((option (convert-to-guid (default-getter)))
@@ -279,40 +279,40 @@
 	 value-validator
 	 owner-type)
 
-  (let ((option-value (gnc:owner-create)))
+  (let ((option-value (gncOwnerCreate)))
 
     (define (convert-to-pair item)
       (if (pair? item)
 	  item
-	  (cons (gnc:owner-get-type item)
-		(gnc:owner-get-guid item))))
+	  (cons (gncOwnerGetType item)
+		(gncOwnerReturnGUID item))))
 
     (define (convert-to-owner pair)
       (if (pair? pair)
 	  (let ((type (car pair)))
 	    (cond
-	      ((gnc-owner-customer)
-	       (gnc:owner-init-customer
+	      ((eqv? type GNC-OWNER-CUSTOMER)
+	       (gncOwnerInitCustomer
 		option-value
-		(gnc:customer-lookup (cdr pair) (gnc:get-current-book)))
+		(gncCustomerLookupFlip (cdr pair) (gnc:get-current-book)))
 	       option-value)
 
-	       ((gnc-owner-vendor)
-		(gnc:owner-init-vendor
+	       ((eqv? type GNC-OWNER-VENDOR)
+		(gncOwnerInitVendor
 		 option-value
-		 (gnc:vendor-lookup (cdr pair) (gnc:get-current-book)))
+		 (gncVendorLookupFlip (cdr pair) (gnc:get-current-book)))
 		option-value)
 
-	       ((gnc-owner-employee)
-		(gnc:owner-init-employee
+	       ((eqv? type GNC-OWNER-EMPLOYEE)
+		(gncOwnerInitEmployee
 		 option-value
-		 (gnc:employee-lookup (cdr pair) (gnc:get-current-book)))
+		 (gncEmployeeLookupFlip (cdr pair) (gnc:get-current-book)))
 		option-value)
 
-	       ((gnc-owner-job)
-		(gnc:owner-init-job
+	       ((eqv? type GNC-OWNER-JOB)
+		(gncOwnerInitJob
 		 option-value
-		 (gnc:job-lookup (cdr pair) (gnc:get-current-book)))
+		 (gncJobLookupFlip (cdr pair) (gnc:get-current-book)))
 		option-value)
 
 	       (else '())))
@@ -333,7 +333,7 @@
 		(lambda (owner)
 		  (let ((type (if (pair? owner)
                                   (car owner)
-                                  (gnc:owner-get-type owner))))
+                                  (gncOwnerGetType owner))))
 		    (if (equal? type owner-type)
 			(list #t owner)
 			(list #f "Owner-Type Mismatch"))))
@@ -386,11 +386,11 @@
   (define (convert-to-guid item)
     (if (string? item)
         item
-        (gnc:taxtable-get-guid item)))
+        (gncTaxTableReturnGUID item)))
 
   (define (convert-to-taxtable item)
     (if (string? item)
-        (gnc:taxtable-lookup item (gnc:get-current-book))
+        (gncTaxTableLookupFlip item (gnc:get-current-book))
         item))
 
   (let* ((option (convert-to-guid (default-getter)))



More information about the gnucash-changes mailing list