[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[3806] branches/1.3/scripts/recon.pl
- Subject: SF.net SVN: ledger-smb:[3806] branches/1.3/scripts/recon.pl
- From: ..hidden..
- Date: Fri, 07 Oct 2011 20:12:00 +0000
Revision: 3806
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3806&view=rev
Author: einhverfr
Date: 2011-10-07 20:12:00 +0000 (Fri, 07 Oct 2011)
Log Message:
-----------
Reconciliation fixes for localized number formats
Modified Paths:
--------------
branches/1.3/scripts/recon.pl
Modified: branches/1.3/scripts/recon.pl
===================================================================
--- branches/1.3/scripts/recon.pl 2011-10-07 19:24:39 UTC (rev 3805)
+++ branches/1.3/scripts/recon.pl 2011-10-07 20:12:00 UTC (rev 3806)
@@ -381,16 +381,13 @@
{amount => $recon->{total_uncleared_credits}, money => 1}
);
$recon->{their_total} = $recon->format_amount(
- {amount => $recon->{their_total}, money => 1});
+ {amount => $recon->{their_total} * $neg_factor, money => 1});
$recon->{our_total} = $recon->format_amount(
{amount => $recon->{our_total}, money => 1});
$recon->{beginning_balance} = $recon->format_amount(
{amount => $recon->{beginning_balance}, money => 1});
$recon->{out_of_balance} = $recon->format_amount(
{amount => $recon->{out_of_balance}, money => 1});
- if ($recon->{account_info}->{category} =~ /(A|E)/){
- $recon->{their_total} *= -1;
- }
return $template->render($recon);
}
@@ -403,10 +400,14 @@
=cut
sub new_report {
my ($request) = @_;
-
+
+ $request->{total} = $request->parse_amount(amount => $request->{total});
my $template;
my $return;
my $recon = LedgerSMB::DBObject::Reconciliation->new(base => $request, copy => 'all');
+ # This method detection makes debugging a bit harder.
+ # Not sure I like it but won't refactor until 1.4..... --CT
+ #
if ($request->type() eq "POST") {
# We can assume that we're doing something useful with new data.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.