Proc Subway Account Balance Save

Purpose
This procedure inserts a new record or updates an existing record in the table AccountBalance

Method Signature
[dbo].[proc_Subway_AccountBalance_Save_Batch] @AccountBalanceXML	XML ,	   @UserDepartmentID	INTEGER ,	   @UserJobTitleID     INTEGER

Procedure Flow

 * 1) Create a temp table from the data passed in from the XML
 * 2) For those records that are in the temp table and in the Account Balance table the record is updated in the Account Balance Table. The two balances are added together. The Charge Interest Indicator, Charge Late Fee Indicator, User Stamp and Date Time Stamp are updated to the new value. The tables are joined on EntityType, EntityId, and BalanceId
 * 3) For those records that are in the temp table and not in the Account Balance insert a new record in the Account Balance Table. A left join is performed between the temp table and the Account Balance Table. If the Entity Type field in the Account Balance table is null then the record does not exist since Entity Type is a not null field. The tables are joined on EntityType, EntityId, and BalanceId