data.setOrderDate(ui.getOrderDate());
data.setOrderId(ui.getOrderId());
data.setOrderType(ui.getOrderType());
data.setReferenceNumber(ui.getReferenceNumber());
User user = new User();
user.setUsername(ui.getUserName());
data.setUser(user);
if (ui.getCharges() != null && ui.getCharges().size() > 0) {
PurchaseOrderChargesMapper chargeMapper = new PurchaseOrderChargesMapper();
Set<PurchaseOrderCharges> charges = new HashSet<PurchaseOrderCharges>(