root-systems / cobuy

:seedling: :package: :stew: :family: Helping people buy good food at good prices, together.
GNU Affero General Public License v3.0
25 stars 4 forks source link

generate purchase orders pdf from order plan(s) #151

Open ahdinosaur opened 7 years ago

ahdinosaur commented 7 years ago

an OrderPlan is a commitment by a consumer group to purchase goods from a supplier. we can use this to generate a html / pdf purchase request that the consumer group can email to the supplier.

research: https://github.com/root-systems/cobuy/issues/98

from https://github.com/root-systems/cobuy/issues/137#issuecomment-324489622, we will need to generate an invoice for every sub-commitment by each agent participating in the order (or at least every agent with a different shipping address), as well as a single summary invoice.

we will also need to generate a Root Systems invoice for every consumer group invoice, so we can charge suppliers for being purchased through Cobuy.


generate pdf with cover sheet for summary of totals, then each page is a summary for each school, each total and school should have a purchase order number.

iainkirkpatrick commented 6 years ago

@agentlewis i've got both the orderSummary by agent, and the total orderSummary displaying on the same page now. with reference to the comment above, I read those requirements as:

is this for Tapin or Cobuy (or both)? I guess i'm not understanding how both those are useful, seems like either or depending on how the group functions? i.e. Tapin the first one seems more useful as each participant is a school with it's own finances, for Cobuy food-buying-groups the second seems more useful.

iainkirkpatrick commented 6 years ago

branch with combined orderSummaries on one page feature/total-and-agent-order-summary

danalexilewis commented 6 years ago

@iainkirkpatrick i am finding the use of invoices here a bit confusing. We are not sending invoices to suppliers - but rather orders.

If we don’t provide suppliers with a summary they will need to calculate it themselves to work out what they need to order upstream.

We do need to indicate whether we want the supplier to invoice the individual schools ( in the future or a group).

And we need to indicate which individual orders need to be shipped where.

So for schools for now we should make sure the summary has no shipping address and clearly states “Summary of orders” or something.

Really this is all an interim measure until we get the mvp of co supply up and running.

iainkirkpatrick commented 6 years ago

ok cool @agentlewis - i can remove the shipping address for now. Does any of this ticket still apply for general Cobuy? i.e. is it worth making a separate ticket for summaries which are useful for Tapin

danalexilewis commented 6 years ago

Sorry yes we will need to also record the transaction so at the end of the month we can invoice the supplier for the fee. - 2%

I don’t think there is a difference to general cobuy. This is a type of order we will generally need. It’s not what food coops will use normally - but it should still be in cobuy. We probably need a ticket to talk about how we initiate different orders and sensible defaults

iainkirkpatrick commented 6 years ago

We want: