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

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



Revision: 3968
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3968&view=rev
Author:   einhverfr
Date:     2011-11-08 08:52:20 +0000 (Tue, 08 Nov 2011)
Log Message:
-----------
Merging from branches/1.3

Modified Paths:
--------------
    trunk/Changelog
    trunk/LedgerSMB/Database.pm
    trunk/LedgerSMB/Form.pm
    trunk/LedgerSMB/OE.pm
    trunk/LedgerSMB/Scripts/setup.pm
    trunk/LedgerSMB.pm
    trunk/bin/ir.pl
    trunk/dists/rpm/ledgersmb.spec
    trunk/doc/Notes.Ubuntu
    trunk/sql/Pg-database.sql
    trunk/sql/modules/LOADORDER
    trunk/sql/modules/Roles.sql
    trunk/templates/demo/printPayment.html

Added Paths:
-----------
    trunk/sql/modules/Fixes.sql
    trunk/sql/upgrade/1.3-1.2.sql

Property Changed:
----------------
    trunk/
    trunk/LedgerSMB/Scripts/admin.pm
    trunk/LedgerSMB/Scripts/employee.pm
    trunk/LedgerSMB/Scripts/setup.pm
    trunk/sql/upgrade/1.2-1.3-manual.sql


Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3:3711-3951
   + /branches/1.3:3711-3967

Modified: trunk/Changelog
===================================================================
--- trunk/Changelog	2011-11-07 23:14:09 UTC (rev 3967)
+++ trunk/Changelog	2011-11-08 08:52:20 UTC (rev 3968)
@@ -13,9 +13,19 @@
 * Corrected case matching error in upgrade script (Chris T)
 * Corrected version number on new databases (Chris T)
 * Corrected multiple load errors on upgrade (David B)
+* Corrected problem creating UTF-8 database on Debian (David B)
+* Corrected display issues with numbers (Herman V)
+* Updated Ubuntu notes (Frans S)
+* Corrected a couple of menu items (David B)
+* Added 1.3-1.2 downgrade script to recover from failed upgrades (Chris T)
+* Corrected ship/receive bug due to invalid join conditions (Chris T)
+* Corrected template error in printPayment.html (Herman V)
+* Form.pl now provides instructions to use setup.pl to correct database
+versioning errors (Chris T)
 
 Chris T is Chris Travers
 David B is David Bandel
+Herman V is Herman Vierendeels
 
 Changelog for LedgerSMB 1.3.3
 * Fix for being unable to delete AR/AP drafts (Herman V)
@@ -32,6 +42,7 @@
 Chris T is Chris Travers
 Herman V is Herman Vierendeels
 Erik H is Erik Huelsman
+Frans S is Frans van der Star
 
 Changelog for LedgerSMB 1.3.2
 * Fixed a few files where suExec fixes were not applied (Chris T)

Modified: trunk/LedgerSMB/Database.pm
===================================================================
--- trunk/LedgerSMB/Database.pm	2011-11-07 23:14:09 UTC (rev 3967)
+++ trunk/LedgerSMB/Database.pm	2011-11-08 08:52:20 UTC (rev 3968)
@@ -250,7 +250,9 @@
 
 =item $db->create();
 
-Creates a database and loads the contrib files.
+Creates a database and loads the contrib files.  This is done from template0, 
+meaning nothing added to template1 will be found in this database.  This was 
+necessary as a workaround for issues on some Debian systems.
 
 Returns true if successful, false of not.  Creates a log called dblog in the 
 temporary directory with all the output from the psql files.  
@@ -263,7 +265,10 @@
 sub create {
     my ($self) = @_;
     
-    my $rc = system("createdb -E UTF8 > $temp/dblog");
+    # We have to use template0 because of issues that Debian has with database 
+    # encoding.  Apparently that causes problems for us, so template0 must be
+    # used.
+    my $rc = system("createdb -t template0 -E UTF8 > $temp/dblog");
     if ($rc) {
         return $rc;
     }

Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm	2011-11-07 23:14:09 UTC (rev 3967)
+++ trunk/LedgerSMB/Form.pm	2011-11-08 08:52:20 UTC (rev 3968)
@@ -2407,6 +2407,7 @@
 
         # 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);#tshvr
             $ref->{exchangerate} =
               $self->get_exchangerate( $dbh, $self->{currency},
                 $ref->{transdate}, $fld );

Modified: trunk/LedgerSMB/OE.pm
===================================================================
--- trunk/LedgerSMB/OE.pm	2011-11-07 23:14:09 UTC (rev 3967)
+++ trunk/LedgerSMB/OE.pm	2011-11-08 08:52:20 UTC (rev 3968)
@@ -152,7 +152,7 @@
         $query = qq|
 			SELECT DISTINCT o.id, o.ordnumber, o.transdate,
 				o.reqdate, o.amount, ct.name, o.netamount, 
-				o.$form->{vc}_id, ex.$rate AS exchangerate,
+				o.entity_credit_account as $form->{vc}_id, ex.$rate AS exchangerate,
 		 		o.closed, o.quonumber, o.shippingpoint, 
 				o.shipvia, ee.name AS employee, o.curr, 
 				o.ponumber
@@ -170,7 +170,8 @@
         }
 
         $query .= qq|
-			LEFT JOIN entity_employee e ON (o.employee_id = e.id)
+                        LEFT JOIN person per ON per.id = o.person_id
+			LEFT JOIN entity_employee e ON (per.entity_id = e.entity_id)
 			LEFT JOIN entity ee ON (e.entity_id = ee.id)
 			LEFT JOIN exchangerate ex 
 				ON (ex.curr = o.curr 


Property changes on: trunk/LedgerSMB/Scripts/admin.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/admin.pm:3901-3951
/branches/1.3/scripts/admin.pl:3711-3903
   + /branches/1.3/LedgerSMB/Scripts/admin.pm:3901-3967
/branches/1.3/scripts/admin.pl:3711-3903


Property changes on: trunk/LedgerSMB/Scripts/employee.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/employee.pm:3712-3951
/branches/1.3/scripts/employee.pl:3842-3843
   + /branches/1.3/LedgerSMB/Scripts/employee.pm:3712-3967
/branches/1.3/scripts/employee.pl:3842-3843

Modified: trunk/LedgerSMB/Scripts/setup.pm
===================================================================
--- trunk/LedgerSMB/Scripts/setup.pm	2011-11-07 23:14:09 UTC (rev 3967)
+++ trunk/LedgerSMB/Scripts/setup.pm	2011-11-08 08:52:20 UTC (rev 3968)
@@ -639,6 +639,7 @@
     $ENV{PGDATABASE} = $request->{database};
     
     $database->load_modules('LOADORDER');
+    $database->process_roles('Roles.sql');
     # Credentials set above via environment variables --CT
     $request->{dbh} = DBI->connect("dbi:Pg:dbname=$request->{database}");
     my $dbh = $request->{dbh};


Property changes on: trunk/LedgerSMB/Scripts/setup.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/setup.pm:3937-3951
/branches/1.3/scripts/setup.pl:3711-3951
   + /branches/1.3/LedgerSMB/Scripts/setup.pm:3937-3967
/branches/1.3/scripts/setup.pl:3711-3967

Modified: trunk/LedgerSMB.pm
===================================================================
--- trunk/LedgerSMB.pm	2011-11-07 23:14:09 UTC (rev 3967)
+++ trunk/LedgerSMB.pm	2011-11-08 08:52:20 UTC (rev 3968)
@@ -835,7 +835,7 @@
 
     ($self->{_role_prefix}) = $sth->fetchrow_array;
     if ($dbversion ne $self->{dbversion}){
-        $self->error("Database is not the expected version.  Was $dbversion, expected $self->{dbversion}");
+        $self->error("Database is not the expected version.  Was $dbversion, expected $self->{dbversion}.  Please re-run setup.pl against this database to correct.");
     }
 
     $sth = $dbh->prepare('SELECT check_expiration()');

Modified: trunk/bin/ir.pl
===================================================================
--- trunk/bin/ir.pl	2011-11-07 23:14:09 UTC (rev 3967)
+++ trunk/bin/ir.pl	2011-11-08 08:52:20 UTC (rev 3968)
@@ -609,10 +609,11 @@
     	        $form->{invtotal} += $form->round_amount($form->{taxes}{$item}, 2);
                 $form->{"${taccno}_total"} =
                     $form->round_amount($form->{taxes}{$item}, 2);
+                my $item_total_formatted=$form->format_amount(\%myconfig,$form->{"${item}_total"},2,0);
                     $tax .= qq|
 	    	    <tr>
 		      <th align=right>$form->{"${item}_description"}</th>
-		      <td align=right>$form->{"${item}_total"}</td>
+		      <td align=right>$item_total_formatted</td>
 	    	    </tr>
 |;
             }

Modified: trunk/dists/rpm/ledgersmb.spec
===================================================================
--- trunk/dists/rpm/ledgersmb.spec	2011-11-07 23:14:09 UTC (rev 3967)
+++ trunk/dists/rpm/ledgersmb.spec	2011-11-08 08:52:20 UTC (rev 3968)
@@ -1,7 +1,7 @@
 # RPM spec written for and tested on CentOS 4 and CentOS 5 
 Summary: LedgerSMB - Open Source accounting software
 Name: ledgersmb
-Version: 1.3.3
+Version: 1.3.4
 Release: 1
 License: GPL
 URL: http://www.ledgersmb.org/

Modified: trunk/doc/Notes.Ubuntu
===================================================================
--- trunk/doc/Notes.Ubuntu	2011-11-07 23:14:09 UTC (rev 3967)
+++ trunk/doc/Notes.Ubuntu	2011-11-08 08:52:20 UTC (rev 3968)
@@ -3,7 +3,7 @@
 
 by Frans van der Star (..hidden..)
 
-Date: 17-10-2011
+Date: 31-10-2011
 
 1. Preliminary Notes
 
@@ -91,8 +91,8 @@
 As stated before this tutorial is only for the LedgerSMB-1.3-series. For the 1.2-series would like to refer to my preliminary notes in 1.
 
 cd /tmp
-wget http://switch.dl.sourceforge.net/sourceforge/ledger-smb/ledgersmb-1.3.0.tar.gz (At the moment, 17-10-2011, most recent version)
-tar xvfz ledgersmb-1.3.0.tar.gz
+wget http://switch.dl.sourceforge.net/sourceforge/ledger-smb/ledgersmb-1.3.2.tar.gz (At the moment, 17-10-2011, most recent version)
+tar xvfz ledgersmb-1.3.2.tar.gz
 sudo mv ledgersmb /usr/local/
 
 5. Configuration modifications and commands, which enable
@@ -105,9 +105,8 @@
 
 chown -R www-data:www-data /usr/local/ledgersmb/
 
-sed -e "s|WORKING_DIR|$PWD|g" /usr/local/ledgersmb/ledgersmb-httpd.conf.template > /etc/apache2/conf.d/ledgersmb-1.3.conf wondering last one is correct
+sed -e "s|WORKING_DIR|$PWD|g" /usr/local/ledgersmb/ledgersmb-httpd.conf.template > /etc/apache2/conf.d/ledgersmb-httpd.conf 
 
-
 mv /usr/local/ledgersmb/ledgersmb.conf.default /usr/local/ledgersmb/ledgersmb.conf
 
 gedit /usr/local/ledgersmb/install.sh
@@ -120,8 +119,6 @@
 
 sudo chmod 777 -R /etc/apache2/conf.d
 
-sudo cp /usr/local/ledgersmb/ledgersmb-httpd.conf.template /etc/apache2/conf.d/ledgersmb-httpd.conf.template
-
 sudo chmod 777 -R /etc/apache2/conf.d/ledgersmb-httpd.conf.template
 
 /etc/init.d/apache2 restart
@@ -153,6 +150,9 @@
 
 \q
 
+Of course you should choose a different password for postgres than 'postgres.'  
+Just remember it for future steps!
+
 createuser --no-superuser --createdb --no-createrole -U postgres --pwprompt --encrypted ledgersmb
 
 fill password of your choice

Modified: trunk/sql/Pg-database.sql
===================================================================
--- trunk/sql/Pg-database.sql	2011-11-07 23:14:09 UTC (rev 3967)
+++ trunk/sql/Pg-database.sql	2011-11-08 08:52:20 UTC (rev 3968)
@@ -2556,8 +2556,8 @@
 64	action	search	148
 65	module	oe.pl	150
 65	action	search	151
-65	type	consolidate_sales_order	152
-64	type	receive_order	149
+65	type	receive_order	152
+64	type	consolidate_sales_order	149
 66	module	oe.pl	153
 66	action	search_transfer	154
 67	menu	1	155

Copied: trunk/sql/modules/Fixes.sql (from rev 3967, branches/1.3/sql/modules/Fixes.sql)
===================================================================
--- trunk/sql/modules/Fixes.sql	                        (rev 0)
+++ trunk/sql/modules/Fixes.sql	2011-11-08 08:52:20 UTC (rev 3968)
@@ -0,0 +1,20 @@
+-- SQL Fixes for upgrades.  These must be safe to run repeatedly, or they must 
+-- fail transactionally.  Please:  one transaction per fix.  
+--
+-- Chris Travers
+
+
+BEGIN; -- 1.3.4, fix for menu-- David Bandel
+update menu_attribute set value = 'receive_order' where value  =
+'consolidate_sales_order' and node_id = '65';
+
+update menu_attribute set id = '149' where value  = 'receive_order'
+and node_id = '65';
+
+update menu_attribute set value = 'consolidate_sales_order' where
+value  = 'receive_order' and node_id = '64';
+
+update menu_attribute set id = '152' where value  =
+'consolidate_sales_order' and node_id = '64';
+
+COMMIT;

Modified: trunk/sql/modules/LOADORDER
===================================================================
--- trunk/sql/modules/LOADORDER	2011-11-07 23:14:09 UTC (rev 3967)
+++ trunk/sql/modules/LOADORDER	2011-11-08 08:52:20 UTC (rev 3968)
@@ -26,3 +26,4 @@
 Util.sql
 Assets.sql
 Files.sql
+Fixes.sql

Modified: trunk/sql/modules/Roles.sql
===================================================================
--- trunk/sql/modules/Roles.sql	2011-11-07 23:14:09 UTC (rev 3967)
+++ trunk/sql/modules/Roles.sql	2011-11-08 08:52:20 UTC (rev 3968)
@@ -1037,7 +1037,7 @@
 WITH INHERIT NOLOGIN
 IN ROLE "lsmb_<?lsmb dbname ?>__contact_read";
 
-GRANT INSERT ON jcitems TO "lsmb_<?lsmb dbname ?>__project_timecard_add";
+GRANT INSERT, UPDATE ON jcitems TO "lsmb_<?lsmb dbname ?>__project_timecard_add";
 GRANT ALL ON jcitems_id_seq TO "lsmb_<?lsmb dbname ?>__project_timecard_add";
 
 INSERT INTO menu_acl (node_id, acl_type, role_name)


Property changes on: trunk/sql/upgrade/1.2-1.3-manual.sql
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/sql/upgrade/1.2-1.3-manual.sql:3712-3951
/branches/1.3/sql/upgrade/1.2-1.3.sql:3711-3851
/trunk/sql/upgrade/1.2-1.3.sql:858-3710
   + /branches/1.3/sql/upgrade/1.2-1.3-manual.sql:3712-3967
/branches/1.3/sql/upgrade/1.2-1.3.sql:3711-3851
/trunk/sql/upgrade/1.2-1.3.sql:858-3710

Copied: trunk/sql/upgrade/1.3-1.2.sql (from rev 3967, branches/1.3/sql/upgrade/1.3-1.2.sql)
===================================================================
--- trunk/sql/upgrade/1.3-1.2.sql	                        (rev 0)
+++ trunk/sql/upgrade/1.3-1.2.sql	2011-11-08 08:52:20 UTC (rev 3968)
@@ -0,0 +1,17 @@
+
+BEGIN;
+ALTER SCHEMA public RENAME TO lsmb_13fail;
+ALTER SCHEMA lsmb12 RENAME TO public;
+COMMIT;
+
+BEGIN;
+ALTER TABLE vendor DROP COLUMN entity_id;
+ALTER TABLE vendor DROP COLUMN company_id;
+ALTER TABLE vendor DROP COLUMN credit_id;
+
+ALTER TABLE customer DROP COLUMN entity_id;
+ALTER TABLE customer DROP COLUMN company_id;
+ALTER TABLE customer DROP COLUMN credit_id;
+
+ALTER TABLE employee DROP COLUMN entity_id;
+COMMIT;

Modified: trunk/templates/demo/printPayment.html
===================================================================
--- trunk/templates/demo/printPayment.html	2011-11-07 23:14:09 UTC (rev 3967)
+++ trunk/templates/demo/printPayment.html	2011-11-08 08:52:20 UTC (rev 3968)
@@ -63,7 +63,7 @@
            </tr>
       <?lsmb END -?>
 	  <tr valign="top">
-          	<th align="right" colspan="4"> &nbsp; <?lsmb text('TOTAL' ?></th>
+          	<th align="right" colspan="4"> &nbsp; <?lsmb text('TOTAL') ?></th>
           	<td align="center"> <?lsmb header.amount ?>     </td>
           </tr>
  </table>

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