feat qr #refs 7520
This commit is contained in:
parent
6a5817844e
commit
d44e145793
|
@ -10,6 +10,7 @@ import es.verdnatura.databinding.FragmentGeneralBlackBinding
|
|||
import es.verdnatura.domain.ConstAndValues
|
||||
import es.verdnatura.presentation.base.BaseFragment
|
||||
import es.verdnatura.presentation.common.OnCollectionSelectedListener
|
||||
import es.verdnatura.presentation.common.itemScanValue
|
||||
import es.verdnatura.presentation.view.feature.sacador.fragment.showticket.ShowTicketViewModel
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
|
||||
|
||||
|
@ -63,9 +64,8 @@ class PreControladorFragment :
|
|||
if (!binding.scanInput.text.isNullOrEmpty()) {
|
||||
|
||||
try {
|
||||
|
||||
viewModel.getSales(
|
||||
collectionFk = binding.scanInput.text.toString().toInt(),
|
||||
collectionFk = itemScanValue(binding.scanInput.text.toString(),arrayOf("saleGroup"),"id").toString().toInt(),
|
||||
print = false,
|
||||
source = type
|
||||
)
|
||||
|
|
|
@ -73,10 +73,10 @@ class PreSacadorViewModel(val context: Context) : BaseViewModel(context) {
|
|||
val collectionList: LiveData<CollectionListVO>
|
||||
get() = _collectionList
|
||||
|
||||
private val _responseHasSaleRerserved by lazy { MutableLiveData<String>() }
|
||||
val responseHasSaleRerserved: LiveData<String> = _responseHasSaleRerserved
|
||||
private val _responseHasSaleRerserved by lazy { MutableLiveData<Int>() }
|
||||
val responseHasSaleRerserved: LiveData<Int> = _responseHasSaleRerserved
|
||||
|
||||
val loadResponseHasSaleReserved: LiveData<Event<String>> =
|
||||
val loadResponseHasSaleReserved: LiveData<Event<Int>> =
|
||||
_responseHasSaleRerserved.map { Event(it) }
|
||||
|
||||
private val _responseSaleGroupAdd by lazy { MutableLiveData<ResponseItemVO>() }
|
||||
|
@ -294,7 +294,7 @@ class PreSacadorViewModel(val context: Context) : BaseViewModel(context) {
|
|||
salix.hasSalesReserved(sectorCollectionFk)
|
||||
.enqueue(object : SalixCallback<String>(context) {
|
||||
override fun onSuccess(response: Response<String>) {
|
||||
_responseHasSaleRerserved.value =response.body()
|
||||
_responseHasSaleRerserved.value = response.body()!!.toInt()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -364,6 +364,7 @@ class PreSacadorViewModel(val context: Context) : BaseViewModel(context) {
|
|||
}
|
||||
})
|
||||
}
|
||||
|
||||
fun getReserveBySectorCollection(
|
||||
vSectorCollectionFk: Int
|
||||
) {
|
||||
|
|
Loading…
Reference in New Issue