diff options
-rw-r--r-- | Changelog | 3 | ||||
-rwxr-xr-x | LedgerSMB/Form.pm | 11 | ||||
-rwxr-xr-x | LedgerSMB/IS.pm | 4 | ||||
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | dists/rpm/ledgersmb.spec | 2 | ||||
-rw-r--r-- | dists/source/build.sh | 4 | ||||
-rwxr-xr-x | sql/Spain-ISO-chart.sql | 9 |
7 files changed, 18 insertions, 17 deletions
@@ -1,3 +1,6 @@ +Changelog for 1.2.5 +* Partsgroup handling corrected on POS and Sales invoice screens (Chris T) + Changelog for 1.2.4 * Fixed internal functions avgcost() and lastcost() to not use float (Joshua D) * Fixed error posting vendor invoice with fraction costs. (Chris M) diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm index bb0a5ab7..fbf678af 100755 --- a/LedgerSMB/Form.pm +++ b/LedgerSMB/Form.pm @@ -80,7 +80,7 @@ sub new { #menubar will be deprecated, replaced with below $self->{lynx} = 1 if $self->{path} =~ /lynx/i; - $self->{version} = "1.2.4"; + $self->{version} = "1.2.5"; $self->{dbversion} = "1.2.0"; bless $self, $type; @@ -515,7 +515,7 @@ sub parse_amount { my ( $self, $myconfig, $amount ) = @_; - if ( ( $amount eq '' ) or ( $amount eq undef ) ) { + if ( ( $amount eq '' ) or ( ! defined $amount ) ) { $amount = 0; } @@ -548,7 +548,14 @@ sub parse_amount { $amount = $1 * -1; } $amount =~ s/\s?CR//; + + $amount =~ /(\d*)\.(\d*)/; + + my $decimalplaces = length $1 + length $2; + $amount = new Math::BigFloat($amount); + $amount->accuracy($decimalplaces); + return ( $amount * 1 ); } diff --git a/LedgerSMB/IS.pm b/LedgerSMB/IS.pm index 7e6ed8a2..c192c255 100755 --- a/LedgerSMB/IS.pm +++ b/LedgerSMB/IS.pm @@ -1875,8 +1875,7 @@ sub retrieve_item { if ( $form->{"partsgroup_$i"} ne "" ) { ( $null, $var ) = split /--/, $form->{"partsgroup_$i"}; - $var = $dbh->quote($var); - if ( $var == 0 ) { + if ( ! $var ) { # search by partsgroup, this is for the POS $where .= @@ -1884,6 +1883,7 @@ sub retrieve_item { . $dbh->quote( $form->{"partsgroup_$i"} ); } else { + $var = $dbh->quote($var); $where .= qq| AND p.partsgroup_id = $var|; } } @@ -1 +1 @@ -1.2.4 +1.2.5 diff --git a/dists/rpm/ledgersmb.spec b/dists/rpm/ledgersmb.spec index e81a6e6a..8ebdf625 100644 --- a/dists/rpm/ledgersmb.spec +++ b/dists/rpm/ledgersmb.spec @@ -1,7 +1,7 @@ # RPM spec written for and tested on Fedora Core 6 Summary: LedgerSMB - Open Source accounting software Name: ledgersmb -Version: 1.2.4 +Version: 1.2.5 Release: 1 License: GPL URL: http://www.ledgersmb.org/ diff --git a/dists/source/build.sh b/dists/source/build.sh index eb83c915..702053b6 100644 --- a/dists/source/build.sh +++ b/dists/source/build.sh @@ -9,8 +9,8 @@ else pgdoc="true"; fi -version="1.2.4"; -rpmversion="1.2.4"; +version="1.2.5"; +rpmversion="1.2.5"; build_d="../release"; if test -d blib; then diff --git a/sql/Spain-ISO-chart.sql b/sql/Spain-ISO-chart.sql index 97791427..34fe3d79 100755 --- a/sql/Spain-ISO-chart.sql +++ b/sql/Spain-ISO-chart.sql @@ -113,19 +113,10 @@ INSERT INTO "tax" ("chart_id", "rate") VALUES ((SELECT id FROM chart WHERE accno INSERT INTO "tax" ("chart_id", "rate") VALUES ((SELECT id FROM chart WHERE accno = '472000002'), 0.07); INSERT INTO "tax" ("chart_id", "rate") VALUES ((SELECT id FROM chart WHERE accno = '472000003'), 0.16); -- Recargo equivalente: 0.5, 1 or 4% -INSERT INTO "tax" ("chart_id", "rate") VALUES ((SELECT id FROM chart WHERE accno = '472000004'), 0.005); -INSERT INTO "tax" ("chart_id", "rate") VALUES ((SELECT id FROM chart WHERE accno = '472000005'), 0.01); -INSERT INTO "tax" ("chart_id", "rate") VALUES ((SELECT id FROM chart WHERE accno = '472000006'), 0.04); --- --- IVA repercutido INSERT INTO "tax" ("chart_id", "rate") VALUES ((SELECT id FROM chart WHERE accno = '477000000'), 0.0); INSERT INTO "tax" ("chart_id", "rate") VALUES ((SELECT id FROM chart WHERE accno = '477000001'), 0.04); INSERT INTO "tax" ("chart_id", "rate") VALUES ((SELECT id FROM chart WHERE accno = '477000002'), 0.07); INSERT INTO "tax" ("chart_id", "rate") VALUES ((SELECT id FROM chart WHERE accno = '477000003'), 0.16); --- Recargo equivalente: 0.5, 1 or 4% -INSERT INTO "tax" ("chart_id", "rate") VALUES ((SELECT id FROM chart WHERE accno = '477000004'), 0.005); -INSERT INTO "tax" ("chart_id", "rate") VALUES ((SELECT id FROM chart WHERE accno = '477000005'), 0.01); -INSERT INTO "tax" ("chart_id", "rate") VALUES ((SELECT id FROM chart WHERE accno = '477000006'), 0.04); -- -- update defaults -- |