Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rms integration #52

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ojwanganto
Copy link
Collaborator

@PatrickWaweru - am putting this PR to help us jointly review the code. I know we can have it in the other module.

@@ -129,6 +138,48 @@ public <E extends OpenmrsObject> E selectSingle(Class<E> cls, Serializable id) {
}
}

@Override
@SuppressWarnings("unchecked")
public Set<Payment> getPaymentsByBillId(Integer billId) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PatrickWaweru - do we really need this? Can't we use bill.getPayment()?

oldBill = (Bill) args[0];

Integer oldBillId = oldBill.getId();
oldPayments = Context.getService(IBillService.class).getPaymentsByBillId(oldBillId);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I introduced this here and removed the IbillService from the class variables

http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-3.0.xsd">


<bean id="billSavePaymentAspect" class="org.openmrs.module.kenyaemr.cashier.advice.NewBillPaymentSyncToRMS"/>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the property from the class thus the drop here

<bean id="billSavePaymentAspect" class="org.openmrs.module.kenyaemr.cashier.advice.NewBillPaymentSyncToRMS"/>

<!-- Create a proxy for BillService -->
<bean id="cashierBillService" class="org.springframework.aop.framework.ProxyFactoryBean">
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is in these configurations where we potentially may have missed something. We will keep digging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants