feat: refs #7956 getSimilar

This commit is contained in:
Sergio De la torre 2024-10-16 11:33:04 +02:00
parent 91f3da78cf
commit d077225e9e
1 changed files with 9 additions and 2 deletions

View File

@ -68,9 +68,16 @@ class ItemCardViewModel(var context: Context) : BaseViewModel(context) {
warehouseFk: Int,
shipped: String,
isShowedByType: Boolean,
daysInforward: Int = 0,
) {
salix.getItemSimilar(
params = arrayListOf(itemFk, warehouseFk, shipped, isShowedByType).formatWithQuotes()
params = arrayListOf(
itemFk,
warehouseFk,
shipped,
isShowedByType,
daysInforward
).formatWithQuotes()
).enqueue(object : SalixCallback<List<ItemProposal>>(context) {
override fun onSuccess(response: Response<List<ItemProposal>>) {
_itemProposalList.value = response.body()?.let {
@ -196,7 +203,7 @@ class ItemCardViewModel(var context: Context) : BaseViewModel(context) {
}
fun getAddress() {
salix.getAddress("""{"where":{"type":"internal"}, "include": [ { "relation": "address", "scope": { "fields": { "nickname": true } } } ] }""")
salix.getAddress("""{"where":{"type": { "neq": "external"}}, "include": [ { "relation": "address", "scope": { "fields": { "nickname": true } } } ] }""")
.enqueue(object : SalixCallback<List<AddressLoses>>(context) {
override fun onSuccess(response: Response<List<AddressLoses>>) {
_addressLosesList.value = response.body()?.let { AddressLosesList(it) }