[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpcompta-dev] r4815 - phpcompta/tags/rel601/sql
From: |
phpcompta-dev |
Subject: |
[Phpcompta-dev] r4815 - phpcompta/tags/rel601/sql |
Date: |
Tue, 24 Apr 2012 21:33:27 +0200 (CEST) |
Author: danydb
Date: 2012-04-24 21:33:27 +0200 (Tue, 24 Apr 2012)
New Revision: 4815
Modified:
phpcompta/tags/rel601/sql/upgrade.sql
Log:
Fix bug predefined operation for misc ledger
Fix bug for check_balance (null value)
Modified: phpcompta/tags/rel601/sql/upgrade.sql
===================================================================
--- phpcompta/tags/rel601/sql/upgrade.sql 2012-04-24 19:33:02 UTC (rev
4814)
+++ phpcompta/tags/rel601/sql/upgrade.sql 2012-04-24 19:33:27 UTC (rev
4815)
@@ -1,29 +1,29 @@
CREATE OR REPLACE FUNCTION comptaproc.check_balance(p_grpt integer)
RETURNS numeric AS
$BODY$
-declare
+declare
amount_jrnx_debit numeric;
amount_jrnx_credit numeric;
amount_jrn numeric;
begin
- select coalesce(sum (j_montant),0) into amount_jrnx_credit
- from jrnx
- where
+ select coalesce(sum (j_montant),0) into amount_jrnx_credit
+ from jrnx
+ where
j_grpt=p_grpt
and j_debit=false;
- select coalesce(sum (j_montant),0) into amount_jrnx_debit
- from jrnx
- where
+ select coalesce(sum (j_montant),0) into amount_jrnx_debit
+ from jrnx
+ where
j_grpt=p_grpt
and j_debit=true;
- select coalesce(jr_montant,0) into amount_jrn
+ select coalesce(jr_montant,0) into amount_jrn
from jrn
where
jr_grpt_id=p_grpt;
- if ( amount_jrnx_debit != amount_jrnx_credit )
+ if ( amount_jrnx_debit != amount_jrnx_credit )
then
return abs(amount_jrnx_debit-amount_jrnx_credit);
end if;
@@ -36,3 +36,4 @@
$BODY$
LANGUAGE plpgsql;
+update op_predef set od_direct='t' where od_jrn_type='ODS';
---
PhpCompta est un logiciel de comptabilité libre en ligne (full web)
Projet opensource http://www.phpcompta.eu
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpcompta-dev] r4815 - phpcompta/tags/rel601/sql,
phpcompta-dev <=