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

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



Revision: 4047
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4047&view=rev
Author:   einhverfr
Date:     2011-11-24 11:08:10 +0000 (Thu, 24 Nov 2011)
Log Message:
-----------
Merging from 1.3

Modified Paths:
--------------
    trunk/Changelog
    trunk/UI/Contact/pricelist.html
    trunk/sql/Pg-database.sql
    trunk/sql/modules/Company.sql
    trunk/sql/modules/Fixes.sql

Property Changed:
----------------
    trunk/
    trunk/LedgerSMB/Scripts/admin.pm
    trunk/LedgerSMB/Scripts/employee.pm
    trunk/LedgerSMB/Scripts/payment.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-4043
   + /branches/1.3:3711-4046

Modified: trunk/Changelog
===================================================================
--- trunk/Changelog	2011-11-24 10:33:46 UTC (rev 4046)
+++ trunk/Changelog	2011-11-24 11:08:10 UTC (rev 4047)
@@ -9,6 +9,9 @@
 Initial Release:  Monday, Oct 12 2011
 Supported Presently
 
+Changelog for LedgerSMB 1.3.7
+* Added foreign key of entity_credit_account.language_code (Herman V)
+
 Changelog for LedgerSMB 1.3.6
 * Including xelatex templates under directory templates/xedemo (Chris T)
 * Fix for company name in order entry (David B)


Property changes on: trunk/LedgerSMB/Scripts/admin.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/admin.pm:3901-4043
/branches/1.3/scripts/admin.pl:3711-3903
   + /branches/1.3/LedgerSMB/Scripts/admin.pm:3901-4046
/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-4043
/branches/1.3/scripts/employee.pl:3842-3843
   + /branches/1.3/LedgerSMB/Scripts/employee.pm:3712-4046
/branches/1.3/scripts/employee.pl:3842-3843


Property changes on: trunk/LedgerSMB/Scripts/payment.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/payment.pm:4010-4043
/branches/1.3/scripts/payment.pl:3711-4011
   + /branches/1.3/LedgerSMB/Scripts/payment.pm:4010-4046
/branches/1.3/scripts/payment.pl:3711-4011


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

Modified: trunk/UI/Contact/pricelist.html
===================================================================
--- trunk/UI/Contact/pricelist.html	2011-11-24 10:33:46 UTC (rev 4046)
+++ trunk/UI/Contact/pricelist.html	2011-11-24 11:08:10 UTC (rev 4047)
@@ -11,7 +11,7 @@
 
 -->
 <body>
-<div class="listtop"><?lsmb text('Pricelist') ?></div>
+<div class="listtop"><?lsmb text('Pricelist') ?> <?lsmb pricematrix.length ?></div>
 <table>
 <tr class="listheading">
 <th class="listheading"><?lsmb text('Partnumber') ?></th>

Modified: trunk/sql/Pg-database.sql
===================================================================
--- trunk/sql/Pg-database.sql	2011-11-24 10:33:46 UTC (rev 4046)
+++ trunk/sql/Pg-database.sql	2011-11-24 11:08:10 UTC (rev 4047)
@@ -153,6 +153,54 @@
 COMMENT ON TABLE pricegroup IS
 $$ Pricegroups are groups of customers who are assigned prices and discounts
 together.$$;
+--TABLE language moved here because of later references
+CREATE TABLE language (
+  code varchar(6) PRIMARY KEY,
+  description text
+);
+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'),
+       ('en_US', 'English (US)'),
+       ('en_GB', 'English (UK)'),
+       ('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)');
 -- country and tax form
 
 CREATE TABLE country (
@@ -420,7 +468,7 @@
 
 
 
-create table country_tax_form (                                                    country_id int references country(id) not null,
+create table country_tax_form (country_id int  references country(id) not null,
    form_name text not null,
    id serial not null unique,
    default_reportable bool not null default false,
@@ -784,7 +832,7 @@
     terms int2 default 0,
     meta_number varchar(32),
     business_id int,
-    language_code varchar(6),
+    language_code varchar(6) DEFAULT 'en' references language(code) ON DELETE SET DEFAULT,
     pricegroup_id int references pricegroup(id),
     curr char(3),
     startdate date DEFAULT CURRENT_DATE,
@@ -801,7 +849,7 @@
 );
 
 COMMENT ON TABLE entity_credit_account IS
-$$This table stores informmation relating to general relationships regarding 
+$$This table stores information relating to general relationships regarding 
 moneys owed on invoice.  Invoices, whether AR or AP, must be attached to 
 a record in this table.$$;
 
@@ -1629,50 +1677,6 @@
 $$ Tracks per-customer pricing.  Discounts can be offered for periods of time
 and for pricegroups as well as per customer$$;
 --
-
-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'),
-       ('en_US', 'English (US)'),
-       ('en_GB', 'English (UK)'),
-       ('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,
   tablename text,

Modified: trunk/sql/modules/Company.sql
===================================================================
--- trunk/sql/modules/Company.sql	2011-11-24 10:33:46 UTC (rev 4046)
+++ trunk/sql/modules/Company.sql	2011-11-24 11:08:10 UTC (rev 4047)
@@ -1334,7 +1334,7 @@
 
 -- pricematrix
 
-CREATE OR REPLACE FUNCTION eca__get_pricematrix_by_pricegroup(in_id int)
+CREATE OR REPLACE FUNCTION eca__get_pricematrix_by_pricegroup(in_credit_id int)
 RETURNS SETOF eca__pricematrix AS
 $$
 SELECT pc.parts_id, p.partnumber, p.description, pc.credit_id, pc.pricebreak,
@@ -1346,7 +1346,7 @@
  WHERE eca.id = $1 AND eca.entity_class = 2
 $$ LANGUAGE SQL;
 
-CREATE OR REPLACE FUNCTION eca__get_pricematrix(in_id int) 
+CREATE OR REPLACE FUNCTION eca__get_pricematrix(in_credit_id int) 
 RETURNS SETOF eca__pricematrix AS
 $$
 
@@ -1369,7 +1369,7 @@
 
 $$ language sql;
 
-COMMENT ON FUNCTION eca__get_pricematrix(in_id int) IS
+COMMENT ON FUNCTION eca__get_pricematrix(in_credit_id int) IS
 $$ This returns the pricematrix for the customer or vendor 
 (entity_credit_account identified by in_id), orderd by partnumber, validfrom
 $$;

Modified: trunk/sql/modules/Fixes.sql
===================================================================
--- trunk/sql/modules/Fixes.sql	2011-11-24 10:33:46 UTC (rev 4046)
+++ trunk/sql/modules/Fixes.sql	2011-11-24 11:08:10 UTC (rev 4047)
@@ -25,3 +25,11 @@
 UPDATE menu_attribute SET value = 'pricegroup' WHERE node_id = 92 and attribute = 'type';
 
 COMMIT;
+
+BEGIN;
+ALTER TABLE entity_credit_account drop constraint "entity_credit_account_language_code_fkey";
+COMMIT;
+
+BEGIN;
+ALTER TABLE entity_credit_account ADD FOREIGN KEY (language_code) REFERENCES language(code);
+COMMIT;


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-4043
/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-4046
/branches/1.3/sql/upgrade/1.2-1.3.sql:3711-3851
/trunk/sql/upgrade/1.2-1.3.sql:858-3710

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