 BEGIN
   DECLARE validDate DATE;
   DECLARE pID INTEGER;
-  DECLARE rate BIGINT(20);
-  DECLARE rateUnitID INTEGER;
+  DECLARE r BIGINT(20);
+  DECLARE rUnitID INTEGER;
   DECLARE description VARCHAR(255);
   call check_edit_timeSheet(NEW.timeSheetID);
 

CREATE TRIGGER before_insert_timeSheet BEFORE INSERT ON timeSheet
FOR EACH ROW
BEGIN
  DECLARE preferred_tfID INTEGER;
  DECLARE cbd BIGINT(20);
  DECLARE cur VARCHAR(3);
  SET NEW.personID = personID();
  SET NEW.status = 'edit';
  SELECT preferred_tfID INTO preferred_tfID FROM person WHERE personID = personID();
  SET NEW.recipient_tfID = preferred_tfID;
  SELECT customerBilledDollars,currencyTypeID INTO cbd,cur FROM project WHERE projectID = NEW.projectID;
  SET NEW.customerBilledDollars = cbd;
  SET NEW.currencyTypeID = cur;

CREATE TRIGGER before_insert_task BEFORE INSERT ON task
FOR EACH ROW
BEGIN
  DECLARE defTaskLimit DECIMAL(7,2);
  call check_edit_task(NEW.projectID);

  SET NEW.creatorID = personID();
