Projekt

Allgemein

Profil

Nummernkreise » Historie » Version 4

[X] Daniel S, 03.01.2020 11:25

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 4 [X] Daniel S
h2. Einkauf
14
15
h3. Anfrage an Lieferant
16
17
<pre><code class="sql">
18
UPDATE TSystem.numcircles SET nc_ident='#old.'||nc_ident, nc_active = FALSE WHERE nc_ident = 'anfrage';
19
20
INSERT INTO TSystem.numcircles (nc_ident, nc_description, nc_preselect, nc_num, nc_modulname, nc_checksql)
21
    VALUES ('anfrage', 'Anfrage Lieferant', '''ANFL'' || to_char(current_date, ''YY'') || ''-'' || lpad(NC_NUM, 5, 0)', 0, 'TFormAnfrage',
22
            'SELECT true FROM anfrage WHERE anf_nr = :mynewchecknumber');
23
</code></pre>
24
25
h2. Verkauf
26
27
h3. Anfrage von Kunde
28 1 [X] Daniel S
29
<pre><code class="sql">
30 3 [X] Daniel S
UPDATE TSystem.numcircles SET nc_ident='#old.'||nc_ident, nc_active = FALSE WHERE nc_ident = 'kanfrage';
31 1 [X] Daniel S
32
INSERT INTO TSystem.numcircles (nc_ident, nc_description, nc_preselect, nc_num, nc_modulname, nc_checksql)
33
     VALUES ('kanfrage', 'Kundenanfragen', '''ANFK'' || to_char(current_date, ''YY'') || ''-'' || lpad(NC_NUM, 5, 0)', 0, 'TFormKundenAnfrage',
34
             'SELECT true FROM kundanfrage WHERE kanf_nr = :mynewchecknumber');
35
</code></pre>
36
37
38
h3. Angebot
39
40
<pre><code class="sql">
41 3 [X] Daniel S
UPDATE TSystem.numcircles SET nc_ident='#old.'||nc_ident, nc_active = FALSE WHERE nc_ident = 'aauftg';
42
43 1 [X] Daniel S
INSERT INTO TSystem.numcircles (nc_ident, nc_description, nc_preselect, nc_num, nc_modulname, nc_checksql)
44
     VALUES ('aauftg', 'Angebote', '''AN'' || to_char(current_date, ''YY'') || ''-'' || lpad(NC_NUM, TSystem.Settings__GetInteger(''auftg__ag_nr__numlength'', 5), 0)', 0, 'TFormAuftg',
45
            'SELECT true FROM auftg WHERE ag_astat = ''A'' AND ((ag_nr = :mynewchecknumber) OR (ag_nr = (:mynewchecknumber || ''.QS'')))');
46
    
47
</code></pre>
48
49
h3. Auftragsbestätigung
50
51
<pre><code class="sql">
52 3 [X] Daniel S
UPDATE TSystem.numcircles SET nc_ident='#old.'||nc_ident, nc_active = FALSE WHERE nc_ident = 'eauftg';
53 1 [X] Daniel S
54
INSERT INTO TSystem.numcircles (nc_ident, nc_description, nc_preselect, nc_num, nc_modulname, nc_checksql)
55
     VALUES ('eauftg', 'Kundenaufträge', '''AG'' || to_char(current_date, ''YY'') || ''-'' || lpad(NC_NUM, 5, 0)', 0, 'TFormAuftg',
56
            'SELECT true FROM auftg WHERE ag_astat = ''E'' AND ((ag_nr = :mynewchecknumber) OR (ag_nr = (:mynewchecknumber || ''.QS'')))');
57
58 3 [X] Daniel S
UPDATE TSystem.numcircles SET nc_ident='#old.'||nc_ident, nc_active = FALSE WHERE nc_ident = 'rauftg';    
59 2 [X] Daniel S
60 1 [X] Daniel S
INSERT INTO TSystem.numcircles (nc_ident, nc_description, nc_preselect, nc_num, nc_modulname, nc_checksql)
61
     VALUES ('rauftg', 'Rahmenaufträge', '''RA'' || to_char(current_date, ''YY'') || ''-'' || lpad(NC_NUM, 5, 0)', 0, 'TFormAuftg',
62
            'SELECT true FROM auftg WHERE ag_astat = ''R'' AND (ag_nr = :mynewchecknumber)');
63
</code></pre>