refs #5890
This commit is contained in:
parent
bef565c064
commit
ecbea7fa6c
|
@ -10,3 +10,9 @@ class packingSiteSalix(
|
|||
var workerFk: Int
|
||||
|
||||
)
|
||||
|
||||
data class ItemShelvingSaleSalix(
|
||||
var id:Int,
|
||||
var quantity:Int,
|
||||
var isItemShelvingSaleEmpty:Boolean?
|
||||
)
|
||||
|
|
|
@ -19,7 +19,9 @@ import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionT
|
|||
import es.verdnatura.presentation.view.feature.paletizador.model.ItemPalletVO
|
||||
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
|
||||
import es.verdnatura.presentation.view.feature.reubication.model.Reubication
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.CollectionTicket
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.Sale
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.SaleVO
|
||||
import es.verdnatura.presentation.view.feature.smarttag.model.SmartTag
|
||||
import es.verdnatura.presentation.view.feature.ubicador.model.ItemUbicadorVO
|
||||
|
@ -159,18 +161,32 @@ interface OnCollectionSelectedListener {
|
|||
fun onCollectionSelected(collection: CollectionVO, type: String)
|
||||
}
|
||||
|
||||
interface OnCollectionTicketSelectedListener {
|
||||
fun onCollectionSelected(collection: CollectionTicket, type: String)
|
||||
}
|
||||
|
||||
interface OnQuantityClickListener {
|
||||
fun onQuantityClick(sale: SaleVO)
|
||||
}
|
||||
|
||||
interface OnQuantityClickSaleListener {
|
||||
fun onQuantityClick(sale: Sale)
|
||||
}
|
||||
|
||||
interface onPackingClickListener {
|
||||
fun onPackingClick(sale: SaleVO)
|
||||
}
|
||||
interface OnPackingClickSaleListener {
|
||||
fun onPackingClick(sale: Sale)
|
||||
}
|
||||
|
||||
|
||||
interface OnSaleClickListener {
|
||||
fun onSaleClick(sale: SaleVO)
|
||||
}
|
||||
|
||||
interface OnSaleClickSaleListener {
|
||||
fun onSaleClick(sale: Sale)
|
||||
}
|
||||
interface OnReubicationClickListener {
|
||||
fun onReubicationClick(reubication: Reubication)
|
||||
}
|
||||
|
@ -182,6 +198,9 @@ interface OnMistakeClickListener {
|
|||
interface OnTicketClickListener {
|
||||
fun onTicketClickListener(sale: SaleVO)
|
||||
}
|
||||
interface OnTicketClickSaleListener {
|
||||
fun onTicketClickListener(sale: Sale)
|
||||
}
|
||||
|
||||
interface OnBuyerSelectedListener {
|
||||
fun onBuyerSelected(userFk: String)
|
||||
|
|
|
@ -0,0 +1,346 @@
|
|||
package es.verdnatura.presentation.view.feature.collection.adapter
|
||||
|
||||
import android.content.Context
|
||||
import android.content.res.ColorStateList
|
||||
import android.graphics.Color
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.core.content.ContextCompat.getColor
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import es.verdnatura.R
|
||||
import es.verdnatura.databinding.SaleRowFragmentBinding
|
||||
import es.verdnatura.domain.ConstAndValues.SACADOR
|
||||
import es.verdnatura.presentation.common.OnMistakeClickListener
|
||||
import es.verdnatura.presentation.common.OnPackingClickSaleListener
|
||||
import es.verdnatura.presentation.common.OnPasillerosItemClickListener
|
||||
import es.verdnatura.presentation.common.OnQuantityClickSaleListener
|
||||
import es.verdnatura.presentation.common.OnSaleClickSaleListener
|
||||
import es.verdnatura.presentation.common.OnTicketClickSaleListener
|
||||
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.Sale
|
||||
|
||||
|
||||
class SaleAdapterNew(
|
||||
private val items: List<Sale>,
|
||||
private val onPasillerosItemClickListener: OnPasillerosItemClickListener,
|
||||
private val onQuantityClick: OnQuantityClickSaleListener,
|
||||
private val onSaleClickListener: OnSaleClickSaleListener,
|
||||
private val onMistakeClickListener: OnMistakeClickListener,
|
||||
private val onPackingClick: OnPackingClickSaleListener,
|
||||
private var onTicketClick: OnTicketClickSaleListener? = null,
|
||||
private var SaleAdapter: SaleAdapterNew? = null,
|
||||
private var type: String? = null,
|
||||
|
||||
) : RecyclerView.Adapter<SaleAdapterNew.AjustesItemHolder>() {
|
||||
var context: Context? = null
|
||||
var position: Int = 0
|
||||
|
||||
var isExpanded: Boolean = type == "PRECHECKER"
|
||||
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): AjustesItemHolder {
|
||||
this.context = parent.context
|
||||
|
||||
|
||||
return AjustesItemHolder(
|
||||
|
||||
SaleRowFragmentBinding.inflate(
|
||||
LayoutInflater.from(parent.context),
|
||||
parent,
|
||||
false
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
override fun getItemCount() = items.size
|
||||
|
||||
override fun onBindViewHolder(holder: AjustesItemHolder, position: Int) {
|
||||
this.position = position
|
||||
holder.bind(items[position])
|
||||
}
|
||||
|
||||
inner class AjustesItemHolder(
|
||||
val binding: SaleRowFragmentBinding
|
||||
) : RecyclerView.ViewHolder(binding.root) {
|
||||
fun bind(sale: Sale) {
|
||||
binding.apply {
|
||||
if (sale.reservedQuantity == null)
|
||||
sale.reservedQuantity = 0
|
||||
|
||||
val childLayoutManager =
|
||||
LinearLayoutManager(context!!, RecyclerView.HORIZONTAL, false)
|
||||
|
||||
val childLayoutManagerV =
|
||||
LinearLayoutManager(context!!, RecyclerView.VERTICAL, false)
|
||||
|
||||
|
||||
itemArticlePlacements.apply {
|
||||
layoutManager = childLayoutManager
|
||||
|
||||
// se quita porque ya no es necesario
|
||||
// adapter = PlacementAdapter(sale.placements, onPasillerosItemClickListener)
|
||||
}
|
||||
|
||||
//CLICK EVENTS
|
||||
contentLayout.setOnClickListener {
|
||||
if (!sale.isParent) {
|
||||
onSaleClickListener.onSaleClick(sale)
|
||||
}
|
||||
}
|
||||
|
||||
itemArticleItemFk.setOnClickListener {
|
||||
onPasillerosItemClickListener.onPasillerosItemClickListener(
|
||||
PasillerosItemVO(
|
||||
title = binding.root.context.getString(R.string.titleItemConsult)
|
||||
), sale.itemFk.toString()
|
||||
)
|
||||
}
|
||||
|
||||
itemPackingItemFk.setOnClickListener {
|
||||
onPackingClick.onPackingClick(sale)
|
||||
}
|
||||
|
||||
itemArticleQuantity.setOnClickListener {
|
||||
onQuantityClick.onQuantityClick(sale)
|
||||
}
|
||||
|
||||
itemArticleQuantityPicked.setOnClickListener {
|
||||
onQuantityClick.onQuantityClick(sale)
|
||||
}
|
||||
|
||||
txtde.setOnClickListener {
|
||||
onQuantityClick.onQuantityClick(sale)
|
||||
}
|
||||
|
||||
itemArticleFirstAccumulate.setOnClickListener {
|
||||
onQuantityClick.onQuantityClick(sale)
|
||||
}
|
||||
itemFirstToPicker.setOnClickListener {
|
||||
onQuantityClick.onQuantityClick(sale)
|
||||
}
|
||||
|
||||
linearLayoutItem.setOnClickListener {
|
||||
|
||||
println("El ticket es ${sale.ticketFk}")
|
||||
if (onTicketClick != null) {
|
||||
onTicketClick!!.onTicketClickListener(sale)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*itemRowLayout.setOnLongClickListener{
|
||||
onMistakeClickListener.onMistakeClickListener(sale)
|
||||
false
|
||||
}*/
|
||||
|
||||
imageErrorMessage.setOnClickListener {
|
||||
// onMistakeClickListener.onMistakeClickListener(sale)
|
||||
false
|
||||
}
|
||||
|
||||
|
||||
//ERROR
|
||||
if (sale.originalQuantity != sale.saleQuantity && sale.originalQuantity != null) {
|
||||
layoutError.visibility = View.VISIBLE
|
||||
txtError.text =
|
||||
binding.root.context.getString(R.string.originalQuantity) + sale.originalQuantity!!
|
||||
|
||||
}
|
||||
|
||||
if (sale.isAdded == 1) {
|
||||
layoutError.visibility = View.VISIBLE
|
||||
txtError.text = binding.root.context.getString(R.string.newItem)
|
||||
|
||||
}
|
||||
|
||||
paintTicketcolor(sale.rgb, itemTicketColor, sale.isPicked)
|
||||
|
||||
if (sale.isAdded == 1 && sale.reservedQuantity != sale.saleQuantity) {
|
||||
layoutError.visibility = View.GONE
|
||||
}
|
||||
|
||||
if (sale.isPicked == 1) {
|
||||
contentLayout.setBackgroundColor(
|
||||
getColor(
|
||||
context!!,
|
||||
R.color.verdnatura_pumpkin_orange
|
||||
)
|
||||
)
|
||||
} else {
|
||||
contentLayout.setBackgroundColor(
|
||||
getColor(
|
||||
context!!,
|
||||
R.color.verdnatura_black
|
||||
)
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (isExpanded) {
|
||||
itemArticlePlacements.visibility = View.VISIBLE
|
||||
ivArrow.setImageResource(R.drawable.ic_arrow_down)
|
||||
|
||||
} else {
|
||||
itemArticlePlacements.visibility = View.GONE
|
||||
ivArrow.setImageResource(R.drawable.ic_arrow_up)
|
||||
}
|
||||
|
||||
itemArticlePlacements.visibility = if (isExpanded) View.VISIBLE else {
|
||||
View.GONE
|
||||
}
|
||||
|
||||
if (sale.isParent) {
|
||||
itemArticleItemFk.visibility = View.INVISIBLE
|
||||
itemPackingText.visibility = View.INVISIBLE
|
||||
itemPackingItemFk.visibility = View.INVISIBLE
|
||||
itemArticleCel1.visibility = View.INVISIBLE
|
||||
itemArticleCel2.visibility = View.INVISIBLE
|
||||
itemArticleCel3.visibility = View.INVISIBLE
|
||||
itemArticleQuantity.visibility = View.INVISIBLE
|
||||
txtdeNew.visibility = View.INVISIBLE
|
||||
itemArticleQuantityPicked.visibility = View.INVISIBLE
|
||||
itemArticleQuantityLine3.visibility = View.VISIBLE
|
||||
imageErrorMessage.visibility = View.INVISIBLE
|
||||
ivArrow.visibility = View.VISIBLE
|
||||
|
||||
|
||||
} else {
|
||||
/*itemArticleItemFk.visibility = View.VISIBLE
|
||||
itemPackingText.visibility = View.VISIBLE
|
||||
itemPackingItemFk.visibility = View.VISIBLE
|
||||
itemArticleCel1.visibility = View.VISIBLE
|
||||
itemArticleCel2.visibility = View.VISIBLE
|
||||
itemArticleCel3.visibility = View.VISIBLE
|
||||
itemArticleQuantity.visibility = View.VISIBLE
|
||||
txtdeNew.visibility = View.VISIBLE
|
||||
itemArticleQuantityPicked.visibility = View.VISIBLE
|
||||
itemArticleQuantityLine3.visibility = View.VISIBLE*/
|
||||
if (type != SACADOR) {
|
||||
val colorRes =
|
||||
if (sale.hasMistake == true) R.color.verdnatura_red_salix else R.color.verdnatura_black
|
||||
imageErrorMessage.imageTintList =
|
||||
ColorStateList.valueOf(getColor(context!!, colorRes))
|
||||
imageErrorMessage.visibility = View.VISIBLE
|
||||
} else {
|
||||
imageErrorMessage.visibility = View.INVISIBLE
|
||||
}
|
||||
ivArrow.visibility = View.INVISIBLE
|
||||
}
|
||||
|
||||
if (!sale.sonSales.isNullOrEmpty()) {
|
||||
itemArticlePlacements.apply {
|
||||
layoutManager = childLayoutManagerV
|
||||
adapter = SaleAdapterNew(
|
||||
sale.sonSales,
|
||||
onPasillerosItemClickListener,
|
||||
onQuantityClick,
|
||||
onSaleClickListener,
|
||||
onMistakeClickListener,
|
||||
onPackingClick
|
||||
)
|
||||
}
|
||||
|
||||
} else {
|
||||
itemArticlePlacements.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
ivArrow.setOnClickListener {
|
||||
|
||||
if (isExpanded!!) {
|
||||
ivArrow.setImageResource(R.drawable.ic_arrow_up)
|
||||
itemArticlePlacements.visibility = View.GONE
|
||||
} else {
|
||||
|
||||
ivArrow.setImageResource(R.drawable.ic_arrow_down)
|
||||
itemArticlePlacements.visibility = View.VISIBLE
|
||||
}
|
||||
isExpanded = !isExpanded
|
||||
|
||||
}
|
||||
|
||||
// previA NUEVA
|
||||
if (sale.saleGroupFk == null) {
|
||||
previous.visibility = View.INVISIBLE
|
||||
} else {
|
||||
previous.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
var result: Int
|
||||
var textToConcat: String
|
||||
|
||||
result = sale.reservedQuantity % (sale.packing ?: sale.saleQuantity + 1)
|
||||
if (result != 0) {
|
||||
textToConcat =
|
||||
"${sale.reservedQuantity / (sale.grouping ?: 1)} x ${sale.grouping ?: "1"}"
|
||||
} else {
|
||||
textToConcat =
|
||||
"${sale.reservedQuantity / (sale.packing ?: 1)} pack de ${sale.packing ?: "1"}"
|
||||
}
|
||||
binding.itemArticleCel2.text = textToConcat
|
||||
binding.itemFirstToPicker.text = textToConcat
|
||||
|
||||
var result2: Int
|
||||
var textToConcat2: String
|
||||
|
||||
result2 = sale.accumulatedQuantity % (sale.packing ?: sale.saleQuantity + 1)
|
||||
if (result2 != 0) {
|
||||
textToConcat2 =
|
||||
"${(sale.saleQuantity - sale.accumulatedQuantity) / (sale.grouping ?: 1)} x ${sale.grouping ?: "1"}"
|
||||
} else {
|
||||
textToConcat2 =
|
||||
"${(sale.saleQuantity - sale.accumulatedQuantity) / (sale.packing ?: 1)} pack de ${sale.packing ?: "1"}"
|
||||
}
|
||||
|
||||
|
||||
if (sale.totalItemShelving > 1) {
|
||||
binding.itemArticleCel1.text = textToConcat2
|
||||
binding.itemSecondToPicker.text = textToConcat2
|
||||
|
||||
binding.itemReservedNumber.text =
|
||||
"${sale.currentItemShelving}/${sale.totalItemShelving}"
|
||||
|
||||
binding.itemSecond.text =
|
||||
"${sale.saleQuantity - sale.accumulatedQuantity} de ${sale.saleQuantity}"
|
||||
binding.itemArticleSecondAccumulate.text =
|
||||
"${sale.saleQuantity - sale.accumulatedQuantity} de ${sale.saleQuantity}"
|
||||
} else {
|
||||
binding.itemArticleCel1.text = ""
|
||||
binding.itemReservedNumber.text = ""
|
||||
binding.itemSecond.text = ""
|
||||
binding.itemArticleSecondAccumulate.text = ""
|
||||
binding.itemSecondToPicker.text = ""
|
||||
} //segona linea començant per d'alt
|
||||
|
||||
binding.itemArticleCel3.text =
|
||||
"${sale.currentItemShelving}/${sale.totalItemShelving}"
|
||||
|
||||
binding.itemArticleFirstAccumulate.text =
|
||||
"${sale.reservedQuantity} de ${sale.saleQuantity}"
|
||||
|
||||
|
||||
this.sale = sale
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private fun paintTicketcolor(color: String?, itemView: View, picked: Int) {
|
||||
|
||||
if (color.isNullOrBlank()) {
|
||||
itemView.setBackgroundColor(
|
||||
if (picked == 0) {
|
||||
(Color.TRANSPARENT)
|
||||
} else {
|
||||
(context!!.getColor(R.color.verdnatura_pumpkin_orange))
|
||||
})
|
||||
} else {
|
||||
itemView.setBackgroundColor(Color.parseColor(color))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,49 @@
|
|||
package es.verdnatura.presentation.view.feature.sacador.adapter
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import es.verdnatura.databinding.ItemCollectionRowBinding
|
||||
import es.verdnatura.databinding.ItemCollectionRowNewBinding
|
||||
import es.verdnatura.presentation.common.OnCollectionSelectedListener
|
||||
import es.verdnatura.presentation.common.OnCollectionTicketSelectedListener
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.CollectionTicket
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
|
||||
|
||||
class CollectionAdapterNew(
|
||||
private val items: List<CollectionTicket>,
|
||||
private val onCollectionTicketSelected: OnCollectionTicketSelectedListener,
|
||||
private val type: String
|
||||
) : RecyclerView.Adapter<CollectionAdapterNew.AjustesItemHolder>() {
|
||||
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): AjustesItemHolder {
|
||||
return AjustesItemHolder(
|
||||
ItemCollectionRowNewBinding.inflate(LayoutInflater.from(parent.context), parent, false)
|
||||
)
|
||||
}
|
||||
|
||||
override fun getItemCount() = items.size
|
||||
|
||||
override fun onBindViewHolder(holder: AjustesItemHolder, position: Int) {
|
||||
holder.bind(items[position])
|
||||
holder.binding.root.setOnClickListener {
|
||||
onCollectionTicketSelected.onCollectionSelected(items[position], type)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class AjustesItemHolder(
|
||||
val binding: ItemCollectionRowNewBinding
|
||||
) : RecyclerView.ViewHolder(binding.root) {
|
||||
fun bind(item: CollectionTicket) {
|
||||
binding.apply {
|
||||
if (item.ticketTotalCount == null) {
|
||||
binding.totalTicketsId.visibility = View.GONE
|
||||
}
|
||||
this.item = item
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,280 @@
|
|||
package es.verdnatura.presentation.view.feature.sacador.fragment
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.os.Build
|
||||
import android.text.InputType
|
||||
import android.view.View
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import android.widget.ImageView
|
||||
import androidx.lifecycle.Observer
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import es.verdnatura.R
|
||||
import es.verdnatura.databinding.FragmentSacadorBinding
|
||||
import es.verdnatura.domain.toast
|
||||
import es.verdnatura.presentation.base.BaseFragment
|
||||
import es.verdnatura.presentation.common.OnCollectionTicketSelectedListener
|
||||
import es.verdnatura.presentation.common.OnOptionsSelectedListener
|
||||
import es.verdnatura.presentation.common.TAG
|
||||
import es.verdnatura.presentation.common.ToolBarAdapterTooltip
|
||||
import es.verdnatura.presentation.view.component.CustomDialog
|
||||
import es.verdnatura.presentation.view.component.CustomDialogInput
|
||||
import es.verdnatura.presentation.view.feature.sacador.adapter.CollectionAdapterNew
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.CollectionTicket
|
||||
|
||||
|
||||
class SacadorFragmentNew(
|
||||
var type: String
|
||||
) :
|
||||
BaseFragment<FragmentSacadorBinding, SacadorViewModel>(SacadorViewModel::class) {
|
||||
|
||||
private var onCollectionSelectedListener: OnCollectionTicketSelectedListener? = null
|
||||
private var goBack: Boolean = false
|
||||
private var goBack2: Boolean = false
|
||||
private lateinit var customDialog: CustomDialog
|
||||
private lateinit var customDialogInput: CustomDialogInput
|
||||
private var collectionsList: ArrayList<CollectionTicket> = ArrayList()
|
||||
private var adapter: CollectionAdapterNew? = null
|
||||
|
||||
|
||||
companion object {
|
||||
fun newInstance(type: String) = SacadorFragmentNew(type)
|
||||
}
|
||||
|
||||
override fun onAttach(context: Context) {
|
||||
super.onAttach(context)
|
||||
if (context is OnCollectionTicketSelectedListener) onCollectionSelectedListener = context
|
||||
}
|
||||
|
||||
override fun getLayoutId(): Int = R.layout.fragment_sacador
|
||||
|
||||
override fun init() {
|
||||
customDialog = CustomDialog(requireContext())
|
||||
customDialogInput = CustomDialogInput(requireContext())
|
||||
binding.mainToolbar.toolbarTitle.text = getString(R.string.getcollection)
|
||||
setToolBar()
|
||||
setEvents()
|
||||
callBack(type)
|
||||
println("El sacador new y type $type")
|
||||
super.init()
|
||||
}
|
||||
|
||||
private fun callBack(type: String) {
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
when (type) {
|
||||
"PREPARED" -> {
|
||||
viewModel.collectionGetSalixLocal()
|
||||
}
|
||||
|
||||
"PREITEMPICKER" -> {
|
||||
viewModel.sectorCollection_get()
|
||||
}
|
||||
|
||||
else -> {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
goBack = true
|
||||
goBack2 = true
|
||||
super.onPause()
|
||||
}
|
||||
|
||||
private fun setToolBar() {
|
||||
|
||||
ma.hideBottomNavigation(View.VISIBLE)
|
||||
binding.mainToolbar.backButton.setOnClickListener {
|
||||
requireActivity().onBackPressed()
|
||||
}
|
||||
|
||||
val listIcons: ArrayList<ImageView> = ArrayList()
|
||||
val iconAdd = ImageView(context)
|
||||
iconAdd.setImageResource(R.drawable.ic_add_black_24dp)
|
||||
val iconVehicleIn = ImageView(context)
|
||||
iconVehicleIn.setImageResource(R.drawable.car)
|
||||
val iconPrint = ImageView(context)
|
||||
iconPrint.setImageResource(R.drawable.ic_print_black_24dp)
|
||||
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
iconAdd.tooltipText = getTooltip(R.drawable.ic_add_black_24dp)
|
||||
iconVehicleIn.tooltipText = getTooltip(R.drawable.car)
|
||||
iconAdd.tooltipText = getTooltip(R.drawable.ic_add_black_24dp)
|
||||
iconPrint.tooltipText = getTooltip(R.drawable.ic_print_black_24dp)
|
||||
}
|
||||
|
||||
if (type == "PREPARED") {
|
||||
listIcons.add(iconVehicleIn)
|
||||
} else {
|
||||
listIcons.add(iconPrint)
|
||||
}
|
||||
listIcons.add(iconAdd)
|
||||
|
||||
binding.mainToolbar.toolbarIcons.adapter =
|
||||
ToolBarAdapterTooltip(listIcons, object : OnOptionsSelectedListener {
|
||||
override fun onOptionsItemSelected(item: Drawable) {
|
||||
|
||||
when (item) {
|
||||
|
||||
iconAdd.drawable -> {
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
if (type == "PREPARED") {
|
||||
viewModel.collection_assignNew(
|
||||
)
|
||||
} else {
|
||||
viewModel.sectorCollection_new(getDataInt(SECTORFK))
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
iconVehicleIn.drawable -> ma.onVehicleSelected(SacadorFragment.TAG)
|
||||
|
||||
iconPrint.drawable -> {
|
||||
showPrintPrevious()
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
binding.mainToolbar.toolbarIcons.layoutManager =
|
||||
LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
|
||||
}
|
||||
|
||||
private fun showPrintPrevious() {
|
||||
|
||||
customDialogInput.setInputText(InputType.TYPE_CLASS_NUMBER)
|
||||
customDialogInput.setTitle(getString(R.string.printTicket))
|
||||
customDialogInput.setDescription(getString(R.string.printPreviousGroup))
|
||||
.setValue("")
|
||||
.setOkButton(getString(R.string.print)) {
|
||||
try {
|
||||
if (customDialogInput.getValue().isNotEmpty()
|
||||
) {
|
||||
print()
|
||||
}
|
||||
} catch (ex: Exception) {
|
||||
getString(R.string.errorInput)
|
||||
}
|
||||
customDialogInput.setValue("")
|
||||
|
||||
}.setKoButton(getString(R.string.cancel)) {
|
||||
customDialogInput.dismiss()
|
||||
}.show()
|
||||
customDialogInput.setFocusText()
|
||||
|
||||
|
||||
customDialogInput.setFocusText()
|
||||
ma.hideKeyboard(customDialogInput.getEditText())
|
||||
|
||||
customDialogInput.getEditText().setOnEditorActionListener { _, actionId, _ ->
|
||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5 || actionId == 6) {
|
||||
|
||||
if (customDialogInput.getValue().isNotEmpty()
|
||||
) {
|
||||
print()
|
||||
}
|
||||
|
||||
return@setOnEditorActionListener true
|
||||
}
|
||||
false
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private fun print() {
|
||||
if (ma.havePrinter()) {
|
||||
viewModel.ticket_printLabelPrevious(customDialogInput.getValue().toInt())
|
||||
(getString(R.string.Imprimiendo) + getData(PRINTERNAME)).toast(
|
||||
requireContext()
|
||||
)
|
||||
} else {
|
||||
getString(R.string.selectPrinter).toast(requireContext())
|
||||
}
|
||||
}
|
||||
|
||||
private fun setEvents() {
|
||||
binding.sacadorSwipe.setOnRefreshListener {
|
||||
callBack(type)
|
||||
binding.sacadorSwipe.isRefreshing = false
|
||||
}
|
||||
}
|
||||
|
||||
override fun observeViewModel() {
|
||||
|
||||
with(viewModel) {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
collectionListLocal.observe(viewLifecycleOwner, Observer {
|
||||
if (!goBack2) binding.splashProgress.visibility = View.GONE
|
||||
println("sacador creada colecc")
|
||||
for (l in it.list) {
|
||||
println("sacador col ${l.collectionFk}")
|
||||
println("sacador tic ${l.tickets}")
|
||||
for (t in l.tickets) {
|
||||
println("sacador id ticket${t.ticketFk}")
|
||||
}
|
||||
}
|
||||
createCollectionList(it.list)
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
goBack2 = false
|
||||
})
|
||||
|
||||
response.observe(viewLifecycleOwner, Observer {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage, true, false)
|
||||
|
||||
} else {
|
||||
if (goBack) {
|
||||
if (!it.response.isNullOrBlank()) addCollectionToList(it.response.toInt())
|
||||
}
|
||||
}
|
||||
goBack = false
|
||||
callBack(type)
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private fun createCollectionList(collections: List<CollectionTicket>) {
|
||||
collectionsList = ArrayList()
|
||||
collections.forEach {
|
||||
collectionsList.add(it)
|
||||
}
|
||||
val lm = LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
||||
adapter = CollectionAdapterNew(collectionsList, onCollectionSelectedListener!!, type)
|
||||
binding.fragmentSacadorCollections.layoutManager = lm
|
||||
binding.fragmentSacadorCollections.adapter = adapter
|
||||
|
||||
}
|
||||
|
||||
private fun addCollectionToList(collection: Int) {
|
||||
var isNew = true
|
||||
|
||||
collectionsList.forEach {
|
||||
if (it.collectionFk == collection) {
|
||||
isNew = false
|
||||
}
|
||||
}
|
||||
if (isNew) {
|
||||
collectionsList.add(
|
||||
CollectionTicket(
|
||||
collectionFk = collection,
|
||||
created = getString(R.string.newCreated)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
adapter?.notifyDataSetChanged()
|
||||
} else {
|
||||
customDialog.setTitle(getString(R.string.info))
|
||||
.setDescription(getString(R.string.collectionPending) + collection)
|
||||
.setOkButton(getString(R.string.accept)) {
|
||||
customDialog.dismiss()
|
||||
}.show()
|
||||
}
|
||||
adapter?.notifyDataSetChanged()
|
||||
}
|
||||
}
|
|
@ -40,7 +40,7 @@
|
|||
android:layout_below="@id/content_layout"
|
||||
android:layout_marginTop="6dp"
|
||||
android:visibility="visible"
|
||||
tools:listitem="@layout/item_article_row_fragment"/>
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
|
||||
|
|
|
@ -0,0 +1,67 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
>
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="item"
|
||||
type="es.verdnatura.presentation.view.feature.sacador.model.CollectionTicket" />
|
||||
</data>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
style="@style/LayoutClickable">
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/verdnatura_black_5"
|
||||
android:padding="@dimen/pasilleros_margin_main_menu">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{Integer.toString(item.collectionFk)}"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/h7"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginLeft="@dimen/pasilleros_margin_main_menu"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_selected"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@{item.created}"
|
||||
android:textColor="@color/verdnatura_pumpkin_orange"
|
||||
android:textSize="@dimen/h7"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginLeft="@dimen/pasilleros_margin_main_menu"/>
|
||||
<TextView
|
||||
android:id="@+id/totalTicketsId"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@{@string/tickets + String.valueOf(item.ticketTotalCount)}"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/h7"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginLeft="@dimen/packaging_margin_main_menu"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_marginLeft="@dimen/default_layout_margin"
|
||||
android:id="@+id/item_image"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_chevron_right_black_24dp" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/verdnatura_black_9"/>
|
||||
</LinearLayout>
|
||||
</layout>
|
|
@ -0,0 +1,686 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tool="http://schemas.android.com/tools"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="sale"
|
||||
type="es.verdnatura.presentation.view.feature.sacador.model.Sale" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/layout_margin_1"
|
||||
android:layout_marginBottom="@dimen/layout_margin_min"
|
||||
android:orientation="vertical"
|
||||
|
||||
>
|
||||
<!--CABECERA=================================================-->
|
||||
<LinearLayout
|
||||
android:id="@+id/item_row_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rvHeadlines"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/content_layout"
|
||||
android:layout_marginTop="6dp"
|
||||
android:visibility="visible"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/verdnatura_white"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/layout_margin_min"
|
||||
android:textColor="@color/verdnatura_black">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/layout_margin_min"
|
||||
android:text="@string/Nivel"
|
||||
android:textColor="@color/verdnatura_black"
|
||||
android:textSize="@dimen/h8" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/level"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/layout_margin_min"
|
||||
android:text="@{sale.level}"
|
||||
android:textColor="@color/verdnatura_black"
|
||||
android:textSize="@dimen/h8"
|
||||
android:textStyle="bold"
|
||||
tool:text="2" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/layout_margin_min"
|
||||
android:text="@string/Ticket"
|
||||
android:textColor="@color/verdnatura_black"
|
||||
android:textSize="@dimen/h8" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/ticketFk"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{Integer.toString(sale.ticketFk)}"
|
||||
android:textColor="@color/verdnatura_black"
|
||||
android:textSize="@dimen/h8"
|
||||
android:textStyle="bold"
|
||||
tool:text="123456789"
|
||||
|
||||
/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/previous"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="PREVIA"
|
||||
android:layout_marginStart="20dp"
|
||||
android:textColor="@color/verdnatura_black"
|
||||
android:textSize="@dimen/h8"
|
||||
android:textStyle="bold"
|
||||
tool:text="PREVIA"
|
||||
|
||||
/>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivArrow"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="20dp"
|
||||
android:rotation="180"
|
||||
android:src="@drawable/ic_arrow_down" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageErrorMessage"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentRight="true"
|
||||
app:srcCompat="@drawable/emoticon_error_fragment" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/content_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/verdnatura_black"
|
||||
android:paddingTop="@dimen/layout_margin_min"
|
||||
android:paddingBottom="@dimen/layout_margin_min">
|
||||
<!--SEMAFORO=================================================-->
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayoutItem"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="20dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_article_itemFkNew"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/layout_margin_min_to_modify"
|
||||
android:layout_marginEnd="@dimen/layout_margin_min"
|
||||
android:layout_weight="1"
|
||||
android:maxLines="1"
|
||||
android:text="@{Long.toString(sale.itemFk)}"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body1"
|
||||
android:textStyle="bold"
|
||||
tool:text="9999999" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_parking_code"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="1dp"
|
||||
android:layout_marginEnd="@dimen/layout_margin_min"
|
||||
android:layout_weight="0.5"
|
||||
android:maxLines="1"
|
||||
android:text="@{sale.parkingCode}"
|
||||
android:textColor="@color/verdnatura_warm_grey"
|
||||
android:textSize="@dimen/body1"
|
||||
android:textStyle="bold"
|
||||
tool:text="B-01-1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_code"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="1dp"
|
||||
android:layout_marginEnd="@dimen/layout_margin_min"
|
||||
android:layout_weight="0.5"
|
||||
android:maxLines="1"
|
||||
android:text="@{sale.code}"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body1"
|
||||
android:textStyle="bold"
|
||||
tool:text="dIZXX" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_first_to_picker"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="1dp"
|
||||
android:layout_weight="0.5"
|
||||
android:gravity="right"
|
||||
android:text="25 x 5"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body1"
|
||||
android:textStyle="bold"
|
||||
tool:text="25 x 1" />
|
||||
|
||||
<View
|
||||
android:id="@+id/item_ticket_color"
|
||||
android:layout_width="@dimen/semaforo_width"
|
||||
android:layout_height="@dimen/ticketColor_height"
|
||||
android:layout_marginBottom="1dp"
|
||||
android:background="@drawable/border" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayoutLongItem"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="20dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayoutItem">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginEnd="25dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_article_long_info"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/layout_margin_min_to_modify"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="@{sale.longName}"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body1"
|
||||
tool:text="información de la linea 1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_second_to_picker"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.25"
|
||||
android:gravity="right"
|
||||
android:text="secPicker"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body2"
|
||||
android:textStyle="bold"
|
||||
tool:text="5 x 5" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayoutItemOrigin"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="20dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayoutLongItem">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginEnd="25dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_article_origin"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/layout_margin_min_to_modify"
|
||||
android:layout_weight="2"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="@{sale.origin}"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body1"
|
||||
tool:text="información de la linea Origin" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_article_first_accumulate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.5"
|
||||
android:gravity="start"
|
||||
android:text="first_accum"
|
||||
android:textColor="@color/verdnatura_brown_grey"
|
||||
android:textSize="@dimen/body2"
|
||||
android:textStyle="bold"
|
||||
tool:text="5 x 5" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_reserved_total_number"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.5"
|
||||
android:gravity="end"
|
||||
android:text="reserved_to"
|
||||
android:textColor="@color/verdnatura_brown_grey"
|
||||
android:textSize="@dimen/body2"
|
||||
android:textStyle="bold"
|
||||
android:visibility="invisible"
|
||||
tool:text="5 x 5" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayoutItemColor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="20dp"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginEnd="25dp"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayoutItemOrigin">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_article_color"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/layout_margin_min_to_modify"
|
||||
android:layout_weight="2"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="@{sale.color}"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body1"
|
||||
tool:text="información de la linea Color" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_article_second_accumulate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.5"
|
||||
android:gravity="start"
|
||||
android:text="second_a"
|
||||
android:textColor="@color/verdnatura_brown_grey"
|
||||
android:textSize="@dimen/body2"
|
||||
android:textStyle="bold"
|
||||
tool:text="5 x 5" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_reserved_number"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.5"
|
||||
android:gravity="end"
|
||||
android:text="reser_n"
|
||||
android:textColor="@color/verdnatura_brown_grey"
|
||||
android:textSize="@dimen/body2"
|
||||
android:textStyle="bold"
|
||||
tool:text="5 x 5" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!--CONTENIDO=================================================-->
|
||||
<!--app:layout_constraintEnd_toStartOf="@+id/item_article_quantity_picked"-->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_article_itemFk"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/layout_margin_min_to_modify"
|
||||
android:layout_marginEnd="@dimen/layout_margin_min"
|
||||
android:maxLines="1"
|
||||
android:text="@{Long.toString(sale.itemFk)}"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body1"
|
||||
android:textStyle="bold"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintStart_toEndOf="@+id/linearLayoutItem"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tool:text="85478" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_packing_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="@dimen/layout_margin_min"
|
||||
android:maxLines="1"
|
||||
android:text="@{sale.parkingCode}"
|
||||
android:textColor="@color/verdnatura_warm_grey"
|
||||
android:textSize="@dimen/body1"
|
||||
android:textStyle="bold"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintStart_toEndOf="@+id/item_article_itemFk"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tool:text="B-01-1" />
|
||||
|
||||
<TextView
|
||||
|
||||
android:id="@+id/item_packing_itemFk"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="@dimen/layout_margin_min"
|
||||
android:maxLines="1"
|
||||
android:text="@{sale.code}"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body1"
|
||||
android:textStyle="bold"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintStart_toEndOf="@+id/item_packing_text"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tool:text="IZXX" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtde"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/layout_margin_min"
|
||||
android:text="@string/de"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body1"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toStartOf="@+id/item_article_quantityOld"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_article_quantityOld"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="22dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:text="@{Integer.toString(sale.saleQuantity)}"
|
||||
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body1"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tool:text="10" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_article_cel2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="22dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:text="15 x 5"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body1"
|
||||
android:textStyle="bold"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tool:text="5x1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_article_quantity_line1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/layout_margin_min_to_modify"
|
||||
android:layout_marginEnd="22dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="@{sale.longName}"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body1"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/linearLayoutItem"
|
||||
app:layout_constraintTop_toBottomOf="@+id/item_article_itemFk"
|
||||
tool:text="información de la linea 1" />
|
||||
|
||||
<TextView
|
||||
|
||||
android:id="@+id/item_article_cel1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="cel1"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body2"
|
||||
android:textStyle="bold"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintEnd_toEndOf="@+id/item_article_quantity_line1"
|
||||
app:layout_constraintTop_toTopOf="@+id/item_article_quantity_line1"
|
||||
tool:text="cel1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_article_quantity_line2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/layout_margin_min_to_modify"
|
||||
android:layout_marginEnd="22dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="@{sale.origin}"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body2"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/linearLayoutItem"
|
||||
app:layout_constraintTop_toBottomOf="@+id/item_article_quantity_line1"
|
||||
tool:text="información de la linea 2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_article_quantity_picked"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/layout_margin_min_to_modify"
|
||||
android:layout_marginEnd="@dimen/layout_margin_min"
|
||||
android:text="@{Integer.toString(sale.reservedQuantity)}"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body3"
|
||||
android:textStyle="bold"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintEnd_toStartOf="@+id/txtdeNew"
|
||||
app:layout_constraintTop_toTopOf="@+id/item_article_quantity_line2"
|
||||
tool:text="0" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtdeNew"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/layout_margin_min"
|
||||
android:text="@string/de"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body3"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintEnd_toStartOf="@+id/item_article_quantity"
|
||||
app:layout_constraintTop_toTopOf="@+id/item_article_quantity_line2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_article_cel2_Old"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="cel2"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body3"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="@+id/item_article_quantity_line2"
|
||||
app:layout_constraintTop_toTopOf="@+id/item_article_quantity_line2"
|
||||
tool:text="cel2" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_article_quantity"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="@dimen/layout_collection_quantity"
|
||||
android:paddingTop="@dimen/layout_margin_minest"
|
||||
android:paddingBottom="@dimen/default_layout_margin"
|
||||
android:text="@{Integer.toString(sale.saleQuantity)}"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body3"
|
||||
android:textStyle="bold"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintEnd_toEndOf="@+id/item_article_quantity_line2"
|
||||
app:layout_constraintTop_toTopOf="@+id/item_article_quantity_line2"
|
||||
tool:text="100" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_article_quantity_line3"
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/layout_margin_min_to_modify"
|
||||
android:layout_marginEnd="22dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="@{sale.color}"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body2"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/linearLayoutItem"
|
||||
app:layout_constraintTop_toBottomOf="@+id/item_article_quantity_line2"
|
||||
tool:text="información de la linea 3" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_second"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/layout_margin_min_to_modify"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="second"
|
||||
android:textColor="@color/verdnatura_brown_grey"
|
||||
android:textSize="@dimen/body2"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/item_article_quantity_line3"
|
||||
app:layout_constraintTop_toBottomOf="@+id/item_article_quantity_line2"
|
||||
tool:text="información de la linea 3" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_article_cel3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="2/2"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body2"
|
||||
android:textStyle="bold"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintEnd_toEndOf="@+id/item_second"
|
||||
app:layout_constraintTop_toTopOf="@+id/item_second"
|
||||
tool:text="cel3" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayoutColor"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/item_ticketColor"
|
||||
android:layout_width="@dimen/semaforo_width"
|
||||
android:layout_height="@dimen/ticketColor_height"
|
||||
android:layout_marginBottom="1dp"
|
||||
android:background="@drawable/border" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_weight="1"></LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_error"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_error"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/verdnatura_red"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
tool:text="Cantidad original 100" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/verdnatura_white"></LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/item_article_placements"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/verdnatura_background_item_picker"
|
||||
android:clipToPadding="false"
|
||||
android:visibility="gone"
|
||||
tools:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:listitem="@layout/item_placement_row"
|
||||
tools:orientation="horizontal" />
|
||||
</LinearLayout>
|
||||
</layout>
|
|
@ -72,6 +72,7 @@
|
|||
<string name="ArtículoparaTicket">Artículo para Ticket</string>
|
||||
<string name="scanWagonForItem">Escanea el carro para el item seleccionado</string>
|
||||
<string name="txtnuevacantidad">Indica la nueva cantidad y la acción que quieres realizar con el resto.</string>
|
||||
<string name="itemSaleQuantity">Indica la nueva cantidad. </string>
|
||||
<string name="BasuraRechazar">Basura</string>
|
||||
<string name="Indicanuevacantidad">Indica nueva cantidad</string>
|
||||
<string name="packingQuantity">Indica nuevo packing para el item :</string>
|
||||
|
@ -659,6 +660,7 @@
|
|||
<string name="advicePermission">Para usar esta aplicación, debes otorgar permisos de ubicación.</string>
|
||||
<string name="manuallyPermission">Habilita manualmente el permiso de ubicación.</string>
|
||||
<string name="itemNecessary">El campo item es obligatorio</string>
|
||||
<string name="sacador_test">Sacador Test</string>
|
||||
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -72,6 +72,7 @@
|
|||
<string name="ArtículoparaTicket">Artículo para Ticket</string>
|
||||
<string name="scanWagonForItem">Escanea el carro para el item seleccionado</string>
|
||||
<string name="txtnuevacantidad">Indica la nueva cantidad y la acción que quieres realizar con el resto.</string>
|
||||
<string name="itemSaleQuantity">Indica la nueva cantidad.</string>
|
||||
<string name="BasuraRechazar">Basura</string>
|
||||
<string name="Indicanuevacantidad">Indica nueva cantidad</string>
|
||||
<string name="packingQuantity">Indica nuevo packing para el item :</string>
|
||||
|
@ -531,7 +532,7 @@
|
|||
<string name="selfConsumption">Autoconsumo</string>
|
||||
<string name="titleSelfConsumption">Autoconsumo</string>
|
||||
<string name="titleSelfDescription">Permite consumo de materiales del almacén</string>
|
||||
<string name="titleDelivery">Reparto</string>
|
||||
<string name="titleDelivery">Livraison</string>
|
||||
<string name="titleDeliveryDescrip">Accede a las opciones de reparto</string>
|
||||
<string name="titleLogDescrip">Ver datos expedición</string>
|
||||
<string name="titleInfoDescription">Ver datos empresa</string>
|
||||
|
@ -659,5 +660,6 @@
|
|||
<string name="advicePermission">Pour utiliser cette application, vous devez accorder des autorisations de localisation.</string>
|
||||
<string name="manuallyPermission">Activez manuellement l\'autorisation de localisation.</string>
|
||||
<string name="itemNecessary">Le champ \'item\' est requis</string>
|
||||
<string name="sacador_test">Sacador Test</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -72,6 +72,7 @@
|
|||
<string name="ArtículoparaTicket">Artículo para Ticket</string>
|
||||
<string name="scanWagonForItem">Escanea el carro para el item seleccionado</string>
|
||||
<string name="txtnuevacantidad">Indica la nueva cantidad y la acción que quieres realizar con el resto.</string>
|
||||
<string name="itemSaleQuantity">Indicate la nueva cantidad.</string>
|
||||
<string name="BasuraRechazar">Basura</string>
|
||||
<string name="Indicanuevacantidad">Indica nueva cantidad</string>
|
||||
<string name="packingQuantity">Indica nuevo packing para el item :</string>
|
||||
|
@ -659,5 +660,6 @@
|
|||
<string name="advicePermission">Para usar este aplicativo, você deve conceder permissões de localização.</string>
|
||||
<string name="manuallyPermission">Habilite manualmente a permissão de localização.</string>
|
||||
<string name="itemNecessary">O campo \'item\' é obrigatório</string>
|
||||
<string name="sacador_test">Sacador Test</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -83,6 +83,7 @@
|
|||
<string name="Cantidad">Quantity</string>
|
||||
<string name="ArtículoparaTicket">Ticket Item</string>
|
||||
<string name="txtnuevacantidad">Indicate the new quantity and the action you want to take with the rest.</string>
|
||||
<string name="itemSaleQuantity">Indicate the new quantity </string>
|
||||
<string name="BasuraRechazar">Garbage</string>
|
||||
<string name="Indicanuevacantidad">Indicate new quantity</string>
|
||||
<string name="quantityTake">Indicate the quantity you take</string>
|
||||
|
@ -658,5 +659,6 @@
|
|||
<string name="advicePermission">To use this application, you must grant location permissions.</string>
|
||||
<string name="manuallyPermission">Manually Enable Location Permission.</string>
|
||||
<string name="itemNecessary">Item fiels is required</string>
|
||||
<string name="sacador_test">Sacador Test</string>
|
||||
|
||||
</resources>
|
||||
|
|
Loading…
Reference in New Issue