[Koha-bugs] [Bug 25750] New: Fallback to ecost_tax_included, ecost_tax_excluded not happening when no 'Actual cost' entered
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Mon Jun 15 00:32:12 CEST 2020
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25750
Bug ID: 25750
Summary: Fallback to ecost_tax_included, ecost_tax_excluded not
happening when no 'Actual cost' entered
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Acquisitions
Assignee: koha-bugs at lists.koha-community.org
Reporter: alexbuckley at catalyst.net.nz
QA Contact: testopia at bugs.koha-community.org
The patchsets on bugs 23523 and 23522 set and display respectively the
unitprice_tax_included/unitprice_tax_excluded if 'Actual cost' has been
entered.
If 'Actual cost' is not entered entered then Koha should fallback to
ecost_tax_included/ecost_tax_excluded.
However the fallback is not working correctly. When 'Actual cost' is not set it
has a value of 0.00 and Koha evaluates 0.00 to true so
ecost_tax_included/ecost_tax_excluded is never used.
e.g. In this fallback:
my $cost_tax_included = $line{unitprice_tax_included} ||
$line{ecost_tax_included};
my $cost_tax_included = 0.00 || 7.23
$cost_tax_included is set to 0.00 as Perl treats 0.00 as true.
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
More information about the Koha-bugs
mailing list