Commit Graph

66 Commits

Author SHA1 Message Date
Patrick Gansterer e6061e6760 Add API v1 financial_transactions POST endpoint
In a first step we allow members to create financial transactions
for their own ordergroup.
2021-02-18 18:09:40 +01:00
wvengen ed9192c47f API v1 order_articles endpoints 2021-02-17 17:07:39 +01:00
Patrick Gansterer 7d5155bef6 Add option to ignore financial transaction when calculating the balance 2021-02-17 14:07:03 +01:00
Patrick Gansterer 17059a8104 Adopt model to reference GroupOrder in generated FinancialTransaction 2020-03-17 09:38:44 +01:00
Patrick Gansterer ff76fa60c0 Allow deletion of financial transactions 2019-11-01 20:56:00 +01:00
Patrick Gansterer 71fd6f2a24 Add CSV download for ordergroups 2019-01-15 04:50:32 +01:00
Patrick Gansterer 389f205a6b Add set_balance to FinancialTransactions#new_collection (fixes #438)
A new checkbox will allow user to set the balance to a given ABSOLUTE value
in addition to changing it by a RELATIVE value. This can be used if the
balance is tracked outside of foodsoft and should be syncroniced or for
setting the balance to zero for multiple ordergroups.
2019-01-15 04:44:16 +01:00
Patrick Gansterer 924f346b4c Show the financial transaction type if there are more than one type #367 2017-12-09 11:51:23 +01: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
Patrick Gansterer f209f4907e Add a parameter for financial_link to Ordergroup.add_financial_transaction 2017-10-28 21:46:13 +02:00
Patrick Gansterer 75deec9f06 Add custom fields to invoice, odergroup, supplier and user 2017-10-28 20:16:47 +02:00
Patrick Gansterer 8b8693df5a Show last activity of ordergroups 2016-03-04 16:16:09 +01:00
wvengen 118886344a Use boolean comparators where it makes sense 2015-01-14 21:17:00 +01:00
wvengen 3f032e5dd9 make apple points optional
a next step would be to move this to a plugin
2014-05-13 17:01:25 +02:00
wvengen 7841245795 migrate to Rails 4.0 (closes foodcoops#214)
Conflicts:
	Gemfile.lock
2014-02-24 12:46:28 +01:00
wvengen 46ab4dcc01 proper i18n of last ordergroup order (thanks @JuliusR) 2013-12-14 13:15:47 +01:00
wvengen c37ed74942 Merge branch 'master' into allow-no-nickname
Conflicts:
	app/views/foodcoop/users/_users.html.haml
2013-10-29 19:15:52 +01:00
wvengen d64590a534 more robustness 2013-10-10 17:50:10 +02:00
wvengen ea3db22306 user display changes in model and mailer 2013-09-22 14:38:56 +02:00
wvengen 5e9a49b2c7 make uniqueness_of_name validations work again (closes foodcoops/foodsoft#157) 2013-07-15 18:03:02 +02:00
wvengen 8141ad0233 remove duplicate code 2013-06-14 01:39:30 +02:00
wvengen 13f2c128c6 do not use string values for integers (closes foodcoops/foodsoft#128) 2013-06-14 01:36:41 +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 07581b7ecf Removed acts_as_paranoid. Implemented own version. 2013-03-16 17:57:38 +01:00
wvengen 2d382df1f1 Merge remote-tracking branch 'bennibu/rails3' into rails3
Conflicts:
	app/assets/stylesheets/bootstrap_and_overrides.css.less
	app/controllers/stockit_controller.rb
	app/models/ordergroup.rb
	app/models/workgroup.rb
	app/views/stockit/index.html.haml
2013-03-06 01:01:12 +01:00
Benjamin Meichsner 3fb5c313ee Show usefull error message for uniqueness_of_name with acts_as_paranoid.
Fixed #88

Conflicts:

	app/models/ordergroup.rb
2013-02-25 10:49:55 +01:00
Benjamin Meichsner 82178161fa Show usefull error message for uniqueness_of_name with acts_as_paranoid.
Fixed #88
2013-02-24 23:26:16 +01:00
wvengen e06524ca37 finish ordergroups and orders i18n + controller 2013-02-08 01:52:20 +01:00
benni 28aec7e4d6 Replace ordergroup.account_updated with non database attr. 2012-12-30 15:31:37 +01:00
benni 2c0fe08be6 Replaced delayed_job with resque. See README_DEVEL 2012-12-23 17:38:04 +01:00
benni 0dff5ea784 Fixed some bugs in tasks, apple feature:
* Update ordergroup stats when task is destroyed.
* Removed assigned caching attribute in task object.
* A lot of eager loading for tasks controller.
2012-12-16 19:07:45 +01:00
benni 0fcd5abb3a Fixed strange RecordReadOnly exception in task done. 2012-12-16 14:13:54 +01:00
benni cabcd201a6 Improvements for Ordergroup.avg_jobs_per_euro.
Tip #2, Avoid initializing hole activerecord object whenever possible.
Use Class.pluck(:attribute) instead of Class.all.map(&:attribute)!
2012-12-16 13:56:47 +01:00
benni b86172bc62 Performance improvements for ordergroup.update_stats!
As I have learned today. Let mysql do the counting, calculation stuff.
In most of the cases, it will be much faster!
2012-12-16 13:48:15 +01:00
benni f4f10b1e4c Introduced actionbar. Some fixes for balancing page. 2012-11-12 13:13:01 +01:00
benni 29a6cd8b62 Upgraded to rails 3.1.8. Fixed various bugs in wiki. 2012-09-30 21:15:55 +02:00
benni cd91436f7f Allow ignoring apple restriction for specific ordergroup. 2012-09-30 13:34:16 +02:00
benni ff4ab44bcc Add option to restrict ordering when not enough apples. 2012-09-29 17:52:25 +02:00
benni 8f8d866bb9 Moved notification about negative account balance to background. 2012-08-24 15:04:54 +02:00
benni 5fb0bc2444 Big feactoring and bug fixing, Mailer, Tasks, GroupOrders 2012-08-24 11:11:40 +02:00
benni 8a74e7d77f Removed annoate and hirb Gemfiles.
Annotate: Better look in schema.rb, this reference should be always up
to date.

Hirb: To reactivate hirb, look in railscasts:
http://railscasts.com/episodes/48-console-tricks-revised
2012-07-27 18:07:42 +02:00
benni 182742fbec Merge branch 'master' into rails3
Conflicts:
	.gitignore
	app/models/task.rb
	app/models/workgroup.rb
	app/views/shared/_group_form.html.haml
	config/locales/de.yml
	db/schema.rb
2012-06-26 11:51:56 +02:00
benni f1b71a5588 Minor refactoring in stats partial. 2012-06-24 21:43:36 +02:00
benni 4a8e286d98 Fixed encoding issues with ruby > 1.9.2.. 2012-04-16 08:49:54 +02:00
benni 172db1d37e Admin namespace beendet. 2011-06-10 13:22:15 +02:00
benni ea6348bc5c Refactored finance/ordergroups|transactions module. 2011-06-09 21:35:05 +02:00
benni 1cf63fc40b Some fixes to home view. 2011-05-16 10:34:14 +02:00
benni 2d7d0d3b94 Updated actionmailer classes and API. 2011-05-11 10:54:02 +02:00
benni 46450cebef New annotation, because of db switch to mysql.
Background: sqlite has some problems with decimal option.
2011-05-07 21:55:24 +02:00
benni c2496aa4fd Consider task duration in ordergroup stats.
* Also added duration to task template in workgroup task_duration.
2011-05-07 21:54:00 +02:00