--Order 20016185/20016147

---stay table----
insert into stay
  (stay_id, staytype, staynr, factorydescription, systemuser_id, timestamp)
  select seq_stay.nextval,
         2,
         22,
         'Picked Up at Customer',
         getminsystemuser(),
         sysdate
    from dual;
commit;

insert into stay_desc
   (stay_id, language_id, description, systemuser_id, timestamp)
  select s.stay_id,
         l.language_id,
         s.factorydescription,
         getminsystemuser(),
         sysdate
    from stay s, languages l
    where s.staytype = 2 and s.staynr = 22;
commit;

---transactiontype table----
insert into transactiontype
  (transactiontype_id, factorydescription, systemuser_id, timestamp)
  select 547,
         'Pick Up at Customer',
         getminsystemuser(),
         sysdate
    from dual;
commit;

insert into transactiontype_desc
  (transactiontype_id, language_id, description, systemuser_id, timestamp)
  select transactiontype_id,
         getminlanguage(),
         factorydescription,
         systemuser_id,
         timestamp
    from transactiontype
   where transactiontype.transactiontype_id = 547 ;
commit;