feat itemGetBalance refs #6769
This commit is contained in:
parent
75c5d9ffd7
commit
3cc2717a90
|
@ -145,7 +145,7 @@ class HistoricoArticuloFragment(
|
|||
listHistoric.removeAll(listHistoryAux.toSet())
|
||||
listHistoryAux.forEach {
|
||||
|
||||
if (it.name?.contains(
|
||||
if (it.entityName?.contains(
|
||||
binding.filterNameordateitem.text.toString(), true
|
||||
) == true
|
||||
) {
|
||||
|
@ -180,21 +180,24 @@ class HistoricoArticuloFragment(
|
|||
listHistoric.clear()
|
||||
listHistoryAux.clear()
|
||||
lista.forEach {
|
||||
if (filter == "all" || (filter == "falta" && it.name?.contains(
|
||||
if (filter == "all" || (filter == "falta" && it.entityName?.contains(
|
||||
filter,
|
||||
true
|
||||
) == true) || (filter != "falta" && it.name?.contains(
|
||||
) == true) || (filter != "falta" && it.entityName?.contains(
|
||||
"merma",
|
||||
true
|
||||
) == true && !it.name?.contains("falta", true)!!)
|
||||
) == true && !it.entityName?.contains("falta", true)!!)
|
||||
) {
|
||||
listHistoric.add(it)
|
||||
}
|
||||
}
|
||||
listHistoric.sortWith { item1, item2 ->
|
||||
val compareShipped = item1.shipped.compareTo(item2.shipped)
|
||||
//comentar con ivanm
|
||||
if (compareShipped == 0) {
|
||||
if (item1.order == null) {
|
||||
if (item1.order == null && item2.order == null) {
|
||||
item2.balance!!.compareTo(item1.balance!!) // Comparar por balance cuando ambos órdenes son nulos
|
||||
}else if (item1.order == null) {
|
||||
-1
|
||||
} else if (item2.order == null) {
|
||||
1
|
||||
|
@ -215,10 +218,10 @@ class HistoricoArticuloFragment(
|
|||
title = getString(R.string.titleWebViewer),
|
||||
), entryPoint = Gson().toJson(
|
||||
mutableMapOf(
|
||||
"entryPoint" to item.origin,
|
||||
"entryPoint" to item.entityId,
|
||||
"web" to "${
|
||||
mobileApplication.dataStoreApp.getServerSalix()
|
||||
}/#!/ticket/${item.origin}/summary"
|
||||
}/#!/ticket/${item.entityId}/summary"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -226,7 +229,7 @@ class HistoricoArticuloFragment(
|
|||
customDialog = CustomDialog(requireContext())
|
||||
customDialog
|
||||
.setTitle(getString(R.string.entry))
|
||||
.setDescription(item.origin.toString())
|
||||
.setDescription(item.entityId.toString())
|
||||
.setOkButton(
|
||||
getString(
|
||||
R.string.accept
|
||||
|
|
|
@ -7,10 +7,10 @@ import es.verdnatura.domain.isoToString
|
|||
class ItemHistoricoVO(
|
||||
//var shipped: String? = null,
|
||||
var stateName: String? = null,
|
||||
var origin: Int? = null,
|
||||
var originId: Int? = null,
|
||||
var reference: String? = null,
|
||||
var clientFk: Int? = null,
|
||||
var name: String? = null,
|
||||
var entityId: Int? = null,
|
||||
var entityName: String? = null,
|
||||
var invalue: Int? = null,
|
||||
var out: Int? = null,
|
||||
var balance: Int? = null,
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="start"
|
||||
android:text="@{item.name}"
|
||||
android:text="@{item.entityName}"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body2" />
|
||||
|
||||
|
|
Loading…
Reference in New Issue