feat onChecking refs #7371

This commit is contained in:
Sergio De la torre 2024-06-19 11:01:24 +02:00
parent 4640cffc30
commit 4d1f22f529
1 changed files with 13 additions and 5 deletions

View File

@ -129,6 +129,7 @@ class CollectionFragment(
private var recylerViewState: Parcelable? = null
private var isScanned: Boolean? = null
private var canChangeState = true
private var allTicketsChecked = false
private lateinit var myGroupList: List<SaleVO>
@ -2060,13 +2061,19 @@ class CollectionFragment(
getString(R.string.Coleccióncompleta).toast(this.context, Toast.LENGTH_SHORT)
saleAdapter!!.notifyDataSetChanged()
// Se quita de la app
/* if (!goBack)
ticketCollection_setUsedShelves()
goBack = false*/
if (canChangeState) changeTicketState()
}else{
if (allTicketsChecked){
sales.forEach{
if (it.isControlled == "0"){
viewModel.ticketStateTodaySetState(
ticketFk = it.ticketFk.toInt(), state = "ON_CHECKING"
)
}
}
allTicketsChecked = false
}
}
}
@ -2216,6 +2223,7 @@ class CollectionFragment(
ticketFk = it.toInt(), state = "CHECKED"
)
}
allTicketsChecked = true
} else if (type == SACADOR) {
tickets.forEach {
viewModel.ticketStateTodaySetState(