~camptocamp/c2c-rd-addons/8.0a

« back to all changes in this revision

Viewing changes to chricar_account_move_line_deloitte/ism2deloitte.sql

  • Committer: openerp@bazaar.camptocamp.net
  • Date: 2011-09-20 13:59:04 UTC
  • mto: This revision was merged to the branch mainline in revision 122.
  • Revision ID: openerp@bazaar.camptocamp.net-20110920135904-mkt0de1c649502fo
[ADD] import utility form Klinger accounting

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
 
 
3
/*
 
4
DO NOT FORGET
 
5
edit csv file - remove 1 line and 3 line 
 
6
*/
 
7
 
 
8
 
 
9
delete from chricar_account_move_line_deloitte;
 
10
 
 
11
 
 
12
insert into ism_konto("MAND","TYP","KONTO")
 
13
select j."MAND", j."TYP",  j."KONTO" from ism_journal j
 
14
except select k."MAND", k."TYP",  k."KONTO" from ism_konto k;
 
15
 
 
16
 
 
17
insert into chricar_account_move_line_deloitte(account,description,analytic_account,amount,date,symbol,name) 
 
18
select k.code,"TEXT","STELLE",
 
19
case when j."SH" = 'S' then "BETRAG" else -"BETRAG" end as BETRAG,
 
20
"DATUM_BU","BUCH","BELEG" from ism_journal j, ism_konto k
 
21
where k."TYP" = j."TYP"
 
22
  and k."KONTO" = j."KONTO"
 
23
  and k.code is not null
 
24
union all
 
25
select
 
26
case when j."TYP" = 'D' then '200' else '331' end,
 
27
"TEXT","STELLE",
 
28
case when j."SH" = 'S' then "BETRAG" else -"BETRAG" end as BETRAG,
 
29
"DATUM_BU","BUCH","BELEG"
 
30
from ism_journal j
 
31
where j."TYP" in ('D','K')
 
32
;
 
33
 
 
34
 
 
35
 
 
36