Nummernkreise » Historie » Version 2
[X] Daniel S, 03.01.2020 11:17
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 | UPDATE TSystem.numcircles SET nc_active = FALSE WHERE nc_ident = 'kanfrage'; |
||
17 | |||
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 | INSERT INTO TSystem.numcircles (nc_ident, nc_description, nc_preselect, nc_num, nc_modulname, nc_checksql) |
||
28 | VALUES ('aauftg', 'Angebote', '''AN'' || to_char(current_date, ''YY'') || ''-'' || lpad(NC_NUM, TSystem.Settings__GetInteger(''auftg__ag_nr__numlength'', 5), 0)', 0, 'TFormAuftg', |
||
29 | 'SELECT true FROM auftg WHERE ag_astat = ''A'' AND ((ag_nr = :mynewchecknumber) OR (ag_nr = (:mynewchecknumber || ''.QS'')))'); |
||
30 | |||
31 | </code></pre> |
||
32 | |||
33 | h3. Auftragsbestätigung |
||
34 | |||
35 | <pre><code class="sql"> |
||
36 | UPDATE TSystem.numcircles SET nc_active = FALSE WHERE nc_ident = 'eauftg'; |
||
37 | |||
38 | INSERT INTO TSystem.numcircles (nc_ident, nc_description, nc_preselect, nc_num, nc_modulname, nc_checksql) |
||
39 | VALUES ('eauftg', 'Kundenaufträge', '''AG'' || to_char(current_date, ''YY'') || ''-'' || lpad(NC_NUM, 5, 0)', 0, 'TFormAuftg', |
||
40 | 'SELECT true FROM auftg WHERE ag_astat = ''E'' AND ((ag_nr = :mynewchecknumber) OR (ag_nr = (:mynewchecknumber || ''.QS'')))'); |
||
41 | |||
42 | UPDATE TSystem.numcircles SET nc_active = FALSE WHERE nc_ident = 'rauftg'; |
||
43 | 2 | [X] Daniel S | |
44 | 1 | [X] Daniel S | INSERT INTO TSystem.numcircles (nc_ident, nc_description, nc_preselect, nc_num, nc_modulname, nc_checksql) |
45 | VALUES ('rauftg', 'Rahmenaufträge', '''RA'' || to_char(current_date, ''YY'') || ''-'' || lpad(NC_NUM, 5, 0)', 0, 'TFormAuftg', |
||
46 | 'SELECT true FROM auftg WHERE ag_astat = ''R'' AND (ag_nr = :mynewchecknumber)'); |
||
47 | </code></pre> |