--Order 20013755.60

----CSVEXPORT table----

ALTER TABLE CSVEXPORT ADD (WEARERNUMBER NUMBER NULL);
ALTER TABLE CSVEXPORT ADD (WEARERNAME VARCHAR2(40) NULL);
ALTER TABLE CSVEXPORT ADD (STARTDATE DATE NULL);
ALTER TABLE CSVEXPORT ADD (ENDDATE DATE NULL);

COMMENT ON COLUMN CSVEXPORT.CSVEXPORTTYPE
  IS '0 = CSV Export Invoice
1 = Client.CSV
2 = Costs per wearer
';

ALTER TABLE CSVEXPORT
  DROP CONSTRAINT CSVEXPORT_VALID1_1;
ALTER TABLE CSVEXPORT
  ADD CONSTRAINT CSVEXPORT_VALID1_1
  CHECK (CSVEXPORTTYPE IN (0, 1, 2));

----INVOICEAPPENDIXDEFINITION table----

INSERT INTO  INVOICEAPPENDIXDEFINITION 
      (INVOICEAPPENDIXDEFINITION_ID,
       INVOICEAPPENDIXTYPE,
       DESCRIPTION,
       REPORTNAME,
       CUSTOMERCODE,
       MODULE,
       MANUAL,
       DIRECTINVOICE,
       OTHERSERVICES,
       RESIDENTIALSERVICES,
       REPORTTYPE,
       SYSTEMUSER_ID,
       TIMESTAMP)
    VALUES
      (37,
       37,
       'CostsPerWearer.CSV',
       'CostsPerWearerCSV',     
       '',
       'WEARERINVOICECATEGORY',
       'N',
       'N',
       'Y',
       'N',
	2,
       GETMINSYSTEMUSER(),
       SYSDATE);

commit;