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