Version 8.4.1Beta, strings y return finish
This commit is contained in:
parent
43350c66d6
commit
575bfd06be
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="deploymentTargetDropDown">
|
||||||
|
<runningDeviceTargetSelectedWithDropDown>
|
||||||
|
<Target>
|
||||||
|
<type value="RUNNING_DEVICE_TARGET" />
|
||||||
|
<deviceKey>
|
||||||
|
<Key>
|
||||||
|
<type value="SERIAL_NUMBER" />
|
||||||
|
<value value="21114523025303" />
|
||||||
|
</Key>
|
||||||
|
</deviceKey>
|
||||||
|
</Target>
|
||||||
|
</runningDeviceTargetSelectedWithDropDown>
|
||||||
|
<timeTargetWasSelectedWithDropDown value="2022-05-27T04:55:50.268970300Z" />
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -1,6 +1,5 @@
|
||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
//apply plugin: 'kotlin-android-extensions'//deprecated:sergio
|
|
||||||
apply plugin: 'kotlin-kapt'
|
apply plugin: 'kotlin-kapt'
|
||||||
apply plugin: 'com.google.gms.google-services'
|
apply plugin: 'com.google.gms.google-services'
|
||||||
//apply plugin: 'com.google.firebase.crashlytics'
|
//apply plugin: 'com.google.firebase.crashlytics'
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
"type": "SINGLE",
|
"type": "SINGLE",
|
||||||
"filters": [],
|
"filters": [],
|
||||||
"attributes": [],
|
"attributes": [],
|
||||||
"versionCode": 117,
|
"versionCode": 118,
|
||||||
"versionName": "8.4Beta",
|
"versionName": "8.4.1Beta",
|
||||||
"outputFile": "app-release.apk"
|
"outputFile": "app-release.apk"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
Binary file not shown.
|
@ -1,5 +1,8 @@
|
||||||
package es.verdnatura.domain
|
package es.verdnatura.domain
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.util.Log.d
|
||||||
|
import androidx.preference.PreferenceManager
|
||||||
import retrofit2.Retrofit
|
import retrofit2.Retrofit
|
||||||
import retrofit2.converter.gson.GsonConverterFactory
|
import retrofit2.converter.gson.GsonConverterFactory
|
||||||
|
|
||||||
|
@ -8,11 +11,30 @@ class ApiSalixUtils {
|
||||||
//const val BASE_URL:String = "http://192.168.1.155:9009/"
|
//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/"
|
const val BASE_URL: String = "https://salix.verdnatura.es/api/"
|
||||||
fun getApiService(): SalixService {
|
|
||||||
val salixRetrofit = Retrofit.Builder().baseUrl(BASE_URL).addConverterFactory(
|
fun getApiService(context: Context): SalixService {
|
||||||
|
val salixRetrofit = Retrofit.Builder().baseUrl(getBaseUrlLocal(context = context)).addConverterFactory(
|
||||||
GsonConverterFactory.create()
|
GsonConverterFactory.create()
|
||||||
).build()
|
).build()
|
||||||
|
d("VERDNATURA::","El server Salix es "+getBaseUrlLocal(context = context))
|
||||||
return salixRetrofit.create(SalixService::class.java)
|
return salixRetrofit.create(SalixService::class.java)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun getBaseUrlLocal(context: Context): String {
|
||||||
|
var url = this.getDefaults("base_urlSalix", context)
|
||||||
|
if (url.isNullOrEmpty()) {
|
||||||
|
ApiUtils.setDefaults("base_urlSalix", ApiSalixUtils.BASE_URL, context)
|
||||||
|
} else {
|
||||||
|
if (!url.contains("http")) {
|
||||||
|
url = "https://" + url
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return if (url.isNullOrEmpty()) ApiSalixUtils.BASE_URL else url
|
||||||
|
}
|
||||||
|
|
||||||
|
fun getDefaults(key: String?, context: Context?): String? {
|
||||||
|
val preferences = PreferenceManager.getDefaultSharedPreferences(context)
|
||||||
|
return preferences.getString(key, null)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -50,7 +50,7 @@ class GetDayOfSaleUSerCase(context: Context) : RestClient(context) {
|
||||||
password: String,
|
password: String,
|
||||||
shelving: String,
|
shelving: String,
|
||||||
parking: String
|
parking: String
|
||||||
): Call<String> {
|
): Call<Any> {
|
||||||
val params: ArrayList<String> = ArrayList()
|
val params: ArrayList<String> = ArrayList()
|
||||||
params.add(shelving)
|
params.add(shelving)
|
||||||
params.add(parking)
|
params.add(parking)
|
||||||
|
|
|
@ -129,7 +129,7 @@ class GetUbicadorUserCase(context: Context) : RestClient(context) {
|
||||||
password: String,
|
password: String,
|
||||||
shelving: String,
|
shelving: String,
|
||||||
parking: String
|
parking: String
|
||||||
): Call<String> {
|
): Call<Any> {
|
||||||
val params: ArrayList<String> = ArrayList()
|
val params: ArrayList<String> = ArrayList()
|
||||||
params.add(shelving)
|
params.add(shelving)
|
||||||
params.add(parking)
|
params.add(parking)
|
||||||
|
|
|
@ -9,7 +9,7 @@ open class RestClient(context: Context) {
|
||||||
|
|
||||||
init {
|
init {
|
||||||
restClient = ApiUtils.getApiService(context)
|
restClient = ApiUtils.getApiService(context)
|
||||||
salixClient = ApiSalixUtils.getApiService()
|
salixClient = ApiSalixUtils.getApiService(context)
|
||||||
nodejsClient = ApiNodeJsUtils.getApiService()
|
nodejsClient = ApiNodeJsUtils.getApiService()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1011,7 +1011,7 @@ interface VerdnaturaService {
|
||||||
@Header("Content-Type") content_type: String,
|
@Header("Content-Type") content_type: String,
|
||||||
@Body params: List<String>
|
@Body params: List<String>
|
||||||
):
|
):
|
||||||
Call<String>
|
Call<Any>
|
||||||
|
|
||||||
@POST("almacennew/shelvingChange")//REVISADA
|
@POST("almacennew/shelvingChange")//REVISADA
|
||||||
fun shelvingChange(
|
fun shelvingChange(
|
||||||
|
|
|
@ -249,6 +249,11 @@ override fun onViewCreated(view: View, savedInstanceState: Bundle?)
|
||||||
R.drawable.alpha_b_circle_outline->getString(R.string.showTrash)
|
R.drawable.alpha_b_circle_outline->getString(R.string.showTrash)
|
||||||
|
|
||||||
R.drawable.filter_outline->getString(R.string.filterFlower)
|
R.drawable.filter_outline->getString(R.string.filterFlower)
|
||||||
|
|
||||||
|
R.drawable.ic_mode_edit_black_24dp->getString(R.string.allowChangeShelving)
|
||||||
|
R.drawable.ic_delete_forever_black_24dp->getString(R.string.deleteAllitems)
|
||||||
|
R.drawable.ic_flash_auto_black_24dp->getString(R.string.allowAutomaticAddItem)
|
||||||
|
|
||||||
else -> {""}
|
else -> {""}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -364,7 +369,7 @@ override fun onViewCreated(view: View, savedInstanceState: Bundle?)
|
||||||
val listo = getMatch(text, "listo")
|
val listo = getMatch(text, "listo")
|
||||||
|
|
||||||
//check for cancelar
|
//check for cancelar
|
||||||
val cancelar = getMatch(text, "cancelar")
|
val cancelar = getMatch(text, getString(R.string.cancel))
|
||||||
|
|
||||||
//check for volver
|
//check for volver
|
||||||
val volver = getMatch(text, "volver")
|
val volver = getMatch(text, "volver")
|
||||||
|
@ -575,6 +580,12 @@ override fun onViewCreated(view: View, savedInstanceState: Bundle?)
|
||||||
editorPref.commit()
|
editorPref.commit()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
"base_urlSalix"->{
|
||||||
|
val preferences = PreferenceManager.getDefaultSharedPreferences(context)
|
||||||
|
val editorPref = preferences.edit()
|
||||||
|
editorPref.putString("base_urlSalix", value)
|
||||||
|
editorPref.commit()
|
||||||
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
editor.putString(name, value)
|
editor.putString(name, value)
|
||||||
|
|
|
@ -179,7 +179,7 @@ class ItemCardFragment(
|
||||||
this.itemFk = itemFk
|
this.itemFk = itemFk
|
||||||
|
|
||||||
binding.splashProgressTwo.visibility = View.VISIBLE
|
binding.splashProgressTwo.visibility = View.VISIBLE
|
||||||
viewModel.getItemCard(itemFk, warehouseFk, user, password, "item_card")
|
viewModel.getItemCard(itemFk, warehouseFk, user, password)
|
||||||
binding.splashProgress.visibility = View.VISIBLE
|
binding.splashProgress.visibility = View.VISIBLE
|
||||||
|
|
||||||
|
|
||||||
|
@ -409,12 +409,12 @@ class ItemCardFragment(
|
||||||
if (item.action != "toBarcode" && item.action != "buscarItem" && item.action != "itemStockUpdateAdd" && item.action != "itemStockUpdateRemove") {
|
if (item.action != "toBarcode" && item.action != "buscarItem" && item.action != "itemStockUpdateAdd" && item.action != "itemStockUpdateRemove") {
|
||||||
customDialogInput.setTitle(item.title!!)
|
customDialogInput.setTitle(item.title!!)
|
||||||
.setDescription("Valor actual: " + item.value!!)
|
.setDescription("Valor actual: " + item.value!!)
|
||||||
.setOkButton("Guardar") {
|
.setOkButton(getString(R.string.save)) {
|
||||||
ma.hideKeyboard(customDialogInput.getEditText())
|
ma.hideKeyboard(customDialogInput.getEditText())
|
||||||
editItemCardRow(item, customDialogInput.getValue())
|
editItemCardRow(item, customDialogInput.getValue())
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
|
|
||||||
}.setKoButton("Cancelar") {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
ma.hideKeyboard(customDialogInput.getEditText())
|
ma.hideKeyboard(customDialogInput.getEditText())
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
}.setValue("").show()
|
}.setValue("").show()
|
||||||
|
@ -443,12 +443,12 @@ class ItemCardFragment(
|
||||||
} else if (item.action == "itemStockUpdateAdd") {
|
} else if (item.action == "itemStockUpdateAdd") {
|
||||||
customDialogInput.setTitle(item.title!!)
|
customDialogInput.setTitle(item.title!!)
|
||||||
.setDescription("Indica la cantidad a dar de alta")
|
.setDescription("Indica la cantidad a dar de alta")
|
||||||
.setOkButton("Guardar") {
|
.setOkButton(getString(R.string.save)) {
|
||||||
ma.hideKeyboard(customDialogInput.getEditText())
|
ma.hideKeyboard(customDialogInput.getEditText())
|
||||||
editItemCardRow(item, customDialogInput.getValue())
|
editItemCardRow(item, customDialogInput.getValue())
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
|
|
||||||
}.setKoButton("Cancelar") {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
ma.hideKeyboard(customDialogInput.getEditText())
|
ma.hideKeyboard(customDialogInput.getEditText())
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
}.setValue("").show()
|
}.setValue("").show()
|
||||||
|
@ -468,12 +468,12 @@ class ItemCardFragment(
|
||||||
} else if (item.action == "itemStockUpdateRemove") {
|
} else if (item.action == "itemStockUpdateRemove") {
|
||||||
customDialogInput.setTitle(item.title!!)
|
customDialogInput.setTitle(item.title!!)
|
||||||
.setDescription("Indica la cantidad a dar de baja ")
|
.setDescription("Indica la cantidad a dar de baja ")
|
||||||
.setOkButton("Guardar") {
|
.setOkButton(getString(R.string.save)) {
|
||||||
ma.hideKeyboard(customDialogInput.getEditText())
|
ma.hideKeyboard(customDialogInput.getEditText())
|
||||||
editItemCardRow(item, customDialogInput.getValue())
|
editItemCardRow(item, customDialogInput.getValue())
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
|
|
||||||
}.setKoButton("Cancelar") {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
ma.hideKeyboard(customDialogInput.getEditText())
|
ma.hideKeyboard(customDialogInput.getEditText())
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
}.setValue("").show()
|
}.setValue("").show()
|
||||||
|
@ -530,30 +530,26 @@ class ItemCardFragment(
|
||||||
user = user,
|
user = user,
|
||||||
password = password,
|
password = password,
|
||||||
value = value,
|
value = value,
|
||||||
warehouseFk = warehouseFk,
|
warehouseFk = warehouseFk
|
||||||
"buy_updateGrouping"
|
|
||||||
)
|
)
|
||||||
"updatePacking" -> viewModel.updatePacking(
|
"updatePacking" -> viewModel.updatePacking(
|
||||||
itemFk = itemFk,
|
itemFk = itemFk,
|
||||||
user = user,
|
user = user,
|
||||||
password = password,
|
password = password,
|
||||||
value = value,
|
value = value,
|
||||||
warehouseFk = warehouseFk,
|
warehouseFk = warehouseFk
|
||||||
"buy_updatePacking"
|
|
||||||
)
|
)
|
||||||
"itemSaveMin" -> viewModel.itemSaveMin(
|
"itemSaveMin" -> viewModel.itemSaveMin(
|
||||||
itemFk = itemFk,
|
itemFk = itemFk,
|
||||||
user = user,
|
user = user,
|
||||||
password = password,
|
password = password,
|
||||||
value = value,
|
value = value
|
||||||
"itemSaveMin"
|
|
||||||
)
|
)
|
||||||
"item_saveReference" -> viewModel.item_saveReference(
|
"item_saveReference" -> viewModel.item_saveReference(
|
||||||
itemFk = itemFk,
|
itemFk = itemFk,
|
||||||
user = user,
|
user = user,
|
||||||
password = password,
|
password = password,
|
||||||
value = value,
|
value = value
|
||||||
"item_saveReference"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -603,7 +599,7 @@ class ItemCardFragment(
|
||||||
changeOfflineValue(itemB,value, listBarcodes)
|
changeOfflineValue(itemB,value, listBarcodes)
|
||||||
customDialogTwo.dismiss()
|
customDialogTwo.dismiss()
|
||||||
|
|
||||||
}.setKoButton("Cancelar"){
|
}.setKoButton(getString(R.string.cancel)){
|
||||||
|
|
||||||
customDialogTwo.dismiss()
|
customDialogTwo.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
|
@ -613,7 +609,7 @@ class ItemCardFragment(
|
||||||
}
|
}
|
||||||
}catch (e:Exception){
|
}catch (e:Exception){
|
||||||
binding.itemcardLayout.visibility = View.GONE
|
binding.itemcardLayout.visibility = View.GONE
|
||||||
customDialog.setTitle(getString(R.string.error)).setDescription("El elemento introducido no es un número").setKoButton("Cancelar"){
|
customDialog.setTitle(getString(R.string.error)).setDescription("El elemento introducido no es un número").setKoButton(getString(R.string.cancel)){
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
}
|
}
|
||||||
|
@ -654,7 +650,7 @@ class ItemCardFragment(
|
||||||
showProgress()
|
showProgress()
|
||||||
customDialogTwo.dismiss()
|
customDialogTwo.dismiss()
|
||||||
|
|
||||||
}.setKoButton("Cancelar") {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
|
|
||||||
customDialogTwo.dismiss()
|
customDialogTwo.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
|
@ -680,7 +676,7 @@ class ItemCardFragment(
|
||||||
|
|
||||||
private fun prepareBarcodeDialog(itemB: ItemCardRowVO) {
|
private fun prepareBarcodeDialog(itemB: ItemCardRowVO) {
|
||||||
|
|
||||||
customDialogList.setTitle("Barcodes").setOkButton("Guardar") {
|
customDialogList.setTitle("Barcodes").setOkButton(getString(R.string.save)) {
|
||||||
ma.hideKeyboard(customDialogList.getEditText())
|
ma.hideKeyboard(customDialogList.getEditText())
|
||||||
if (!customDialogList.getValue().isNullOrEmpty())
|
if (!customDialogList.getValue().isNullOrEmpty())
|
||||||
updateBarcode(customDialogList.getValue(), "0", itemB)
|
updateBarcode(customDialogList.getValue(), "0", itemB)
|
||||||
|
|
|
@ -40,8 +40,8 @@ class ItemCardViewModel(context: Context) : BaseViewModel() {
|
||||||
itemFk: String,
|
itemFk: String,
|
||||||
warehouseFk: String,
|
warehouseFk: String,
|
||||||
user: String,
|
user: String,
|
||||||
password: String,
|
password: String
|
||||||
callFunction: String
|
|
||||||
) {
|
) {
|
||||||
getItemCardUserCase.getItemCard(user, password, itemFk, warehouseFk)
|
getItemCardUserCase.getItemCard(user, password, itemFk, warehouseFk)
|
||||||
.enqueue(object : Callback<ItemCardVO> {
|
.enqueue(object : Callback<ItemCardVO> {
|
||||||
|
@ -80,8 +80,7 @@ class ItemCardViewModel(context: Context) : BaseViewModel() {
|
||||||
vShipped: String,
|
vShipped: String,
|
||||||
vIsShowedByType: String,
|
vIsShowedByType: String,
|
||||||
user: String,
|
user: String,
|
||||||
password: String,
|
password: String
|
||||||
callFunction: String
|
|
||||||
) {
|
) {
|
||||||
getItemCardUserCase.item_getSimilar(
|
getItemCardUserCase.item_getSimilar(
|
||||||
user,
|
user,
|
||||||
|
@ -286,8 +285,8 @@ class ItemCardViewModel(context: Context) : BaseViewModel() {
|
||||||
user: String,
|
user: String,
|
||||||
password: String,
|
password: String,
|
||||||
value: String,
|
value: String,
|
||||||
warehouseFk: String,
|
warehouseFk: String
|
||||||
callFunction: String
|
|
||||||
) {
|
) {
|
||||||
getItemCardUserCase.updateGrouping(user, password, itemFk, value, warehouseFk)
|
getItemCardUserCase.updateGrouping(user, password, itemFk, value, warehouseFk)
|
||||||
.enqueue(object : Callback<Any> {
|
.enqueue(object : Callback<Any> {
|
||||||
|
@ -322,8 +321,8 @@ class ItemCardViewModel(context: Context) : BaseViewModel() {
|
||||||
user: String,
|
user: String,
|
||||||
password: String,
|
password: String,
|
||||||
value: String,
|
value: String,
|
||||||
warehouseFk: String,
|
warehouseFk: String
|
||||||
callFunction: String
|
|
||||||
) {
|
) {
|
||||||
getItemCardUserCase.updatePacking(user, password, itemFk, value, warehouseFk)
|
getItemCardUserCase.updatePacking(user, password, itemFk, value, warehouseFk)
|
||||||
.enqueue(object : Callback<Any> {
|
.enqueue(object : Callback<Any> {
|
||||||
|
@ -406,8 +405,8 @@ class ItemCardViewModel(context: Context) : BaseViewModel() {
|
||||||
itemFk: String,
|
itemFk: String,
|
||||||
user: String,
|
user: String,
|
||||||
password: String,
|
password: String,
|
||||||
value: String,
|
value: String
|
||||||
callFunction: String
|
|
||||||
) {
|
) {
|
||||||
getItemCardUserCase.itemSaveMin(user, password, itemFk, value)
|
getItemCardUserCase.itemSaveMin(user, password, itemFk, value)
|
||||||
.enqueue(object : Callback<Any> {
|
.enqueue(object : Callback<Any> {
|
||||||
|
@ -441,8 +440,8 @@ class ItemCardViewModel(context: Context) : BaseViewModel() {
|
||||||
itemFk: String,
|
itemFk: String,
|
||||||
user: String,
|
user: String,
|
||||||
password: String,
|
password: String,
|
||||||
value: String,
|
value: String
|
||||||
callFunction: String
|
|
||||||
) {
|
) {
|
||||||
getItemCardUserCase.item_saveReference(user, password, itemFk, value)
|
getItemCardUserCase.item_saveReference(user, password, itemFk, value)
|
||||||
.enqueue(object : Callback<Unit> {
|
.enqueue(object : Callback<Unit> {
|
||||||
|
|
|
@ -53,7 +53,7 @@ class ItemProposalFragment(
|
||||||
vShipped = currentDay(),
|
vShipped = currentDay(),
|
||||||
vIsShowedByType = filter,
|
vIsShowedByType = filter,
|
||||||
user = getData(USER),
|
user = getData(USER),
|
||||||
password = getData(PASSWORD),"item_getSimilar"
|
password = getData(PASSWORD)
|
||||||
)
|
)
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
}
|
}
|
||||||
|
@ -105,8 +105,8 @@ class ItemProposalFragment(
|
||||||
vIsShowedByType = filter,
|
vIsShowedByType = filter,
|
||||||
vShipped = currentDay(),
|
vShipped = currentDay(),
|
||||||
user = getData(USER),
|
user = getData(USER),
|
||||||
password = getData(PASSWORD) ,
|
password = getData(PASSWORD)
|
||||||
callFunction = "item_getSimilar")
|
)
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,8 +119,8 @@ class CollectionFragment(
|
||||||
viewModel.ticket_checkFullyControlled(
|
viewModel.ticket_checkFullyControlled(
|
||||||
getData(USER),
|
getData(USER),
|
||||||
getData(PASSWORD),
|
getData(PASSWORD),
|
||||||
collection.collectionFk,
|
collection.collectionFk
|
||||||
"ticket_checkFullyControlled"
|
|
||||||
)
|
)
|
||||||
workerFkFromTicket = collection.tickets.get(0).sales.get(0).workerFk
|
workerFkFromTicket = collection.tickets.get(0).sales.get(0).workerFk
|
||||||
}
|
}
|
||||||
|
@ -132,8 +132,7 @@ class CollectionFragment(
|
||||||
getData(PASSWORD),
|
getData(PASSWORD),
|
||||||
collection.collectionFk,
|
collection.collectionFk,
|
||||||
getData(SECTORFK),
|
getData(SECTORFK),
|
||||||
type,
|
type
|
||||||
"collection_getTickets"
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,7 +251,7 @@ class CollectionFragment(
|
||||||
/* var working_in_test = true // sergio: en proves app
|
/* var working_in_test = true // sergio: en proves app
|
||||||
|
|
||||||
if (working_in_test) {*/
|
if (working_in_test) {*/
|
||||||
viewModel.sip_getExtensionSalix(getData(TOKEN), workerFkFromTicket, "sip_getExtension")
|
viewModel.sip_getExtensionSalix(getData(TOKEN), workerFkFromTicket)
|
||||||
/* } else {
|
/* } else {
|
||||||
viewModel.sip_getExtension(
|
viewModel.sip_getExtension(
|
||||||
getData(USER),
|
getData(USER),
|
||||||
|
@ -322,7 +321,7 @@ class CollectionFragment(
|
||||||
getData(PASSWORD),
|
getData(PASSWORD),
|
||||||
collection.collectionFk,
|
collection.collectionFk,
|
||||||
getData(SECTORFK),
|
getData(SECTORFK),
|
||||||
type, "collection_getTickets"
|
type
|
||||||
)
|
)
|
||||||
binding.collectionSwipe.isRefreshing = false
|
binding.collectionSwipe.isRefreshing = false
|
||||||
//}
|
//}
|
||||||
|
@ -367,7 +366,7 @@ class CollectionFragment(
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
customDialog.setTitle(getString(R.string.error)).setDescription(it.errorMessage)
|
customDialog.setTitle(getString(R.string.error)).setDescription(it.errorMessage)
|
||||||
.setOkButton("Aceptar") {
|
.setOkButton(getString(R.string.accept)) {
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
if (activity != null) requireActivity().onBackPressed()
|
if (activity != null) requireActivity().onBackPressed()
|
||||||
}.show()
|
}.show()
|
||||||
|
@ -380,12 +379,24 @@ class CollectionFragment(
|
||||||
|
|
||||||
if (!goBack) {
|
if (!goBack) {
|
||||||
ma.messageWithSound(
|
ma.messageWithSound(
|
||||||
if (it.isError) it.errorMessage else "Baldas guardadas",
|
if (it.isError) it.errorMessage else getString(R.string.savedShelves),
|
||||||
it.isError, true
|
it.isError, true
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
responseParking.observe(viewLifecycleOwner, Observer {
|
||||||
|
binding.splashProgress.visibility = GONE
|
||||||
|
|
||||||
|
if (!goBack) {
|
||||||
|
ma.messageWithSound(
|
||||||
|
if (it.isError) it.errorMessage else getString(R.string.Aparcado),
|
||||||
|
it.isError, true
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
responsePrint.observe(viewLifecycleOwner, Observer {
|
responsePrint.observe(viewLifecycleOwner, Observer {
|
||||||
binding.splashProgress.visibility = GONE
|
binding.splashProgress.visibility = GONE
|
||||||
|
|
||||||
|
@ -430,8 +441,7 @@ class CollectionFragment(
|
||||||
getData(PASSWORD),
|
getData(PASSWORD),
|
||||||
collection.collectionFk,
|
collection.collectionFk,
|
||||||
getData(SECTORFK),
|
getData(SECTORFK),
|
||||||
type,
|
type
|
||||||
"collection_getTickets"
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -450,8 +460,7 @@ class CollectionFragment(
|
||||||
getData(PASSWORD),
|
getData(PASSWORD),
|
||||||
collection.collectionFk,
|
collection.collectionFk,
|
||||||
getData(SECTORFK),
|
getData(SECTORFK),
|
||||||
type,
|
type
|
||||||
"collection_getTickets"
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -494,8 +503,7 @@ class CollectionFragment(
|
||||||
getData(PASSWORD),
|
getData(PASSWORD),
|
||||||
collection.collectionFk,
|
collection.collectionFk,
|
||||||
getData(SECTORFK),
|
getData(SECTORFK),
|
||||||
type, "collection_getTickets"
|
type)
|
||||||
)
|
|
||||||
|
|
||||||
// //Log.i("VERDNATURA:","La collection es ${collection.collectionFk}")
|
// //Log.i("VERDNATURA:","La collection es ${collection.collectionFk}")
|
||||||
}
|
}
|
||||||
|
@ -612,7 +620,7 @@ class CollectionFragment(
|
||||||
if (it.isError) {
|
if (it.isError) {
|
||||||
ma.messageWithSound(it.errorMessage, it.isError, false)
|
ma.messageWithSound(it.errorMessage, it.isError, false)
|
||||||
/*customDialog.setTitle(getString(R.string.error)).setDescription(it.errorMessage)
|
/*customDialog.setTitle(getString(R.string.error)).setDescription(it.errorMessage)
|
||||||
.setOkButton("Aceptar") {
|
.setOkButton(getString(R.string.accept)) {
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.show()*/
|
}.show()*/
|
||||||
} else {
|
} else {
|
||||||
|
@ -621,7 +629,7 @@ class CollectionFragment(
|
||||||
|
|
||||||
customDialog.setTitle("Aviso")
|
customDialog.setTitle("Aviso")
|
||||||
.setDescription("Pendiente de revisar : " + it.response)
|
.setDescription("Pendiente de revisar : " + it.response)
|
||||||
.setOkButton("Aceptar") {
|
.setOkButton(getString(R.string.accept)) {
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -632,8 +640,7 @@ class CollectionFragment(
|
||||||
getData(PASSWORD),
|
getData(PASSWORD),
|
||||||
it.response,
|
it.response,
|
||||||
getData(SECTORFK),
|
getData(SECTORFK),
|
||||||
type,
|
type
|
||||||
"collection_getTickets"
|
|
||||||
)
|
)
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}
|
}
|
||||||
|
@ -662,7 +669,7 @@ class CollectionFragment(
|
||||||
getData(PASSWORD),
|
getData(PASSWORD),
|
||||||
collection.collectionFk,
|
collection.collectionFk,
|
||||||
getData(SECTORFK),
|
getData(SECTORFK),
|
||||||
type, "collection_getTickets"
|
type
|
||||||
)
|
)
|
||||||
|
|
||||||
goBack = false
|
goBack = false
|
||||||
|
@ -702,7 +709,7 @@ class CollectionFragment(
|
||||||
}
|
}
|
||||||
|
|
||||||
/*customDialog.setTitle(getString(R.string.error)).setDescription(it.errorMessage)
|
/*customDialog.setTitle(getString(R.string.error)).setDescription(it.errorMessage)
|
||||||
.setOkButton("Aceptar") {
|
.setOkButton(getString(R.string.accept)) {
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.show()*/
|
}.show()*/
|
||||||
}
|
}
|
||||||
|
@ -941,7 +948,7 @@ class CollectionFragment(
|
||||||
private fun printObservations(observations: String) {
|
private fun printObservations(observations: String) {
|
||||||
if (observations.trim().isNotEmpty()) {
|
if (observations.trim().isNotEmpty()) {
|
||||||
customDialog.setTitle("Observaciones").setDescription(observations)
|
customDialog.setTitle("Observaciones").setDescription(observations)
|
||||||
.setOkButton("Aceptar") {
|
.setOkButton(getString(R.string.accept)) {
|
||||||
customDialog.hide()
|
customDialog.hide()
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
|
@ -969,8 +976,7 @@ class CollectionFragment(
|
||||||
viewModel.saleTracking_add(
|
viewModel.saleTracking_add(
|
||||||
getData(USER),
|
getData(USER),
|
||||||
getData(PASSWORD),
|
getData(PASSWORD),
|
||||||
txtscan,
|
txtscan
|
||||||
"saleTracking_add"
|
|
||||||
)
|
)
|
||||||
if ((isOk) && mpok != null) {
|
if ((isOk) && mpok != null) {
|
||||||
mpok!!.start()
|
mpok!!.start()
|
||||||
|
@ -1026,13 +1032,12 @@ class CollectionFragment(
|
||||||
getData(USER),
|
getData(USER),
|
||||||
getData(PASSWORD),
|
getData(PASSWORD),
|
||||||
ticketFk = tickets[0],
|
ticketFk = tickets[0],
|
||||||
parking = txtscan,
|
parking = txtscan
|
||||||
"shelvingPark"
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
Timber.i("La coleccion es " + tickets[0])
|
Timber.i("La coleccion es " + tickets[0])
|
||||||
if (mpok != null) mpok!!.start()
|
/* if (mpok != null) mpok!!.start()
|
||||||
"Ticket aparcado".toast(requireContext())
|
"Ticket aparcado".toast(requireContext())*/
|
||||||
} else {
|
} else {
|
||||||
if (mperror != null) mperror!!.start()
|
if (mperror != null) mperror!!.start()
|
||||||
}
|
}
|
||||||
|
@ -1070,12 +1075,11 @@ class CollectionFragment(
|
||||||
getData(USER),
|
getData(USER),
|
||||||
getData(PASSWORD),
|
getData(PASSWORD),
|
||||||
ticketFk = tickets[0],
|
ticketFk = tickets[0],
|
||||||
parking = txtscan,
|
parking = txtscan
|
||||||
"shelvingPark"
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (mpok != null) mpok!!.start()
|
/* if (mpok != null) mpok!!.start()
|
||||||
getString(R.string.Ticketaparcado).toast(requireContext())
|
getString(R.string.Ticketaparcado).toast(requireContext())*/
|
||||||
} else {
|
} else {
|
||||||
if (binding.splashProgress != null) binding.splashProgress.visibility =
|
if (binding.splashProgress != null) binding.splashProgress.visibility =
|
||||||
View.VISIBLE
|
View.VISIBLE
|
||||||
|
@ -1088,16 +1092,15 @@ class CollectionFragment(
|
||||||
getData(PASSWORD),
|
getData(PASSWORD),
|
||||||
txtscan,
|
txtscan,
|
||||||
getData(SECTORFK),
|
getData(SECTORFK),
|
||||||
type,
|
type
|
||||||
"collection_getTickets"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if (type.equals(CONTROLADOR)) {
|
if (type.equals(CONTROLADOR)) {
|
||||||
viewModel.ticket_checkFullyControlled(
|
viewModel.ticket_checkFullyControlled(
|
||||||
getData(USER),
|
getData(USER),
|
||||||
getData(PASSWORD),
|
getData(PASSWORD),
|
||||||
txtscan,
|
txtscan
|
||||||
"ticket_checkFullyControlled"
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
// } else {
|
// } else {
|
||||||
|
@ -1155,12 +1158,11 @@ class CollectionFragment(
|
||||||
getData(USER),
|
getData(USER),
|
||||||
getData(PASSWORD),
|
getData(PASSWORD),
|
||||||
ticketFk = it,
|
ticketFk = it,
|
||||||
parking = txtscan,
|
parking = txtscan
|
||||||
"shelvingPark"
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (mpok != null) mpok!!.start()
|
/* if (mpok != null) mpok!!.start()
|
||||||
"Ticket aparcado".toast(requireContext())
|
"Ticket aparcado".toast(requireContext())*/
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (mperror != null) mperror!!.start()
|
if (mperror != null) mperror!!.start()
|
||||||
|
@ -1238,8 +1240,8 @@ class CollectionFragment(
|
||||||
vIsChecked = if (type == SACADOR) sales[position].isPrepared else if (type == CONTROLADOR) sales[position].isControlled else if (type == "PRECHECKER") sales[position].isPreControlled else "1",
|
vIsChecked = if (type == SACADOR) sales[position].isPrepared else if (type == CONTROLADOR) sales[position].isControlled else if (type == "PRECHECKER") sales[position].isPreControlled else "1",
|
||||||
vOriginalQuantity = sales[position].pickedQuantity,
|
vOriginalQuantity = sales[position].pickedQuantity,
|
||||||
vStateFk = if (type == CONTROLADOR) "CHECKED" else if (type == "PRECHECKER") "PREVIOUS_CONTROL" else type,//type.toString(),
|
vStateFk = if (type == CONTROLADOR) "CHECKED" else if (type == "PRECHECKER") "PREVIOUS_CONTROL" else type,//type.toString(),
|
||||||
vBuyFk = originalItemScan,
|
vBuyFk = originalItemScan
|
||||||
callFunction = "saleTrackingReplace"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1262,8 +1264,7 @@ class CollectionFragment(
|
||||||
getData(USER),
|
getData(USER),
|
||||||
getData(PASSWORD),
|
getData(PASSWORD),
|
||||||
sales[position].saleFk,
|
sales[position].saleFk,
|
||||||
sales[position].quantity,
|
sales[position].quantity
|
||||||
""
|
|
||||||
)
|
)
|
||||||
positionUnmarked = position
|
positionUnmarked = position
|
||||||
|
|
||||||
|
@ -1279,7 +1280,7 @@ class CollectionFragment(
|
||||||
setTotalLines()
|
setTotalLines()
|
||||||
scanRequest()
|
scanRequest()
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.setKoButton("Cancelar") {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
scanRequest()
|
scanRequest()
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
|
@ -1304,8 +1305,8 @@ class CollectionFragment(
|
||||||
getData(PASSWORD),
|
getData(PASSWORD),
|
||||||
itemFk = sales[position].itemFk,
|
itemFk = sales[position].itemFk,
|
||||||
quantity = quantityGet,
|
quantity = quantityGet,
|
||||||
shelvingFk = sales[position].placements[shelvingPosition].shelving,
|
shelvingFk = sales[position].placements[shelvingPosition].shelving
|
||||||
callFunction = "itemPlacementSupplyAiming"
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1521,8 +1522,7 @@ class CollectionFragment(
|
||||||
getData(PASSWORD),
|
getData(PASSWORD),
|
||||||
collection.collectionFk,
|
collection.collectionFk,
|
||||||
getData(SECTORFK),
|
getData(SECTORFK),
|
||||||
type,
|
type
|
||||||
"collection_getTickets"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1610,8 +1610,7 @@ class CollectionFragment(
|
||||||
getData(USER),
|
getData(USER),
|
||||||
getData(PASSWORD),
|
getData(PASSWORD),
|
||||||
collectionFk = collection.collectionFk,
|
collectionFk = collection.collectionFk,
|
||||||
sectorFk = getData(SECTORFK),
|
sectorFk = getData(SECTORFK)
|
||||||
"collectionStickerPrint"
|
|
||||||
)
|
)
|
||||||
(getString(R.string.Imprimiendo) + getData(PRINTERNAME)).toast(requireContext())
|
(getString(R.string.Imprimiendo) + getData(PRINTERNAME)).toast(requireContext())
|
||||||
} else {
|
} else {
|
||||||
|
@ -1772,7 +1771,7 @@ class CollectionFragment(
|
||||||
scanRequest()
|
scanRequest()
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
|
|
||||||
}.setKoButton("Cancelar") {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
if (binding.splashProgress != null) {
|
if (binding.splashProgress != null) {
|
||||||
binding.splashProgress.visibility = View.GONE
|
binding.splashProgress.visibility = View.GONE
|
||||||
}
|
}
|
||||||
|
@ -1808,7 +1807,7 @@ class CollectionFragment(
|
||||||
}
|
}
|
||||||
|
|
||||||
customDialog.setTitle("Artículo: " + item.id)
|
customDialog.setTitle("Artículo: " + item.id)
|
||||||
.setDescription("Disponible: " + item.available).setOkButton("Aceptar") {
|
.setDescription("Disponible: " + item.available).setOkButton(getString(R.string.accept)) {
|
||||||
scanRequest()
|
scanRequest()
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
|
@ -1875,7 +1874,7 @@ class CollectionFragment(
|
||||||
|
|
||||||
customDialogInput.setTitle("Número de baldas del ticket")
|
customDialogInput.setTitle("Número de baldas del ticket")
|
||||||
.setDescription("Indica el número de baldas que ocupa el ticket")
|
.setDescription("Indica el número de baldas que ocupa el ticket")
|
||||||
.setOkButton("Aceptar") {
|
.setOkButton(getString(R.string.accept)) {
|
||||||
if (!customDialogInput.getValue().isNullOrEmpty()) {
|
if (!customDialogInput.getValue().isNullOrEmpty()) {
|
||||||
|
|
||||||
binding.splashProgress.visibility = VISIBLE
|
binding.splashProgress.visibility = VISIBLE
|
||||||
|
@ -1883,8 +1882,7 @@ class CollectionFragment(
|
||||||
getData(USER),
|
getData(USER),
|
||||||
getData(PASSWORD),
|
getData(PASSWORD),
|
||||||
ticketFk = collection.collectionFk,
|
ticketFk = collection.collectionFk,
|
||||||
usedShelves = customDialogInput.getValue(),
|
usedShelves = customDialogInput.getValue()
|
||||||
"ticketCollection_setUsedShelves"
|
|
||||||
)
|
)
|
||||||
hideKeyboards()
|
hideKeyboards()
|
||||||
// showKeyboards()
|
// showKeyboards()
|
||||||
|
@ -1895,7 +1893,7 @@ class CollectionFragment(
|
||||||
showKeyboards()
|
showKeyboards()
|
||||||
//hideKeyboards()
|
//hideKeyboards()
|
||||||
//showKeyboards()
|
//showKeyboards()
|
||||||
}.setKoButton("Cancelar") {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
// hideKeyboards()
|
// hideKeyboards()
|
||||||
showKeyboards()
|
showKeyboards()
|
||||||
|
@ -1915,8 +1913,7 @@ class CollectionFragment(
|
||||||
getData(USER),
|
getData(USER),
|
||||||
getData(PASSWORD),
|
getData(PASSWORD),
|
||||||
ticketFk = collection.collectionFk,
|
ticketFk = collection.collectionFk,
|
||||||
usedShelves = customDialogInput.getValue(),
|
usedShelves = customDialogInput.getValue()
|
||||||
"ticketCollection_setUsedShelves"
|
|
||||||
)
|
)
|
||||||
hideKeyboards()
|
hideKeyboards()
|
||||||
}
|
}
|
||||||
|
@ -1941,7 +1938,7 @@ class CollectionFragment(
|
||||||
isMarking = false
|
isMarking = false
|
||||||
customDialogInput.setTitle("Número de paquetes en balda")
|
customDialogInput.setTitle("Número de paquetes en balda")
|
||||||
.setDescription("Indica el número de paquetes que caben en una balda")
|
.setDescription("Indica el número de paquetes que caben en una balda")
|
||||||
.setOkButton("Aceptar") {
|
.setOkButton(getString(R.string.accept)) {
|
||||||
if (!customDialogInput.getValue().isNullOrEmpty()) {
|
if (!customDialogInput.getValue().isNullOrEmpty()) {
|
||||||
|
|
||||||
binding.splashProgress.visibility = VISIBLE
|
binding.splashProgress.visibility = VISIBLE
|
||||||
|
@ -1949,8 +1946,7 @@ class CollectionFragment(
|
||||||
getData(USER),
|
getData(USER),
|
||||||
getData(PASSWORD),
|
getData(PASSWORD),
|
||||||
vSelf = itemFk,
|
vSelf = itemFk,
|
||||||
vPacking = customDialogInput.getValue(),
|
vPacking = customDialogInput.getValue()
|
||||||
"item_updatePackingShelve"
|
|
||||||
)
|
)
|
||||||
hideKeyboards()
|
hideKeyboards()
|
||||||
//showKeyboards()
|
//showKeyboards()
|
||||||
|
@ -1960,7 +1956,7 @@ class CollectionFragment(
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
// hideKeyboards()
|
// hideKeyboards()
|
||||||
showKeyboards()
|
showKeyboards()
|
||||||
}.setKoButton("Cancelar") {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
|
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
//hideKeyboards()
|
//hideKeyboards()
|
||||||
|
@ -1981,8 +1977,7 @@ class CollectionFragment(
|
||||||
getData(USER),
|
getData(USER),
|
||||||
getData(PASSWORD),
|
getData(PASSWORD),
|
||||||
ticketFk = collection.collectionFk,
|
ticketFk = collection.collectionFk,
|
||||||
usedShelves = customDialogInput.getValue(),
|
usedShelves = customDialogInput.getValue()
|
||||||
"ticketCollection_setUsedShelves"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2041,7 +2036,7 @@ class CollectionFragment(
|
||||||
getString(R.string.Agregar)
|
getString(R.string.Agregar)
|
||||||
)
|
)
|
||||||
|
|
||||||
}.setKoButton("Cancelar") {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
scanRequest()
|
scanRequest()
|
||||||
customDialogThreeButtons.dismiss()
|
customDialogThreeButtons.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
|
@ -2125,8 +2120,7 @@ class CollectionFragment(
|
||||||
quantity = totalQuantity.toString(),
|
quantity = totalQuantity.toString(),
|
||||||
warehouseFk = getData(WAREHOUSEFK),
|
warehouseFk = getData(WAREHOUSEFK),
|
||||||
type = typeCollectionTrashMissingReject,
|
type = typeCollectionTrashMissingReject,
|
||||||
originalQuantity = quantity,
|
originalQuantity = quantity
|
||||||
callFunction = "collectionMissingTrash"
|
|
||||||
)
|
)
|
||||||
/* sales[position].quantity = quantity
|
/* sales[position].quantity = quantity
|
||||||
saleAdapter!!.notifyDataSetChanged()
|
saleAdapter!!.notifyDataSetChanged()
|
||||||
|
@ -2224,7 +2218,7 @@ class CollectionFragment(
|
||||||
quantity = totalQuantity.toString(),
|
quantity = totalQuantity.toString(),
|
||||||
warehouseFk = warehouseFk,
|
warehouseFk = warehouseFk,
|
||||||
type = "reject",
|
type = "reject",
|
||||||
originalQuantity = quantity, callFunction = "collectionMissingTrash"
|
originalQuantity = quantity
|
||||||
)
|
)
|
||||||
|
|
||||||
//sales[position].originalQuantity = quantity
|
//sales[position].originalQuantity = quantity
|
||||||
|
@ -2297,8 +2291,7 @@ class CollectionFragment(
|
||||||
getData(PASSWORD),
|
getData(PASSWORD),
|
||||||
collection.collectionFk,
|
collection.collectionFk,
|
||||||
getData(SECTORFK),
|
getData(SECTORFK),
|
||||||
type,
|
type
|
||||||
"collection_getTickets"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2369,7 +2362,7 @@ class CollectionFragment(
|
||||||
viewModel.collectionIncreaseQuantitySalix(
|
viewModel.collectionIncreaseQuantitySalix(
|
||||||
getData(TOKEN),
|
getData(TOKEN),
|
||||||
saleFk = sales[position].saleFk,
|
saleFk = sales[position].saleFk,
|
||||||
quantity = quantity, "collection_increaseQuantity"
|
quantity = quantity
|
||||||
)
|
)
|
||||||
/* }*/
|
/* }*/
|
||||||
|
|
||||||
|
@ -2384,8 +2377,7 @@ class CollectionFragment(
|
||||||
usuario = getData(USER),
|
usuario = getData(USER),
|
||||||
password = getData(PASSWORD),
|
password = getData(PASSWORD),
|
||||||
ticketFk = it,
|
ticketFk = it,
|
||||||
state = "CHECKED",
|
state = "CHECKED"
|
||||||
callFunction = "ticket_setState"
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
} else if (type == SACADOR) {
|
} else if (type == SACADOR) {
|
||||||
|
@ -2394,8 +2386,7 @@ class CollectionFragment(
|
||||||
usuario = getData(USER),
|
usuario = getData(USER),
|
||||||
password = getData(PASSWORD),
|
password = getData(PASSWORD),
|
||||||
ticketFk = it,
|
ticketFk = it,
|
||||||
state = "PREPARED",
|
state = "PREPARED"
|
||||||
callFunction = "ticket_setState"
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
////Refactor #4030
|
////Refactor #4030
|
||||||
|
@ -2441,7 +2432,7 @@ class CollectionFragment(
|
||||||
Log.d("VERDNATURA", "Entrant en el show scanner al punxar sobre la sale")
|
Log.d("VERDNATURA", "Entrant en el show scanner al punxar sobre la sale")
|
||||||
customDialogInput.setTitle("" + sale.itemFk)
|
customDialogInput.setTitle("" + sale.itemFk)
|
||||||
.setDescription(getString(R.string.Escaneaelcarroparaelitemseleccionado))
|
.setDescription(getString(R.string.Escaneaelcarroparaelitemseleccionado))
|
||||||
.setOkButton("Aceptar") {
|
.setOkButton(getString(R.string.accept)) {
|
||||||
if (!customDialogInput.getValue().isNullOrEmpty()) {
|
if (!customDialogInput.getValue().isNullOrEmpty()) {
|
||||||
findSale(customDialogInput.getValue(), index)
|
findSale(customDialogInput.getValue(), index)
|
||||||
}
|
}
|
||||||
|
@ -2449,7 +2440,7 @@ class CollectionFragment(
|
||||||
scanRequest()
|
scanRequest()
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
hideKeyboards()
|
hideKeyboards()
|
||||||
}.setKoButton("Cancelar") {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
}.setValue("").show()
|
}.setValue("").show()
|
||||||
customDialogInput.getEditText().requestFocus()
|
customDialogInput.getEditText().requestFocus()
|
||||||
|
@ -2484,7 +2475,7 @@ class CollectionFragment(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
customDialogList.setTitle("Causa de error").setKoButton("Cancelar") {
|
customDialogList.setTitle("Causa de error").setKoButton(getString(R.string.cancel)) {
|
||||||
scanRequest()
|
scanRequest()
|
||||||
hideKeyboards()
|
hideKeyboards()
|
||||||
customDialogList.dismiss()
|
customDialogList.dismiss()
|
||||||
|
|
|
@ -46,6 +46,10 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
||||||
val response: LiveData<ResponseItemVO>
|
val response: LiveData<ResponseItemVO>
|
||||||
get() = _response
|
get() = _response
|
||||||
|
|
||||||
|
private val _responseParking by lazy { MutableLiveData<ResponseItemVO>() }
|
||||||
|
val responseParking: LiveData<ResponseItemVO>
|
||||||
|
get() = _responseParking
|
||||||
|
|
||||||
private val _responsePrint by lazy { MutableLiveData<ResponseItemVO>() }
|
private val _responsePrint by lazy { MutableLiveData<ResponseItemVO>() }
|
||||||
val responsePrint: LiveData<ResponseItemVO>
|
val responsePrint: LiveData<ResponseItemVO>
|
||||||
get() = _responsePrint
|
get() = _responsePrint
|
||||||
|
@ -117,8 +121,7 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
||||||
password: String,
|
password: String,
|
||||||
collectionFk: String,
|
collectionFk: String,
|
||||||
sectorFk: String,
|
sectorFk: String,
|
||||||
type: String,
|
type: String
|
||||||
callFunction: String
|
|
||||||
) {
|
) {
|
||||||
getSacadorControladorUserCase.collectionTicketGet(
|
getSacadorControladorUserCase.collectionTicketGet(
|
||||||
usuario,
|
usuario,
|
||||||
|
@ -163,7 +166,7 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
||||||
vOriginalQuantity: String,
|
vOriginalQuantity: String,
|
||||||
vStateFk: String,
|
vStateFk: String,
|
||||||
vIsChecked: String,
|
vIsChecked: String,
|
||||||
vBuyFk: String, callFunction: String
|
vBuyFk: String
|
||||||
) {
|
) {
|
||||||
getSacadorControladorUserCase.saleTrackingReplace(
|
getSacadorControladorUserCase.saleTrackingReplace(
|
||||||
usuario,
|
usuario,
|
||||||
|
@ -202,7 +205,7 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
||||||
password: String,
|
password: String,
|
||||||
shelvingFk: String,
|
shelvingFk: String,
|
||||||
quantity: String,
|
quantity: String,
|
||||||
itemFk: String, callFunction: String
|
itemFk: String
|
||||||
) {
|
) {
|
||||||
getSacadorControladorUserCase.itemPlacementSupplyAiming(
|
getSacadorControladorUserCase.itemPlacementSupplyAiming(
|
||||||
usuario,
|
usuario,
|
||||||
|
@ -287,7 +290,7 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
||||||
usuario: String,
|
usuario: String,
|
||||||
password: String,
|
password: String,
|
||||||
collectionFk: String,
|
collectionFk: String,
|
||||||
sectorFk: String, callFunction: String
|
sectorFk: String
|
||||||
) {
|
) {
|
||||||
getSacadorControladorUserCase.collectionStickerPrint(
|
getSacadorControladorUserCase.collectionStickerPrint(
|
||||||
usuario,
|
usuario,
|
||||||
|
@ -324,8 +327,7 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
||||||
usuario: String,
|
usuario: String,
|
||||||
password: String,
|
password: String,
|
||||||
ticketFk: String,
|
ticketFk: String,
|
||||||
usedShelves: String,
|
usedShelves: String
|
||||||
callFunction: String
|
|
||||||
) {
|
) {
|
||||||
getSacadorControladorUserCase.ticketCollection_setUsedShelves(
|
getSacadorControladorUserCase.ticketCollection_setUsedShelves(
|
||||||
usuario,
|
usuario,
|
||||||
|
@ -360,8 +362,7 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
||||||
usuario: String,
|
usuario: String,
|
||||||
password: String,
|
password: String,
|
||||||
vSelf: String,
|
vSelf: String,
|
||||||
vPacking: String,
|
vPacking: String
|
||||||
callFunction: String
|
|
||||||
) {
|
) {
|
||||||
getSacadorControladorUserCase.item_updatePackingShelve(
|
getSacadorControladorUserCase.item_updatePackingShelve(
|
||||||
usuario,
|
usuario,
|
||||||
|
@ -396,8 +397,7 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
||||||
fun saleTracking_add(
|
fun saleTracking_add(
|
||||||
usuario: String,
|
usuario: String,
|
||||||
password: String,
|
password: String,
|
||||||
saleGroupFk: String,
|
saleGroupFk: String
|
||||||
callFunction: String
|
|
||||||
) {
|
) {
|
||||||
getSacadorControladorUserCase.saleTracking_add(
|
getSacadorControladorUserCase.saleTracking_add(
|
||||||
usuario,
|
usuario,
|
||||||
|
@ -527,7 +527,7 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
||||||
quantity: String,
|
quantity: String,
|
||||||
type: String,
|
type: String,
|
||||||
warehouseFk: String,
|
warehouseFk: String,
|
||||||
originalQuantity: String, callFunction: String
|
originalQuantity: String
|
||||||
) {
|
) {
|
||||||
getSacadorControladorUserCase.collectionMissingTrash(
|
getSacadorControladorUserCase.collectionMissingTrash(
|
||||||
usuario,
|
usuario,
|
||||||
|
@ -593,8 +593,7 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
||||||
usuario: String,
|
usuario: String,
|
||||||
password: String,
|
password: String,
|
||||||
itemShelvingFk: String,
|
itemShelvingFk: String,
|
||||||
visible: String,
|
visible: String
|
||||||
callFunction: String
|
|
||||||
) {
|
) {
|
||||||
getSacadorControladorUserCase.itemShelving_updateFromSale(
|
getSacadorControladorUserCase.itemShelving_updateFromSale(
|
||||||
usuario,
|
usuario,
|
||||||
|
@ -631,22 +630,21 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
||||||
usuario: String,
|
usuario: String,
|
||||||
password: String,
|
password: String,
|
||||||
ticketFk: String,
|
ticketFk: String,
|
||||||
parking: String,
|
parking: String
|
||||||
callFunction: String
|
|
||||||
) {
|
) {
|
||||||
getUbicadorUserCase.shelvingPark(usuario, password, ticketFk, parking)
|
getUbicadorUserCase.shelvingPark(usuario, password, ticketFk, parking)
|
||||||
.enqueue(object : Callback<String> {
|
.enqueue(object : Callback<Any> {
|
||||||
override fun onFailure(call: Call<String>, t: Throwable) {
|
override fun onFailure(call: Call<Any>, t: Throwable) {
|
||||||
_response.value = ResponseItemVO(
|
_responseParking.value = ResponseItemVO(
|
||||||
isError = true,
|
isError = true,
|
||||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
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) {
|
if (!response.isSuccessful) {
|
||||||
_response.value = ResponseItemVO(
|
_responseParking.value = ResponseItemVO(
|
||||||
isError = true,
|
isError = true,
|
||||||
errorMessage = getMessageFromAllResponse(
|
errorMessage = getMessageFromAllResponse(
|
||||||
nameofFunction(this),
|
nameofFunction(this),
|
||||||
|
@ -654,8 +652,8 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
_response.value =
|
_responseParking.value =
|
||||||
ResponseItemVO(isError = false, response = response.body()!!)
|
ResponseItemVO(isError = false, response = response.message())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -665,7 +663,7 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
||||||
usuario: String,
|
usuario: String,
|
||||||
password: String,
|
password: String,
|
||||||
ticketFk: String,
|
ticketFk: String,
|
||||||
state: String, callFunction: String
|
state: String
|
||||||
) {
|
) {
|
||||||
getSacadorControladorUserCase.ticket_setState(usuario, password, ticketFk, state)
|
getSacadorControladorUserCase.ticket_setState(usuario, password, ticketFk, state)
|
||||||
.enqueue(object : Callback<Unit> {
|
.enqueue(object : Callback<Unit> {
|
||||||
|
@ -854,7 +852,7 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
||||||
|
|
||||||
token: String,
|
token: String,
|
||||||
saleFk: String,
|
saleFk: String,
|
||||||
quantity: String, callFunction: String
|
quantity: String
|
||||||
) {
|
) {
|
||||||
getSacadorControladorUserCase.collectionIncreaseQuantitySalix(
|
getSacadorControladorUserCase.collectionIncreaseQuantitySalix(
|
||||||
token,
|
token,
|
||||||
|
@ -990,8 +988,7 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
||||||
fun sip_getExtension(
|
fun sip_getExtension(
|
||||||
usuario: String,
|
usuario: String,
|
||||||
password: String,
|
password: String,
|
||||||
workerId: String,
|
workerId: String
|
||||||
callFunction: String
|
|
||||||
) {
|
) {
|
||||||
getSacadorControladorUserCase.sip_getExtension(
|
getSacadorControladorUserCase.sip_getExtension(
|
||||||
usuario,
|
usuario,
|
||||||
|
@ -1030,8 +1027,7 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
||||||
|
|
||||||
fun sip_getExtensionSalix(
|
fun sip_getExtensionSalix(
|
||||||
token: String,
|
token: String,
|
||||||
workerId: String,
|
workerId: String
|
||||||
callFunction: String
|
|
||||||
) {
|
) {
|
||||||
getSacadorControladorUserCase.sip_getExtensionSalix(
|
getSacadorControladorUserCase.sip_getExtensionSalix(
|
||||||
token,
|
token,
|
||||||
|
@ -1090,7 +1086,7 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
||||||
fun ticket_checkFullyControlled(
|
fun ticket_checkFullyControlled(
|
||||||
usuario: String,
|
usuario: String,
|
||||||
password: String,
|
password: String,
|
||||||
collectionFk: String, callFunction: String
|
collectionFk: String
|
||||||
) {
|
) {
|
||||||
getSacadorControladorUserCase.ticket_checkFullyControlled(
|
getSacadorControladorUserCase.ticket_checkFullyControlled(
|
||||||
usuario,
|
usuario,
|
||||||
|
|
|
@ -57,8 +57,7 @@ class CollectionShowTicketFragment(
|
||||||
getData(PASSWORD),
|
getData(PASSWORD),
|
||||||
collection.collectionFk,
|
collection.collectionFk,
|
||||||
getData(SECTORFK),
|
getData(SECTORFK),
|
||||||
type,
|
type
|
||||||
"collection_getTickets"
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,8 +110,8 @@ class CollectionShowTicketFragment(
|
||||||
usuario = getData(USER),
|
usuario = getData(USER),
|
||||||
password = getData(PASSWORD),
|
password = getData(PASSWORD),
|
||||||
collectionFk = collection.collectionFk,
|
collectionFk = collection.collectionFk,
|
||||||
sectorFk = getData(SECTORFK),
|
sectorFk = getData(SECTORFK)
|
||||||
"collectionStickerPrint"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
(getString(R.string.Imprimiendo) + getData(PRINTERNAME)).toast(requireContext())
|
(getString(R.string.Imprimiendo) + getData(PRINTERNAME)).toast(requireContext())
|
||||||
|
@ -137,7 +136,7 @@ class CollectionShowTicketFragment(
|
||||||
getData(PASSWORD),
|
getData(PASSWORD),
|
||||||
binding.scanInput.text.toString(),
|
binding.scanInput.text.toString(),
|
||||||
getData(SECTORFK),
|
getData(SECTORFK),
|
||||||
type, "collection_getTickets"
|
type
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -162,7 +161,7 @@ class CollectionShowTicketFragment(
|
||||||
getData(PASSWORD),
|
getData(PASSWORD),
|
||||||
collection.collectionFk,
|
collection.collectionFk,
|
||||||
getData(SECTORFK),
|
getData(SECTORFK),
|
||||||
type, "collection_getTickets"
|
type
|
||||||
)
|
)
|
||||||
binding.collectionSwipe.isRefreshing = false
|
binding.collectionSwipe.isRefreshing = false
|
||||||
|
|
||||||
|
@ -254,7 +253,7 @@ class CollectionShowTicketFragment(
|
||||||
private fun printObservations(observations: String) {
|
private fun printObservations(observations: String) {
|
||||||
if (observations.trim().isNotEmpty()) {
|
if (observations.trim().isNotEmpty()) {
|
||||||
customDialog.setTitle("Observaciones").setDescription(observations)
|
customDialog.setTitle("Observaciones").setDescription(observations)
|
||||||
.setOkButton("Aceptar") {
|
.setOkButton(getString(R.string.accept)) {
|
||||||
customDialog.hide()
|
customDialog.hide()
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
|
|
|
@ -87,7 +87,7 @@ class ControladorFragment :
|
||||||
if (it.isError) {
|
if (it.isError) {
|
||||||
ma.messageWithSound(it.errorMessage,isError = true, isPlayed = false)
|
ma.messageWithSound(it.errorMessage,isError = true, isPlayed = false)
|
||||||
/*customDialog.setTitle(getString(R.string.error)).setDescription(it.errorMessage)
|
/*customDialog.setTitle(getString(R.string.error)).setDescription(it.errorMessage)
|
||||||
.setOkButton("Aceptar") {
|
.setOkButton(getString(R.string.accept)) {
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.show()*/
|
}.show()*/
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -135,7 +135,7 @@ class ControlVehiculoFragment(
|
||||||
private fun showScanner(description: String, action: String) {
|
private fun showScanner(description: String, action: String) {
|
||||||
|
|
||||||
customDialogInput.setTitle(getString(R.string.vehiclecontrol)).setDescription(description)
|
customDialogInput.setTitle(getString(R.string.vehiclecontrol)).setDescription(description)
|
||||||
.setOkButton("Aceptar") {
|
.setOkButton(getString(R.string.accept)) {
|
||||||
if (customDialogInput.getValue().isNotEmpty()) {
|
if (customDialogInput.getValue().isNotEmpty()) {
|
||||||
// "$description ${customDialogInput.getValue()} OK".toast(requireContext())
|
// "$description ${customDialogInput.getValue()} OK".toast(requireContext())
|
||||||
insertControlTimeVehicle(customDialogInput.getValue(), action)
|
insertControlTimeVehicle(customDialogInput.getValue(), action)
|
||||||
|
@ -146,7 +146,7 @@ class ControlVehiculoFragment(
|
||||||
hideKeyboards()
|
hideKeyboards()
|
||||||
}
|
}
|
||||||
|
|
||||||
.setKoButton("Cancelar") {
|
.setKoButton(getString(R.string.cancel)) {
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
if (tagName.equals(HistoricoVehiculoFragment.TAG)) {
|
if (tagName.equals(HistoricoVehiculoFragment.TAG)) {
|
||||||
ma.onBackPressed()
|
ma.onBackPressed()
|
||||||
|
@ -285,7 +285,7 @@ class ControlVehiculoFragment(
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}.setKoButton("Cancelar") {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
scanRequest()
|
scanRequest()
|
||||||
customDialogThreeButtons.dismiss()
|
customDialogThreeButtons.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
|
@ -307,7 +307,7 @@ class ControlVehiculoFragment(
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}.setKoButton("Cancelar") {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
scanRequest()
|
scanRequest()
|
||||||
customDialogThreeButtons.dismiss()
|
customDialogThreeButtons.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
|
|
|
@ -145,22 +145,22 @@ class DayOfSaleViewModel(context: Context) : BaseViewModel() {
|
||||||
fun parking(usuario: String,password: String,scanItem: String,parking:String){
|
fun parking(usuario: String,password: String,scanItem: String,parking:String){
|
||||||
|
|
||||||
GetDayOfSaleUSerCase.shelvingPark(usuario,password,scanItem,parking).enqueue(object :
|
GetDayOfSaleUSerCase.shelvingPark(usuario,password,scanItem,parking).enqueue(object :
|
||||||
Callback<String> {
|
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!!))
|
_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){
|
if (response.isSuccessful == null){
|
||||||
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
|
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
|
||||||
}else{
|
}else{*/
|
||||||
if (response.body() == "Finish")
|
if (response.isSuccessful)
|
||||||
_response.value = ResponseItemVO(isError = false,response = response.body()!!)
|
_response.value = ResponseItemVO(isError = false,response = response.message())
|
||||||
else
|
else
|
||||||
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
|
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -153,7 +153,7 @@ class FaltasFragment :
|
||||||
)
|
)
|
||||||
changeOfflineValue(item)
|
changeOfflineValue(item)
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
}.setKoButton("Cancelar") {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
}.setValue("0").show()
|
}.setValue("0").show()
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@ class HistoricoAdapter (
|
||||||
fun bind(item: ItemHistoricoVO) {
|
fun bind(item: ItemHistoricoVO) {
|
||||||
binding.apply {
|
binding.apply {
|
||||||
this.item = item
|
this.item = item
|
||||||
|
|
||||||
val sdf = SimpleDateFormat("yyyy-MM-dd")
|
val sdf = SimpleDateFormat("yyyy-MM-dd")
|
||||||
val currentDate = sdf.format(Date())
|
val currentDate = sdf.format(Date())
|
||||||
if (currentDate == item.shipped){
|
if (currentDate == item.shipped){
|
||||||
|
|
|
@ -35,7 +35,7 @@ class HistoricoVehiculoAdapter (
|
||||||
fun bind(item: ItemHistoricoVehiculo) {
|
fun bind(item: ItemHistoricoVehiculo) {
|
||||||
binding.apply {
|
binding.apply {
|
||||||
this.item = item
|
this.item = item
|
||||||
val sdf = SimpleDateFormat("yyyy-MM-dd")
|
val sdf = SimpleDateFormat(binding.root.context.getString(R.string.dateFormat))
|
||||||
val currentDate = sdf.format(Date())
|
val currentDate = sdf.format(Date())
|
||||||
if (currentDate == item.inTimed){
|
if (currentDate == item.inTimed){
|
||||||
historicoDate.setBackgroundColor(ContextCompat.getColor(historicoDate.context,R.color.verdnatura_pumpkin_orange))
|
historicoDate.setBackgroundColor(ContextCompat.getColor(historicoDate.context,R.color.verdnatura_pumpkin_orange))
|
||||||
|
|
|
@ -60,10 +60,12 @@ class HistoricoVehiculoFragment (
|
||||||
navigateToToday(it)
|
navigateToToday(it)
|
||||||
|
|
||||||
if (it.list.isEmpty()){
|
if (it.list.isEmpty()){
|
||||||
ma.messageWithSound("Solo puedes visualizar cuando has cogido tu mismo el vehículo a no ser que tengas permisos para ello.",true,true,"Información")
|
ma.messageWithSound(getString(R.string.lookWithpermission),true,true,getString(
|
||||||
|
R.string.info))
|
||||||
}else{
|
}else{
|
||||||
if (it.list[0].isError){
|
if (it.list[0].isError){
|
||||||
ma.messageWithSound(it.list[0].errorMessage,true,true,"Información")
|
ma.messageWithSound(it.list[0].errorMessage,true,true,getString(
|
||||||
|
R.string.info))
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -220,7 +220,7 @@ class InventaryFragment : BaseFragment<FragmentInventaryBinding,InventaryViewMod
|
||||||
changeOfflineValue(item)
|
changeOfflineValue(item)
|
||||||
// customDialogInput.dismiss()
|
// customDialogInput.dismiss()
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.setKoButton("Cancelar"){
|
}.setKoButton(getString(R.string.cancel)){
|
||||||
// customDialogInput.dismiss()
|
// customDialogInput.dismiss()
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
|
|
|
@ -14,12 +14,8 @@ import es.verdnatura.presentation.common.Event
|
||||||
import es.verdnatura.presentation.common.ResponseItemVO
|
import es.verdnatura.presentation.common.ResponseItemVO
|
||||||
import es.verdnatura.presentation.view.feature.calidad.model.BuyerListVO
|
import es.verdnatura.presentation.view.feature.calidad.model.BuyerListVO
|
||||||
import es.verdnatura.presentation.view.feature.calidad.model.BuyerVO
|
import es.verdnatura.presentation.view.feature.calidad.model.BuyerVO
|
||||||
import es.verdnatura.presentation.view.feature.historicovehiculo.model.ItemHistoricoVehiculo
|
|
||||||
import es.verdnatura.presentation.view.feature.historicovehiculo.model.ItemHistoricoVehiculoList
|
|
||||||
import es.verdnatura.presentation.view.feature.inventario.model.InventaryListVO
|
import es.verdnatura.presentation.view.feature.inventario.model.InventaryListVO
|
||||||
import es.verdnatura.presentation.view.feature.inventario.model.ItemInventaryVO
|
import es.verdnatura.presentation.view.feature.inventario.model.ItemInventaryVO
|
||||||
import es.verdnatura.presentation.view.feature.sacador.model.MistakeTypeListVO
|
|
||||||
import es.verdnatura.presentation.view.feature.sacador.model.MistakeTypeVO
|
|
||||||
import es.verdnatura.presentation.view.feature.workermistake.model.*
|
import es.verdnatura.presentation.view.feature.workermistake.model.*
|
||||||
import retrofit2.Call
|
import retrofit2.Call
|
||||||
import retrofit2.Callback
|
import retrofit2.Callback
|
||||||
|
@ -31,7 +27,7 @@ class InventaryViewModel(context: Context) : BaseViewModel() {
|
||||||
|
|
||||||
private val getInventaryUserCase: GetInventaryUserCase = GetInventaryUserCase(context)
|
private val getInventaryUserCase: GetInventaryUserCase = GetInventaryUserCase(context)
|
||||||
private val getItemCardUserCase: GetItemCardUserCase = GetItemCardUserCase(context)
|
private val getItemCardUserCase: GetItemCardUserCase = GetItemCardUserCase(context)
|
||||||
private val getWorkerMistakeUserCase:GetWokerMistakeUSerCase= GetWokerMistakeUSerCase(context)
|
private val getWorkerMistakeUserCase: GetWokerMistakeUSerCase = GetWokerMistakeUSerCase(context)
|
||||||
|
|
||||||
private val _inventaryList by lazy { MutableLiveData<InventaryListVO>() }
|
private val _inventaryList by lazy { MutableLiveData<InventaryListVO>() }
|
||||||
val inventaryList: LiveData<InventaryListVO>
|
val inventaryList: LiveData<InventaryListVO>
|
||||||
|
@ -55,21 +51,26 @@ class InventaryViewModel(context: Context) : BaseViewModel() {
|
||||||
val workerFromMistakeList: LiveData<workerFromMistakeList>
|
val workerFromMistakeList: LiveData<workerFromMistakeList>
|
||||||
get() = _workerFromMistakeList
|
get() = _workerFromMistakeList
|
||||||
|
|
||||||
private val _mistakeWorkerList by lazy { MutableLiveData<workerMistakeTypeList>()}
|
private val _mistakeWorkerList by lazy { MutableLiveData<workerMistakeTypeList>() }
|
||||||
val mistakeWorkerList: LiveData<workerMistakeTypeList>
|
val mistakeWorkerList: LiveData<workerMistakeTypeList>
|
||||||
get() = _mistakeWorkerList
|
get() = _mistakeWorkerList
|
||||||
|
|
||||||
private val _responseAddMistake by lazy { MutableLiveData<ResponseItemVO>() }
|
private val _responseAddMistake by lazy { MutableLiveData<ResponseItemVO>() }
|
||||||
val responseAddMistake: LiveData<ResponseItemVO>
|
val responseAddMistake: LiveData<ResponseItemVO>
|
||||||
get() = _responseAddMistake
|
get() = _responseAddMistake
|
||||||
|
|
||||||
//sergio para obtener comprador
|
//sergio para obtener comprador
|
||||||
fun itemShelvingBuyerGet(user:String,password:String){
|
fun itemShelvingBuyerGet(user: String, password: String) {
|
||||||
getInventaryUserCase.itemShelvingBuyerGet(user,password).enqueue(object :
|
getInventaryUserCase.itemShelvingBuyerGet(user, password).enqueue(object :
|
||||||
Callback<List<BuyerVO>> {
|
Callback<List<BuyerVO>> {
|
||||||
override fun onFailure(call: Call<List<BuyerVO>>, t: Throwable) {
|
override fun onFailure(call: Call<List<BuyerVO>>, t: Throwable) {
|
||||||
val listError:ArrayList<BuyerVO> = ArrayList()
|
val listError: ArrayList<BuyerVO> = ArrayList()
|
||||||
listError.add(BuyerVO(isError = true,errorMessage =getMessageFromAllResponse(nameofFunction(this),t.message!!)))
|
listError.add(
|
||||||
|
BuyerVO(
|
||||||
|
isError = true,
|
||||||
|
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||||
|
)
|
||||||
|
)
|
||||||
_buyersList.value = BuyerListVO(listError)
|
_buyersList.value = BuyerListVO(listError)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,12 +78,19 @@ class InventaryViewModel(context: Context) : BaseViewModel() {
|
||||||
call: Call<List<BuyerVO>>,
|
call: Call<List<BuyerVO>>,
|
||||||
response: Response<List<BuyerVO>>
|
response: Response<List<BuyerVO>>
|
||||||
) {
|
) {
|
||||||
if (response.body() != null){
|
if (response.body() != null) {
|
||||||
_buyersList.value = response.body()?.let { BuyerListVO(it) }
|
_buyersList.value = response.body()?.let { BuyerListVO(it) }
|
||||||
}else{
|
} else {
|
||||||
val listError:ArrayList<BuyerVO> = ArrayList()
|
val listError: ArrayList<BuyerVO> = ArrayList()
|
||||||
listError.add(BuyerVO(isError = true,
|
listError.add(
|
||||||
errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message())))
|
BuyerVO(
|
||||||
|
isError = true,
|
||||||
|
errorMessage = getMessageFromAllResponse(
|
||||||
|
nameofFunction(this),
|
||||||
|
response.message()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
_buyersList.value = BuyerListVO(listError)
|
_buyersList.value = BuyerListVO(listError)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -121,35 +129,51 @@ class InventaryViewModel(context: Context) : BaseViewModel() {
|
||||||
})
|
})
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
fun getInventory(user:String,password:String,buyerFk:String,warehouseFk: String){
|
fun getInventory(user: String, password: String, buyerFk: String, warehouseFk: String) {
|
||||||
// getInventaryUserCase.itemShelvingRadar(user,password,buyerFk).enqueue(object :
|
// getInventaryUserCase.itemShelvingRadar(user,password,buyerFk).enqueue(object :
|
||||||
getInventaryUserCase.itemShelvingRadarFilterBuyer(user,password,buyerFk,warehouseFk).enqueue(object :
|
getInventaryUserCase.itemShelvingRadarFilterBuyer(user, password, buyerFk, warehouseFk)
|
||||||
Callback<List<ItemInventaryVO>> {
|
.enqueue(object :
|
||||||
override fun onFailure(call: Call<List<ItemInventaryVO>>, t: Throwable) {
|
Callback<List<ItemInventaryVO>> {
|
||||||
val listError:ArrayList<ItemInventaryVO> = ArrayList()
|
override fun onFailure(call: Call<List<ItemInventaryVO>>, t: Throwable) {
|
||||||
listError.add(ItemInventaryVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!)))
|
val listError: ArrayList<ItemInventaryVO> = ArrayList()
|
||||||
_inventaryList.value = InventaryListVO(listError)
|
listError.add(
|
||||||
}
|
ItemInventaryVO(
|
||||||
|
isError = true,
|
||||||
override fun onResponse(
|
errorMessage = getMessageFromAllResponse(
|
||||||
call: Call<List<ItemInventaryVO>>,
|
nameofFunction(this),
|
||||||
response: Response<List<ItemInventaryVO>>
|
t.message!!
|
||||||
) {
|
)
|
||||||
if (response.body() != null){
|
)
|
||||||
_inventaryList.value = response.body()?.let { InventaryListVO(it) }
|
)
|
||||||
}else{
|
|
||||||
val listError:ArrayList<ItemInventaryVO> = ArrayList()
|
|
||||||
listError.add(ItemInventaryVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message())))
|
|
||||||
_inventaryList.value = InventaryListVO(listError)
|
_inventaryList.value = InventaryListVO(listError)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
})
|
override fun onResponse(
|
||||||
|
call: Call<List<ItemInventaryVO>>,
|
||||||
|
response: Response<List<ItemInventaryVO>>
|
||||||
|
) {
|
||||||
|
if (response.body() != null) {
|
||||||
|
_inventaryList.value = response.body()?.let { InventaryListVO(it) }
|
||||||
|
} else {
|
||||||
|
val listError: ArrayList<ItemInventaryVO> = ArrayList()
|
||||||
|
listError.add(
|
||||||
|
ItemInventaryVO(
|
||||||
|
isError = true,
|
||||||
|
errorMessage = getMessageFromAllResponse(
|
||||||
|
nameofFunction(this),
|
||||||
|
response.message()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
_inventaryList.value = InventaryListVO(listError)
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*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
|
//sergio: se modifica por CAU a itemTrash
|
||||||
// https://cau.verdnatura.es/scp/tickets.php?id=21043 al nuevo procedimiento itemTrash
|
// https://cau.verdnatura.es/scp/tickets.php?id=21043 al nuevo procedimiento itemTrash
|
||||||
|
@ -173,51 +197,73 @@ class InventaryViewModel(context: Context) : BaseViewModel() {
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
//sergio: se modifica por CAU a itemTrash
|
//sergio: se modifica por CAU a itemTrash
|
||||||
fun itemTrash(itemFk:String,warehouseFk:String,user:String,password:String,newValue:String,isTrash: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<Any>{
|
getItemCardUserCase.itemTrash(user, password, itemFk, warehouseFk, newValue, isTrash)
|
||||||
|
.enqueue(object : Callback<Any> {
|
||||||
|
|
||||||
|
|
||||||
override fun onFailure(call: Call<Any>, t: Throwable) {
|
override fun onFailure(call: Call<Any>, t: Throwable) {
|
||||||
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
|
_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())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
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 department_getHasMistakeSalix(token:String)
|
|
||||||
{
|
fun department_getHasMistakeSalix(token: String) {
|
||||||
|
|
||||||
getWorkerMistakeUserCase.department_getHasMistakeSalix(token)
|
getWorkerMistakeUserCase.department_getHasMistakeSalix(token)
|
||||||
|
|
||||||
.enqueue(object : Callback<List<DepartmentMistake>>
|
.enqueue(object : Callback<List<DepartmentMistake>> {
|
||||||
{
|
override fun onFailure(call: Call<List<DepartmentMistake>>, t: Throwable) {
|
||||||
override fun onFailure(call: Call<List<DepartmentMistake>>, t: Throwable)
|
|
||||||
{
|
|
||||||
val listError: ArrayList<DepartmentMistake> = ArrayList()
|
val listError: ArrayList<DepartmentMistake> = ArrayList()
|
||||||
listError.add(DepartmentMistake(isError = true,errorMessage =getMessageFromAllResponse(nameofFunction(this),t.message!!)))
|
listError.add(
|
||||||
|
DepartmentMistake(
|
||||||
|
isError = true,
|
||||||
|
errorMessage = getMessageFromAllResponse(
|
||||||
|
nameofFunction(this),
|
||||||
|
t.message!!
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
_mistakeDepartmentList.value = departmentMistakeList(listError)
|
_mistakeDepartmentList.value = departmentMistakeList(listError)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onResponse(
|
override fun onResponse(
|
||||||
call: Call<List<DepartmentMistake>>,
|
call: Call<List<DepartmentMistake>>,
|
||||||
response: Response<List<DepartmentMistake>>
|
response: Response<List<DepartmentMistake>>
|
||||||
)
|
) {
|
||||||
{
|
if (response.body() != null) {
|
||||||
if (response.body() != null)
|
_mistakeDepartmentList.value =
|
||||||
{
|
response.body()?.let { departmentMistakeList(it) }
|
||||||
_mistakeDepartmentList.value = response.body()?.let { departmentMistakeList(it) }
|
} else {
|
||||||
} else
|
|
||||||
{
|
|
||||||
val listError: ArrayList<DepartmentMistake> = ArrayList()
|
val listError: ArrayList<DepartmentMistake> = ArrayList()
|
||||||
listError.add(DepartmentMistake("0", ""))
|
listError.add(DepartmentMistake("0", ""))
|
||||||
_mistakeDepartmentList.value = departmentMistakeList(listError)
|
_mistakeDepartmentList.value = departmentMistakeList(listError)
|
||||||
|
@ -227,29 +273,32 @@ class InventaryViewModel(context: Context) : BaseViewModel() {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fun department_getHasMistake(usuario:String, password:String)
|
fun department_getHasMistake(usuario: String, password: String) {
|
||||||
{
|
|
||||||
|
|
||||||
getWorkerMistakeUserCase.department_getHasMistake(usuario, password)
|
getWorkerMistakeUserCase.department_getHasMistake(usuario, password)
|
||||||
.enqueue(object : Callback<List<DepartmentMistake>>
|
.enqueue(object : Callback<List<DepartmentMistake>> {
|
||||||
{
|
override fun onFailure(call: Call<List<DepartmentMistake>>, t: Throwable) {
|
||||||
override fun onFailure(call: Call<List<DepartmentMistake>>, t: Throwable)
|
|
||||||
{
|
|
||||||
val listError: ArrayList<DepartmentMistake> = ArrayList()
|
val listError: ArrayList<DepartmentMistake> = ArrayList()
|
||||||
listError.add(DepartmentMistake(isError = true,errorMessage =getMessageFromAllResponse(nameofFunction(this),t.message!!)))
|
listError.add(
|
||||||
|
DepartmentMistake(
|
||||||
|
isError = true,
|
||||||
|
errorMessage = getMessageFromAllResponse(
|
||||||
|
nameofFunction(this),
|
||||||
|
t.message!!
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
_mistakeDepartmentList.value = departmentMistakeList(listError)
|
_mistakeDepartmentList.value = departmentMistakeList(listError)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onResponse(
|
override fun onResponse(
|
||||||
call: Call<List<DepartmentMistake>>,
|
call: Call<List<DepartmentMistake>>,
|
||||||
response: Response<List<DepartmentMistake>>
|
response: Response<List<DepartmentMistake>>
|
||||||
)
|
) {
|
||||||
{
|
if (response.body() != null) {
|
||||||
if (response.body() != null)
|
_mistakeDepartmentList.value =
|
||||||
{
|
response.body()?.let { departmentMistakeList(it) }
|
||||||
_mistakeDepartmentList.value = response.body()?.let { departmentMistakeList(it) }
|
} else {
|
||||||
} else
|
|
||||||
{
|
|
||||||
val listError: ArrayList<DepartmentMistake> = ArrayList()
|
val listError: ArrayList<DepartmentMistake> = ArrayList()
|
||||||
listError.add(DepartmentMistake("0", ""))
|
listError.add(DepartmentMistake("0", ""))
|
||||||
_mistakeDepartmentList.value = departmentMistakeList(listError)
|
_mistakeDepartmentList.value = departmentMistakeList(listError)
|
||||||
|
@ -259,56 +308,89 @@ class InventaryViewModel(context: Context) : BaseViewModel() {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fun worker_getFromHasMistake(usuario:String,password:String,departmentFk:String){
|
fun worker_getFromHasMistake(usuario: String, password: String, departmentFk: String) {
|
||||||
getWorkerMistakeUserCase.worker_getFromHasMistake(usuario,password,departmentFk).enqueue(object :
|
getWorkerMistakeUserCase.worker_getFromHasMistake(usuario, password, departmentFk)
|
||||||
Callback<List<WorkerFromMistake>> {
|
.enqueue(object :
|
||||||
override fun onFailure(call: Call<List<WorkerFromMistake>>, t: Throwable) {
|
Callback<List<WorkerFromMistake>> {
|
||||||
val listError:ArrayList<WorkerFromMistake> = ArrayList()
|
override fun onFailure(call: Call<List<WorkerFromMistake>>, t: Throwable) {
|
||||||
listError.add(WorkerFromMistake(isError = true,errorMessage =getMessageFromAllResponse(nameofFunction(this),t.message!!)))
|
val listError: ArrayList<WorkerFromMistake> = ArrayList()
|
||||||
_workerFromMistakeList.value = workerFromMistakeList(listError)
|
listError.add(
|
||||||
}
|
WorkerFromMistake(
|
||||||
|
isError = true,
|
||||||
override fun onResponse(
|
errorMessage = getMessageFromAllResponse(
|
||||||
call: Call<List<WorkerFromMistake>>,
|
nameofFunction(this),
|
||||||
response: Response<List<WorkerFromMistake>>
|
t.message!!
|
||||||
) {
|
)
|
||||||
if (response.body() != null){
|
)
|
||||||
|
)
|
||||||
_workerFromMistakeList.value = response.body()?.let { workerFromMistakeList(it) }
|
|
||||||
}else{
|
|
||||||
val listError:ArrayList<WorkerFromMistake> = ArrayList()
|
|
||||||
listError.add(WorkerFromMistake(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message())))
|
|
||||||
_workerFromMistakeList.value = workerFromMistakeList(listError)
|
_workerFromMistakeList.value = workerFromMistakeList(listError)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
})
|
override fun onResponse(
|
||||||
|
call: Call<List<WorkerFromMistake>>,
|
||||||
|
response: Response<List<WorkerFromMistake>>
|
||||||
|
) {
|
||||||
|
if (response.body() != null) {
|
||||||
|
|
||||||
|
_workerFromMistakeList.value =
|
||||||
|
response.body()?.let { workerFromMistakeList(it) }
|
||||||
|
} else {
|
||||||
|
val listError: ArrayList<WorkerFromMistake> = ArrayList()
|
||||||
|
listError.add(
|
||||||
|
WorkerFromMistake(
|
||||||
|
isError = true,
|
||||||
|
errorMessage = getMessageFromAllResponse(
|
||||||
|
nameofFunction(this),
|
||||||
|
response.message()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
_workerFromMistakeList.value = workerFromMistakeList(listError)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fun workerMistakeType_get(usuario: String, password: String)
|
fun workerMistakeType_get(usuario: String, password: String) {
|
||||||
{
|
|
||||||
getWorkerMistakeUserCase.workerMistakeType_get(usuario, password)
|
getWorkerMistakeUserCase.workerMistakeType_get(usuario, password)
|
||||||
.enqueue(object : Callback<List<MistakeWorkerType>>
|
.enqueue(object : Callback<List<MistakeWorkerType>> {
|
||||||
{
|
override fun onFailure(call: Call<List<MistakeWorkerType>>, t: Throwable) {
|
||||||
override fun onFailure(call: Call<List<MistakeWorkerType>>, t: Throwable)
|
|
||||||
{
|
|
||||||
val listError: ArrayList<MistakeWorkerType> = ArrayList()
|
val listError: ArrayList<MistakeWorkerType> = ArrayList()
|
||||||
listError.add(MistakeWorkerType(isError=true,errorMessage =getMessageFromAllResponse(nameofFunction(this),t.message!!),id="0", description = ""))
|
listError.add(
|
||||||
|
MistakeWorkerType(
|
||||||
|
isError = true,
|
||||||
|
errorMessage = getMessageFromAllResponse(
|
||||||
|
nameofFunction(this),
|
||||||
|
t.message!!
|
||||||
|
),
|
||||||
|
id = "0",
|
||||||
|
description = ""
|
||||||
|
)
|
||||||
|
)
|
||||||
_mistakeWorkerList.value = workerMistakeTypeList(listError)
|
_mistakeWorkerList.value = workerMistakeTypeList(listError)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onResponse(
|
override fun onResponse(
|
||||||
call: Call<List<MistakeWorkerType>>,
|
call: Call<List<MistakeWorkerType>>,
|
||||||
response: Response<List<MistakeWorkerType>>
|
response: Response<List<MistakeWorkerType>>
|
||||||
)
|
) {
|
||||||
{
|
if (response.body() != null) {
|
||||||
if (response.body() != null)
|
_mistakeWorkerList.value =
|
||||||
{
|
response.body()?.let { workerMistakeTypeList(it) }
|
||||||
_mistakeWorkerList.value = response.body()?.let { workerMistakeTypeList(it) }
|
} else {
|
||||||
} else
|
|
||||||
{
|
|
||||||
val listError: ArrayList<MistakeWorkerType> = ArrayList()
|
val listError: ArrayList<MistakeWorkerType> = ArrayList()
|
||||||
listError.add(MistakeWorkerType(isError=true,errorMessage =getMessageFromAllResponse(nameofFunction(this),response.message()),id="0", description = ""))
|
listError.add(
|
||||||
|
MistakeWorkerType(
|
||||||
|
isError = true,
|
||||||
|
errorMessage = getMessageFromAllResponse(
|
||||||
|
nameofFunction(this),
|
||||||
|
response.message()
|
||||||
|
),
|
||||||
|
id = "0",
|
||||||
|
description = ""
|
||||||
|
)
|
||||||
|
)
|
||||||
_mistakeWorkerList.value = workerMistakeTypeList(listError)
|
_mistakeWorkerList.value = workerMistakeTypeList(listError)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -320,47 +402,51 @@ class InventaryViewModel(context: Context) : BaseViewModel() {
|
||||||
usuario: String,
|
usuario: String,
|
||||||
password: String,
|
password: String,
|
||||||
vUserFk: String,
|
vUserFk: String,
|
||||||
vTypeFk: String,callFunction:String
|
vTypeFk: String
|
||||||
)
|
) {
|
||||||
{
|
|
||||||
getWorkerMistakeUserCase.workerMistake_Add(usuario, password, vUserFk, vTypeFk)
|
getWorkerMistakeUserCase.workerMistake_Add(usuario, password, vUserFk, vTypeFk)
|
||||||
.enqueue(object :
|
.enqueue(object :
|
||||||
Callback<Unit>
|
Callback<Unit> {
|
||||||
{
|
override fun onFailure(call: Call<Unit>, t: Throwable) {
|
||||||
override fun onFailure(call: Call<Unit>, t: Throwable)
|
d("Error message " + t.message)
|
||||||
{
|
|
||||||
d("Error message "+t.message)
|
|
||||||
_responseAddMistake.value = ResponseItemVO(
|
_responseAddMistake.value = ResponseItemVO(
|
||||||
isError = true,
|
isError = true,
|
||||||
errorMessage =getMessageFromAllResponse(nameofFunction(this),t.message!!)
|
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onResponse(
|
override fun onResponse(
|
||||||
call: Call<Unit>,
|
call: Call<Unit>,
|
||||||
response: Response<Unit>
|
response: Response<Unit>
|
||||||
)
|
) {
|
||||||
{
|
if (!response.isSuccessful) {
|
||||||
if (!response.isSuccessful)
|
if (response.code() == 403) {
|
||||||
{
|
|
||||||
if (response.code()==403){
|
|
||||||
_responseAddMistake.value = ResponseItemVO(
|
_responseAddMistake.value = ResponseItemVO(
|
||||||
isError = true,
|
isError = true,
|
||||||
errorMessage = getMessageFromAllResponse(nameofFunction(this),"Usuario sin permisos para realizar la acción")
|
errorMessage = getMessageFromAllResponse(
|
||||||
|
nameofFunction(this),
|
||||||
|
"Usuario sin permisos para realizar la acción"
|
||||||
|
)
|
||||||
)
|
)
|
||||||
}else{
|
} else {
|
||||||
d("Error message:"+{response.errorBody()}+"-"+response.message()+"-"+response.raw())
|
d("Error message:" + { response.errorBody() } + "-" + response.message() + "-" + response.raw())
|
||||||
_responseAddMistake.value = ResponseItemVO(
|
_responseAddMistake.value = ResponseItemVO(
|
||||||
isError = true,
|
isError = true,
|
||||||
errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message())
|
errorMessage = getMessageFromAllResponse(
|
||||||
)
|
nameofFunction(this),
|
||||||
}
|
response.message()
|
||||||
} else
|
)
|
||||||
{
|
)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
|
||||||
// sergio:refactor:solo debería haber un mensaje no un response o errorMessage
|
// sergio:refactor:solo debería haber un mensaje no un response o errorMessage
|
||||||
_responseAddMistake.value =
|
_responseAddMistake.value =
|
||||||
ResponseItemVO(isError = false, response ="Causa del error registrada", errorMessage = "Causa del error registrada")
|
ResponseItemVO(
|
||||||
|
isError = false,
|
||||||
|
response = "Causa del error registrada",
|
||||||
|
errorMessage = "Causa del error registrada"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -57,7 +57,7 @@ class LoginFragment : BaseFragment<FragmentLoginBinding, LoginViewModel>(LoginVi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
binding.edittextServer.setText(getData("base_url"))
|
binding.edittextServer.setText(getData(getString(R.string.baseurl)))
|
||||||
binding.edittextServer.setOnKeyListener { _, keyCode, event ->
|
binding.edittextServer.setOnKeyListener { _, keyCode, event ->
|
||||||
if (keyCode == KeyEvent.KEYCODE_ENTER && event.action == KeyEvent.ACTION_UP) {
|
if (keyCode == KeyEvent.KEYCODE_ENTER && event.action == KeyEvent.ACTION_UP) {
|
||||||
|
|
||||||
|
@ -65,6 +65,17 @@ class LoginFragment : BaseFragment<FragmentLoginBinding, LoginViewModel>(LoginVi
|
||||||
"base_url",
|
"base_url",
|
||||||
binding.edittextServer.text.toString()
|
binding.edittextServer.text.toString()
|
||||||
)
|
)
|
||||||
|
if (binding.edittextServer.text!!.contains("test-app.verdnatura.es")){
|
||||||
|
saveData(
|
||||||
|
"base_urlSalix",
|
||||||
|
"https://test-salix.verdnatura.es/api/"
|
||||||
|
)
|
||||||
|
}else{
|
||||||
|
saveData(
|
||||||
|
"base_urlSalix",
|
||||||
|
"https://salix.verdnatura.es/api/"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
this.hideKeyboard()
|
this.hideKeyboard()
|
||||||
//sergio: deberia lanzar la funcion nueva creada por mi restartapp de BaseFragment. Pero no vuelve a arrancar
|
//sergio: deberia lanzar la funcion nueva creada por mi restartapp de BaseFragment. Pero no vuelve a arrancar
|
||||||
|
@ -139,7 +150,7 @@ class LoginFragment : BaseFragment<FragmentLoginBinding, LoginViewModel>(LoginVi
|
||||||
if (it.IsVersionCritical == 1) {
|
if (it.IsVersionCritical == 1) {
|
||||||
customDialog.setDescription(getString(R.string.updatecritical))
|
customDialog.setDescription(getString(R.string.updatecritical))
|
||||||
} else {
|
} else {
|
||||||
customDialog.setKoButton("Cancelar") {
|
customDialog.setKoButton(getString(R.string.cancel)) {
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
goToMain()
|
goToMain()
|
||||||
}
|
}
|
||||||
|
@ -192,9 +203,9 @@ class LoginFragment : BaseFragment<FragmentLoginBinding, LoginViewModel>(LoginVi
|
||||||
deviceLog_add(
|
deviceLog_add(
|
||||||
binding.edittextUsername.text.toString(),
|
binding.edittextUsername.text.toString(),
|
||||||
binding.edittextPassword.text.toString(),
|
binding.edittextPassword.text.toString(),
|
||||||
"warehouse",
|
getString(R.string.app_name),
|
||||||
getInfoVersionNameApp(),
|
getInfoVersionNameApp(),
|
||||||
getData(ANDROID_ID), "deviceLog_add"
|
getData(ANDROID_ID)
|
||||||
)
|
)
|
||||||
|
|
||||||
if (binding.switchRemember.isChecked) {
|
if (binding.switchRemember.isChecked) {
|
||||||
|
@ -216,7 +227,7 @@ class LoginFragment : BaseFragment<FragmentLoginBinding, LoginViewModel>(LoginVi
|
||||||
}
|
}
|
||||||
if (it.vIsAuthorized == "1" && !it.vMessage.isNullOrEmpty()) {
|
if (it.vIsAuthorized == "1" && !it.vMessage.isNullOrEmpty()) {
|
||||||
binding.splashProgress.visibility = View.GONE
|
binding.splashProgress.visibility = View.GONE
|
||||||
customDialog.setTitle("Mensaje").setDescription(it.vMessage)
|
customDialog.setTitle(getString(R.string.info)).setDescription(it.vMessage)
|
||||||
.setOkButton(getString(R.string.close)) {
|
.setOkButton(getString(R.string.close)) {
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
/* binding.splashProgress.visibility = View.VISIBLE
|
/* binding.splashProgress.visibility = View.VISIBLE
|
||||||
|
@ -254,7 +265,7 @@ class LoginFragment : BaseFragment<FragmentLoginBinding, LoginViewModel>(LoginVi
|
||||||
customDialog.setTitle(getString(R.string.error))
|
customDialog.setTitle(getString(R.string.error))
|
||||||
.setDescription(it.errorMessage)
|
.setDescription(it.errorMessage)
|
||||||
.setOkButton(
|
.setOkButton(
|
||||||
"Aceptar"
|
getString(R.string.accept)
|
||||||
) {
|
) {
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
getVersion()
|
getVersion()
|
||||||
|
@ -284,7 +295,7 @@ class LoginFragment : BaseFragment<FragmentLoginBinding, LoginViewModel>(LoginVi
|
||||||
event.getContentIfNotHandled().notNull {
|
event.getContentIfNotHandled().notNull {
|
||||||
|
|
||||||
if (it.list.isEmpty()) {
|
if (it.list.isEmpty()) {
|
||||||
"Tiene que seleccionar impresora.".toast(context)
|
getString(R.string.selectPrinter).toast(context)
|
||||||
} else {
|
} else {
|
||||||
if (!it.list.get(0).isError) {
|
if (!it.list.get(0).isError) {
|
||||||
saveDataInt(PRINTERFK, it.list.get(0).id!!)
|
saveDataInt(PRINTERFK, it.list.get(0).id!!)
|
||||||
|
@ -309,7 +320,7 @@ class LoginFragment : BaseFragment<FragmentLoginBinding, LoginViewModel>(LoginVi
|
||||||
// .setDescription(it.errorMessage + ". Puedes continuar pero algunas funcionalidades no estarán disponibles.")
|
// .setDescription(it.errorMessage + ". Puedes continuar pero algunas funcionalidades no estarán disponibles.")
|
||||||
.setDescription(it.errorMessage)
|
.setDescription(it.errorMessage)
|
||||||
.setOkButton(
|
.setOkButton(
|
||||||
"Entendido"
|
getString(R.string.accept)
|
||||||
) {
|
) {
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
//getVersion()
|
//getVersion()
|
||||||
|
|
|
@ -236,7 +236,7 @@ class LoginViewModel(context: Context) : BaseViewModel()
|
||||||
|
|
||||||
|
|
||||||
fun deviceLog_add(
|
fun deviceLog_add(
|
||||||
user: String, password: String, app: String, versionApp: String, android_id: String,callFunction: String
|
user: String, password: String, app: String, versionApp: String, android_id: String
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
getLoginUserCase.deviceLog_add(user, password, app, versionApp, android_id)
|
getLoginUserCase.deviceLog_add(user, password, app, versionApp, android_id)
|
||||||
|
@ -248,7 +248,7 @@ class LoginViewModel(context: Context) : BaseViewModel()
|
||||||
if (!response.isSuccessful)
|
if (!response.isSuccessful)
|
||||||
{
|
{
|
||||||
|
|
||||||
messageError(callFunction,response.message())
|
messageError(nameofFunction(this),response.message())
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -256,7 +256,7 @@ class LoginViewModel(context: Context) : BaseViewModel()
|
||||||
override fun onFailure(call: Call<Void>, t: Throwable)
|
override fun onFailure(call: Call<Void>, t: Throwable)
|
||||||
{
|
{
|
||||||
|
|
||||||
messageError(callFunction,t.message!!)
|
messageError(nameofFunction(this),t.message!!)
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
|
@ -545,7 +545,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
finish()
|
finish()
|
||||||
|
|
||||||
}.setKoButton("Cancelar") {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
|
|
||||||
|
@ -674,7 +674,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
||||||
message.toast(this, Toast.LENGTH_SHORT)
|
message.toast(this, Toast.LENGTH_SHORT)
|
||||||
} else {
|
} else {
|
||||||
customDialog.setTitle(titleWithError).setDescription(message)
|
customDialog.setTitle(titleWithError).setDescription(message)
|
||||||
.setOkButton("Aceptar") {
|
.setOkButton(getString(R.string.accept)) {
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
}
|
}
|
||||||
|
|
|
@ -170,7 +170,7 @@ class ExpeditionScanFragment (
|
||||||
viewModel.expeditionScanDel(getData(USER),
|
viewModel.expeditionScanDel(getData(USER),
|
||||||
getData(PASSWORD),itemExpeditionScanVO.id)
|
getData(PASSWORD),itemExpeditionScanVO.id)
|
||||||
customDialogTwoButtons.dismiss()
|
customDialogTwoButtons.dismiss()
|
||||||
}.setKoButton("Cancelar"){
|
}.setKoButton(getString(R.string.cancel)){
|
||||||
customDialogTwoButtons.dismiss()
|
customDialogTwoButtons.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ class ExpeditionTruckListFragment : BaseFragment<FragmentExpeditionTruckListBin
|
||||||
override fun init() {
|
override fun init() {
|
||||||
customDialogHor = CustomDialogHour(requireContext())
|
customDialogHor = CustomDialogHour(requireContext())
|
||||||
binding.splashProgress.visibility = View.VISIBLE
|
binding.splashProgress.visibility = View.VISIBLE
|
||||||
binding.mainToolbar.toolbarTitle.text = "PScan: "+getCURDATE()
|
binding.mainToolbar.toolbarTitle.text = getString(R.string.psScan)+getCURDATE()
|
||||||
//binding.mainToolbar.backButton.visibility = View.GONE
|
//binding.mainToolbar.backButton.visibility = View.GONE
|
||||||
setToolBar()
|
setToolBar()
|
||||||
////Log.i("VERDNATURA:","1-cargamos expediciones")
|
////Log.i("VERDNATURA:","1-cargamos expediciones")
|
||||||
|
@ -111,7 +111,7 @@ class ExpeditionTruckListFragment : BaseFragment<FragmentExpeditionTruckListBin
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun addTruck(){
|
private fun addTruck(){
|
||||||
customDialogHor.setTitle("Nuevo Camión").setOkButton("Guardar"){
|
customDialogHor.setTitle(getString(R.string.newTruck)).setOkButton(getString(R.string.save)){
|
||||||
ma.hideKeyboard(customDialogHor.getDestinoEditText())
|
ma.hideKeyboard(customDialogHor.getDestinoEditText())
|
||||||
if (!customDialogHor.getDestinoValue().isNullOrEmpty() && !customDialogHor.getHoraValue().isNullOrEmpty()){
|
if (!customDialogHor.getDestinoValue().isNullOrEmpty() && !customDialogHor.getHoraValue().isNullOrEmpty()){
|
||||||
viewModel.expeditionTruckAdd(getData(USER),
|
viewModel.expeditionTruckAdd(getData(USER),
|
||||||
|
@ -121,7 +121,7 @@ class ExpeditionTruckListFragment : BaseFragment<FragmentExpeditionTruckListBin
|
||||||
}
|
}
|
||||||
ma.hideKeyboard(customDialogHor.getDestinoEditText())
|
ma.hideKeyboard(customDialogHor.getDestinoEditText())
|
||||||
customDialogHor.dismiss()
|
customDialogHor.dismiss()
|
||||||
}.setKoButton("Cancelar"){
|
}.setKoButton(getString(R.string.cancel)){
|
||||||
customDialogHor.dismiss()
|
customDialogHor.dismiss()
|
||||||
}.setHoraValue("").setDestinoValue("").show()
|
}.setHoraValue("").setDestinoValue("").show()
|
||||||
|
|
||||||
|
|
|
@ -69,14 +69,10 @@ class ParkingFragment (var menuOrigin:String): BaseFragment<FragmentParkingBindi
|
||||||
with(viewModel){
|
with(viewModel){
|
||||||
response.observe(viewLifecycleOwner, Observer {
|
response.observe(viewLifecycleOwner, Observer {
|
||||||
if (it.isError){
|
if (it.isError){
|
||||||
// mperror?.start()
|
|
||||||
// binding.splashProgress.visibility = View.GONE
|
|
||||||
ma.messageWithSound(it.errorMessage, isError = true,isPlayed = true)
|
ma.messageWithSound(it.errorMessage, isError = true,isPlayed = true)
|
||||||
/*customDialog.setTitle(getString(R.string.error)).setDescription(it.errorMessage).setOkButton(getString(R.string.close)){
|
|
||||||
customDialog.dismiss()
|
|
||||||
}.show()*/
|
|
||||||
}else{
|
}else{
|
||||||
ma.messageWithSound(message="Parking ok", isError = false,isPlayed = false, isToasted = true)
|
ma.messageWithSound(message=getString(R.string.Aparcado), isError = false,isPlayed = false, isToasted = true)
|
||||||
numParking -= 1
|
numParking -= 1
|
||||||
if (numParking <= 0) {
|
if (numParking <= 0) {
|
||||||
// binding.splashProgress.visibility = View.GONE
|
// binding.splashProgress.visibility = View.GONE
|
||||||
|
|
|
@ -42,21 +42,21 @@ class ParkingViewModel(context: Context) : BaseViewModel() {
|
||||||
fun parking(usuario: String,password: String,scanItem: String,parking:String){
|
fun parking(usuario: String,password: String,scanItem: String,parking:String){
|
||||||
ProgressLoading(VISIBLE)
|
ProgressLoading(VISIBLE)
|
||||||
getUbicadorUserCase.shelvingPark(usuario,password,scanItem,parking).enqueue(object :
|
getUbicadorUserCase.shelvingPark(usuario,password,scanItem,parking).enqueue(object :
|
||||||
Callback<String> {
|
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!!))
|
_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>) {
|
||||||
ProgressLoading(GONE)
|
ProgressLoading(GONE)
|
||||||
if (response.body() == null){
|
/*if (response.body() == null){
|
||||||
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
|
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
|
||||||
}else{
|
}else{*/
|
||||||
if (response.body() == "Finish")
|
if (response.isSuccessful)
|
||||||
_response.value = ResponseItemVO(isError = false,response = response.body()!!)
|
_response.value = ResponseItemVO(isError = false,response = response.message())
|
||||||
else
|
else
|
||||||
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
|
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,17 +48,17 @@ class ParkingSaleViewModel(context: Context) : BaseViewModel() {
|
||||||
fun parking(usuario: String,password: String,scanItem: String,parking:String){
|
fun parking(usuario: String,password: String,scanItem: String,parking:String){
|
||||||
ProgressLoading(VISIBLE)
|
ProgressLoading(VISIBLE)
|
||||||
getUbicadorUserCase.shelvingPark(usuario,password,scanItem,parking).enqueue(object :
|
getUbicadorUserCase.shelvingPark(usuario,password,scanItem,parking).enqueue(object :
|
||||||
Callback<String> {
|
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!!))
|
_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>) {
|
||||||
ProgressLoading(GONE)
|
ProgressLoading(GONE)
|
||||||
if (!response.isSuccessful){
|
if (!response.isSuccessful){
|
||||||
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
|
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
|
||||||
}else{
|
}else{
|
||||||
_response.value = ResponseItemVO(isError = false,response = "Parking ok")
|
_response.value = ResponseItemVO(isError = false,response = response.message())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -214,7 +214,7 @@ class EndSacadorFragment(
|
||||||
if (it.isError) {
|
if (it.isError) {
|
||||||
ma.messageWithSound(it.errorMessage, true, false)
|
ma.messageWithSound(it.errorMessage, true, false)
|
||||||
/* customDialog.setTitle(getString(R.string.error)).setDescription(it.errorMessage)
|
/* customDialog.setTitle(getString(R.string.error)).setDescription(it.errorMessage)
|
||||||
.setOkButton("Aceptar") {
|
.setOkButton(getString(R.string.accept)) {
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.show()*/
|
}.show()*/
|
||||||
}
|
}
|
||||||
|
@ -242,7 +242,7 @@ class EndSacadorFragment(
|
||||||
if (it.isError) {
|
if (it.isError) {
|
||||||
ma.messageWithSound(it.errorMessage, true, false)
|
ma.messageWithSound(it.errorMessage, true, false)
|
||||||
/* customDialog.setTitle(getString(R.string.error)).setDescription(it.errorMessage)
|
/* customDialog.setTitle(getString(R.string.error)).setDescription(it.errorMessage)
|
||||||
.setOkButton("Aceptar") {
|
.setOkButton(getString(R.string.accept)) {
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.show()*/
|
}.show()*/
|
||||||
} else {
|
} else {
|
||||||
|
@ -558,7 +558,7 @@ class EndSacadorFragment(
|
||||||
binding.splashProgress.visibility = View.VISIBLE
|
binding.splashProgress.visibility = View.VISIBLE
|
||||||
viewModel.sectorCollectionSaleGroup_add(
|
viewModel.sectorCollectionSaleGroup_add(
|
||||||
getData(USER), getData(PASSWORD), ticketFk,
|
getData(USER), getData(PASSWORD), ticketFk,
|
||||||
collection.collectionFk, "sectorCollectionSaleGroup_add"
|
collection.collectionFk
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -674,7 +674,7 @@ class EndSacadorFragment(
|
||||||
binding.splashProgress.visibility = VISIBLE
|
binding.splashProgress.visibility = VISIBLE
|
||||||
viewModel.saleTracking_addPrevOK(
|
viewModel.saleTracking_addPrevOK(
|
||||||
usuario = getData(USER), password = getData(PASSWORD),
|
usuario = getData(USER), password = getData(PASSWORD),
|
||||||
vSectorCollectionFk = collection.collectionFk, callFunction = "saleTracking_addPrevOK"
|
vSectorCollectionFk = collection.collectionFk
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -777,8 +777,8 @@ class EndSacadorFragment(
|
||||||
usuario = getData(USER),
|
usuario = getData(USER),
|
||||||
password = getData(PASSWORD),
|
password = getData(PASSWORD),
|
||||||
vSaleFk = sales[position].idMovimiento,
|
vSaleFk = sales[position].idMovimiento,
|
||||||
vIsChecked = if (sales[position].picked == sales[position].quantity) "1" else "0",
|
vIsChecked = if (sales[position].picked == sales[position].quantity) "1" else "0"
|
||||||
callFunction = "saleTracking_updateIsChecked"
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (sales[position].picked == 0) {
|
if (sales[position].picked == 0) {
|
||||||
|
@ -786,8 +786,8 @@ class EndSacadorFragment(
|
||||||
usuario = getData(USER),
|
usuario = getData(USER),
|
||||||
password = getData(PASSWORD),
|
password = getData(PASSWORD),
|
||||||
vSaleFk = sales[position].idMovimiento,
|
vSaleFk = sales[position].idMovimiento,
|
||||||
vIsChecked = if (sales[position].picked == sales[position].quantity) "1" else "0",
|
vIsChecked = if (sales[position].picked == sales[position].quantity) "1" else "0"
|
||||||
callFunction = "saleTracking_updateIsChecked"
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -819,8 +819,7 @@ class EndSacadorFragment(
|
||||||
usuario = getData(USER),
|
usuario = getData(USER),
|
||||||
password = getData(PASSWORD),
|
password = getData(PASSWORD),
|
||||||
saleFk = sales[position].idMovimiento,
|
saleFk = sales[position].idMovimiento,
|
||||||
visible = sales[position].quantity.toString(),
|
visible = sales[position].quantity.toString()
|
||||||
"itemShelving_updateFromSale"
|
|
||||||
)
|
)
|
||||||
positionUnmarked = position
|
positionUnmarked = position
|
||||||
//sergio: anterior previa
|
//sergio: anterior previa
|
||||||
|
@ -834,7 +833,7 @@ class EndSacadorFragment(
|
||||||
//setTotalLines()
|
//setTotalLines()
|
||||||
scanRequest()
|
scanRequest()
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.setKoButton("Cancelar") {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
scanRequest()
|
scanRequest()
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
|
@ -858,8 +857,7 @@ class EndSacadorFragment(
|
||||||
password = getData(PASSWORD),
|
password = getData(PASSWORD),
|
||||||
itemFk = sales[position].itemFk,
|
itemFk = sales[position].itemFk,
|
||||||
quantity = quantityGet,
|
quantity = quantityGet,
|
||||||
shelvingFk = sales[position].carros[shelvingPosition].shelving,
|
shelvingFk = sales[position].carros[shelvingPosition].shelving
|
||||||
callFunction = "itemPlacementSupplyAiming"
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1030,7 +1028,7 @@ class EndSacadorFragment(
|
||||||
/* private fun showScannerParking(ticket: String) {
|
/* private fun showScannerParking(ticket: String) {
|
||||||
|
|
||||||
customDialogInputParking.setTitle("Parking").setDescription("Escanea el parking")
|
customDialogInputParking.setTitle("Parking").setDescription("Escanea el parking")
|
||||||
.setOkButton("Aceptar") {
|
.setOkButton(getString(R.string.accept)) {
|
||||||
if (!customDialogInputParking.getValue().isNullOrEmpty()) {
|
if (!customDialogInputParking.getValue().isNullOrEmpty()) {
|
||||||
//findSale(customDialogInput.getValue(),index)
|
//findSale(customDialogInput.getValue(),index)
|
||||||
parkingTicket(ticket, customDialogInputParking.getValue())
|
parkingTicket(ticket, customDialogInputParking.getValue())
|
||||||
|
@ -1040,7 +1038,7 @@ class EndSacadorFragment(
|
||||||
scanRequest()
|
scanRequest()
|
||||||
customDialogInputParking.dismiss()
|
customDialogInputParking.dismiss()
|
||||||
hideKeyboards()
|
hideKeyboards()
|
||||||
}.setKoButton("Cancelar") {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
customDialogInputParking.dismiss()
|
customDialogInputParking.dismiss()
|
||||||
}.setValue("").show()
|
}.setValue("").show()
|
||||||
customDialogInputParking.getEditText().requestFocus()
|
customDialogInputParking.getEditText().requestFocus()
|
||||||
|
@ -1063,7 +1061,7 @@ class EndSacadorFragment(
|
||||||
/*private fun showScannerTicket() {
|
/*private fun showScannerTicket() {
|
||||||
|
|
||||||
customDialogInput.setTitle("Ticket a aparcar").setDescription("Escanea el ticket a aparcar")
|
customDialogInput.setTitle("Ticket a aparcar").setDescription("Escanea el ticket a aparcar")
|
||||||
.setOkButton("Aceptar") {
|
.setOkButton(getString(R.string.accept)) {
|
||||||
if (!customDialogInput.getValue().isNullOrEmpty()) {
|
if (!customDialogInput.getValue().isNullOrEmpty()) {
|
||||||
showScannerParking(customDialogInput.getValue())
|
showScannerParking(customDialogInput.getValue())
|
||||||
|
|
||||||
|
@ -1072,7 +1070,7 @@ class EndSacadorFragment(
|
||||||
scanRequest()
|
scanRequest()
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
hideKeyboards()
|
hideKeyboards()
|
||||||
}.setKoButton("Cancelar") {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
}.setValue("").show()
|
}.setValue("").show()
|
||||||
customDialogInput.getEditText().requestFocus()
|
customDialogInput.getEditText().requestFocus()
|
||||||
|
@ -1096,7 +1094,7 @@ class EndSacadorFragment(
|
||||||
private fun showScanner(index: Int, sale: PreSacadorItemVO) {
|
private fun showScanner(index: Int, sale: PreSacadorItemVO) {
|
||||||
|
|
||||||
customDialogInput.setTitle("" + sale.itemFk)
|
customDialogInput.setTitle("" + sale.itemFk)
|
||||||
.setDescription("Escanea el carro para el item seleccionado").setOkButton("Aceptar") {
|
.setDescription("Escanea el carro para el item seleccionado").setOkButton(getString(R.string.accept)) {
|
||||||
if (!customDialogInput.getValue().isNullOrEmpty()) {
|
if (!customDialogInput.getValue().isNullOrEmpty()) {
|
||||||
findSale(customDialogInput.getValue(), index)
|
findSale(customDialogInput.getValue(), index)
|
||||||
}
|
}
|
||||||
|
@ -1104,7 +1102,7 @@ class EndSacadorFragment(
|
||||||
scanRequest()
|
scanRequest()
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
hideKeyboards()
|
hideKeyboards()
|
||||||
}.setKoButton("Cancelar") {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
}.setValue("").show()
|
}.setValue("").show()
|
||||||
customDialogInput.getEditText().requestFocus()
|
customDialogInput.getEditText().requestFocus()
|
||||||
|
@ -1264,7 +1262,7 @@ class EndSacadorFragment(
|
||||||
getString(R.string.Agregar)
|
getString(R.string.Agregar)
|
||||||
)
|
)
|
||||||
|
|
||||||
}.setKoButton("Cancelar") {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
scanRequest()
|
scanRequest()
|
||||||
customDialogThreeButtons.dismiss()
|
customDialogThreeButtons.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
|
@ -1311,7 +1309,7 @@ class EndSacadorFragment(
|
||||||
quantity = totalQuantity.toString(),
|
quantity = totalQuantity.toString(),
|
||||||
warehouseFk = getData(WAREHOUSEFK),
|
warehouseFk = getData(WAREHOUSEFK),
|
||||||
type = "FALSE",
|
type = "FALSE",
|
||||||
originalQuantity = quantity, callFunction = "collectionMissingTrash"
|
originalQuantity = quantity
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1361,7 +1359,7 @@ class EndSacadorFragment(
|
||||||
scanRequest()
|
scanRequest()
|
||||||
customDialogThreeButtons.dismiss()
|
customDialogThreeButtons.dismiss()
|
||||||
}
|
}
|
||||||
}.setKoButton("Cancelar") {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
scanRequest()
|
scanRequest()
|
||||||
customDialogThreeButtons.dismiss()
|
customDialogThreeButtons.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
|
@ -1426,7 +1424,7 @@ class EndSacadorFragment(
|
||||||
quantity = totalQuantity.toString(),
|
quantity = totalQuantity.toString(),
|
||||||
warehouseFk = getData(WAREHOUSEFK),
|
warehouseFk = getData(WAREHOUSEFK),
|
||||||
type = "FALSE",
|
type = "FALSE",
|
||||||
originalQuantity = quantity, callFunction = "collectionMissingTrash"
|
originalQuantity = quantity
|
||||||
)
|
)
|
||||||
//sales[position].originalQuantity = quantity
|
//sales[position].originalQuantity = quantity
|
||||||
try {
|
try {
|
||||||
|
@ -1466,7 +1464,7 @@ class EndSacadorFragment(
|
||||||
quantity = totalQuantity.toString(),
|
quantity = totalQuantity.toString(),
|
||||||
warehouseFk = getData(WAREHOUSEFK),
|
warehouseFk = getData(WAREHOUSEFK),
|
||||||
type = "TRUE",
|
type = "TRUE",
|
||||||
originalQuantity = quantity, callFunction = "collectionMissingTrash"
|
originalQuantity = quantity
|
||||||
)
|
)
|
||||||
//sales[position].originalQuantity = quantity
|
//sales[position].originalQuantity = quantity
|
||||||
try {
|
try {
|
||||||
|
@ -1508,7 +1506,7 @@ class EndSacadorFragment(
|
||||||
quantity = totalQuantity.toString(),
|
quantity = totalQuantity.toString(),
|
||||||
warehouseFk = getData(WAREHOUSEFK),
|
warehouseFk = getData(WAREHOUSEFK),
|
||||||
type = "reject",
|
type = "reject",
|
||||||
originalQuantity = quantity, callFunction = "collectionMissingTrash"
|
originalQuantity = quantity
|
||||||
)
|
)
|
||||||
|
|
||||||
//enviar mensaje a salix
|
//enviar mensaje a salix
|
||||||
|
@ -1541,8 +1539,8 @@ class EndSacadorFragment(
|
||||||
usuario = getData(USER),
|
usuario = getData(USER),
|
||||||
password = getData(PASSWORD),
|
password = getData(PASSWORD),
|
||||||
saleFk = sales[position].idMovimiento,
|
saleFk = sales[position].idMovimiento,
|
||||||
quantity = quantity,
|
quantity = quantity
|
||||||
callFunction = "collection_increaseQuantity"
|
|
||||||
)
|
)
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
@ -1579,8 +1577,7 @@ class EndSacadorFragment(
|
||||||
usuario = getData(USER),
|
usuario = getData(USER),
|
||||||
password = getData(PASSWORD),
|
password = getData(PASSWORD),
|
||||||
saleFk = sales[position].idMovimiento,
|
saleFk = sales[position].idMovimiento,
|
||||||
quantity = quantity,
|
quantity = quantity
|
||||||
callFunction = "collection_increaseQuantity"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,7 @@ class InitPreSacadorFragment (
|
||||||
iconAdd.drawable -> {
|
iconAdd.drawable -> {
|
||||||
binding.splashProgress.visibility = View.VISIBLE
|
binding.splashProgress.visibility = View.VISIBLE
|
||||||
viewModel.sectorCollection_new(getData(USER),
|
viewModel.sectorCollection_new(getData(USER),
|
||||||
getData(PASSWORD),getData(SECTORFK),"sectorCollection_new")
|
getData(PASSWORD),getData(SECTORFK))
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -177,7 +177,7 @@ class InitPreSacadorFragment (
|
||||||
} else {
|
} else {
|
||||||
customDialog.setTitle("Atención")
|
customDialog.setTitle("Atención")
|
||||||
.setDescription("La colección " + collection + " sigue pendiente de preparar")
|
.setDescription("La colección " + collection + " sigue pendiente de preparar")
|
||||||
.setOkButton("Aceptar") {
|
.setOkButton(getString(R.string.accept)) {
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
}
|
}
|
||||||
|
|
|
@ -179,7 +179,7 @@ class PreSacadorFragment :
|
||||||
if (it.isError) {
|
if (it.isError) {
|
||||||
ma.messageWithSound(it.errorMessage,true,false)
|
ma.messageWithSound(it.errorMessage,true,false)
|
||||||
/* customDialog.setTitle(getString(R.string.error)).setDescription(it.errorMessage)
|
/* customDialog.setTitle(getString(R.string.error)).setDescription(it.errorMessage)
|
||||||
.setOkButton("Aceptar") {
|
.setOkButton(getString(R.string.accept)) {
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.show()*/
|
}.show()*/
|
||||||
}
|
}
|
||||||
|
@ -201,7 +201,7 @@ class PreSacadorFragment :
|
||||||
if (it.isError) {
|
if (it.isError) {
|
||||||
ma.messageWithSound(it.errorMessage,true,false)
|
ma.messageWithSound(it.errorMessage,true,false)
|
||||||
/* customDialog.setTitle(getString(R.string.error)).setDescription(it.errorMessage)
|
/* customDialog.setTitle(getString(R.string.error)).setDescription(it.errorMessage)
|
||||||
.setOkButton("Aceptar") {
|
.setOkButton(getString(R.string.accept)) {
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.show()*/
|
}.show()*/
|
||||||
} else {
|
} else {
|
||||||
|
@ -413,7 +413,7 @@ class PreSacadorFragment :
|
||||||
|
|
||||||
/* customDialog.setTitle("Pre Sacador")
|
/* customDialog.setTitle("Pre Sacador")
|
||||||
.setDescription("No hemos podido obtener movimientos para el ticket escaneado")
|
.setDescription("No hemos podido obtener movimientos para el ticket escaneado")
|
||||||
.setKoButton("Cancelar") {
|
.setKoButton(getString(R.string.cancel)) {
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.show()*/
|
}.show()*/
|
||||||
} else {
|
} else {
|
||||||
|
@ -604,7 +604,7 @@ class PreSacadorFragment :
|
||||||
vIsChecked = if (sales[position].picked == sales[position].quantity) "1" else "0",
|
vIsChecked = if (sales[position].picked == sales[position].quantity) "1" else "0",
|
||||||
vOriginalQuantity = sales[position].picked.toString(),
|
vOriginalQuantity = sales[position].picked.toString(),
|
||||||
vStateFk = PRESACADOR,
|
vStateFk = PRESACADOR,
|
||||||
vBuyFk = originalItemScan, callFunction = "saleTrackingReplace"
|
vBuyFk = originalItemScan
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -615,7 +615,7 @@ class PreSacadorFragment :
|
||||||
vIsChecked = if (sales[position].picked == sales[position].quantity) "1" else "0",
|
vIsChecked = if (sales[position].picked == sales[position].quantity) "1" else "0",
|
||||||
vOriginalQuantity = sales[position].picked.toString(),
|
vOriginalQuantity = sales[position].picked.toString(),
|
||||||
vStateFk = PRESACADOR,
|
vStateFk = PRESACADOR,
|
||||||
vBuyFk = originalItemScan, callFunction = "saleTrackingReplace"
|
vBuyFk = originalItemScan
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -640,7 +640,7 @@ class PreSacadorFragment :
|
||||||
setTotalLines()
|
setTotalLines()
|
||||||
scanRequest()
|
scanRequest()
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.setKoButton("Cancelar") {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
scanRequest()
|
scanRequest()
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
|
@ -664,8 +664,8 @@ class PreSacadorFragment :
|
||||||
password = getData(PASSWORD),
|
password = getData(PASSWORD),
|
||||||
itemFk = sales[position].itemFk,
|
itemFk = sales[position].itemFk,
|
||||||
quantity = quantityGet,
|
quantity = quantityGet,
|
||||||
shelvingFk = sales[position].carros[shelvingPosition].shelving,
|
shelvingFk = sales[position].carros[shelvingPosition].shelving
|
||||||
callFunction = "itemPlacementSupplyAiming"
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -830,7 +830,7 @@ class PreSacadorFragment :
|
||||||
/* private fun showScannerParking(ticket: String) {
|
/* private fun showScannerParking(ticket: String) {
|
||||||
|
|
||||||
customDialogInputParking.setTitle("Parking").setDescription("Escanea el parking")
|
customDialogInputParking.setTitle("Parking").setDescription("Escanea el parking")
|
||||||
.setOkButton("Aceptar") {
|
.setOkButton(getString(R.string.accept)) {
|
||||||
if (!customDialogInputParking.getValue().isNullOrEmpty()) {
|
if (!customDialogInputParking.getValue().isNullOrEmpty()) {
|
||||||
//findSale(customDialogInput.getValue(),index)
|
//findSale(customDialogInput.getValue(),index)
|
||||||
parkingTicket(ticket, customDialogInputParking.getValue())
|
parkingTicket(ticket, customDialogInputParking.getValue())
|
||||||
|
@ -840,7 +840,7 @@ class PreSacadorFragment :
|
||||||
scanRequest()
|
scanRequest()
|
||||||
customDialogInputParking.dismiss()
|
customDialogInputParking.dismiss()
|
||||||
hideKeyboards()
|
hideKeyboards()
|
||||||
}.setKoButton("Cancelar") {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
customDialogInputParking.dismiss()
|
customDialogInputParking.dismiss()
|
||||||
}.setValue("").show()
|
}.setValue("").show()
|
||||||
customDialogInputParking.getEditText().requestFocus()
|
customDialogInputParking.getEditText().requestFocus()
|
||||||
|
@ -863,7 +863,7 @@ class PreSacadorFragment :
|
||||||
/*private fun showScannerTicket() {
|
/*private fun showScannerTicket() {
|
||||||
|
|
||||||
customDialogInput.setTitle("Ticket a aparcar").setDescription("Escanea el ticket a aparcar")
|
customDialogInput.setTitle("Ticket a aparcar").setDescription("Escanea el ticket a aparcar")
|
||||||
.setOkButton("Aceptar") {
|
.setOkButton(getString(R.string.accept)) {
|
||||||
if (!customDialogInput.getValue().isNullOrEmpty()) {
|
if (!customDialogInput.getValue().isNullOrEmpty()) {
|
||||||
showScannerParking(customDialogInput.getValue())
|
showScannerParking(customDialogInput.getValue())
|
||||||
|
|
||||||
|
@ -872,7 +872,7 @@ class PreSacadorFragment :
|
||||||
scanRequest()
|
scanRequest()
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
hideKeyboards()
|
hideKeyboards()
|
||||||
}.setKoButton("Cancelar") {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
}.setValue("").show()
|
}.setValue("").show()
|
||||||
customDialogInput.getEditText().requestFocus()
|
customDialogInput.getEditText().requestFocus()
|
||||||
|
@ -896,7 +896,7 @@ class PreSacadorFragment :
|
||||||
private fun showScanner(index: Int, sale: PreSacadorItemVO) {
|
private fun showScanner(index: Int, sale: PreSacadorItemVO) {
|
||||||
|
|
||||||
customDialogInput.setTitle("" + sale.itemFk)
|
customDialogInput.setTitle("" + sale.itemFk)
|
||||||
.setDescription("Escanea el carro para el item seleccionado").setOkButton("Aceptar") {
|
.setDescription("Escanea el carro para el item seleccionado").setOkButton(getString(R.string.accept)) {
|
||||||
if (!customDialogInput.getValue().isNullOrEmpty()) {
|
if (!customDialogInput.getValue().isNullOrEmpty()) {
|
||||||
findSale(customDialogInput.getValue(), index)
|
findSale(customDialogInput.getValue(), index)
|
||||||
}
|
}
|
||||||
|
@ -904,7 +904,7 @@ class PreSacadorFragment :
|
||||||
scanRequest()
|
scanRequest()
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
hideKeyboards()
|
hideKeyboards()
|
||||||
}.setKoButton("Cancelar") {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
}.setValue("").show()
|
}.setValue("").show()
|
||||||
customDialogInput.getEditText().requestFocus()
|
customDialogInput.getEditText().requestFocus()
|
||||||
|
@ -1055,7 +1055,7 @@ class PreSacadorFragment :
|
||||||
getString(R.string.Agregar)
|
getString(R.string.Agregar)
|
||||||
)
|
)
|
||||||
|
|
||||||
}.setKoButton("Cancelar") {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
scanRequest()
|
scanRequest()
|
||||||
customDialogThreeButtons.dismiss()
|
customDialogThreeButtons.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
|
@ -1101,7 +1101,7 @@ class PreSacadorFragment :
|
||||||
quantity = totalQuantity.toString(),
|
quantity = totalQuantity.toString(),
|
||||||
warehouseFk = getData(WAREHOUSEFK),
|
warehouseFk = getData(WAREHOUSEFK),
|
||||||
type = "FALSE",
|
type = "FALSE",
|
||||||
originalQuantity = quantity, callFunction = "collectionMissingTrash"
|
originalQuantity = quantity
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1151,7 +1151,7 @@ class PreSacadorFragment :
|
||||||
scanRequest()
|
scanRequest()
|
||||||
customDialogThreeButtons.dismiss()
|
customDialogThreeButtons.dismiss()
|
||||||
}
|
}
|
||||||
}.setKoButton("Cancelar") {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
scanRequest()
|
scanRequest()
|
||||||
customDialogThreeButtons.dismiss()
|
customDialogThreeButtons.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
|
@ -1215,7 +1215,7 @@ class PreSacadorFragment :
|
||||||
quantity = totalQuantity.toString(),
|
quantity = totalQuantity.toString(),
|
||||||
warehouseFk = getData(WAREHOUSEFK),
|
warehouseFk = getData(WAREHOUSEFK),
|
||||||
type = "FALSE",
|
type = "FALSE",
|
||||||
originalQuantity = quantity, callFunction = "collectionMissingTrash"
|
originalQuantity = quantity
|
||||||
)
|
)
|
||||||
//sales[position].originalQuantity = quantity
|
//sales[position].originalQuantity = quantity
|
||||||
try {
|
try {
|
||||||
|
@ -1255,7 +1255,7 @@ class PreSacadorFragment :
|
||||||
quantity = totalQuantity.toString(),
|
quantity = totalQuantity.toString(),
|
||||||
warehouseFk = getData(WAREHOUSEFK),
|
warehouseFk = getData(WAREHOUSEFK),
|
||||||
type = "TRUE",
|
type = "TRUE",
|
||||||
originalQuantity = quantity, callFunction = "collectionMissingTrash"
|
originalQuantity = quantity
|
||||||
)
|
)
|
||||||
//sales[position].originalQuantity = quantity
|
//sales[position].originalQuantity = quantity
|
||||||
try {
|
try {
|
||||||
|
@ -1297,7 +1297,7 @@ class PreSacadorFragment :
|
||||||
quantity = totalQuantity.toString(),
|
quantity = totalQuantity.toString(),
|
||||||
warehouseFk = getData(WAREHOUSEFK),
|
warehouseFk = getData(WAREHOUSEFK),
|
||||||
type = "reject",
|
type = "reject",
|
||||||
originalQuantity = quantity, callFunction = "collectionMissingTrash"
|
originalQuantity = quantity
|
||||||
)
|
)
|
||||||
|
|
||||||
//enviar mensaje a salix
|
//enviar mensaje a salix
|
||||||
|
@ -1330,8 +1330,7 @@ class PreSacadorFragment :
|
||||||
usuario = getData(USER),
|
usuario = getData(USER),
|
||||||
password = getData(PASSWORD),
|
password = getData(PASSWORD),
|
||||||
saleFk = sales[position].idMovimiento,
|
saleFk = sales[position].idMovimiento,
|
||||||
quantity = quantity,
|
quantity = quantity
|
||||||
callFunction = "collection_increaseQuantity"
|
|
||||||
)
|
)
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
@ -1367,8 +1366,7 @@ class PreSacadorFragment :
|
||||||
usuario = getData(USER),
|
usuario = getData(USER),
|
||||||
password = getData(PASSWORD),
|
password = getData(PASSWORD),
|
||||||
saleFk = sales[position].idMovimiento,
|
saleFk = sales[position].idMovimiento,
|
||||||
quantity = quantity,
|
quantity = quantity
|
||||||
callFunction = "collection_increaseQuantity"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -131,7 +131,7 @@ class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
||||||
usuario: String,
|
usuario: String,
|
||||||
password: String,
|
password: String,
|
||||||
collectionFk: String,
|
collectionFk: String,
|
||||||
sectorFk: String, callFunction: String
|
sectorFk: String
|
||||||
) {
|
) {
|
||||||
getSacadorControladorUserCase.collectionStickerPrint(
|
getSacadorControladorUserCase.collectionStickerPrint(
|
||||||
usuario,
|
usuario,
|
||||||
|
@ -167,20 +167,19 @@ class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
||||||
usuario: String,
|
usuario: String,
|
||||||
password: String,
|
password: String,
|
||||||
ticketFk: String,
|
ticketFk: String,
|
||||||
parking: String,
|
parking: String
|
||||||
callFunction: String
|
|
||||||
) {
|
) {
|
||||||
getUbicadorUserCase.shelvingPark(usuario, password, ticketFk, parking)
|
getUbicadorUserCase.shelvingPark(usuario, password, ticketFk, parking)
|
||||||
.enqueue(object : Callback<String> {
|
.enqueue(object : Callback<Any> {
|
||||||
override fun onFailure(call: Call<String>, t: Throwable) {
|
override fun onFailure(call: Call<Any>, t: Throwable) {
|
||||||
_response.value = ResponseItemVO(
|
_response.value = ResponseItemVO(
|
||||||
isError = true,
|
isError = true,
|
||||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
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) {
|
if (!response.isSuccessful) {
|
||||||
_response.value = ResponseItemVO(
|
_response.value = ResponseItemVO(
|
||||||
isError = true,
|
isError = true,
|
||||||
errorMessage = getMessageFromAllResponse(
|
errorMessage = getMessageFromAllResponse(
|
||||||
|
@ -190,7 +189,7 @@ class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
_response.value =
|
_response.value =
|
||||||
ResponseItemVO(isError = false, response = response.body()!!)
|
ResponseItemVO(isError = false, response = response.message())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -232,7 +231,7 @@ class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
||||||
password: String,
|
password: String,
|
||||||
shelvingFk: String,
|
shelvingFk: String,
|
||||||
quantity: String,
|
quantity: String,
|
||||||
itemFk: String, callFunction: String
|
itemFk: String
|
||||||
) {
|
) {
|
||||||
getSacadorControladorUserCase.itemPlacementSupplyAiming(
|
getSacadorControladorUserCase.itemPlacementSupplyAiming(
|
||||||
usuario,
|
usuario,
|
||||||
|
@ -321,7 +320,7 @@ class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
||||||
vOriginalQuantity: String,
|
vOriginalQuantity: String,
|
||||||
vStateFk: String,
|
vStateFk: String,
|
||||||
vIsChecked: String,
|
vIsChecked: String,
|
||||||
vBuyFk: String, callFunction: String
|
vBuyFk: String
|
||||||
) {
|
) {
|
||||||
//Lo ultimo que se envia
|
//Lo ultimo que se envia
|
||||||
//sergio: se quita el 0 que habia por defecto para la previa se añada el buyFk que sera el item escaneado.
|
//sergio: se quita el 0 que habia por defecto para la previa se añada el buyFk que sera el item escaneado.
|
||||||
|
@ -458,7 +457,7 @@ class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
||||||
quantity: String,
|
quantity: String,
|
||||||
type: String,
|
type: String,
|
||||||
warehouseFk: String,
|
warehouseFk: String,
|
||||||
originalQuantity: String, callFunction: String
|
originalQuantity: String
|
||||||
) {
|
) {
|
||||||
getSacadorControladorUserCase.collectionMissingTrash(
|
getSacadorControladorUserCase.collectionMissingTrash(
|
||||||
usuario,
|
usuario,
|
||||||
|
@ -497,7 +496,7 @@ class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
||||||
usuario: String,
|
usuario: String,
|
||||||
password: String,
|
password: String,
|
||||||
saleFk: String,
|
saleFk: String,
|
||||||
quantity: String, callFunction: String
|
quantity: String
|
||||||
) {
|
) {
|
||||||
getSacadorControladorUserCase.collectionIncreaseQuantity(
|
getSacadorControladorUserCase.collectionIncreaseQuantity(
|
||||||
usuario,
|
usuario,
|
||||||
|
@ -612,8 +611,7 @@ class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
||||||
fun sectorCollection_new(
|
fun sectorCollection_new(
|
||||||
usuario: String,
|
usuario: String,
|
||||||
password: String,
|
password: String,
|
||||||
sectorFk: String,
|
sectorFk: String
|
||||||
callFunction: String
|
|
||||||
) {
|
) {
|
||||||
getPreSacadorUseCase.sectorCollection_new(usuario, password, sectorFk).enqueue(
|
getPreSacadorUseCase.sectorCollection_new(usuario, password, sectorFk).enqueue(
|
||||||
object :
|
object :
|
||||||
|
@ -710,8 +708,7 @@ class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
||||||
usuario: String,
|
usuario: String,
|
||||||
password: String,
|
password: String,
|
||||||
vSaleGroupFk: String,
|
vSaleGroupFk: String,
|
||||||
vSectorCollectionFk: String,
|
vSectorCollectionFk: String
|
||||||
callFunction: String
|
|
||||||
) {
|
) {
|
||||||
getPreSacadorUseCase.sectorCollectionSaleGroup_add(
|
getPreSacadorUseCase.sectorCollectionSaleGroup_add(
|
||||||
usuario,
|
usuario,
|
||||||
|
@ -764,8 +761,7 @@ class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
||||||
fun saleTracking_addPrevOK(
|
fun saleTracking_addPrevOK(
|
||||||
usuario: String,
|
usuario: String,
|
||||||
password: String,
|
password: String,
|
||||||
vSectorCollectionFk: String,
|
vSectorCollectionFk: String
|
||||||
callFunction: String
|
|
||||||
) {
|
) {
|
||||||
getPreSacadorUseCase.saleTracking_addPrevOK(usuario, password, vSectorCollectionFk).enqueue(
|
getPreSacadorUseCase.saleTracking_addPrevOK(usuario, password, vSectorCollectionFk).enqueue(
|
||||||
object :
|
object :
|
||||||
|
@ -815,8 +811,7 @@ class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
||||||
usuario: String,
|
usuario: String,
|
||||||
password: String,
|
password: String,
|
||||||
vSaleFk: String,
|
vSaleFk: String,
|
||||||
vIsChecked: String,
|
vIsChecked: String
|
||||||
callFunction: String
|
|
||||||
) {
|
) {
|
||||||
getPreSacadorUseCase.saleTracking_updateIsChecked(usuario, password, vSaleFk, vIsChecked)
|
getPreSacadorUseCase.saleTracking_updateIsChecked(usuario, password, vSaleFk, vIsChecked)
|
||||||
.enqueue(
|
.enqueue(
|
||||||
|
@ -868,8 +863,7 @@ class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
||||||
usuario: String,
|
usuario: String,
|
||||||
password: String,
|
password: String,
|
||||||
saleFk: String,
|
saleFk: String,
|
||||||
visible: String,
|
visible: String
|
||||||
callFunction: String
|
|
||||||
) {
|
) {
|
||||||
getSacadorControladorUserCase.itemShelving_updateFromSale(
|
getSacadorControladorUserCase.itemShelving_updateFromSale(
|
||||||
usuario,
|
usuario,
|
||||||
|
|
|
@ -85,14 +85,14 @@ class QrFragment(
|
||||||
// getMessageFromJSON(it.errorMessage)
|
// getMessageFromJSON(it.errorMessage)
|
||||||
ma.messageWithSound(it.errorMessage+ " "+itemscaned,true,false)
|
ma.messageWithSound(it.errorMessage+ " "+itemscaned,true,false)
|
||||||
/*customDialog.setTitle(getString(R.string.error)).setDescription( it.errorMessage+ " "+itemscaned)
|
/*customDialog.setTitle(getString(R.string.error)).setDescription( it.errorMessage+ " "+itemscaned)
|
||||||
.setOkButton("Aceptar") {
|
.setOkButton(getString(R.string.accept)) {
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.show()*/
|
}.show()*/
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
customDialog.setTitle("Mensaje")
|
customDialog.setTitle(getString(R.string.info))
|
||||||
.setDescription("Operación " + itemscaned + ". " + it.response)
|
.setDescription(getString(R.string.operation) + itemscaned + ". " + it.response)
|
||||||
.setOkButton("Aceptar") {
|
.setOkButton(getString(R.string.accept)) {
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
binding.mainToolbar.backButton.performClick()
|
binding.mainToolbar.backButton.performClick()
|
||||||
}.show()
|
}.show()
|
||||||
|
|
|
@ -105,14 +105,14 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
|
||||||
viewModel.itemPlacementSupplyGetOrder(
|
viewModel.itemPlacementSupplyGetOrder(
|
||||||
usuario = getData(USER),
|
usuario = getData(USER),
|
||||||
password = getData(PASSWORD),
|
password = getData(PASSWORD),
|
||||||
sectorFk = getData(SECTORFK),
|
sectorFk = getData(SECTORFK)
|
||||||
"itemPlacementSupplyGetOrder"
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.btnCancelar.setOnClickListener {
|
binding.btnCancelar.setOnClickListener {
|
||||||
|
|
||||||
customDialog.setTitle("Confirmar").setDescription("¿Estás seguro de cerrar el pedido?")
|
customDialog.setTitle(getString(R.string.confirm)).setDescription(getString(R.string.closeOdrder))
|
||||||
.setKoButton(getString(R.string.close)) {
|
.setKoButton(getString(R.string.close)) {
|
||||||
scanRequest()
|
scanRequest()
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
|
@ -164,8 +164,8 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
|
||||||
viewModel.itemPlacementSupplyGetOrder(
|
viewModel.itemPlacementSupplyGetOrder(
|
||||||
usuario = getData(USER),
|
usuario = getData(USER),
|
||||||
password = getData(PASSWORD),
|
password = getData(PASSWORD),
|
||||||
sectorFk = getData(SECTORFK),
|
sectorFk = getData(SECTORFK)
|
||||||
"itemPlacementSupplyGetOrder"
|
|
||||||
)
|
)
|
||||||
binding.collectionSwipe.isRefreshing = false
|
binding.collectionSwipe.isRefreshing = false
|
||||||
}
|
}
|
||||||
|
@ -233,7 +233,7 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
|
||||||
binding.splashProgress.visibility = View.GONE
|
binding.splashProgress.visibility = View.GONE
|
||||||
if (salesList.isNullOrEmpty()) {
|
if (salesList.isNullOrEmpty()) {
|
||||||
customDialog.setTitle("Reposición").setDescription("No existen pedidos para reponer")
|
customDialog.setTitle("Reposición").setDescription("No existen pedidos para reponer")
|
||||||
.setKoButton("Cancelar") {
|
.setKoButton(getString(R.string.cancel)) {
|
||||||
if (sales.count() > 0) {
|
if (sales.count() > 0) {
|
||||||
sales.clear()
|
sales.clear()
|
||||||
saleAdapter!!.notifyDataSetChanged()
|
saleAdapter!!.notifyDataSetChanged()
|
||||||
|
@ -356,8 +356,7 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
|
||||||
password = getData(PASSWORD),
|
password = getData(PASSWORD),
|
||||||
itemFk = sales[position].itemFk,
|
itemFk = sales[position].itemFk,
|
||||||
quantity = quantityGet,
|
quantity = quantityGet,
|
||||||
shelvingFk = sales[position].carros[shelvingPosition].shelving,
|
shelvingFk = sales[position].carros[shelvingPosition].shelving
|
||||||
callFunction = "itemPlacementSupplyAiming"
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -483,7 +482,7 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
|
||||||
password = getData(PASSWORD),
|
password = getData(PASSWORD),
|
||||||
itemShelvingFk = itemShelvingFk,
|
itemShelvingFk = itemShelvingFk,
|
||||||
itemPlacementSupplyFk = sales[storedPosition].id,
|
itemPlacementSupplyFk = sales[storedPosition].id,
|
||||||
quantity = customDialogList.getValue(), "itemShelvingPlacementSupplyAdd"
|
quantity = customDialogList.getValue()
|
||||||
)
|
)
|
||||||
|
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
@ -555,7 +554,7 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
|
||||||
|
|
||||||
private fun showScanner(index: Int, sale: PreSacadorItemVO) {
|
private fun showScanner(index: Int, sale: PreSacadorItemVO) {
|
||||||
customDialogInput.setTitle("" + sale.itemFk)
|
customDialogInput.setTitle("" + sale.itemFk)
|
||||||
.setDescription("Escanea el carro para el item seleccionado").setOkButton("Aceptar") {
|
.setDescription("Escanea el carro para el item seleccionado").setOkButton(getString(R.string.accept)) {
|
||||||
if (!customDialogInput.getValue().isNullOrEmpty()) {
|
if (!customDialogInput.getValue().isNullOrEmpty()) {
|
||||||
findSale(customDialogInput.getValue(), index)
|
findSale(customDialogInput.getValue(), index)
|
||||||
}
|
}
|
||||||
|
@ -563,7 +562,7 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
|
||||||
scanRequest()
|
scanRequest()
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
hideKeyboards()
|
hideKeyboards()
|
||||||
}.setKoButton("Cancelar") {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
}.setValue("").show()
|
}.setValue("").show()
|
||||||
customDialogInput.getEditText().requestFocus()
|
customDialogInput.getEditText().requestFocus()
|
||||||
|
@ -600,7 +599,7 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
|
||||||
)*/
|
)*/
|
||||||
scanRequest()
|
scanRequest()
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.setKoButton("Cancelar") {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
scanRequest()
|
scanRequest()
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
|
|
|
@ -47,8 +47,8 @@ class ReposicionViewModel(context: Context) : BaseViewModel() {
|
||||||
fun itemPlacementSupplyGetOrder(
|
fun itemPlacementSupplyGetOrder(
|
||||||
usuario: String,
|
usuario: String,
|
||||||
password: String,
|
password: String,
|
||||||
sectorFk: String,
|
sectorFk: String
|
||||||
callFunction: String
|
|
||||||
) {
|
) {
|
||||||
getPreSacadorUseCase.itemPlacementSupplyGetOrder(usuario, password, sectorFk)
|
getPreSacadorUseCase.itemPlacementSupplyGetOrder(usuario, password, sectorFk)
|
||||||
.enqueue(object :
|
.enqueue(object :
|
||||||
|
@ -74,20 +74,20 @@ class ReposicionViewModel(context: Context) : BaseViewModel() {
|
||||||
usuario: String,
|
usuario: String,
|
||||||
password: String,
|
password: String,
|
||||||
ticketFk: String,
|
ticketFk: String,
|
||||||
parking: String,
|
parking: String
|
||||||
callFunction: String
|
|
||||||
) {
|
) {
|
||||||
getUbicadorUserCase.shelvingPark(usuario, password, ticketFk, parking)
|
getUbicadorUserCase.shelvingPark(usuario, password, ticketFk, parking)
|
||||||
.enqueue(object : Callback<String> {
|
.enqueue(object : Callback<Any> {
|
||||||
override fun onFailure(call: Call<String>, t: Throwable) {
|
override fun onFailure(call: Call<Any>, t: Throwable) {
|
||||||
_response.value = ResponseItemVO(
|
_response.value = ResponseItemVO(
|
||||||
isError = true,
|
isError = true,
|
||||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
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) {
|
if (!response.isSuccessful) {
|
||||||
_response.value = ResponseItemVO(
|
_response.value = ResponseItemVO(
|
||||||
isError = true,
|
isError = true,
|
||||||
errorMessage = getMessageFromAllResponse(
|
errorMessage = getMessageFromAllResponse(
|
||||||
|
@ -97,7 +97,7 @@ class ReposicionViewModel(context: Context) : BaseViewModel() {
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
_response.value =
|
_response.value =
|
||||||
ResponseItemVO(isError = false, response = response.body()!!)
|
ResponseItemVO(isError = false, response = response.message())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -108,8 +108,8 @@ class ReposicionViewModel(context: Context) : BaseViewModel() {
|
||||||
password: String,
|
password: String,
|
||||||
shelvingFk: String,
|
shelvingFk: String,
|
||||||
quantity: String,
|
quantity: String,
|
||||||
itemFk: String,
|
itemFk: String
|
||||||
callFunction: String
|
|
||||||
) {
|
) {
|
||||||
getSacadorControladorUserCase.itemPlacementSupplyAiming(
|
getSacadorControladorUserCase.itemPlacementSupplyAiming(
|
||||||
usuario,
|
usuario,
|
||||||
|
@ -186,8 +186,8 @@ class ReposicionViewModel(context: Context) : BaseViewModel() {
|
||||||
password: String,
|
password: String,
|
||||||
itemShelvingFk: String,
|
itemShelvingFk: String,
|
||||||
itemPlacementSupplyFk: String,
|
itemPlacementSupplyFk: String,
|
||||||
quantity: String,
|
quantity: String
|
||||||
callFunction: String
|
|
||||||
) {
|
) {
|
||||||
getSacadorControladorUserCase.itemShelvingPlacementSupplyAdd(
|
getSacadorControladorUserCase.itemShelvingPlacementSupplyAdd(
|
||||||
usuario,
|
usuario,
|
||||||
|
|
|
@ -207,7 +207,7 @@ class SacadorFragment :
|
||||||
/* collectionTicketList.observe(viewLifecycleOwner, Observer {
|
/* collectionTicketList.observe(viewLifecycleOwner, Observer {
|
||||||
binding.splashProgress_two.visibility = View.GONE
|
binding.splashProgress_two.visibility = View.GONE
|
||||||
if (it.isError){
|
if (it.isError){
|
||||||
customDialog.setTitle(getString(R.string.error)).setDescription(it.errorMessage).setOkButton("Aceptar"){
|
customDialog.setTitle(getString(R.string.error)).setDescription(it.errorMessage).setOkButton(getString(R.string.accept)){
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
}else{
|
}else{
|
||||||
|
@ -300,7 +300,7 @@ class SacadorFragment :
|
||||||
} else {
|
} else {
|
||||||
customDialog.setTitle("Atención")
|
customDialog.setTitle("Atención")
|
||||||
.setDescription("La colección " + collection + " sigue pendiente de preparar")
|
.setDescription("La colección " + collection + " sigue pendiente de preparar")
|
||||||
.setOkButton("Aceptar") {
|
.setOkButton(getString(R.string.accept)) {
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,7 +98,7 @@ class UbicadorFragment(
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
iconReload.tooltipText = getTooltip(R.drawable.ic_autorenew_black_24dp)
|
iconReload.tooltipText = getTooltip(R.drawable.ic_autorenew_black_24dp)
|
||||||
iconAdd.tooltipText = "Añade item al carro"
|
iconAdd.tooltipText = getString(R.string.addItemShelving)
|
||||||
}
|
}
|
||||||
listIcons.add(iconAdd)
|
listIcons.add(iconAdd)
|
||||||
listIcons.add(iconReload)
|
listIcons.add(iconReload)
|
||||||
|
@ -184,24 +184,24 @@ class UbicadorFragment(
|
||||||
entryPoint = shelvingFk
|
entryPoint = shelvingFk
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
"Escanea una matrícula".toast(requireActivity(), Toast.LENGTH_SHORT)
|
getString(R.string.scanShelving).toast(requireActivity(), Toast.LENGTH_SHORT)
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.parkingImg.setOnClickListener {
|
binding.parkingImg.setOnClickListener {
|
||||||
customDialogInput.setTitle("Aparcar carro").setValue("").setOkButton("Aparcar") {
|
customDialogInput.setTitle(getString(R.string.parkingShelving)).setValue("").setOkButton(getString(
|
||||||
|
R.string.parking)) {
|
||||||
viewModel.shelvingPark(
|
viewModel.shelvingPark(
|
||||||
getData(USER),
|
getData(USER),
|
||||||
getData(PASSWORD),
|
getData(PASSWORD),
|
||||||
shelvingFk,
|
shelvingFk,
|
||||||
customDialogInput.getValue(),
|
customDialogInput.getValue()
|
||||||
"shelvingPark"
|
|
||||||
)
|
)
|
||||||
parking = customDialogInput.getValue()
|
parking = customDialogInput.getValue()
|
||||||
binding.mainToolbar.toolbarTitle.text =
|
binding.mainToolbar.toolbarTitle.text =
|
||||||
shelvingFk.uppercase() + " P: " + parking + " E: " + etiquetas
|
shelvingFk.uppercase() + " P: " + parking + " E: " + etiquetas
|
||||||
if (mpok != null) mpok!!.start()
|
if (mpok != null) mpok!!.start()
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
}.setKoButton("Cancelar") {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
|
|
||||||
|
@ -214,8 +214,7 @@ class UbicadorFragment(
|
||||||
getData(USER),
|
getData(USER),
|
||||||
getData(PASSWORD),
|
getData(PASSWORD),
|
||||||
shelvingFk,
|
shelvingFk,
|
||||||
customDialogInput.getValue(),
|
customDialogInput.getValue()
|
||||||
"shelvingPark"
|
|
||||||
)
|
)
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
parking = customDialogInput.getValue()
|
parking = customDialogInput.getValue()
|
||||||
|
@ -237,7 +236,7 @@ class UbicadorFragment(
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.editImg.setOnClickListener {
|
binding.editImg.setOnClickListener {
|
||||||
customDialogInput.setTitle("Cambiar matrícula").setValue("").setOkButton("Guardar") {
|
customDialogInput.setTitle("Cambiar matrícula").setValue("").setOkButton(getString(R.string.save)) {
|
||||||
viewModel.shelvingChange(
|
viewModel.shelvingChange(
|
||||||
getData(USER),
|
getData(USER),
|
||||||
getData(PASSWORD),
|
getData(PASSWORD),
|
||||||
|
@ -249,7 +248,7 @@ class UbicadorFragment(
|
||||||
shelvingFk.uppercase() + " P: " + parking + " E: " + etiquetas
|
shelvingFk.uppercase() + " P: " + parking + " E: " + etiquetas
|
||||||
if (mpok != null) mpok!!.start()
|
if (mpok != null) mpok!!.start()
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
}.setKoButton("Cancelar") {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
|
|
||||||
|
@ -291,7 +290,7 @@ class UbicadorFragment(
|
||||||
adapter!!.notifyDataSetChanged()
|
adapter!!.notifyDataSetChanged()
|
||||||
}
|
}
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.setKoButton("Cancelar") {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
|
|
||||||
|
@ -302,13 +301,13 @@ class UbicadorFragment(
|
||||||
|
|
||||||
private fun setTooltips() {
|
private fun setTooltips() {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
binding.editImg.tooltipText = "Permite cambiar la matrícula al carro"
|
binding.editImg.tooltipText = getTooltip(R.drawable.ic_mode_edit_black_24dp)
|
||||||
binding.deleteImg.tooltipText = "Borra todos los items del carro"
|
binding.deleteImg.tooltipText = getTooltip(R.drawable.ic_delete_forever_black_24dp)
|
||||||
binding.editPrioridad.tooltipText =
|
binding.editPrioridad.tooltipText =
|
||||||
"Cambia la prioridad de los items del carro. Cuanto más alta antes cogerán los sacadores."
|
getString(R.string.changePriority)
|
||||||
binding.parkingImg.tooltipText = "Permite aparcar el carro"
|
binding.parkingImg.tooltipText = getTooltip(R.drawable.ic_local_parking_black_24dp)
|
||||||
binding.automaticImg.tooltipText =
|
binding.automaticImg.tooltipText =getTooltip(R.drawable.ic_flash_auto_black_24dp)
|
||||||
"Permite añadir items al carro de manera continuada. No uno a uno"
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -382,6 +381,8 @@ class UbicadorFragment(
|
||||||
.setOkButton(getString(R.string.close)) {
|
.setOkButton(getString(R.string.close)) {
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.show()*/
|
}.show()*/
|
||||||
|
}else{
|
||||||
|
ma.messageWithSound(getString(R.string.Aparcado), it.isError, true)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -426,11 +427,11 @@ class UbicadorFragment(
|
||||||
itemUbicador: ItemUbicadorVO,
|
itemUbicador: ItemUbicadorVO,
|
||||||
grouping: String
|
grouping: String
|
||||||
) {
|
) {
|
||||||
var title = "Nuevo Item"
|
var title = getString(R.string.newItem)
|
||||||
if (delete) title = "Editar item " + itemFk
|
if (delete) title = getString(R.string.editItem) + itemFk
|
||||||
customDialogUbicador.setTitle(title).setItemValue(itemFk).setPackingValue(packing)
|
customDialogUbicador.setTitle(title).setItemValue(itemFk).setPackingValue(packing)
|
||||||
.setGroupingValue(grouping).setEtiquetaValue(etiquetas).setVisibleValue(visible)
|
.setGroupingValue(grouping).setEtiquetaValue(etiquetas).setVisibleValue(visible)
|
||||||
.setOkButton("Guardar") {
|
.setOkButton(getString(R.string.save)) {
|
||||||
var packingUpdate = false
|
var packingUpdate = false
|
||||||
if (packing != customDialogUbicador.getPackingValue() || etiquetas != customDialogUbicador.getEtiquetaValue()) {
|
if (packing != customDialogUbicador.getPackingValue() || etiquetas != customDialogUbicador.getEtiquetaValue()) {
|
||||||
packingUpdate = true
|
packingUpdate = true
|
||||||
|
@ -561,7 +562,7 @@ class UbicadorFragment(
|
||||||
customDialogUbicador.dismiss()
|
customDialogUbicador.dismiss()
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
"Rellena campos obligatorios".toast(
|
getString(R.string.fillFields).toast(
|
||||||
(activity as MainActivity),
|
(activity as MainActivity),
|
||||||
Toast.LENGTH_LONG
|
Toast.LENGTH_LONG
|
||||||
)
|
)
|
||||||
|
@ -628,7 +629,7 @@ class UbicadorFragment(
|
||||||
customDialogUbicador.dismiss()
|
customDialogUbicador.dismiss()
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
"Rellena campos obligatorios".toast(
|
getString(R.string.fillFields).toast(
|
||||||
(activity as MainActivity),
|
(activity as MainActivity),
|
||||||
Toast.LENGTH_LONG
|
Toast.LENGTH_LONG
|
||||||
)
|
)
|
||||||
|
@ -636,7 +637,7 @@ class UbicadorFragment(
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
"Packing obligatorio".toast((activity as MainActivity), Toast.LENGTH_LONG)
|
getString(R.string.mandatoryPacking).toast((activity as MainActivity), Toast.LENGTH_LONG)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -670,7 +671,7 @@ class UbicadorFragment(
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun showMoreOptions(item: ItemUbicadorVO) {
|
private fun showMoreOptions(item: ItemUbicadorVO) {
|
||||||
customDialogTwoButtons.setTitle(item.item).setDescription("Selecciona una acción")
|
customDialogTwoButtons.setTitle(item.item).setDescription(getString(R.string.selectAction))
|
||||||
.setOkButton("Transferir") {
|
.setOkButton("Transferir") {
|
||||||
customDialogInput.setTitle("Nueva matrícula")
|
customDialogInput.setTitle("Nueva matrícula")
|
||||||
.setDescription("Introduce el destino para item: " + item.item).setValue("")
|
.setDescription("Introduce el destino para item: " + item.item).setValue("")
|
||||||
|
@ -690,7 +691,7 @@ class UbicadorFragment(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}.setKoButton("Cancelar") {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
customDialogInput.getEditText().requestFocus()
|
customDialogInput.getEditText().requestFocus()
|
||||||
|
@ -711,10 +712,10 @@ class UbicadorFragment(
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
customDialogTwoButtons.dismiss()
|
customDialogTwoButtons.dismiss()
|
||||||
}.setOkButtonTwo("Eliminar") {
|
}.setOkButtonTwo(getString(R.string.delete)) {
|
||||||
customDialog.setTitle("Confirmar")
|
customDialog.setTitle(getString(R.string.confirm))
|
||||||
.setDescription("Confirmas eliminar el artículo: " + item.item + "?")
|
.setDescription("Confirmas eliminar el artículo: " + item.item + "?")
|
||||||
.setOkButton("Eliminar") {
|
.setOkButton(getString(R.string.delete)) {
|
||||||
listItems.remove(item)
|
listItems.remove(item)
|
||||||
adapter!!.notifyDataSetChanged()
|
adapter!!.notifyDataSetChanged()
|
||||||
viewModel.itemShelvingDelete(
|
viewModel.itemShelvingDelete(
|
||||||
|
@ -723,12 +724,12 @@ class UbicadorFragment(
|
||||||
)
|
)
|
||||||
customDialogTwoButtons.dismiss()
|
customDialogTwoButtons.dismiss()
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.setKoButton("Cancelar") {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
customDialogTwoButtons.dismiss()
|
customDialogTwoButtons.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
|
|
||||||
}.setKoButton("Cancelar") {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
customDialogTwoButtons.dismiss()
|
customDialogTwoButtons.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
}
|
}
|
||||||
|
|
|
@ -229,20 +229,19 @@ class UbicadorViewModel(context: Context) : BaseViewModel() {
|
||||||
usuario: String,
|
usuario: String,
|
||||||
password: String,
|
password: String,
|
||||||
shelving: String,
|
shelving: String,
|
||||||
parking: String,
|
parking: String
|
||||||
callFunction: String
|
|
||||||
) {
|
) {
|
||||||
getUbicadorUserCase.shelvingPark(usuario, password, shelving, parking)
|
getUbicadorUserCase.shelvingPark(usuario, password, shelving, parking)
|
||||||
.enqueue(object : Callback<String> {
|
.enqueue(object : Callback<Any> {
|
||||||
override fun onFailure(call: Call<String>, t: Throwable) {
|
override fun onFailure(call: Call<Any>, t: Throwable) {
|
||||||
_response.value = ResponseItemVO(
|
_response.value = ResponseItemVO(
|
||||||
isError = true,
|
isError = true,
|
||||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
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) {
|
if (!response.isSuccessful) {
|
||||||
_response.value = ResponseItemVO(
|
_response.value = ResponseItemVO(
|
||||||
isError = true,
|
isError = true,
|
||||||
errorMessage = getMessageFromAllResponse(
|
errorMessage = getMessageFromAllResponse(
|
||||||
|
@ -252,7 +251,7 @@ class UbicadorViewModel(context: Context) : BaseViewModel() {
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
_response.value =
|
_response.value =
|
||||||
ResponseItemVO(isError = false, response = response.body()!!)
|
ResponseItemVO(isError = false, response = response.message())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -210,7 +210,8 @@ class WorkermistakeFragment( var entryPoint: String = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
customDialogList.setTitle("Causa de error para : ${workerMistakeName!!.firstName}").setKoButton("Cancelar") {
|
customDialogList.setTitle(getString(R.string.errorCause)+ workerMistakeName!!.firstName).setKoButton(getString(
|
||||||
|
R.string.cancel)) {
|
||||||
customDialogList.dismiss()
|
customDialogList.dismiss()
|
||||||
}.hideDialog().show()
|
}.hideDialog().show()
|
||||||
|
|
||||||
|
@ -223,7 +224,7 @@ class WorkermistakeFragment( var entryPoint: String = ""
|
||||||
viewModel.workerMistake_Add(usuario = getData(USER),
|
viewModel.workerMistake_Add(usuario = getData(USER),
|
||||||
password = getData(PASSWORD),
|
password = getData(PASSWORD),
|
||||||
vUserFk = workerMistakeName!!.id,
|
vUserFk = workerMistakeName!!.id,
|
||||||
vTypeFk = it.code, callFunction ="workerMistake_Add"
|
vTypeFk = it.code
|
||||||
)
|
)
|
||||||
// "Causa del error registrado".toast(requireContext())
|
// "Causa del error registrado".toast(requireContext())
|
||||||
customDialogList.dismiss()
|
customDialogList.dismiss()
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_marginTop="@dimen/default_layout_margin"
|
android:layout_marginTop="@dimen/default_layout_margin"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:text="Eliminar"
|
tools:text="@string/delete"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
android:layout_marginTop="@dimen/default_layout_margin"
|
android:layout_marginTop="@dimen/default_layout_margin"
|
||||||
android:layout_marginBottom="@dimen/default_layout_margin"
|
android:layout_marginBottom="@dimen/default_layout_margin"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:text="Cancelar"
|
tools:text="@string/cancel"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_marginTop="@dimen/default_layout_margin"
|
android:layout_marginTop="@dimen/default_layout_margin"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:text="Eliminar"
|
tools:text="@string/delete"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
@ -75,7 +75,7 @@
|
||||||
android:layout_marginTop="@dimen/default_layout_margin"
|
android:layout_marginTop="@dimen/default_layout_margin"
|
||||||
android:layout_marginBottom="@dimen/default_layout_margin"
|
android:layout_marginBottom="@dimen/default_layout_margin"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:text="Cancelar"
|
tools:text="@string/cancel"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
|
@ -120,7 +120,7 @@
|
||||||
android:layout_marginTop="@dimen/default_layout_margin"
|
android:layout_marginTop="@dimen/default_layout_margin"
|
||||||
android:layout_marginBottom="@dimen/default_layout_margin"
|
android:layout_marginBottom="@dimen/default_layout_margin"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:text="Cancelar"
|
tools:text="@string/cancel"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
|
@ -98,7 +98,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_marginTop="@dimen/default_layout_margin"
|
android:layout_marginTop="@dimen/default_layout_margin"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:text="Eliminar"
|
tools:text="@string/delete"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
@ -108,7 +108,7 @@
|
||||||
android:layout_marginTop="@dimen/default_layout_margin"
|
android:layout_marginTop="@dimen/default_layout_margin"
|
||||||
android:layout_marginBottom="@dimen/default_layout_margin"
|
android:layout_marginBottom="@dimen/default_layout_margin"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:text="Cancelar"
|
tools:text="@string/cancel"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
|
@ -111,7 +111,7 @@
|
||||||
android:layout_marginTop="@dimen/layout_margin_1"
|
android:layout_marginTop="@dimen/layout_margin_1"
|
||||||
android:layout_marginBottom="@dimen/default_layout_margin"
|
android:layout_marginBottom="@dimen/default_layout_margin"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:text="Cancelar"
|
tools:text="@string/cancel"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
android:layout_marginTop="@dimen/default_layout_margin"
|
android:layout_marginTop="@dimen/default_layout_margin"
|
||||||
android:layout_marginBottom="@dimen/default_layout_margin"
|
android:layout_marginBottom="@dimen/default_layout_margin"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:text="Cancelar"
|
tools:text="@string/cancel"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
|
@ -155,7 +155,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_marginTop="@dimen/default_layout_margin"
|
android:layout_marginTop="@dimen/default_layout_margin"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:text="Eliminar"
|
tools:text="@string/delete"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
@ -165,7 +165,7 @@
|
||||||
android:layout_marginTop="@dimen/default_layout_margin"
|
android:layout_marginTop="@dimen/default_layout_margin"
|
||||||
android:layout_marginBottom="@dimen/default_layout_margin"
|
android:layout_marginBottom="@dimen/default_layout_margin"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:text="Cancelar"
|
tools:text="@string/cancel"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
|
@ -73,7 +73,7 @@
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
android:layout_marginBottom="16dp"
|
android:layout_marginBottom="16dp"
|
||||||
android:background="@drawable/btn_blue"
|
android:background="@drawable/btn_blue"
|
||||||
android:text="Cancelar"
|
android:text="@string/cancel"
|
||||||
android:textColor="@color/verdnatura_white"
|
android:textColor="@color/verdnatura_white"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
|
|
@ -208,4 +208,32 @@
|
||||||
<string name="showTrash">Ver movimientos de Basura</string>
|
<string name="showTrash">Ver movimientos de Basura</string>
|
||||||
<string name="filterFlower">Filtra por tipo de flor</string>
|
<string name="filterFlower">Filtra por tipo de flor</string>
|
||||||
<string name="noprinter">Sin impresora</string>
|
<string name="noprinter">Sin impresora</string>
|
||||||
|
<string name="dateFormat">yyyy-MM-dd</string>
|
||||||
|
<string name="cancel">Cancelar</string>
|
||||||
|
<string name="errorCause">Causa de error para :</string>
|
||||||
|
<string name="scanShelving">Escanea una matrícula</string>
|
||||||
|
<string name="parkingShelving">Aparcar carro</string>
|
||||||
|
<string name="parking">Aparcar</string>
|
||||||
|
<string name="addItemShelving">Añade item al carro</string>
|
||||||
|
<string name="save">Guardar</string>
|
||||||
|
<string name="allowChangeShelving">Permite cambiar la matrícula a un carro</string>
|
||||||
|
<string name="deleteAllitems">Borra todos los items del carro</string>
|
||||||
|
<string name="changePriority">Cambia la prioridad de los items del carro. Cuanto más alta antes cogerán los sacadores.</string>
|
||||||
|
<string name="allowAutomaticAddItem">Permite añadir items al carro de manera continuada. No uno a uno</string>
|
||||||
|
<string name="newItem">Nuevo Item</string>
|
||||||
|
<string name="editItem">\"Editar item \"</string>
|
||||||
|
<string name="fillFields">Rellena campos obligatorios</string>
|
||||||
|
<string name="mandatoryPacking">Packing obligatorio</string>
|
||||||
|
<string name="selectAction">Selecciona una acción</string>
|
||||||
|
<string name="delete">Eliminar</string>
|
||||||
|
<string name="lookWithpermission">Solo puedes visualizar cuando has cogido tu mismo el vehículo a no ser que tengas permisos para ello.</string>
|
||||||
|
<string name="info">Información</string>
|
||||||
|
<string name="accept">Aceptar</string>
|
||||||
|
<string name="selectPrinter">Tiene que seleccionar impresora.</string>
|
||||||
|
<string name="newTruck">Nuevo Camión</string>
|
||||||
|
<string name="psScan">\"PScan: \"</string>
|
||||||
|
<string name="savedShelves">Baldas guardadas</string>
|
||||||
|
<string name="operation">\"Operación \"</string>
|
||||||
|
<string name="closeOdrder">¿Estás seguro de cerrar el pedido?</string>
|
||||||
|
<string name="confirm">Confirmar</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -201,10 +201,38 @@
|
||||||
<string name="allowParking">Permite aparcar ticket/carro</string>
|
<string name="allowParking">Permite aparcar ticket/carro</string>
|
||||||
<string name="allowTakeoffVehicle">Permite dejar el vehículo</string>
|
<string name="allowTakeoffVehicle">Permite dejar el vehículo</string>
|
||||||
<string name="newCollection">Genera colección para sacar</string>
|
<string name="newCollection">Genera colección para sacar</string>
|
||||||
<string name="showFilter">\"Ver filtro \"</string>
|
<string name="showFilter">"Ver filtro"</string>
|
||||||
<string name="showFaults">Ver movimientos de Faltas</string>
|
<string name="showFaults">Ver movimientos de Faltas</string>
|
||||||
<string name="showTrash">Ver movimientos de Basura</string>
|
<string name="showTrash">Ver movimientos de Basura</string>
|
||||||
<string name="filterFlower">Filtra por tipo de flor</string>
|
<string name="filterFlower">Filtra por tipo de flor</string>
|
||||||
<string name="noprinter">Sin impresora</string>
|
<string name="noprinter">Sin impresora</string>
|
||||||
|
<string name="dateFormat">yyyy-MM-dd</string>
|
||||||
|
<string name="cancel">Cancelar</string>
|
||||||
|
<string name="errorCause">Causa de error para :</string>
|
||||||
|
<string name="scanShelving">Escanea una matrícula</string>
|
||||||
|
<string name="parkingShelving">Aparcar carro</string>
|
||||||
|
<string name="parking">Aparcar</string>
|
||||||
|
<string name="addItemShelving">Añade item al carro</string>
|
||||||
|
<string name="save">Guardar</string>
|
||||||
|
<string name="allowChangeShelving">Permite cambiar la matrícula a un carro</string>
|
||||||
|
<string name="deleteAllitems">Borra todos los items del carro</string>
|
||||||
|
<string name="changePriority">Cambia la prioridad de los items del carro. Cuanto más alta antes cogerán los sacadores.</string>
|
||||||
|
<string name="allowAutomaticAddItem">Permite añadir items al carro de manera continuada. No uno a uno</string>
|
||||||
|
<string name="newItem">Nuevo Item</string>
|
||||||
|
<string name="editItem">\"Editar item \"</string>
|
||||||
|
<string name="fillFields">Rellena campos obligatorios</string>
|
||||||
|
<string name="mandatoryPacking">Packing obligatorio</string>
|
||||||
|
<string name="selectAction">Selecciona una acción</string>
|
||||||
|
<string name="delete">Eliminar</string>
|
||||||
|
<string name="lookWithpermission">Solo puedes visualizar cuando has cogido tu mismo el vehículo a no ser que tengas permisos para ello.</string>
|
||||||
|
<string name="info">Información</string>
|
||||||
|
<string name="accept">Aceptar</string>
|
||||||
|
<string name="selectPrinter">Tiene que seleccionar impresora.</string>
|
||||||
|
<string name="newTruck">Nuevo Camión</string>
|
||||||
|
<string name="psScan">\"PScan: \"</string>
|
||||||
|
<string name="savedShelves">Baldas guardadas</string>
|
||||||
|
<string name="operation">\"Operación \"</string>
|
||||||
|
<string name="closeOdrder">¿Estás seguro de cerrar el pedido?</string>
|
||||||
|
<string name="confirm">Confirmar</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in New Issue