Revert r18409, "Bug #554394:...". Needs to be applied after other patches are applied as well.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18410 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2009-11-11 20:55:52 +00:00
parent 951479c6e7
commit 1e767585c8

View File

@ -15,80 +15,31 @@
;; e.g. the Winston software ;; e.g. the Winston software
;; http://www.felfri.de/winston/schnittstellen.htm ;; http://www.felfri.de/winston/schnittstellen.htm
;; ;;
(define (gnc:txf-get-payer-name-source categories code)
(define txf-tax-entity-types (gnc:txf-get-code-info categories code 0))
(list (define (gnc:txf-get-form categories code)
(cons 'Ind #("Individual, Joint, etc." "Files Individual German Tax Return")) (gnc:txf-get-code-info categories code 1))
(cons 'Other #("None" "No Income Tax Options Provided")))) (define (gnc:txf-get-description categories code)
(gnc:txf-get-code-info categories code 2))
(define (gnc:tax-type-txf-get-code-info tax-entity-types type-code index) (define (gnc:txf-get-format categories code)
(let ((tax-entity-type (assv type-code tax-entity-types))) (gnc:txf-get-code-info categories code 3))
(and tax-entity-type (define (gnc:txf-get-multiple categories code)
(vector-ref (cdr tax-entity-type) index)))) (gnc:txf-get-code-info categories code 4))
(define (gnc:txf-get-category-key categories code)
(define (gnc:txf-get-tax-entity-type type-code) (gnc:txf-get-code-info categories code 5))
(gnc:tax-type-txf-get-code-info txf-tax-entity-types type-code 0))
(define (gnc:txf-get-tax-entity-type-description type-code)
(gnc:tax-type-txf-get-code-info txf-tax-entity-types type-code 1))
(define (gnc:txf-get-tax-entity-type-codes)
(map car txf-tax-entity-types))
(define (gnc:txf-get-payer-name-source categories code tax-entity-type)
(gnc:txf-get-code-info categories code 0 tax-entity-type))
(define (gnc:txf-get-form categories code tax-entity-type)
(gnc:txf-get-code-info categories code 1 tax-entity-type))
(define (gnc:txf-get-description categories code tax-entity-type)
(gnc:txf-get-code-info categories code 2 tax-entity-type))
(define (gnc:txf-get-format categories code tax-entity-type)
(gnc:txf-get-code-info categories code 3 tax-entity-type))
(define (gnc:txf-get-multiple categories code tax-entity-type)
(gnc:txf-get-code-info categories code 4 tax-entity-type))
(define (gnc:txf-get-category-key categories code tax-entity-type)
(gnc:txf-get-code-info categories code 5 tax-entity-type))
(define (gnc:txf-get-line-data categories code tax-entity-type)
(let* ((tax-entity-codes (cdr (assv (string->symbol tax-entity-type)
categories)))
(category (assv code tax-entity-codes)))
(if (or (not category) (< (vector-length (cdr category)) 7))
#f
(gnc:txf-get-code-info categories code 6 tax-entity-type))))
(define (gnc:txf-get-last-year categories code tax-entity-type)
(let* ((tax-entity-codes (cdr (assv (string->symbol tax-entity-type)
categories)))
(category (assv code tax-entity-codes)))
(if (or (not category) (< (vector-length (cdr category)) 8))
#f
(gnc:txf-get-code-info categories code 7 tax-entity-type))))
(define (gnc:txf-get-help categories code) (define (gnc:txf-get-help categories code)
(let ((pair (assv code txf-help-strings))) (let ((pair (assv code txf-help-strings)))
(if pair (if pair
(cdr pair) (cdr pair)
"No help available."))) "No help available.")))
(define (gnc:txf-get-codes categories tax-entity-type) (define (gnc:txf-get-codes categories)
(let* ((tax-entity-code-list-pair (assv (if (eqv? tax-entity-type "") (map car categories))
'Ind
(string->symbol tax-entity-type))
categories))
(tax-entity-codes (if tax-entity-code-list-pair
(cdr tax-entity-code-list-pair)
'())))
(map car tax-entity-codes)))
;;;; Private ;;;; Private
(define (gnc:txf-get-code-info categories code index tax-entity-type) (define (gnc:txf-get-code-info categories code index)
(let* ((tax-entity-code-list-pair (assv (if (eqv? tax-entity-type "") (let ((category (assv code categories)))
'Ind
(string->symbol tax-entity-type))
categories))
(tax-entity-codes (if tax-entity-code-list-pair
(cdr tax-entity-code-list-pair)
'()))
(category (assv code tax-entity-codes)))
(and category (and category
(vector-ref (cdr category) index)))) (vector-ref (cdr category) index))))
@ -105,9 +56,7 @@
;; Format: (name-source form description format multiple category-key) ;; Format: (name-source form description format multiple category-key)
(define txf-income-categories (define txf-income-categories
(list (list
(cons 'Ind
(list
(cons 'N000 #(none "" "Nur zur Voransicht im Steuer-Bericht -- kein Export" 0 #f "")) (cons 'N000 #(none "" "Nur zur Voransicht im Steuer-Bericht -- kein Export" 0 #f ""))
(cons 'K35 #(none "35" "Umsätze, die anderen Steuersätzen unterliegen (Bemessungsgrundlage)" 2 #f "35")) (cons 'K35 #(none "35" "Umsätze, die anderen Steuersätzen unterliegen (Bemessungsgrundlage)" 2 #f "35"))
@ -133,9 +82,7 @@
(cons 'K97 #(none "97" "Steuerpflichtige innergemeinschaftliche Erwerbe zum Steuersatz von 16 v.H." 2 #f "97")) (cons 'K97 #(none "97" "Steuerpflichtige innergemeinschaftliche Erwerbe zum Steuersatz von 16 v.H." 2 #f "97"))
(cons 'K98 #(none "98" "Steuerpflichtige innergemeinschaftliche Erwerbe zu anderen Steuersätzen (Steuer)" 1 #f "98")) (cons 'K98 #(none "98" "Steuerpflichtige innergemeinschaftliche Erwerbe zu anderen Steuersätzen (Steuer)" 1 #f "98"))
) ))
)
))
;; We use several formats; nr. 1 means Euro+Cent, nr. 2 means only full Euro ;; We use several formats; nr. 1 means Euro+Cent, nr. 2 means only full Euro
@ -145,9 +92,7 @@
;; Format: (name-source form description format multiple category-key) ;; Format: (name-source form description format multiple category-key)
(define txf-expense-categories (define txf-expense-categories
(list (list
(cons 'Ind
(list
(cons 'N000 #(none "" "Nur zur Voransicht im Steuer-Bericht -- kein Export" 0 #f "")) (cons 'N000 #(none "" "Nur zur Voransicht im Steuer-Bericht -- kein Export" 0 #f ""))
(cons 'K52 #(none "52" "Leistungen eines im Ausland ansässigen Unternehmers (Bemessungsgrundlage)" 2 #f "52")) (cons 'K52 #(none "52" "Leistungen eines im Ausland ansässigen Unternehmers (Bemessungsgrundlage)" 2 #f "52"))
@ -169,28 +114,10 @@
(cons 'K94 #(none "94" "Innergemeinschaftliche Erwerbe neuer Fahrzeuge von Lieferern ohne USt-IdNr. (Bemessungsgrundlage)" 2 #f "94")) (cons 'K94 #(none "94" "Innergemeinschaftliche Erwerbe neuer Fahrzeuge von Lieferern ohne USt-IdNr. (Bemessungsgrundlage)" 2 #f "94"))
(cons 'K95 #(none "95" "Steuerpflichtige innergemeinschaftliche Erwerbe zu anderen Steuersätzen (Bemessungsgrundlage)" 2 #f "95")) (cons 'K95 #(none "95" "Steuerpflichtige innergemeinschaftliche Erwerbe zu anderen Steuersätzen (Bemessungsgrundlage)" 2 #f "95"))
(cons 'K96 #(none "96" "Innergemeinschaftliche Erwerbe neuer Fahrzeuge von Lieferern ohne USt-IdNr. (Steuer)" 1 #f "96")) (cons 'K96 #(none "96" "Innergemeinschaftliche Erwerbe neuer Fahrzeuge von Lieferern ohne USt-IdNr. (Steuer)" 1 #f "96"))
)
)
)) ))
(define txf-asset-categories
(list
(cons 'Ind
(list
(cons 'N000 #(none "" "Nur zur Voransicht im Steuer-Bericht -- kein Export" 0 #f ""))
)
)
))
(define txf-liab-eq-categories
(list
(cons 'Ind
(list
(cons 'N000 #(none "" "Nur zur Voransicht im Steuer-Bericht -- kein Export" 0 #f ""))
)
)
))
;;; Register global options in this book ;;; Register global options in this book
(define (book-options-generator options) (define (book-options-generator options)