refs #5004
This commit is contained in:
parent
47b1fce0b9
commit
53a230db30
|
@ -1,6 +1,7 @@
|
||||||
package es.verdnatura.presentation.view.feature.collection.adapter
|
package es.verdnatura.presentation.view.feature.collection.adapter
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import android.content.res.ColorStateList
|
||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
import android.graphics.drawable.Drawable
|
import android.graphics.drawable.Drawable
|
||||||
import android.util.Log.d
|
import android.util.Log.d
|
||||||
|
@ -123,11 +124,6 @@ class SaleAdapter(
|
||||||
false
|
false
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
//Tarea #5004
|
|
||||||
/* if (sale.hasMistake){
|
|
||||||
imageErrorMessage.setBackgroundColor(color.RED)
|
|
||||||
}*/
|
|
||||||
|
|
||||||
imageErrorMessage.setOnClickListener {
|
imageErrorMessage.setOnClickListener {
|
||||||
onMistakeClickListener.onMistakeClickListener(sale)
|
onMistakeClickListener.onMistakeClickListener(sale)
|
||||||
false
|
false
|
||||||
|
@ -354,6 +350,16 @@ class SaleAdapter(
|
||||||
itemArticleQuantityPicked.visibility = View.VISIBLE
|
itemArticleQuantityPicked.visibility = View.VISIBLE
|
||||||
itemArticleQuantityLine3.visibility = View.VISIBLE
|
itemArticleQuantityLine3.visibility = View.VISIBLE
|
||||||
if (type != SACADOR) {
|
if (type != SACADOR) {
|
||||||
|
|
||||||
|
if (sale.hasMistake > 0) {
|
||||||
|
val drawable = imageErrorMessage.drawable
|
||||||
|
imageErrorMessage.imageTintList = ColorStateList.valueOf(
|
||||||
|
getColor(
|
||||||
|
context!!, R.color.verdnatura_red_salix
|
||||||
|
)
|
||||||
|
)
|
||||||
|
imageErrorMessage.setImageDrawable(drawable)
|
||||||
|
}
|
||||||
imageErrorMessage.visibility = View.VISIBLE
|
imageErrorMessage.visibility = View.VISIBLE
|
||||||
} else {
|
} else {
|
||||||
imageErrorMessage.visibility = View.INVISIBLE
|
imageErrorMessage.visibility = View.INVISIBLE
|
||||||
|
|
|
@ -21,31 +21,10 @@ fun CollectionVO.map(context: Context): CollectionVO {
|
||||||
it.agencyName = ticket.agencyName
|
it.agencyName = ticket.agencyName
|
||||||
it.isNew = it.isAdded == "1"
|
it.isNew = it.isAdded == "1"
|
||||||
|
|
||||||
//tarea 4723
|
|
||||||
it.code= it.cel3
|
it.code= it.cel3
|
||||||
|
|
||||||
// sergio: OBLIGAR A ACTUALIZAR VERSIÓN PARA SUBIR DESPUÉS FICHEROS DEL BACK collection_getTickets al mismo tiempo")
|
|
||||||
|
|
||||||
//it.quantity = it.quantity.substring(0, it.quantity.indexOf("."))
|
|
||||||
|
|
||||||
//Solución Tarea #3420
|
|
||||||
//Log.d("VERDNATURA::","quantity"+it.quantity)
|
|
||||||
//Log.d("VERDNATURA::","quantity original"+it.originalQuantity)
|
|
||||||
|
|
||||||
it.quantity = it.quantity!!.toInt()
|
it.quantity = it.quantity!!.toInt()
|
||||||
|
|
||||||
|
|
||||||
it.originalQuantity = it.originalQuantity!!.toInt()
|
it.originalQuantity = it.originalQuantity!!.toInt()
|
||||||
|
|
||||||
if (it.originalQuantity==-1) it.originalQuantity = it.quantity
|
if (it.originalQuantity==-1) it.originalQuantity = it.quantity
|
||||||
|
|
||||||
/* it.originalQuantity =
|
|
||||||
if (it.originalQuantity != "-1") it.originalQuantity.substring(
|
|
||||||
0,
|
|
||||||
it.originalQuantity.indexOf(".")
|
|
||||||
) else it.quantity*/
|
|
||||||
|
|
||||||
|
|
||||||
it.pickedQuantity =
|
it.pickedQuantity =
|
||||||
if (it.isPrepared == "1" || it.isPreviousPrepared == "1" || it.isControlled == "1") it.quantity else it.pickedQuantity
|
if (it.isPrepared == "1" || it.isPreviousPrepared == "1" || it.isControlled == "1") it.quantity else it.pickedQuantity
|
||||||
if (!it.placements.isNullOrEmpty()) {
|
if (!it.placements.isNullOrEmpty()) {
|
||||||
|
@ -67,7 +46,6 @@ fun CollectionVO.map(context: Context): CollectionVO {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}//}
|
}//}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
|
|
@ -73,7 +73,7 @@ class SaleVO(
|
||||||
var totalSales: Int = 0,
|
var totalSales: Int = 0,
|
||||||
var sonSales: MutableList<SaleVO> = mutableListOf(),
|
var sonSales: MutableList<SaleVO> = mutableListOf(),
|
||||||
var code: String = "",
|
var code: String = "",
|
||||||
var hasMistake :Boolean = false
|
var hasMistake :Int = 0
|
||||||
|
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue