version 23.40.1-hotFix OrderPrevia

This commit is contained in:
Sergio De la torre 2023-10-18 11:09:38 +02:00
parent 973f13bc8a
commit e475ef63f9
1 changed files with 3 additions and 8 deletions

View File

@ -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(