--Order 20014086.80

---PACKINGNOTE table---

ALTER TABLE PACKINGNOTELINE ADD (QTYSOLD NUMBER DEFAULT 0 NOT NULL);
 
COMMENT ON COLUMN PACKINGNOTELINE.QTYSOLD
  IS 'Quantity from deliveryvariations with reasoncode ‘sold’. This quantity is included in the DeliveredAmount';


---PRODUCTLISTPERCUSTOMER table---

ALTER TABLE PRODUCTLISTPERCUSTOMER ADD (BM4ALLOWSALES NUMBER DEFAULT 0 NOT NULL);

COMMENT ON COLUMN PRODUCTLISTPERCUSTOMER.BM4ALLOWSALES
  IS '0 = Not applicable or sales not allowed.
1 = Allow sales for billing method 4.
This attribute is only used for the module RELATEDLOANBILLING';

ALTER TABLE PRODUCTLISTPERCUSTOMER
  ADD CONSTRAINT BM4ALLOWSALES_VALID1_1
  CHECK (BM4ALLOWSALES IN (0, 1));