Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 65b5a66d

Von Tamino Steinert vor fast 2 Jahren hinzugefügt

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

DB::Order: Persistenter Record-Type

Unterschiede anzeigen:

SL/DB/MetaSetup/Order.pm
proforma => { type => 'boolean', default => 'false' },
quonumber => { type => 'text' },
quotation => { type => 'boolean', default => 'false' },
record_type => { type => 'text', not_null => 1 },
reqdate => { type => 'date' },
salesman_id => { type => 'integer' },
shippingpoint => { type => 'text' },
sql/Pg-upgrade2/order_type.sql
-- @tag: order_type
-- @description: Persistente Typen in Aufträgen
-- @depends: release_3_7_0
ALTER TABLE oe ADD COLUMN record_type TEXT;
UPDATE oe SET record_type = 'sales_order'
WHERE customer_id IS NOT NULL and quotation = FALSE;
UPDATE oe SET record_type = 'purchase_order'
WHERE vendor_id IS NOT NULL and quotation = FALSE;
UPDATE oe SET record_type = 'sales_quotation'
WHERE customer_id IS NOT NULL and quotation = TRUE;
UPDATE oe SET record_type = 'request_quotation'
WHERE vendor_id IS NOT NULL and quotation = TRUE;
ALTER TABLE oe ALTER COLUMN record_type SET NOT NULL;

Auch abrufbar als: Unified diff