Commit graph

25 commits

Author SHA1 Message Date
Patrick Gansterer
6a3636d8cb Move code from localize_input gem into Foodsoft 2022-05-27 17:24:57 +02:00
Patrick Gansterer
ea2862fdef Run rubocop --fix-layout and remove encoding comments 2021-03-02 09:12:19 +01:00
Patrick Gansterer
44a198c7bc Adopt Rails 5 belongs_to_required_by_default 2020-09-05 14:40:11 +02:00
Patrick Gansterer
602f663245 Add UI to show and create financial transactions for the foodcoop 2020-07-29 11:43:45 +02:00
Patrick Gansterer
1a49bee42d Adopt model to allow FinancialTransaction without an ordergroup
This will allow us to add accounting for the foodcoop itself, to support
listing for spendings independent of the order (e.g. rent, electricity).
2020-07-29 11:43:31 +02:00
wvengen
b96ce06d94
API v1 financial_transactions endpoints (#627) 2020-07-25 14:18:59 +00:00
Patrick Gansterer
18e38be6be Create new FinancialLink for reverted FinancialTransaction 2020-04-11 00:04:49 +02: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
abe847c0ee Add and inherit from ApplicationRecord to match Rails 5.0 style 2019-01-15 04:40:05 +01:00
Patrick Gansterer
707501e3f8 Add edit functionality for financial links 2018-10-12 13:18:23 +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
Patrick Gansterer
53bb096046 Add FinancialLinks
For now this is only usefull for plugins, since there is no UI.
2017-10-28 20:17:16 +02:00
Benjamin Meichsner
91bcf0c580 Avoid out of range error when using big numbers in financial transactions.
The database schema allows numbers up (+/-) 999_999.99. But as we are also adding the amount to the Ordergroup#account_balance, we use lower barriers to avoid running in errors when updating the account balance.

So, technically the user has to make 10 times the maximum input to raise an account balance error. This should be sufficient, I hope.
2014-09-22 11:36:10 +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
ea6348bc5c Refactored finance/ordergroups|transactions module. 2011-06-09 21:35:05 +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
Benjamin Meichsner
e75a42d509 Merge branch 'wiki' 2009-08-15 17:24:08 +02:00
Benjamin Meichsner
d848831fea Implemented stats for ordergroups on startpage. Annotated models. 2009-08-01 13:41:22 +02:00
Benjamin Meichsner
0a2a79237a Moved User.address-info into Ordergroup.contact_... attributes. Updated model-fixtures for testing. 2009-02-02 16:35:43 +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
c282cae79c Moved financial_transaction into the new finance-namespace. 2009-01-10 21:28:22 +01:00
Benjamin Meichsner
30f3d199d3 Introduced invoices and deliveries. Integration (especially of deliveries) isn't finished yet. 2009-01-08 16:33:27 +01:00
Benjamin Meichsner
9f8d0d28ac Removed gettext and simplified_localization-plugin. L18n is now the appropriate module.
Upgraded to rails 2.2.2 and replaced complex foodsoft.rb-loader with simple
initializers/load_app_config.rb. Multiple foodcoops option is temporarly deactivated.
2009-01-06 15:45:19 +01:00
Benjamin Meichsner
5b9a7e05df Initial commit of foodsoft 2 2009-01-06 11:49:19 +01:00