diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/collection/adapter/SaleAdapter.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/collection/adapter/SaleAdapter.kt index 8c8cdfd8..047f74d2 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/collection/adapter/SaleAdapter.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/collection/adapter/SaleAdapter.kt @@ -15,11 +15,11 @@ import es.verdnatura.R import es.verdnatura.databinding.ItemArticleRowFragmentBinding import es.verdnatura.domain.ConstAndValues.SACADOR import es.verdnatura.presentation.common.OnMistakeClickListener +import es.verdnatura.presentation.common.OnPackingClickListener import es.verdnatura.presentation.common.OnPasillerosItemClickListener import es.verdnatura.presentation.common.OnQuantityClickListener import es.verdnatura.presentation.common.OnSaleClickListener import es.verdnatura.presentation.common.OnTicketClickListener -import es.verdnatura.presentation.common.onPackingClickListener import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO import es.verdnatura.presentation.view.feature.sacador.model.SaleVO @@ -29,7 +29,7 @@ class SaleAdapter( private val onQuantityClick: OnQuantityClickListener, private val onSaleClickListener: OnSaleClickListener, private val onMistakeClickListener: OnMistakeClickListener, - private val onPackingClick: onPackingClickListener, + private val onPackingClick: OnPackingClickListener, private var onTicketClick: OnTicketClickListener? = null, private var SaleAdapter: SaleAdapter? = null, private var type: String? = null, diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/collection/adapter/SaleAdapterNew.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/collection/adapter/SaleAdapterNew.kt index b7b2791c..1cf46c52 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/collection/adapter/SaleAdapterNew.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/collection/adapter/SaleAdapterNew.kt @@ -65,7 +65,7 @@ class SaleAdapterNew( ) : RecyclerView.ViewHolder(binding.root) { fun bind(sale: Sale) { binding.apply { - if (sale.reservedQuantity == null) sale.reservedQuantity = 0 + // if (sale.reservedQuantity == null) sale.reservedQuantity = 0 val childLayoutManager = LinearLayoutManager(context!!, RecyclerView.HORIZONTAL, false) @@ -268,10 +268,9 @@ class SaleAdapterNew( } binding.packingTopicker.text = textToConcat - var result2: Int - var textToConcat2: String + val textToConcat2: String - result2 = sale.accumulatedQuantity % (sale.packing ?: sale.saleQuantity + 1) + val result2: Int = sale.accumulatedQuantity % (sale.packing ?: sale.saleQuantity + 1) if (result2 != 0) { textToConcat2 = "${(sale.saleQuantity - sale.accumulatedQuantity) / (sale.grouping ?: 1)} x ${sale.grouping ?: "1"}"