masterTax.setInvoiceHeader(masterHeader);
em.persist(masterTax);
}
}
PaymentTran paymentTran = invoiceHeader.getPaymentTran();
PaymentTran masterPaymentTran = null;
if (masterHeader != null) {
masterPaymentTran = masterHeader.getPaymentTran();
}
if (isSavePaymentTran(paymentTran, masterPaymentTran)) {
if (masterPaymentTran == null) {
masterPaymentTran = new PaymentTran();
}
PropertyUtils.copyProperties(masterPaymentTran, paymentTran);
masterHeader.setPaymentTran(masterPaymentTran);
if (masterPaymentTran.getPaymentTranId() == null) {
em.persist(masterPaymentTran);
}
}
PaymentTran voidPaymentTran = invoiceHeader.getVoidPaymentTran();
masterPaymentTran = null;
if (masterHeader != null) {
masterPaymentTran = masterHeader.getVoidPaymentTran();
}
if (isSavePaymentTran(voidPaymentTran, masterPaymentTran)) {
if (masterPaymentTran == null) {
masterPaymentTran = new PaymentTran();
}
PropertyUtils.copyProperties(masterPaymentTran, voidPaymentTran);
masterHeader.setVoidPaymentTran(masterPaymentTran);
if (masterPaymentTran.getPaymentTranId() == null) {
em.persist(masterPaymentTran);