From: Adrian B. <adr...@ie...> - 2007-09-07 05:26:14
|
While attempting to do yearend processing I get the following error: Error! Illegal division by zero at SL/RP.pm line 995. And here is the code while ($ref = $sth->fetchrow_hashref(NAME_lc)) { # get last heading account @accno = grep { $_ le "$ref->{accno}" } @headingaccounts; $accno = pop @accno; $ref->{amount} /= $form->{exchangerate}; ***************************** error line if ($accno && ($accno ne $ref->{accno}) ) { if ($last_period) { $form->{$ref->{category}}{$accno}{last} += $ref->{amount}; } else { $form->{$ref->{category}}{$accno}{this} += $ref->{amount}; } } My Jan 17 2006 copy of the manual does not include "exchangerate" information. Adrian -- Adrian Blake Molonglo Radio Observatory University of Sydney 1152 Hoskinstown Rd Bungendore 2621 ph. 02 80042212 mobile 0407 232 978 http://150.101.125.30/images |