feat: refs #6861 reservas
This commit is contained in:
parent
24ccf9ce2f
commit
d7ca5c3e08
|
@ -344,18 +344,28 @@ class CollectionFragmentPickerNew(
|
|||
}
|
||||
}
|
||||
|
||||
responseExistsItemShelvingSale.observe(viewLifecycleOwner) {
|
||||
if (!goBack) {
|
||||
if (it.exists) {
|
||||
markLine(it.position, it.quantity, true)
|
||||
} else {
|
||||
loadExistsResponse.observe(viewLifecycleOwner) { event ->
|
||||
event.getContentIfNotHandled().notNull {
|
||||
|
||||
getString(R.string.updateSalesReserve).toast(
|
||||
requireContext()
|
||||
)
|
||||
updateScreen()
|
||||
}
|
||||
}
|
||||
|
||||
loadFindItemShelvingResponse.observe(viewLifecycleOwner) { event ->
|
||||
event.getContentIfNotHandled().notNull {
|
||||
|
||||
if (it.shelvingFk != myGroupList[it.position].code) {
|
||||
getString(R.string.updateSalesReserve).toast(
|
||||
requireContext()
|
||||
)
|
||||
viewModel.collectionTicketGetSalix(collection.collectionFk, false)
|
||||
updateScreen()
|
||||
} else {
|
||||
markLine(it.position, it.quantity, true)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
responseParking.observe(viewLifecycleOwner) {
|
||||
|
||||
|
@ -502,7 +512,7 @@ class CollectionFragmentPickerNew(
|
|||
saleAdapter = SaleAdapterNew(
|
||||
myGroupList,
|
||||
pasillerosItemClickListener!!,
|
||||
|
||||
|
||||
object : OnSaleClickSaleListener {
|
||||
override fun onSaleClick(mySale: Sale) {
|
||||
myGroupList.forEachIndexed { index, sale ->
|
||||
|
@ -859,13 +869,22 @@ class CollectionFragmentPickerNew(
|
|||
}.setOkButtonTwo(getString(R.string.no)) {
|
||||
scanRequest()
|
||||
customDialogThreeButtonsQuantity.dismiss()
|
||||
if (quantity == 0) {
|
||||
viewModel.itemShelvingSaleExists(
|
||||
myGroupList[position].itemShelvingSaleFk, position, quantity
|
||||
)
|
||||
} else {
|
||||
markLine(position, quantity, true)
|
||||
}
|
||||
viewModel.itemShelvingSaleExists(
|
||||
myGroupList[position].itemShelvingSaleFk,
|
||||
myGroupList[position].itemShelvingFk,
|
||||
position,
|
||||
quantity
|
||||
)
|
||||
/* if (quantity == 0) {
|
||||
viewModel.itemShelvingSaleExists(
|
||||
myGroupList[position].itemShelvingSaleFk,
|
||||
myGroupList[position].itemShelvingFk,
|
||||
position,
|
||||
quantity
|
||||
)
|
||||
} else {
|
||||
markLine(position, quantity, true)
|
||||
}*/
|
||||
}.setKoButton(getString(R.string.cancel)) {
|
||||
scanRequest()
|
||||
customDialogThreeButtonsQuantity.dismiss()
|
||||
|
@ -1143,7 +1162,8 @@ class CollectionFragmentPickerNew(
|
|||
origin = value[0].origin,
|
||||
size = value[0].size,
|
||||
itemShelvingSaleFk = value[0].itemShelvingSaleFk,
|
||||
longName = value[0].parkingCode ?: ""
|
||||
longName = value[0].parkingCode ?: "",
|
||||
itemShelvingFk = 0
|
||||
)
|
||||
|
||||
//prime elemento//hay que hacer una copia si no queda la referencia
|
||||
|
|
Loading…
Reference in New Issue