[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[4620] trunk
- Subject: SF.net SVN: ledger-smb:[4620] trunk
- From: ..hidden..
- Date: Wed, 28 Mar 2012 11:37:37 +0000
Revision: 4620
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4620&view=rev
Author: einhverfr
Date: 2012-03-28 11:37:37 +0000 (Wed, 28 Mar 2012)
Log Message:
-----------
Merging branches/1.3
Modified Paths:
--------------
trunk/sql/modules/Assets.sql
Property Changed:
----------------
trunk/
trunk/LedgerSMB/Scripts/account.pm
trunk/LedgerSMB/Scripts/admin.pm
trunk/LedgerSMB/Scripts/customer.pm
trunk/LedgerSMB/Scripts/employee.pm
trunk/LedgerSMB/Scripts/file.pm
trunk/LedgerSMB/Scripts/journal.pm
trunk/LedgerSMB/Scripts/login.pm
trunk/LedgerSMB/Scripts/menu.pm
trunk/LedgerSMB/Scripts/payment.pm
trunk/LedgerSMB/Scripts/recon.pm
trunk/LedgerSMB/Scripts/setup.pm
trunk/LedgerSMB/Scripts/taxform.pm
trunk/LedgerSMB/Scripts/vendor.pm
trunk/sql/upgrade/1.2-1.3-manual.sql
Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3:3711-4617
+ /branches/1.3:3711-4619
Property changes on: trunk/LedgerSMB/Scripts/account.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/account.pm:4369-4617
/branches/1.3/scripts/account.pl:3711-4368
+ /branches/1.3/LedgerSMB/Scripts/account.pm:4369-4619
/branches/1.3/scripts/account.pl:3711-4368
Property changes on: trunk/LedgerSMB/Scripts/admin.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/admin.pm:3901-4617
/branches/1.3/scripts/admin.pl:3711-3903,4273-4287
+ /branches/1.3/LedgerSMB/Scripts/admin.pm:3901-4619
/branches/1.3/scripts/admin.pl:3711-3903,4273-4287
Property changes on: trunk/LedgerSMB/Scripts/customer.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/customer.pm:4288-4617
/branches/1.3/scripts/customer.pl:4273-4287
+ /branches/1.3/LedgerSMB/Scripts/customer.pm:4288-4619
/branches/1.3/scripts/customer.pl:4273-4287
Property changes on: trunk/LedgerSMB/Scripts/employee.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/employee.pm:3712-4617
/branches/1.3/scripts/employee.pl:3842-3843,4273-4287,4289-4310
+ /branches/1.3/LedgerSMB/Scripts/employee.pm:3712-4619
/branches/1.3/scripts/employee.pl:3842-3843,4273-4287,4289-4310
Property changes on: trunk/LedgerSMB/Scripts/file.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/file.pm:3711-4617
/branches/1.3/scripts/file.pl:3711-4138
+ /branches/1.3/LedgerSMB/Scripts/file.pm:3711-4619
/branches/1.3/scripts/file.pl:3711-4138
Property changes on: trunk/LedgerSMB/Scripts/journal.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/journal.pm:4288-4617
/branches/1.3/scripts/journal.pl:3711-4328
+ /branches/1.3/LedgerSMB/Scripts/journal.pm:4288-4619
/branches/1.3/scripts/journal.pl:3711-4328
Property changes on: trunk/LedgerSMB/Scripts/login.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/login.pm:4193-4617
/branches/1.3/scripts/login.pl:3711-4192
+ /branches/1.3/LedgerSMB/Scripts/login.pm:4193-4619
/branches/1.3/scripts/login.pl:3711-4192
Property changes on: trunk/LedgerSMB/Scripts/menu.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/menu.pm:4155-4617
/branches/1.3/scripts/menu.pl:3711-4192,4273-4287
+ /branches/1.3/LedgerSMB/Scripts/menu.pm:4155-4619
/branches/1.3/scripts/menu.pl:3711-4192,4273-4287
Property changes on: trunk/LedgerSMB/Scripts/payment.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/payment.pm:4010-4617
/branches/1.3/scripts/payment.pl:3711-4617
+ /branches/1.3/LedgerSMB/Scripts/payment.pm:4010-4619
/branches/1.3/scripts/payment.pl:3711-4617
Property changes on: trunk/LedgerSMB/Scripts/recon.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/recon.pm:3711-4617
/branches/1.3/scripts/recon.pl:4194-4271,4273-4287,4393-4438
+ /branches/1.3/LedgerSMB/Scripts/recon.pm:3711-4619
/branches/1.3/scripts/recon.pl:4194-4271,4273-4287,4393-4438
Property changes on: trunk/LedgerSMB/Scripts/setup.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/setup.pm:3937-4617
/branches/1.3/scripts/setup.pl:3711-4550
+ /branches/1.3/LedgerSMB/Scripts/setup.pm:3937-4619
/branches/1.3/scripts/setup.pl:3711-4550
Property changes on: trunk/LedgerSMB/Scripts/taxform.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/taxform.pm:4193-4617
/branches/1.3/scripts/taxform.pl:3711-4192,4273-4287
+ /branches/1.3/LedgerSMB/Scripts/taxform.pm:4193-4619
/branches/1.3/scripts/taxform.pl:3711-4192,4273-4287
Property changes on: trunk/LedgerSMB/Scripts/vendor.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/vendor.pm:4288-4617
/branches/1.3/scripts/vendor.pl:4273-4287
+ /branches/1.3/LedgerSMB/Scripts/vendor.pm:4288-4619
/branches/1.3/scripts/vendor.pl:4273-4287
Modified: trunk/sql/modules/Assets.sql
===================================================================
--- trunk/sql/modules/Assets.sql 2012-03-28 11:18:38 UTC (rev 4619)
+++ trunk/sql/modules/Assets.sql 2012-03-28 11:37:37 UTC (rev 4620)
@@ -65,6 +65,42 @@
COMMENT ON FUNCTION months_passed (in_start timestamp, in_end timestamp) IS
$$ Returns the number of months between in_start and in_end.$$;
+CREATE OR REPLACE FUNCTION asset_dep_straight_line_yr_d
+(in_asset_ids int[], in_report_date date, in_report_id int)
+RETURNS bool AS
+$$
+ INSERT INTO asset_report_line (asset_id, report_id, amount, department_id,
+ warehouse_id)
+ SELECT ai.id, $3,
+ asset_dep__straight_line_base(
+ ai.usable_life, -- years
+ ai.usable_life -
+ get_fractional_year(coalesce(max(report_date),
+ start_depreciation,
+ purchase_date),
+ coalesce(start_depreciation,
+ purchase_date)),
+ get_fractional_year(coalesce(max(report_date),
+ start_depreciation,
+ purchase_date),
+ $2),
+ purchase_value - salvage_value,
+ coalesce(sum(l.amount), 0)),
+ ai.department_id, ai.location_id
+ FROM asset_item ai
+ LEFT JOIN asset_report_line l ON (l.asset_id = ai.id)
+ LEFT JOIN asset_report r ON (l.report_id = r.id)
+ WHERE ai.id = ANY($1)
+ GROUP BY ai.id, ai.start_depreciation, ai.purchase_date, ai.purchase_value,
+ ai.salvage_value, ai.department_id, ai.location_id, ai.usable_life;
+
+ UPDATE asset_report SET report_class = 1 WHERE id = $3;
+
+ select true;
+$$ language sql;
+
+
+
CREATE OR REPLACE FUNCTION asset_dep_straight_line_yr_m
(in_asset_ids int[], in_report_date date, in_report_id int)
RETURNS bool AS
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-4617
/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-4619
/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.