Merge branch 'b-3.6.1' into mebil
[kivitendo-erp.git] / sql / Pg-upgrade2 / chart_category_to_sgn.sql
1 -- @tag: chart_category_to_sgn
2 -- @description: Fuegt eine Hilfsfunktion ein mit der die interne Reprasentation der Konten (Haben positiv) in die Mehrungsrepraesentation gewandelt werden kann.
3 -- @depends:
4
5  CREATE OR REPLACE FUNCTION chart_category_to_sgn(CHARACTER(1)) 
6  RETURNS INTEGER
7  LANGUAGE SQL
8  AS 'SELECT  1 WHERE $1 IN (''I'', ''L'', ''Q'')
9       UNION 
10     SELECT -1 WHERE $1 IN (''E'', ''A'')';
11