 'LUNCHEON_FEE',
 Lunchprepay1516,
 'CHECK',
-@virgil_larson,
+@virgil,
 '',
 NOW(),
 'PROCESSED',
 pe.id
-from Masterlist as ma, Person as pe
+from masterlist as ma, person as pe
 where (ma.Last = pe.Lastname) and (ma.first = pe.Firstname) and
 ma.Lunchprepay1516 is not null and ma.Lunchprepay1516 != ''
 ;
 
-insert into PersonTrans (
- PersonID,
-TransID
-)
-select
-PersonID,
-id
-from Trans;
+insert into persontrans (
+ PersonID,
+TransID
+)
+select
+PersonID,
+id
+from trans;

'MEMBERSHIP_RENEW',
Dues1516,
'CHECK',
@virgil_larson,
Comments1516,
NOW(),
'PROCESSED',
pe.id
from Masterlist as ma, Person as pe
where (ma.Last = pe.Lastname) and (ma.first = pe.Firstname) and
ma.Dues1516 is not null and ma.Dues1516 != ''
;

insert into PersonTrans (
 PersonID,
TransID
)
select
PersonID,
id
from Trans
;

insert into Trans ( /*10. 2015-16 Deposit Check */
Trandate,
Trantype,
Amount,
Pmtmethod,
doneby_id,
Notes,
reconciled_date,
status,
PersonID
)
select
IF(Deposit1516 != '',STR_TO_DATE(Deposit1516, '%c/%e/%Y'),CURDATE()),
'OTHER',
Dues1516,
'CHECK',
@virgil_larson,
'',
NOW(),
'PROCESSED',
pe.id
from Masterlist as ma, Person as pe
where (ma.Last = pe.Lastname) and (ma.first = pe.Firstname) and
ma.Dues1516 is not null and ma.Dues1516 != ''
;

insert into PersonTrans (
 PersonID,
TransID
)
select
PersonID,
id
from Trans
;

insert into Trans ( /*11. 2015-16 Lunch Prepay */
Trandate,
Trantype,
Amount,

TRUNCATE TABLE trans;
SET FOREIGN_KEY_CHECKS=1;

SELECT @virgil := id FROM person where email_canonical = "larso071@umn.edu" LIMIT 1;

/* Insert transaction for received dues and lunch prepay, up to 2 transactions per person */
/* for each transaction insert a link to and from person in persontrans */

insert into trans ( /*1. 2011-12 Dues Paid */
Trandate,
Trantype,
Amount,
