feat: refs#7371 updateSaleIU
This commit is contained in:
parent
43b1d828e8
commit
ff9849589e
|
@ -1,3 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DesignSurface">
|
||||
<option name="filePathToZoomLevelMap">
|
||||
|
|
|
@ -79,6 +79,7 @@ class CollectionFragmentChecker(
|
|||
private var mistakeSale: SaleVO? = null
|
||||
private var positionIncreaseQuantity = 0
|
||||
private var quantityIncrease: Int = 0
|
||||
private var quantityIncreaseDiff: Int = 0
|
||||
private var isMarking = false
|
||||
private lateinit var ticketScanTxt: String
|
||||
private var lastScanned: Int = 0
|
||||
|
@ -556,6 +557,8 @@ class CollectionFragmentChecker(
|
|||
sales = salesList.sortedWith(
|
||||
compareBy({ it.isControlled }, { it.picked })
|
||||
)
|
||||
|
||||
//para la nueva revisión : hay que poner el saleOrder si no no podrán revisar correctamente
|
||||
myGroupList = groupSaleGroup(salesList).sortedWith(
|
||||
compareBy({ it.isControlled }, { it.picked })
|
||||
)
|
||||
|
@ -1101,28 +1104,30 @@ class CollectionFragmentChecker(
|
|||
if (listItemSon.saleFk == saleFk) {
|
||||
myGroupList[parentIndex].sonSales[childIndex].quantity =
|
||||
quantityIncrease
|
||||
saleAdapter?.notifyDataSetChanged()
|
||||
|
||||
break
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (myGroupList[parentIndex].saleFk == saleFk) myGroupList[parentIndex].quantity =
|
||||
quantityIncrease
|
||||
break
|
||||
|
||||
if (myGroupList[parentIndex].saleFk == saleFk) {
|
||||
myGroupList[parentIndex].quantity = quantityIncrease
|
||||
// myGroupList[positionIncreaseQuantity].quantity = quantityIncrease
|
||||
break
|
||||
}
|
||||
}
|
||||
}/* } else {
|
||||
myGroupList[positionIncreaseQuantity].quantity = quantityIncrease
|
||||
saleAdapter?.notifyDataSetChanged()
|
||||
}*/
|
||||
}
|
||||
viewModel.itemShelvingSaleBySale(saleFk = saleFk, quantityDiff = quantityIncreaseDiff)
|
||||
} catch (e: Exception) {
|
||||
e.message!!.toast(requireContext())
|
||||
}
|
||||
|
||||
saleAdapter?.notifyDataSetChanged()
|
||||
}
|
||||
|
||||
private fun increaseQuantity(position: Int, quantity: Int) {
|
||||
positionIncreaseQuantity = position
|
||||
quantityIncrease = quantity
|
||||
quantityIncreaseDiff = (myGroupList[position].quantity!!.minus(quantity))
|
||||
viewModel.collectionIncreaseQuantitySalix(
|
||||
saleFk = myGroupList[position].saleFk, quantity = quantity.toString()
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue