Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 65b5a66d

Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt

  • ID 65b5a66d52149e0ad08a85211d66725fad005c12
  • Vorgänger cce1a14e
  • Nachfolger ea5ff1b9

DB::Order: Persistenter Record-Type

Unterschiede anzeigen:

SL/DB/MetaSetup/Order.pm
41 41
  proforma                => { type => 'boolean', default => 'false' },
42 42
  quonumber               => { type => 'text' },
43 43
  quotation               => { type => 'boolean', default => 'false' },
44
  record_type             => { type => 'text', not_null => 1 },
44 45
  reqdate                 => { type => 'date' },
45 46
  salesman_id             => { type => 'integer' },
46 47
  shippingpoint           => { type => 'text' },
sql/Pg-upgrade2/order_type.sql
1
-- @tag: order_type
2
-- @description: Persistente Typen in Aufträgen
3
-- @depends: release_3_7_0
4

  
5
ALTER TABLE oe ADD COLUMN record_type TEXT;
6

  
7
UPDATE oe SET record_type = 'sales_order'
8
  WHERE customer_id IS NOT NULL and quotation = FALSE;
9
UPDATE oe SET record_type = 'purchase_order'
10
  WHERE vendor_id   IS NOT NULL and quotation = FALSE;
11

  
12
UPDATE oe SET record_type = 'sales_quotation'
13
  WHERE customer_id IS NOT NULL and quotation = TRUE;
14
UPDATE oe SET record_type = 'request_quotation'
15
  WHERE vendor_id   IS NOT NULL and quotation = TRUE;
16

  
17
ALTER TABLE oe ALTER COLUMN record_type SET NOT NULL;

Auch abrufbar als: Unified diff