Nummernkreise » Historie » Version 3
[X] Daniel S, 03.01.2020 11:21
1 | 1 | [X] Daniel S | h1. Nummernkreise |
---|---|---|---|
2 | |||
3 | h2. Einstellen der Dokumentnummern |
||
4 | |||
5 | SELECT setval('auftg_ag_dokunr_seq', 25200000); -- Angebot/Auftragsnummer |
||
6 | SELECT setval('ldsdok_ld_dokunr_seq', 24200000); -- Bestellung |
||
7 | SELECT setval('auswlog_aw_dokunr_seq', 26200000); -- Auswärts |
||
8 | |||
9 | h2. Umstellen auf neue Nummernkreise |
||
10 | |||
11 | > Hinweis: aktuelle Quellen prüfen! |
||
12 | |||
13 | h3. Kundenanfrage |
||
14 | |||
15 | <pre><code class="sql"> |
||
16 | 3 | [X] Daniel S | UPDATE TSystem.numcircles SET nc_ident='#old.'||nc_ident, nc_active = FALSE WHERE nc_ident = 'kanfrage'; |
17 | 1 | [X] Daniel S | |
18 | INSERT INTO TSystem.numcircles (nc_ident, nc_description, nc_preselect, nc_num, nc_modulname, nc_checksql) |
||
19 | VALUES ('kanfrage', 'Kundenanfragen', '''ANFK'' || to_char(current_date, ''YY'') || ''-'' || lpad(NC_NUM, 5, 0)', 0, 'TFormKundenAnfrage', |
||
20 | 'SELECT true FROM kundanfrage WHERE kanf_nr = :mynewchecknumber'); |
||
21 | </code></pre> |
||
22 | |||
23 | |||
24 | h3. Angebot |
||
25 | |||
26 | <pre><code class="sql"> |
||
27 | 3 | [X] Daniel S | UPDATE TSystem.numcircles SET nc_ident='#old.'||nc_ident, nc_active = FALSE WHERE nc_ident = 'aauftg'; |
28 | |||
29 | 1 | [X] Daniel S | INSERT INTO TSystem.numcircles (nc_ident, nc_description, nc_preselect, nc_num, nc_modulname, nc_checksql) |
30 | VALUES ('aauftg', 'Angebote', '''AN'' || to_char(current_date, ''YY'') || ''-'' || lpad(NC_NUM, TSystem.Settings__GetInteger(''auftg__ag_nr__numlength'', 5), 0)', 0, 'TFormAuftg', |
||
31 | 'SELECT true FROM auftg WHERE ag_astat = ''A'' AND ((ag_nr = :mynewchecknumber) OR (ag_nr = (:mynewchecknumber || ''.QS'')))'); |
||
32 | |||
33 | </code></pre> |
||
34 | |||
35 | h3. Auftragsbestätigung |
||
36 | |||
37 | <pre><code class="sql"> |
||
38 | 3 | [X] Daniel S | UPDATE TSystem.numcircles SET nc_ident='#old.'||nc_ident, nc_active = FALSE WHERE nc_ident = 'eauftg'; |
39 | 1 | [X] Daniel S | |
40 | INSERT INTO TSystem.numcircles (nc_ident, nc_description, nc_preselect, nc_num, nc_modulname, nc_checksql) |
||
41 | VALUES ('eauftg', 'Kundenaufträge', '''AG'' || to_char(current_date, ''YY'') || ''-'' || lpad(NC_NUM, 5, 0)', 0, 'TFormAuftg', |
||
42 | 'SELECT true FROM auftg WHERE ag_astat = ''E'' AND ((ag_nr = :mynewchecknumber) OR (ag_nr = (:mynewchecknumber || ''.QS'')))'); |
||
43 | |||
44 | 3 | [X] Daniel S | UPDATE TSystem.numcircles SET nc_ident='#old.'||nc_ident, nc_active = FALSE WHERE nc_ident = 'rauftg'; |
45 | 2 | [X] Daniel S | |
46 | 1 | [X] Daniel S | INSERT INTO TSystem.numcircles (nc_ident, nc_description, nc_preselect, nc_num, nc_modulname, nc_checksql) |
47 | VALUES ('rauftg', 'Rahmenaufträge', '''RA'' || to_char(current_date, ''YY'') || ''-'' || lpad(NC_NUM, 5, 0)', 0, 'TFormAuftg', |
||
48 | 'SELECT true FROM auftg WHERE ag_astat = ''R'' AND (ag_nr = :mynewchecknumber)'); |
||
49 | </code></pre> |