rendered paste bodycommit 27852e3970b288096e84f816657366b36fae4618
Author: Andreas Köhler <andi5.py@gmx.net>
Date: Wed May 30 01:39:37 2007 +0200
In tax report, do not set to start and end of month if from-to mode is selected, #435329.
diff --git a/src/report/locale-specific/us/taxtxf.scm b/src/report/locale-specific/us/taxtxf.scm
index f229ba1..808820b 100644
--- a/src/report/locale-specific/us/taxtxf.scm
+++ b/src/report/locale-specific/us/taxtxf.scm
@@ -473,7 +473,8 @@
'(last-year 1st-last 2nd-last
3rd-last 4th-last))
(set-tm:year bdtm (- (tm:year bdtm) 1)))
- (set-tm:mday bdtm 1)
+ (or (eq? alt-period 'from-to)
+ (set-tm:mday bdtm 1))
(if (< (gnc:date-get-year bdtm)
tax-qtr-real-qtr-year)
(case alt-period
@@ -512,7 +513,8 @@
'(last-year 1st-last 2nd-last
3rd-last 4th-last))
(set-tm:year bdtm (+ (tm:year bdtm) 1)))
- (set-tm:mday bdtm 31)
+ (or (eq? alt-period 'from-to)
+ (set-tm:mday bdtm 31))
(if (< (gnc:date-get-year bdtm) tax-qtr-real-qtr-year)
(case alt-period
((1st-est 1st-last) ; Mar 31