[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[3760] branches/1.3/sql
- Subject: SF.net SVN: ledger-smb:[3760] branches/1.3/sql
- From: ..hidden..
- Date: Tue, 27 Sep 2011 15:41:13 +0000
Revision: 3760
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3760&view=rev
Author: einhverfr
Date: 2011-09-27 15:41:13 +0000 (Tue, 27 Sep 2011)
Log Message:
-----------
Asset nbv report fix, asset module fixes
also moved rc2-rc3.sql scripts to make management easier--- old svn scripts go in svn directory, and consolidated script remains in sql/upgrade
Modified Paths:
--------------
branches/1.3/sql/modules/Assets.sql
Added Paths:
-----------
branches/1.3/sql/upgrade/3760-alter-asset_reports.sql
branches/1.3/sql/upgrade/rc2-rc3.sql
branches/1.3/sql/upgrade/svn/3308-menu_update.sql
branches/1.3/sql/upgrade/svn/3714-drop-recon-delete.sql
branches/1.3/sql/upgrade/svn/3738-drop-session-transaction-id.sql
Removed Paths:
-------------
branches/1.3/sql/upgrade/3308-menu_update.sql
branches/1.3/sql/upgrade/3714-drop-recon-delete.sql
branches/1.3/sql/upgrade/3738-drop-session-transaction-id.sql
Modified: branches/1.3/sql/modules/Assets.sql
===================================================================
--- branches/1.3/sql/modules/Assets.sql 2011-09-27 15:16:01 UTC (rev 3759)
+++ branches/1.3/sql/modules/Assets.sql 2011-09-27 15:41:13 UTC (rev 3760)
@@ -631,8 +631,7 @@
salvage_value numeric,
through_date date,
accum_depreciation numeric,
- net_book_value numeric,
- percent_depreciated numeric
+ net_book_value numeric
);
@@ -646,11 +645,7 @@
ai.start_depreciation,
ai.purchase_date))/ 12,
ai.purchase_value - ai.salvage_value, ai.salvage_value, max(r.report_date),
- sum(rl.amount), ai.purchase_value - sum(rl.amount), (1 - (ai.usable_life
- - months_passed(coalesce(ai.start_depreciation, ai.purchase_date),
- coalesce(max(r.report_date),
- ai.start_depreciation,
- ai.purchase_date))/ 12)/ai.usable_life) * 100
+ sum(rl.amount), ai.purchase_value - sum(rl.amount)
FROM asset_item ai
JOIN asset_class ac ON (ai.asset_class_id = ac.id)
JOIN asset_dep_method adm ON (adm.id = ac.method)
@@ -1273,3 +1268,7 @@
$$ Imports items from partial disposal reports. This function should not be
called dirctly by programmers but rather through the other disposal approval
api's.$$; --'
+
+-- needed to go here because dependent on other functions in other modules. --CT
+alter table asset_report alter column entered_by
+set default person__get_my_entity_id();
Deleted: branches/1.3/sql/upgrade/3308-menu_update.sql
===================================================================
--- branches/1.3/sql/upgrade/3308-menu_update.sql 2011-09-27 15:16:01 UTC (rev 3759)
+++ branches/1.3/sql/upgrade/3308-menu_update.sql 2011-09-27 15:41:13 UTC (rev 3760)
@@ -1,9 +0,0 @@
-
-insert into menu_attribute (node_id, attribute, value)
-values (49, 'l_first_name', '1');
-insert into menu_attribute (node_id, attribute, value)
-values (49, 'l_id', '1');
-insert into menu_attribute (node_id, attribute, value)
-values (49, 'l_startdate', '1');
-insert into menu_attribute (node_id, attribute, value)
-values (49, 'l_enddate', '1');
Deleted: branches/1.3/sql/upgrade/3714-drop-recon-delete.sql
===================================================================
--- branches/1.3/sql/upgrade/3714-drop-recon-delete.sql 2011-09-27 15:16:01 UTC (rev 3759)
+++ branches/1.3/sql/upgrade/3714-drop-recon-delete.sql 2011-09-27 15:41:13 UTC (rev 3760)
@@ -1 +0,0 @@
-DROP FUNCTION reconciliation__delete_report(in_report_id int);
Deleted: branches/1.3/sql/upgrade/3738-drop-session-transaction-id.sql
===================================================================
--- branches/1.3/sql/upgrade/3738-drop-session-transaction-id.sql 2011-09-27 15:16:01 UTC (rev 3759)
+++ branches/1.3/sql/upgrade/3738-drop-session-transaction-id.sql 2011-09-27 15:41:13 UTC (rev 3760)
@@ -1 +0,0 @@
-ALTER TABLE session DROP transaction_id;
Added: branches/1.3/sql/upgrade/3760-alter-asset_reports.sql
===================================================================
--- branches/1.3/sql/upgrade/3760-alter-asset_reports.sql (rev 0)
+++ branches/1.3/sql/upgrade/3760-alter-asset_reports.sql 2011-09-27 15:41:13 UTC (rev 3760)
@@ -0,0 +1,4 @@
+alter table asset_report alter column entered_by
+set default person__get_my_entity_id();
+
+DROP TYPE asset_nbv_line CASCADE;
Added: branches/1.3/sql/upgrade/rc2-rc3.sql
===================================================================
--- branches/1.3/sql/upgrade/rc2-rc3.sql (rev 0)
+++ branches/1.3/sql/upgrade/rc2-rc3.sql 2011-09-27 15:41:13 UTC (rev 3760)
@@ -0,0 +1,2 @@
+DROP FUNCTION reconciliation__delete_report(in_report_id int);
+ALTER TABLE session DROP transaction_id;
Copied: branches/1.3/sql/upgrade/svn/3308-menu_update.sql (from rev 3750, branches/1.3/sql/upgrade/3308-menu_update.sql)
===================================================================
--- branches/1.3/sql/upgrade/svn/3308-menu_update.sql (rev 0)
+++ branches/1.3/sql/upgrade/svn/3308-menu_update.sql 2011-09-27 15:41:13 UTC (rev 3760)
@@ -0,0 +1,9 @@
+
+insert into menu_attribute (node_id, attribute, value)
+values (49, 'l_first_name', '1');
+insert into menu_attribute (node_id, attribute, value)
+values (49, 'l_id', '1');
+insert into menu_attribute (node_id, attribute, value)
+values (49, 'l_startdate', '1');
+insert into menu_attribute (node_id, attribute, value)
+values (49, 'l_enddate', '1');
Copied: branches/1.3/sql/upgrade/svn/3714-drop-recon-delete.sql (from rev 3750, branches/1.3/sql/upgrade/3714-drop-recon-delete.sql)
===================================================================
--- branches/1.3/sql/upgrade/svn/3714-drop-recon-delete.sql (rev 0)
+++ branches/1.3/sql/upgrade/svn/3714-drop-recon-delete.sql 2011-09-27 15:41:13 UTC (rev 3760)
@@ -0,0 +1 @@
+DROP FUNCTION reconciliation__delete_report(in_report_id int);
Copied: branches/1.3/sql/upgrade/svn/3738-drop-session-transaction-id.sql (from rev 3750, branches/1.3/sql/upgrade/3738-drop-session-transaction-id.sql)
===================================================================
--- branches/1.3/sql/upgrade/svn/3738-drop-session-transaction-id.sql (rev 0)
+++ branches/1.3/sql/upgrade/svn/3738-drop-session-transaction-id.sql 2011-09-27 15:41:13 UTC (rev 3760)
@@ -0,0 +1 @@
+ALTER TABLE session DROP transaction_id;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.