If my explanation below doesn’t make much sense, please let me know and I’ll send a recorded video explaining in detail, thanks
I have an app which I’m working on and I’m currently trying to display generate results in a CSV, here, English is not my first Language, please pardon my grammatical errors
So I have a data field called: ‘Stores’
I have another data field called: ‘Orders’ with these fields => orderID, amount, etc…
When an order is placed in a store, that order is added to ‘Orders’ as a single order item
That order is also added to a list ‘storeOrders’ in ‘Stores’ , obviously, ‘storeOrders’ hold every order of any Store in the system
The problem I have is this, when I try to generate a csv report, I’m not able to merge the orders, say for example
There are Orders [1, 2, 3, 4] in a store ‘storeOrders’, that’s 4 orders
I want to sum all the orders => amount, so that if orders[1, 2, 3,4 ] had these amounts [1: $20, 2: $60, 3: $5, 4: $100], the new amount value will be: $225
I’ve not been able to achieve this and I’ve been stuck for over 2 days
If my explanation below doesn’t make much sense, please let me know and I’ll send a recorded video explaining in detail, thanks