/*order 502381*/    
      /*
      CHANGE REPORT for Table DELIVERYSCAN
          - Adding column OUTSCANNODELIVERY
      ACTION is ALTER or modify Table DELIVERYSCAN
      */

ALTER TABLE DELIVERYSCAN ADD (OUTSCANNODELIVERY    NUMBER DEFAULT 0 NOT NULL);

COMMENT ON COLUMN DELIVERYSCAN.OUTSCANNODELIVERY IS '0 = Normal delivery scan (item is scanned out and delivered to customer)
1 = Rejected outscan , item is not delivered to the customer. Only used for module OUTSCANNODELIVERY';
      
      /*
      CHANGE REPORT for Table PACKINGNOTELINE
          - Adding column NODELIVERYAMOUNT
      ACTION is ALTER or modify Table PACKINGNOTELINE
      */

ALTER TABLE PACKINGNOTELINE ADD (NODELIVERYAMOUNT     NUMBER(4) DEFAULT 0 NOT 
    NULL);


insert into invoicelinesubtype i
  (i.invoicelinesubtype_id,
   subtype,
   invoicelinetype_id,
   factorydescription,
   systemuser_id,
   timestamp)
  select seq_invoicelinesubtype.nextval,
         41,
         2,
         'Wash No Delivery',
         1,
         sysdate
    from dual;

insert into invoicelinesubtype_desc
      (invoicelinesubtype_id,
       language_id,
       description,
       systemuser_id,
       timestamp)
      select i.invoicelinesubtype_id,
             l.language_id,
             i.factorydescription,
             1,
             sysdate
        from invoicelinesubtype i, languages l
       where l.translatedescription = 'Y' and  subtype = 41;
