feat issues refs #7636
This commit is contained in:
parent
c35b763376
commit
3ed094444b
|
@ -15,11 +15,11 @@ import es.verdnatura.R
|
||||||
import es.verdnatura.databinding.ItemArticleRowFragmentBinding
|
import es.verdnatura.databinding.ItemArticleRowFragmentBinding
|
||||||
import es.verdnatura.domain.ConstAndValues.SACADOR
|
import es.verdnatura.domain.ConstAndValues.SACADOR
|
||||||
import es.verdnatura.presentation.common.OnMistakeClickListener
|
import es.verdnatura.presentation.common.OnMistakeClickListener
|
||||||
|
import es.verdnatura.presentation.common.OnPackingClickListener
|
||||||
import es.verdnatura.presentation.common.OnPasillerosItemClickListener
|
import es.verdnatura.presentation.common.OnPasillerosItemClickListener
|
||||||
import es.verdnatura.presentation.common.OnQuantityClickListener
|
import es.verdnatura.presentation.common.OnQuantityClickListener
|
||||||
import es.verdnatura.presentation.common.OnSaleClickListener
|
import es.verdnatura.presentation.common.OnSaleClickListener
|
||||||
import es.verdnatura.presentation.common.OnTicketClickListener
|
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.pasillero.model.PasillerosItemVO
|
||||||
import es.verdnatura.presentation.view.feature.sacador.model.SaleVO
|
import es.verdnatura.presentation.view.feature.sacador.model.SaleVO
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ class SaleAdapter(
|
||||||
private val onQuantityClick: OnQuantityClickListener,
|
private val onQuantityClick: OnQuantityClickListener,
|
||||||
private val onSaleClickListener: OnSaleClickListener,
|
private val onSaleClickListener: OnSaleClickListener,
|
||||||
private val onMistakeClickListener: OnMistakeClickListener,
|
private val onMistakeClickListener: OnMistakeClickListener,
|
||||||
private val onPackingClick: onPackingClickListener,
|
private val onPackingClick: OnPackingClickListener,
|
||||||
private var onTicketClick: OnTicketClickListener? = null,
|
private var onTicketClick: OnTicketClickListener? = null,
|
||||||
private var SaleAdapter: SaleAdapter? = null,
|
private var SaleAdapter: SaleAdapter? = null,
|
||||||
private var type: String? = null,
|
private var type: String? = null,
|
||||||
|
|
|
@ -65,7 +65,7 @@ class SaleAdapterNew(
|
||||||
) : RecyclerView.ViewHolder(binding.root) {
|
) : RecyclerView.ViewHolder(binding.root) {
|
||||||
fun bind(sale: Sale) {
|
fun bind(sale: Sale) {
|
||||||
binding.apply {
|
binding.apply {
|
||||||
if (sale.reservedQuantity == null) sale.reservedQuantity = 0
|
// if (sale.reservedQuantity == null) sale.reservedQuantity = 0
|
||||||
|
|
||||||
val childLayoutManager =
|
val childLayoutManager =
|
||||||
LinearLayoutManager(context!!, RecyclerView.HORIZONTAL, false)
|
LinearLayoutManager(context!!, RecyclerView.HORIZONTAL, false)
|
||||||
|
@ -268,10 +268,9 @@ class SaleAdapterNew(
|
||||||
}
|
}
|
||||||
binding.packingTopicker.text = textToConcat
|
binding.packingTopicker.text = textToConcat
|
||||||
|
|
||||||
var result2: Int
|
val textToConcat2: String
|
||||||
var textToConcat2: String
|
|
||||||
|
|
||||||
result2 = sale.accumulatedQuantity % (sale.packing ?: sale.saleQuantity + 1)
|
val result2: Int = sale.accumulatedQuantity % (sale.packing ?: sale.saleQuantity + 1)
|
||||||
if (result2 != 0) {
|
if (result2 != 0) {
|
||||||
textToConcat2 =
|
textToConcat2 =
|
||||||
"${(sale.saleQuantity - sale.accumulatedQuantity) / (sale.grouping ?: 1)} x ${sale.grouping ?: "1"}"
|
"${(sale.saleQuantity - sale.accumulatedQuantity) / (sale.grouping ?: 1)} x ${sale.grouping ?: "1"}"
|
||||||
|
|
Loading…
Reference in New Issue