I have the collection of invoices, with the tax field, I must call the invoices for each month and calculate the total tax.
I have Momentjs add to meteor and uses blaze.
I have the collection of invoices, with the tax field, I must call the invoices for each month and calculate the total tax.
I have Momentjs add to meteor and uses blaze.
You can search your collection for invoices created in a particular month like so:
You can then find the total of the tax fields:
More information on the
forEach
method of a cursor can be found here