summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS3
-rw-r--r--Changelog2
-rwxr-xr-xLedgerSMB/CP.pm6
-rwxr-xr-xLedgerSMB/Form.pm1
-rwxr-xr-xLedgerSMB/GL.pm3
-rwxr-xr-xLedgerSMB/IS.pm4
-rw-r--r--VERSION2
-rwxr-xr-xbin/is.pl3
-rwxr-xr-xbin/pos.pl8
9 files changed, 18 insertions, 14 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 6a5d5b74..063fa461 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -57,6 +57,9 @@ Jeff Kowalczyk [email omitted] contributed to the INSTALL documentation.
Matt S Trout, <mst @ shadowcatsystems.co.uk> CPAN: MSTROUT,
IRC: mst#irc.perl.org contributed the initial Makefile.PL
+Ashley Gittins contributed <agittins @ purple.dropbear.id.au> has contributed
+some performance fixes and has contributed a great deal of work to our web site.
+
Original Authors of SQL-Ledger:
===================================
Dieter Simader <dsimader @ sql-ledger.com>
diff --git a/Changelog b/Changelog
index e7cda767..4d1785da 100644
--- a/Changelog
+++ b/Changelog
@@ -1,3 +1,4 @@
+
Changelog for 1.2.5
* Partsgroup handling corrected on POS and Sales invoice screens (Chris T)
* Closed books handling is corrected (Chris T)
@@ -9,6 +10,7 @@ Changelog for 1.2.5
* Corrected Exchange Rate display issue (CHris T).
* Corrected number parsing issues with 1.000,00 formats (Chris T).
* Corrected a number of date handling issues and added tests (Seneca).
+* Applied invoice performance patch from Ashley Gittins (Chris T)
Changelog for 1.2.4
* Fixed internal functions avgcost() and lastcost() to not use float (Joshua D)
diff --git a/LedgerSMB/CP.pm b/LedgerSMB/CP.pm
index e7031353..18ab0bde 100755
--- a/LedgerSMB/CP.pm
+++ b/LedgerSMB/CP.pm
@@ -270,7 +270,7 @@ sub get_openinvoices {
my $spoolfile;
while ( $ref = $sth->fetchrow_hashref(NAME_lc) ) {
-
+ $form->db_parse_numeric(sth=>$sth, hashref=>$ref);
# if this is a foreign currency transaction get exchangerate
$ref->{exchangerate} =
$form->get_exchangerate( $dbh, $ref->{curr}, $ref->{transdate},
@@ -394,7 +394,9 @@ sub post_payment {
my $sth = $dbh->prepare($query);
$sth->execute( $form->{currency}, $form->{"id_$i"} );
- my ($exchangerate) = $sth->fetchrow_array();
+ my @exchange = $sth->fetchrow_array();
+ $form->db_parse_numeric(sth=>$sth, arrayref=>\@exchange);
+ my $exchangerate = shift @exchange;
$exchangerate = 1 unless $exchangerate;
diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm
index 423da27d..dafeff19 100755
--- a/LedgerSMB/Form.pm
+++ b/LedgerSMB/Form.pm
@@ -2328,6 +2328,7 @@ sub create_links {
# store amounts in {acc_trans}{$key} for multiple accounts
while ( my $ref = $sth->fetchrow_hashref(NAME_lc) ) {
+ $self->db_parse_numeric(sth=>$sth, hashref=>$ref);
$ref->{exchangerate} =
$self->get_exchangerate( $dbh, $self->{currency},
$ref->{transdate}, $fld );
diff --git a/LedgerSMB/GL.pm b/LedgerSMB/GL.pm
index 2148050b..a3e10b8b 100755
--- a/LedgerSMB/GL.pm
+++ b/LedgerSMB/GL.pm
@@ -439,7 +439,7 @@ sub all_transactions {
$sth->execute || $form->dberror($query);
while ( my $ref = $sth->fetchrow_hashref(NAME_lc) ) {
-
+ $form->db_parse_numeric(sth=>$sth, hashref=>$ref);
# gl
if ( $ref->{type} eq "gl" ) {
$ref->{module} = "gl";
@@ -531,6 +531,7 @@ sub transaction {
$sth->execute( $form->{id} ) || $form->dberror($query);
while ( $ref = $sth->fetchrow_hashref(NAME_lc) ) {
+ $form->db_parse_numeric(sth=>$sth, hashref=>$ref);
if ( $ref->{fx_transaction} ) {
$form->{transfer} = 1;
diff --git a/LedgerSMB/IS.pm b/LedgerSMB/IS.pm
index e04fb1cd..8368c986 100755
--- a/LedgerSMB/IS.pm
+++ b/LedgerSMB/IS.pm
@@ -101,6 +101,8 @@ sub invoice_details {
# account numbers
$pth->execute( $form->{"id_$i"} );
$ref = $pth->fetchrow_hashref(NAME_lc);
+ $form->db_parse_numeric(sth=>$pth, hashref=>$ref);
+
for ( keys %$ref ) { $form->{"${_}_$i"} = $ref->{$_} }
$pth->finish;
@@ -1307,7 +1309,7 @@ sub post_invoice {
transdate, source,
fx_transaction, cleared)
VALUES (?, (SELECT id FROM chart
- WHERE accno = >),
+ WHERE accno = ?),
?, ?, ?, '1', ?)|;
$sth = $dbh->prepare($query);
diff --git a/VERSION b/VERSION
index a3d2e10a..689a94d4 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.2.5
+1.2.6
diff --git a/bin/is.pl b/bin/is.pl
index ac2235d6..af828fb8 100755
--- a/bin/is.pl
+++ b/bin/is.pl
@@ -105,8 +105,7 @@ sub invoice_links {
$form->{oldlanguage_code} = $form->{language_code};
- $form->get_partsgroup( \%myconfig,
- { language_code => $form->{language_code}, searchitems => 'nolabor' } );
+ $form->get_partsgroup( \%myconfig, { all => 1 });
if ( @{ $form->{all_partsgroup} } ) {
$form->{selectpartsgroup} = "<option>\n";
diff --git a/bin/pos.pl b/bin/pos.pl
index 9e5a2114..c60ed7ae 100755
--- a/bin/pos.pl
+++ b/bin/pos.pl
@@ -278,13 +278,7 @@ sub form_header {
if ( $form->{language_code} ne $form->{oldlanguage_code} ) {
# rebuild partsgroup
- $form->get_partsgroup(
- \%myconfig,
- {
- language_code => $form->{language_code},
- searchitems => 'nolabor'
- }
- );
+ $form->get_partsgroup(\%myconfig, { all => 1});
$form->{partsgroup} = "";
for ( @{ $form->{all_partsgroup} } ) {
$form->{partsgroup} .= "$_->{partsgroup}--$_->{translation}\n";