--ABS-46021/ ABS-50135

---CONTRACTATTRIBUTE table---
INSERT INTO CONTRACTATTRIBUTE
  (CONTRACTATTRIBUTE_ID,
   GROUPNUMBER,
   SEQUENCENUMBER,
   FACTORYNAME,
   INTERNALNAME,
   SYSTEMUSER_ID,
   TIMESTAMP,
   NOVALUERULE)
VALUES
  (1,
   1,
   1,
   'CustomerRelated',
   'cmbCustomerRelated',
   GETMINSYSTEMUSER(),
   sysdate,
   2);
COMMIT;

INSERT INTO CONTRACTATTRIBUTE
  (CONTRACTATTRIBUTE_ID,
   GROUPNUMBER,
   SEQUENCENUMBER,
   FACTORYNAME,
   INTERNALNAME,
   SYSTEMUSER_ID,
   TIMESTAMP,
   NOVALUERULE)
VALUES
  (5,
   2,
   1,
   'AllowAutomaticSales',
   'cbAllowAutomaticSales',
   GETMINSYSTEMUSER(),
   sysdate,
   2);
COMMIT;

INSERT INTO CONTRACTATTRIBUTE
  (CONTRACTATTRIBUTE_ID,
   GROUPNUMBER,
   SEQUENCENUMBER,
   FACTORYNAME,
   INTERNALNAME,
   SYSTEMUSER_ID,
   TIMESTAMP,
   NOVALUERULE)
VALUES
  (55,
   7,
   5,
   'SplitInvoicesPerActivity',
   'cbSplitInvoicesPerActivity',
   GETMINSYSTEMUSER(),
   sysdate,
   2);
COMMIT;

INSERT INTO CONTRACTATTRIBUTE
  (CONTRACTATTRIBUTE_ID,
   GROUPNUMBER,
   SEQUENCENUMBER,
   FACTORYNAME,
   INTERNALNAME,
   SYSTEMUSER_ID,
   TIMESTAMP,
   NOVALUERULE)
VALUES
  (63,
   7,
   13,
   'ChargeLossForPoolItems',
   'cbChargeLossForPoolAfterXDays',
   GETMINSYSTEMUSER(),
   sysdate,
   2);
COMMIT;

INSERT INTO CONTRACTATTRIBUTE
  (CONTRACTATTRIBUTE_ID,
   GROUPNUMBER,
   SEQUENCENUMBER,
   FACTORYNAME,
   INTERNALNAME,
   SYSTEMUSER_ID,
   TIMESTAMP,
   NOVALUERULE)
VALUES
  (64,
   7,
   14,
   'ChargeLossForUniquePoolDays',
   'sfChargeLossForPoolNoDays',
   GETMINSYSTEMUSER(),
   sysdate,
   2);
COMMIT;

INSERT INTO CONTRACTATTRIBUTE
  (CONTRACTATTRIBUTE_ID,
   GROUPNUMBER,
   SEQUENCENUMBER,
   FACTORYNAME,
   INTERNALNAME,
   SYSTEMUSER_ID,
   TIMESTAMP,
   NOVALUERULE)
VALUES
  (98,
   1,
   5,
   'SoilCount',
   'cbSoilCount',
   GETMINSYSTEMUSER(),
   sysdate,
   2);
COMMIT;

INSERT INTO CONTRACTATTRIBUTE
  (CONTRACTATTRIBUTE_ID,
   GROUPNUMBER,
   SEQUENCENUMBER,
   FACTORYNAME,
   INTERNALNAME,
   SYSTEMUSER_ID,
   TIMESTAMP,
   NOVALUERULE)
VALUES
  (99,
   1,
   6,
   'InternetOrdering',
   'cbInternetOrdering',
   GETMINSYSTEMUSER(),
   sysdate,
   2);
COMMIT;

UPDATE CONTRACTATTRIBUTE C
SET C.INTERNALNAME = 'cbSendByEmailStat'
WHERE C.FACTORYNAME = 'SendStatementByE-mail';
COMMIT;

UPDATE CONTRACTATTRIBUTE C
SET C.INTERNALNAME = 'cbSendByFaxStat'
WHERE C.FACTORYNAME = 'SendStatementByFax';
COMMIT;