Revision b03da1a4
Von Tamino Steinert vor fast 2 Jahren hinzugefügt
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
DB::Order: Persistenter Record-Type