Version 8.4Beta, return "finish" y apptesters

This commit is contained in:
Sergio De la torre 2022-05-24 15:54:53 +02:00
parent 6db39eb1da
commit 03f825ad3e
58 changed files with 2422 additions and 1867 deletions

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="deploymentTargetDropDown">
<targetSelectedWithDropDown>
<Target>
<type value="QUICK_BOOT_TARGET" />
<deviceKey>
<Key>
<type value="VIRTUAL_DEVICE_PATH" />
<value value="C:\Users\sergiodt\.android\avd\Pixel_3a_API_30_x86.avd" />
</Key>
</deviceKey>
</Target>
</targetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2022-05-20T11:37:38.376422500Z" />
</component>
</project>

View File

@ -181,9 +181,9 @@
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_itemshelvinglog.xml" value="0.28169014084507044" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_login.xml" value="0.22" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_paletizador_menu.xml" value="0.13829787234042554" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_parking.xml" value="0.4161849710982659" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_parking.xml" value="0.16666666666666666" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_pasillero.xml" value="0.21" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_pre_sacador.xml" value="0.16666666666666666" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_pre_sacador.xml" value="0.3333333333333333" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_qr.xml" value="0.19882246376811594" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_sacador.xml" value="0.12952898550724637" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_sacador_associatesmarttag.xml" value="0.22" />

View File

@ -14,13 +14,10 @@ android {
applicationId "es.verdnatura"
minSdkVersion 21
targetSdkVersion 30
versionCode 116
versionName "8.3" //versionCode 116: versionCode 116: cambios finales en return, diseño grafico...
//versionName "8.2" //versionCode 115: icons
//versionName "8.2" //versionCode 114 : TEST DISSENY GRAFIC SOLUCIONAT COLORS
//versionName "8.2" //versionCode 113 : TEST DISSENY GAFIC
//versionName "8.2" //versionCode 112 : desmarcar, previa update quantity dels carros, afegir P, etc.., impressores
//versionName "8.1" //versionCode 111 de proves . Instal.lat a Ismael y Juan
versionCode 117
versionName "8.4Beta" //versionCode 117: return i workerAppTester
//versionName "8.3" //versionCode 116: versionCode 116: cambios finales en return, diseño grafico...
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

View File

@ -11,8 +11,8 @@
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 116,
"versionName": "8.3",
"versionCode": 117,
"versionName": "8.4Beta",
"outputFile": "app-release.apk"
}
],

View File

@ -6,7 +6,7 @@ import retrofit2.converter.gson.GsonConverterFactory
class ApiSalixUtils {
companion object {
//const val BASE_URL:String = "http://192.168.1.155:9009/"
// const val BASE_URL: String = "https://test-salix.verdnatura.es/api/"
// const val BASE_URL: String = "https://test-salix.verdnatura.es/api/"
const val BASE_URL: String = "https://salix.verdnatura.es/api/"
fun getApiService(): SalixService {
val salixRetrofit = Retrofit.Builder().baseUrl(BASE_URL).addConverterFactory(

View File

@ -66,7 +66,7 @@ class GetInventaryUserCase(context: Context) : RestClient(context) {
password: String,
itemFk: String,
warehouseFk: String
): Call<String> {
): Call<Any> {
val params: ArrayList<String> = ArrayList()
params.add(itemFk)
params.add(warehouseFk)

View File

@ -81,14 +81,15 @@ class GetItemCardUserCase(context: Context) : RestClient(context) {
warehouseFk: String,
newVisible: String,
isTrash: String
): Call<String> {
): Call<Any> {
val params: ArrayList<String> = ArrayList()
params.add(itemFk)
params.add(warehouseFk)
params.add(newVisible)
params.add(isTrash)
//sergio: se modifica por CAU a itemTrash// Faltas también accede a itemStockUpdate ( falta comprobar porque no aparece nada más)
//sergio: se modifica por CAU a itemTrash// Faltas también accede a itemStockUpdate)
//return restClient!!.itemStockUpdate("json","1",usuario,password,"application/json",params = params)
return restClient!!.itemTrash(
"json",
@ -107,7 +108,7 @@ class GetItemCardUserCase(context: Context) : RestClient(context) {
warehouseFk: String,
newVisible: String,
isTrash: String
): Call<String> {
): Call<Any> {
val params: ArrayList<String> = ArrayList()
params.add(itemFk)
params.add(warehouseFk)
@ -123,7 +124,7 @@ class GetItemCardUserCase(context: Context) : RestClient(context) {
)
}
fun itemPlacementSave(
/* fun itemPlacementSave(
usuario: String,
password: String,
itemFk: String,
@ -142,7 +143,7 @@ class GetItemCardUserCase(context: Context) : RestClient(context) {
"application/json",
params = params
)
}
}*/
fun updateGrouping(
usuario: String,
@ -185,7 +186,7 @@ class GetItemCardUserCase(context: Context) : RestClient(context) {
params = params
)
}
/*
fun updatePackingType(
usuario: String,
password: String,
@ -203,7 +204,7 @@ class GetItemCardUserCase(context: Context) : RestClient(context) {
"application/json",
params = params
)
}
}*/
fun updatePackingTypeSalix(
token:String,
@ -224,7 +225,7 @@ class GetItemCardUserCase(context: Context) : RestClient(context) {
password: String,
itemFk: String,
value: String
): Call<String> {
): Call<Any> {
val params: ArrayList<String> = ArrayList()
params.add(itemFk)
params.add(value)
@ -264,7 +265,7 @@ class GetItemCardUserCase(context: Context) : RestClient(context) {
itemFk: String,
value: String,
delete: String
): Call<String> {
): Call<Any> {
val params: ArrayList<String> = ArrayList()
params.add(value)
params.add(itemFk)

View File

@ -87,7 +87,7 @@ class GetPaletizadoresUserCase(context: Context) : RestClient(context) {
password: String,
vHour: String,
vDescription: String
): Call<String> {
): Call<Any> {
val params: ArrayList<String> = ArrayList()
params.add(vHour)
params.add(vDescription)
@ -143,7 +143,7 @@ class GetPaletizadoresUserCase(context: Context) : RestClient(context) {
password: String,
vPalletFk: String,
vExpeditionFk: String
): Call<String> {
): Call<Any> {
val params: ArrayList<String> = ArrayList()
params.add(vPalletFk)
params.add(vExpeditionFk)
@ -193,7 +193,7 @@ class GetPaletizadoresUserCase(context: Context) : RestClient(context) {
)
}
fun expeditionPalletDel(usuario: String, password: String, vPalletFk: String): Call<String> {
fun expeditionPalletDel(usuario: String, password: String, vPalletFk: String): Call<Any> {
val params: ArrayList<String> = ArrayList()
params.add(vPalletFk)
return restClient!!.expeditionPalletDel(
@ -223,7 +223,7 @@ class GetPaletizadoresUserCase(context: Context) : RestClient(context) {
)
}
fun expeditionScanDel(usuario: String, password: String, vScanFk: String): Call<String> {
fun expeditionScanDel(usuario: String, password: String, vScanFk: String): Call<Any> {
val params: ArrayList<String> = ArrayList()
params.add(vScanFk)
return restClient!!.expeditionScanDel(
@ -241,7 +241,7 @@ class GetPaletizadoresUserCase(context: Context) : RestClient(context) {
password: String,
vPalletFk: String,
vSectorFk: String
): Call<String> {
): Call<Any> {
val params: ArrayList<String> = ArrayList()
params.add(vPalletFk)
params.add(vSectorFk)

View File

@ -48,7 +48,7 @@ class GetPreSacadorUseCase(context: Context) : RestClient(context) {
password: String,
id: String,
quantity: String
): Call<String> {
): Call<Any> {
val params: ArrayList<String> = ArrayList()
params.add(id)
params.add(quantity)

View File

@ -33,7 +33,7 @@ class GetQualityUserCase(context: Context) : RestClient(context) {
password: String,
vId: String,
vStars: String
): Call<String> {
): Call<Any> {
val params: ArrayList<String> = ArrayList()
params.add(vId)
params.add(vStars)

View File

@ -203,7 +203,7 @@ class GetSacadorControladorUserCase(context: Context) : RestClient(context) {
itemShelvingFk: String,
saleFk: String,
quantity: String
): Call<String> {
): Call<Any> {
val params: ArrayList<String> = ArrayList()
params.add(itemShelvingFk)
params.add(saleFk)
@ -224,7 +224,7 @@ class GetSacadorControladorUserCase(context: Context) : RestClient(context) {
itemShelvingFk: String,
itemPlacementSupplyFk: String,
quantity: String
): Call<String> {
): Call<Any> {
val params: ArrayList<String> = ArrayList()
params.add(itemShelvingFk)
params.add(itemPlacementSupplyFk)
@ -362,7 +362,7 @@ class GetSacadorControladorUserCase(context: Context) : RestClient(context) {
saleFk: String,
quantity: String,
originalQuantity: String
): Call<String> {
): Call<Any> {
val params: ArrayList<String> = ArrayList()
params.add(saleFk)
params.add(quantity)
@ -378,7 +378,7 @@ class GetSacadorControladorUserCase(context: Context) : RestClient(context) {
type: String,
warehouseFk: String,
originalQuantity: String
): Call<String> {
): Call<Any> {
val params: ArrayList<String> = ArrayList()
params.add(saleFk)
params.add(quantity)
@ -395,7 +395,7 @@ class GetSacadorControladorUserCase(context: Context) : RestClient(context) {
)
}
fun saleTrackingDel(usuario: String, password: String, saleFk: String): Call<String> {
fun saleTrackingDel(usuario: String, password: String, saleFk: String): Call<Any> {
val params: ArrayList<String> = ArrayList()
params.add(saleFk)
return restClient!!.saleTrackingDel(
@ -484,7 +484,7 @@ class GetSacadorControladorUserCase(context: Context) : RestClient(context) {
password: String,
saleFk: String,
quantity: String
): Call<String> {
): Call<Any> {
val params: ArrayList<String> = ArrayList()
params.add(saleFk)
params.add(quantity)
@ -522,7 +522,7 @@ class GetSacadorControladorUserCase(context: Context) : RestClient(context) {
vSaleFk: String,
vUserFk: String,
vTypeFk: String
): Call<String> {
): Call<Any> {
val params: ArrayList<String> = ArrayList()
params.add(vSaleFk)
params.add(vUserFk)

View File

@ -32,7 +32,7 @@ class GetUbicadorUserCase(context: Context) : RestClient(context) {
packing: String,
warehouse: String,
grouping:String
): Call<String> {
): Call<Any> {
val params: ArrayList<String> = ArrayList()
params.add(shelving)
params.add(item)
@ -63,7 +63,7 @@ class GetUbicadorUserCase(context: Context) : RestClient(context) {
itemShelvingFk: String,
grouping:String
): Call<String> {
): Call<Any> {
val params: ArrayList<String> = ArrayList()
params.add(shelving)
params.add(item)
@ -90,7 +90,7 @@ class GetUbicadorUserCase(context: Context) : RestClient(context) {
shelving: String,
items: List<String>,
warehouse: String
): Call<String> {
): Call<Any> {
val params: ArrayList<Any> = ArrayList()
params.add(shelving)
params.add(items)
@ -110,7 +110,7 @@ class GetUbicadorUserCase(context: Context) : RestClient(context) {
password: String,
priority: String,
shelving: String
): Call<String> {
): Call<Any> {
val params: ArrayList<String> = ArrayList()
params.add(priority)
params.add(shelving)
@ -136,7 +136,7 @@ class GetUbicadorUserCase(context: Context) : RestClient(context) {
return restClient!!.shelvingPark("json", "1", usuario, password, "application/json", params)
}
fun saleParking_add(
/* fun saleParking_add(
usuario: String,
password: String,
sales:List<String>,
@ -146,14 +146,14 @@ class GetUbicadorUserCase(context: Context) : RestClient(context) {
params.add(sales)
params.add(parking)
return restClient!!.saleParking_add("json", "1", usuario, password, "application/json", params)
}
}*/
fun shelvingChange(
usuario: String,
password: String,
origen: String,
destino: String
): Call<String> {
): Call<Any> {
val params: ArrayList<String> = ArrayList()
params.add(origen)
params.add(destino)
@ -167,7 +167,7 @@ class GetUbicadorUserCase(context: Context) : RestClient(context) {
)
}
fun clearShelvingList(usuario: String, password: String, shelvingFk: String): Call<String> {
fun clearShelvingList(usuario: String, password: String, shelvingFk: String): Call<Any> {
val params: ArrayList<String> = ArrayList()
params.add(shelvingFk)
return restClient!!.clearShelvingList(
@ -185,7 +185,7 @@ class GetUbicadorUserCase(context: Context) : RestClient(context) {
password: String,
itemFk: String,
shelvingFk: String
): Call<String> {
): Call<Any> {
val params: ArrayList<String> = ArrayList()
params.add(itemFk)
params.add(shelvingFk)
@ -199,7 +199,7 @@ class GetUbicadorUserCase(context: Context) : RestClient(context) {
)
}
fun itemShelvingDelete(usuario: String, password: String, itemFk: String): Call<String> {
fun itemShelvingDelete(usuario: String, password: String, itemFk: String): Call<Any> {
val params: ArrayList<String> = ArrayList()
params.add(itemFk)
return restClient!!.itemShelvingDelete(

View File

@ -1,5 +1,6 @@
package es.verdnatura.domain
//import es.verdnatura.presentation.view.feature.buscaritemall.model.ItemLocationAll
import com.google.gson.JsonObject
import es.verdnatura.presentation.view.feature.ajustes.model.Printers
import es.verdnatura.presentation.view.feature.ajustes.model.SectorItemVO
@ -7,11 +8,9 @@ import es.verdnatura.presentation.view.feature.articulo.model.ItemCardVO
import es.verdnatura.presentation.view.feature.articulo.model.ItemPackingType
import es.verdnatura.presentation.view.feature.articulo.model.ItemProposal
import es.verdnatura.presentation.view.feature.buscaritem.model.ItemLocationVO
//import es.verdnatura.presentation.view.feature.buscaritemall.model.ItemLocationAll
import es.verdnatura.presentation.view.feature.calidad.model.BuyerVO
import es.verdnatura.presentation.view.feature.calidad.model.ItemBuyerVO
import es.verdnatura.presentation.view.feature.collection.SalesModified
import es.verdnatura.presentation.view.feature.collection.SalesModifiedList
import es.verdnatura.presentation.view.feature.diadeventa.model.ItemShelvingSaleDate
import es.verdnatura.presentation.view.feature.faltas.model.ItemFaltasVO
import es.verdnatura.presentation.view.feature.historicoarticulo.model.ItemHistoricoVO
@ -145,7 +144,7 @@ interface VerdnaturaService {
@Header("user") user: String,
@Header("pass") pass: String,
@Header("Content-Type") content_type: String,
@Body params:List<String>
@Body params: List<String>
):
Call<Unit>
@ -156,7 +155,7 @@ interface VerdnaturaService {
@Header("user") user: String,
@Header("pass") pass: String,
@Header("Content-Type") content_type: String,
@Body params:List<String>
@Body params: List<String>
):
Call<Unit>
@ -214,7 +213,7 @@ interface VerdnaturaService {
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<String>
Call<Any>
//SACADORES / CONTROLADORES ========================================================================>
@POST("almacennew/collectionGet") //NO SALIX
@ -293,16 +292,16 @@ interface VerdnaturaService {
):
Call<Unit>
/* @POST("almacennew/collectionTicketGet")//REVISADA-ANULADA POT collection_getTickets
fun collectionTicketGet(
@Header("aplicacion") aplicacion: String,
@Header("version") version: String,
@Header("user") user: String,
@Header("pass") pass: String,
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<CollectionVO>*/
/* @POST("almacennew/collectionTicketGet")//REVISADA-ANULADA POT collection_getTickets
fun collectionTicketGet(
@Header("aplicacion") aplicacion: String,
@Header("version") version: String,
@Header("user") user: String,
@Header("pass") pass: String,
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<CollectionVO>*/
@POST("almacennew/ticket_checkFullyControlled")//NO SALIX
fun ticket_checkFullyControlled(
@ -360,16 +359,16 @@ interface VerdnaturaService {
):
Call<String>
/* @POST("almacennew/saleTracking_update")//REVISADA
fun saleTracking_update(
@Header("aplicacion") aplicacion: String,
@Header("version") version: String,
@Header("user") user: String,
@Header("pass") pass: String,
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<Unit>*/
/* @POST("almacennew/saleTracking_update")//REVISADA
fun saleTracking_update(
@Header("aplicacion") aplicacion: String,
@Header("version") version: String,
@Header("user") user: String,
@Header("pass") pass: String,
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<Unit>*/
@POST("almacennew/itemPlacementSupplyAiming")//REVISADA
fun itemPlacementSupplyAiming(
@ -391,7 +390,7 @@ interface VerdnaturaService {
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<String>
Call<Any>
@POST("almacennew/itemShelvingPlacementSupplyAdd")//REVISADA
fun itemShelvingPlacementSupplyAdd(
@ -402,7 +401,7 @@ interface VerdnaturaService {
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<String>
Call<Any>
@POST("almacennew/collectionStickerPrint")//REVISADA
fun collectionStickerPrint(
@ -449,17 +448,17 @@ interface VerdnaturaService {
):
Call<Void>
/*sergio:modificada en el caso de que quiera utilizarse por item_Card
@POST("almacennew/itemGetAvailable")//REVISADA
fun itemGetAvailable(
@Header("aplicacion") aplicacion: String,
@Header("version") version: String,
@Header("user") user: String,
@Header("pass") pass: String,
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<ItemVO>*/
/*sergio:modificada en el caso de que quiera utilizarse por item_Card
@POST("almacennew/itemGetAvailable")//REVISADA
fun itemGetAvailable(
@Header("aplicacion") aplicacion: String,
@Header("version") version: String,
@Header("user") user: String,
@Header("pass") pass: String,
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<ItemVO>*/
@POST("almacennew/collectionAddItem")//REVISADA
fun collectionAddItem(
@ -481,7 +480,7 @@ interface VerdnaturaService {
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<String>
Call<Any>
@POST("almacennew/collectionMissingTrash")//REVISADA
fun collectionMissingTrash(
@ -492,7 +491,7 @@ interface VerdnaturaService {
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<String>
Call<Any>
@POST("almacennew/saleTrackingDel")//REVISADA
fun saleTrackingDel(
@ -503,7 +502,7 @@ interface VerdnaturaService {
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<String>
Call<Any>
@POST("almacennew/itemShelving_updateFromSale")//REVISADA
fun itemShelving_updateFromSale(
@ -559,7 +558,7 @@ interface VerdnaturaService {
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<String>
Call<Any>
@POST("almacennew/saleMistakeAdd")//REVISADA
fun saleMistakeAdd(
@ -570,7 +569,7 @@ interface VerdnaturaService {
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<String>
Call<Any>
@POST("almacennew/workerMistake_Add")//REVISADA
fun workerMistake_Add(
@ -612,7 +611,7 @@ interface VerdnaturaService {
@Header("pass") pass: String,
@Header("Content-Type") content_type: String,
):
):
Call<List<DepartmentMistake>>
@POST("almacennew/worker_getFromHasMistake")//REVISADA
@ -673,18 +672,18 @@ interface VerdnaturaService {
):
Call<List<ItemPackingType>>
/* @POST("almacennew/itemStockUpdate")//REVISADA
fun itemStockUpdate(
@Header("aplicacion") aplicacion: String,
@Header("version") version: String,
@Header("user") user: String,
@Header("pass") pass: String,
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<String>*/
/* @POST("almacennew/itemStockUpdate")//REVISADA
fun itemStockUpdate(
@Header("aplicacion") aplicacion: String,
@Header("version") version: String,
@Header("user") user: String,
@Header("pass") pass: String,
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<String>*/
@POST("almacennew/itemTrash")//REVISADA
@POST("almacennew/itemTrash")//REVISADA
fun itemTrash(
@Header("aplicacion") aplicacion: String,
@Header("version") version: String,
@ -693,9 +692,9 @@ interface VerdnaturaService {
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<String>
Call<Any>
@POST("almacennew/item_placement_save")//REVISADA
/* @POST("almacennew/item_placement_save")//REVISADA
fun itemPlacementSave(
@Header("aplicacion") aplicacion: String,
@Header("version") version: String,
@ -704,7 +703,7 @@ interface VerdnaturaService {
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<String>
Call<String>*/
@POST("almacennew/buy_updateGrouping")//REVISADA
fun updateGrouping(
@ -728,7 +727,7 @@ interface VerdnaturaService {
):
Call<Any>
@POST("almacennew/update_ItemPackingType")//REVISADA
/* @POST("almacennew/update_ItemPackingType")//REVISADA
fun updatePackingType(
@Header("aplicacion") aplicacion: String,
@Header("version") version: String,
@ -737,7 +736,7 @@ interface VerdnaturaService {
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<Boolean>
Call<Boolean>*/
@POST("almacennew/itemSaveMin")//REVISADA
fun itemSaveMin(
@ -748,7 +747,7 @@ interface VerdnaturaService {
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<String>
Call<Any>
@POST("almacennew/item_saveReference")//REVISADA
fun item_saveReference(
@ -758,7 +757,7 @@ interface VerdnaturaService {
@Header("pass") pass: String,
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
):
Call<Unit>
@POST("almacennew/barcodes_edit")//REVISADA
@ -770,7 +769,7 @@ interface VerdnaturaService {
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<String>
Call<Any>
//BUSCAR ITEM ========================================================================>
@POST("almacennew/getItemUbication")//REVISADA
@ -799,17 +798,17 @@ interface VerdnaturaService {
//INVENTARIO ========================================================================>
/* @POST("almacennew/itemShelvingRadar")//REVISADA
fun itemShelvingRadar(
@Header("aplicacion") aplicacion: String,
@Header("version") version: String,
@Header("user") user: String,
@Header("pass") pass: String,
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<List<ItemInventaryVO>>
*/
/* @POST("almacennew/itemShelvingRadar")//REVISADA
fun itemShelvingRadar(
@Header("aplicacion") aplicacion: String,
@Header("version") version: String,
@Header("user") user: String,
@Header("pass") pass: String,
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<List<ItemInventaryVO>>
*/
@POST("almacennew/itemShelving_filterBuyer")//REVISADA
fun itemShelvingRadarFilterBuyer(
@Header("aplicacion") aplicacion: String,
@ -841,7 +840,7 @@ interface VerdnaturaService {
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<String>
Call<Any>
//SHELVING PARKING ========================================================================>
@POST("almacennew/shelvingParking_get")//REVISADA
@ -879,7 +878,6 @@ interface VerdnaturaService {
Call<Boolean>
@POST("almacennew/workerMachinery_isRegistered")//REVISADA
fun workerMachinery_isRegistered(
@Header("aplicacion") aplicacion: String,
@ -957,7 +955,7 @@ interface VerdnaturaService {
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<String>
Call<Any>
@POST("almacennew/itemShelvingMake")//REVISADA
fun itemShelvingMake(
@ -968,7 +966,7 @@ interface VerdnaturaService {
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<String>
Call<Any>
@POST("almacennew/itemShelvingMakeEdit")//REVISADA
fun itemShelvingMakeEdit(
@ -979,7 +977,7 @@ interface VerdnaturaService {
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<String>
Call<Any>
@POST("almacennew/itemShelvingMake_multi")//REVISADA
fun itemShelvingMake_multi(
@ -990,9 +988,9 @@ interface VerdnaturaService {
@Header("Content-Type") content_type: String,
@Body params: List<Any>
):
Call<String>
Call<Any>
@POST("almacennew/saleParking_add")//REVISADA
/* @POST("almacennew/saleParking_add")//REVISADA
fun saleParking_add(
@Header("aplicacion") aplicacion: String,
@Header("version") version: String,
@ -1001,7 +999,7 @@ interface VerdnaturaService {
@Header("Content-Type") content_type: String,
@Body params: List<Any>
):
Call<String>
Call<String>*/
@POST("almacennew/shelvingPark")//REVISADA
@ -1024,7 +1022,7 @@ interface VerdnaturaService {
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<String>
Call<Any>
@POST("almacennew/clearShelvingList")//REVISADA
fun clearShelvingList(
@ -1035,7 +1033,7 @@ interface VerdnaturaService {
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<String>
Call<Any>
@POST("almacennew/itemShelvingTransfer")//REVISADA
fun itemShelvingTransfer(
@ -1046,7 +1044,7 @@ interface VerdnaturaService {
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<String>
Call<Any>
@POST("almacennew/itemShelvingDelete")//REVISADA
fun itemShelvingDelete(
@ -1057,7 +1055,7 @@ interface VerdnaturaService {
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<String>
Call<Any>
//BUFFER ==============================================================================>
@ -1130,7 +1128,7 @@ interface VerdnaturaService {
@Header("pass") pass: String,
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
):
Call<JsonObject>
@POST("almacennew/itemShelving_getSaleDate")//REVISADA
@ -1141,7 +1139,7 @@ interface VerdnaturaService {
@Header("pass") pass: String,
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
):
Call<List<ItemShelvingSaleDate>>
@POST("almacennew/itemShelvingLog_get")//REVISADA
@ -1152,7 +1150,7 @@ interface VerdnaturaService {
@Header("pass") pass: String,
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
):
Call<List<ItemShelvingLog>>
@POST("almacennew/shelvingLog_get")//REVISADA
@ -1163,7 +1161,7 @@ interface VerdnaturaService {
@Header("pass") pass: String,
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
):
Call<List<ShelvingLog>>
@POST("almacennew/itemShelving_updateSpam")//REVISADA
@ -1174,7 +1172,7 @@ interface VerdnaturaService {
@Header("pass") pass: String,
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
):
Call<Boolean>
@ -1197,7 +1195,7 @@ interface VerdnaturaService {
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<String>
Call<Any>
@POST("almacennew/expeditionPalletList")//REVISADA
fun expeditionPallet_List(
@ -1230,7 +1228,7 @@ interface VerdnaturaService {
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<String>
Call<Any>
@POST("almacennew/checkRouteExpeditionScanPut")//REVISADA
fun checkRouteExpeditionScanPut(
@ -1263,7 +1261,7 @@ interface VerdnaturaService {
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<String>
Call<Any>
@POST("almacennew/expeditionScanList")//REVISADA
fun expeditionScanList(
@ -1285,7 +1283,7 @@ interface VerdnaturaService {
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<String>
Call<Any>
@POST("almacennew/expeditionPalletPrintSet")//REVISADA
fun expeditionPalletPrintSet(
@ -1296,7 +1294,7 @@ interface VerdnaturaService {
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<String>
Call<Any>
@POST("almacennew/expeditionState_addByPallet")//REVISADA
fun expeditionState_addByPallet(
@ -1352,7 +1350,7 @@ interface VerdnaturaService {
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<String>
Call<Any>
//SMARTTAGS ========================================================================>
@POST("almacennew/workerShelving_add")//REVISADA

View File

@ -4,14 +4,14 @@ class ResponseItemVO(
var response: String = "",
var isError: Boolean = false,
var errorMessage: String = ""
)
)
class ResponseItemMachineControl(
var response: String = "",
var isError: Boolean = false,
var errorMessage: String = "",
var type: String
)
)
class DataMessageSalix(
var ticket: String = "",
@ -19,9 +19,9 @@ class DataMessageSalix(
var quantity: String = "",
var personSale: String = ""
)
)
class GeneralItem(
var code:String? = "",
var text:String? = ""
)
var code: String? = "",
var text: String? = ""
)

View File

@ -43,7 +43,8 @@ class AjustesViewModel(context: Context) : BaseViewModel() {
private val _printerList by lazy { MutableLiveData<PrintersList>() }
val printerList: LiveData<PrintersList>
get() = _printerList
get
() = _printerList
val loadSectorList = Transformations.map(_sectorList) {Event(it)}

View File

@ -1,7 +1,5 @@
package es.verdnatura.presentation.view.feature.ajustes.model
import es.verdnatura.presentation.view.feature.historicovehiculo.model.ItemHistoricoVehiculo
class AjustesItemVO (
var id: Int,
var title: String = "",

View File

@ -633,8 +633,8 @@ class ItemCardFragment(
user = user,
password = password,
newValue = value,
isTrash = "0",
"itemTrash"
isTrash = "0"
)
//changeOfflineValue(itemB,value, listBarcodes)
showProgress()
@ -647,8 +647,8 @@ class ItemCardFragment(
user = user,
password = password,
newValue = value,
isTrash = "1",
"itemTrash"
isTrash = "1"
)
//changeOfflineValue(itemB,value, listBarcodes)
showProgress()
@ -667,8 +667,8 @@ class ItemCardFragment(
user = user,
password = password,
newValue = (value.toInt() * -1).toString(),
isTrash = "0",
"itemTrash"
isTrash = "0"
)
}
} catch (e: Exception) {
@ -748,11 +748,10 @@ class ItemCardFragment(
password = password,
value = code,
delete = delete,
"itemBarcode_update")
)
}
// viewModel.barcodesEdit(itemFk = itemFk, user = user, password = password, value = code, delete = delete,"itemBarcode_update")
barcodeAdapter!!.notifyDataSetChanged()
//changeOfflineValue(item,"", listBarcodes)
barcodeAdapter!!.notifyDataSetChanged()
showProgress()
}
@ -784,8 +783,7 @@ class ItemCardFragment(
viewModel.updatePackingTypeSalix(
getData(TOKEN),
this.itemFk,
itemPackingType,
"item_updatePackingType"
itemPackingType
)/*}else{
viewModel.updatePackingType(
this.itemFk,

View File

@ -13,13 +13,12 @@ import es.verdnatura.presentation.view.feature.articulo.model.*
import retrofit2.Call
import retrofit2.Callback
import retrofit2.Response
import timber.log.Timber
class ItemCardViewModel(context: Context) : BaseViewModel() {
private val getItemCardUserCase:GetItemCardUserCase = GetItemCardUserCase(context)
val version : String = "5.0.0"
private val getItemCardUserCase: GetItemCardUserCase = GetItemCardUserCase(context)
val version: String = "5.0.0"
private val _itemcard by lazy { MutableLiveData<ItemCardVO>() }
private val _itemcard by lazy { MutableLiveData<ItemCardVO>() }
val itemcard: LiveData<ItemCardVO>
get() = _itemcard
@ -37,46 +36,92 @@ class ItemCardViewModel(context: Context) : BaseViewModel() {
get() = _itemProposallist
fun getItemCard(
itemFk: String,
warehouseFk: String,
user: String,
password: String,
callFunction: String
) {
getItemCardUserCase.getItemCard(user, password, itemFk, warehouseFk)
.enqueue(object : Callback<ItemCardVO> {
override fun onFailure(call: Call<ItemCardVO>, t: Throwable) {
_itemcard.value = ItemCardVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
fun getItemCard(itemFk:String,warehouseFk:String,user:String,password:String,callFunction:String) {
getItemCardUserCase.getItemCard(user,password,itemFk,warehouseFk).enqueue(object :Callback<ItemCardVO>{
override fun onFailure(call: Call<ItemCardVO>, t: Throwable) {
_itemcard.value = ItemCardVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
}
override fun onResponse(call: Call<ItemCardVO>, response: Response<ItemCardVO>) {
// Timber.d("el nombre de la funcion es : "+nameofFunction({ } ))-->devuelve onResponse
Timber.d("el nombre de la funcion es : "+nameofFunction(this))//-->devuelve getItemCard
if (response.body() != null){
_itemcard.value = response.body()!!
}else{
_itemcard.value = ItemCardVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
}
}
})
override fun onResponse(call: Call<ItemCardVO>, response: Response<ItemCardVO>) {
// Timber.d("el nombre de la funcion es : "+nameofFunction({ } ))-->devuelve onResponse
//Timber.d("el nombre de la funcion es : "+nameofFunction(this))//-->devuelve getItemCard
if (response.body() != null) {
_itemcard.value = response.body()!!
} else {
_itemcard.value = ItemCardVO(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
}
}
})
}
fun item_getSimilar(itemFk:String, warehouseFk: String, vShipped: String, vIsShowedByType:String, user:String, password:String,callFunction:String) {
getItemCardUserCase.item_getSimilar(user,password,itemFk,warehouseFk,vShipped,vIsShowedByType).enqueue(object :Callback<List<ItemProposal>>{
fun item_getSimilar(
itemFk: String,
warehouseFk: String,
vShipped: String,
vIsShowedByType: String,
user: String,
password: String,
callFunction: String
) {
getItemCardUserCase.item_getSimilar(
user,
password,
itemFk,
warehouseFk,
vShipped,
vIsShowedByType
).enqueue(object : Callback<List<ItemProposal>> {
override fun onFailure(call: Call<List<ItemProposal>>, t: Throwable) {
val listError:ArrayList<ItemProposal> = ArrayList()
listError.add(ItemProposal(isError = true,errorMessage =getMessageFromAllResponse(nameofFunction(this),t.message!!)))
val listError: ArrayList<ItemProposal> = ArrayList()
listError.add(
ItemProposal(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
)
_itemProposallist.value = ItemProposalList(listError)
}
override fun onResponse(call: Call<List<ItemProposal>>, response: Response<List<ItemProposal>>) {
if (response.body() != null){
_itemProposallist.value = response.body()?.let { ItemProposalList(it)
override fun onResponse(
call: Call<List<ItemProposal>>,
response: Response<List<ItemProposal>>
) {
if (response.body() != null) {
_itemProposallist.value = response.body()?.let {
ItemProposalList(it)
}
}else{
val listError:ArrayList<ItemProposal> = ArrayList()
listError.add(ItemProposal(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message())))
} else {
val listError: ArrayList<ItemProposal> = ArrayList()
listError.add(
ItemProposal(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
)
_itemProposallist.value = ItemProposalList(listError)
}
@ -86,22 +131,38 @@ class ItemCardViewModel(context: Context) : BaseViewModel() {
}
fun getItemPackingType(user:String,password:String,callFunction:String) {
getItemCardUserCase.getItemPackingType(user,password).enqueue(object :
Callback<List<ItemPackingType>>{
fun getItemPackingType(user: String, password: String, callFunction: String) {
getItemCardUserCase.getItemPackingType(user, password).enqueue(object :
Callback<List<ItemPackingType>> {
override fun onFailure(call: Call<List<ItemPackingType>>, t: Throwable) {
val listError:ArrayList<ItemPackingType> = ArrayList()
listError.add(ItemPackingType(isError = true,errorMessage =getMessageFromAllResponse(nameofFunction(this),t.message!!)))
val listError: ArrayList<ItemPackingType> = ArrayList()
listError.add(
ItemPackingType(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
)
_itemspackinglist.value = ItemPackingTypeList(listError)
}
}
override fun onResponse(call: Call<List<ItemPackingType>>, response: Response<List<ItemPackingType>>) {
if (response.body() != null){
override fun onResponse(
call: Call<List<ItemPackingType>>,
response: Response<List<ItemPackingType>>
) {
if (response.body() != null) {
_itemspackinglist.value = response.body()?.let { ItemPackingTypeList(it) }
}else{
val listError:ArrayList<ItemPackingType> = ArrayList()
listError.add(ItemPackingType(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message())))
} else {
val listError: ArrayList<ItemPackingType> = ArrayList()
listError.add(
ItemPackingType(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
)
_itemspackinglist.value = ItemPackingTypeList(listError)
}
}
@ -109,22 +170,38 @@ class ItemCardViewModel(context: Context) : BaseViewModel() {
})
}
fun getItemPackingTypeSalix(token:String) {
fun getItemPackingTypeSalix(token: String) {
getItemCardUserCase.getItemPackingTypeSalix(token).enqueue(object :
Callback<List<ItemPackingType>>{
Callback<List<ItemPackingType>> {
override fun onFailure(call: Call<List<ItemPackingType>>, t: Throwable) {
val listError:ArrayList<ItemPackingType> = ArrayList()
listError.add(ItemPackingType(isError = true,errorMessage =getMessageFromAllResponse(nameofFunction(this),t.message!!)))
val listError: ArrayList<ItemPackingType> = ArrayList()
listError.add(
ItemPackingType(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
)
_itemspackinglist.value = ItemPackingTypeList(listError)
}
override fun onResponse(call: Call<List<ItemPackingType>>, response: Response<List<ItemPackingType>>) {
if (response.body() != null){
override fun onResponse(
call: Call<List<ItemPackingType>>,
response: Response<List<ItemPackingType>>
) {
if (response.body() != null) {
_itemspackinglist.value = response.body()?.let { ItemPackingTypeList(it) }
}else{
val listError:ArrayList<ItemPackingType> = ArrayList()
listError.add(ItemPackingType(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message())))
} else {
val listError: ArrayList<ItemPackingType> = ArrayList()
listError.add(
ItemPackingType(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
)
_itemspackinglist.value = ItemPackingTypeList(listError)
}
}
@ -132,207 +209,332 @@ class ItemCardViewModel(context: Context) : BaseViewModel() {
})
}
fun itemStockUpdate(itemFk:String,warehouseFk:String,user:String,password:String,newValue:String,isTrash:String,callFunction:String){
getItemCardUserCase.itemStockUpdate(user,password,itemFk,warehouseFk,newValue,isTrash).enqueue(object : Callback<String>{
override fun onFailure(call: Call<String>, t: Throwable) {
_response.value = ResponseItemVO(isError = true,errorMessage = "Error en la llamada $callFunction."+t.message!!)
}
/* fun itemStockUpdate(itemFk:String,warehouseFk:String,user:String,password:String,newValue:String,isTrash:String,callFunction:String){
getItemCardUserCase.itemStockUpdate(user,password,itemFk,warehouseFk,newValue,isTrash).enqueue(object : Callback<Any>{
override fun onFailure(call: Call<Any>, t: Throwable) {
_response.value = ResponseItemVO(isError = true,errorMessage = "Error en la llamada $callFunction."+t.message!!)
}
override fun onResponse(call: Call<String>, response: Response<String>) {
if (response.body() == null){
_response.value = ResponseItemVO(isError = true,errorMessage = "Error en la llamada $callFunction")
}else{
_response.value = ResponseItemVO(isError = false,response = response.body()!!)
override fun onResponse(call: Call<Any>, response: Response<Any>) {
if (response.body() == null){
_response.value = ResponseItemVO(isError = true,errorMessage = "Error en la llamada $callFunction")
}else{
_response.value = ResponseItemVO(isError = false,response = response.message()!!)
}
}
})
}*/
fun itemTrash(
itemFk: String,
warehouseFk: String,
user: String,
password: String,
newValue: String,
isTrash: String
) {
getItemCardUserCase.itemTrash(user, password, itemFk, warehouseFk, newValue, isTrash)
.enqueue(object : Callback<Any> {
override fun onFailure(call: Call<Any>, t: Throwable) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
}
override fun onResponse(call: Call<Any>, response: Response<Any>) {
if (!response.isSuccessful) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
} else {
_response.value =
ResponseItemVO(isError = false, response = response.message())
}
})
}
})
}
fun itemTrash(itemFk:String,warehouseFk:String,user:String,password:String,newValue:String,isTrash:String,callFunction:String){
getItemCardUserCase.itemTrash(user,password,itemFk,warehouseFk,newValue,isTrash).enqueue(object : Callback<String>{
override fun onFailure(call: Call<String>, t: Throwable) {
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
}
/* fun itemPlacementSave(itemFk:String,warehouseFk:String,user:String,password:String,value:String,callFunction:String){
getItemCardUserCase.itemPlacementSave(user,password,itemFk,warehouseFk,value).enqueue(object : Callback<String>{
override fun onFailure(call: Call<String>, t: Throwable) {
_response.value = ResponseItemVO(isError = true,errorMessage =getMessageFromAllResponse(nameofFunction(this),t.message!!))
}
override fun onResponse(call: Call<String>, response: Response<String>) {
if (response.body() == null){
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
}else{
_response.value = ResponseItemVO(isError = false,response = response.body()!!)
override fun onResponse(call: Call<String>, response: Response<String>) {
if (response.body() == null){
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
}else{
_response.value = ResponseItemVO(isError = false,response = response.body()!!)
}
}
})
}*/
fun updateGrouping(
itemFk: String,
user: String,
password: String,
value: String,
warehouseFk: String,
callFunction: String
) {
getItemCardUserCase.updateGrouping(user, password, itemFk, value, warehouseFk)
.enqueue(object : Callback<Any> {
override fun onFailure(call: Call<Any>, t: Throwable) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
}
override fun onResponse(call: Call<Any>, response: Response<Any>) {
if (!response.isSuccessful()) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
} else {
_response.value =
ResponseItemVO(isError = false, response = "Actualizado grouping")
}
})
}
})
}
fun itemPlacementSave(itemFk:String,warehouseFk:String,user:String,password:String,value:String,callFunction:String){
getItemCardUserCase.itemPlacementSave(user,password,itemFk,warehouseFk,value).enqueue(object : Callback<String>{
override fun onFailure(call: Call<String>, t: Throwable) {
_response.value = ResponseItemVO(isError = true,errorMessage =getMessageFromAllResponse(nameofFunction(this),t.message!!))
}
override fun onResponse(call: Call<String>, response: Response<String>) {
if (response.body() == null){
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
}else{
_response.value = ResponseItemVO(isError = false,response = response.body()!!)
fun updatePacking(
itemFk: String,
user: String,
password: String,
value: String,
warehouseFk: String,
callFunction: String
) {
getItemCardUserCase.updatePacking(user, password, itemFk, value, warehouseFk)
.enqueue(object : Callback<Any> {
override fun onFailure(call: Call<Any>, t: Throwable) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
}
override fun onResponse(call: Call<Any>, response: Response<Any>) {
if (!response.isSuccessful) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
} else {
_response.value =
ResponseItemVO(isError = false, response = "Actualizado packing")
}
})
}
fun updateGrouping(itemFk:String,user:String,password:String,value:String,warehouseFk: String,callFunction:String){
getItemCardUserCase.updateGrouping(user,password,itemFk,value,warehouseFk).enqueue(object : Callback<Any>{
override fun onFailure(call: Call<Any>, t: Throwable) {
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
}
override fun onResponse(call: Call<Any>, response: Response<Any>) {
if (!response.isSuccessful()){
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
}else{
_response.value = ResponseItemVO(isError = false,response = "Actualizado grouping")
}
}
})
}
fun updatePacking(itemFk:String,user:String,password:String,value:String,warehouseFk: String,callFunction:String){
getItemCardUserCase.updatePacking(user,password,itemFk,value,warehouseFk).enqueue(object : Callback<Any>{
override fun onFailure(call: Call<Any>, t: Throwable) {
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
}
override fun onResponse(call: Call<Any>, response: Response<Any>) {
if (!response.isSuccessful){
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
}else{
_response.value = ResponseItemVO(isError = false,response = "Actualizado packing")
}
}
})
})
}
//sergio ver como solucionar el tema del "Finish"
fun updatePackingType(itemFk:String,user:String,password:String,itemPackingType:String,callFunction:String){
getItemCardUserCase.updatePackingType(user,password,itemFk,itemPackingType).enqueue(object : Callback<Boolean>{
override fun onFailure(call: Call<Boolean>, t: Throwable) {
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
}
/* fun updatePackingType(itemFk:String,user:String,password:String,itemPackingType:String,callFunction:String){
getItemCardUserCase.updatePackingType(user,password,itemFk,itemPackingType).enqueue(object : Callback<Boolean>{
override fun onFailure(call: Call<Boolean>, t: Throwable) {
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
}
override fun onResponse(call: Call<Boolean>, response: Response<Boolean>) {
if (response.body() == null){
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
}else{
//if (response.body()=="Finish"){
// //Log.i("VERDNATURA:","Fisnih encontrado")}
_response.value = ResponseItemVO(isError = false,response = response.body()!!.toString())
override fun onResponse(call: Call<Boolean>, response: Response<Boolean>) {
if (response.body() == null){
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
}else{
//if (response.body()=="Finish"){
// //Log.i("VERDNATURA:","Fisnih encontrado")}
_response.value = ResponseItemVO(isError = false,response = response.body()!!.toString())
}
}
})
}*/
fun updatePackingTypeSalix(token: String, itemFk: String, itemPackingType: String) {
getItemCardUserCase.updatePackingTypeSalix(token, itemFk, itemPackingType)
.enqueue(object : Callback<Any> {
override fun onFailure(call: Call<Any>, t: Throwable) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
}
override fun onResponse(call: Call<Any>, response: Response<Any>) {
if (!response.isSuccessful) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
} else {
_response.value =
ResponseItemVO(isError = false, response = response.body()!!.toString())
}
})
}
fun updatePackingTypeSalix(token:String,itemFk:String,itemPackingType:String,callFunction:String){
getItemCardUserCase.updatePackingTypeSalix(token,itemFk,itemPackingType).enqueue(object : Callback<Any>{
override fun onFailure(call: Call<Any>, t: Throwable) {
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
}
override fun onResponse(call: Call<Any>, response: Response<Any>) {
if (response.body() == null){
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
}else{
//if (response.body()=="Finish"){
// //Log.i("VERDNATURA:","Fisnih encontrado")}
_response.value = ResponseItemVO(isError = false,response = response.body()!!.toString())
}
}
})
}
fun itemSaveMin(itemFk:String,user:String,password:String,value:String,callFunction:String){
getItemCardUserCase.itemSaveMin(user,password,itemFk,value).enqueue(object : Callback<String>{
override fun onFailure(call: Call<String>, t: Throwable) {
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
}
override fun onResponse(call: Call<String>, response: Response<String>) {
if (response.body() == null){
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
}else{
_response.value = ResponseItemVO(isError = false,response = response.body()!!)
}
}
})
})
}
fun item_saveReference(itemFk:String,user:String,password:String,value:String,callFunction:String){
getItemCardUserCase.item_saveReference(user,password,itemFk,value).enqueue(object : Callback<Unit>{
override fun onFailure(call: Call<Unit>, t: Throwable) {
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
}
override fun onResponse(call: Call<Unit>, response: Response<Unit>) {
if (!response.isSuccessful){
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
}else{
_response.value = ResponseItemVO(isError = false)
fun itemSaveMin(
itemFk: String,
user: String,
password: String,
value: String,
callFunction: String
) {
getItemCardUserCase.itemSaveMin(user, password, itemFk, value)
.enqueue(object : Callback<Any> {
override fun onFailure(call: Call<Any>, t: Throwable) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
}
override fun onResponse(call: Call<Any>, response: Response<Any>) {
if (!response.isSuccessful) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
} else {
_response.value =
ResponseItemVO(isError = false, response = response.message())
}
})
}
})
}
fun barcodesEdit(itemFk:String,user:String,password:String,value:String,delete:String,callFunction:String){
getItemCardUserCase.barcodes_edit(user,password,itemFk,value,delete).enqueue(object : Callback<String>{
override fun onFailure(call: Call<String>, t: Throwable) {
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
}
override fun onResponse(call: Call<String>, response: Response<String>) {
if (response.body() == null){
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
}else{
_response.value = ResponseItemVO(isError = false,response = response.body()!!)
fun item_saveReference(
itemFk: String,
user: String,
password: String,
value: String,
callFunction: String
) {
getItemCardUserCase.item_saveReference(user, password, itemFk, value)
.enqueue(object : Callback<Unit> {
override fun onFailure(call: Call<Unit>, t: Throwable) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
}
override fun onResponse(call: Call<Unit>, response: Response<Unit>) {
})
if (!response.isSuccessful) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
} else {
_response.value = ResponseItemVO(isError = false)
}
}
})
}
fun barcodesEdit(
itemFk: String,
user: String,
password: String,
value: String,
delete: String
) {
getItemCardUserCase.barcodes_edit(user, password, itemFk, value, delete)
.enqueue(object : Callback<Any> {
override fun onFailure(call: Call<Any>, t: Throwable) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
override fun onResponse(call: Call<Any>, response: Response<Any>) {
if (response.isSuccessful) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
} else {
_response.value =
ResponseItemVO(isError = false, response = response.message())
}
}
})
}
fun barcodesEditSalix(token:String,itemFk:String,barCodeValue:String){
getItemCardUserCase.barcodes_editSalix(token,itemFk,barCodeValue).enqueue(object : Callback<Any>{
override fun onFailure(call: Call<Any>, t: Throwable) {
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
}
override fun onResponse(call: Call<Any>, response: Response<Any>) {
if (response.body() == null){
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
}else{
_response.value = ResponseItemVO(isError = false,response = response.message()!!)
fun barcodesEditSalix(token: String, itemFk: String, barCodeValue: String) {
getItemCardUserCase.barcodes_editSalix(token, itemFk, barCodeValue)
.enqueue(object : Callback<Any> {
override fun onFailure(call: Call<Any>, t: Throwable) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
}
override fun onResponse(call: Call<Any>, response: Response<Any>) {
if (response.body() == null) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
} else {
_response.value =
ResponseItemVO(isError = false, response = response.message()!!)
}
})
}
})
}
}

View File

@ -54,17 +54,17 @@ class QaualityViewModel(context: Context) : BaseViewModel() {
}
fun itemShelvingStarsUpdate(usuario:String,password:String, vId: String,vStars: String) {
getQualityUserCase.itemShelvingStarsUpdate(usuario,password,vId,vStars).enqueue(object : Callback<String>{
override fun onFailure(call: Call<String>, t: Throwable) {
_response.value = ResponseItemVO(isError = true,errorMessage = "Error en la llamada itemShelving_StarsUpdate."+t.message!!)
getQualityUserCase.itemShelvingStarsUpdate(usuario,password,vId,vStars).enqueue(object : Callback<Any>{
override fun onFailure(call: Call<Any>, t: Throwable) {
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
}
override fun onResponse(call: Call<String>, response: Response<String>) {
override fun onResponse(call: Call<Any>, response: Response<Any>) {
if (response.body() == null){
_response.value = ResponseItemVO(isError = true,errorMessage = "Error en la llamada itemShelving_StarsUpdate")
if (!response.isSuccessful()){
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
}else{
_response.value = ResponseItemVO(isError = false,response = response.body()!!)
_response.value = ResponseItemVO(isError = false,response = response.message())
}
}
})

View File

@ -1,7 +1,6 @@
package es.verdnatura.presentation.view.feature.claim.fragment
import android.view.View
import android.view.View.GONE
import android.view.View.VISIBLE
import android.view.inputmethod.EditorInfo
@ -16,7 +15,6 @@ import es.verdnatura.presentation.common.OnGeneralItemRowClickListener
import es.verdnatura.presentation.common.hideKeyboard
import es.verdnatura.presentation.view.component.CustomDialog
import es.verdnatura.presentation.view.component.CustomDialogList
import es.verdnatura.presentation.view.feature.smarttag.model.SmartTag
class ClaimFragment(
var entryPoint: String = ""
@ -33,7 +31,6 @@ class ClaimFragment(
private var claimAdapter: GeneralAdapter? = null
companion object {
fun newInstance(entryPoint: String) = ClaimFragment(entryPoint)
}
@ -64,32 +61,32 @@ class ClaimFragment(
binding.mainToolbar.toolbarTitle.text = entryPoint
}
private fun setAdapter(){
claimAdapter = GeneralAdapter(listClaims, object : OnGeneralItemRowClickListener {
override fun OnGeneralItemRowClickListener(item: GeneralItem) {
private fun setAdapter() {
claimAdapter = GeneralAdapter(listClaims, object : OnGeneralItemRowClickListener {
}
})
customDialogList.getRecyclerView().adapter = claimAdapter
customDialogList.getRecyclerView().layoutManager =
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
}
override fun OnGeneralItemRowClickListener(item: GeneralItem) {
}
})
customDialogList.getRecyclerView().adapter = claimAdapter
customDialogList.getRecyclerView().layoutManager =
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
}
private fun itemShelving_addByClaim(shelvingOrSmarttag: String) {
binding.splashProgress.visibility = VISIBLE
viewModel.itemShelving_addByClaim(getData(USER),getData(PASSWORD),listClaims.first().toString(),shelvingOrSmarttag)
customDialogList.dismiss()
viewModel.itemShelving_addByClaim(
getData(USER),
getData(PASSWORD),
listClaims.first().toString(),
shelvingOrSmarttag
)
customDialogList.dismiss()
}
private fun hideKeyboards() {
try {
requireActivity().hideKeyboard()
} catch (e: Exception) {
}
}
private fun setEvents() {
@ -117,10 +114,16 @@ private fun setAdapter(){
listClaims.clear()
claimAdapter!!.notifyDataSetChanged()
showInputClaim()
ma.messageWithSound(it.errorMessage,true,false)
ma.messageWithSound(it.errorMessage, true, false)
} else {
customDialogList.dismiss()
ma.messageWithSound("Reclamación ${listClaims.first().code} guardada con matrícula ${listClaims.get(1).code}",false,true)
ma.messageWithSound(
"Reclamación ${listClaims.first().code} guardada con matrícula ${
listClaims.get(
1
).code
}", false, true
)
listClaims.clear()
claimAdapter!!.notifyDataSetChanged()
showInputClaim()
@ -160,16 +163,13 @@ private fun setAdapter(){
}
private fun add_item(itemScaned:String){
var nameClaim: String
private fun add_item(itemScaned: String) {
nameClaim =
getTextScaned(listClaims.size + 1) + itemScaned
val nameClaim: String = getTextScaned(listClaims.size + 1) + itemScaned
customDialogList.setTitle(getTextToPosition(listClaims.size + 1))
listClaims.add(GeneralItem(itemScaned, nameClaim))
claimAdapter!!.notifyDataSetChanged()
//customDialogList.setValue("")
}
@ -180,8 +180,8 @@ private fun setAdapter(){
ma.hideKeyboard(customDialogList.getEditText())
customDialogList.dismiss()
requireActivity().onBackPressed()
customDialogList.dismiss()
requireActivity().onBackPressed()
}.setValue("").show()
@ -191,12 +191,12 @@ private fun setAdapter(){
customDialogList.getEditText().setOnEditorActionListener { v, actionId, event ->
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5 || actionId == 6) {
if (!customDialogList.getValue().isNullOrEmpty()) {
if (!customDialogList.getValue().isEmpty()) {
//listClaims.add(GeneralItem(customDialogList.getValue(),customDialogList.getValue()))
//listClaims.add(GeneralItem(customDialogList.getValue(),customDialogList.getValue()))
add_item(customDialogList.getValue())
if (listClaims.size >1) {
if (listClaims.size > 1) {
itemShelving_addByClaim(customDialogList.getValue().uppercase())
}
@ -209,7 +209,7 @@ private fun setAdapter(){
false
}
hideKeyboard()
hideKeyboard()
}

View File

@ -399,7 +399,10 @@ class SaleAdapter(
)
}
"CELESTE" -> itemView.setBackgroundColor(0xFF5b85F5.toInt())
"CELESTE" ->if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
itemView.background.colorFilter =
BlendModeColorFilter(0xFF5b85F5.toInt(), BlendMode.SRC_ATOP)
}
"ROSA" -> if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {

View File

@ -113,7 +113,6 @@ class CollectionFragment(
mpok = MediaPlayer.create((activity as MainActivity), R.raw.ok)
if ((collection.collectionFk != null) && type.equals(CONTROLADOR)) {
//sergio: comprueba si viene de la pantalla de controlador
@ -685,8 +684,7 @@ class CollectionFragment(
viewModel.saleTrackingDel(
getData(USER),
getData(PASSWORD),
saleFk = sales[positionUnmarked].saleFk,
"saleTracking_del"
saleFk = sales[positionUnmarked].saleFk
)
goBack = false
@ -740,8 +738,8 @@ class CollectionFragment(
message=message+"\r\n"
}
Log.d("VERDNATURA::","Persona a enviar "+collection.tickets.get(0).salesPersonFk)
Log.d("VERDNATURA::","El message a enviar "+message)
//Log.d("VERDNATURA::","Persona a enviar "+collection.tickets.get(0).salesPersonFk)
//Log.d("VERDNATURA::","El message a enviar "+message)
viewModel.sendChekingPresence(
token = getData(TOKEN),
workerId = collection.tickets.get(0).salesPersonFk,
@ -797,7 +795,7 @@ class CollectionFragment(
viewModel.sendChekingPresence(
token = getData(TOKEN),
workerId = salePerson,
workerId = "19294",
message = message, "sendChekingPresence"
)
}
@ -1572,8 +1570,8 @@ class CollectionFragment(
getData(PASSWORD),
itemShelvingFk = itemShelvingFk,
saleFk = sales[storedPosition].saleFk,
quantity = if (quantity != "0") quantity else customDialogList.getValue(),
callFunction = "itemShelvingSaleSupplyAdd"
quantity = if (quantity != "0") quantity else customDialogList.getValue()
)
@ -2085,8 +2083,7 @@ class CollectionFragment(
getData(PASSWORD),
saleFk = sales[position].saleFk,
quantity = totalQuantity.toString(),
originalQuantity = sales[position].quantity,
"saleMove"
originalQuantity = sales[position].quantity
)
/* sales[position].quantity = quantity
@ -2506,8 +2503,7 @@ class CollectionFragment(
password = getData(PASSWORD),
vSaleFk = mistakeSale?.saleFk!!,
vUserFk = mistakeSale?.workerFk!!,
vTypeFk = it.id, "saleMistake_Add"
)
vTypeFk = it.id)
"Causa del error registrado".toast(requireContext())
customDialogList.dismiss()
}

View File

@ -13,20 +13,20 @@ import es.verdnatura.R
import es.verdnatura.databinding.FragmentFaltasBinding
import es.verdnatura.presentation.base.BaseFragment
import es.verdnatura.presentation.common.*
import es.verdnatura.presentation.view.component.CustomDialog
import es.verdnatura.presentation.view.component.CustomDialogInput
import es.verdnatura.presentation.view.feature.faltas.adapter.FaltasAdapter
import es.verdnatura.presentation.view.feature.faltas.model.ItemFaltasVO
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
class FaltasFragment : BaseFragment<FragmentFaltasBinding, FaltasViewModel>(FaltasViewModel::class) {
class FaltasFragment :
BaseFragment<FragmentFaltasBinding, FaltasViewModel>(FaltasViewModel::class) {
private var adapter : FaltasAdapter? = null
private var adapter: FaltasAdapter? = null
private lateinit var customDialogInput: CustomDialogInput
private var listInvetory:ArrayList<ItemFaltasVO> = ArrayList()
private var listInvetoryAux:ArrayList<ItemFaltasVO> = ArrayList()
// private lateinit var customDialog: CustomDialog
private var listInvetory: ArrayList<ItemFaltasVO> = ArrayList()
private var listInvetoryAux: ArrayList<ItemFaltasVO> = ArrayList()
// private lateinit var customDialog: CustomDialog
private var pasillerosItemClickListener: OnPasillerosItemClickListener? = null
private var reload = false
private var hideLoad = true
@ -44,30 +44,30 @@ class FaltasFragment : BaseFragment<FragmentFaltasBinding, FaltasViewModel>(Falt
override fun onCreate(savedInstanceState: Bundle?) {
viewModel.getFaltas(getData(USER),getData(PASSWORD),getData(WAREHOUSEFK))
viewModel.getFaltas(getData(USER), getData(PASSWORD), getData(WAREHOUSEFK))
super.onCreate(savedInstanceState)
}
override fun init() {
binding.splashProgress.visibility = View.VISIBLE
ma.hideBottomNavigation(View.GONE)
ma.hideBottomNavigation(View.GONE)
binding.mainToolbar.toolbarTitle.text = getString(R.string.faultsReview)
setToolBar()
customDialogInput = CustomDialogInput(requireContext())
// customDialog = CustomDialog(requireContext())
// customDialog = CustomDialog(requireContext())
setEvents()
if (reload){
if (reload) {
reload = false
hideLoad = false
binding.splashProgress.visibility = View.VISIBLE
viewModel.getFaltas(getData(USER),getData(PASSWORD),getData(WAREHOUSEFK))
viewModel.getFaltas(getData(USER), getData(PASSWORD), getData(WAREHOUSEFK))
}
super.init()
}
private fun setToolBar(){
private fun setToolBar() {
val listIcons: ArrayList<ImageView> = ArrayList()
val iconReload = ImageView(context)
@ -78,26 +78,28 @@ class FaltasFragment : BaseFragment<FragmentFaltasBinding, FaltasViewModel>(Falt
}
listIcons.add(iconReload)
binding.mainToolbar.toolbarIcons.adapter = ToolBarAdapterTooltip(listIcons,object: OnOptionsSelectedListener {
override fun onOptionsItemSelected(item: Drawable) {
if (item == iconReload.drawable){
binding.splashProgress.visibility = View.VISIBLE
viewModel.getFaltas(getData(USER),getData(PASSWORD),getData(WAREHOUSEFK))
binding.mainToolbar.toolbarIcons.adapter =
ToolBarAdapterTooltip(listIcons, object : OnOptionsSelectedListener {
override fun onOptionsItemSelected(item: Drawable) {
if (item == iconReload.drawable) {
binding.splashProgress.visibility = View.VISIBLE
viewModel.getFaltas(getData(USER), getData(PASSWORD), getData(WAREHOUSEFK))
}
}
}
})
binding.mainToolbar.toolbarIcons.layoutManager = LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
})
binding.mainToolbar.toolbarIcons.layoutManager =
LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
}
private fun setEvents(){
private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener {
requireActivity().onBackPressed()
}
binding.filterItemFk.setOnKeyListener { v, keyCode, event ->
if (binding.filterItemFk.text.toString().isNullOrEmpty()){
if (listInvetory.size != listInvetoryAux.size){
if (binding.filterItemFk.text.toString().isNullOrEmpty()) {
if (listInvetory.size != listInvetoryAux.size) {
listInvetory.removeAll(listInvetoryAux)
listInvetoryAux.forEach {
listInvetory.add(it)
@ -105,10 +107,10 @@ class FaltasFragment : BaseFragment<FragmentFaltasBinding, FaltasViewModel>(Falt
}
}else{
} else {
listInvetory.removeAll(listInvetoryAux)
listInvetoryAux.forEach {
if (it.itemFk.contains(binding.filterItemFk.text.toString(),true)){
if (it.itemFk.contains(binding.filterItemFk.text.toString(), true)) {
listInvetory.add(it)
}
}
@ -121,35 +123,54 @@ class FaltasFragment : BaseFragment<FragmentFaltasBinding, FaltasViewModel>(Falt
}
override fun observeViewModel() {
with(viewModel){
with(viewModel) {
faltasList.observe(viewLifecycleOwner, Observer {
if (hideLoad){
binding.splashProgress.visibility = View.GONE
}else{
hideLoad = true
}
listInvetory = ArrayList()
listInvetoryAux = ArrayList()
it.list.forEach {
listInvetory.add(it)
listInvetoryAux.add(it)
}
if (hideLoad) {
binding.splashProgress.visibility = View.GONE
} else {
hideLoad = true
}
listInvetory = ArrayList()
listInvetoryAux = ArrayList()
it.list.forEach {
listInvetory.add(it)
listInvetoryAux.add(it)
}
adapter = FaltasAdapter(listInvetory,object: OnFaltasNichoClickListener {
override fun onFaltasNichoClickListener(item: ItemFaltasVO) {
customDialogInput.setTitle(item.itemFk+"\n"+item.longName+" "+item.size).setDescription("Cantidad real("+item.nicho+")").setOkButton("Tirar"){
viewModel.itemStockUpdate(item.itemFk,getData(WAREHOUSEFK),getData(USER),getData(PASSWORD),customDialogInput.getValue(),"0","temTrash")
adapter = FaltasAdapter(listInvetory, object : OnFaltasNichoClickListener {
override fun onFaltasNichoClickListener(item: ItemFaltasVO) {
customDialogInput.setTitle(item.itemFk + "\n" + item.longName + " " + item.size)
.setDescription("Cantidad real(" + item.nicho + ")")
.setOkButton("Tirar") {
viewModel.itemStockUpdate(
item.itemFk,
getData(WAREHOUSEFK),
getData(USER),
getData(PASSWORD),
customDialogInput.getValue(),
"0"
)
changeOfflineValue(item)
customDialogInput.dismiss()
}.setKoButton("Cancelar"){
customDialogInput.dismiss()
}.setValue("0").show()
}.setKoButton("Cancelar") {
customDialogInput.dismiss()
}.setValue("0").show()
customDialogInput.getEditText().requestFocus()
customDialogInput.getEditText().setOnEditorActionListener { v, actionId, event ->
customDialogInput.getEditText().requestFocus()
customDialogInput.getEditText()
.setOnEditorActionListener { v, actionId, event ->
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) {
if (!customDialogInput.getValue().isNullOrEmpty()){
viewModel.itemStockUpdate(item.itemFk,getData(WAREHOUSEFK),getData(USER),getData(PASSWORD),customDialogInput.getValue(),"0","temTrash")
if (!customDialogInput.getValue().isNullOrEmpty()) {
viewModel.itemStockUpdate(
item.itemFk,
getData(WAREHOUSEFK),
getData(USER),
getData(PASSWORD),
customDialogInput.getValue(),
"0"
)
changeOfflineValue(item)
}
customDialogInput.setValue("")
@ -160,32 +181,36 @@ class FaltasFragment : BaseFragment<FragmentFaltasBinding, FaltasViewModel>(Falt
false
}
}
},object: OnFaltasReviewClickListener{
override fun onFaltasReviewClickListener(item: ItemFaltasVO) {
viewModel.faultsReview_isChecked(getData(USER),getData(PASSWORD),item.itemFk,getData(WAREHOUSEFK),"faultsReview_isChecked")
changeOfflineValue(item)
}
}
}, object : OnFaltasReviewClickListener {
override fun onFaltasReviewClickListener(item: ItemFaltasVO) {
viewModel.faultsReview_isChecked(
getData(USER),
getData(PASSWORD),
item.itemFk,
getData(WAREHOUSEFK),
"faultsReview_isChecked"
)
changeOfflineValue(item)
}
},pasillerosItemClickListener!!)
binding.locationRecyclerview.adapter = adapter
binding.locationRecyclerview.layoutManager = LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
}, pasillerosItemClickListener!!)
binding.locationRecyclerview.adapter = adapter
binding.locationRecyclerview.layoutManager =
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
})
response.observe(viewLifecycleOwner, Observer {
if (it.isError){
ma.messageWithSound(it.errorMessage,it.isError,false)
/* customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
customDialog.dismiss()
}.show()*/
if (it.isError) {
ma.messageWithSound(it.errorMessage, it.isError, false)
}
})
}
}
private fun changeOfflineValue(item: ItemFaltasVO){
private fun changeOfflineValue(item: ItemFaltasVO) {
var i = 0
var position = 0
listInvetory.forEach {

View File

@ -61,18 +61,18 @@ class FaltasViewModel(context: Context) : BaseViewModel() {
})
}
fun itemStockUpdate(itemFk:String,warehouseFk:String,user:String,password:String,newValue:String,isTrash:String,callFunction:String){
fun itemStockUpdate(itemFk:String,warehouseFk:String,user:String,password:String,newValue:String,isTrash:String){
getItemCardUserCase.itemStockUpdate(user,password,itemFk,warehouseFk,newValue,isTrash).enqueue(object :
Callback<String> {
override fun onFailure(call: Call<String>, t: Throwable) {
Callback<Any> {
override fun onFailure(call: Call<Any>, t: Throwable) {
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
}
override fun onResponse(call: Call<String>, response: Response<String>) {
if (response.body() == null){
override fun onResponse(call: Call<Any>, response: Response<Any>) {
if (response.isSuccessful()){
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
}else{
_response.value = ResponseItemVO(isError = false,response = response.body()!!)
_response.value = ResponseItemVO(isError = false,response = response.message())
}
}
@ -82,15 +82,15 @@ class FaltasViewModel(context: Context) : BaseViewModel() {
fun faultsReview_isChecked(user:String,password:String,itemFk:String,warehouseFk:String,callFunction:String){
getInventaryUserCase.faultsReview_isChecked(user,password,itemFk,warehouseFk).enqueue(object :
Callback<String> {
override fun onFailure(call: Call<String>, t: Throwable) {
Callback<Any> {
override fun onFailure(call: Call<Any>, t: Throwable) {
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
}
override fun onResponse(call: Call<String>, response: Response<String>) {
if (response.body() == null){
override fun onResponse(call: Call<Any>, response: Response<Any>) {
if (!response.isSuccessful){
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
}else{
_response.value = ResponseItemVO(isError = false,response = response.body()!!)
_response.value = ResponseItemVO(isError = false,response = response.message())
}
}

View File

@ -214,7 +214,7 @@ class InventaryFragment : BaseFragment<FragmentInventaryBinding,InventaryViewMod
//sergio: cambiado customdialogInput pòr customdialog 6.1.4
customDialog.setTitle(item.itemFk+"\n"+item.longName+" "+item.size).setDescription("Cantidad real("+item.nicho+")").setOkButton("Tirar"){
//customDialogInput.setTitle(item.itemFk+"\n"+item.longName+" "+item.size).setDescription("Cantidad real("+item.nicho+")").setOkButton("Tirar"){
viewModel.itemTrash(item.itemFk,getData(WAREHOUSEFK),getData(USER),getData(PASSWORD),item.nicho,"0","itemTrash")
viewModel.itemTrash(item.itemFk,getData(WAREHOUSEFK),getData(USER),getData(PASSWORD),item.nicho,"0")
//viewModel.itemStockUpdate(item.itemFk,warehouseFk,user,password,"0","0")
// viewModel.itemStockUpdate(item.itemFk,warehouseFk,user,password,customDialogInput.getValue(),"0")
changeOfflineValue(item)

View File

@ -150,7 +150,7 @@ class InventaryViewModel(context: Context) : BaseViewModel() {
fun itemStockUpdate(itemFk:String,warehouseFk:String,user:String,password:String,newValue:String,isTrash:String){
/*fun itemStockUpdate(itemFk:String,warehouseFk:String,user:String,password:String,newValue:String,isTrash:String){
//sergio: se modifica por CAU a itemTrash
// https://cau.verdnatura.es/scp/tickets.php?id=21043 al nuevo procedimiento itemTrash
getItemCardUserCase.itemStockUpdate(user,password,itemFk,warehouseFk,newValue,isTrash).enqueue(object : Callback<String>{
@ -170,24 +170,24 @@ class InventaryViewModel(context: Context) : BaseViewModel() {
}
})
}
}*/
//sergio: se modifica por CAU a itemTrash
fun itemTrash(itemFk:String,warehouseFk:String,user:String,password:String,newValue:String,isTrash:String,callFunction:String){
fun itemTrash(itemFk:String,warehouseFk:String,user:String,password:String,newValue:String,isTrash:String){
getItemCardUserCase.itemTrash(user,password,itemFk,warehouseFk,newValue,isTrash).enqueue(object : Callback<String>{
getItemCardUserCase.itemTrash(user,password,itemFk,warehouseFk,newValue,isTrash).enqueue(object : Callback<Any>{
override fun onFailure(call: Call<String>, t: Throwable) {
override fun onFailure(call: Call<Any>, t: Throwable) {
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
}
override fun onResponse(call: Call<String>, response: Response<String>) {
if (response.body() == null){
override fun onResponse(call: Call<Any>, response: Response<Any>) {
if (!response.isSuccessful){
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
}else{
_response.value = ResponseItemVO(isError = false,response = response.body()!!)
_response.value = ResponseItemVO(isError = false,response = response.message())
}
}

View File

@ -131,8 +131,9 @@ class LoginFragment : BaseFragment<FragmentLoginBinding, LoginViewModel>(LoginVi
val openURL = Intent(Intent.ACTION_VIEW)
openURL.data =
// sergio REdmine Tarea #3730
Uri.parse("https://app.verdnatura.es/bin/vn-picking.apk")
// Uri.parse(it.url)
//Uri.parse("https://app.verdnatura.es/bin/vn-picking.apk")
Uri.parse(it.url)
//Log.d("VERDNATURA::","Datos"+ openURL.data)
startActivity(openURL)
}
@ -383,7 +384,8 @@ class LoginFragment : BaseFragment<FragmentLoginBinding, LoginViewModel>(LoginVi
viewModel.checkVersion(
user = binding.edittextUsername.text.toString(),
password = binding.edittextPassword.text.toString(),
nameApp = "warehouse", "getVersion"
nameApp = "warehouse", "getVersion",
)
}

View File

@ -290,7 +290,7 @@ class LoginViewModel(context: Context) : BaseViewModel()
it.appname,
it.version,
it.IsVersionCritical,
//it.url,
it.url,
isError = false,
errorMessage = ""
)

View File

@ -37,7 +37,7 @@ class versionApp(
val appname: String = "",
val version: String = "",
var IsVersionCritical: Int = 0,
// var url: String="",
var url: String="",
var isError: Boolean = false,
var errorMessage: String = ""
)

View File

@ -488,7 +488,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
"Flejado buffer" -> {
addFragmentOnTop(BufferFragment.newInstance(item.title))
}
/*sergio:pruebas*/
"Pre Control" -> {
addFragmentOnTop(PreControladorFragment.newInstance())
}

View File

@ -3,6 +3,7 @@ package es.verdnatura.presentation.view.feature.paletizador.fragment
import android.content.Context
import android.graphics.drawable.Drawable
import android.util.Log
import android.view.View
import androidx.lifecycle.Observer
import androidx.recyclerview.widget.LinearLayoutManager
@ -101,7 +102,7 @@ class ExpeditionPalletDetailFragment(
}else if(item == iconBorrar){
binding.splashProgress.visibility = View.VISIBLE
viewModel.expeditionPalletDel(getData(USER),
getData(PASSWORD),itemPallet!!.Pallet,"expeditionPallet_Del")
getData(PASSWORD),itemPallet!!.Pallet)
}else if(item == iconPrint){
binding.splashProgress.visibility = View.VISIBLE
@ -154,6 +155,7 @@ class ExpeditionPalletDetailFragment(
}else{
binding.splashProgress.visibility=View.VISIBLE
Log.d("VERDNATURA::","Cambiando estado a paletizado")
viewModel.expeditionState_addByPallet( getData(USER),getData(PASSWORD),itemPallet!!.Pallet,"PALLETIZED","expeditionState_addByPallet")
}

View File

@ -59,16 +59,16 @@ class ExpeditionPalletDetailViewModel(context: Context): BaseViewModel() {
})
}
fun expeditionPalletDel(usuario:String,password:String,vPalletFk:String,callFunction:String){
getPaletizadoresUserCase.expeditionPalletDel(usuario,password,vPalletFk).enqueue(object : Callback<String>{
override fun onFailure(call: Call<String>, t: Throwable) {
fun expeditionPalletDel(usuario:String,password:String,vPalletFk:String){
getPaletizadoresUserCase.expeditionPalletDel(usuario,password,vPalletFk).enqueue(object : Callback<Any>{
override fun onFailure(call: Call<Any>, t: Throwable) {
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
}
override fun onResponse(call: Call<String>, response: Response<String>) {
if (response.body() == null){
override fun onResponse(call: Call<Any>, response: Response<Any>) {
if (response.isSuccessful){
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
}else{
_response.value = ResponseItemVO(isError = false,response = response.body()!!)
_response.value = ResponseItemVO(isError = false,response = response.message())
}
}
})
@ -80,15 +80,15 @@ class ExpeditionPalletDetailViewModel(context: Context): BaseViewModel() {
vPalletFk: String,
vSectorFk: String,callFunction:String){
getPaletizadoresUserCase.expeditionPalletPrintSet(usuario,password,vPalletFk,vSectorFk).enqueue(object : Callback<String>{
override fun onFailure(call: Call<String>, t: Throwable) {
getPaletizadoresUserCase.expeditionPalletPrintSet(usuario,password,vPalletFk,vSectorFk).enqueue(object : Callback<Any>{
override fun onFailure(call: Call<Any>, t: Throwable) {
_responsePrintPallet.value = ResponseItemVO(isError = true,errorMessage =getMessageFromAllResponse(nameofFunction(this),t.message!!))
}
override fun onResponse(call: Call<String>, response: Response<String>) {
if (response.body() == null){
override fun onResponse(call: Call<Any>, response: Response<Any>) {
if (!response.isSuccessful){
_responsePrintPallet.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
}else{
_responsePrintPallet.value = ResponseItemVO(isError = false,response = response.body()!!)
_responsePrintPallet.value = ResponseItemVO(isError = false,response = response.message())
}
}
})

View File

@ -131,9 +131,7 @@ class ExpeditionPalletFragment(
response.observe(viewLifecycleOwner, Observer {
if (it.isError){
ma.messageWithSound(it.errorMessage,true,false)
/* customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
customDialog.dismiss()
}.show()*/
}
})
@ -228,7 +226,7 @@ class ExpeditionPalletFragment(
listExpeditions.add(0,BarcodeVO(code = customDialogList.getValue()))
customDialogList.setDescription("Total: "+listExpeditions.size)
viewModel.expeditionScanPut(getData(USER),
getData(PASSWORD),it.list.get(0).palletFk,customDialogList.getValue(),"expeditionScan_Put")
getData(PASSWORD),it.list.get(0).palletFk,customDialogList.getValue())
////Log.i("VERDNATURA:"," palletizando ${it.list.get(0).palletFk} expedi: ${customDialogList.getValue()}")
viewModel.checkRouteExpeditionScanPut(getData(USER),
getData(PASSWORD),it.list.get(0).palletFk,customDialogList.getValue(),"expedition_checkRoute")

View File

@ -92,16 +92,16 @@ class ExpeditionPalletViewModel (context: Context) : BaseViewModel() {
})
}
fun expeditionScanPut(usuario:String,password:String,vPalletFk:String,vExpeditionFk:String,callFunction:String){
getPaletizadoresUserCase.expeditionScanPut(usuario,password,vPalletFk,vExpeditionFk).enqueue(object : Callback<String>{
override fun onFailure(call: Call<String>, t: Throwable) {
fun expeditionScanPut(usuario:String,password:String,vPalletFk:String,vExpeditionFk:String){
getPaletizadoresUserCase.expeditionScanPut(usuario,password,vPalletFk,vExpeditionFk).enqueue(object : Callback<Any>{
override fun onFailure(call: Call<Any>, t: Throwable) {
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
}
override fun onResponse(call: Call<String>, response: Response<String>) {
if (response.body() == null){
override fun onResponse(call: Call<Any>, response: Response<Any>) {
if (!response.isSuccessful){
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
}else{
_response.value = ResponseItemVO(isError = false,response = response.body()!!)
_response.value = ResponseItemVO(isError = false,response = response.message())
}
}
})

View File

@ -6,6 +6,8 @@ import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.Transformations
import es.verdnatura.domain.GetPaletizadoresUserCase
import es.verdnatura.presentation.base.BaseViewModel
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.view.feature.paletizador.model.ItemExpeditionScanList
@ -35,7 +37,6 @@ class ExpeditionScanViewModel(context: Context) : BaseViewModel() {
val responseDeleteScan: LiveData<ResponseItemVO>
get() = _responseDeleteScan
//sergio:añadido para llamada nueva checkexpeditionScan
private val _responseCheckexpeditionScanPut by lazy { MutableLiveData<ResponseItemVO>() }
val responseCheckexpeditionScanPut: LiveData<ResponseItemVO>
get() = _responseCheckexpeditionScanPut
@ -91,15 +92,17 @@ class ExpeditionScanViewModel(context: Context) : BaseViewModel() {
}
fun expeditionScanPut(usuario:String,password:String,vPalletFk:String,vExpeditionFk:String){
getPaletizadoresUserCase.expeditionScanPut(usuario,password,vPalletFk,vExpeditionFk).enqueue(object : Callback<String>{
override fun onFailure(call: Call<String>, t: Throwable) {
_response.value = ResponseItemVO(isError = true,errorMessage = "Error en la llamada expeditionScan_Put."+t.message!!)
getPaletizadoresUserCase.expeditionScanPut(usuario,password,vPalletFk,vExpeditionFk).enqueue(object : Callback<Any>{
override fun onFailure(call: Call<Any>, t: Throwable) {
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(
nameofFunction(this),t.message!!)
)
}
override fun onResponse(call: Call<String>, response: Response<String>) {
if (response.body() == null){
_response.value = ResponseItemVO(isError = true,errorMessage = "Error en la llamada expeditionScan_Put")
override fun onResponse(call: Call<Any>, response: Response<Any>) {
if (!response.isSuccessful){
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()!!))
}else{
_response.value = ResponseItemVO(isError = false,response = response.body()!!)
_response.value = ResponseItemVO(isError = false,response = response.message())
}
}
@ -125,15 +128,15 @@ class ExpeditionScanViewModel(context: Context) : BaseViewModel() {
fun expeditionScanDel(usuario:String,password:String,vScanFk:String){
getPaletizadoresUserCase.expeditionScanDel(usuario,password,vScanFk).enqueue(object : Callback<String>{
override fun onFailure(call: Call<String>, t: Throwable) {
getPaletizadoresUserCase.expeditionScanDel(usuario,password,vScanFk).enqueue(object : Callback<Any>{
override fun onFailure(call: Call<Any>, t: Throwable) {
_responseDeleteScan.value = ResponseItemVO(isError = true,errorMessage = "Error al llamar expeditionScan_Del."+t.message!!)
}
override fun onResponse(call: Call<String>, response: Response<String>) {
override fun onResponse(call: Call<Any>, response: Response<Any>) {
if (response.body() == null){
_responseDeleteScan.value = ResponseItemVO(isError = true,errorMessage = "Error en la llamada expeditionScan_Del")
}else{
_responseDeleteScan.value = ResponseItemVO(isError = false,response = response.body()!!)
_responseDeleteScan.value = ResponseItemVO(isError = false,response = response.message())
}
}
})

View File

@ -115,7 +115,7 @@ class ExpeditionTruckListFragment : BaseFragment<FragmentExpeditionTruckListBin
ma.hideKeyboard(customDialogHor.getDestinoEditText())
if (!customDialogHor.getDestinoValue().isNullOrEmpty() && !customDialogHor.getHoraValue().isNullOrEmpty()){
viewModel.expeditionTruckAdd(getData(USER),
getData(PASSWORD),customDialogHor.getHoraValue(),customDialogHor.getDestinoValue(),"expeditionTruck_Add")
getData(PASSWORD),customDialogHor.getHoraValue(),customDialogHor.getDestinoValue())
binding.splashProgress.visibility = View.VISIBLE
customDialogHor.dismiss()
}
@ -130,7 +130,7 @@ class ExpeditionTruckListFragment : BaseFragment<FragmentExpeditionTruckListBin
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) {
if (!customDialogHor.getDestinoValue().isNullOrEmpty() && !customDialogHor.getHoraValue().isNullOrEmpty()){
viewModel.expeditionTruckAdd(getData(USER),
getData(PASSWORD),customDialogHor.getHoraValue(),customDialogHor.getDestinoValue(),"expeditionTruck_Add")
getData(PASSWORD),customDialogHor.getHoraValue(),customDialogHor.getDestinoValue())
binding.splashProgress.visibility = View.VISIBLE
customDialogHor.dismiss()
}

View File

@ -55,17 +55,17 @@ class ExpeditionTruckListViewModel(context: Context) : BaseViewModel() {
})
}
fun expeditionTruckAdd(usuario:String,password:String,vHour:String,vDescription:String,callFunction:String){
getPaletizadoresUserCase.expeditionTruckAdd(usuario,password,vHour,vDescription).enqueue(object : Callback<String>{
override fun onFailure(call: Call<String>, t: Throwable) {
fun expeditionTruckAdd(usuario:String,password:String,vHour:String,vDescription:String){
getPaletizadoresUserCase.expeditionTruckAdd(usuario,password,vHour,vDescription).enqueue(object : Callback<Any>{
override fun onFailure(call: Call<Any>, t: Throwable) {
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
}
override fun onResponse(call: Call<String>, response: Response<String>) {
if (response.body() == null){
override fun onResponse(call: Call<Any>, response: Response<Any>) {
if (!response.isSuccessful){
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
}else{
_response.value = ResponseItemVO(isError = false,response = response.body()!!)
_response.value = ResponseItemVO(isError = false,response = response.message())
}
}

View File

@ -63,7 +63,7 @@ class ParkingSaleViewModel(context: Context) : BaseViewModel() {
}
})
}
fun saleParking_add(usuario: String, password: String, sales:List<String>,parking: String,callFunction:String)
/* fun saleParking_add(usuario: String, password: String, sales:List<String>,parking: String,callFunction:String)
{
getUbicadorUserCase.saleParking_add(usuario, password, sales, parking)
.enqueue(object : Callback<String>
@ -91,6 +91,6 @@ class ParkingSaleViewModel(context: Context) : BaseViewModel() {
}
}
})
}
}*/
}

View File

@ -189,7 +189,7 @@ class PasilleroViewModel : BaseViewModel() {
PasillerosItemVO(
30,
R.drawable.pallet_shipping_selected,
"Paletizar", R.string.PalletMake,"Permite escanear pallet para incorporarlo al sistema"
"Paletizar", R.string.scanPallet,"Permite escanear pallet para incorporarlo al sistema"
)
)

View File

@ -574,7 +574,7 @@ class EndSacadorFragment(
)
} else {
binding.mainToolbar.toolbarTitle.text = ticket
if (ticket.isNullOrBlank()){binding.mainToolbar.toolbarTitle.text = collection.collectionFk}
sales = ArrayList()
salesList.forEach {
@ -657,7 +657,8 @@ class EndSacadorFragment(
if (it.saldo == it.picked)
totalMark += 1
}
binding.mainToolbar.toolbarTitle.text = ticket
if (ticket.isNullOrBlank()){binding.mainToolbar.toolbarTitle.text = collection.collectionFk}
binding.mainToolbar.toolbarSubtitle.text = "" + totalMark + "/" + sales.size
if (totalMark == sales.size) {
"Ticket completo".toast(this.context, Toast.LENGTH_SHORT)
@ -1002,7 +1003,7 @@ class EndSacadorFragment(
password = getData(PASSWORD),
itemShelvingFk = itemShelvingFk,
saleFk = sales[storedPosition].idMovimiento,
quantity = customDialogList.getValue(), callFunction = "itemShelvingSaleSupplyAdd"
quantity = customDialogList.getValue()
)
} catch (e: Exception) {
@ -1139,7 +1140,8 @@ class EndSacadorFragment(
//OTROS
private fun setToolBar() {
binding.mainToolbar.toolbarSubtitle.visibility = View.VISIBLE
binding.mainToolbar.toolbarSubtitle.visibility = VISIBLE
binding.mainToolbar.toolbarTitle.text=collection.collectionFk
val listIcons: ArrayList<ImageView> = ArrayList()
@ -1195,35 +1197,6 @@ class EndSacadorFragment(
requireActivity().hideKeyboard()
}
/* private fun parkingTicket(ticket: String, parking: String) {
var saleParkingList: MutableList<String> = arrayListOf()
if (!sales.isNullOrEmpty())
sales.forEach {
Log.d("VERNATURA::", "el id es " + it.id + " y el idmovimiento" + it.idMovimiento)
if (it.id.equals(ticket)) {
if ((it.picked == it.quantity)) {
saleParkingList.add(it.idMovimiento)
}
}
}
if (!saleParkingList.isNullOrEmpty()) {
binding.splashProgress.visibility = VISIBLE
viewModel.saleParking_add(
usuario = user,
password = password,
sales = saleParkingList,
parking = parking,
"saleParking_add"
)
} else {
"No se han encontrado líneas de venta a aparcar para ese ticket".toast(requireContext())
}
}*/
companion object {
fun newInstance(collection: CollectionVO?, entrypoint: String) = EndSacadorFragment(
@ -1409,7 +1382,7 @@ class EndSacadorFragment(
password = getData(PASSWORD),
saleFk = sales[position].idMovimiento,
quantity = totalQuantity.toString(),
originalQuantity = sales[position].quantity.toString(), "saleMove"
originalQuantity = sales[position].quantity.toString()
)
Log.d("VERDNATURA::", "responseSaleMove enviando")
/*

View File

@ -803,7 +803,7 @@ class PreSacadorFragment :
password = getData(PASSWORD),
itemShelvingFk = itemShelvingFk,
saleFk = sales[storedPosition].idMovimiento,
quantity = customDialogList.getValue(), callFunction = "itemShelvingSaleSupplyAdd"
quantity = customDialogList.getValue()
)
} catch (e: Exception) {
@ -994,34 +994,6 @@ class PreSacadorFragment :
requireActivity().hideKeyboard()
}
/* private fun parkingTicket(ticket: String, parking: String) {
var saleParkingList: MutableList<String> = arrayListOf()
if (!sales.isNullOrEmpty())
sales.forEach {
Log.d("VERNATURA::", "el id es " + it.id + " y el idmovimiento" + it.idMovimiento)
if (it.id.equals(ticket)) {
if ((it.picked == it.quantity)) {
saleParkingList.add(it.idMovimiento)
}
}
}
if (!saleParkingList.isNullOrEmpty()) {
binding.splashProgress.visibility = VISIBLE
viewModel.saleParking_add(
usuario = user,
password = password,
sales = saleParkingList,
parking = parking,
"saleParking_add"
)
} else {
"No se han encontrado líneas de venta a aparcar para ese ticket".toast(requireContext())
}
}*/
companion object {
@ -1200,7 +1172,7 @@ class PreSacadorFragment :
password = getData(PASSWORD),
saleFk = sales[position].idMovimiento,
quantity = totalQuantity.toString(),
originalQuantity = sales[position].quantity.toString(), "saleMove"
originalQuantity = sales[position].quantity.toString()
)
/*
try {

View File

@ -31,7 +31,8 @@ import es.verdnatura.presentation.view.feature.sacador.model.SaleVO
class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionViewModel>(
ReposicionViewModel::class){
ReposicionViewModel::class
) {
private var pasillerosItemClickListener: OnPasillerosItemClickListener? = null
@ -39,23 +40,23 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
private lateinit var customDialogList: CustomDialogList
private lateinit var customDialogInput: CustomDialogInput
private var sales:ArrayList<PreSacadorItemVO> = ArrayList()
private var sales: ArrayList<PreSacadorItemVO> = ArrayList()
private var lm : LinearLayoutManager? = null
private var lm: LinearLayoutManager? = null
private var saleAdapter: ReposicionAdapter? = null
var mperror: MediaPlayer? = null
var mpok: MediaPlayer? = null
private var storedBackPosition : Int = 0
private var storedShelvingPosition:Int = 0
private var storedBackPosition: Int = 0
private var storedShelvingPosition: Int = 0
private var storedPosition: Int = 0
private var listPlacementSupply:ArrayList<BarcodeVO> = ArrayList()
private var itemShelvingFkStored : String = ""
private var placementSupplyAdapter : BarcodeAdapter? = null
private var listPlacementSupply: ArrayList<BarcodeVO> = ArrayList()
private var itemShelvingFkStored: String = ""
private var placementSupplyAdapter: BarcodeAdapter? = null
private var goBack:Boolean = false
private var goBack2:Boolean = false
private var goBack: Boolean = false
private var goBack2: Boolean = false
companion object {
fun newInstance() = ReposicionFragment()
@ -72,7 +73,7 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
customDialog = CustomDialog(requireContext())
customDialogList = CustomDialogList(requireContext())
customDialogInput = CustomDialogInput(requireContext())
ma.hideBottomNavigation(View.GONE)
ma.hideBottomNavigation(View.GONE)
binding.splashProgress.visibility = View.GONE
binding.mainToolbar.toolbarTitle.text = getString(R.string.itemPlacementSupplyGetOrder)
setToolBar()
@ -81,8 +82,8 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
}
override fun onCreate(savedInstanceState: Bundle?) {
mperror = MediaPlayer.create((activity as MainActivity),R.raw.error)
mpok = MediaPlayer.create((activity as MainActivity),R.raw.ok)
mperror = MediaPlayer.create((activity as MainActivity), R.raw.error)
mpok = MediaPlayer.create((activity as MainActivity), R.raw.ok)
super.onCreate(savedInstanceState)
}
@ -94,32 +95,42 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
}
private fun setEvents(){
private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener {
requireActivity().onBackPressed()
}
binding.btnObtener.setOnClickListener {
binding.splashProgress.visibility = View.VISIBLE
viewModel.itemPlacementSupplyGetOrder(usuario = getData(USER),password = getData(PASSWORD),sectorFk = getData(SECTORFK),"itemPlacementSupplyGetOrder")
viewModel.itemPlacementSupplyGetOrder(
usuario = getData(USER),
password = getData(PASSWORD),
sectorFk = getData(SECTORFK),
"itemPlacementSupplyGetOrder"
)
}
binding.btnCancelar.setOnClickListener {
customDialog.setTitle("Confirmar").setDescription("¿Estás seguro de cerrar el pedido?").setKoButton("Cerrar"){
scanRequest()
customDialog.dismiss()
}.setOkButton("Cerrar"){
customDialog.setTitle("Confirmar").setDescription("¿Estás seguro de cerrar el pedido?")
.setKoButton("Cerrar") {
scanRequest()
customDialog.dismiss()
}.setOkButton("Cerrar") {
binding.splashProgress.visibility = View.VISIBLE
if (sales.count() > 0){
viewModel.itemPlacementSupplyCloseOrder(usuario = getData(USER),password = getData(PASSWORD),id = sales[0].id,quantity = sales[0].quantity.toString(),"itemPlacementSupplyCloseOrder")
if (sales.count() > 0) {
viewModel.itemPlacementSupplyCloseOrder(
usuario = getData(USER),
password = getData(PASSWORD),
id = sales[0].id,
quantity = sales[0].quantity.toString()
)
}
customDialog.dismiss()
}.show()
}
//ESCANER =========
@ -127,11 +138,11 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
binding.scanInput.requestFocus()
binding.scanInput.setOnEditorActionListener { v, actionId, event ->
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
if (!binding.scanInput.text.toString().isNullOrEmpty()){
if (!binding.scanInput.text.toString().isNullOrEmpty()) {
if (sales.count() > 0 && sales[0].saldo == 0){
if (sales.count() > 0 && sales[0].saldo == 0) {
"Pedido completado".toast(requireContext())
}else{
} else {
findSale(binding.scanInput.text.toString())
}
@ -150,18 +161,23 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
//LISTA =========
binding.collectionSwipe.setOnRefreshListener {
binding.splashProgress.visibility = View.VISIBLE
viewModel.itemPlacementSupplyGetOrder(usuario = getData(USER),password = getData(PASSWORD),sectorFk = getData(SECTORFK),"itemPlacementSupplyGetOrder")
viewModel.itemPlacementSupplyGetOrder(
usuario = getData(USER),
password = getData(PASSWORD),
sectorFk = getData(SECTORFK),
"itemPlacementSupplyGetOrder"
)
binding.collectionSwipe.isRefreshing = false
}
}
private fun hideKeyboards(){
private fun hideKeyboards() {
requireActivity().hideKeyboard()
}
override fun observeViewModel() {
with(viewModel){
with(viewModel) {
salesList.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = View.GONE
createSaleList(it)
@ -175,21 +191,22 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
responseCode.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = View.GONE
if (!goBack2){
if (it.isError){
customDialog.setTitle("Error").setDescription(it.errorMessage).setKoButton("Cerrar"){
scanRequest()
customDialog.dismiss()
}.show()
}else{
if (checkItemScan(it.response)){
if (!goBack2) {
if (it.isError) {
customDialog.setTitle("Error").setDescription(it.errorMessage)
.setKoButton("Cerrar") {
scanRequest()
customDialog.dismiss()
}.show()
} else {
if (checkItemScan(it.response)) {
scanRequest()
customDialogList.dismiss()
mpok?.start()
onQuantityOfShelvingSelected(itemShelvingFkStored)
}else{
} else {
customDialogList.setValueTwo("")
// showErrorMessage("El resultado del procedimiento barcodeToItem de la etiqueta escaneada es: " +it.response)
// showErrorMessage("El resultado del procedimiento barcodeToItem de la etiqueta escaneada es: " +it.response)
showErrorMessage("La línea de compra de la etiqueta escaneada no existe.")
mperror?.start()
}
@ -212,23 +229,24 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
super.observeViewModel()
}
private fun createSaleList(salesList : List<PreSacadorItemVO>){
private fun createSaleList(salesList: List<PreSacadorItemVO>) {
binding.splashProgress.visibility = View.GONE
if (salesList.isNullOrEmpty()){
customDialog.setTitle("Reposición").setDescription("No existen pedidos para reponer").setKoButton("Cancelar"){
if (sales.count()>0){
sales.clear()
saleAdapter!!.notifyDataSetChanged()
}
customDialog.dismiss()
}.show()
if (salesList.isNullOrEmpty()) {
customDialog.setTitle("Reposición").setDescription("No existen pedidos para reponer")
.setKoButton("Cancelar") {
if (sales.count() > 0) {
sales.clear()
saleAdapter!!.notifyDataSetChanged()
}
customDialog.dismiss()
}.show()
binding.scanInput.visibility = View.GONE
binding.btnCancelar.visibility = View.GONE
}else if(salesList.count() > 0 && salesList[0].saldo == 0){
} else if (salesList.count() > 0 && salesList[0].saldo == 0) {
"Pedido completado".toast(requireContext())
binding.scanInput.visibility = View.GONE
binding.btnCancelar.visibility = View.GONE
}else{
} else {
binding.scanInput.visibility = View.VISIBLE
binding.btnCancelar.visibility = View.VISIBLE
@ -239,7 +257,7 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
}
lm = LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
saleAdapter = ReposicionAdapter(sales,pasillerosItemClickListener!!,object :
saleAdapter = ReposicionAdapter(sales, pasillerosItemClickListener!!, object :
OnSaleClickListener {
override fun onSaleClick(sale: SaleVO) {
sales.forEachIndexed { index, saleVO ->
@ -261,24 +279,24 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
//SEARCH AND MARK
private fun findSale(txtscan:String){
private fun findSale(txtscan: String) {
var index = 0
var isBreak = false
var isOk = false
for (saleVO in sales) {
if(saleVO.quantity != saleVO.picked){
if (saleVO.quantity != saleVO.picked) {
//1- Por carro
var shelvingIndex = 0
for (placementVO in saleVO.carros){
if (txtscan.uppercase() == placementVO.shelving.uppercase()){
if (mpok!= null) mpok!!.start()
for (placementVO in saleVO.carros) {
if (txtscan.uppercase() == placementVO.shelving.uppercase()) {
if (mpok != null) mpok!!.start()
isOk = true
showShelving(index,shelvingIndex)
showShelving(index, shelvingIndex)
isBreak = true
break
}
shelvingIndex+=1
shelvingIndex += 1
}
if (isBreak) break
}
@ -287,30 +305,30 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
if (!isOk) {
mperror!!.start()
("Elemento escaneado no encontrado: "+txtscan).toast(requireContext())
("Elemento escaneado no encontrado: " + txtscan).toast(requireContext())
}
}
private fun findSale(txtscan:String,position: Int){
private fun findSale(txtscan: String, position: Int) {
var index = 0
var isBreak = false
var isOk = false
val saleVO = sales[position]
if(saleVO.quantity != saleVO.picked){
if (saleVO.quantity != saleVO.picked) {
//1- Por carro
var shelvingIndex = 0
for (placementVO in saleVO.carros){
if (txtscan.uppercase() == placementVO.shelving.uppercase()){
if(mpok != null) mpok!!.start()
for (placementVO in saleVO.carros) {
if (txtscan.uppercase() == placementVO.shelving.uppercase()) {
if (mpok != null) mpok!!.start()
isOk = true
showShelving(position,shelvingIndex)
showShelving(position, shelvingIndex)
isBreak = true
break
}
shelvingIndex+=1
shelvingIndex += 1
}
}
index += 1
@ -318,22 +336,23 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
if (!isOk) {
mperror!!.start()
("Elemento escaneado no encontrado: "+txtscan).toast(requireContext())
("Elemento escaneado no encontrado: " + txtscan).toast(requireContext())
}
}
//SHELVINGS
private fun showShelving(position:Int,shelvingPosition:Int){
private fun showShelving(position: Int, shelvingPosition: Int) {
storedShelvingPosition = shelvingPosition
storedPosition = position
binding.splashProgress.visibility = View.VISIBLE
var quantityGet = "0"
try{
try {
quantityGet = (sales[position].saldo - sales[position].picked).toString()
}catch (e:Exception){}
} catch (e: Exception) {
}
viewModel.itemPlacementSupplyAiming(
usuario = getData(USER),
usuario = getData(USER),
password = getData(PASSWORD),
itemFk = sales[position].itemFk,
quantity = quantityGet,
@ -342,13 +361,13 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
)
}
private fun printShelvingResult(placementSupplyListVO: PlacementSupplyListVO){
private fun printShelvingResult(placementSupplyListVO: PlacementSupplyListVO) {
var shelving = ""
var item = ""
var longName = ""
var total = "0"
var itemShelvingFk = "0"
if (!placementSupplyListVO.list.isEmpty()){
if (!placementSupplyListVO.list.isEmpty()) {
val placement = placementSupplyListVO.list[0]
shelving = placement.shelving
item = placement.itemFk
@ -361,61 +380,65 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
listPlacementSupply.add(BarcodeVO(code = it.proposal))
}
customDialogList.setTitle("$shelving($item) $total de $longName").setOkButton("Coger"){
if (customDialogList.getValueTwo().isNotEmpty()){
if (checkItemScan(customDialogList.getValueTwo())){
customDialogList.setTitle("$shelving($item) $total de $longName").setOkButton("Coger") {
if (customDialogList.getValueTwo().isNotEmpty()) {
if (checkItemScan(customDialogList.getValueTwo())) {
onQuantityOfShelvingSelected(itemShelvingFk)
mpok?.start()
customDialogList.dismiss()
}else{
} else {
itemShelvingFkStored = itemShelvingFk
binding.splashProgress.visibility = View.VISIBLE
viewModel.getIdFromCode(
usuario = getData(USER),
usuario = getData(USER),
password = getData(PASSWORD),
code = customDialogList.getValueTwo(),"barcodeToItem"
code = customDialogList.getValueTwo(), "barcodeToItem"
)
customDialogList.dismiss()
}
scanRequest()
hideKeyboards()
}else{
} else {
"Escanea item para validar".toast(requireContext())
}
}.setKoButton("Cerrar"){
}.setKoButton("Cerrar") {
scanRequest()
hideKeyboards()
customDialogList.dismiss()
}.setHintValue("Cantidad que coges:").setValue(total).setHintValueTwo("Escanea item").setValueTwo("").show()
}.setHintValue("Cantidad que coges:").setValue(total).setHintValueTwo("Escanea item")
.setValueTwo("").show()
customDialogList.getEditTextTwo().post(Runnable {
customDialogList.getEditTextTwo().requestFocusFromTouch()
val lManager: InputMethodManager =
requireActivity().getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
lManager.hideSoftInputFromWindow(customDialogList.getEditTextTwo().windowToken, InputMethodManager.SHOW_FORCED)
lManager.hideSoftInputFromWindow(
customDialogList.getEditTextTwo().windowToken,
InputMethodManager.SHOW_FORCED
)
})
customDialogList.getEditTextTwo().setOnEditorActionListener { v, actionId, event ->
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
if (customDialogList.getValueTwo().isNotEmpty()){
if (checkItemScan(customDialogList.getValueTwo())){
if (customDialogList.getValueTwo().isNotEmpty()) {
if (checkItemScan(customDialogList.getValueTwo())) {
onQuantityOfShelvingSelected(itemShelvingFk)
mpok?.start()
customDialogList.dismiss()
}else{
} else {
itemShelvingFkStored = itemShelvingFk
binding.splashProgress.visibility = View.VISIBLE
viewModel.getIdFromCode(
usuario = getData(USER),
usuario = getData(USER),
password = getData(PASSWORD),
code = customDialogList.getValueTwo(),"barcodeToItem"
code = customDialogList.getValueTwo(), "barcodeToItem"
)
customDialogList.dismiss()
}
}else{
} else {
"Escanea item para validar".toast(requireContext())
}
scanRequest()
@ -426,46 +449,52 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
false
}
placementSupplyAdapter = BarcodeAdapter(listPlacementSupply,object: OnBarcodeRowClickListener {
override fun onBarcodeRowClickListener(item: BarcodeVO) {
placementSupplyListVO.list.forEach {
if (it.proposal == item.code){
customDialogList.setValue(it.total)
total = it.total
itemShelvingFk = it.itemShelvingFk
placementSupplyAdapter =
BarcodeAdapter(listPlacementSupply, object : OnBarcodeRowClickListener {
override fun onBarcodeRowClickListener(item: BarcodeVO) {
placementSupplyListVO.list.forEach {
if (it.proposal == item.code) {
customDialogList.setValue(it.total)
total = it.total
itemShelvingFk = it.itemShelvingFk
}
}
}
}
},showDelete = false)
}
}, showDelete = false)
customDialogList.getRecyclerView().adapter = placementSupplyAdapter
customDialogList.getRecyclerView().layoutManager = LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
customDialogList.getRecyclerView().layoutManager =
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
}
private fun onQuantityOfShelvingSelected(itemShelvingFk:String){
private fun onQuantityOfShelvingSelected(itemShelvingFk: String) {
//1 - MODIFICAR CANTIDAD DEL CARRO
try {
val shelvingVisible = sales[storedPosition].carros[storedShelvingPosition].stockTotal
sales[storedPosition].carros[storedShelvingPosition].stockTotal = (shelvingVisible.toInt() - customDialogList.getValue().toInt()).toString()
sales[storedPosition].carros[storedShelvingPosition].stockTotal =
(shelvingVisible.toInt() - customDialogList.getValue().toInt()).toString()
viewModel.itemShelvingPlacementSupplyAdd(
usuario = getData(USER),
usuario = getData(USER),
password = getData(PASSWORD),
itemShelvingFk = itemShelvingFk,
itemPlacementSupplyFk = sales[storedPosition].id,
quantity = customDialogList.getValue(),"itemShelvingPlacementSupplyAdd"
quantity = customDialogList.getValue(), "itemShelvingPlacementSupplyAdd"
)
}catch (e:Exception){}
} catch (e: Exception) {
}
//2- MODIFICAR EL PICKED DEL SALE
try{
sales[storedPosition].saldo = sales[storedPosition].saldo - customDialogList.getValue().toInt()
}catch (e:Exception){}
try {
sales[storedPosition].saldo =
sales[storedPosition].saldo - customDialogList.getValue().toInt()
} catch (e: Exception) {
}
//3- MARCAR LINEA
markLine(storedPosition)
@ -475,7 +504,7 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
//OTROS
private fun setToolBar(){
private fun setToolBar() {
binding.mainToolbar.toolbarSubtitle.visibility = View.VISIBLE
val listIcons: ArrayList<ImageView> = ArrayList()
@ -489,52 +518,59 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
listIcons.add(iconParking)
binding.mainToolbar.toolbarIcons.adapter = ToolBarAdapterTooltip(listIcons,object: OnOptionsSelectedListener {
override fun onOptionsItemSelected(item: Drawable) {
binding.mainToolbar.toolbarIcons.adapter =
ToolBarAdapterTooltip(listIcons, object : OnOptionsSelectedListener {
override fun onOptionsItemSelected(item: Drawable) {
when (item) {
iconParking.drawable -> pasillerosItemClickListener?.onPasillerosItemClickListener(
PasillerosItemVO(title = "Parking"),
""
)
}
when (item){
iconParking.drawable->pasillerosItemClickListener?.onPasillerosItemClickListener(PasillerosItemVO(title = "Parking"),"")
}
}
})
binding.mainToolbar.toolbarIcons.layoutManager = LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
})
binding.mainToolbar.toolbarIcons.layoutManager =
LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
}
private fun scanRequest(){
private fun scanRequest() {
binding.scanInput.requestFocus()
hideKeyboards()
}
private fun checkItemScan(valueToCheck:String):Boolean{
private fun checkItemScan(valueToCheck: String): Boolean {
val saleToCheck = sales[storedPosition]
return saleToCheck.itemFk == valueToCheck
}
private fun showErrorMessage(text:String){
customDialog.setTitle("Error al marcar la linea").setDescription(text).setKoButton("Cerrar"){
customDialog.dismiss()
}.show()
private fun showErrorMessage(text: String) {
customDialog.setTitle("Error al marcar la linea").setDescription(text)
.setKoButton("Cerrar") {
customDialog.dismiss()
}.show()
}
private fun showScanner(index:Int, sale:PreSacadorItemVO){
customDialogInput.setTitle(""+sale.itemFk).setDescription("Escanea el carro para el item seleccionado").setOkButton("Aceptar"){
private fun showScanner(index: Int, sale: PreSacadorItemVO) {
customDialogInput.setTitle("" + sale.itemFk)
.setDescription("Escanea el carro para el item seleccionado").setOkButton("Aceptar") {
if (!customDialogInput.getValue().isNullOrEmpty()) {
findSale(customDialogInput.getValue(),index)
findSale(customDialogInput.getValue(), index)
}
customDialogInput.setValue("")
scanRequest()
customDialogInput.dismiss()
hideKeyboards()
}.setKoButton("Cancelar"){
}.setKoButton("Cancelar") {
customDialogInput.dismiss()
}.setValue("").show()
customDialogInput.getEditText().requestFocus()
customDialogInput.getEditText().setOnEditorActionListener { v, actionId, event ->
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) {
if (!customDialogInput.getValue().isNullOrEmpty()) {
findSale(customDialogInput.getValue(),index)
findSale(customDialogInput.getValue(), index)
}
customDialogInput.setValue("")
scanRequest()
@ -548,31 +584,32 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
}
private fun unMarkLine(position: Int){
private fun unMarkLine(position: Int) {
if (sales[position].quantity == sales[position].picked){
customDialog.setTitle("Desmarcar linea").setDescription("Vas a desmarcar la linea: "+sales[position].itemFk+ " ¿Estás seguro?").setOkButton("Desmarcar"){
sales[position].picked = 0
saleAdapter!!.notifyDataSetChanged()
if (sales[position].quantity == sales[position].picked) {
customDialog.setTitle("Desmarcar linea")
.setDescription("Vas a desmarcar la linea: " + sales[position].itemFk + " ¿Estás seguro?")
.setOkButton("Desmarcar") {
sales[position].picked = 0
saleAdapter!!.notifyDataSetChanged()
/*viewModel.saleTrackingDel(
usuario = user,
password = password,
saleFk = sales[position].idMovimiento
)*/
scanRequest()
customDialog.dismiss()
}.setKoButton("Cancelar"){
/*viewModel.saleTrackingDel(
usuario = user,
password = password,
saleFk = sales[position].idMovimiento
)*/
scanRequest()
customDialog.dismiss()
}.setKoButton("Cancelar") {
scanRequest()
customDialog.dismiss()
}.show()
}
}
private fun markLine(position:Int){
private fun markLine(position: Int) {
saleAdapter!!.notifyDataSetChanged()
}

View File

@ -21,7 +21,8 @@ import retrofit2.Response
class ReposicionViewModel(context: Context) : BaseViewModel() {
private val getPreSacadorUseCase: GetPreSacadorUseCase = GetPreSacadorUseCase(context)
private val getUbicadorUserCase: GetUbicadorUserCase = GetUbicadorUserCase(context)
private val getSacadorControladorUserCase: GetSacadorControladorUserCase = GetSacadorControladorUserCase(context)
private val getSacadorControladorUserCase: GetSacadorControladorUserCase =
GetSacadorControladorUserCase(context)
private val _salesList by lazy { MutableLiveData<List<PreSacadorItemVO>>() }
val salesList: LiveData<List<PreSacadorItemVO>>
@ -43,111 +44,211 @@ class ReposicionViewModel(context: Context) : BaseViewModel() {
val responseCode: LiveData<ResponseItemVO>
get() = _responseCode
fun itemPlacementSupplyGetOrder(usuario:String,password:String,sectorFk:String,callFunction:String){
getPreSacadorUseCase.itemPlacementSupplyGetOrder(usuario,password,sectorFk).enqueue(object :
Callback<List<PreSacadorItemVO>> {
override fun onFailure(call: Call<List<PreSacadorItemVO>>, t: Throwable) {
_salesList.value = listOf()
}
override fun onResponse(
call: Call<List<PreSacadorItemVO>>,
response: Response<List<PreSacadorItemVO>>
) {
if (response.body() != null){
_salesList.value = response.body()?.let { it }
}else{
fun itemPlacementSupplyGetOrder(
usuario: String,
password: String,
sectorFk: String,
callFunction: String
) {
getPreSacadorUseCase.itemPlacementSupplyGetOrder(usuario, password, sectorFk)
.enqueue(object :
Callback<List<PreSacadorItemVO>> {
override fun onFailure(call: Call<List<PreSacadorItemVO>>, t: Throwable) {
_salesList.value = listOf()
}
}
})
}
fun parking(usuario: String,password: String,ticketFk: String,parking:String,callFunction:String){
getUbicadorUserCase.shelvingPark(usuario,password,ticketFk,parking).enqueue(object : Callback<String>{
override fun onFailure(call: Call<String>, t: Throwable) {
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
}
override fun onResponse(call: Call<String>, response: Response<String>) {
if (response.body() == null){
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
}else{
_response.value = ResponseItemVO(isError = false,response = response.body()!!)
override fun onResponse(
call: Call<List<PreSacadorItemVO>>,
response: Response<List<PreSacadorItemVO>>
) {
if (response.body() != null) {
_salesList.value = response.body()?.let { it }
} else {
_salesList.value = listOf()
}
}
}
})
})
}
fun itemPlacementSupplyAiming(usuario:String,password:String,shelvingFk:String,quantity:String,itemFk:String,callFunction:String){
getSacadorControladorUserCase.itemPlacementSupplyAiming(usuario,password,shelvingFk,quantity,itemFk).enqueue(object :
fun parking(
usuario: String,
password: String,
ticketFk: String,
parking: String,
callFunction: String
) {
getUbicadorUserCase.shelvingPark(usuario, password, ticketFk, parking)
.enqueue(object : Callback<String> {
override fun onFailure(call: Call<String>, t: Throwable) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
override fun onResponse(call: Call<String>, response: Response<String>) {
if (response.body() == null) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
} else {
_response.value =
ResponseItemVO(isError = false, response = response.body()!!)
}
}
})
}
fun itemPlacementSupplyAiming(
usuario: String,
password: String,
shelvingFk: String,
quantity: String,
itemFk: String,
callFunction: String
) {
getSacadorControladorUserCase.itemPlacementSupplyAiming(
usuario,
password,
shelvingFk,
quantity,
itemFk
).enqueue(object :
Callback<List<PlacementSupplyVO>> {
override fun onFailure(call: Call<List<PlacementSupplyVO>>, t: Throwable) {
val listError:ArrayList<PlacementSupplyVO> = ArrayList()
listError.add(PlacementSupplyVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!)))
val listError: ArrayList<PlacementSupplyVO> = ArrayList()
listError.add(
PlacementSupplyVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
)
_placementSuppleyList.value = PlacementSupplyListVO(listError)
}
override fun onResponse(
call: Call<List<PlacementSupplyVO>>,
response: Response<List<PlacementSupplyVO>>
) {
if (response.body() != null){
if (response.body() != null) {
_placementSuppleyList.value = response.body()?.let { PlacementSupplyListVO(it) }
}else{
val listError:ArrayList<PlacementSupplyVO> = ArrayList()
listError.add(PlacementSupplyVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message())))
} else {
val listError: ArrayList<PlacementSupplyVO> = ArrayList()
listError.add(
PlacementSupplyVO(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
)
_placementSuppleyList.value = PlacementSupplyListVO(listError)
}
}
})
}
fun getIdFromCode(usuario:String,password:String,code: String,callFunction:String){
getSacadorControladorUserCase.getIdFromCode(usuario,password,code).enqueue(object : Callback<String>{
override fun onFailure(call: Call<String>, t: Throwable) {
_responseCode.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
fun getIdFromCode(usuario: String, password: String, code: String, callFunction: String) {
getSacadorControladorUserCase.getIdFromCode(usuario, password, code)
.enqueue(object : Callback<String> {
override fun onFailure(call: Call<String>, t: Throwable) {
_responseCode.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
override fun onResponse(call: Call<String>, response: Response<String>) {
if (response.body() == null) {
_responseCode.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
} else {
_responseCode.value =
ResponseItemVO(isError = false, response = response.body()!!)
}
}
})
}
fun itemShelvingPlacementSupplyAdd(
usuario: String,
password: String,
itemShelvingFk: String,
itemPlacementSupplyFk: String,
quantity: String,
callFunction: String
) {
getSacadorControladorUserCase.itemShelvingPlacementSupplyAdd(
usuario,
password,
itemShelvingFk,
itemPlacementSupplyFk,
quantity
).enqueue(object : Callback<Any> {
override fun onFailure(call: Call<Any>, t: Throwable) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
override fun onResponse(call: Call<String>, response: Response<String>) {
if (response.body() == null){
_responseCode.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
}else{
_responseCode.value = ResponseItemVO(isError = false,response = response.body()!!)
override fun onResponse(call: Call<Any>, response: Response<Any>) {
if (!response.isSuccessful) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
} else {
_response.value = ResponseItemVO(isError = false, response = response.message())
}
}
})
}
fun itemShelvingPlacementSupplyAdd(usuario:String,password:String,itemShelvingFk:String,itemPlacementSupplyFk:String,quantity:String,callFunction:String){
getSacadorControladorUserCase.itemShelvingPlacementSupplyAdd(usuario,password,itemShelvingFk,itemPlacementSupplyFk,quantity).enqueue(object : Callback<String>{
override fun onFailure(call: Call<String>, t: Throwable) {
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
}
override fun onResponse(call: Call<String>, response: Response<String>) {
if (response.body() == null){
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
}else{
_response.value = ResponseItemVO(isError = false,response = response.body()!!)
fun itemPlacementSupplyCloseOrder(
usuario: String,
password: String,
id: String,
quantity: String
) {
getPreSacadorUseCase.itemPlacementSupplyCloseOrder(usuario, password, id, quantity)
.enqueue(object : Callback<Any> {
override fun onFailure(call: Call<Any>, t: Throwable) {
_responseClose.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
}
})
}
fun itemPlacementSupplyCloseOrder(usuario:String,password:String,id:String,quantity:String,callFunction:String){
getPreSacadorUseCase.itemPlacementSupplyCloseOrder(usuario,password,id,quantity).enqueue(object : Callback<String>{
override fun onFailure(call: Call<String>, t: Throwable) {
_responseClose.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
}
override fun onResponse(call: Call<String>, response: Response<String>) {
if (response.body() == null){
_responseClose.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
}else{
_responseClose.value = ResponseItemVO(isError = false,response = response.body()!!)
override fun onResponse(call: Call<Any>, response: Response<Any>) {
if (!response.isSuccessful()) {
_responseClose.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
} else {
_responseClose.value =
ResponseItemVO(isError = false, response = response.message())
}
}
}
})
})
}
}

View File

@ -19,6 +19,7 @@ import es.verdnatura.presentation.view.component.CustomDialog
import es.verdnatura.presentation.view.feature.sacador.adapter.CollectionAdapter
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
import es.verdnatura.presentation.view.feature.smarttag.sacador.fragment.AssociateSmartTagsFragment
import java.lang.Boolean.TRUE
class SacadorFragment :
@ -31,6 +32,7 @@ class SacadorFragment :
private var collectionsList: ArrayList<CollectionVO> = ArrayList()
private var adapter: CollectionAdapter? = null
private var resultTagMode:String? = ""
private var getCollections=false
companion object {
@ -48,17 +50,19 @@ class SacadorFragment :
override fun init() {
customDialog = CustomDialog(requireContext())
binding.splashProgress.visibility = View.VISIBLE
binding.splashProgress.visibility = View.GONE
binding.splashProgressTwo.visibility = View.GONE
binding.mainToolbar.toolbarTitle.text = getString(R.string.getcollection)
setToolBar()
setEvents()
// viewModel.smartTagInsertTicket("568672")
/*var working_in_test=false //sergio: Ok en app
if (!working_in_test) {*/
viewModel.collectionGetSalix(token = getData(TOKEN))
if (getCollections){
viewModel.collectionGetSalix(token = getData(TOKEN))
}
/* }else{
viewModel.collectionGet( getData(USER),
getData(PASSWORD),"collection_get")
@ -73,13 +77,17 @@ class SacadorFragment :
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
// Use the Kotlin extension in the fragment-ktx artifact
setFragmentResultListener("requestKey") { requestKey, bundle ->
val result = bundle.getString("tagMode")
resultTagMode=result
Log.d("VERDNATURA::","el result es "+result)
if (result.equals("complete")){
getCollections=TRUE
}
if (result.equals("complete") && getData(TAGSTYPE).equals("SmartTags")) {
Log.d("VERDNATURA::","Entramos a collectionNew_SMARTGS"+result)
viewModel.collection_new_smarttag(getData(USER),
getData(PASSWORD), getData(SECTORFK), getData(WAGON), getData(TAGSTYPE),"collection_new_wagon")
@ -98,10 +106,6 @@ class SacadorFragment :
val listIcons: ArrayList<ImageView> = ArrayList()
/*val iconAdd: Drawable =
resources.getDrawable(R.drawable.ic_add_black_24dp, resources.newTheme())
val iconVehicleIn: Drawable = resources.getDrawable(R.drawable.car, resources.newTheme())*/
val iconAdd = ImageView(context)
iconAdd.setImageResource(R.drawable.ic_add_black_24dp)
val iconVehicleIn = ImageView(context)
@ -228,6 +232,8 @@ class SacadorFragment :
} else {
ma.messageWithSound(it.errorMessage,false,false)
Log.d("VERDNATURA::","La colec es "+it.response)
viewModel.smartTagInsertTicket(it.response)
goBack = false}
})
@ -240,6 +246,7 @@ class SacadorFragment :
} else {
ma.messageWithSound(it.errorMessage,false,false)
viewModel.collectionGetSalix(getData(TOKEN))
}
goBack = false}
})

View File

@ -160,7 +160,8 @@ class SacadorViewModel(context: Context) : BaseViewModel() {
object :
Callback<String> {
override fun onFailure(call: Call<String>, t: Throwable) {
_responseCollectionSmarttag.value =
// _response.value=
_responseCollectionSmarttag.value =
ResponseItemVO(isError = true, errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
@ -171,11 +172,14 @@ class SacadorViewModel(context: Context) : BaseViewModel() {
response: Response<String>
) {
if (response.body() != null) {
_responseCollectionSmarttag.value =
Log.d("VERDNATURA::","LA coleccion de collectionNew_SMARTGS es "+response.body())
_responseCollectionSmarttag.value =
ResponseItemVO(isError = false, response = response.body()!!)
} else {
_responseCollectionSmarttag.value = ResponseItemVO(
_responseCollectionSmarttag.value =
ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message())
)

View File

@ -20,15 +20,15 @@ class TransferenciaViewModel(context: Context) : BaseViewModel() {
fun itemShelvingTransfer(usuario:String,password:String,itemFk:String,shelvingFk:String){
getUbicadorUserCase.itemShelvingTransfer(usuario,password,itemFk,shelvingFk).enqueue(object :
Callback<String> {
override fun onFailure(call: Call<String>, t: Throwable) {
Callback<Any> {
override fun onFailure(call: Call<Any>, t: Throwable) {
_response.value = ResponseItemVO(isError = true,errorMessage ="Error en llamada itemShelvingTransfer."+t.message!!)
}
override fun onResponse(call: Call<String>, response: Response<String>) {
override fun onResponse(call: Call<Any>, response: Response<Any>) {
if (response.body() == null){
_response.value = ResponseItemVO(isError = true,errorMessage = "Error en la llamada itemShelvingTransfer")
}else{
_response.value = ResponseItemVO(isError = false,response = response.body()!!)
_response.value = ResponseItemVO(isError = false,response = response.message()!!)
}
}
})

View File

@ -104,9 +104,6 @@ class AutomaticAddItemFragment(
binding.splashProgress.visibility = View.GONE
if (it.isError){
ma.messageWithSound(it.errorMessage,true,false)
/*customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
customDialog.dismiss()
}.show()*/
}else{
requireActivity().onBackPressed()
}

View File

@ -5,6 +5,8 @@ import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import es.verdnatura.domain.GetUbicadorUserCase
import es.verdnatura.presentation.base.BaseViewModel
import es.verdnatura.presentation.base.getMessageFromAllResponse
import es.verdnatura.presentation.base.nameofFunction
import es.verdnatura.presentation.common.ResponseItemVO
import retrofit2.Call
import retrofit2.Callback
@ -21,16 +23,18 @@ class AutomaticAddItemViewModel (context: Context): BaseViewModel() {
fun itemShelvingMake_multi(usuario:String,password:String,shelving:String,items:List<String>,warehouse:String){
getUbicadorUserCase.itemShelvingMake_multi(usuario,password,shelving,items,warehouse).enqueue(object :
Callback<String> {
override fun onFailure(call: Call<String>, t: Throwable) {
_response.value = ResponseItemVO(isError = true,errorMessage ="Error al guardar items itemShelvingMake."+t.message!!)
Callback<Any> {
override fun onFailure(call: Call<Any>, t: Throwable) {
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(
nameofFunction(this),t.message!!)
)
}
override fun onResponse(call: Call<String>, response: Response<String>) {
if (response.body() == null){
_response.value = ResponseItemVO(isError = true,errorMessage = "Error en la llamada itemShelvingMake multiple")
override fun onResponse(call: Call<Any>, response: Response<Any>) {
if (!response.isSuccessful){
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()!!))
}else{
_response.value = ResponseItemVO(isError = false,response = response.body()!!)
_response.value = ResponseItemVO(isError = false,response = response.message()!!)
}
}

View File

@ -1,7 +1,6 @@
package es.verdnatura.presentation.view.feature.ubicador.fragment
import android.content.Context
import android.content.SharedPreferences
import android.graphics.drawable.Drawable
import android.media.MediaPlayer
import android.os.Build
@ -73,7 +72,7 @@ class UbicadorFragment(
if (!shelvingFk.isNullOrEmpty()) {
binding.splashProgress.visibility = View.VISIBLE
binding.mainToolbar.toolbarTitle.text = shelvingFk
viewModel.itemShelvingList( getData(USER), getData(PASSWORD), shelvingFk, "itemShelvingList")
viewModel.itemShelvingList(getData(USER), getData(PASSWORD), shelvingFk)
}
super.init()
}
@ -99,7 +98,7 @@ class UbicadorFragment(
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
iconReload.tooltipText = getTooltip(R.drawable.ic_autorenew_black_24dp)
iconAdd.tooltipText = "Añade item al carro"
iconAdd.tooltipText = "Añade item al carro"
}
listIcons.add(iconAdd)
listIcons.add(iconReload)
@ -114,8 +113,7 @@ class UbicadorFragment(
viewModel.itemShelvingList(
getData(USER),
getData(PASSWORD),
shelvingFk,
"itemShelvingList"
shelvingFk
)
}
}
@ -148,8 +146,7 @@ class UbicadorFragment(
viewModel.itemShelvingList(
getData(USER),
getData(PASSWORD),
binding.editMatricula.text.toString(),
"itemShelvingList"
binding.editMatricula.text.toString()
)
}
@ -168,8 +165,7 @@ class UbicadorFragment(
getData(USER),
getData(PASSWORD),
binding.editPrioridad.text.toString(),
shelvingFk,
"shelvingPriority_update"
shelvingFk
)
}
@ -246,8 +242,7 @@ class UbicadorFragment(
getData(USER),
getData(PASSWORD),
shelvingFk,
customDialogInput.getValue(),
"shelvingChange"
customDialogInput.getValue()
)
shelvingFk = customDialogInput.getValue()
binding.mainToolbar.toolbarTitle.text =
@ -267,8 +262,7 @@ class UbicadorFragment(
getData(USER),
getData(PASSWORD),
shelvingFk,
customDialogInput.getValue(),
"shelvingChange"
customDialogInput.getValue()
)
shelvingFk = customDialogInput.getValue()
binding.mainToolbar.toolbarTitle.text =
@ -285,19 +279,21 @@ class UbicadorFragment(
binding.deleteImg.setOnClickListener {
customDialog.setTitle("Vaciar carro")
.setDescription("Esta operación no se puede rectificar.").setOkButton("Vaciar") {
viewModel.clearShelvingList(getData(USER),
getData(PASSWORD), shelvingFk, "clearShelvingList")
listItems.forEach {
it.stickers = "0"
it.visible = "0"
}
if (adapter != null) {
adapter!!.notifyDataSetChanged()
}
customDialog.dismiss()
}.setKoButton("Cancelar") {
customDialog.dismiss()
}.show()
viewModel.clearShelvingList(
getData(USER),
getData(PASSWORD), shelvingFk
)
listItems.forEach {
it.stickers = "0"
it.visible = "0"
}
if (adapter != null) {
adapter!!.notifyDataSetChanged()
}
customDialog.dismiss()
}.setKoButton("Cancelar") {
customDialog.dismiss()
}.show()
}
@ -306,14 +302,16 @@ class UbicadorFragment(
private fun setTooltips() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
binding.editImg.tooltipText="Permite cambiar la matrícula al carro"
binding.deleteImg.tooltipText="Borra todos los items del carro"
binding.editPrioridad.tooltipText="Cambia la prioridad de los items del carro. Cuanto más alta antes cogerán los sacadores."
binding.parkingImg.tooltipText="Permite aparcar el carro"
binding.automaticImg.tooltipText="Permite añadir items al carro de manera continuada. No uno a uno"
binding.editImg.tooltipText = "Permite cambiar la matrícula al carro"
binding.deleteImg.tooltipText = "Borra todos los items del carro"
binding.editPrioridad.tooltipText =
"Cambia la prioridad de los items del carro. Cuanto más alta antes cogerán los sacadores."
binding.parkingImg.tooltipText = "Permite aparcar el carro"
binding.automaticImg.tooltipText =
"Permite añadir items al carro de manera continuada. No uno a uno"
}
}
}
override fun observeViewModel() {
with(viewModel) {
@ -376,39 +374,44 @@ class UbicadorFragment(
response.observe(viewLifecycleOwner, Observer {
if (it.isError) {
ma.messageWithSound(it.errorMessage,it.isError,false)
if (it.isError) {
ma.messageWithSound(it.errorMessage, it.isError, false)
/* mperror!!.start()
customDialog.setTitle("Error").setDescription(it.errorMessage)
.setOkButton("Cerrar") {
customDialog.dismiss()
}.show()*/
/* mperror!!.start()
customDialog.setTitle("Error").setDescription(it.errorMessage)
.setOkButton("Cerrar") {
customDialog.dismiss()
}.show()*/
}
})
responsepriority.observe(viewLifecycleOwner, Observer {
ma.messageWithSound(
if (it.isError) it.errorMessage else{it.response},it.isError,true)
if (it.isError) it.errorMessage else {
it.response
}, it.isError, true
)
/* if (it.isError) {
mperror!!.start()
customDialog.setTitle("Error").setDescription(it.errorMessage)
.setOkButton("Cerrar") {
customDialog.dismiss()
}.show()
} else {
(it.response).toast(requireContext())
}*/
/* if (it.isError) {
mperror!!.start()
customDialog.setTitle("Error").setDescription(it.errorMessage)
.setOkButton("Cerrar") {
customDialog.dismiss()
}.show()
} else {
(it.response).toast(requireContext())
}*/
})
responseMake.observe(viewLifecycleOwner, Observer {
if (!shelvingFk.isNullOrEmpty()) {
binding.splashProgress.visibility = View.VISIBLE
binding.mainToolbar.toolbarTitle.text = shelvingFk
viewModel.itemShelvingList(getData(USER),
getData(PASSWORD), shelvingFk, "itemShelvingList")
viewModel.itemShelvingList(
getData(USER),
getData(PASSWORD), shelvingFk
)
}
})
}
@ -442,8 +445,8 @@ class UbicadorFragment(
customDialogUbicador.getGroupingValue()
)
}.setKoButton("Cerrar") {
customDialogUbicador.dismiss()
}.show()
customDialogUbicador.dismiss()
}.show()
customDialogUbicador.getEditItem().requestFocus()
ma.hideKeyboard(customDialogUbicador.getEditItem())
@ -576,7 +579,6 @@ class UbicadorFragment(
getData(WAREHOUSEFK),
"1",
itemShelvingFk,
"itemShelvingMakeEdit",
groupingPack
)
changeOfflineValue(
@ -609,7 +611,6 @@ class UbicadorFragment(
getData(WAREHOUSEFK),
"1",
itemShelvingFk,
"itemShelvingMakeEdit",
groupingPack
)
changeOfflineValue(
@ -679,8 +680,7 @@ class UbicadorFragment(
getData(USER),
getData(PASSWORD),
item.id,
customDialogInput.getValue(),
"itemShelvingTransfer"
customDialogInput.getValue()
)
listItems.remove(item)
adapter!!.notifyDataSetChanged()
@ -691,8 +691,8 @@ class UbicadorFragment(
}.setKoButton("Cancelar") {
customDialogInput.dismiss()
}.show()
customDialogInput.dismiss()
}.show()
customDialogInput.getEditText().requestFocus()
ma.hideKeyboard(customDialogInput.getEditText())
customDialogInput.getEditText().setOnEditorActionListener { v, actionId, event ->
@ -701,8 +701,7 @@ class UbicadorFragment(
getData(USER),
getData(PASSWORD),
item.id,
customDialogInput.getValue(),
"itemShelvingTransfer"
customDialogInput.getValue()
)
listItems.remove(item)
adapter!!.notifyDataSetChanged()
@ -713,22 +712,24 @@ class UbicadorFragment(
}
customDialogTwoButtons.dismiss()
}.setOkButtonTwo("Eliminar") {
customDialog.setTitle("Confirmar")
.setDescription("Confirmas eliminar el artículo: " + item.item + "?")
.setOkButton("Eliminar") {
listItems.remove(item)
adapter!!.notifyDataSetChanged()
viewModel.itemShelvingDelete(getData(USER),
getData(PASSWORD), item.id, "itemShelvingDelete")
customDialogTwoButtons.dismiss()
customDialog.dismiss()
}.setKoButton("Cancelar") {
customDialog.dismiss()
customDialog.setTitle("Confirmar")
.setDescription("Confirmas eliminar el artículo: " + item.item + "?")
.setOkButton("Eliminar") {
listItems.remove(item)
adapter!!.notifyDataSetChanged()
viewModel.itemShelvingDelete(
getData(USER),
getData(PASSWORD), item.id
)
customDialogTwoButtons.dismiss()
customDialog.dismiss()
}.setKoButton("Cancelar") {
customDialog.dismiss()
customDialogTwoButtons.dismiss()
}.show()
}.setKoButton("Cancelar") {
customDialogTwoButtons.dismiss()
}.show()
}.setKoButton("Cancelar") {
customDialogTwoButtons.dismiss()
}.show()
}
}

View File

@ -41,68 +41,131 @@ class UbicadorViewModel(context: Context) : BaseViewModel() {
val loadShelvingList = Transformations.map(_shelvingList) { Event(it) }
fun itemShelvingList(usuario:String,password:String,vShelvingFk:String,callFunction:String){
getUbicadorUserCase.itemShelvingList(usuario,password,vShelvingFk.uppercase()).enqueue(object :
Callback<List<ItemUbicadorVO>> {
override fun onFailure(call: Call<List<ItemUbicadorVO>>, t: Throwable) {
val listError:ArrayList<ItemUbicadorVO> = ArrayList()
listError.add(ItemUbicadorVO(isError = true,errorMessage =getMessageFromAllResponse(nameofFunction(this),t.message!!)))
_shelvingList.value = ItemUbicadorListVO(listError)
}
override fun onResponse(
call: Call<List<ItemUbicadorVO>>,
response: Response<List<ItemUbicadorVO>>
) {
if (response.body() != null){
_shelvingList.value = response.body()?.let { ItemUbicadorListVO(it) }
}else{
val listError:ArrayList<ItemUbicadorVO> = ArrayList()
listError.add(ItemUbicadorVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message())))
fun itemShelvingList(
usuario: String,
password: String,
vShelvingFk: String
) {
getUbicadorUserCase.itemShelvingList(usuario, password, vShelvingFk.uppercase())
.enqueue(object :
Callback<List<ItemUbicadorVO>> {
override fun onFailure(call: Call<List<ItemUbicadorVO>>, t: Throwable) {
val listError: ArrayList<ItemUbicadorVO> = ArrayList()
listError.add(
ItemUbicadorVO(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
t.message!!
)
)
)
_shelvingList.value = ItemUbicadorListVO(listError)
}
}
})
override fun onResponse(
call: Call<List<ItemUbicadorVO>>,
response: Response<List<ItemUbicadorVO>>
) {
if (response.body() != null) {
_shelvingList.value = response.body()?.let { ItemUbicadorListVO(it) }
} else {
val listError: ArrayList<ItemUbicadorVO> = ArrayList()
listError.add(
ItemUbicadorVO(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
)
_shelvingList.value = ItemUbicadorListVO(listError)
}
}
})
}
fun shelvingPriorityUpdate(usuario:String,password:String,priority:String,shelving:String,callFunction:String){
getUbicadorUserCase.shelvingPriorityUpdate(usuario,password,priority,shelving).enqueue(object : Callback<String>{
override fun onFailure(call: Call<String>, t: Throwable) {
_responsepriority.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
}
fun shelvingPriorityUpdate(
usuario: String,
password: String,
priority: String,
shelving: String
override fun onResponse(call: Call<String>, response: Response<String>) {
) {
getUbicadorUserCase.shelvingPriorityUpdate(usuario, password, priority, shelving)
.enqueue(object : Callback<Any> {
override fun onFailure(call: Call<Any>, t: Throwable) {
_responsepriority.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
if (!response.isSuccessful){
_responsepriority.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
}else{
_responsepriority.value = ResponseItemVO(isError = false,response = "Prioridad modificada")
}
override fun onResponse(call: Call<Any>, response: Response<Any>) {
/*if (response.body() == null){
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
}else{
_response.value = ResponseItemVO(isError = false,response = response.body()!!)
}*/
if (!response.isSuccessful) {
_responsepriority.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
} else {
_responsepriority.value =
ResponseItemVO(isError = false, response = "Prioridad modificada")
}
}
}
})
})
}
fun itemShelvingMake(usuario:String,password:String,shelving:String,item:String,deep:String,quantity:String,packing:String,warehouse:String,level:String,callFunction:String,grouping: String){
getUbicadorUserCase.itemShelvingMake(usuario,password,shelving,item,quantity,packing,warehouse,grouping).enqueue(object : Callback<String>{
override fun onFailure(call: Call<String>, t: Throwable) {
_responseMake.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
fun itemShelvingMake(
usuario: String,
password: String,
shelving: String,
item: String,
deep: String,
quantity: String,
packing: String,
warehouse: String,
level: String,
callFunction: String,
grouping: String
) {
getUbicadorUserCase.itemShelvingMake(
usuario,
password,
shelving,
item,
quantity,
packing,
warehouse,
grouping
).enqueue(object : Callback<Any> {
override fun onFailure(call: Call<Any>, t: Throwable) {
_responseMake.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
override fun onResponse(call: Call<String>, response: Response<String>) {
if (response.body() == null){
_responseMake.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
}else{
_responseMake.value = ResponseItemVO(isError = false,response = response.body()!!)
override fun onResponse(call: Call<Any>, response: Response<Any>) {
if (!response.isSuccessful) {
_responseMake.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
} else {
_responseMake.value =
ResponseItemVO(isError = false, response = response.message()!!)
}
}
@ -110,17 +173,51 @@ class UbicadorViewModel(context: Context) : BaseViewModel() {
})
}
fun itemShelvingMakeEdit(usuario:String,password:String,shelving:String,item:String,deep:String,quantity:String,packing:String,warehouse:String,level:String,itemShelvingFk:String,callFunction:String,grouping:String){
getUbicadorUserCase.itemShelvingMakeEdit(usuario,password,shelving,item,deep,quantity,packing,warehouse,level,itemShelvingFk,grouping).enqueue(object : Callback<String>{
override fun onFailure(call: Call<String>, t: Throwable) {
_responseMake.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
fun itemShelvingMakeEdit(
usuario: String,
password: String,
shelving: String,
item: String,
deep: String,
quantity: String,
packing: String,
warehouse: String,
level: String,
itemShelvingFk: String,
grouping: String
) {
getUbicadorUserCase.itemShelvingMakeEdit(
usuario,
password,
shelving,
item,
deep,
quantity,
packing,
warehouse,
level,
itemShelvingFk,
grouping
).enqueue(object : Callback<Any> {
override fun onFailure(call: Call<Any>, t: Throwable) {
_responseMake.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
override fun onResponse(call: Call<String>, response: Response<String>) {
if (response.body() == null){
_responseMake.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
}else{
_responseMake.value = ResponseItemVO(isError = false,response = response.body()!!)
override fun onResponse(call: Call<Any>, response: Response<Any>) {
if (!response.isSuccessful) {
_responseMake.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
} else {
_responseMake.value =
ResponseItemVO(isError = false, response = response.message()!!)
}
}
@ -128,79 +225,161 @@ class UbicadorViewModel(context: Context) : BaseViewModel() {
})
}
fun shelvingPark(usuario:String,password:String,shelving:String,parking:String,callFunction:String){
getUbicadorUserCase.shelvingPark(usuario,password,shelving,parking).enqueue(object : Callback<String>{
override fun onFailure(call: Call<String>, t: Throwable) {
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
}
override fun onResponse(call: Call<String>, response: Response<String>) {
if (response.body() == null){
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
}else{
_response.value = ResponseItemVO(isError = false,response = response.body()!!)
fun shelvingPark(
usuario: String,
password: String,
shelving: String,
parking: String,
callFunction: String
) {
getUbicadorUserCase.shelvingPark(usuario, password, shelving, parking)
.enqueue(object : Callback<String> {
override fun onFailure(call: Call<String>, t: Throwable) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
}
})
override fun onResponse(call: Call<String>, response: Response<String>) {
if (response.body() == null) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
} else {
_response.value =
ResponseItemVO(isError = false, response = response.body()!!)
}
}
})
}
fun shelvingChange(usuario:String,password:String,origen:String,destino:String,callFunction:String){
getUbicadorUserCase.shelvingChange(usuario,password,origen,destino).enqueue(object : Callback<String>{
override fun onFailure(call: Call<String>, t: Throwable) {
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
}
override fun onResponse(call: Call<String>, response: Response<String>) {
if (response.body() == null){
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
}else{
_response.value = ResponseItemVO(isError = false,response = response.body()!!)
fun shelvingChange(
usuario: String,
password: String,
origen: String,
destino: String
) {
getUbicadorUserCase.shelvingChange(usuario, password, origen, destino)
.enqueue(object : Callback<Any> {
override fun onFailure(call: Call<Any>, t: Throwable) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
}
})
override fun onResponse(call: Call<Any>, response: Response<Any>) {
if (response.body() == null) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
} else {
_response.value =
ResponseItemVO(isError = false, response = response.message()!!)
}
}
})
}
fun clearShelvingList(usuario:String,password:String,shelvingFk:String,callFunction:String){
getUbicadorUserCase.clearShelvingList(usuario,password,shelvingFk).enqueue(object : Callback<String>{
override fun onFailure(call: Call<String>, t: Throwable) {
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
}
override fun onResponse(call: Call<String>, response: Response<String>) {
if (response.body() == null){
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
}else{
_response.value = ResponseItemVO(isError = false,response = response.body()!!)
fun clearShelvingList(
usuario: String,
password: String,
shelvingFk: String
) {
getUbicadorUserCase.clearShelvingList(usuario, password, shelvingFk)
.enqueue(object : Callback<Any> {
override fun onFailure(call: Call<Any>, t: Throwable) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
}
})
override fun onResponse(call: Call<Any>, response: Response<Any>) {
if (!response.isSuccessful) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
} else {
_response.value =
ResponseItemVO(isError = false, response = response.message())
}
}
})
}
fun itemShelvingTransfer(usuario:String,password:String,itemFk:String,shelvingFk:String,callFunction:String){
getUbicadorUserCase.itemShelvingTransfer(usuario,password,itemFk,shelvingFk).enqueue(object : Callback<String>{
override fun onFailure(call: Call<String>, t: Throwable) {
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
}
override fun onResponse(call: Call<String>, response: Response<String>) {
if (response.body() == null){
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
}else{
_response.value = ResponseItemVO(isError = false,response = response.body()!!)
fun itemShelvingTransfer(
usuario: String,
password: String,
itemFk: String,
shelvingFk: String
) {
getUbicadorUserCase.itemShelvingTransfer(usuario, password, itemFk, shelvingFk)
.enqueue(object : Callback<Any> {
override fun onFailure(call: Call<Any>, t: Throwable) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
}
})
override fun onResponse(call: Call<Any>, response: Response<Any>) {
if (response.body() == null) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
} else {
_response.value =
ResponseItemVO(isError = false, response = response.message()!!)
}
}
})
}
fun itemShelvingDelete(usuario:String,password:String,itemFk:String,callFunction:String){
getUbicadorUserCase.itemShelvingDelete(usuario,password,itemFk).enqueue(object : Callback<String>{
override fun onFailure(call: Call<String>, t: Throwable) {
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
}
override fun onResponse(call: Call<String>, response: Response<String>) {
if (response.body() == null){
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
}else{
_response.value = ResponseItemVO(isError = false,response = response.body()!!)
fun itemShelvingDelete(usuario: String, password: String, itemFk: String) {
getUbicadorUserCase.itemShelvingDelete(usuario, password, itemFk)
.enqueue(object : Callback<Any> {
override fun onFailure(call: Call<Any>, t: Throwable) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
}
})
override fun onResponse(call: Call<Any>, response: Response<Any>) {
if (!response.isSuccessful) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
} else {
_response.value =
ResponseItemVO(isError = false, response = response.message())
}
}
})
}
}

View File

@ -12,20 +12,19 @@
<EditText
android:id="@+id/scan_input"
style="@style/ScanLineTextSearch"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="@android:color/white"
android:hint="@string/Escaner"
android:inputType="text"
android:lines="1"
android:maxLines="1"
android:textColor="@color/verdnatura_white"
android:textColorHint="@android:color/darker_gray"
android:textSize="@dimen/body2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/main_toolbar"
android:paddingLeft="@dimen/default_layout_margin"/>
app:layout_constraintTop_toTopOf="@+id/main_toolbar"/>
@ -33,6 +32,7 @@
android:id="@+id/collection_swipe"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="5dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"

View File

@ -35,9 +35,9 @@
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/scan_input"
style="@style/InputLineTextSearch"
style="@style/ScanLineTextSearch"
android:layout_width="match_parent"
android:backgroundTint="@android:color/white"
android:hint="@string/Escaneaetiqueta"
android:inputType="text"
android:lines="1"

View File

@ -224,7 +224,7 @@
android:layout_marginEnd="@dimen/layout_margin_min"
android:text="@{sale.pickedQuantity}"
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body2"
android:textSize="@dimen/body1"
android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@+id/txtde"
app:layout_constraintTop_toTopOf="parent"
@ -237,7 +237,7 @@
android:layout_marginEnd="@dimen/layout_margin_min"
android:text="@string/de"
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body2"
android:textSize="@dimen/body1"
app:layout_constraintEnd_toStartOf="@+id/item_article_quantity"
app:layout_constraintTop_toTopOf="parent" />
@ -250,7 +250,7 @@
android:paddingRight="10dp"
android:text="@{sale.quantity}"
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body2"
android:textSize="@dimen/body1"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"

View File

@ -163,4 +163,5 @@
<string name="Selecccionaimpresoara">Selecciona impresora</string>
<string name="claim">Ubicación de reclamación</string>
<string name="claims">Reclamaciones</string>
<string name="scanPallet">Escáner paletizar</string>
</resources>

View File

@ -135,6 +135,7 @@
<string name="ExpeditionState">Expedtion state</string>
<string name="BuffersManegement">Buffer Management</string>
<string name="PalletMake">Pallet make</string>
<string name="scanPallet">Scan pallet</string>
<string name="bufferempty">Buffer empty</string>
<string name="bufferfill">Buffer fill</string>
<string name="bufferaccumulate">Buffer Acumulate</string>