--Order 20016185

---ROUTETRANSACTION table---
ALTER TABLE ROUTETRANSACTION MODIFY (STRINGVALUE1 VARCHAR2(500));
ALTER TABLE ROUTETRANSACTION MODIFY (STRINGVALUE2 VARCHAR2(500));
ALTER TABLE ROUTETRANSACTION MODIFY (STRINGVALUE3 VARCHAR2(300));
ALTER TABLE ROUTETRANSACTION MODIFY (STRINGVALUE4 VARCHAR2(300));
ALTER TABLE ROUTETRANSACTION MODIFY (STRINGVALUE5 VARCHAR2(300));
ALTER TABLE ROUTETRANSACTION MODIFY (STRINGVALUE6 VARCHAR2(300));
ALTER TABLE ROUTETRANSACTION MODIFY (STRINGVALUE7 VARCHAR2(300));
ALTER TABLE ROUTETRANSACTION MODIFY (STRINGVALUE8 VARCHAR2(300));
ALTER TABLE ROUTETRANSACTION MODIFY (STRINGVALUE9 VARCHAR2(300));
ALTER TABLE ROUTETRANSACTION MODIFY (STRINGVALUE10 VARCHAR2(300));

---insert records into routetransactioncategory and routetransactioncategory_desc tables---
insert into routetransactioncategory rtc
select 7,
       'Container Scans',
       'N',
       getminsystemuser(),
       sysdate
from dual;
commit;

insert into routetransactioncategory rtc
select 8,
       'Contact Persons',
       'N',
       getminsystemuser(),
       sysdate
from dual;
commit;

insert into routetransactioncategory rtc
select 9,
       'Garment Scans',
       'N',
       getminsystemuser(),
       sysdate
from dual;
commit;

INSERT INTO ROUTETRANSACTIONCATEGORY_DESC
 (RouteTransactionCategory_ID, language_id, description, systemuser_id, timestamp)
  select RouteTransactionCategory_ID,
         getminlanguage(),
         factorydescription,
         systemuser_id,
         timestamp
    from ROUTETRANSACTIONCATEGORY
   where ROUTETRANSACTIONCATEGORY.ROUTETRANSACTIONCATEGORY_id in (7, 8, 9);
commit;

---insert records into routetransactiontype table---
insert into routetransactiontype rtt
select 212,
       'Unload (container) Scan',
       'N',
       'N',
       7,
       getminsystemuser(),
       sysdate
from dual;
commit;

insert into routetransactiontype rtt
select 213,
       'Return Container Scan',
       'N',
       'N',
       7,
       getminsystemuser(),
       sysdate
from dual;
commit;

insert into routetransactiontype rtt
select 214,
       'Add Contact Person',
       'N',
       'N',
       8,
       getminsystemuser(),
       sysdate
from dual;
commit;

insert into routetransactiontype rtt
select 215,
       'Edit Contact Person',
       'N',
       'N',
       8,
       getminsystemuser(),
       sysdate
from dual;
commit;

insert into routetransactiontype rtt
select 216,
       'Replace Contact Person',
       'N',
       'N',
       8,
       getminsystemuser(),
       sysdate
from dual;
commit;

insert into routetransactiontype rtt
select 311,
       'Modify Wearer',
       'N',
       'N',
       2,
       getminsystemuser(),
       sysdate
from dual;
commit;

insert into routetransactiontype rtt
select 800,
       'Scan Garment Place Flag',
       'N',
       'N',
       9,
       getminsystemuser(),
       sysdate
from dual;
commit;

insert into routetransactiontype rtt
select 801,
       'Scan Garment Replace',
       'N',
       'N',
       9,
       getminsystemuser(),
       sysdate
from dual;
commit;

insert into routetransactiontype rtt
select 802,
       'Scan Garment Rag',
       'N',
       'N',
       9,
       getminsystemuser(),
       sysdate
from dual;
commit;

INSERT INTO routetransactiontype_desc
 (routetransactiontype_ID, language_id, description, systemuser_id, timestamp)
  select routetransactiontype_ID,
         getminlanguage(),
         factorydescription,
         systemuser_id,
         timestamp
    from routetransactiontype
   where routetransactiontype.routetransactiontype_ID in (212,213,214,215,216,311,800,801,802);
commit;