From: Adrian B. <adr...@ie...> - 2007-09-09 11:32:31
|
Thanks for the assistance, it works. Adrian Dieter Simader wrote: > On Fri, 7 Sep 2007, Adrian Blake wrote: > >> 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 >> > > Add this before the while loop. > > $form->{exchangerate} ||= 1; > > >> 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. > > that's because GL transactions didn't have an exchange rate but now they > do. > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > sql-ledger-users mailing list > sql...@li... > https://lists.sourceforge.net/lists/listinfo/sql-ledger-users > -- 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 |