}
if(form.getPaymentMode().equals(Constants.PAYMENT_MODE_CASH)){
transaction.setPaymentMode(Constants.PAYMENT_MODE_CASH);
}else{
PaymentDetailsDO paymentDetails = new PaymentDetailsDO();
paymentDetails.setDatetime(currentTime);
paymentDetails.setAmount(form.getAmount());
paymentDetails.setCheckNumber(form.getCheckNumber());
paymentDetails.setBankName(form.getBankName());
paymentDetails.setBranchName(form.getBranchName());
paymentDetails.setBusinessTransaction(transaction);
if(action.equals(Constants.TRANSACTION_PAYMENT))
paymentDetails.setDescription("Firm has Paid this amount to "+form.getAccount());
else if(action.equals(Constants.TRANSACTION_RECEIPT))
paymentDetails.setDescription("Firm has Recieved this amount from "+form.getAccount());
transaction.setPaymentMode(Constants.PAYMENT_MODE_CHECK);
transaction.setPaymentDetails(paymentDetails);
}