1? (tbl_cols 0)) ; number of columns for 'colspan' attributes ; load splits, if any (if (not (null? lot)) (set! splits (sort-list (gnc-lot-get-split-list lot) ; sort by date (lambda (s1 s2) (let ((t1 (xaccSplitGetParent s1)) (t2 (xaccSplitGetParent s2))) (< (car (gnc-transaction-get-date-posted t1)) (car (gnc-transaction-get-date-posted t2)))))))) ; pre-scan invoice entries to look for discounts and taxes (for entry in entries do (let ((action (gncEntryGetAction entry)) (qty (gncEntryGetDocQuantity entry credit-note?)) (discount (gncEntryGetInvDiscount entry)) (taxable? (gncEntryGetInvTaxable entry)) (taxtable (gncEntryGetInvTaxTable entry))) (if (not (string=? action "")) (set! units? #t)) (if (not (= (gnc-numeric-to-double qty) 1.0)) (set! qty? #t)) (if (not (gnc-numeric-zero-p discount)) (set! discount? #t)) ;(if taxable - no, this flag is redundant (if taxable? ; Also check if the taxable flag is set (if (not (eq? taxtable '())) (begin ; presence of a tax table AND taxable flag means it's taxed (set! tax? #t)))))) ; pre-scan invoice splits to see if any payments have been made (for split in splits do (let* ((t (xaccSplitGetParent split))) (if (not (equal? t txn)) (set! payments? #t)))) ?> <?scm:d (_ "Invoice") ?> <?scm:d invoiceid ?>

=cwo=

 

br owneraddr) ?>
br coyname) ?>
br coyaddr) ?>

string (gnc:make-gnc-monetary currency disc)) ?> %
 
,

br notes) ?>

br opt-extra-notes) ?>

" (_ "CWO Invoice") "")) (display (string-append "

" (_ "No invoice has been selected -- please use the Options menu to select one.") "

"))) (let* ((owner (gncInvoiceGetOwner opt-invoice)) (endowner (gncOwnerGetEndOwner owner)) (ownertype (gncOwnerGetType endowner))) (if (not (eqv? ownertype GNC-OWNER-CUSTOMER)) (begin (display (string-append "

" (_ "CWO Invoice") "

")) (display (string-append "

" (_ "This report is designed for customer (sales) invoices only. Please use the Options menu to select an Invoice, not a Bill or Expense Voucher.") "

"))) (display-report opt-invoice owner endowner ownertype)))) ?>