untitled

Pasted Nov 10, 2026, 5:44 PM1 file36 lines

Scan to open on your phone

Point a camera at the QR code - it opens this exact paste, no app needed.

https://codepastes.com/zzgs86xhyvvrknt1
untitled
 lotes.forEach { lote ->
            val producto = productos.firstOrNull {
                it.id == lote.productoId
            }

            val aroma = aromas.firstOrNull {
                it.id == lote.aromaId
            }

            val detallesLote = detalles.filter {
                it.loteId == lote.id
            }

            val gastosLote = gastos.filter {
                it.loteId == lote.id
            }

            val inventarios = inventariosLote.filter {
                it.loteId == lote.id
            }

            val totalUnidades = detallesLote.sumOf {
                it.cantidadFabricada
            }

            val totalGastos = gastosLote.sumOf {
                it.monto
            }

            val ingresosLote = ingresosPorLoteYSede.filter {
                it.loteId == lote.id
            }

            val ingresosBarrancas = ingresosLote
                .filter { it.sede.equals("Barrancas", ignoreCase = true) }
                .sumOf { it.ingresos }

1,004 chars · codepastes.com