refs #6186 packingShelve

This commit is contained in:
Sergio De la torre 2024-01-31 08:59:36 +01:00
parent 879f957348
commit 94a2b35193
8 changed files with 33 additions and 236 deletions

View File

@ -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

View File

@ -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 {

View File

@ -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),

View File

@ -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) {

View File

@ -118,10 +118,6 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) {
val responseUsedShelves: LiveData<ResponseItemVO>
get() = _responseUsedShelves
private val _responseItem_updatePackingShelve by lazy { MutableLiveData<ResponseItemVO>() }
val responseItem_updatePackingShelve: LiveData<ResponseItemVO>
get() = _responseItem_updatePackingShelve
private val _responseSaleGroup by lazy { MutableLiveData<ResponseItemVO>() }
val responseSaleGroup: LiveData<ResponseItemVO>
get() = _responseSaleGroup

View File

@ -22,6 +22,7 @@ data class Ticket(
val warehouseFk: Int,
val sales: MutableList<Sale> = mutableListOf()
)
data class Sale(
val itemShelvingSaleFk: Int,
val ticketFk: Int,
@ -39,7 +40,6 @@ data class Sale(
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,
@ -62,7 +62,6 @@ data class Sale(
var totalItemShelving: Int = 0,
var currentItemShelving: Int = 0
)
class CollectionTicketList(
@ -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(
@ -201,54 +198,53 @@ val barcodes = listOf("12345678","87654321","11111111","00000000")
val sale1 = Sale(
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,
"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,
"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,
"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",
"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",
"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",
"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,
"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<Sale> = mutableListOf(sale1, sale7) // 4475590
val listaDeSales2: MutableList<Sale> = mutableListOf(sale2, sale5, sale6) //4474654
val listaDeSales3: MutableList<Sale> = mutableListOf(sale3, sale4) //4475611
val listaDeSales4: MutableList<Sale> = mutableListOf(sale8) //4475557
var ticketLocal = mutableListOf(
Ticket(
4475590,

View File

@ -163,38 +163,7 @@
app:layout_constraintStart_toEndOf="@+id/linearLayout3"
app:layout_constraintTop_toTopOf="parent"
android:maxLines="1"/>
<TextView
android:id="@+id/item_packing_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="30dp"
android:layout_marginEnd="@dimen/layout_margin_min"
android:paddingTop="2dp"
android:text="En balda:"
tool:text="En balda:"
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/h7"
android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@+id/item_packing_itemFk"
app:layout_constraintStart_toEndOf="@+id/item_article_itemFk"
app:layout_constraintTop_toTopOf="parent"
android:maxLines="1"/>
<TextView
android:id="@+id/item_packing_itemFk"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="1dp"
android:layout_marginEnd="@dimen/layout_margin_min"
android:text="@{sale.packingShelve}"
tool:text="Number"
android:paddingTop="2dp"
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/h7"
android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@+id/item_article_quantity_picked"
app:layout_constraintStart_toEndOf="@+id/item_packing_text"
app:layout_constraintTop_toTopOf="parent"
android:maxLines="1"/>
<TextView
android:id="@+id/item_article_quantity_picked"
android:layout_width="wrap_content"

View File

@ -204,41 +204,6 @@
app:layout_constraintTop_toTopOf="parent"
tool:text="85478" />
<TextView
android:id="@+id/item_packing_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="30dp"
android:layout_marginEnd="@dimen/layout_margin_min"
android:maxLines="1"
android:paddingTop="2dp"
android:text="@string/in_shelve"
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body2"
android:textStyle="bold"
android:visibility="invisible"
app:layout_constraintEnd_toStartOf="@+id/item_packing_itemFk"
app:layout_constraintStart_toEndOf="@+id/item_article_itemFk"
app:layout_constraintTop_toTopOf="parent"
tool:text="En balda:" />
<TextView
android:id="@+id/item_packing_itemFk"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="1dp"
android:layout_marginEnd="@dimen/layout_margin_min"
android:maxLines="1"
android:paddingTop="2dp"
android:text="@{sale.packingShelve}"
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body2"
android:textStyle="bold"
android:visibility="invisible"
app:layout_constraintEnd_toStartOf="@+id/item_article_quantity_picked"
app:layout_constraintStart_toEndOf="@+id/item_packing_text"
app:layout_constraintTop_toTopOf="parent"
tool:text="Number" />
<TextView
android:id="@+id/item_article_quantity_pickedOld"