foodsoft
foodsoft copied to clipboard
Feature/tw automatic group order invoice generation
Offers the possibility to generate Invoices for given Group Orders. Generation is possible after an order is closed. If order is 'settled' then there's additionally the possibility to let the software send e-mails automatically on button press. The corresponding invoices will be sent as attachment via mail to the order group members.
Notes: To use automatic sending of invoices, select option in "Admin/Finance" config You can enter a "payment method " in "Admin/Finance" To make things work, it is mandatory to enter a tax_number in "Admin/Foodcoop" config
As for now "payment method" determines the "body" of the invoice. An example of new options and the resulting invoice can be found here:
Additionally for older and already settled orders, group order invoices can be generated manually under "finance/balancing"
Invoices will be generated given the momentarily given information about invoicee and invoicer (tax_number, contact details...). SO take care when delting an invoice.
This seems like a great feature. Thanks for taking the time to draft this! What exactly is the use of removing an invoice?
Hey. Excuse my late reply. When incorrect settings are set in the admin configs, there should be the possibility to delete the old and generate a new invoice with correct settings applied.
Is there anything more needed to merge this feature into master branch?
first: sorry for the late reply second: thanks for the contribution third: this is a huge change and therefore hard to review: could split it smaller self-containing parts? e.g.: change the model in a separate commit
there are a bunch of style violations and i have no idea why they are not marked by the CI system :disappointed: if i'm not wrong there are a bunch of changes which require cleanup before merge. it seams there a some dummy "hello world" files and debug outputs introduces. please feel free to correct my if i'm wrong. i just skimmed the PR
Hey. Thanks for the hints. It made me look into the code again and I am working on fixing the points you mentioned.
- I noticed, there was no authentication clause to deal wirth group order invoices. With b6854bc41609fe42bcb5bae733f9ffc4524d3ea6 I added a neccessary update of the group_order_invoice_controller. :authenticate_finance, so only for finance authenticated users can see/download and generate group_order_invoices.
- Removed the "Hello World" Dummy files.
- Todo Style issues Let me know, if there is anything more you notice.