Merged revisions 4737,4742,4748-4757 via svnmerge from
file:///home/developper/svn/phpcompta/tags/rel600 ........ r4748 | danydb | 2012-02-04 18:47:00 +0100 (Sat, 04 Feb 2012) | 1 line remove useless patch ........
This commit is contained in:
parent
5656eed67c
commit
d12970d0b9
1 changed files with 0 additions and 18 deletions
|
|
@ -1,18 +0,0 @@
|
|||
CREATE OR REPLACE FUNCTION comptaproc.letter_compare(p_jl bigint)
|
||||
RETURNS numeric AS
|
||||
$BODY$
|
||||
declare
|
||||
nCred numeric(20,4);
|
||||
nDeb numeric(20,4);
|
||||
begin
|
||||
if p_jl = -1 then
|
||||
return 0.0;
|
||||
end if;
|
||||
select coalesce(sum(j_montant),0) into nCred from letter_cred join jrnx using (j_id) where jl_id=p_jl;
|
||||
select coalesce(sum(j_montant),0) into nDeb from letter_deb join jrnx using (j_id) where jl_id=p_jl;
|
||||
|
||||
|
||||
return nDeb-nCred;
|
||||
end;
|
||||
$BODY$
|
||||
LANGUAGE plpgsql;
|
||||
Loading…
Add table
Add a link
Reference in a new issue