refs #5004
This commit is contained in:
parent
47b1fce0b9
commit
53a230db30
|
@ -1,6 +1,7 @@
|
|||
package es.verdnatura.presentation.view.feature.collection.adapter
|
||||
|
||||
import android.content.Context
|
||||
import android.content.res.ColorStateList
|
||||
import android.graphics.Color
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.util.Log.d
|
||||
|
@ -123,11 +124,6 @@ class SaleAdapter(
|
|||
false
|
||||
}*/
|
||||
|
||||
//Tarea #5004
|
||||
/* if (sale.hasMistake){
|
||||
imageErrorMessage.setBackgroundColor(color.RED)
|
||||
}*/
|
||||
|
||||
imageErrorMessage.setOnClickListener {
|
||||
onMistakeClickListener.onMistakeClickListener(sale)
|
||||
false
|
||||
|
@ -353,10 +349,20 @@ class SaleAdapter(
|
|||
txtdeNew.visibility = View.VISIBLE
|
||||
itemArticleQuantityPicked.visibility = View.VISIBLE
|
||||
itemArticleQuantityLine3.visibility = View.VISIBLE
|
||||
if (type!=SACADOR){
|
||||
imageErrorMessage.visibility = View.VISIBLE
|
||||
}else{
|
||||
imageErrorMessage.visibility = View.INVISIBLE
|
||||
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
|
||||
} else {
|
||||
imageErrorMessage.visibility = View.INVISIBLE
|
||||
}
|
||||
ivArrow.visibility = View.INVISIBLE
|
||||
}
|
||||
|
|
|
@ -21,31 +21,10 @@ fun CollectionVO.map(context: Context): CollectionVO {
|
|||
it.agencyName = ticket.agencyName
|
||||
it.isNew = it.isAdded == "1"
|
||||
|
||||
//tarea 4723
|
||||
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.originalQuantity = it.originalQuantity!!.toInt()
|
||||
|
||||
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 =
|
||||
if (it.isPrepared == "1" || it.isPreviousPrepared == "1" || it.isControlled == "1") it.quantity else it.pickedQuantity
|
||||
if (!it.placements.isNullOrEmpty()) {
|
||||
|
@ -67,7 +46,6 @@ fun CollectionVO.map(context: Context): CollectionVO {
|
|||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}//}
|
||||
} catch (e: Exception) {
|
||||
|
|
|
@ -73,7 +73,7 @@ class SaleVO(
|
|||
var totalSales: Int = 0,
|
||||
var sonSales: MutableList<SaleVO> = mutableListOf(),
|
||||
var code: String = "",
|
||||
var hasMistake :Boolean = false
|
||||
var hasMistake :Int = 0
|
||||
|
||||
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue