summaryrefslogtreecommitdiff
path: root/LedgerSMB/DBObject
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-09-25 02:01:35 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-09-25 02:01:35 +0000
commit7fad3552f9a62dcaf51fb13880bf0dba476883bf (patch)
tree53bd6883280b5f57290a7a1ccfbd28cd0d4ccf85 /LedgerSMB/DBObject
parent0a1573bd053a30b3ba2690fcf3545be02cb2eaa8 (diff)
Addressing performance issues in multiple payments interface. Adding additional formatting options to format_number, and making multiple payment interface more locale safe.
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2340 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB/DBObject')
-rw-r--r--LedgerSMB/DBObject/Payment.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/LedgerSMB/DBObject/Payment.pm b/LedgerSMB/DBObject/Payment.pm
index eaee4d20..e87cd7a6 100644
--- a/LedgerSMB/DBObject/Payment.pm
+++ b/LedgerSMB/DBObject/Payment.pm
@@ -459,10 +459,14 @@ sub get_payment_detail_data {
my $tmp_invoices = $inv->{invoices};
$inv->{invoices} = [];
@{$inv->{invoices}} = $self->_parse_array($tmp_invoices);
-# $self->error(Dumper($inv->{invoices}));
@{$inv->{invoices}} = sort { $a->[2] cmp $b->[2] } @{ $inv->{invoices} };
+ for my $invoice (@{$inv->{invoices}}){
+ $invoice->[6] = Math::BigFloat->new($invoice->[6]);
+ $invoice->[3] = Math::BigFloat->new($invoice->[3]);
+ $invoice->[4] = Math::BigFloat->new($invoice->[4]);
+ }
}
-
+
$self->{dbh}->commit; # Commit locks
}