settlement fixed
This commit is contained in:
parent
716030128a
commit
35973963e6
@ -128,8 +128,8 @@ public class MainViewModel extends ViewModel {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
public LiveData<List<PayDetail>> getDeleteTrans(String batchNo) {
|
public LiveData<List<PayDetail>> getDeleteTrans() {
|
||||||
return repository.getDeleteTrans(batchNo);
|
return repository.getDeleteTrans();
|
||||||
}
|
}
|
||||||
|
|
||||||
private LiveData<List<PayDetail>> getPreAuthTrans() {
|
private LiveData<List<PayDetail>> getPreAuthTrans() {
|
||||||
@ -171,7 +171,7 @@ public class MainViewModel extends ViewModel {
|
|||||||
settlementPOS.postValue(payDetails);
|
settlementPOS.postValue(payDetails);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
getDeleteTrans(SystemParamsOperation.getInstance().getCurrentBatchNum()).observeForever(new Observer<List<PayDetail>>() {
|
getDeleteTrans().observeForever(new Observer<List<PayDetail>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onChanged(List<PayDetail> payDetails) {
|
public void onChanged(List<PayDetail> payDetails) {
|
||||||
deleteTrans.postValue(payDetails);
|
deleteTrans.postValue(payDetails);
|
||||||
|
|||||||
@ -278,7 +278,7 @@ public class SettlementTransactionFragment extends DataBindingFragment implement
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
settlementViewModel.getDeleteTrans(SystemParamsOperation.getInstance().getCurrentBatchNum()).observe(getViewLifecycleOwner(), new Observer<List<PayDetail>>() {
|
settlementViewModel.getDeleteTrans().observe(getViewLifecycleOwner(), new Observer<List<PayDetail>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onChanged(List<PayDetail> payDetails) {
|
public void onChanged(List<PayDetail> payDetails) {
|
||||||
settlementViewModel.deleteTrans.clear();
|
settlementViewModel.deleteTrans.clear();
|
||||||
|
|||||||
@ -159,8 +159,8 @@ public class SettlementViewModel extends ViewModel {
|
|||||||
return repository.getSettlementPOS();
|
return repository.getSettlementPOS();
|
||||||
}
|
}
|
||||||
|
|
||||||
public LiveData<List<PayDetail>> getDeleteTrans(String batchNo) {
|
public LiveData<List<PayDetail>> getDeleteTrans() {
|
||||||
return repository.getDeleteTrans(batchNo);
|
return repository.getDeleteTrans();
|
||||||
}
|
}
|
||||||
|
|
||||||
public LiveData<List<PayDetail>> getAdditionalSettlementPOS() {
|
public LiveData<List<PayDetail>> getAdditionalSettlementPOS() {
|
||||||
|
|||||||
@ -78,10 +78,11 @@ public interface PayDetailDao {
|
|||||||
LiveData<List<PayDetail>> getSettlementPOSClearBatch();
|
LiveData<List<PayDetail>> getSettlementPOSClearBatch();
|
||||||
|
|
||||||
// 6 = PRE AUTH CANCEL, 7= PRE_AUTH_COMPLETE , 5 = PRE AUTH
|
// 6 = PRE AUTH CANCEL, 7= PRE_AUTH_COMPLETE , 5 = PRE AUTH
|
||||||
|
// Note: type 20 (MMQR) and type 34 (MMQR_REFUND) are intentionally excluded — QR records are managed separately by QR settlement only
|
||||||
// @Query(("SELECT * FROM paydetail WHERE transactionType = 1 AND isCanceled = 1 OR transactionType = 2 AND isCanceled = 0 OR transactionType = 18 AND isCanceled = 0 AND batchNo IN(:batchNo)"))
|
// @Query(("SELECT * FROM paydetail WHERE transactionType = 1 AND isCanceled = 1 OR transactionType = 2 AND isCanceled = 0 OR transactionType = 18 AND isCanceled = 0 AND batchNo IN(:batchNo)"))
|
||||||
// @Query(("SELECT * FROM paydetail WHERE transactionType = 1 AND isCanceled = 1 OR transactionType = 5 AND isCanceled = 1 OR transactionType = 7 AND isCanceled = 1 OR transactionType = 8 OR transactionType = 6 OR transactionType = 10 OR transactionType = 2 AND isCanceled = 0 OR transactionType = 18 AND isCanceled = 0 OR transactionType = 20 AND isCanceled = 0 OR transactionType = 34 AND isCanceled = 1 AND batchNo IN(:batchNo)"))
|
// @Query(("SELECT * FROM paydetail WHERE transactionType = 1 AND isCanceled = 1 OR transactionType = 5 AND isCanceled = 1 OR transactionType = 7 AND isCanceled = 1 OR transactionType = 8 OR transactionType = 6 OR transactionType = 10 OR transactionType = 2 AND isCanceled = 0 OR transactionType = 18 AND isCanceled = 0 OR transactionType = 20 AND isCanceled = 0 OR transactionType = 34 AND isCanceled = 1 AND batchNo IN(:batchNo)"))
|
||||||
@Query(("SELECT * FROM paydetail WHERE transactionType = 1 AND isCanceled = 1 OR transactionType = 5 AND isCanceled = 1 OR transactionType = 7 AND isCanceled = 1 OR transactionType = 8 OR transactionType = 6 OR transactionType = 10 OR transactionType = 2 AND isCanceled = 0 OR transactionType = 18 AND isCanceled = 0 OR transactionType = 34 AND isCanceled = 1 AND batchNo IN(:batchNo)"))
|
@Query(("SELECT * FROM paydetail WHERE transactionType = 1 AND isCanceled = 1 OR transactionType = 5 AND isCanceled = 1 OR transactionType = 7 AND isCanceled = 1 OR transactionType = 8 OR transactionType = 6 OR transactionType = 10 OR transactionType = 2 AND isCanceled = 0 OR transactionType = 18 AND isCanceled = 0"))
|
||||||
LiveData<List<PayDetail>> getDeleteTrans(String batchNo);
|
LiveData<List<PayDetail>> getDeleteTrans();
|
||||||
|
|
||||||
@Query("SELECT * FROM paydetail WHERE transactionType = 5 AND isCanceled = 0")
|
@Query("SELECT * FROM paydetail WHERE transactionType = 5 AND isCanceled = 0")
|
||||||
LiveData<List<PayDetail>> getPreAuthTrans();
|
LiveData<List<PayDetail>> getPreAuthTrans();
|
||||||
|
|||||||
@ -307,8 +307,8 @@ public class Repository {
|
|||||||
return payDetailDao.getSettlementPOSClearBatch();
|
return payDetailDao.getSettlementPOSClearBatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
public LiveData<List<PayDetail>> getDeleteTrans(String batchNo) {
|
public LiveData<List<PayDetail>> getDeleteTrans() {
|
||||||
return payDetailDao.getDeleteTrans(batchNo);
|
return payDetailDao.getDeleteTrans();
|
||||||
}
|
}
|
||||||
|
|
||||||
public LiveData<List<PayDetail>> getPreAuthTrans() {
|
public LiveData<List<PayDetail>> getPreAuthTrans() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user