mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[job-report] remove dead code
This commit is contained in:
parent
9e06345f2e
commit
74e66acd50
@ -404,18 +404,6 @@
|
|||||||
(options-generator (list ACCT-TYPE-RECEIVABLE) GNC-OWNER-JOB
|
(options-generator (list ACCT-TYPE-RECEIVABLE) GNC-OWNER-JOB
|
||||||
(_ "Invoice") #f))
|
(_ "Invoice") #f))
|
||||||
|
|
||||||
(define (customer-options-generator)
|
|
||||||
(options-generator (list ACCT-TYPE-RECEIVABLE) GNC-OWNER-CUSTOMER
|
|
||||||
(_ "Invoice") #f))
|
|
||||||
|
|
||||||
(define (vendor-options-generator)
|
|
||||||
(options-generator (list ACCT-TYPE-PAYABLE) GNC-OWNER-VENDOR
|
|
||||||
(_ "Bill") #t))
|
|
||||||
|
|
||||||
(define (employee-options-generator)
|
|
||||||
(options-generator (list ACCT-TYPE-PAYABLE) GNC-OWNER-EMPLOYEE
|
|
||||||
(_ "Expense Report") #t))
|
|
||||||
|
|
||||||
(define (setup-query q owner account end-date)
|
(define (setup-query q owner account end-date)
|
||||||
(let* ((guid (gncOwnerReturnGUID owner)))
|
(let* ((guid (gncOwnerReturnGUID owner)))
|
||||||
|
|
||||||
@ -460,24 +448,6 @@
|
|||||||
'attribute (list "valign" "top"))
|
'attribute (list "valign" "top"))
|
||||||
table))
|
table))
|
||||||
|
|
||||||
(define (make-date-row! table label date)
|
|
||||||
(gnc:html-table-append-row!
|
|
||||||
table
|
|
||||||
(list
|
|
||||||
(string-append label " ")
|
|
||||||
(qof-print-date date))))
|
|
||||||
|
|
||||||
(define (make-date-table)
|
|
||||||
(let ((table (gnc:make-html-table)))
|
|
||||||
(gnc:html-table-set-style!
|
|
||||||
table "table"
|
|
||||||
'attribute (list "border" 0)
|
|
||||||
'attribute (list "cellpadding" 0))
|
|
||||||
(gnc:html-table-set-last-row-style!
|
|
||||||
table "td"
|
|
||||||
'attribute (list "valign" "top"))
|
|
||||||
table))
|
|
||||||
|
|
||||||
(define (make-myname-table book date-format)
|
(define (make-myname-table book date-format)
|
||||||
(let* ((table (gnc:make-html-table))
|
(let* ((table (gnc:make-html-table))
|
||||||
(name (gnc:company-info book gnc:*company-name*))
|
(name (gnc:company-info book gnc:*company-name*))
|
||||||
@ -619,40 +589,6 @@
|
|||||||
(qof-query-destroy query)
|
(qof-query-destroy query)
|
||||||
document))
|
document))
|
||||||
|
|
||||||
(define (find-first-account type)
|
|
||||||
(define (find-first account num index)
|
|
||||||
(if (>= index num)
|
|
||||||
'()
|
|
||||||
(let* ((this-child (gnc-account-nth-child account index))
|
|
||||||
(account-type (xaccAccountGetType this-child)))
|
|
||||||
(if (eq? account-type type)
|
|
||||||
this-child
|
|
||||||
(find-first account num (+ index 1))))))
|
|
||||||
|
|
||||||
(let* ((current-root (gnc-get-current-root-account))
|
|
||||||
(num-accounts (gnc-account-n-children current-root)))
|
|
||||||
(if (> num-accounts 0)
|
|
||||||
(find-first current-root num-accounts 0)
|
|
||||||
'())))
|
|
||||||
|
|
||||||
(define (find-first-account-for-owner owner)
|
|
||||||
(let ((type (gncOwnerGetType (gncOwnerGetEndOwner owner))))
|
|
||||||
(cond
|
|
||||||
((eqv? type GNC-OWNER-CUSTOMER)
|
|
||||||
(find-first-account ACCT-TYPE-RECEIVABLE))
|
|
||||||
|
|
||||||
((eqv? type GNC-OWNER-VENDOR)
|
|
||||||
(find-first-account ACCT-TYPE-PAYABLE))
|
|
||||||
|
|
||||||
((eqv? type GNC-OWNER-EMPLOYEE)
|
|
||||||
(find-first-account ACCT-TYPE-PAYABLE))
|
|
||||||
|
|
||||||
((eqv? type GNC-OWNER-JOB)
|
|
||||||
(find-first-account-for-owner (gncOwnerGetEndOwner owner)))
|
|
||||||
|
|
||||||
(else
|
|
||||||
'()))))
|
|
||||||
|
|
||||||
(gnc:define-report
|
(gnc:define-report
|
||||||
'version 1
|
'version 1
|
||||||
'name (N_ "Job Report")
|
'name (N_ "Job Report")
|
||||||
|
Loading…
Reference in New Issue
Block a user