diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/historicoarticulo/adapter/HistoricoAdapter.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/historicoarticulo/adapter/HistoricoAdapter.kt
index f90023eb..1de0d8d9 100644
--- a/app/src/main/java/es/verdnatura/presentation/view/feature/historicoarticulo/adapter/HistoricoAdapter.kt
+++ b/app/src/main/java/es/verdnatura/presentation/view/feature/historicoarticulo/adapter/HistoricoAdapter.kt
@@ -10,18 +10,17 @@ import es.verdnatura.presentation.view.feature.historicoarticulo.model.ItemHisto
 import java.text.SimpleDateFormat
 import java.util.Date
 
-class HistoricoAdapter  (
+class HistoricoAdapter(
     private val items: List<ItemHistoricoVO>
-): RecyclerView.Adapter<HistoricoAdapter.ItemHolder> () {
-
+) : RecyclerView.Adapter<HistoricoAdapter.ItemHolder>() {
 
     override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ItemHolder {
         return ItemHolder(
-            ItemHistoricoRowBinding.inflate(LayoutInflater.from(parent.context),parent,false)
+            ItemHistoricoRowBinding.inflate(LayoutInflater.from(parent.context), parent, false)
         )
     }
 
-    override fun getItemCount() =items.size
+    override fun getItemCount() = items.size
 
     override fun onBindViewHolder(holder: ItemHolder, position: Int) {
         holder.bind(items[position])
@@ -29,7 +28,7 @@ class HistoricoAdapter  (
 
     inner class ItemHolder(
         val binding: ItemHistoricoRowBinding
-    ) : RecyclerView.ViewHolder(binding.root){
+    ) : RecyclerView.ViewHolder(binding.root) {
         private val res = binding.root.context.resources
         fun bind(item: ItemHistoricoVO) {
             binding.apply {
@@ -38,14 +37,22 @@ class HistoricoAdapter  (
                 val sdf = SimpleDateFormat(res.getString(R.string.dateFormat))
                 val currentDate = sdf.format(Date())
 
-                historicoDate.setBackgroundColor(ContextCompat.getColor(historicoDate.context, if (currentDate == item.shipped){R.color.verdnatura_pumpkin_orange}else{
-                    R.color.verdnatura_black_5
-                }))
+                historicoDate.setBackgroundColor(
+                    ContextCompat.getColor(
+                        historicoDate.context, if (currentDate == item.shipped) {
+                            R.color.verdnatura_pumpkin_orange
+                        } else {
+                            R.color.verdnatura_black_5
+                        }
+                    )
+                )
 
-                item?.invalue?.let {
-                    inQuantity.setBackgroundColor(ContextCompat.getColor(historicoDate.context,
-                        if (it > 0) R.color.verdnatura_dark_green_verdnatura else R.color.verdnatura_white))
+                val color = if (item.invalue != null && item.invalue!! > 0) {
+                    R.color.verdnatura_dark_green_verdnatura
+                } else {
+                    R.color.verdnatura_black_5
                 }
+                inQuantity.setBackgroundColor(ContextCompat.getColor(historicoDate.context, color))
 
             }
         }