[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[5830] trunk
- Subject: SF.net SVN: ledger-smb:[5830] trunk
- From: ..hidden..
- Date: Sun, 19 May 2013 08:39:54 +0000
Revision: 5830
http://sourceforge.net/p/ledger-smb/code/5830
Author: einhverfr
Date: 2013-05-19 08:39:53 +0000 (Sun, 19 May 2013)
Log Message:
-----------
Balance fixes for gl reports
Modified Paths:
--------------
trunk/UI/Reports/filters/gl.html
trunk/sql/modules/Account.sql
trunk/sql/modules/EndOfYear.sql
Modified: trunk/UI/Reports/filters/gl.html
===================================================================
--- trunk/UI/Reports/filters/gl.html 2013-05-19 02:47:43 UTC (rev 5829)
+++ trunk/UI/Reports/filters/gl.html 2013-05-19 08:39:53 UTC (rev 5830)
@@ -227,7 +227,7 @@
value="Y"
} ?> <?lsmb text('Account Name') ?></td>
<td nowrap><?lsmb PROCESS input element_data = {
- name="col_balance"
+ name="col_running_balance"
class="checkbox"
type="checkbox"
value="Y"
Modified: trunk/sql/modules/Account.sql
===================================================================
--- trunk/sql/modules/Account.sql 2013-05-19 02:47:43 UTC (rev 5829)
+++ trunk/sql/modules/Account.sql 2013-05-19 08:39:53 UTC (rev 5830)
@@ -482,6 +482,11 @@
IS $$ Provides default rules for setting reconciliation labels. Currently
saves a label of accno ||'--' || description.$$;
+CREATE OR REPLACE FUNCTION account__get_by_accno(in_accno text)
+RETURNS account AS $$
+SELECT * FROM account WHERE accno = $1;
+$$ language sql;
+
CREATE OR REPLACE FUNCTION account__get_by_link_desc(in_description text)
RETURNS SETOF account AS $$
SELECT * FROM account
Modified: trunk/sql/modules/EndOfYear.sql
===================================================================
--- trunk/sql/modules/EndOfYear.sql 2013-05-19 02:47:43 UTC (rev 5829)
+++ trunk/sql/modules/EndOfYear.sql 2013-05-19 08:39:53 UTC (rev 5830)
@@ -227,8 +227,16 @@
COMMENT ON FUNCTION account__obtain_balance
(in_transdate date, in_account_id int) is
$$Returns the account balance at a given point in time, calculating forward
-from most recent check point.$$;
+from most recent check point. This function is inclusive of in_transdate. For
+an exclusive function see account__obtain_starting_balance below.$$;
+CREATE OR REPLACE FUNCTION account__obtain_starting_balance
+(in_transdate date, in_account_id int)
+RETURNS numeric LANGUAGE SQL AS
+$$
+SELECT account__obtain_balance($1 - 1, $2);
+$$;
+
CREATE OR REPLACE FUNCTION eoy_earnings_accounts() RETURNS setof account AS
$$
SELECT *
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.