From 7fad3552f9a62dcaf51fb13880bf0dba476883bf Mon Sep 17 00:00:00 2001 From: einhverfr Date: Thu, 25 Sep 2008 02:01:35 +0000 Subject: 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 --- LedgerSMB/DBObject/Payment.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'LedgerSMB/DBObject') 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 } -- cgit v1.2.3