MIFOSX-2180
This commit is contained in:
+1
-1
@@ -92,7 +92,7 @@ public class Charge extends AbstractPersistable<Long> {
|
|||||||
private Integer feeFrequency;
|
private Integer feeFrequency;
|
||||||
|
|
||||||
@ManyToOne(fetch = FetchType.LAZY)
|
@ManyToOne(fetch = FetchType.LAZY)
|
||||||
@JoinColumn(name = "gl_account_id")
|
@JoinColumn(name = "income_or_liability_account_id")
|
||||||
private GLAccount account;
|
private GLAccount account;
|
||||||
|
|
||||||
public static Charge fromJson(final JsonCommand command, final GLAccount account) {
|
public static Charge fromJson(final JsonCommand command, final GLAccount account) {
|
||||||
|
|||||||
+1
-1
@@ -138,7 +138,7 @@ public class ClientChargeWritePlatformServiceJpaRepositoryImpl implements Client
|
|||||||
|
|
||||||
ClientTransaction clientTransaction = ClientTransaction.payCharge(client, client.getOffice(), paymentDetail, transactionDate,
|
ClientTransaction clientTransaction = ClientTransaction.payCharge(client, client.getOffice(), paymentDetail, transactionDate,
|
||||||
chargePaid, clientCharge.getCurrency().getCode(), getAppUserIfPresent());
|
chargePaid, clientCharge.getCurrency().getCode(), getAppUserIfPresent());
|
||||||
this.clientTransactionRepository.save(clientTransaction);
|
this.clientTransactionRepository.saveAndFlush(clientTransaction);
|
||||||
|
|
||||||
// update charge paid by associations
|
// update charge paid by associations
|
||||||
final ClientChargePaidBy chargePaidBy = ClientChargePaidBy.instance(clientTransaction, clientCharge, amountPaid);
|
final ClientChargePaidBy chargePaidBy = ClientChargePaidBy.instance(clientTransaction, clientCharge, amountPaid);
|
||||||
|
|||||||
+1
@@ -72,6 +72,7 @@ public class ClientTransactionWritePlatformServiceJpaRepositoryImpl implements C
|
|||||||
}
|
}
|
||||||
|
|
||||||
// generate accounting entries
|
// generate accounting entries
|
||||||
|
this.clientTransactionRepository.saveAndFlush(clientTransaction);
|
||||||
generateAccountingEntries(clientTransaction);
|
generateAccountingEntries(clientTransaction);
|
||||||
|
|
||||||
return new CommandProcessingResultBuilder() //
|
return new CommandProcessingResultBuilder() //
|
||||||
|
|||||||
Reference in New Issue
Block a user