 'MEMBERSHIP_RENEW',
 Dues1112,
 'CHECK',
-@virgil_larson,
+@virgil,
 Comments1112,
 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.Dues1112 is not null and ma.Dues1112 != ''
 ;
 
-insert into PersonTrans (
- PersonID,
-TransID
-)
-select
-PersonID,
-id
-from Trans
-;
-
-insert into Trans ( /*2. 2011-12 Deposit Check */
-Trandate,
-Trantype,
-Amount,
-Pmtmethod,
-doneby_id,
-Notes,
-reconciled_date,
-status,
-PersonID
-)
-select
-IF(Deposit1112 != '',STR_TO_DATE(Deposit1112, '%c/%e/%Y'),CURDATE()),
-'OTHER',
-Dues1112,
-'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.Dues1112 is not null and ma.Dues1112 != ''
-;
-
-insert into PersonTrans (
- PersonID,
-TransID
-)
-select
-PersonID,
-id
-from Trans
+insert into persontrans (
+ PersonID,
+TransID
+)
+select
+PersonID,
+id
+from trans
 ;
 
 /* repeat for 2012-13 */
 
-insert into Trans ( /*3. 2012-13 Dues Paid */
+insert into trans ( /*3. 2012-13 Dues Paid */
 Trandate,
 Trantype,
 Amount,

'LUNCHEON_FEE',
Lunchprepay,
'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.Lunchprepay is not null and ma.Lunchprepay != ''
;

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


insert into Trans ( /*6. 2013-14 Dues Paid */
Trandate,
Trantype,
Amount,

'LUNCHEON_FEE',
Lunchprepay1314,
'CHECK',
@virgil,
'',
NOW(),
'PROCESSED',
pe.id
from masterlist as ma, person as pe
where (ma.Last = pe.Lastname) and (ma.first = pe.Firstname) and
ma.Lunchprepay1314 is not null and ma.Lunchprepay1314 != ''
;

insert into persontrans (
 PersonID,
TransID
)
select
PersonID,
id
from trans
;

insert into trans ( /*6. 2014-15 Dues Paid */
Trandate,
Trantype,
Amount,
