@ -173,54 +173,54 @@
( let* ( ( row-contents ' ( ) )
( entry-value ( gnc:make-gnc-monetary
currency
( gnc :entry-get-v alue entry invoice? ) ) )
( gnc EntryReturnV alue entry invoice? ) ) )
( entry-tax-value ( gnc:make-gnc-monetary
currency
( gnc :entry-get-tax-v alue entry invoice? ) ) ) )
( gnc EntryReturnTaxV alue entry invoice? ) ) ) )
( if ( date-col column-vector )
( addto! row-contents
( gnc:print-date ( gnc :entry-get-d ate entry ) ) ) )
( gnc:print-date ( gnc EntryGetD ate entry ) ) ) )
( if ( description-col column-vector )
( addto! row-contents
( gnc :entry-get-d escription entry ) ) )
( gnc EntryGetD escription entry ) ) )
( if ( action-col column-vector )
( addto! row-contents
( gnc :entry-get-a ction entry ) ) )
( gnc EntryGetA ction entry ) ) )
( if ( quantity-col column-vector )
( addto! row-contents
( gnc:make-html-table-cell/markup
"number-cell"
( gnc :entry-get-q uantity entry ) ) ) )
( gnc EntryGetQ uantity 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-p rice entry )
( gnc :entry-get-bill-p rice entry ) ) ) ) ) )
currency ( if invoice? ( gnc EntryGetInvP rice entry )
( gnc EntryGetBillP rice 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-d iscount entry )
( monetary-or-percent ( gnc EntryGetInvD iscount entry )
currency
( gnc :entry-get-inv-discount-t ype entry ) ) )
( gnc EntryGetInvDiscountT ype entry ) ) )
"" ) ) )
( if ( tax-col column-vector )
( addto! row-contents
( if ( if invoice?
( and ( gnc :entry-get-inv-t axable entry )
( gnc :entry-get-inv-tax-t able entry ) )
( and ( gnc :entry-get-bill-t axable entry )
( gnc :entry-get-bill-tax-t able entry ) ) )
( and ( gnc EntryGetInvT axable entry )
( gnc EntryGetInvTaxT able entry ) )
( and ( gnc EntryGetBillT axable entry )
( gnc EntryGetBillTaxT able entry ) ) )
( _ "T" ) "" ) ) )
( if ( taxvalue-col column-vector )
@ -251,7 +251,7 @@
( gnc:register-inv-option
( gnc:make-invoice-option invoice-page invoice-name "x" ""
( lambda ( ) #f ) #f ) )
( lambda ( ) ' ( ) ) #f ) )
( gnc:register-inv-option
( gnc:make-simple-boolean-option
@ -389,9 +389,9 @@
( let ( ( show-payments ( opt-val "Display" "Payments" ) )
( display-all-taxes ( opt-val "Display" "Individual Taxes" ) )
( lot ( gnc :invoice-get-posted-l ot invoice ) )
( txn ( gnc :invoice-get-posted-t xn invoice ) )
( currency ( gnc :invoice-get-c urrency invoice ) )
( lot ( gnc InvoiceGetPostedL ot invoice ) )
( txn ( gnc InvoiceGetPostedT xn invoice ) )
( currency ( gnc InvoiceGetC urrency 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-v alues current invoice? ) ) )
( let ( ( tax-list ( gnc EntryReturnTaxV alues 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-e ntries invoice ) )
( entries ( gnc InvoiceGetE ntries 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-r eference order ) ) )
( let* ( ( reference ( GncOrderGetR eference order ) ) )
( if ( and reference ( > ( string-length reference ) 0 ) )
( gnc:html-table-append-row!
table
@ -665,26 +665,26 @@
( define ( make-myname-table book date-format )
( let* ( ( table ( gnc:make-html-table ) )
( slots ( gnc : book-get-slots book ) )
( name ( gnc: kvp-frame-get-slot-path
( slots ( gnc - book-get-slots book ) )
( name ( kvp-frame-get-slot-path-gslist
slots ( append gnc:*kvp-option-path*
( list gnc:*business-label* gnc:*company-name* ) ) ) )
;; (contact ( gnc: kvp-frame-get-slot-path
;; (contact ( kvp-frame-get-slot-path-gslist
;; slots (append gnc:*kvp-option-path*
;; (list gnc:*business-label* gnc:*company-contact*))))
( addy ( gnc: kvp-frame-get-slot-path
( addy ( kvp-frame-get-slot-path-gslist
slots ( append gnc:*kvp-option-path*
( list gnc:*business-label* gnc:*company-addy* ) ) ) )
( id ( gnc: kvp-frame-get-slot-path
( id ( kvp-frame-get-slot-path-gslist
slots ( append gnc:*kvp-option-path*
( list gnc:*business-label* gnc:*company-id* ) ) ) )
( phone ( gnc: kvp-frame-get-slot-path
( phone ( kvp-frame-get-slot-path-gslist
slots ( append gnc:*kvp-option-path*
( list gnc:*business-label* gnc:*company-phone* ) ) ) )
( fax ( gnc: kvp-frame-get-slot-path
( fax ( kvp-frame-get-slot-path-gslist
slots ( append gnc:*kvp-option-path*
( list gnc:*business-label* gnc:*company-fax* ) ) ) )
( url ( gnc: kvp-frame-get-slot-path
( url ( kvp-frame-get-slot-path-gslist
slots ( append gnc:*kvp-option-path*
( list gnc:*business-label* gnc:*company-url* ) ) ) )
( invoice-cell ( gnc:make-html-table-cell ) )
@ -768,26 +768,25 @@
( if invoice
( begin
( set! owner ( gnc:invoice-get-owner invoice ) )
( let ( ( type ( gw:enum-<gnc:GncOwnerType>-val->sym
( gnc:owner-get-type
( gnc:owner-get-end-owner owner ) ) #f ) ) )
( set! owner ( gncInvoiceGetOwner invoice ) )
( let ( ( type ( gncOwnerGetType
( gncOwnerGetEndOwner owner ) ) ) )
( case type
( ( gnc-owner-customer )
( ( GNC-OWNER-CUSTOMER )
( set! invoice? #t ) )
( ( gnc-owner-vendor )
( ( GNC-OWNER-VENDOR )
( set! title ( _ "Bill" ) ) )
( ( gnc-owner-employee )
( ( GNC-OWNER-EMPLOYEE )
( set! title ( _ "Expense Voucher" ) ) ) ) )
( set! title ( sprintf #f ( _ "%s #%d" ) title
( gnc :invoice-get-id invoice ) ) ) ) )
( gnc InvoiceGetID 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-b ook invoice ) )
( slots ( gnc : book-get-slots book ) )
( let* ( ( book ( gnc InvoiceGetB ook invoice ) )
( slots ( gnc - book-get-slots book ) )
( date-object #f )
( helper-table ( gnc:make-html-table ) ) )
( set! table ( make-entry-table invoice
@ -835,8 +834,8 @@
'attribute ( list "width" "100%" ) )
( set! date-object ( let ( ( date-table #f )
( post-date ( gnc :invoice-get-date-p osted invoice ) )
( due-date ( gnc :invoice-get-date-d ue invoice ) ) )
( post-date ( gnc InvoiceGetDateP osted invoice ) )
( due-date ( gnc InvoiceGetDateD ue invoice ) ) )
( if ( not ( equal? post-date ( cons 0 0 ) ) )
( begin
@ -844,7 +843,7 @@
;; oli-custom - moved invoice number here
( gnc:html-table-append-row!
date-table ( list ( sprintf #f ( _ "Invoice # %d" )
( gnc :invoice-get-id invoice ) ) ) )
( gnc InvoiceGetID invoice ) ) ) )
( make-date-row! date-table ( _ "Invoice Date" ) post-date )
( make-date-row! date-table ( _ "Due Date" ) due-date )
date-table )
@ -876,7 +875,7 @@
( make-break! document )
( if ( opt-val "Display" "Billing ID" )
( let ( ( billing-id ( gnc :invoice-get-billing-id invoice ) ) )
( let ( ( billing-id ( gnc InvoiceGetBillingID invoice ) ) )
( if ( and billing-id ( > ( string-length billing-id ) 0 ) )
( begin
( gnc:html-document-add-object!
@ -888,8 +887,8 @@
( make-break! document ) ) ) ) )
( if ( opt-val "Display" "Billing Terms" )
( let* ( ( term ( gnc :invoice-get-t erms invoice ) )
( terms ( gnc :bill-term-get-d escription term ) ) )
( let* ( ( term ( gnc InvoiceGetT erms invoice ) )
( terms ( gnc BillTermGetD escription term ) ) )
( if ( and terms ( > ( string-length terms ) 0 ) )
( gnc:html-document-add-object!
document
@ -906,7 +905,7 @@
( make-break! document )
( if ( opt-val "Display" "Invoice Notes" )
( let ( ( notes ( gnc :invoice-get-n otes invoice ) ) )
( let ( ( notes ( gnc InvoiceGetN otes invoice ) ) )
( gnc:html-document-add-object!
document
( gnc:make-html-text
@ -915,7 +914,7 @@
( make-break! document )
( if ( opt-val "Display" "Payable to" )
( let* ( ( name ( gnc: kvp-frame-get-slot-path
( let* ( ( name ( kvp-frame-get-slot-path-gslist
slots ( append gnc:*kvp-option-path*
( list gnc:*business-label*
gnc:*company-name* ) ) ) )
@ -930,7 +929,7 @@
( make-break! document )
( if ( opt-val "Display" "Company contact" )
( let* ( ( contact ( gnc: kvp-frame-get-slot-path
( let* ( ( contact ( kvp-frame-get-slot-path-gslist
slots ( append gnc:*kvp-option-path*
( list gnc:*business-label*
gnc:*company-contact* ) ) ) )