dellermann / springcrm

An open-source CRM.
GNU General Public License v3.0
14 stars 2 forks source link

Allow invoices from various sales orders, quotes etc. #16

Open dellermann opened 11 years ago

dellermann commented 11 years ago

It would be helpful if the user can create an invoice (or similar) from more than one sales orders or quotes, respectively. The procedure is valid for other transactions, too:

I see two ways to implement this, described at the example of invoices:

In the view, only

The user gets a button where she can select a record (quote, sales order). After doing so, the invoicing items are added to the currently edited invoice. This is easy to implement but hides the relations between quotes, sales orders, and invoices. For example, a sales order added via this button doesn't have associated the edited invoice.

In all layers

We implement an m:n relation between invoicing transactions. This allows an invoice to refer both to quotes and sales orders. There is no need to distinguish between them. In the view we need a control to select more than one invoicing transactions. If the user adds a new quote or sales order to the invoice, its items are added to this invoice. This approach is expensive to implement. Furthermore, we have to clarify how to handle removal of associated quotes or sales orders.