refs #6276: prepare Salixback

This commit is contained in:
Sergio De la torre 2024-01-09 08:52:34 +01:00
parent 89cbca08c9
commit b788e29663
2 changed files with 9 additions and 16 deletions

View File

@ -51,8 +51,8 @@ class ItemCardViewModel(var context: Context) : BaseViewModel(context) {
warehouseFk: Int,
) {
//Tarea 6276
// salix.getCard(itemFk = itemFk, warehouseFk = warehouseFk)
silex.getItemCard(itemFk, warehouseFk)
// salix.getCard(itemFk = itemFk, warehouseFk = warehouseFk)
silex.getItemCard(itemFk, warehouseFk)
.enqueue(object : SalixCallback<ItemCardVO>(context) {
override fun onError(t: Throwable) {
_itemcard.value = ItemCardVO(
@ -241,7 +241,7 @@ class ItemCardViewModel(var context: Context) : BaseViewModel(context) {
delete: Boolean
) {
//Tarea 6276
//salix.barcodesDelete(itemFk = itemFk, barcode = value)
//salix.barcodesDelete(itemFk = itemFk, barcode = value)
silex.barcodes_edit(value, itemFk, delete)
.enqueue(object : SilexCallback<Any>(context) {
override fun onError(t: Throwable) {
@ -298,14 +298,7 @@ class ItemCardViewModel(var context: Context) : BaseViewModel(context) {
),
) {
salix.uploadImage("catalog", itemFK, filePart)
.enqueue(object : SilexCallback<Any>(context) {
override fun onError(t: Throwable) {
_responseinsert.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
.enqueue(object : SalixCallback<Any>(context) {
override fun onSuccess(response: Response<Any>) {
_responseinsert.value = ResponseItemVO(
isError = false

View File

@ -13,7 +13,6 @@ import es.verdnatura.presentation.base.getMessageFromAllResponse
import es.verdnatura.presentation.base.nameofFunction
import es.verdnatura.presentation.common.Event
import es.verdnatura.presentation.common.ResponseItemVO
import es.verdnatura.presentation.common.SaleTrackingReplaceSalix
import es.verdnatura.presentation.view.feature.collection.ItemVO
import es.verdnatura.presentation.view.feature.collection.SalesModifiedList
import es.verdnatura.presentation.view.feature.collection.SalixSaleQuantity
@ -316,17 +315,18 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) {
buyFk: Long,
isScanned: Boolean?
) {
salix.saleTrackingUpdate(SaleTrackingReplaceSalix(
//Tarea 6276
/* salix.saleTrackingUpdate(SaleTrackingReplaceSalix(
saleFk,originalQuantity,code, isChecked != "0",buyFk,isScanned!!
))
/*silex.saleTrackingReplace(
))*/
silex.saleTrackingReplace(
saleFk,
originalQuantity,
code,
isChecked != "0",
buyFk,
isScanned!!
)*/
)
.enqueue(object : SilexCallback<Any>(context) {
override fun onError(t: Throwable) {
_responseSaleReplace.value = ResponseItemVO(