// **************************************************************************
// **************************************************************************
// Script: EMPLSHAR.SQC
// 
// Related SPRs: 14606, 14644
//
// Description: This script update PREMFICA records tied to voided transactions.
//   The amount field in these EMployer share records are set to zero which is
//   what the code now does on a void of a paycheck.  
//
//   There is another bug (#14644) which would of allowed the user to
//   recalculate distributions on these records and saved them:
//
//      1.  Void a paycheck
//      2.  Press distribute.  Note there are some non-zero dists being
//          calculated from the non-zero PREMFICA records.
//      3.  Modify the transaction's description.
//      4.  Press Save.  The GL engine will process the non-zero dists
//          re-affecting balances.
//
//   Once the user has applied this script, they could repeat the steps above
//   now that the PREMFICA amounts are zero and the distributions would be 
//   backed out as they should have originally been.  Alternatively, they
//   could do a journal entry to reverse the inappropriate distributions.
//
// (C) Copyright 1996 by NEBS Software, Inc.  All Rights Reserved
// 
// **************************************************************************
// **************************************************************************

Ask "Employer's share amounts of Social Security and Medicare will be zeroed out for voided paychecks. If you have not backed up your company database, you should exit this script. Continue?";
update premfica,prtran set PF_AMT=0 where pf_troid=tr_oid and tr_voidflg=1;

COMMIT;