diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragment.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragment.kt index 091bf087..76fde6cf 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragment.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragment.kt @@ -549,25 +549,6 @@ class CollectionFragment( } - - - responseItem_updatePackingShelve.observe(viewLifecycleOwner, Observer { - binding.splashProgress.visibility = GONE - ma.messageWithSound( - if (it.isError) it.errorMessage else getString(R.string.packingSave), - it.isError, !it.isError - ) - if (!it.isError) { - viewModel.collectionTicketGet( - collection.collectionFk, - mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK), - print = "0", - type - ) - } - - }) - responseSaleGroup.observe(viewLifecycleOwner, Observer { if (it.isError) { @@ -1059,7 +1040,6 @@ class CollectionFragment( }, object : onPackingClickListener { override fun onPackingClick(sale: SaleVO) { - // item_updatePackingShelve(sale.itemFk) } }, object : OnTicketClickListener { @@ -2167,60 +2147,7 @@ class CollectionFragment( } - /* private fun item_updatePackingShelve(itemFk: Int) { - isMarking = false - customDialogInput.setTitle(getString(R.string.packetNumberShelves)) - .setDescription(getString(R.string.packetIndicate)) - .setOkButton(getString(R.string.accept)) { - if (!customDialogInput.getValue().isNullOrEmpty()) { - - binding.splashProgress.visibility = VISIBLE - viewModel.item_updatePackingShelve( - vSelf = itemFk, - vPacking = customDialogInput.getValue().toInt() - ) - hideKeyboards() - //showKeyboards() - - } - customDialogInput.setValue("") - customDialogInput.dismiss() - // hideKeyboards() - showKeyboards() - }.setKoButton(getString(R.string.cancel)) { - - customDialogInput.dismiss() - //hideKeyboards() - showKeyboards() - }.setValue("").show() - - customDialogInput.setInputText(TYPE_CLASS_NUMBER) - customDialogInput.currentFocus - customDialogInput.setFocusText() - showKeyboards() - - customDialogInput.getEditText().setOnEditorActionListener { v, actionId, event -> - if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) { - if (!customDialogInput.getValue().isNullOrEmpty()) { - - binding.splashProgress.visibility = VISIBLE - viewModel.item_updatePackingShelve( - vSelf = itemFk, - vPacking = customDialogInput.getValue().toInt() - ) - - } - customDialogInput.setValue("") - scanRequest() - customDialogInput.dismiss() - hideKeyboards() - return@setOnEditorActionListener true - } - false - } - - }*/ //FALTAS / BASURA / SPLIT diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragmentPicker.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragmentPicker.kt index b8518d90..7c678193 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragmentPicker.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragmentPicker.kt @@ -545,24 +545,6 @@ class CollectionFragmentPicker( } - - responseItem_updatePackingShelve.observe(viewLifecycleOwner, Observer { - binding.splashProgress.visibility = View.GONE - ma.messageWithSound( - if (it.isError) it.errorMessage else getString(R.string.packingSave), - it.isError, !it.isError - ) - if (!it.isError) { - viewModel.collectionTicketGet( - collection.collectionFk, - mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK), - print = "0", - type - ) - } - - }) - responseSaleGroup.observe(viewLifecycleOwner, Observer { if (it.isError) { @@ -1071,7 +1053,6 @@ class CollectionFragmentPicker( }, object : onPackingClickListener { override fun onPackingClick(sale: SaleVO) { - // item_updatePackingShelve(sale.itemFk) } }, object : OnTicketClickListener { diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragmentPickerNew.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragmentPickerNew.kt index f3fe8830..c75d26a8 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragmentPickerNew.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragmentPickerNew.kt @@ -630,7 +630,6 @@ class CollectionFragmentPickerNew( }, object : OnPackingClickSaleListener { override fun onPackingClick(sale: Sale) { - // item_updatePackingShelve(sale.itemFk) if (!sale.code.isNullOrEmpty()) ma.onPasillerosItemClickListener( PasillerosItemVO( title = getString(R.string.titleUbicator), diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragmentPreChecker.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragmentPreChecker.kt index 42a05b90..fc237a12 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragmentPreChecker.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragmentPreChecker.kt @@ -565,25 +565,6 @@ class CollectionFragmentPreChecker( } - - - responseItem_updatePackingShelve.observe(viewLifecycleOwner, Observer { - binding.splashProgress.visibility = GONE - ma.messageWithSound( - if (it.isError) it.errorMessage else getString(R.string.packingSave), - it.isError, !it.isError - ) - if (!it.isError) { - viewModel.collectionTicketGet( - collection.collectionFk, - mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK), - print = "0", - type - ) - } - - }) - responseSaleGroup.observe(viewLifecycleOwner, Observer { if (it.isError) { @@ -1096,7 +1077,6 @@ class CollectionFragmentPreChecker( }, object : onPackingClickListener { override fun onPackingClick(sale: SaleVO) { - //item_updatePackingShelve(sale.itemFk) } }, object : OnTicketClickListener { @@ -2183,22 +2163,6 @@ class CollectionFragmentPreChecker( hideKeyboards() } - /* private fun customDialogInputPacking(itemFk: Int) { - if (!customDialogInput.getValue().isNullOrEmpty()) { - - binding.splashProgress.visibility = VISIBLE - viewModel.item_updatePackingShelve( - vSelf = itemFk, - vPacking = customDialogInput.getValue().toInt() - ) - - } - customDialogInput.setValue("") - scanRequest() - customDialogInput.dismiss() - hideKeyboards() - }*/ - //FALTAS / BASURA / SPLIT private fun showQuantityDialog(position: Int) { diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionViewModel.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionViewModel.kt index 600bab64..385d7739 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionViewModel.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionViewModel.kt @@ -118,10 +118,6 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) { val responseUsedShelves: LiveData get() = _responseUsedShelves - private val _responseItem_updatePackingShelve by lazy { MutableLiveData() } - val responseItem_updatePackingShelve: LiveData - get() = _responseItem_updatePackingShelve - private val _responseSaleGroup by lazy { MutableLiveData() } val responseSaleGroup: LiveData get() = _responseSaleGroup diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/sacador/model/TicketItemVO.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/sacador/model/TicketItemVO.kt index 9aded48a..16946fe4 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/sacador/model/TicketItemVO.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/sacador/model/TicketItemVO.kt @@ -22,6 +22,7 @@ data class Ticket( val warehouseFk: Int, val sales: MutableList = mutableListOf() ) + data class Sale( val itemShelvingSaleFk: Int, val ticketFk: Int, @@ -31,22 +32,21 @@ data class Sale( val longName: String, val size: Int, var semaphore: String?, - val color: String ="", - val productor: String?="", - val origin: String="", - val concept: String="", - val packing: Int?=null, - val grouping: Int?=null, - val isAdded: Int=0, + val color: String = "", + val productor: String? = "", + val origin: String = "", + val concept: String = "", + val packing: Int? = null, + val grouping: Int? = null, + val isAdded: Int = 0, val workerFk: Int = 0, - val packingShelve: Int = 0, val hasMistake: Boolean?, val originalQuantity: Int?, var saleQuantity: Int, - var reservedQuantity: Int= 0 , + var reservedQuantity: Int = 0, val code: String? = null, - val parkingCode: String?=null, - val pickingOrder: Int?=null, + val parkingCode: String? = null, + val pickingOrder: Int? = null, var sonSales: MutableList = mutableListOf(), var placements: List = listOf(), var Barcodes: List = listOf(), @@ -57,11 +57,10 @@ data class Sale( var level: String? = "", //para pintar color var rgb: String? = "", - var isPicked: Int=0, - var accumulatedQuantity:Int=0, - var totalItemShelving: Int =0, - var currentItemShelving:Int = 0 - + var isPicked: Int = 0, + var accumulatedQuantity: Int = 0, + var totalItemShelving: Int = 0, + var currentItemShelving: Int = 0 ) @@ -136,7 +135,6 @@ class SaleVO( var cel2: String = "", var cel3: String = "", var saleGroupFk: String = "", - var packingShelve: String = "", var picked: String = "", var isParent: Boolean = false, var totalSales: Int = 0, @@ -145,7 +143,6 @@ class SaleVO( var hasMistake: Boolean = false, var sectorFk: Int? = null - ) class PlacementVO( @@ -196,59 +193,58 @@ class MistakeTypeListVO( var list: List = listOf() ) -val barcodes = listOf("12345678","87654321","11111111","00000000") +val barcodes = listOf("12345678", "87654321", "11111111", "00000000") val sale1 = Sale( - 13421890,4475590, null, 42272072, 24460, "Lilium Oriental Signum 4", 90, null, + 13421890, 4475590, null, 42272072, 24460, "Lilium Oriental Signum 4", 90, null, "Blanco", "Bakker Lilies", "NLD", "LO Signum 4", 120, 10, 0, 24981, - 180, false, 10, 100, 10, null, null, 6, + false, 10, 100, 10, null, null, 6, ) val sale2 = Sale( - 13421889,4474654, null, 42263590, 61148, "Paniculata Rainbow MA 40 gr", 75, null, + 13421889, 4474654, null, 42263590, 61148, "Paniculata Rainbow MA 40 gr", 75, null, "Mixto", "Malima", "ECU", "PAN Rainbow MA 40 gr", 250, 25, 0, 24981, - 600, false, 25, 250, 30, null, null, 5 + false, 25, 250, 30, null, null, 5 ) val sale3 = Sale( - 13421888,4475611, null, 42272185, 56628, "Lilium Oriental A2 Roselily 2", 70, null, + 13421888, 4475611, null, 42272185, 56628, "Lilium Oriental A2 Roselily 2", 70, null, "Mixto", "Moerman Lilium BV", "NLD", "LO A2 Roselily 2", 40, 10, 0, 24981, - 200, false, 80, 800, 20, null, null, 4 + false, 80, 800, 20, null, null, 4 ) val sale4 = Sale( - 13421887,4475611, null, 42272186, 34087, "Lilium Asiatico Brindisi 4-5", 95, null, + 13421887, 4475611, null, 42272186, 34087, "Lilium Asiatico Brindisi 4-5", 95, null, "Rosa", "Double Check Lily", "NLD", "LA Brindisi 4-5", 60, 10, 0, 24981, - 160, false, 60, 600, 10, null, null, 3 + false, 60, 600, 10, null, null, 3 ) val sale5 = Sale( - 13421886,4474654, null, 42263585, 77582, "Clavel Red Fancy", 60, "2", + 13421886, 4474654, null, 42263585, 77582, "Clavel Red Fancy", 60, "2", "Rojo", "Daliaflora", "COL", "CL Red FCY", 15, 25, 0, 24981, - 933, true, 250, 250, 30, "KQS", "GA-24-3", 1, Barcodes = barcodes + true, 250, 250, 30, "KQS", "GA-24-3", 1, Barcodes = barcodes ) val sale6 = Sale( - 13421885,4474654, null, 42263588, 117832, "Rosa Freedom", 50, "1", + 13421885, 4474654, null, 42263588, 117832, "Rosa Freedom", 50, "1", "Rojo", "Multiflora", "COL", "RS Freedom", 200, 25, 0, 24981, - 403, true, 25, 250, 25, "IXF", "B-29-1", 2 + true, 25, 250, 25, "IXF", "B-29-1", 2 ) val sale7 = Sale( - 13421898,4475590, 222154, 42272074, 10067, "Brillo Floralife", 10, "3", + 13421898, 4475590, 222154, 42272074, 10067, "Brillo Floralife", 10, "3", "Negro", null, "---", "Brillo Floralife", 12, 1, 0, 24981, - 179020, false, 3, 30, 30, null, "CH--43", 121930 + false, 3, 30, 30, null, "CH--43", 121930 ) val sale8 = Sale( - 13421883,4475557, 222152, 42271653, 103803, "Bolsa Kraft Blanco", 1, null, + 13421883, 4475557, 222152, 42271653, 103803, "Bolsa Kraft Blanco", 1, null, "Blanco", null, "NLD", "Bolsa Kraft Blanco", 250, 25, 0, 24981, - 1000, false, 25, 250, 250, null, "CH--43", 121930 + false, 25, 250, 250, null, "CH--43", 121930 ) val listaDeSales: MutableList = mutableListOf(sale1, sale7) // 4475590 val listaDeSales2: MutableList = mutableListOf(sale2, sale5, sale6) //4474654 val listaDeSales3: MutableList = mutableListOf(sale3, sale4) //4475611 val listaDeSales4: MutableList = mutableListOf(sale8) //4475557 - var ticketLocal = mutableListOf( Ticket( 4475590, diff --git a/app/src/main/res/layout/item_article_row.xml b/app/src/main/res/layout/item_article_row.xml index 1331bb8e..37a7ac95 100644 --- a/app/src/main/res/layout/item_article_row.xml +++ b/app/src/main/res/layout/item_article_row.xml @@ -163,38 +163,7 @@ app:layout_constraintStart_toEndOf="@+id/linearLayout3" app:layout_constraintTop_toTopOf="parent" android:maxLines="1"/> - - + - - -