Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

247
Vistas
Combine multiple rows into one row for the Counter name then sum up volumne

I'd like to combine multiple rows of repeating Stock Counters into a single row and also sum up the Volumne and Price of the combined items so they are stored and displayed to the React Admin list.

Screenshot of the current list of items

Data List

The output of the below screenshot is run by the below code

try {
        const m = await Portfolio.find({}).populate({ path: 'customer', select: 'firstname', model: 'User' }).populate({ path: 'stockItem', select: 'Counter', model: 'Stock Items' }).exec();
        return res
        .setHeader('Access-Control-Expose-Headers', 'X-Total-Count')
        .setHeader('X-Total-Count', Object.keys(m).length)
        .status(201)
        .json(m);
    } catch (err) {
        // eslint-disable-next-line no-console
        console.error(`${err}`);
        return res.status(400).json('Failed to either retrieve nor create a Transaction. Kindly retry again.');
    }
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda