fixed for settlement
This commit is contained in:
parent
175ebab148
commit
ddd64fb48d
@ -12,6 +12,7 @@ import com.utsmm.kbz.ui.management.ManagementViewModel;
|
||||
import com.utsmm.kbz.ui.settlement.model.CurrencyBucket;
|
||||
import com.utsmm.kbz.util.CurrencySelectionHelper;
|
||||
import com.utsmm.kbz.util.EReceiptUtil;
|
||||
import com.utsmm.kbz.util.enums.TransactionStatus;
|
||||
import com.utsmyanmar.baselib.fragment.DataBindingFragment;
|
||||
import com.utsmyanmar.baselib.network.model.e_receipt.EReceiptRequest;
|
||||
import com.utsmyanmar.baselib.util.DataBindingConfig;
|
||||
@ -455,13 +456,14 @@ public class SettlementTransactionFragment extends DataBindingFragment implement
|
||||
@Override
|
||||
public void onSuccessSignOn() {
|
||||
|
||||
if(isUSDSettleNeeded()) {
|
||||
if(settlementViewModel.resultString.getValue() != TransactionStatus.ON_FINAL_SUCCESS) {
|
||||
currencySelectionHelper.applyCardCurrencyAndHost("MMK");
|
||||
settlementViewModel.startSettlementProcess(mmkBucket,true);
|
||||
} else {
|
||||
navigateToNext();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -234,14 +234,7 @@ public class SettlementViewModel extends ViewModel {
|
||||
if(payDetails != null && payDetails.size() > 0) {
|
||||
for (PayDetail pay:payDetails) {
|
||||
|
||||
// if(paydetail.getTransactionType() == TransactionsType.SALE.value) {
|
||||
// paydetail.setIsSettle(true);
|
||||
// updatePayDetail(paydetail);
|
||||
// } else {
|
||||
deletePayDetail(pay);
|
||||
// repository.deletePayDetail(paydetail);
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -271,14 +264,6 @@ public class SettlementViewModel extends ViewModel {
|
||||
|
||||
@SuppressWarnings("ConstantConditions")
|
||||
public void startSettlementProcess(CurrencyBucket currencyBucket,boolean isLast) {
|
||||
// saleCount = sale_count.getValue();
|
||||
// saleAmount = sale_amount.getValue();
|
||||
// preAuthCount = pre_count.getValue();
|
||||
// preAuthAmount = pre_amount.getValue();
|
||||
// refundCount = refund_count.getValue();
|
||||
// refundAmount = refund_amount.getValue();
|
||||
// caCount = ca_count.getValue();
|
||||
// caAmount = ca_amount.getValue();
|
||||
this.isLast = isLast;
|
||||
SystemParamsOperation.getInstance().getIncrementBatchNo();
|
||||
|
||||
@ -356,7 +341,7 @@ public class SettlementViewModel extends ViewModel {
|
||||
updateDB();
|
||||
insertPayDetail(payDetail);
|
||||
|
||||
resultString.postValue(TransactionStatus.ON_SUCCESS);
|
||||
resultString.postValue(TransactionStatus.ON_FINAL_SUCCESS);
|
||||
}
|
||||
|
||||
private void requestOnlineProcessSettlement(CurrencyBucket currencyBucket) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user