|
|
|
|
@ -125,18 +125,35 @@ class USendController extends GetxController {
|
|
|
|
|
selectedDepositAccount.value = item.data as DepositAccount;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void updateSelectedCurrency(/*DropDown? item*/ AccountInquiryResponseModel model) {
|
|
|
|
|
// void updateSelectedCurrency(/*DropDown? item*/ AccountInquiryResponseModel model) {
|
|
|
|
|
// print("************************model>> $model");
|
|
|
|
|
//
|
|
|
|
|
// for (int i = 0; i < SessionCache.instance.exchangeRateList.length; i++) {
|
|
|
|
|
// print("************************elementAt(i).pcrCurrcode>> ${SessionCache.instance.exchangeRateList.elementAt(i).pcrCurrcode}");
|
|
|
|
|
// if (SessionCache.instance.exchangeRateList.elementAt(i).pcrCurrcode == model.pcrCurrcode) {
|
|
|
|
|
// currencySymbol.value = SessionCache.instance.exchangeRateList.elementAt(i).pcrCurrshort;
|
|
|
|
|
// selectedExchangeRate = SessionCache.instance.exchangeRateList.elementAt(i);
|
|
|
|
|
// exchangeRateField.setText(selectedExchangeRate!.perEratrateact.toString());
|
|
|
|
|
// break;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
void updateSelectedCurrency(DropDown? item) {
|
|
|
|
|
if (item == null) return;
|
|
|
|
|
|
|
|
|
|
// Get ExchangeRate object from dropdown data
|
|
|
|
|
ExchangeRate model = item.data as ExchangeRate;
|
|
|
|
|
|
|
|
|
|
print("************************model>> $model");
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < SessionCache.instance.exchangeRateList.length; i++) {
|
|
|
|
|
print("************************elementAt(i).pcrCurrcode>> ${SessionCache.instance.exchangeRateList.elementAt(i).pcrCurrcode}");
|
|
|
|
|
if (SessionCache.instance.exchangeRateList.elementAt(i).pcrCurrcode == model.pcrCurrcode) {
|
|
|
|
|
currencySymbol.value = SessionCache.instance.exchangeRateList.elementAt(i).pcrCurrshort;
|
|
|
|
|
selectedExchangeRate = SessionCache.instance.exchangeRateList.elementAt(i);
|
|
|
|
|
exchangeRateField.setText(selectedExchangeRate!.perEratrateact.toString());
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
currencySymbol.value = model.pcrCurrshort ?? "";
|
|
|
|
|
|
|
|
|
|
selectedExchangeRate = model;
|
|
|
|
|
|
|
|
|
|
exchangeRateField.setText(
|
|
|
|
|
selectedExchangeRate!.perEratrateact.toString(),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void updateRecipientDetail(DropDown? item) {
|
|
|
|
|
@ -315,7 +332,7 @@ class USendController extends GetxController {
|
|
|
|
|
receiverAccountTitle = accountInquiryList.first.mbmBkmstitle;
|
|
|
|
|
receiverAccountNumber = accountInquiryList.first.mbmBkmsnumber;
|
|
|
|
|
recipientCardNameField.setText(receiverAccountTitle);
|
|
|
|
|
updateSelectedCurrency(accountInquiryList.first);
|
|
|
|
|
// updateSelectedCurrency(accountInquiryList.first);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
Get.dialog(
|
|
|
|
|
@ -349,7 +366,7 @@ class USendController extends GetxController {
|
|
|
|
|
receiverAccountTitle = accountInquiryList[index].mbmBkmstitle;
|
|
|
|
|
receiverAccountNumber = accountInquiryList[index].mbmBkmsnumber;
|
|
|
|
|
recipientCardNameField.setText(receiverAccountTitle);
|
|
|
|
|
updateSelectedCurrency(accountInquiryList[index]);
|
|
|
|
|
// updateSelectedCurrency(accountInquiryList[index]);
|
|
|
|
|
Get.back();
|
|
|
|
|
},
|
|
|
|
|
child: Column(children: [
|
|
|
|
|
|