refs #5734 precontrol muestra lineas del sector
This commit is contained in:
parent
0d600e0d16
commit
6e6234a0b6
|
@ -1141,12 +1141,15 @@ class CollectionFragmentPreChecker(
|
|||
|
||||
|
||||
sales = salesList.sortedWith(compareBy({ it.saleOrder }))
|
||||
// myGroupList = groupSaleGroup(salesList).sortedWith(compareBy({ it.saleOrder }))
|
||||
|
||||
if (type == CONTROLADOR || type == PRECHECKER) {
|
||||
//Tarea5734
|
||||
if (salesList.filter { it.sectorFk != null && it.sectorFk!! > 0 }.isNotEmpty()) {
|
||||
sales = salesList.filter { it.sectorFk == getDataInt(SECTORFK) }
|
||||
.sortedWith(compareBy({ it.picked }))
|
||||
} else {
|
||||
sales = salesList.sortedWith(compareBy({ it.picked }))
|
||||
// myGroupList = groupSaleGroup(salesList).sortedWith(compareBy({ it.picked }))
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
saleAdapter =
|
||||
|
@ -1266,7 +1269,7 @@ class CollectionFragmentPreChecker(
|
|||
binding.fragmentSacadorCollections.addOnScrollListener(object :
|
||||
RecyclerView.OnScrollListener() {
|
||||
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
|
||||
d("VERDNA:TURA:","onScrollListener ${lm!!.findFirstVisibleItemPosition()}")
|
||||
d("VERDNA:TURA:", "onScrollListener ${lm!!.findFirstVisibleItemPosition()}")
|
||||
storedBackPosition = lm.findFirstVisibleItemPosition()
|
||||
super.onScrolled(recyclerView, dx, dy)
|
||||
}
|
||||
|
@ -2213,60 +2216,6 @@ class CollectionFragmentPreChecker(
|
|||
|
||||
}
|
||||
|
||||
/* private fun showDisponibility() {
|
||||
|
||||
customDialogInput.setTitle(getString(R.string.Verdisponible))
|
||||
.setDescription(getString(R.string.Escaneaetiqueta))
|
||||
.setOkButton(getString(R.string.Buscar)) {
|
||||
try {
|
||||
if (binding.splashProgress != null) {
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
|
||||
hideKeyboards()
|
||||
viewModel.itemGetAvailable(
|
||||
usuario = user,
|
||||
password = password,
|
||||
itemFk = customDialogInput.getValue(),
|
||||
warehouseFk = warehouseFk,
|
||||
"item_GetVisibleAvailable"
|
||||
)
|
||||
scanRequest()
|
||||
customDialogInput.dismiss()
|
||||
|
||||
}.setKoButton(getString(R.string.cancel)) {
|
||||
if (binding.splashProgress != null) {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
}
|
||||
hideKeyboards()
|
||||
scanRequest()
|
||||
customDialogInput.dismiss()
|
||||
}.setValue("").show()
|
||||
customDialogInput.getEditText().requestFocus()
|
||||
customDialogInput.getEditText().setOnEditorActionListener { v, actionId, event ->
|
||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) {
|
||||
if (!customDialogInput.getValue().isNullOrEmpty()) {
|
||||
if (binding.splashProgress != null) binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.itemGetAvailable(
|
||||
usuario = user,
|
||||
password = password,
|
||||
itemFk = customDialogInput.getValue(),
|
||||
warehouseFk = warehouseFk
|
||||
,"item_GetVisibleAvailable")
|
||||
}
|
||||
customDialogInput.setValue("")
|
||||
scanRequest()
|
||||
customDialogInput.dismiss()
|
||||
hideKeyboards()
|
||||
return@setOnEditorActionListener true
|
||||
}
|
||||
false
|
||||
}
|
||||
}*/
|
||||
|
||||
private fun toastDisponibility(item: ItemVO) {
|
||||
if (item.available.isNullOrEmpty()) {
|
||||
item.available = "0"
|
||||
|
@ -2610,33 +2559,6 @@ class CollectionFragmentPreChecker(
|
|||
}
|
||||
|
||||
saleAdapter!!.notifyDataSetChanged()
|
||||
|
||||
/* val ticket =
|
||||
"[" + sales[positionCollectionMissing].ticketFk + "](https://salix.verdnatura.es/#!/ticket/" + sales[positionCollectionMissing].ticketFk + "/summary)"
|
||||
|
||||
|
||||
when (typeCollectionMissing) {
|
||||
|
||||
"TRUE" -> {
|
||||
message =
|
||||
"Se ha enviado a Basura " + totalQuantity + getString(R.string.fromItem) + sales[positionCollectionMissing].itemFk + " ticket " + ticket
|
||||
|
||||
}
|
||||
"FALSE" -> {
|
||||
message =
|
||||
"Se ha enviado a Faltas la cantidad de " + totalQuantity + getString(R.string.fromItem) + sales[positionCollectionMissing].itemFk + " ticket " + ticket
|
||||
|
||||
}
|
||||
"reject" -> {
|
||||
message =
|
||||
"Se ha modificado la cantidad de " + sales[positionCollectionMissing].originalQuantity + " del artículo " + sales[positionCollectionMissing].itemFk + " a nueva cantidad: " + sales[positionCollectionMissing].quantity + " del ticket " + ticket
|
||||
|
||||
}
|
||||
}*/
|
||||
|
||||
//sergio:ahora desde encajado
|
||||
// sendSalixMessageNew(message, sales[positionCollectionMissing].salePersonFk)
|
||||
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
viewModel.collectionTicketGet(
|
||||
collection.collectionFk,
|
||||
|
@ -2672,16 +2594,6 @@ class CollectionFragmentPreChecker(
|
|||
sales[positionIncreaseQuantity].originalQuantity = quantityIncrease
|
||||
|
||||
}
|
||||
|
||||
/* private fun sendSalixMessageNew(message: String, workerId: String) {
|
||||
|
||||
viewModel.sendChekingPresence(
|
||||
workerId = workerId,
|
||||
message = message
|
||||
|
||||
)
|
||||
}*/
|
||||
|
||||
private fun increaseQuantity(position: Int, quantity: Int) {
|
||||
positionIncreaseQuantity = position
|
||||
quantityIncrease = quantity
|
||||
|
|
Loading…
Reference in New Issue