--Order 20014837

------------------------INVOICEFREQUENCY TABLE---------------------------

INSERT INTO INVOICEFREQUENCY
  (INVOICEFREQUENCY_ID,
   INVOICEFREQUENCYNUMBER,
   FACTORYDESCRIPTION,
   SYSTEMUSER_ID,
   TIMESTAMP,
   DEFAULTFREQUENCY,
   PRICEFREQUENCYNUMBER)
  SELECT 121, 121, '2 Monthly(price*1)', GETMINSYSTEMUSER(), SYSDATE, 'N', 110 FROM DUAL;

COMMIT;

INSERT INTO INVOICEFREQUENCY
  (INVOICEFREQUENCY_ID,
   INVOICEFREQUENCYNUMBER,
   FACTORYDESCRIPTION,
   SYSTEMUSER_ID,
   TIMESTAMP,
   DEFAULTFREQUENCY,
   PRICEFREQUENCYNUMBER)
  SELECT 131, 131, '3 Monthly(price*1)', GETMINSYSTEMUSER(), SYSDATE, 'N', 110 FROM DUAL;

COMMIT;

INSERT INTO INVOICEFREQUENCY
  (INVOICEFREQUENCY_ID,
   INVOICEFREQUENCYNUMBER,
   FACTORYDESCRIPTION,
   SYSTEMUSER_ID,
   TIMESTAMP,
   DEFAULTFREQUENCY,
   PRICEFREQUENCYNUMBER)
  SELECT 141, 141, '4 Monthly(price*1)', GETMINSYSTEMUSER(), SYSDATE, 'N', 110 FROM DUAL;

COMMIT;

INSERT INTO INVOICEFREQUENCY
  (INVOICEFREQUENCY_ID,
   INVOICEFREQUENCYNUMBER,
   FACTORYDESCRIPTION,
   SYSTEMUSER_ID,
   TIMESTAMP,
   DEFAULTFREQUENCY,
   PRICEFREQUENCYNUMBER)
  SELECT 161, 161, '6 Monthly(price*1)', GETMINSYSTEMUSER(), SYSDATE, 'N', 110 FROM DUAL;

COMMIT;

INSERT INTO INVOICEFREQUENCY
  (INVOICEFREQUENCY_ID,
   INVOICEFREQUENCYNUMBER,
   FACTORYDESCRIPTION,
   SYSTEMUSER_ID,
   TIMESTAMP,
   DEFAULTFREQUENCY,
   PRICEFREQUENCYNUMBER)
  SELECT 171, 171, '12 Monthly(price*1)', GETMINSYSTEMUSER(), SYSDATE, 'N', 110 FROM DUAL;

COMMIT;
------------------------INVOICEFREQUENCY_DESC TABLE---------------------------

INSERT INTO INVOICEFREQUENCY_DESC
  (INVOICEFREQUENCY_ID, LANGUAGE_ID, DESCRIPTION, SYSTEMUSER_ID, TIMESTAMP)
  SELECT X.INVOICEFREQUENCY_ID,
         L.LANGUAGE_ID,
         X.FACTORYDESCRIPTION,
         X.SYSTEMUSER_ID,
         X.TIMESTAMP
    FROM INVOICEFREQUENCY X, LANGUAGES L
   WHERE X.INVOICEFREQUENCY_ID = 121
     AND L.TRANSLATEDESCRIPTION = 'Y';

COMMIT;

INSERT INTO INVOICEFREQUENCY_DESC
  (INVOICEFREQUENCY_ID, LANGUAGE_ID, DESCRIPTION, SYSTEMUSER_ID, TIMESTAMP)
  SELECT X.INVOICEFREQUENCY_ID,
         L.LANGUAGE_ID,
         X.FACTORYDESCRIPTION,
         X.SYSTEMUSER_ID,
         X.TIMESTAMP
    FROM INVOICEFREQUENCY X, LANGUAGES L
   WHERE X.INVOICEFREQUENCY_ID = 131
     AND L.TRANSLATEDESCRIPTION = 'Y';

COMMIT;

INSERT INTO INVOICEFREQUENCY_DESC
  (INVOICEFREQUENCY_ID, LANGUAGE_ID, DESCRIPTION, SYSTEMUSER_ID, TIMESTAMP)
  SELECT X.INVOICEFREQUENCY_ID,
         L.LANGUAGE_ID,
         X.FACTORYDESCRIPTION,
         X.SYSTEMUSER_ID,
         X.TIMESTAMP
    FROM INVOICEFREQUENCY X, LANGUAGES L
   WHERE X.INVOICEFREQUENCY_ID = 141
     AND L.TRANSLATEDESCRIPTION = 'Y';

COMMIT;

INSERT INTO INVOICEFREQUENCY_DESC
  (INVOICEFREQUENCY_ID, LANGUAGE_ID, DESCRIPTION, SYSTEMUSER_ID, TIMESTAMP)
  SELECT X.INVOICEFREQUENCY_ID,
         L.LANGUAGE_ID,
         X.FACTORYDESCRIPTION,
         X.SYSTEMUSER_ID,
         X.TIMESTAMP
    FROM INVOICEFREQUENCY X, LANGUAGES L
   WHERE X.INVOICEFREQUENCY_ID = 161
     AND L.TRANSLATEDESCRIPTION = 'Y';

COMMIT;

INSERT INTO INVOICEFREQUENCY_DESC
  (INVOICEFREQUENCY_ID, LANGUAGE_ID, DESCRIPTION, SYSTEMUSER_ID, TIMESTAMP)
  SELECT X.INVOICEFREQUENCY_ID,
         L.LANGUAGE_ID,
         X.FACTORYDESCRIPTION,
         X.SYSTEMUSER_ID,
         X.TIMESTAMP
    FROM INVOICEFREQUENCY X, LANGUAGES L
   WHERE X.INVOICEFREQUENCY_ID = 171
     AND L.TRANSLATEDESCRIPTION = 'Y';

COMMIT;

COMMENT ON COLUMN INVOICEFREQUENCY.INVOICEFREQUENCYNUMBER IS '0=Direct
5 = Direct with all services
10=Weekly
20=Every 2 weeks
30=Every 3 weeks
40=Every 4 weeks
45=4-4-5 week schedule
50=Every 8 weeks
60=Every 13 weeks
65=Every 16 weeks
70=Every 26 weeks
80=Every 52 weeks
105=Twice a Month
110=Monthly
111=Monthly (price*1)
115=Monthly (price*4.33)
120=Every 2 Months
121=2 Monthly(price*1)
130=Every 3 Months
131=3 Monthly(price*1)
140=Every 4 Months
141=4 Monthly(price*1)
160=Every 6 Months
161=6 Monthly(price*1)
170=Every 12 Months
171=12 Monthly(price*1)
200=Manual
';