[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [250] trunk



Revision: 250
          http://svn.sourceforge.net/ledger-smb/?rev=250&view=rev
Author:   einhverfr
Date:     2006-10-20 22:30:50 -0700 (Fri, 20 Oct 2006)

Log Message:
-----------
Modified parsing to return undef on empty string.
Modified CT to use 0 credit limit if none provided.
Added On Hand column to invoices.
Dropped foreign key constrant on acc_trans.trans_id due to limitations in current API (will be in a future version).

Modified Paths:
--------------
    trunk/LedgerSMB/CT.pm
    trunk/LedgerSMB/Form.pm
    trunk/bin/io.pl
    trunk/sql/Pg-tables.sql
    trunk/sql/Pg-upgrade-2.6.18-2.6.19.sql

Modified: trunk/LedgerSMB/CT.pm
===================================================================
--- trunk/LedgerSMB/CT.pm	2006-10-21 04:36:44 UTC (rev 249)
+++ trunk/LedgerSMB/CT.pm	2006-10-21 05:30:50 UTC (rev 250)
@@ -208,6 +208,9 @@
 	$form->{terms} *= 1;
 	$form->{taxincluded} *= 1;
 	$form->{creditlimit} = $form->parse_amount($myconfig, $form->{creditlimit});
+	if (!$form->{creditlimit}){
+		$form->{creditlimit} = 0;
+	}
 
 
 	if ($form->{id}) {

Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm	2006-10-21 04:36:44 UTC (rev 249)
+++ trunk/LedgerSMB/Form.pm	2006-10-21 05:30:50 UTC (rev 250)
@@ -490,6 +490,10 @@
 
 	my ($self, $myconfig, $amount) = @_;
 
+	if ($amount eq '') {
+		return undef;
+	}
+
 	if (UNIVERSAL::isa($amount, 'Math::BigFloat')){ # Amount may not be an object	
 		return $amount;
 	}

Modified: trunk/bin/io.pl
===================================================================
--- trunk/bin/io.pl	2006-10-21 04:36:44 UTC (rev 249)
+++ trunk/bin/io.pl	2006-10-21 05:30:50 UTC (rev 250)
@@ -120,7 +120,7 @@
   }
       
 
-  push @column_index, qw(unit sellprice discount linetotal);
+  push @column_index, qw(unit onhand sellprice discount linetotal);
 
   my $colspan = $#column_index + 1;
 

Modified: trunk/sql/Pg-tables.sql
===================================================================
--- trunk/sql/Pg-tables.sql	2006-10-21 04:36:44 UTC (rev 249)
+++ trunk/sql/Pg-tables.sql	2006-10-21 05:30:50 UTC (rev 250)
@@ -78,7 +78,7 @@
 );
 --
 CREATE TABLE acc_trans (
-  trans_id int REFERENCES transactions(id),
+  trans_id int,
   chart_id int NOT NULL REFERENCES chart (id),
   amount NUMERIC,
   transdate date DEFAULT current_date,

Modified: trunk/sql/Pg-upgrade-2.6.18-2.6.19.sql
===================================================================
--- trunk/sql/Pg-upgrade-2.6.18-2.6.19.sql	2006-10-21 04:36:44 UTC (rev 249)
+++ trunk/sql/Pg-upgrade-2.6.18-2.6.19.sql	2006-10-21 05:30:50 UTC (rev 250)
@@ -1,5 +1,3 @@
-ALTER TABLE acc_trans ADD FOREIGN KEY (trans_id) REFERENCES transactions (id);
-
 ALTER TABLE ap ADD PRIMARY KEY (id);
 
 ALTER TABLE ar ADD PRIMARY KEY (id);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.