Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

246
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!