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

Fix 693: repaid every field #700

Merged
merged 1 commit into from Jun 26, 2017
Jump to file or symbol
Failed to load files and symbols.
+25 −6
Diff settings

Always

Just for now

@@ -409,6 +409,9 @@ private void inflateRepaidMonthSpinners() {
.setDropDownViewResource(layout.simple_spinner_dropdown_item); .setDropDownViewResource(layout.simple_spinner_dropdown_item);
spRepaymentFreqDayOfWeek.setAdapter(mRepaymentFrequencyDayOfWeekTypeOptionsAdapter); spRepaymentFreqDayOfWeek.setAdapter(mRepaymentFrequencyDayOfWeekTypeOptionsAdapter);
spRepaymentFreqDayOfWeek.setOnItemSelectedListener(this); spRepaymentFreqDayOfWeek.setOnItemSelectedListener(this);
spRepaymentFreqNthDay.setSelection(mListRepaymentFrequencyNthDayTypeOptions.size() - 1);
spRepaymentFreqDayOfWeek.setSelection(
mListRepaymentFrequencyDayOfWeekTypeOptions.size() - 1);
} }
private void inflateLoansProductSpinner() { private void inflateLoansProductSpinner() {
@@ -471,6 +474,8 @@ public void showLoanAccountTemplate(LoanTemplate loanTemplate) {
for (RepaymentFrequencyNthDayTypeOptions options : mRepaymentFrequencyNthDayTypeOptions) { for (RepaymentFrequencyNthDayTypeOptions options : mRepaymentFrequencyNthDayTypeOptions) {
mListRepaymentFrequencyNthDayTypeOptions.add(options.getValue()); mListRepaymentFrequencyNthDayTypeOptions.add(options.getValue());
} }
mListRepaymentFrequencyNthDayTypeOptions.add(
getResources().getString(R.string.select_week_hint));
mListRepaymentFrequencyDayOfWeekTypeOptions.clear(); mListRepaymentFrequencyDayOfWeekTypeOptions.clear();
mRepaymentFrequencyDaysOfWeekTypeOptions = mLoanTemplate mRepaymentFrequencyDaysOfWeekTypeOptions = mLoanTemplate
@@ -479,6 +484,8 @@ public void showLoanAccountTemplate(LoanTemplate loanTemplate) {
: mRepaymentFrequencyDaysOfWeekTypeOptions) { : mRepaymentFrequencyDaysOfWeekTypeOptions) {
mListRepaymentFrequencyDayOfWeekTypeOptions.add(options.getValue()); mListRepaymentFrequencyDayOfWeekTypeOptions.add(options.getValue());
} }
mListRepaymentFrequencyDayOfWeekTypeOptions.add(
getResources().getString(R.string.select_day_hint));
mListLoanPurposeOptions.clear(); mListLoanPurposeOptions.clear();
for (com.mifos.objects.templates.loans.LoanPurposeOptions loanPurposeOptions : for (com.mifos.objects.templates.loans.LoanPurposeOptions loanPurposeOptions :
@@ -619,15 +626,25 @@ public void onItemSelected(AdapterView<?> parent, View view, int position, long
} }
break; break;
case R.id.sp_repayment_freq_nth_day: case R.id.sp_repayment_freq_nth_day:
repaymentFrequencyNthDayType = mLoanTemplate if (mListRepaymentFrequencyNthDayTypeOptions.get(position)
.getRepaymentFrequencyNthDayTypeOptions() .equals(getResources().getString(R.string.select_week_hint))) {
.get(position).getId(); repaymentFrequencyNthDayType = null;
} else {
repaymentFrequencyNthDayType = mLoanTemplate
.getRepaymentFrequencyNthDayTypeOptions()
.get(position).getId();
}
break; break;
case R.id.sp_repayment_freq_day_of_week: case R.id.sp_repayment_freq_day_of_week:
repaymentFrequencyDayOfWeek = mLoanTemplate if (mListRepaymentFrequencyDayOfWeekTypeOptions.get(position)
.getRepaymentFrequencyDaysOfWeekTypeOptions() .equals(getResources().getString(R.string.select_day_hint))) {
.get(position).getId(); repaymentFrequencyDayOfWeek = null;
} else {
repaymentFrequencyDayOfWeek = mLoanTemplate
.getRepaymentFrequencyDaysOfWeekTypeOptions()
.get(position).getId();
}
break; break;
case R.id.sp_fund : case R.id.sp_fund :
@@ -353,6 +353,8 @@
<string name="loan_disbursement_date">Disbursement Date</string> <string name="loan_disbursement_date">Disbursement Date</string>
<string name="loan_account_linking_option_label">Link Savings</string> <string name="loan_account_linking_option_label">Link Savings</string>
<string name="select_linkage_account_hint">Select Account</string> <string name="select_linkage_account_hint">Select Account</string>
<string name="select_week_hint">Select Week</string>
<string name="select_day_hint">Select Day</string>
<string name="savings_interest_earned">Interest Earned</string> <string name="savings_interest_earned">Interest Earned</string>
<string name="sync">Sync</string> <string name="sync">Sync</string>
<string name="enter_center_id">Center Id</string> <string name="enter_center_id">Center Id</string>
ProTip! Use n and p to navigate between commits in a pull request.