Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision ea08b7df

Von Jan Büren vor 8 Monaten hinzugefügt

  • ID ea08b7dfc0c536290cce845cf41adcfeb8a2ac2f
  • Vorgänger 9866d032
  • Nachfolger c9d82e17

vorkonfigurierte Sammelkonten sind jetzt ein Pflichtfeld

Unterschiede anzeigen:

SL/DB/MetaSetup/Default.pm
26 26
  always_record_links_from_order            => { type => 'boolean', default => 'false' },
27 27
  ap_add_doc                                => { type => 'boolean', default => 'false', not_null => 1 },
28 28
  ap_changeable                             => { type => 'integer', default => 2, not_null => 1 },
29
  ap_chart_id                               => { type => 'integer' },
29
  ap_chart_id                               => { type => 'integer', not_null => 1 },
30 30
  ap_show_mark_as_paid                      => { type => 'boolean', default => 'true' },
31 31
  ar_add_doc                                => { type => 'boolean', default => 'false', not_null => 1 },
32 32
  ar_changeable                             => { type => 'integer', default => 2, not_null => 1 },
33
  ar_chart_id                               => { type => 'integer' },
33
  ar_chart_id                               => { type => 'integer', not_null => 1 },
34 34
  ar_paid_accno_id                          => { type => 'integer' },
35 35
  ar_show_mark_as_paid                      => { type => 'boolean', default => 'true' },
36 36
  articlenumber                             => { type => 'text' },
sql/Pg-upgrade2/defaults_set_ARAP.sql
1
-- @tag: defaults_set_ARAP
2
-- @description: Standardkonten für Forderungen und Verbindlichkeiten sind jetzt Pflichtfelder
3
-- @depends: release_3_9_0
4
DO $$
5
BEGIN
6

  
7
  IF (select 1 from defaults where ap_chart_id is null) THEN
8
    BEGIN
9
        UPDATE defaults set ap_chart_id = (select id from chart where link ='AP' order by id LIMIT 1);
10
    END;
11
  END IF;
12
  IF (select 1 from defaults where ar_chart_id is null) THEN
13
    BEGIN
14
        UPDATE defaults set ar_chart_id = (select id from chart where link ='AR' order by id LIMIT 1);
15
    END;
16
  END IF;
17
END $$;
18

  
19
ALTER TABLE defaults ALTER COLUMN ap_chart_id set not null;
20
ALTER TABLE defaults ALTER COLUMN ar_chart_id set not null;

Auch abrufbar als: Unified diff