summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-04-24 21:36:14 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-04-24 21:36:14 +0000
commitf3412733c1cc375e9413478a1df387f4d2829fdd (patch)
tree314a5ffd3715bcc6d5ccea579ce0ee27ce0d2007
parent365342d80e6089935d0c977936c2cd36526c8ded (diff)
Updating version strings following release of 1.2.4. Also adding fix for partsgroup handling.
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@1097 4979c152-3d1c-0410-bac9-87ea11338e46
-rw-r--r--Changelog3
-rwxr-xr-xLedgerSMB/Form.pm11
-rwxr-xr-xLedgerSMB/IS.pm4
-rw-r--r--VERSION2
-rw-r--r--dists/rpm/ledgersmb.spec2
-rw-r--r--dists/source/build.sh4
-rwxr-xr-xsql/Spain-ISO-chart.sql9
7 files changed, 18 insertions, 17 deletions
diff --git a/Changelog b/Changelog
index 06e2e025..277a4532 100644
--- a/Changelog
+++ b/Changelog
@@ -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|;
}
}
diff --git a/VERSION b/VERSION
index d0a2a41f..a3d2e10a 100644
--- a/VERSION
+++ b/VERSION
@@ -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
--