[Koha-bugs] [Bug 31631] Optionally choose for tax-exclusive values to be used for calculating fund values (spent, ordered)
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Dec 2 15:02:26 CET 2022
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31631
Kyle M Hall <kyle at bywatersolutions.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|Signed Off |Failed QA
--- Comment #12 from Kyle M Hall <kyle at bywatersolutions.com> ---
Unit tests are failing randomly:
root at kohadevbox:koha(bug31631-qa)$ prove t/db_dependent/Budgets.t
t/db_dependent/Budgets.t .. 153/154 Use of uninitialized value in
multiplication (*) at /kohadevbox/koha/Koha/Acquisition/Order.pm line 515.
Use of uninitialized value in numeric eq (==) at
/kohadevbox/koha/Koha/Acquisition/Order.pm line 526.
Use of uninitialized value in multiplication (*) at
/kohadevbox/koha/Koha/Acquisition/Order.pm line 515.
Use of uninitialized value in numeric eq (==) at
/kohadevbox/koha/Koha/Acquisition/Order.pm line 526.
# Failed test 'We expect this to be the tax exclusive value'
# at t/db_dependent/Budgets.t line 1243.
# got: '157.6'
# expected: '147.36'
# Failed test 'We expect this to be the tax exclusive value'
# at t/db_dependent/Budgets.t line 1247.
# got: '169.44'
# expected: '157.6'
# Failed test 'We expect this to be the tax exclusive value'
# at t/db_dependent/Budgets.t line 1270.
# got: '157.6'
# expected: '147.36'
# Failed test 'We expect this value to be the tax exclusive value'
# at t/db_dependent/Budgets.t line 1272.
# got: '157.6'
# expected: '147.36'
# Failed test 'We expect this to be the tax exclusive value'
# at t/db_dependent/Budgets.t line 1276.
# got: '169.44'
# expected: '157.6'
# Failed test 'We expect this value to be the tax exclusive value'
# at t/db_dependent/Budgets.t line 1278.
# got: '169.44'
# expected: '157.6'
# Looks like you failed 6 tests of 34.
t/db_dependent/Budgets.t .. 154/154
# Failed test 'GetBudgetSpent GetBudgetOrdered GetBudgetsPlanCell
FieldsForCalculatingFundValues tests'
# at t/db_dependent/Budgets.t line 1290.
# Looks like you failed 1 test of 154.
t/db_dependent/Budgets.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/154 subtests
Test Summary Report
-------------------
t/db_dependent/Budgets.t (Wstat: 256 Tests: 154 Failed: 1)
Failed test: 154
Non-zero exit status: 1
Files=1, Tests=154, 4 wallclock secs ( 0.02 usr 0.00 sys + 3.43 cusr 0.65
csys = 4.10 CPU)
Result: FAIL
root at kohadevbox:koha(bug31631-qa)$ git log
commit 2a3c15c91467b01802c31a65f3436c9175ef1103 (HEAD -> bug31631-qa)
Author: Aleisha Amohia <aleisha at catalystacademy.net.nz>
Date: Tue Oct 25 03:08:03 2022 +0000
Bug 31631: (follow-up) Use CalculateFundValuesIncludingTax when modifying
existing order
This patch depends on Bug 31840.
To test:
1) Edit an order and increase the price so that you would expect it to
trigger a warning that you will exceed the amount allowed for this Fund
2) Confirm the warning is triggered
Signed-off-by: David Nind <david at davidnind.com>
commit cc6bcfe54ea55691bd4ed749b58fac2f9331f8fd
Author: Alex Buckley <alexbuckley at catalyst.net.nz>
Date: Tue Sep 27 17:01:51 2022 +1300
Bug 31631: Unit tests
Test plan:
1. Run tests in koha-shell
sudo koha-shell <instance>
prove t/db_dependent/Budgets.t
Sponsored-by: Waikato Institute of Technology, New Zealand
Signed-off-by: David Nind <david at davidnind.com>
commit a50a301eacde061376c6a3c0cafc03b56e8d1604
Author: Alex Buckley <alexbuckley at catalyst.net.nz>
Date: Tue Sep 27 16:59:00 2022 +1300
Bug 31631: Optionally use tax-exclusive values for calculating fund values
Test plan:
1. Apply patches
2. sudo koha-upgrade-schema <instance>
3. Restart services
4. Set TaxRates syspref = 0.15
5. Create a new fund with amount = 1000
6. Add an order to a basket with the following values:
- Fund = Choose the fund from step #5
- Quantity = 1
- Vendor price = 10
- Tax rate = 15%
- Discount = 20%
- Retail price = 10.00
- Replacement cost = 10.00
- Actual cost = 10.00
7. Go to the Acquisitions home page
8. Confirm the 'Ordered' column for the step #5 fund contains 9.20
9. Click on the 9.20 link and confirm the ordered.pl page that loads
also contains 9.20 as the 'Subtotal'
10. Change 'CalculateFundValuesIncludingTax' = 'Exclude'
root at kohadevbox:koha(bug31631-qa)$ prove t/db_dependent/Budgets.t
t/db_dependent/Budgets.t .. 153/154 Use of uninitialized value in addition (+)
at /kohadevbox/koha/Koha/Acquisition/Order.pm line 490.
Use of uninitialized value in addition (+) at
/kohadevbox/koha/Koha/Acquisition/Order.pm line 490.
t/db_dependent/Budgets.t .. ok
All tests successful.
Files=1, Tests=154, 4 wallclock secs ( 0.02 usr 0.01 sys + 2.99 cusr 0.54
csys = 3.56 CPU)
Result: PASS
root at kohadevbox:koha(bug31631-qa)$ prove t/db_dependent/Budgets.t
t/db_dependent/Budgets.t .. 153/154 Use of uninitialized value in
multiplication (*) at /kohadevbox/koha/Koha/Acquisition/Order.pm line 515.
Use of uninitialized value in numeric eq (==) at
/kohadevbox/koha/Koha/Acquisition/Order.pm line 526.
Use of uninitialized value in multiplication (*) at
/kohadevbox/koha/Koha/Acquisition/Order.pm line 515.
Use of uninitialized value in numeric eq (==) at
/kohadevbox/koha/Koha/Acquisition/Order.pm line 526.
# Failed test 'We expect this to be the tax exclusive value'
# at t/db_dependent/Budgets.t line 1243.
# got: '157.6'
# expected: '147.36'
# Failed test 'We expect this to be the tax exclusive value'
# at t/db_dependent/Budgets.t line 1247.
# got: '169.44'
# expected: '157.6'
# Failed test 'We expect this to be the tax exclusive value'
# at t/db_dependent/Budgets.t line 1270.
# got: '157.6'
# expected: '147.36'
# Failed test 'We expect this value to be the tax exclusive value'
# at t/db_dependent/Budgets.t line 1272.
# got: '157.6'
# expected: '147.36'
# Failed test 'We expect this to be the tax exclusive value'
# at t/db_dependent/Budgets.t line 1276.
# got: '169.44'
# expected: '157.6'
# Failed test 'We expect this value to be the tax exclusive value'
# at t/db_dependent/Budgets.t line 1278.
# got: '169.44'
# expected: '157.6'
# Looks like you failed 6 tests of 34.
t/db_dependent/Budgets.t .. 154/154
# Failed test 'GetBudgetSpent GetBudgetOrdered GetBudgetsPlanCell
FieldsForCalculatingFundValues tests'
# at t/db_dependent/Budgets.t line 1290.
# Looks like you failed 1 test of 154.
t/db_dependent/Budgets.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/154 subtests
Test Summary Report
-------------------
t/db_dependent/Budgets.t (Wstat: 256 Tests: 154 Failed: 1)
Failed test: 154
Non-zero exit status: 1
Files=1, Tests=154, 5 wallclock secs ( 0.02 usr 0.01 sys + 3.41 cusr 0.68
csys = 4.12 CPU)
Result: FAIL
root at kohadevbox:koha(bug31631-qa)$ prove t/db_dependent/Budgets.t
t/db_dependent/Budgets.t .. 2/154 Use of uninitialized value in multiplication
(*) at /kohadevbox/koha/Koha/Acquisition/Order.pm line 515.
Use of uninitialized value in numeric eq (==) at
/kohadevbox/koha/Koha/Acquisition/Order.pm line 526.
Use of uninitialized value in multiplication (*) at
/kohadevbox/koha/Koha/Acquisition/Order.pm line 515.
Use of uninitialized value in numeric eq (==) at
/kohadevbox/koha/Koha/Acquisition/Order.pm line 526.
# Failed test 'We expect this to be the tax exclusive value'
# at t/db_dependent/Budgets.t line 1243.
# got: '157.6'
# expected: '147.36'
# Failed test 'We expect this to be the tax exclusive value'
# at t/db_dependent/Budgets.t line 1247.
# got: '169.44'
# expected: '157.6'
# Looks like you failed 2 tests of 34.
t/db_dependent/Budgets.t .. 154/154
# Failed test 'GetBudgetSpent GetBudgetOrdered GetBudgetsPlanCell
FieldsForCalculatingFundValues tests'
# at t/db_dependent/Budgets.t line 1290.
# Looks like you failed 1 test of 154.
t/db_dependent/Budgets.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/154 subtests
Test Summary Report
-------------------
t/db_dependent/Budgets.t (Wstat: 256 Tests: 154 Failed: 1)
Failed test: 154
Non-zero exit status: 1
Files=1, Tests=154, 2 wallclock secs ( 0.02 usr 0.00 sys + 2.17 cusr 0.24
csys = 2.43 CPU)
Result: FAIL
root at kohadevbox:koha(bug31631-qa)$ prove t/db_dependent/Budgets.t
t/db_dependent/Budgets.t .. 100/154 Use of uninitialized value in addition (+)
at /kohadevbox/koha/Koha/Acquisition/Order.pm line 490.
Use of uninitialized value in addition (+) at
/kohadevbox/koha/Koha/Acquisition/Order.pm line 490.
# Failed test 'We expect this to be the tax exclusive value'
# at t/db_dependent/Budgets.t line 1270.
# got: '157.6'
# expected: '147.36'
# Failed test 'We expect this value to be the tax exclusive value'
# at t/db_dependent/Budgets.t line 1272.
# got: '157.6'
# expected: '147.36'
# Failed test 'We expect this to be the tax exclusive value'
# at t/db_dependent/Budgets.t line 1276.
# got: '169.44'
# expected: '157.6'
# Failed test 'We expect this value to be the tax exclusive value'
# at t/db_dependent/Budgets.t line 1278.
# got: '169.44'
# expected: '157.6'
# Looks like you failed 4 tests of 34.
t/db_dependent/Budgets.t .. 154/154
# Failed test 'GetBudgetSpent GetBudgetOrdered GetBudgetsPlanCell
FieldsForCalculatingFundValues tests'
# at t/db_dependent/Budgets.t line 1290.
# Looks like you failed 1 test of 154.
t/db_dependent/Budgets.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/154 subtests
Test Summary Report
-------------------
t/db_dependent/Budgets.t (Wstat: 256 Tests: 154 Failed: 1)
Failed test: 154
Non-zero exit status: 1
Files=1, Tests=154, 3 wallclock secs ( 0.03 usr 0.00 sys + 2.31 cusr 0.37
csys = 2.71 CPU)
Result: FAIL
root at kohadevbox:koha(bug31631-qa)$ prove t/db_dependent/Budgets.t
t/db_dependent/Budgets.t .. 2/154 Use of uninitialized value in addition (+) at
/kohadevbox/koha/Koha/Acquisition/Order.pm line 490.
Use of uninitialized value in addition (+) at
/kohadevbox/koha/Koha/Acquisition/Order.pm line 490.
# Failed test 'We expect this to be the tax exclusive value'
# at t/db_dependent/Budgets.t line 1270.
# got: '157.6'
# expected: '147.36'
# Failed test 'We expect this value to be the tax exclusive value'
# at t/db_dependent/Budgets.t line 1272.
# got: '157.6'
# expected: '147.36'
# Failed test 'We expect this to be the tax exclusive value'
# at t/db_dependent/Budgets.t line 1276.
# got: '169.44'
# expected: '157.6'
# Failed test 'We expect this value to be the tax exclusive value'
# at t/db_dependent/Budgets.t line 1278.
# got: '169.44'
# expected: '157.6'
# Looks like you failed 4 tests of 34.
t/db_dependent/Budgets.t .. 154/154
# Failed test 'GetBudgetSpent GetBudgetOrdered GetBudgetsPlanCell
FieldsForCalculatingFundValues tests'
# at t/db_dependent/Budgets.t line 1290.
# Looks like you failed 1 test of 154.
t/db_dependent/Budgets.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/154 subtests
Test Summary Report
-------------------
t/db_dependent/Budgets.t (Wstat: 256 Tests: 154 Failed: 1)
Failed test: 154
Non-zero exit status: 1
Files=1, Tests=154, 2 wallclock secs ( 0.03 usr 0.00 sys + 2.09 cusr 0.28
csys = 2.40 CPU)
Result: FAIL
root at kohadevbox:koha(bug31631-qa)$ prove t/db_dependent/Budgets.t
t/db_dependent/Budgets.t .. 2/154 Use of uninitialized value in addition (+) at
/kohadevbox/koha/Koha/Acquisition/Order.pm line 490.
Use of uninitialized value in addition (+) at
/kohadevbox/koha/Koha/Acquisition/Order.pm line 490.
t/db_dependent/Budgets.t .. ok
All tests successful.
Files=1, Tests=154, 2 wallclock secs ( 0.01 usr 0.00 sys + 2.15 cusr 0.23
csys = 2.39 CPU)
Result: PASS
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list