From d077225e9ea113edd0dbd15229a10a16e16d4622 Mon Sep 17 00:00:00 2001 From: Sergio De la torre Date: Wed, 16 Oct 2024 11:33:04 +0200 Subject: [PATCH] feat: refs #7956 getSimilar --- .../feature/articulo/fragment/ItemCardViewModel.kt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemCardViewModel.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemCardViewModel.kt index 6f9d6e3a..64d4a1b8 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemCardViewModel.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemCardViewModel.kt @@ -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>(context) { override fun onSuccess(response: Response>) { _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>(context) { override fun onSuccess(response: Response>) { _addressLosesList.value = response.body()?.let { AddressLosesList(it) }