diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/LoadUnloadFragment.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/LoadUnloadFragment.kt index d6aa5268..bbed5251 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/LoadUnloadFragment.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/LoadUnloadFragment.kt @@ -182,11 +182,13 @@ class LoadUnloadFragment( for (l in list) { mlist.add( ExpeditionSalix( - expeditionFk = l.id, stateCode = if (l.code != state && l.code != "FOUND") { + expeditionFk = l.id, + stateCode = if (l.code != state && l.code != "FOUND" && l.code != "DELIVERED") { "LOST" } else { l.code - }, isScanned = l.isScanned + }, + isScanned = l.isScanned ) ) } @@ -459,7 +461,9 @@ class LoadUnloadFragment( binding.expeditionloadunloadRecyclerview.layoutManager = LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false) binding.mainToolbar.toolbarSubtitle.text = getString( - R.string.summaryCount, myList.filter { it.code == state }.size, myList.size + R.string.summaryCount, + myList.filter { it.code == state || it.code == "DELIVERED" }.size, + myList.size ) setListPosition(myList) diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/SummaryFragment.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/SummaryFragment.kt index dbb54ca8..6a6b690b 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/SummaryFragment.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/SummaryFragment.kt @@ -152,7 +152,7 @@ class SummaryFragment( ) { val listExpedition = list.filter { it.addressFk == address }.map { l -> ExpeditionSalix( - expeditionFk = l.id, stateCode = if (l.code == state) { + expeditionFk = l.id, stateCode = if (l.code == state && l.code != "DELIVERED") { state } else { "FOUND"