[Wed Sep 19 14:38:07 2012] [error] [client 192.168.100.2] [Wed Sep 19 14:38:07 2012] basket.pl: Use of uninitialized value $total_est_gste in sprintf at /usr/share/koha/intranet/cgi-bin/acqui/basket.pl line 370., referer: https://.../cgi-bin/koha/acqui/booksellers.pl [Wed Sep 19 14:38:07 2012] [error] [client 192.168.100.2] [Wed Sep 19 14:38:07 2012] basket.pl: Use of uninitialized value $total_est_gste in sprintf at /usr/share/koha/intranet/cgi-bin/acqui/basket.pl line 370., referer: https://.../cgi-bin/koha/acqui/booksellers.pl [Wed Sep 19 14:38:07 2012] [error] [client 192.168.100.2] [Wed Sep 19 14:38:07 2012] basket.pl: Use of uninitialized value $gist_est in sprintf at /usr/share/koha/intranet/cgi-bin/acqui/basket.pl line 370., referer: https://.../cgi-bin/koha/acqui/booksellers.pl [Wed Sep 19 14:38:07 2012] [error] [client 192.168.100.2] [Wed Sep 19 14:38:07 2012] basket.pl: Use of uninitialized value $gist_est in sprintf at /usr/share/koha/intranet/cgi-bin/acqui/basket.pl line 370., referer: https://.../cgi-bin/koha/acqui/booksellers.pl [Wed Sep 19 14:38:42 2012] [error] [client 192.168.100.2] [Wed Sep 19 14:38:42 2012] basket.pl: Use of uninitialized value $total_est_gste in sprintf at /usr/share/koha/intranet/cgi-bin/acqui/basket.pl line 370., referer: https://.../cgi-bin/koha/acqui/booksellers.pl [Wed Sep 19 14:38:42 2012] [error] [client 192.168.100.2] [Wed Sep 19 14:38:42 2012] basket.pl: Use of uninitialized value $total_est_gste in sprintf at /usr/share/koha/intranet/cgi-bin/acqui/basket.pl line 370., referer: https://.../cgi-bin/koha/acqui/booksellers.pl [Wed Sep 19 14:38:42 2012] [error] [client 192.168.100.2] [Wed Sep 19 14:38:42 2012] basket.pl: Use of uninitialized value $gist_est in sprintf at /usr/share/koha/intranet/cgi-bin/acqui/basket.pl line 370., referer: https://.../cgi-bin/koha/acqui/booksellers.pl [Wed Sep 19 14:38:42 2012] [error] [client 192.168.100.2] [Wed Sep 19 14:38:42 2012] basket.pl: Use of uninitialized value $gist_est in sprintf at /usr/share/koha/intranet/cgi-bin/acqui/basket.pl line 370., referer: https://.../cgi-bin/koha/acqui/booksellers.pl Looking at the template file: total_rrp_gste, total_est_gste, gist_rate, gist_rrp, and gist_est are only used if GST (which is $gist) is set. The solution I took was to move these variables to a separate $template->param() call based on "if $gist;". I found this bug in 3.6.3, it exists in 3.8.4 too.
Created attachment 12338 [details] [review] Added conditional secondary template param call (3.6.x) Testing -------- Set gist=0 (it's a system preference: home->administration->search for gist preference, it's the one about the default tax rate) Login Acquisitions (already had $100 in available funds) Search for vendor (already had "Book Trends" added) View (already had a "basket" added) *BAM* /var/log/koha/... (the intranet error log file) has errors. apply patch Home Acquisitions Search for vendor (used "Book Trends" again) View (the existing basket of course) Check /var/log/koha/... (intranet error log) and there are no new errors. Set gist>0 retest to make sure both if $gist and if !$gist work. Set gist back to what you want it. :) The 3.6.x seemed to need a different patch than master. applies to 3.6.x, 3.8.x, and master
Created attachment 12339 [details] [review] Added conditional secondary template param call This should applied to 3.8.x and master. See testing plan above.
It would seem that bug 5335 has made this bug report irrelevant, except for the test case provided. If no errors occur, then all should be fine. I'm marking it as a duplicate of 5335, even though 5335 is far bigger in scope than this tiny change. It's side-effect cleaned up this problem. *** This bug has been marked as a duplicate of bug 5335 ***