Commit graph

43 commits

Author SHA1 Message Date
Patrick Gansterer
ea2862fdef Run rubocop --fix-layout and remove encoding comments 2021-03-02 09:12:19 +01:00
Patrick Gansterer
4c567fece1 Add transport costs to Order 2020-08-07 00:52:43 +02:00
Patrick Gansterer
ecb4a8a4ba Add method to close all invoices with an invoice direct
When the charge_members_manually option is active there is no need for an
explicit balancing step. This new function allows to close_direct all
orders which have an assigned invoice, which is usually indication enough
to find orders which can be closed finally.
2020-02-28 12:17:27 +01:00
Patrick Gansterer
66e9629858 Fix balancing with financial_transaction_types 2018-06-11 15:54:18 +02:00
Patrick Gansterer
e7657b987f Update model to support financial transactions #367
This change introduces two new data types to group the financial
transactions. Now every transaction has a "type", which itself belongs
to a "class".
Types should be used add structured information to an transaction, instead
of writing it into the notice textfield. E.g. this could be used to have
different types depending on the source of money (cash vs. bank transfer).
Classes are shown as different columns in the tables and will be uses to
group transactions of specific types. They should be used if not the whole
amount of ordergroup should be used to order food. E.g. if there is a
deposit or membership fee, which is independent of the normal credit.
This will allow us to implement additional features based on classes in
the future. E.g. the sum of transactions in the "membership fee" class
must be positive to allow food orders or show a big warning if it is bellow
a certain value.
2017-12-09 11:51:23 +01:00
wvengen
7841245795 migrate to Rails 4.0 (closes foodcoops#214)
Conflicts:
	Gemfile.lock
2014-02-24 12:46:28 +01:00
Julius
59c118a171 Apply publish/subscribe for OrderArticle#create 2014-01-02 19:16:03 +01:00
Julius
81dfe8110c Apply publish/subscribe for OrderArticle#update 2014-01-02 19:14:07 +01:00
wvengen
6cfaa4979a show lines with zero units but with member orders in balancing screen (closes foodcoops/foodsoft#179) 2013-10-02 16:32:29 +02:00
wvengen
7af796c09c Merge remote-tracking branch 'bennibu/rails3' into rails3
Conflicts:
	app/controllers/admin/ordergroups_controller.rb
	app/controllers/finance/balancing_controller.rb
	app/controllers/suppliers_controller.rb
	app/views/articles/_article.html.haml
	app/views/finance/balancing/_summary.haml
	app/views/finance/balancing/new.html.haml
	app/views/group_orders/_form.html.haml
	app/views/home/_apple_bar.html.haml
	app/views/suppliers/index.haml
2013-03-21 22:08:09 +01:00
Benjamin Meichsner
707f989768 Fixed routes in redirect after direct_close of orders. 2013-03-17 17:50:50 +01:00
Benjamin Meichsner
c05b3e0e19 Balancing: Do not update oder summary automaticly when changing group orders. 2013-03-17 15:47:50 +01:00
Benjamin Meichsner
9cc98b4662 Added some more eager loading for balancing view. 2013-03-17 15:12:14 +01:00
Benjamin Meichsner
0d3564492b Fixed bug in sorting articles in balancing view. 2013-03-12 18:54:51 +01:00
Benjamin Meichsner
c4376f35bf Removed article from includes in as it does not work with acts_as_paranoid.
See also https://github.com/goncalossilva/rails3_acts_as_paranoid/issues/62.
Better we remove acts_as_paranoid and filter manually?
2013-03-12 12:50:56 +01:00
Benjamin Meichsner
6196bdae41 Added some eager loading for balancing new. 2013-03-12 12:38:08 +01:00
Manuel Wiedenmann
8be93c33f8 i18n finance + controller 2013-02-10 15:05:31 +07:00
benni
0236fb5a60 Fixed finance module to work with bootstrap design. 2012-11-10 16:44:05 +01:00
benni
29a6cd8b62 Upgraded to rails 3.1.8. Fixed various bugs in wiki. 2012-09-30 21:15:55 +02:00
benni
af3c07f031 Simplifiying balancing view part 2. Lets call it finished. 2012-07-27 18:03:46 +02:00
benni
467874a8a5 Simplify balancing view. Part 1 of ... 2012-06-21 17:19:00 +02:00
benni
6bd4bbec86 Deactivated broken links in balancing. 2012-05-12 11:18:46 +02:00
benni
c49edb79a2 Fixed edit_not in balancing. 2012-05-12 10:55:20 +02:00
benni
4a8e286d98 Fixed encoding issues with ruby > 1.9.2.. 2012-04-16 08:49:54 +02:00
Benjamin Meichsner
21f128ef1d Handle bad entries when creating new order articles in balancing
controller.
2009-09-07 13:31:03 +02:00
Benjamin Meichsner
a1ca9f368d Fixed bug when adding new article to a stock order (balancing
controller)
2009-09-07 10:57:49 +02:00
Benjamin Meichsner
8bfa83118c Update ordergroup values after deleting an ordered article. Closes #11
* TODO: Implement callbacks to avoid such mistakes.
2009-05-13 13:04:39 +02:00
Benjamin Meichsner
4c57c57827 Changed default order of articles on balancing page. 2009-05-04 17:56:52 +02:00
sandoz
1e011256e9 Remove all non-digits before sorting by order number in finance/balancing
* Since order_number is a string, there can be more than a-zA-Z + digits

Signed-off-by: bennibu <benni@dresdener27.de>
2009-04-07 18:08:30 +08:00
Benjamin Meichsner
40886b71f9 Fixed Bug in balancing controller when adding an ordergroup-result. 2009-04-05 14:59:55 +02:00
Benjamin Meichsner
30aa04b710 Made sort by order_number balancing view work. 2009-04-03 17:50:17 +02:00
Benjamin Meichsner
596f5657bc Fixed remote and non-remote link mixtures bug. 2009-04-03 17:35:00 +02:00
sandoz
5a7fe17437 Make list of ordered articles sortable in _edit_results_by_articles
* For the moment you can sort by article name and order number

Signed-off-by: bennibu <benni@dresdener27.de>
2009-04-03 22:14:48 +08:00
sandoz
3654ba7cf1 Added buttons to in/decrease group order article results.
Signed-off-by: bennibu <benni@dresdener27.de>
2009-03-21 05:39:02 +08:00
Benjamin Meichsner
6202e05841 Last part of order refactoring. Now order_article create/update is possible. 2009-02-09 20:12:56 +01:00
Benjamin Meichsner
c17b63b192 Second part of stock-integration.
Introduced StockArticle and a special page for ordering from stock. StockChanges will be created and the StockArticle.quantity
updated in 'order.close!'.
2009-02-06 16:26:35 +01:00
Benjamin Meichsner
251ced4fa1 Introduced group_order_article.result to save the result for each group/article. 2009-02-04 16:41:01 +01:00
Benjamin Meichsner
ec402ffa7b Fixed order.close workflow. (formerly known as order.balance) 2009-01-30 22:27:55 +01:00
Benjamin Meichsner
190a777278 Order refactoring part two: Balancing workflow was adapted to the new order schema. Article modification is still missing. 2009-01-29 21:28:22 +01:00
Benjamin Meichsner
9eb2125f15 Complete refactoring of orders-workflow.
OrderResult tables are removed. Data consistency is now possible through new article.price-history (ArticlePrice).
Balancing-workflow needs to be updated.
2009-01-29 01:57:51 +01:00
Benjamin Meichsner
2630ca2b14 Removed finance-controller for more clarity. 2009-01-19 16:40:06 +01:00
Benjamin Meichsner
fadc951208 Second part of admin-namespace-reorder. Also renamed OrderGroup into Ordergroup. More view-sharing between groups is neccessary. 2009-01-14 12:46:01 +01:00
Benjamin Meichsner
47398c6a70 Moved balancing logic into new namespace 'finance'. 2009-01-10 22:22:16 +01:00