From e475ef63f95598efef3a627756d3689798987350 Mon Sep 17 00:00:00 2001 From: Sergio De la torre Date: Wed, 18 Oct 2023 11:09:38 +0200 Subject: [PATCH] version 23.40.1-hotFix OrderPrevia --- .../feature/presacador/fragment/EndSacadorFragment.kt | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/fragment/EndSacadorFragment.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/fragment/EndSacadorFragment.kt index 83fd8648..86207b47 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/fragment/EndSacadorFragment.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/fragment/EndSacadorFragment.kt @@ -599,21 +599,16 @@ class EndSacadorFragment( for (s in sales) { - // Log.d("VERDNATURA::","sales comercial"+s.salesPersonFk) //sergio: para que no de error si no hay carros. Ya está asignado a 0 el pickingorder si no hay item en el carro if (!s.carros.isNullOrEmpty()) { - s.carros = s.carros.sortedWith(compareBy{it.pickingOrder}).sortedWith( - compareByDescending{it.priority}) + /* s.carros = s.carros.sortedWith(compareBy{it.pickingOrder}).sortedWith( + compareByDescending{it.priority})*/ s.pickingOrder = s.carros.get(0).pickingOrder } } - - // var sortedSales = sales.sortedBy { it.pickingOrder } - //sergio: Se ordena las sales por ellas mismas con With - sales.sortWith(compareBy({ it.pickingOrder })) - + sales.sortWith(compareBy { it.pickingOrder }) lm = LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false) saleAdapter = PreSacadorAdapter(