Topic: Field crm_contacts.entity_id should be INT
The field crm_contacts.entity_id is used to look up the cust_branch.branch_code in reporting/rep103.php and hence both must be of the same field type. The former is VARCHAR(11) whilst the latter is INT(11). Any reason why the former remains VARCHAR?
The file sales/includes/db/branches_db.inc too uses the entity_id field to lookup the branch_code in a similar way.