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

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



Revision: 3810
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3810&view=rev
Author:   einhverfr
Date:     2011-10-07 22:07:51 +0000 (Fri, 07 Oct 2011)
Log Message:
-----------
Merging from branches/1.3

Modified Paths:
--------------
    trunk/CONTRIBUTORS
    trunk/old-handler.pl
    trunk/scripts/recon.pl
    trunk/scripts/setup.pl
    trunk/sql/Pg-database.sql
    trunk/sql/upgrade/1.2-1.3-manual.sql
    trunk/sql/upgrade/1.2-1.3.sql
    trunk/sql/upgrade/1.2-pre-upgrade-checks.sql

Added Paths:
-----------
    trunk/sql/upgrade/3808-language-table.sql

Property Changed:
----------------
    trunk/


Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3:3711-3801
   + /branches/1.3:3711-3809

Modified: trunk/CONTRIBUTORS
===================================================================
--- trunk/CONTRIBUTORS	2011-10-07 21:45:36 UTC (rev 3809)
+++ trunk/CONTRIBUTORS	2011-10-07 22:07:51 UTC (rev 3810)
@@ -48,8 +48,8 @@
 John Hasler <john @ dhh.gt.org> has provided some double-entry information for
 the manual and miscellaneous documentation corrections.
 
-Louis B. Moore has provided the documentation on the command-line API and helped
-with upgrade scripts.
+Louis B. Moore <lbmlist @ hethcote.com> has provided the documentation on the 
+command-line API and helped with upgrade scripts, both for 1.2 and 1.3.
 
 Rich Walker <rw @ shadowrobot.com> has provided assistance in the dists/deb 
 documentation for Debian installations.

Modified: trunk/old-handler.pl
===================================================================
--- trunk/old-handler.pl	2011-10-07 21:45:36 UTC (rev 3809)
+++ trunk/old-handler.pl	2011-10-07 22:07:51 UTC (rev 3810)
@@ -145,6 +145,8 @@
 
 if ( $form->{action} ) {
 
+    binmode STDOUT, ':utf8';
+    binmode STDERR, ':utf8';
     # window title bar, user info
     $form->{titlebar} =
         "LedgerSMB "

Modified: trunk/scripts/recon.pl
===================================================================
--- trunk/scripts/recon.pl	2011-10-07 21:45:36 UTC (rev 3809)
+++ trunk/scripts/recon.pl	2011-10-07 22:07:51 UTC (rev 3810)
@@ -381,16 +381,13 @@
                {amount => $recon->{total_uncleared_credits}, money => 1}
         );
 	$recon->{their_total} = $recon->format_amount(
-		{amount => $recon->{their_total}, money => 1});
+		{amount => $recon->{their_total} * $neg_factor, money => 1});
 	$recon->{our_total} = $recon->format_amount(
 		{amount => $recon->{our_total}, money => 1});
 	$recon->{beginning_balance} = $recon->format_amount(
 		{amount => $recon->{beginning_balance}, money => 1});
 	$recon->{out_of_balance} = $recon->format_amount(
 		{amount => $recon->{out_of_balance}, money => 1});
-        if ($recon->{account_info}->{category} =~ /(A|E)/){
-           $recon->{their_total} *= -1;
-        }
 
         return $template->render($recon);
 }
@@ -403,10 +400,14 @@
 =cut
 sub new_report {
     my ($request) = @_;
-    
+
+    $request->{total} = $request->parse_amount(amount => $request->{total});
     my $template;
     my $return;
     my $recon = LedgerSMB::DBObject::Reconciliation->new(base => $request, copy => 'all'); 
+    # This method detection makes debugging a bit harder.
+    # Not sure I like it but won't refactor until 1.4..... --CT
+    #
     if ($request->type() eq "POST") {
         
         # We can assume that we're doing something useful with new data.

Modified: trunk/scripts/setup.pl
===================================================================
--- trunk/scripts/setup.pl	2011-10-07 21:45:36 UTC (rev 3809)
+++ trunk/scripts/setup.pl	2011-10-07 22:07:51 UTC (rev 3810)
@@ -185,6 +185,16 @@
          edit => 'employeenumber',
         table => 'employee'},
 
+       {query => 'SELECT * FROM employee 
+                   WHERE employeenumber IN 
+                         (SELECT employeenumber FROM employee 
+                        GROUP BY employeenumber
+                          HAVING count(*) > 1)',
+         name => $locale->text('Duplicte employee numbers'),
+         cols => ['login', 'name', 'employeenumber'],
+         edit => 'employeenumber',
+        table => 'employee'},
+
        {query => "select * from parts where obsolete is not true 
                   and partnumber in 
                   (select partnumber from parts 
@@ -545,10 +555,11 @@
 
 =item cancel
 
-Cancels work.  If the confirm is set to no, returns to the credential screen
+Cancels work.  Returns to login screen.
 
 =cut
 sub cancel{
+    __default(@_);
 }
 
 =back

Modified: trunk/sql/Pg-database.sql
===================================================================
--- trunk/sql/Pg-database.sql	2011-10-07 21:45:36 UTC (rev 3809)
+++ trunk/sql/Pg-database.sql	2011-10-07 22:07:51 UTC (rev 3810)
@@ -1655,6 +1655,47 @@
 
 COMMENT ON TABLE language IS
 $$ Languages for manual translations and so forth.$$;
+
+INSERT INTO language (code, description)
+VALUES ('ar_EG', 'Arabic (Egypt)'),
+       ('bg',    'Bulgarian'), 
+       ('ca',    'Catalan'),
+       ('cs',    'Czech'),
+       ('da',    'Danish'),
+       ('de',    'German'),
+       ('de_CH', 'German (Switzerland)'),
+       ('el',    'Greek'),
+       ('en',    'English'),
+       ('es',    'Spanish'),
+       ('es_CO', 'Spanish (Colombia)'),
+       ('es_EC', 'Spanish (Ecuador)'),
+       ('es_MX', 'Spanish (Mexico)'),
+       ('es_PA', 'Spanish (Panama)'),
+       ('es_PY', 'Spanish (Paraguay)'),
+       ('es_VE', 'Spanish (Venezuela)'),
+       ('et',    'Estonian'),
+       ('fi',    'Finnish'),
+       ('fr',    'French'),
+       ('fr_BE', 'French (Belgium)'),
+       ('fr_CA', 'French (Canada)'),
+       ('hu',    'Hungarian'),
+       ('id',    'Indonesian'),
+       ('is',    'Icelandic'),
+       ('it',    'Italian'),
+       ('lt',    'Latvian'),
+       ('nb',    'Norwegian'),
+       ('nl',    'Dutch'),
+       ('nl_BE', 'Dutch (Belgium)'),
+       ('pl',    'Polish'),
+       ('pt',    'Portuguese'),
+       ('pt_BR', 'Portuguese (Brazil)'),
+       ('ru',    'Russian'),
+       ('sv',    'Swedish'),
+       ('tr',    'Turkish'),
+       ('uk',    'Ukranian'),
+       ('zh_CN', 'Chinese (China)'),
+       ('zh_TW', 'Chinese (Taiwan)');
+
 --
 CREATE TABLE audittrail (
   trans_id int,

Modified: trunk/sql/upgrade/1.2-1.3-manual.sql
===================================================================
--- trunk/sql/upgrade/1.2-1.3-manual.sql	2011-10-07 21:45:36 UTC (rev 3809)
+++ trunk/sql/upgrade/1.2-1.3-manual.sql	2011-10-07 22:07:51 UTC (rev 3810)
@@ -576,7 +576,7 @@
 INSERT INTO audittrail(trans_id, tablename, reference, formname, action,
             transdate, person_id, entry_id)
      SELECT trans_id, tablename, reference, formname, action,
-            transdate, p.id, entry_id
+            transdate, p.entity_id, entry_id
        FROM lsmb12.audittrail a
        JOIN lsmb12.employee e ON a.employee_id = e.id
        JOIN person p on e.entity_id = p.entity_id;

Modified: trunk/sql/upgrade/1.2-1.3.sql
===================================================================
--- trunk/sql/upgrade/1.2-1.3.sql	2011-10-07 21:45:36 UTC (rev 3809)
+++ trunk/sql/upgrade/1.2-1.3.sql	2011-10-07 22:07:51 UTC (rev 3810)
@@ -574,7 +574,7 @@
 INSERT INTO audittrail(trans_id, tablename, reference, formname, action,
             transdate, person_id, entry_id)
      SELECT trans_id, tablename, reference, formname, action,
-            transdate, p.id, entry_id
+            transdate, p.entity_id, entry_id
        FROM lsmb12.audittrail a
        JOIN lsmb12.employee e ON a.employee_id = e.id
        JOIN person p on e.entity_id = p.entity_id;

Modified: trunk/sql/upgrade/1.2-pre-upgrade-checks.sql
===================================================================
--- trunk/sql/upgrade/1.2-pre-upgrade-checks.sql	2011-10-07 21:45:36 UTC (rev 3809)
+++ trunk/sql/upgrade/1.2-pre-upgrade-checks.sql	2011-10-07 22:07:51 UTC (rev 3810)
@@ -10,6 +10,10 @@
 
 SELECT * FROM employee where employeenumber IS NULL;
 
+SELECT * FROM employee WHERE employeenumber IN 
+       (SELECT employeenumber FROM employee GROUP BY employeenumber
+        HAVING count(*) > 1);
+
 select partnumber, count(*) from parts 
  WHERE obsolete is not true
 group by partnumber having count(*) > 1;

Copied: trunk/sql/upgrade/3808-language-table.sql (from rev 3809, branches/1.3/sql/upgrade/3808-language-table.sql)
===================================================================
--- trunk/sql/upgrade/3808-language-table.sql	                        (rev 0)
+++ trunk/sql/upgrade/3808-language-table.sql	2011-10-07 22:07:51 UTC (rev 3810)
@@ -0,0 +1,40 @@
+INSERT INTO language (code, description)
+VALUES ('ar_EG', 'Arabic (Egypt)'),
+       ('bg',    'Bulgarian'), 
+       ('ca',    'Catalan'),
+       ('cs',    'Czech'),
+       ('da',    'Danish'),
+       ('de',    'German'),
+       ('de_CH', 'German (Switzerland)'),
+       ('el',    'Greek'),
+       ('en',    'English'),
+       ('es',    'Spanish'),
+       ('es_CO', 'Spanish (Colombia)'),
+       ('es_EC', 'Spanish (Ecuador)'),
+       ('es_MX', 'Spanish (Mexico)'),
+       ('es_PA', 'Spanish (Panama)'),
+       ('es_PY', 'Spanish (Paraguay)'),
+       ('es_VE', 'Spanish (Venezuela)'),
+       ('et',    'Estonian'),
+       ('fi',    'Finnish'),
+       ('fr',    'French'),
+       ('fr_BE', 'French (Belgium)'),
+       ('fr_CA', 'French (Canada)'),
+       ('hu',    'Hungarian'),
+       ('id',    'Indonesian'),
+       ('is',    'Icelandic'),
+       ('it',    'Italian'),
+       ('lt',    'Latvian'),
+       ('nb',    'Norwegian'),
+       ('nl',    'Dutch'),
+       ('nl_BE', 'Dutch (Belgium)'),
+       ('pl',    'Polish'),
+       ('pt',    'Portuguese'),
+       ('pt_BR', 'Portuguese (Brazil)'),
+       ('ru',    'Russian'),
+       ('sv',    'Swedish'),
+       ('tr',    'Turkish'),
+       ('uk',    'Ukranian'),
+       ('zh_CN', 'Chinese (China)'),
+       ('zh_TW', 'Chinese (Taiwan)');
+

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