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

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



Revision: 6363
          http://sourceforge.net/p/ledger-smb/code/6363
Author:   ehuelsmann
Date:     2014-01-03 10:30:43 +0000 (Fri, 03 Jan 2014)
Log Message:
-----------
Fix upgrade requirement check.

Modified Paths:
--------------
    trunk/LedgerSMB/Scripts/setup.pm
    trunk/sql/upgrade/sl2.8-1.3.sql
    trunk/sql/upgrade/sql-ledger2ledgersmb-wip.sql

Modified: trunk/LedgerSMB/Scripts/setup.pm
===================================================================
--- trunk/LedgerSMB/Scripts/setup.pm	2014-01-03 09:19:40 UTC (rev 6362)
+++ trunk/LedgerSMB/Scripts/setup.pm	2014-01-03 10:30:43 UTC (rev 6363)
@@ -363,7 +363,7 @@
 sub applicable_for_upgrade {
     my ($info, $upgrade) = @_;
 
-    foreach my $check ($info_applicable_for_upgrade{$info}) {
+    foreach my $check (@{$info_applicable_for_upgrade{$info}}) {
 	return 1
 	    if $check eq $upgrade;
     }

Modified: trunk/sql/upgrade/sl2.8-1.3.sql
===================================================================
--- trunk/sql/upgrade/sl2.8-1.3.sql	2014-01-03 09:19:40 UTC (rev 6362)
+++ trunk/sql/upgrade/sl2.8-1.3.sql	2014-01-03 10:30:43 UTC (rev 6363)
@@ -26,10 +26,10 @@
 SELECT id, accno, description
   FROM sl28.chart WHERE charttype = 'H';
 
-SELECT account_save(id, accno, description, category, gifi_accno, NULL::int,
+SELECT account__save(id, accno, description, category, gifi_accno, NULL::int,
                     contra,
                     CASE WHEN link like '%tax%' THEN true ELSE false END,
-                    string_to_array(link,':'))
+                    string_to_array(link,':'), 'f', 'f')
   FROM sl28.chart
  WHERE charttype = 'A';
 
@@ -62,7 +62,7 @@
 	cash_account_id, startdate, enddate, threshold, entity_class)
 SELECT entity_id, vendornumber, business_id, creditlimit, arap_accno_id, 
 	payment_accno_id, startdate, enddate, threshold, 1
-FROM orig.vendor WHERE entity_id IS NOT NULL);
+FROM sl28.vendor WHERE entity_id IS NOT NULL;
 
 UPDATE sl28.vendor SET credit_id = 
 	(SELECT id FROM entity_credit_account e 
@@ -74,7 +74,7 @@
 	cash_account_id, startdate, enddate, threshold, entity_class)
 SELECT entity_id, vendornumber, business_id, creditlimit, arap_accno_id, 
 	payment_accno_id, startdate, enddate, threshold, 2
-FROM orig.customer WHERE entity_id IS NOT NULL);
+FROM sl28.customer WHERE entity_id IS NOT NULL;
 
 UPDATE sl28.customer SET credit_id = 
 	(SELECT id FROM entity_credit_account e 
@@ -345,7 +345,7 @@
 	on_hold, approved, reverse, terms, description)
 SELECT 
 	customer.credit_id,
-	(select entity_id from orig.employee 
+	(select entity_id from sl28.employee 
 		WHERE id = ap.employee_id),
 	ap.id, invnumber, transdate, ap.taxincluded, amount, netamount, paid, 
 	datepaid, duedate, invoice, ordnumber, ap.curr, ap.notes, quonumber, 
@@ -353,7 +353,7 @@
 	department_id, shipvia, ap.language_code, ponumber, shippingpoint, 
 	onhold, approved, case when amount < 0 then true else false end,
 	ap.terms, description
-FROM orig.ar JOIN orig.customer ON (ap.vendor_id = customer.id) ;
+FROM sl28.ar JOIN sl28.customer ON (ap.vendor_id = customer.id) ;
 
 ALTER TABLE ar ENABLE TRIGGER ar_audit_trail;
 
@@ -367,7 +367,7 @@
 	on_hold, approved, reverse, terms, description)
 SELECT 
 	vendor.credit_id,
-	(select entity_id from orig.employee 
+	(select entity_id from sl28.employee 
 		WHERE id = ap.employee_id),
 	ap.id, invnumber, transdate, ap.taxincluded, amount, netamount, paid, 
 	datepaid, duedate, invoice, ordnumber, ap.curr, ap.notes, quonumber, 
@@ -375,7 +375,7 @@
 	department_id, shipvia, ap.language_code, ponumber, shippingpoint, 
 	onhold, approved, case when amount < 0 then true else false end,
 	ap.terms, description
-FROM orig.ap JOIN orig.vendor ON (ap.vendor_id = vendor.id) ;
+FROM sl28.ap JOIN sl28.vendor ON (ap.vendor_id = vendor.id) ;
 
 ALTER TABLE ap ENABLE TRIGGER ap_audit_trail;
 
@@ -386,7 +386,7 @@
 SELECT trans_id, chart_id, amount, transdate, source,
 	CASE WHEN cleared IS NOT NULL THEN TRUE ELSE FALSE END, fx_transaction,
 	project_id, memo, approved, cleared, reconciled, vr_id
-	FROM orig.acc_trans ;
+	FROM sl28.acc_trans ;
 
 INSERT INTO invoice (id, trans_id, parts_id, description, qty, allocated,
             sellprice, fxsellprice, discount, assemblyitem, unit, project_id,

Modified: trunk/sql/upgrade/sql-ledger2ledgersmb-wip.sql
===================================================================
--- trunk/sql/upgrade/sql-ledger2ledgersmb-wip.sql	2014-01-03 09:19:40 UTC (rev 6362)
+++ trunk/sql/upgrade/sql-ledger2ledgersmb-wip.sql	2014-01-03 10:30:43 UTC (rev 6363)
@@ -1,30 +1,5 @@
-ALTER SCHEMA public RENAME TO orig;
-CREATE SCHEMA public;
 
-\i /usr/local/src/postgresql-8.2.6/contrib/tsearch2/tsearch2.sql
-\i /usr/local/src/postgresql-8.2.6/contrib/pg_trgm/pg_trgm.sql
-\i /usr/local/src/postgresql-8.2.6/contrib/tablefunc/tablefunc.sql
-\i /home/ledgersmb/ledger-smb/sql/Pg-database.sql
-\i /home/ledgersmb/ledger-smb/sql/modules/Account.sql
-\i /home/ledgersmb/ledger-smb/sql/modules/Session.sql
-\i /home/ledgersmb/ledger-smb/sql/modules/chart.sql
-\i /home/ledgersmb/ledger-smb/sql/modules/Business_type.sql
-\i /home/ledgersmb/ledger-smb/sql/modules/Location.sql
-\i /home/ledgersmb/ledger-smb/sql/modules/Company.sql
-\i /home/ledgersmb/ledger-smb/sql/modules/Customer.sql
-\i /home/ledgersmb/ledger-smb/sql/modules/Date.sql
-\i /home/ledgersmb/ledger-smb/sql/modules/Defaults.sql
-\i /home/ledgersmb/ledger-smb/sql/modules/Settings.sql
-\i /home/ledgersmb/ledger-smb/sql/modules/Employee.sql
-\i /home/ledgersmb/ledger-smb/sql/modules/Entity.sql
-\i /home/ledgersmb/ledger-smb/sql/modules/Payment.sql
-\i /home/ledgersmb/ledger-smb/sql/modules/Person.sql
-\i /home/ledgersmb/ledger-smb/sql/modules/Report.sql
-\i /home/ledgersmb/ledger-smb/sql/modules/Voucher.sql
 
-GRANT EXECUTE ON FUNCTION eca__list_notes(int) TO lsmb_paycom_eu__read_contact;
-GRANT INSERT ON eca_note TO lsmb_paycom_eu__edit_contact;
-
 ALTER TABLE orig.vendor ADD COLUMN entity_id int;
 ALTER TABLE orig.vendor ADD COLUMN company_id int;
 ALTER TABLE orig.vendor ADD COLUMN credit_id int;

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


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits