Version 23.3Beta QR
This commit is contained in:
parent
caa3116f5c
commit
3215d047ff
|
@ -276,7 +276,7 @@
|
|||
</option>
|
||||
</component>
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
|
|
|
@ -83,17 +83,17 @@
|
|||
</select>
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="fa688d1c-dbee-4864-9e33-4d84ef9afca8" name="Default Changelist" comment="Version 23.2 Modificado actualizar pantalla al transferir en Ubicador. Subida version">
|
||||
<list default="true" id="fa688d1c-dbee-4864-9e33-4d84ef9afca8" name="Default Changelist" comment="Version 23.3Beta Añadido error si falla el ubicador y solucionado al leer artículos. Modificado saleMistakeAdd para que solo envíe dos parámetros.">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/build.gradle" beforeDir="false" afterPath="$PROJECT_DIR$/app/build.gradle" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/google-services.json" beforeDir="false" afterPath="$PROJECT_DIR$/app/google-services.json" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/base/BaseFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/base/BaseFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ajustes/fragment/AjustesFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ajustes/fragment/AjustesFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/common/itemScanned.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/common/itemScanned.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemCardFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemCardFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/buscaritem/fragment/BuscarItemFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/buscaritem/fragment/BuscarItemFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/login/fragment/LoginFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/login/fragment/LoginFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/fragment/EndSacadorFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/fragment/EndSacadorFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/UbicadorFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/UbicadorFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/component_custom_list_dialog.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/component_custom_list_dialog.xml" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
@ -190,7 +190,7 @@
|
|||
</option>
|
||||
<option name="RECENT_BRANCH_BY_REPOSITORY">
|
||||
<map>
|
||||
<entry key="$PROJECT_DIR$" value="test_#5052_ubicador" />
|
||||
<entry key="$PROJECT_DIR$" value="testBeta" />
|
||||
</map>
|
||||
</option>
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
|
@ -224,6 +224,7 @@
|
|||
</component>
|
||||
<component name="ProblemsViewState">
|
||||
<option name="proportion" value="0.50190353" />
|
||||
<option name="selectedTabId" value="CurrentFile" />
|
||||
<option name="sortByName" value="true" />
|
||||
</component>
|
||||
<component name="ProjectId" id="1rNnmCWH3aNvnQwcp2vPrEIlvP2" />
|
||||
|
@ -781,7 +782,7 @@
|
|||
<entry key="branch">
|
||||
<value>
|
||||
<list>
|
||||
<option value="test_#5052_ubicador" />
|
||||
<option value="testBeta_5109_qr" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
|
@ -882,48 +883,58 @@
|
|||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="kotlin-line">
|
||||
<url>file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemCardFragment.kt</url>
|
||||
<line>520</line>
|
||||
<line>526</line>
|
||||
<option name="timeStamp" value="5" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="kotlin-line">
|
||||
<url>file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemCardFragment.kt</url>
|
||||
<line>563</line>
|
||||
<line>569</line>
|
||||
<option name="timeStamp" value="6" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="kotlin-line">
|
||||
<url>file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemCardFragment.kt</url>
|
||||
<line>566</line>
|
||||
<line>572</line>
|
||||
<option name="timeStamp" value="7" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="kotlin-line">
|
||||
<url>file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemCardFragment.kt</url>
|
||||
<line>567</line>
|
||||
<line>573</line>
|
||||
<option name="timeStamp" value="8" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="kotlin-line">
|
||||
<url>file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemCardFragment.kt</url>
|
||||
<line>576</line>
|
||||
<line>582</line>
|
||||
<option name="timeStamp" value="9" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="kotlin-line">
|
||||
<url>file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemCardFragment.kt</url>
|
||||
<line>610</line>
|
||||
<line>616</line>
|
||||
<option name="timeStamp" value="10" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="kotlin-line">
|
||||
<url>file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemCardFragment.kt</url>
|
||||
<line>613</line>
|
||||
<line>619</line>
|
||||
<option name="timeStamp" value="11" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="kotlin-line">
|
||||
<url>file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemCardFragment.kt</url>
|
||||
<line>616</line>
|
||||
<line>622</line>
|
||||
<option name="timeStamp" value="12" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="kotlin-line">
|
||||
<url>file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemCardFragment.kt</url>
|
||||
<line>163</line>
|
||||
<option name="timeStamp" value="15" />
|
||||
<url>file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/buscaritem/fragment/BuscarItemFragment.kt</url>
|
||||
<line>83</line>
|
||||
<option name="timeStamp" value="28" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="kotlin-line">
|
||||
<url>file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/buscaritem/fragment/BuscarItemFragment.kt</url>
|
||||
<line>82</line>
|
||||
<option name="timeStamp" value="29" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="kotlin-line">
|
||||
<url>file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/buscaritem/fragment/BuscarItemFragment.kt</url>
|
||||
<line>64</line>
|
||||
<option name="timeStamp" value="30" />
|
||||
</line-breakpoint>
|
||||
</breakpoints>
|
||||
</breakpoint-manager>
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
package es.verdnatura.presentation.common
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
import android.util.Log.d
|
||||
import androidx.annotation.RequiresApi
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.reflect.TypeToken
|
||||
import org.json.JSONObject
|
||||
import java.time.LocalDateTime
|
||||
import java.time.format.DateTimeFormatter
|
||||
|
@ -9,19 +13,25 @@ import java.time.format.DateTimeFormatter
|
|||
data class itemScanned(var scanned: JSONObject) {
|
||||
var table: String = scanned.get("table").toString()
|
||||
var id: Int = scanned.get("id").toString().toInt()
|
||||
var company: String = scanned.get("company").toString()
|
||||
}
|
||||
|
||||
//Tarea#5109
|
||||
@RequiresApi(Build.VERSION_CODES.O)
|
||||
data class itemScannedAll(var scanned: JSONObject) {
|
||||
var company: String = scanned.get("company").toString()
|
||||
var user: Int = scanned.get("user").toString().toInt()
|
||||
var created: LocalDateTime = LocalDateTime.parse(scanned.get("created").toString(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))
|
||||
var created: LocalDateTime = LocalDateTime.parse(
|
||||
scanned.get("created").toString(),
|
||||
DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")
|
||||
)
|
||||
var table: String = scanned.get("table").toString()
|
||||
var id: String = scanned.get("id").toString()
|
||||
var more: String = scanned.get("more").toString()
|
||||
}
|
||||
|
||||
//Tarea #5109
|
||||
private fun itemScanIsQr(value: String): Boolean {
|
||||
fun itemScanIsQr(value: String): Boolean {
|
||||
|
||||
return try {
|
||||
itemScanned(JSONObject(value))
|
||||
|
@ -31,4 +41,37 @@ private fun itemScanIsQr(value: String): Boolean {
|
|||
return false
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.O)
|
||||
fun itemScanValue(value: String, table: String, field: String): Any {
|
||||
val gson = Gson()
|
||||
|
||||
return try {
|
||||
|
||||
var item = itemScanned(JSONObject(value))
|
||||
|
||||
if (item.company == "vnl" && item.table == table) {
|
||||
|
||||
var valueToReturn: Map<String, Any> =
|
||||
gson.fromJson(value, object : TypeToken<Map<String, Any>>() {}.type)
|
||||
valueToReturn.forEach {
|
||||
|
||||
if (it.key == field) {
|
||||
return it.value.toString() /*si no li pose toString torna error double to string*/
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
throw Exception("QR no válido")
|
||||
|
||||
} catch (Ex: Exception) {
|
||||
if (Ex.message!!.contains("QR")){
|
||||
throw Ex
|
||||
}else{
|
||||
return value
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -15,7 +15,6 @@ import androidx.recyclerview.widget.LinearLayoutManager
|
|||
import com.google.gson.Gson
|
||||
import es.verdnatura.R
|
||||
import es.verdnatura.databinding.FragmentItemCardBinding
|
||||
import es.verdnatura.domain.toast
|
||||
import es.verdnatura.presentation.base.BaseFragment
|
||||
import es.verdnatura.presentation.common.*
|
||||
import es.verdnatura.presentation.view.component.CustomDialogInput
|
||||
|
@ -116,10 +115,10 @@ class ItemCardFragment(
|
|||
}
|
||||
iconHistory.drawable -> {
|
||||
|
||||
ma.onPasillerosItemClickListener(
|
||||
PasillerosItemVO(title = getString(R.string.titleHistorical)),
|
||||
itemInfoG!!.id.toString()
|
||||
)
|
||||
ma.onPasillerosItemClickListener(
|
||||
PasillerosItemVO(title = getString(R.string.titleHistorical)),
|
||||
itemInfoG!!.id.toString()
|
||||
)
|
||||
|
||||
|
||||
}
|
||||
|
@ -154,15 +153,22 @@ class ItemCardFragment(
|
|||
}
|
||||
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.O)
|
||||
private fun setEvents() {
|
||||
//edit_itemFk.requestFocus()
|
||||
|
||||
binding.editItemFk.requestFocus()
|
||||
//edit_itemFk.setOnEditorActionListener { v, actionId, event ->
|
||||
|
||||
binding.editItemFk.setOnEditorActionListener { _, actionId, _ ->
|
||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
|
||||
//if (!edit_itemFk.text.toString().isNullOrEmpty())
|
||||
if (!binding.editItemFk.text.toString().isNullOrEmpty())
|
||||
getItemCard(binding.editItemFk.text.toString())
|
||||
//Tarea#5109
|
||||
try {
|
||||
getItemCard(itemScanValue(binding.editItemFk.text.toString(),"buy","id").toString())
|
||||
}catch (Ex:Exception){
|
||||
ma.messageWithSound(Ex.message.toString(), true,true)
|
||||
}
|
||||
|
||||
// getItemCard(binding.editItemFk.text.toString())
|
||||
binding.editItemFk.setText("")
|
||||
ma.hideKeyboard(binding.editItemFk)
|
||||
return@setOnEditorActionListener true
|
||||
|
@ -666,9 +672,9 @@ class ItemCardFragment(
|
|||
customDialogList.dismiss()
|
||||
|
||||
}.setKoButton(getString(R.string.close)) {
|
||||
ma.hideKeyboard(customDialogList.getEditText())
|
||||
customDialogList.dismiss()
|
||||
}.setValue("").show()
|
||||
ma.hideKeyboard(customDialogList.getEditText())
|
||||
customDialogList.dismiss()
|
||||
}.setValue("").show()
|
||||
|
||||
|
||||
ma.hideKeyboard(customDialogList.getEditText())
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
package es.verdnatura.presentation.view.feature.buscaritem.fragment
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
import android.view.View
|
||||
import android.view.View.GONE
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import androidx.annotation.RequiresApi
|
||||
import androidx.lifecycle.Observer
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import es.verdnatura.R
|
||||
|
@ -11,6 +13,7 @@ import es.verdnatura.databinding.FragmentBuscarItemBinding
|
|||
import es.verdnatura.domain.notNull
|
||||
import es.verdnatura.presentation.base.BaseFragment
|
||||
import es.verdnatura.presentation.common.OnPasillerosItemClickListener
|
||||
import es.verdnatura.presentation.common.itemScanValue
|
||||
import es.verdnatura.presentation.view.feature.buscaritem.adapter.LocationAdapter
|
||||
|
||||
|
||||
|
@ -32,11 +35,12 @@ class BuscarItemFragment(
|
|||
|
||||
override fun getLayoutId(): Int = R.layout.fragment_buscar_item
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.O)
|
||||
override fun init() {
|
||||
|
||||
ma.hideBottomNavigation(GONE)
|
||||
binding.mainToolbar.toolbarTitle.text = getString(R.string.getubicaition)
|
||||
binding.editItemFk.inputType = android.text.InputType.TYPE_CLASS_NUMBER
|
||||
//binding.editItemFk.inputType = android.text.InputType.TYPE_CLASS_NUMBER
|
||||
setEvents()
|
||||
if (itemFk != null) {
|
||||
getLocations(itemFk!!)
|
||||
|
@ -45,13 +49,21 @@ class BuscarItemFragment(
|
|||
}
|
||||
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.O)
|
||||
private fun setEvents() {
|
||||
binding.editItemFk.requestFocus()
|
||||
binding.editItemFk.setOnEditorActionListener { _, actionId, _ ->
|
||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
|
||||
|
||||
if (!binding.editItemFk.text.toString().isNullOrEmpty())
|
||||
getLocations(binding.editItemFk.text.toString())
|
||||
//getLocations(binding.editItemFk.text.toString())
|
||||
/* #Tarea 5109*/
|
||||
|
||||
try {
|
||||
getLocations(itemScanValue(binding.editItemFk.text.toString(), "buy", "id"))
|
||||
} catch (Ex: Exception) {
|
||||
ma.messageWithSound(Ex.message.toString(), true, true)
|
||||
}
|
||||
binding.editItemFk.setText("")
|
||||
ma.hideKeyboard(binding.editItemFk)
|
||||
return@setOnEditorActionListener true
|
||||
|
@ -67,7 +79,7 @@ class BuscarItemFragment(
|
|||
}
|
||||
|
||||
private fun getLocations(itemFk: Any) {
|
||||
this.itemFk = itemFk
|
||||
// this.itemFk = itemFk
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.getLocations(itemFk)
|
||||
}
|
||||
|
@ -89,7 +101,11 @@ class BuscarItemFragment(
|
|||
totalVisible += it.visible.toInt()
|
||||
}
|
||||
binding.mainToolbar.toolbarTitle.text =
|
||||
getString(R.string.item) + itemFk + getString(R.string.visibleTotal) + totalVisible
|
||||
getString(R.string.item) + if (it.list.isNotEmpty()) {
|
||||
it.list.get(0).itemFk
|
||||
} else {
|
||||
""
|
||||
} + getString(R.string.visibleTotal) + totalVisible
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ import android.view.inputmethod.EditorInfo
|
|||
import android.view.inputmethod.InputMethodManager
|
||||
import android.widget.ImageView
|
||||
import android.widget.Toast
|
||||
import androidx.annotation.RequiresApi
|
||||
import androidx.lifecycle.Observer
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
|
@ -398,6 +399,7 @@ class CollectionFragment(
|
|||
}
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.O)
|
||||
override fun observeViewModel() {
|
||||
with(viewModel) {
|
||||
binding.splashProgress.visibility = GONE
|
||||
|
@ -604,20 +606,20 @@ class CollectionFragment(
|
|||
|
||||
})
|
||||
|
||||
/* responseMissingTrash.observe(viewLifecycleOwner, Observer {
|
||||
/* responseMissingTrash.observe(viewLifecycleOwner, Observer {
|
||||
|
||||
if (!goBack) {
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage, isError = true, true)
|
||||
if (!goBack) {
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage, isError = true, true)
|
||||
|
||||
} else {
|
||||
} else {
|
||||
|
||||
missingTrashSuccesful()
|
||||
missingTrashSuccesful()
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
})*/
|
||||
})*/
|
||||
//Tarea 4280
|
||||
/* responseTicketClosure.observe(viewLifecycleOwner, Observer {
|
||||
binding.splashProgress.visibility = GONE
|
||||
|
@ -849,9 +851,9 @@ class CollectionFragment(
|
|||
binding.splashProgress.visibility = GONE
|
||||
if (it.isError) {
|
||||
//TEST3
|
||||
/* if (getDataInt(USERFK) == 18890 || getDataInt(USERFK) == 19591) {
|
||||
"La línea NO se ha marcado correctamente".toast(context)
|
||||
}*/
|
||||
/* if (getDataInt(USERFK) == 18890 || getDataInt(USERFK) == 19591) {
|
||||
"La línea NO se ha marcado correctamente".toast(context)
|
||||
}*/
|
||||
|
||||
if (!goBack) {
|
||||
ma.messageWithSound(it.errorMessage, it.isError, true)
|
||||
|
@ -1493,6 +1495,7 @@ class CollectionFragment(
|
|||
)
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.O)
|
||||
private fun printShelvingResult(placementSupplyListVO: PlacementSupplyListVO) {
|
||||
//////Log.i("VERDNATURA:","Print CustomDialog")
|
||||
var shelving = ""
|
||||
|
@ -1529,48 +1532,59 @@ class CollectionFragment(
|
|||
)
|
||||
) {
|
||||
if (customDialogList.getValueTwo().isNotEmpty()) {
|
||||
if (isNumber(customDialogList.getValue()) && isNumber(total) && customDialogList.getValue()
|
||||
.toInt() > total.toInt()
|
||||
) {
|
||||
getString(R.string.quantityHigh).toast(requireContext())
|
||||
} else if (isNumber(customDialogList.getValue())) {
|
||||
originalItemScan = customDialogList.getValueTwo().toInt()
|
||||
// Log.i("VERDATURA","Le pasamos el siguiente item $originalItemScan que es el escaneado")
|
||||
if (checkItemScan(customDialogList.getValueTwo())) {
|
||||
onQuantityOfShelvingSelected(itemShelvingFk)
|
||||
//Log.i("VERDNATURA:","Cantidad seleccionada")
|
||||
mpok?.start()
|
||||
/* Se quita para comprobar al final de saleTracking_mark
|
||||
ReviewQuantityForRefreshingAndSorting(
|
||||
customDialogList.getValue().toInt(),
|
||||
sales[storedPosition].quantity!!.toInt(),
|
||||
sales[storedPosition].pickedQuantity.toInt()
|
||||
)*/
|
||||
customDialogList.dismiss()
|
||||
/*Tarea #5109*/
|
||||
|
||||
customDialogList.setValue(
|
||||
itemScanValue(
|
||||
customDialogList.getValue(),
|
||||
"buy",
|
||||
"id"
|
||||
).toString()
|
||||
)
|
||||
|
||||
|
||||
|
||||
if (isNumber(customDialogList.getValue()) && isNumber(total) && customDialogList.getValue()
|
||||
.toInt() > total.toInt()
|
||||
) {
|
||||
getString(R.string.quantityHigh).toast(requireContext())
|
||||
} else if (isNumber(customDialogList.getValue())) {
|
||||
originalItemScan = customDialogList.getValueTwo().toInt()
|
||||
// Log.i("VERDATURA","Le pasamos el siguiente item $originalItemScan que es el escaneado")
|
||||
if (checkItemScan(customDialogList.getValueTwo())) {
|
||||
onQuantityOfShelvingSelected(itemShelvingFk)
|
||||
//Log.i("VERDNATURA:","Cantidad seleccionada")
|
||||
mpok?.start()
|
||||
/* Se quita para comprobar al final de saleTracking_mark
|
||||
ReviewQuantityForRefreshingAndSorting(
|
||||
customDialogList.getValue().toInt(),
|
||||
sales[storedPosition].quantity!!.toInt(),
|
||||
sales[storedPosition].pickedQuantity.toInt()
|
||||
)*/
|
||||
customDialogList.dismiss()
|
||||
} else {
|
||||
itemShelvingFkStored = itemShelvingFk
|
||||
binding.splashProgress.visibility =
|
||||
VISIBLE
|
||||
|
||||
viewModel.getIdFromCodeSalix(
|
||||
code = customDialogList.getValueTwo(),
|
||||
)
|
||||
/* } else {
|
||||
viewModel.getIdFromCode(
|
||||
usuario = getData(USER),
|
||||
password = getData(PASSWORD),
|
||||
code = customDialogList.getValueTwo(), "barcodeToItem"
|
||||
)
|
||||
}*/
|
||||
|
||||
customDialogList.dismiss()
|
||||
}
|
||||
scanRequest()
|
||||
hideKeyboards()
|
||||
} else {
|
||||
itemShelvingFkStored = itemShelvingFk
|
||||
binding.splashProgress.visibility =
|
||||
VISIBLE
|
||||
|
||||
viewModel.getIdFromCodeSalix(
|
||||
code = customDialogList.getValueTwo(),
|
||||
)
|
||||
/* } else {
|
||||
viewModel.getIdFromCode(
|
||||
usuario = getData(USER),
|
||||
password = getData(PASSWORD),
|
||||
code = customDialogList.getValueTwo(), "barcodeToItem"
|
||||
)
|
||||
}*/
|
||||
|
||||
customDialogList.dismiss()
|
||||
getString(R.string.quantityError).toast(requireContext())
|
||||
}
|
||||
scanRequest()
|
||||
hideKeyboards()
|
||||
} else {
|
||||
getString(R.string.quantityError).toast(requireContext())
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
getString(R.string.scanItemValidate).toast(requireContext())
|
||||
|
@ -1584,7 +1598,7 @@ class CollectionFragment(
|
|||
.setHintValueTwo(getString(R.string.scanItem))
|
||||
.setValueTwo("").show()
|
||||
} catch (e: Exception) {
|
||||
|
||||
ma.messageWithSound(e.message.toString(), true, true)
|
||||
}
|
||||
try {
|
||||
customDialogList.getEditTextTwo().post(Runnable {
|
||||
|
@ -1601,10 +1615,19 @@ class CollectionFragment(
|
|||
})
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
try {
|
||||
try {/*Tarea 5109 el catch no tenia error*/
|
||||
customDialogList.getEditTextTwo().setOnEditorActionListener { v, actionId, event ->
|
||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
|
||||
|
||||
customDialogList.setValue(
|
||||
itemScanValue(
|
||||
customDialogList.getValue(),
|
||||
"buy",
|
||||
"id"
|
||||
).toString()
|
||||
)
|
||||
|
||||
|
||||
// Log.i("VERDNATURA:","Comprobando COGER-1")
|
||||
if (customDialogList.getValueTwo().isNotEmpty()) {
|
||||
try {
|
||||
|
@ -1664,6 +1687,7 @@ class CollectionFragment(
|
|||
false
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
ma.messageWithSound(e.message.toString(), true, true)
|
||||
}
|
||||
|
||||
placementSupplyAdapter =
|
||||
|
@ -1707,7 +1731,7 @@ class CollectionFragment(
|
|||
|
||||
|
||||
private fun checkItemScan(valueToCheck: String): Boolean {
|
||||
d("VERDNATURA::","Entramos a ver el checkItem")
|
||||
d("VERDNATURA::", "Entramos a ver el checkItem")
|
||||
if (storedPosition >= 0 && sales.size > storedPosition) {
|
||||
val saleToCheck = sales[storedPosition]
|
||||
|
||||
|
@ -1720,7 +1744,7 @@ class CollectionFragment(
|
|||
}
|
||||
}
|
||||
}
|
||||
d("VERDNATURA::","SAlimos de ver el checkItem")
|
||||
d("VERDNATURA::", "SAlimos de ver el checkItem")
|
||||
return false
|
||||
}
|
||||
|
||||
|
@ -2165,134 +2189,134 @@ class CollectionFragment(
|
|||
customDialogThreeButtons.setDescription(getString(R.string.txtnuevacantidad))
|
||||
.setValue("")
|
||||
|
||||
//Tarea4495
|
||||
// if (type != SACADOR) {
|
||||
/* customDialogThreeButtons.setOkButton(getString(R.string.titleFaults)) {
|
||||
checkAndCall(
|
||||
position,
|
||||
customDialogThreeButtons.getValue(),
|
||||
getString(R.string.titleFaults)
|
||||
)
|
||||
//Tarea4495
|
||||
// if (type != SACADOR) {
|
||||
/* customDialogThreeButtons.setOkButton(getString(R.string.titleFaults)) {
|
||||
checkAndCall(
|
||||
position,
|
||||
customDialogThreeButtons.getValue(),
|
||||
getString(R.string.titleFaults)
|
||||
)
|
||||
|
||||
}.setOkButtonTwo(getString(R.string.BasuraRechazar)) {
|
||||
}.setOkButtonTwo(getString(R.string.BasuraRechazar)) {
|
||||
|
||||
checkAndCall(
|
||||
position,
|
||||
customDialogThreeButtons.getValue(),
|
||||
getString(R.string.BasuraRechazar)
|
||||
)
|
||||
}
|
||||
// }
|
||||
checkAndCall(
|
||||
position,
|
||||
customDialogThreeButtons.getValue(),
|
||||
getString(R.string.BasuraRechazar)
|
||||
)
|
||||
}
|
||||
// }
|
||||
|
||||
customDialogThreeButtons.setOkButtonThree(getString(R.string.Reject)) {
|
||||
checkAndCall(
|
||||
position,
|
||||
customDialogThreeButtons.getValue(),
|
||||
getString(R.string.Reject)
|
||||
)
|
||||
customDialogThreeButtons.setOkButtonThree(getString(R.string.Reject)) {
|
||||
checkAndCall(
|
||||
position,
|
||||
customDialogThreeButtons.getValue(),
|
||||
getString(R.string.Reject)
|
||||
)
|
||||
|
||||
}.setOkButtonFour(getString(R.string.Split)) {
|
||||
checkAndCall(
|
||||
position,
|
||||
customDialogThreeButtons.getValue(),
|
||||
getString(R.string.Split)
|
||||
)*/
|
||||
}.setOkButtonFour(getString(R.string.Split)) {
|
||||
checkAndCall(
|
||||
position,
|
||||
customDialogThreeButtons.getValue(),
|
||||
getString(R.string.Split)
|
||||
)*/
|
||||
|
||||
|
||||
.setOkButtonAdd(getString(R.string.Agregar)) {
|
||||
/* checkAndCall(
|
||||
position,
|
||||
customDialogThreeButtons.getValue(),
|
||||
getString(R.string.Agregar)
|
||||
)*/
|
||||
/* checkAndCall(
|
||||
position,
|
||||
customDialogThreeButtons.getValue(),
|
||||
getString(R.string.Agregar)
|
||||
)*/
|
||||
increaseQuantity(position, customDialogThreeButtons.getValue().toInt())
|
||||
scanRequest()
|
||||
customDialogThreeButtons.dismiss()
|
||||
|
||||
}.setKoButton(getString(R.string.cancel)) {
|
||||
}.setKoButton(getString(R.string.cancel)) {
|
||||
scanRequest()
|
||||
customDialogThreeButtons.dismiss()
|
||||
}.show()
|
||||
}.show()
|
||||
customDialogThreeButtons.setFocusDialogValue()
|
||||
}
|
||||
|
||||
/* private fun checkAndCall(position: Int, value: String, action: String) {
|
||||
if (value.trim().isNullOrEmpty()) {
|
||||
getString(R.string.Indicanuevacantidad).toast(requireContext())
|
||||
} else {
|
||||
/* private fun checkAndCall(position: Int, value: String, action: String) {
|
||||
if (value.trim().isNullOrEmpty()) {
|
||||
getString(R.string.Indicanuevacantidad).toast(requireContext())
|
||||
} else {
|
||||
|
||||
when (action) {
|
||||
getString(R.string.Agregar) -> increaseQuantity(position, value.toInt())
|
||||
getString(R.string.BasuraRechazar) -> TrashMissingReject(
|
||||
position,
|
||||
value.toInt(),
|
||||
"TRUE"
|
||||
)
|
||||
getString(R.string.titleFaults) -> TrashMissingReject(
|
||||
position,
|
||||
value.toInt(),
|
||||
"FALSE"
|
||||
)
|
||||
getString(R.string.Reject) -> TrashMissingReject(
|
||||
position,
|
||||
value.toInt(),
|
||||
"reject"
|
||||
)
|
||||
getString(R.string.Split) -> split(position, value.toInt())
|
||||
when (action) {
|
||||
getString(R.string.Agregar) -> increaseQuantity(position, value.toInt())
|
||||
getString(R.string.BasuraRechazar) -> TrashMissingReject(
|
||||
position,
|
||||
value.toInt(),
|
||||
"TRUE"
|
||||
)
|
||||
getString(R.string.titleFaults) -> TrashMissingReject(
|
||||
position,
|
||||
value.toInt(),
|
||||
"FALSE"
|
||||
)
|
||||
getString(R.string.Reject) -> TrashMissingReject(
|
||||
position,
|
||||
value.toInt(),
|
||||
"reject"
|
||||
)
|
||||
getString(R.string.Split) -> split(position, value.toInt())
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
scanRequest()
|
||||
customDialogThreeButtons.dismiss()
|
||||
}
|
||||
}*/
|
||||
scanRequest()
|
||||
customDialogThreeButtons.dismiss()
|
||||
}
|
||||
}*/
|
||||
|
||||
/* private fun split(position: Int, quantity: Int) {
|
||||
/* private fun split(position: Int, quantity: Int) {
|
||||
|
||||
//sergio: SPLIT SALIX
|
||||
//sergio: SPLIT SALIX
|
||||
|
||||
quantityCollectionSplit = quantity
|
||||
positionCollectionSplit = position
|
||||
quantityCollectionSplit = quantity
|
||||
positionCollectionSplit = position
|
||||
|
||||
var totalQuantity: Int = 0
|
||||
try {
|
||||
totalQuantity = sales[position].quantity!!.toInt() - quantity.toInt()
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
var totalQuantity: Int = 0
|
||||
try {
|
||||
totalQuantity = sales[position].quantity!!.toInt() - quantity.toInt()
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
|
||||
|
||||
viewModel.transferSalesSalix(
|
||||
ticketFk = sales[position].ticketFk,
|
||||
saleFk = sales[position].saleFk,
|
||||
quantity = totalQuantity.toString()
|
||||
)
|
||||
viewModel.transferSalesSalix(
|
||||
ticketFk = sales[position].ticketFk,
|
||||
saleFk = sales[position].saleFk,
|
||||
quantity = totalQuantity.toString()
|
||||
)
|
||||
|
||||
}*/
|
||||
}*/
|
||||
|
||||
/* private fun TrashMissingReject(
|
||||
position: Int,
|
||||
quantity: Int,
|
||||
typeCollectionTrashMissingReject: String
|
||||
) {
|
||||
typeCollectionMissing = typeCollectionTrashMissingReject
|
||||
positionCollectionMissing = position
|
||||
quantityCollectionMissing = quantity
|
||||
/* private fun TrashMissingReject(
|
||||
position: Int,
|
||||
quantity: Int,
|
||||
typeCollectionTrashMissingReject: String
|
||||
) {
|
||||
typeCollectionMissing = typeCollectionTrashMissingReject
|
||||
positionCollectionMissing = position
|
||||
quantityCollectionMissing = quantity
|
||||
|
||||
var totalQuantity: Int = 0
|
||||
try {
|
||||
totalQuantity = sales[position].quantity!!.toInt() - quantity.toInt()
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
var totalQuantity: Int = 0
|
||||
try {
|
||||
totalQuantity = sales[position].quantity!!.toInt() - quantity.toInt()
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
|
||||
viewModel.collectionMissingTrash(
|
||||
saleFk = sales[position].saleFk,
|
||||
quantity = totalQuantity.toString(),
|
||||
warehouseFk = getData(WAREHOUSEFK),
|
||||
type = typeCollectionTrashMissingReject,
|
||||
originalQuantity = quantity
|
||||
)
|
||||
viewModel.collectionMissingTrash(
|
||||
saleFk = sales[position].saleFk,
|
||||
quantity = totalQuantity.toString(),
|
||||
warehouseFk = getData(WAREHOUSEFK),
|
||||
type = typeCollectionTrashMissingReject,
|
||||
originalQuantity = quantity
|
||||
)
|
||||
|
||||
}*/
|
||||
}*/
|
||||
|
||||
|
||||
private fun missingTrashSuccesful() {
|
||||
|
@ -2504,7 +2528,7 @@ class CollectionFragment(
|
|||
}
|
||||
|
||||
customDialogList.setTitle(getString(R.string.errorCause))
|
||||
customDialogList.hideTextInput()
|
||||
customDialogList.hideTextInput()
|
||||
.setKoButton(getString(R.string.cancel)) {
|
||||
scanRequest()
|
||||
hideKeyboards()
|
||||
|
|
|
@ -73,7 +73,7 @@ class LoginFragment : BaseFragment<FragmentLoginBinding, LoginViewModel>(LoginVi
|
|||
binding.edittextPassword.setText("nightmare")
|
||||
}
|
||||
// se crean/listan las opciones de formas de trabajo
|
||||
deleteWorkForm("all")
|
||||
//deleteWorkForm("all")
|
||||
listForms = getWorkForm().sortedBy { it.created }
|
||||
|
||||
binding.edittextServer.keyListener = null
|
||||
|
|
|
@ -12,6 +12,7 @@ import android.view.inputmethod.EditorInfo
|
|||
import android.view.inputmethod.InputMethodManager
|
||||
import android.widget.ImageView
|
||||
import android.widget.Toast
|
||||
import androidx.annotation.RequiresApi
|
||||
import androidx.lifecycle.Observer
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
|
@ -75,7 +76,7 @@ class EndSacadorFragment(
|
|||
private var positionCollectionMissing = 0
|
||||
private var quantityCollectionMissing = 0
|
||||
private var positionIncreaseQuantity = 0
|
||||
private var quantityIncrease= 0
|
||||
private var quantityIncrease = 0
|
||||
private var quantityCollectionSplit = 0
|
||||
private var positionCollectionSplit = 0
|
||||
|
||||
|
@ -169,6 +170,7 @@ class EndSacadorFragment(
|
|||
}
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.O)
|
||||
override fun observeViewModel() {
|
||||
with(viewModel) {
|
||||
salesList.observe(viewLifecycleOwner, Observer {
|
||||
|
@ -290,16 +292,16 @@ class EndSacadorFragment(
|
|||
}
|
||||
})
|
||||
|
||||
/* responseMissingTrash.observe(viewLifecycleOwner, Observer {
|
||||
/* responseMissingTrash.observe(viewLifecycleOwner, Observer {
|
||||
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage, isError = true, true)
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage, isError = true, true)
|
||||
|
||||
} else {
|
||||
missingTrashSuccesful()
|
||||
setTotalLines()
|
||||
}
|
||||
})*/
|
||||
} else {
|
||||
missingTrashSuccesful()
|
||||
setTotalLines()
|
||||
}
|
||||
})*/
|
||||
|
||||
responseSaleGroupAdd.observe(viewLifecycleOwner, Observer {
|
||||
binding.splashProgress.visibility = GONE
|
||||
|
@ -863,6 +865,7 @@ class EndSacadorFragment(
|
|||
)
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.O)
|
||||
private fun printShelvingResult(placementSupplyListVO: PlacementSupplyListVO) {
|
||||
var shelving = ""
|
||||
var item = ""
|
||||
|
@ -887,22 +890,35 @@ class EndSacadorFragment(
|
|||
|
||||
|
||||
if (customDialogList.getValueTwo().isNotEmpty()) {
|
||||
|
||||
|
||||
if (checkItemScan(customDialogList.getValueTwo())) {
|
||||
onQuantityOfShelvingSelected(itemShelvingFk)
|
||||
mpok?.start()
|
||||
customDialogList.dismiss()
|
||||
} else {
|
||||
itemShelvingFkStored = itemShelvingFk
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.getIdFromCode(
|
||||
code = customDialogList.getValueTwo()
|
||||
/*Tarea 5109*/
|
||||
try {
|
||||
customDialogList.setValueTwo(
|
||||
itemScanValue(
|
||||
customDialogList.getValueTwo(),
|
||||
"buy",
|
||||
"id"
|
||||
).toString()
|
||||
)
|
||||
customDialogList.dismiss()
|
||||
|
||||
|
||||
if (checkItemScan(customDialogList.getValueTwo())) {
|
||||
onQuantityOfShelvingSelected(itemShelvingFk)
|
||||
mpok?.start()
|
||||
customDialogList.dismiss()
|
||||
} else {
|
||||
itemShelvingFkStored = itemShelvingFk
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.getIdFromCode(
|
||||
code = customDialogList.getValueTwo()
|
||||
)
|
||||
customDialogList.dismiss()
|
||||
}
|
||||
} catch (Ex: Exception) {
|
||||
ma.messageWithSound(Ex.message.toString(), true, true)
|
||||
}
|
||||
scanRequest()
|
||||
hideKeyboards()
|
||||
|
||||
} else {
|
||||
getString(R.string.scanItemValidate).toast(requireContext())
|
||||
}
|
||||
|
@ -929,26 +945,36 @@ class EndSacadorFragment(
|
|||
|
||||
customDialogList.getEditTextTwo().setOnEditorActionListener { v, actionId, event ->
|
||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
|
||||
try {
|
||||
customDialogList.setValueTwo(
|
||||
itemScanValue(
|
||||
customDialogList.getValueTwo(),
|
||||
"buy",
|
||||
"id"
|
||||
).toString()
|
||||
)
|
||||
originalItemScan = customDialogList.getValueTwo()
|
||||
////Log.i("VERDNATURA:","el item original es $originalItemScan")
|
||||
|
||||
|
||||
originalItemScan = customDialogList.getValueTwo()
|
||||
////Log.i("VERDNATURA:","el item original es $originalItemScan")
|
||||
|
||||
if (customDialogList.getValueTwo().isNotEmpty()) {
|
||||
if (checkItemScan(customDialogList.getValueTwo())) {
|
||||
onQuantityOfShelvingSelected(itemShelvingFk)
|
||||
mpok?.start()
|
||||
customDialogList.dismiss()
|
||||
if (customDialogList.getValueTwo().isNotEmpty()) {
|
||||
if (checkItemScan(customDialogList.getValueTwo())) {
|
||||
onQuantityOfShelvingSelected(itemShelvingFk)
|
||||
mpok?.start()
|
||||
customDialogList.dismiss()
|
||||
} else {
|
||||
itemShelvingFkStored = itemShelvingFk
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.getIdFromCode(
|
||||
code = customDialogList.getValueTwo()
|
||||
)
|
||||
customDialogList.dismiss()
|
||||
}
|
||||
} else {
|
||||
itemShelvingFkStored = itemShelvingFk
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.getIdFromCode(
|
||||
code = customDialogList.getValueTwo()
|
||||
)
|
||||
customDialogList.dismiss()
|
||||
getString(R.string.scanItemValidate).toast(requireContext())
|
||||
}
|
||||
} else {
|
||||
getString(R.string.scanItemValidate).toast(requireContext())
|
||||
} catch (Ex: Exception) {
|
||||
ma.messageWithSound(Ex.message.toString(), true, true)
|
||||
|
||||
}
|
||||
scanRequest()
|
||||
hideKeyboards()
|
||||
|
@ -1158,53 +1184,53 @@ class EndSacadorFragment(
|
|||
try {
|
||||
customDialogThreeButtons.setDescription(getString(R.string.txtnuevacantidad))
|
||||
.setValue("")
|
||||
/* .setOkButton(getString(R.string.titleFaults)) {
|
||||
checkAndCall(
|
||||
position,
|
||||
customDialogThreeButtons.getValue().toInt(),
|
||||
getString(R.string.titleFaults)
|
||||
)
|
||||
/* .setOkButton(getString(R.string.titleFaults)) {
|
||||
checkAndCall(
|
||||
position,
|
||||
customDialogThreeButtons.getValue().toInt(),
|
||||
getString(R.string.titleFaults)
|
||||
)
|
||||
|
||||
}.setOkButtonTwo(getString(R.string.BasuraRechazar)) {
|
||||
}.setOkButtonTwo(getString(R.string.BasuraRechazar)) {
|
||||
|
||||
checkAndCall(
|
||||
position,
|
||||
customDialogThreeButtons.getValue().toInt(),
|
||||
getString(R.string.BasuraRechazar)
|
||||
)
|
||||
checkAndCall(
|
||||
position,
|
||||
customDialogThreeButtons.getValue().toInt(),
|
||||
getString(R.string.BasuraRechazar)
|
||||
)
|
||||
|
||||
}.setOkButtonThree(getString(R.string.Reject)) {
|
||||
checkAndCall(
|
||||
position,
|
||||
customDialogThreeButtons.getValue().toInt(),
|
||||
getString(R.string.Reject)
|
||||
)
|
||||
}.setOkButtonThree(getString(R.string.Reject)) {
|
||||
checkAndCall(
|
||||
position,
|
||||
customDialogThreeButtons.getValue().toInt(),
|
||||
getString(R.string.Reject)
|
||||
)
|
||||
|
||||
}.setOkButtonFour(getString(R.string.Split)) {
|
||||
checkAndCall(
|
||||
position,
|
||||
customDialogThreeButtons.getValue().toInt(),
|
||||
getString(R.string.Split)
|
||||
)
|
||||
}.setOkButtonFour(getString(R.string.Split)) {
|
||||
checkAndCall(
|
||||
position,
|
||||
customDialogThreeButtons.getValue().toInt(),
|
||||
getString(R.string.Split)
|
||||
)
|
||||
|
||||
*/
|
||||
*/
|
||||
.setOkButtonAdd(getString(R.string.Agregar)) {
|
||||
increaseQuantity(position, customDialogThreeButtons.getValue().toInt())
|
||||
scanRequest()
|
||||
customDialogThreeButtons.dismiss()
|
||||
|
||||
/* checkAndCall(
|
||||
position,
|
||||
customDialogThreeButtons.getValue().toInt(),
|
||||
getString(R.string.Agregar)
|
||||
)*/
|
||||
/* checkAndCall(
|
||||
position,
|
||||
customDialogThreeButtons.getValue().toInt(),
|
||||
getString(R.string.Agregar)
|
||||
)*/
|
||||
|
||||
}.setKoButton(getString(R.string.cancel)) {
|
||||
scanRequest()
|
||||
customDialogThreeButtons.dismiss()
|
||||
}.show()
|
||||
customDialogThreeButtons.setFocusDialogValue()
|
||||
}catch (ex:Exception){
|
||||
} catch (ex: Exception) {
|
||||
getString(R.string.errorQuantity).toast(context)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -200,6 +200,7 @@ class UbicadorFragment(
|
|||
LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.O)
|
||||
@SuppressLint("SetTextI18n")
|
||||
private fun setEvents() {
|
||||
binding.mainToolbar.backButton.setOnClickListener {
|
||||
|
@ -224,10 +225,23 @@ class UbicadorFragment(
|
|||
binding.editMatricula.text.toString()
|
||||
)
|
||||
} else {
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
viewModel.getIdFromCode(
|
||||
|
||||
/*Tarea#5109*/
|
||||
/*viewModel.getIdFromCode(
|
||||
code = binding.editMatricula.text.toString()
|
||||
)
|
||||
)*/
|
||||
try {
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
viewModel.getIdFromCode(
|
||||
code = itemScanValue(
|
||||
binding.editMatricula.text.toString(),
|
||||
"buy",
|
||||
"id"
|
||||
).toString()
|
||||
)
|
||||
} catch (Ex: Exception) {
|
||||
ma.messageWithSound(Ex.message.toString(), true, true)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -534,7 +548,7 @@ class UbicadorFragment(
|
|||
}
|
||||
})
|
||||
responseAddList.observe(viewLifecycleOwner, Observer {
|
||||
binding.splashProgress.visibility= GONE
|
||||
binding.splashProgress.visibility = GONE
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage, it.isError, false)
|
||||
|
||||
|
@ -591,19 +605,20 @@ class UbicadorFragment(
|
|||
})
|
||||
|
||||
responseMake.observe(viewLifecycleOwner, Observer {
|
||||
binding.splashProgress.visibility=GONE
|
||||
if (it.isError){
|
||||
ma.messageWithSound(it.errorMessage,true,true,isToasted = true)
|
||||
}else{
|
||||
if (!shelvingFk.isNullOrEmpty()) {
|
||||
binding.splashProgress.visibility = GONE
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage, true, true, isToasted = true)
|
||||
} else {
|
||||
if (!shelvingFk.isNullOrEmpty()) {
|
||||
|
||||
binding.mainToolbar.toolbarTitle.text = shelvingFk
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
viewModel.itemShelvingList(
|
||||
shelvingFk
|
||||
)
|
||||
binding.mainToolbar.toolbarTitle.text = shelvingFk
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
viewModel.itemShelvingList(
|
||||
shelvingFk
|
||||
)
|
||||
|
||||
}}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -840,7 +855,7 @@ class UbicadorFragment(
|
|||
.setDescription(getString(R.string.selectDestiny) + item.item).setValue("")
|
||||
.setOkButton(getString(R.string.transfer)) {
|
||||
if (customDialogInput.getValue().isNotEmpty()) {
|
||||
binding.splashProgress.visibility= VISIBLE
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
viewModel.itemShelvingTransfer(
|
||||
item.id,
|
||||
customDialogInput.getValue()
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
style="@style/InputLineTextSearch"
|
||||
android:layout_width="match_parent"
|
||||
android:backgroundTint="@android:color/white"
|
||||
android:inputType="number"
|
||||
android:inputType="text"
|
||||
android:lines="1"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
|
|
Loading…
Reference in New Issue