Commit graph

1449 commits

Author SHA1 Message Date
Patrick Gansterer
ab912877c3 Fix query in HomeController::ordergroup 2020-03-23 16:23:13 +01:00
Patrick Gansterer
526ea51eac Update Haml files for usage with version 5 2020-03-23 16:19:37 +01:00
Patrick Gansterer
e606f606da Convert configuration parameters to Hash for passing to FoodsoftConfig
This is required for compatibility with Rails 5.0.
2020-03-23 16:18:58 +01:00
Patrick Gansterer
f8a4341c76 Remove unused edit variable in articles_by-views
The edit version is already handled in group_order_article_edit_result().
2020-03-23 16:09:30 +01:00
Patrick Gansterer
17059a8104 Adopt model to reference GroupOrder in generated FinancialTransaction 2020-03-17 09:38:44 +01: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
226d2dda74 Validate the format of FinancialTransactionType.name_short 2020-02-24 14:56:45 +01:00
Patrick Gansterer
5d84156bd8 Add BankAccountConnector to implement bank import methods in plugins 2020-02-24 14:30:03 +01:00
Patrick Gansterer
d476993321 Add polls plugin 2020-02-24 14:27:22 +01:00
Patrick Gansterer
640e230d88 Fix usage of task_params in TasksController 2020-02-18 19:06:26 +01:00
Patrick Gansterer
f15ca8610b Add pickup date to order_result message 2020-02-18 19:04:10 +01:00
Patrick Gansterer
341f86d98e Fix invoice redirect 2020-02-18 19:02:34 +01:00
Patrick Gansterer
9babb6cfe9 Fix rendering of financial transaction types sums 2019-11-11 13:57:06 +01:00
Patrick Gansterer
9757e7a216 Fix Mailer.upcoming_tasks 2019-11-11 11:26:55 +01:00
Patrick Gansterer
de94220758 Add FoodsoftConfig.scope to ExceptionNotifier.notify_exception 2019-11-11 11:18:51 +01:00
Patrick Gansterer
db4c29ff1b Make the uniqueness of the name of a group expicit in the model 2019-11-11 11:12:27 +01:00
Patrick Gansterer
eb8241cf04 Fix rescue in Admin::MailDeliveryStatusController#destroy 2019-11-11 11:11:33 +01:00
Patrick Gansterer
1d9856ff93 Handle nil values correctly in User.authenticateUser 2019-11-11 11:10:26 +01:00
Patrick Gansterer
e498f9cb58 Add default roles for users
Some foodcoops want to give some roles to every member by default,
without adding every users to a workgroup.
2019-11-04 11:39:33 +01:00
Patrick Gansterer
ff76fa60c0 Allow deletion of financial transactions 2019-11-01 20:56:00 +01:00
Patrick Gansterer
260ef90f6b Add option to create a financial_link when creating financial_transaction
If multiple financial transaction belong to a bank transaction, it
is sometimes easier to create them as a collection and add the bank
transaction instead of adding all financial transaction to a link
created via a bank transaction.
2019-10-30 22:27:18 +01:00
Patrick Gansterer
7875eeff2c Fix link for creation of financial link on bank transaction page 2019-10-30 12:44:29 +01:00
Patrick Gansterer
d89254c42b Show attachment and note in the unpaid invoices overview 2019-10-30 12:43:23 +01:00
Patrick Gansterer
c559a31a9e Fix and clean up bank account translations for English and German 2019-10-30 12:42:41 +01:00
Patrick Gansterer
30c53746fc Replace custom search placeholder with ui.search_placeholder 2019-10-30 12:00:46 +01:00
Patrick Gansterer
1550eedb5a Add additional eager loading annotations 2019-10-30 11:53:44 +01:00
Patrick Gansterer
39aff78f11 Remove protected_attributes gem
We do not enforce the rules, so removing it and switching the existing
annotations to strong_parameters does not make our situation worse.
2019-10-29 18:09:24 +01:00
Patrick Gansterer
d4ab0a055f Fix "Cannot infer root key from collection type." in UserController 2019-10-29 17:46:04 +01:00
Patrick Gansterer
8e2ca5e7d7 Add automatic generation of financial transactions and links 2019-10-29 13:52:56 +01:00
Patrick Gansterer
2100c738af Change deprecated *_filter methods to *_action 2019-10-29 09:41:01 +01:00
wvengen
6d9c35db20 Move to apparition for integration tests 2019-10-28 17:58:14 +00:00
JuliusR
71bdf3bfcc Allow to copy articles (PR #673, #541) 2019-10-14 07:25:34 +00:00
JuliusR
00458f79ab Suppress deleted suppliers from SharedSupplier.suppliers
Fixes #546.
2019-06-14 10:10:20 +00:00
JuliusR
5bf7f41005 Fix matching of uploaded articles by order_number 2019-06-14 10:08:19 +00:00
MatCast
7136d015c4 Added css to improve smaller screen usability (PR #668) 2019-06-05 21:50:11 +02:00
JuliusR
2d0a81c92d Fix and cleanup stock takings (PR #667) 2019-05-14 14:24:41 +00:00
Tom Carchrae
ef545e978e add search to balancing page (PR #651)
(cherry picked from commit 2039da54b2077a6befccb409ef02a3172bcba237)
2019-05-01 17:33:32 +00:00
wvengen
e9be38b3e9 Add OAuth scopes
https://github.com/foodcoops/foodsoft/issues/582#issuecomment-442513237
2019-04-03 17:20:44 +00:00
wvengen
366d92e421 Fix sync with unavailable by default (#649) 2019-04-03 18:53:23 +02:00
Tom Carchrae
99052fa3a7 Don't allow changes to settled orders (PR #614) 2019-03-26 19:14:39 +00:00
Tom Carchrae
d70c3a9bf1 allow 1 char unit, eg L or g 2019-03-26 18:58:36 +00:00
wvengen
25deefced1 Move setting availability to sync method 2019-03-24 22:14:10 +01:00
wvengen
cd164bc3eb Small performance improvement for sync with many new articles 2019-03-24 22:02:53 +01:00
wvengen
9283ed4f5e Fix syncing articles with non-import sync methods (#633) 2019-03-23 18:31:22 +01:00
wvengen
d669edb173 Fix shared database sync (relates to PR #610) 2019-03-23 08:54:10 +01:00
Tom Carchrae
02328eba2b fix missing translation 2019-02-20 22:26:51 +01:00
Patrick Gansterer
63e1541aa3 Use the default locale when sending mails to suppliers 2019-02-05 23:32:00 +01:00
Patrick Gansterer
d925533366 Fix rendering of stock order in OrderByGroups 2019-02-05 23:31:45 +01:00
Patrick Gansterer
b029fb98d6 Show sums for financial transaction types for ordergroups 2019-02-05 23:31:16 +01:00
Patrick Gansterer
5dab748fe3 Move sending of PDF into new ActiveSupport::Concern 2019-02-02 12:30:42 +01:00
Tom Carchrae
e5f64cff8c units cannot show html in tooltip 2019-01-18 18:26:11 +01:00
Patrick Gansterer
52323b98b8 Fix create_collection in FinancialTransactionsController 2019-01-17 20:27:43 +01:00
Patrick Gansterer
a4f5b8fb33 Do not show deleted users as members of groups (fixes #587) 2019-01-15 05:20:58 +01:00
Patrick Gansterer
8d1dbe1448 Remove mail workaround after upgrade to 2.7 2019-01-15 05:08:03 +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
abe847c0ee Add and inherit from ApplicationRecord to match Rails 5.0 style 2019-01-15 04:40:05 +01:00
Patrick Gansterer
8c6d48da86 Avoid ActionView::MissingTemplate occurred in sessions#new
Some browser request /:foodcoop/login with the HTTP-Accept-Header set
to "image/webp,image/*;q=0.8", which leads to an internal server error
due to a not existing template. Call respond_to to allow only html and
respond with the correct "406 Not Acceptable" HTTP status code.
2019-01-15 04:18:47 +01:00
Tom Carchrae
7e88798778 big speedup in syncing via caching/reducing queries (#610) 2019-01-15 02:56:21 +01:00
Tom Carchrae
31689dfb75 allow override of default limit (<200) on articles on shared suppliers (#609) 2019-01-15 02:55:12 +01:00
Tom Carchrae
a66a44bdcf error was on incorrect property 2019-01-14 21:01:30 +01:00
wvengen
554be093b9 API v1 navigation endpoint 2018-10-13 20:41:47 +02:00
wvengen
9c5a5d9492 API v1 config endpoint 2018-10-13 20:41:47 +02:00
wvengen
110c7cc3e9 API v1 user endpoint 2018-10-13 20:41:47 +02:00
wvengen
fd96b6ccc1
Prepare for API v1 (PR #570) 2018-10-13 20:16:35 +02:00
Patrick Gansterer
4137992032 fix auto_close_and_send_min_quantity 2018-10-12 15:47:32 +02:00
Patrick Gansterer
4eef0f07d5 Fix internal server error at invoices 2018-10-12 15:47:16 +02:00
Patrick Gansterer
903086ab97 Add import route for bank_transactions 2018-10-12 15:47:02 +02:00
Patrick Gansterer
0bb0536903 Add short name to FinancialTransactionType 2018-10-12 13:33:41 +02:00
Patrick Gansterer
707501e3f8 Add edit functionality for financial links 2018-10-12 13:18:23 +02:00
Patrick Gansterer
f0a55fb951 Add model and views for bank accounts 2018-10-11 22:29:15 +02:00
Martin Ortbauer
4b1e9a6f53 improve usability when ordering (PR #552)
also show box with links to currently open orders after the order has been saved
2018-10-11 22:15:00 +02:00
Patrick Gansterer
6cc02cb563 Add format helper for currency 2018-10-11 21:56:46 +02:00
Patrick Gansterer
66e9629858 Fix balancing with financial_transaction_types 2018-06-11 15:54:18 +02:00
Patrick Gansterer
91e8eb4950 Add missing brackets to the Message-ID of emails 2018-06-11 15:51:33 +02:00
Patrick Gansterer
ac11ba1cc1 Add pickups role 2018-01-25 18:09:29 +01:00
Patrick Gansterer
4c41a99fde Fix pickup view for orders without pickup data (#537) 2017-12-09 18:38:36 +01:00
Patrick Gansterer
209ad615b4 Add view to sort orders by pickup day 2017-12-09 12:56:34 +01:00
Patrick Gansterer
bd49a64cd7 Make the download button of orders reusable 2017-12-09 12:25:29 +01:00
Patrick Gansterer
3e156bbbf3 Rewrite OrderPdfs to support multiple orders at once 2017-12-09 12:22:37 +01:00
Patrick Gansterer
dae4d075fe Add UI to manage the financial transaction types and classes 2017-12-09 11:51:23 +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
dc94e98138 Add folders to the documents plugin 2017-11-21 10:12:13 +01:00
acracia
3b18dc7532 Add translations for Spanish 2017-11-06 20:12:03 +01:00
Patrick Gansterer
f261272c7e Fix size of receive_button in list of finished orders 2017-11-06 14:15:15 +01:00
Patrick Gansterer
9d588f70cc Fix group_order for stock order 2017-10-29 20:44:05 +01:00
Patrick Gansterer
f08715cda3 Fix Task.next_unassigned_tasks_for() for non-periodic tasks 2017-10-29 00:06:05 +02: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
47e4a9afdf Show only 2 tasks of the same periodic_task_group at dashboard 2017-10-28 20:17:45 +02:00
Patrick Gansterer
ad96159336 Sort the task at dashboard by due_date 2017-10-28 20:17:45 +02:00
Patrick Gansterer
2d641b683a Show links to details beside the header to save space 2017-10-28 20:17:45 +02: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
Patrick Gansterer
75deec9f06 Add custom fields to invoice, odergroup, supplier and user 2017-10-28 20:16:47 +02:00
Patrick Gansterer
72b5a5ca82 Add option to show account balance instead of available funds
Some foodcoops do not use the accounting feature of the foodsoft, which
results in wrong calculation of the available credit. To avoid
confusions show the current account balance instead.
2017-10-28 20:16:25 +02:00
Patrick Gansterer
6989e2f4f7 Add view for unpaid invoices 2017-10-26 21:27:26 +02:00
Patrick Gansterer
da1ebe915c Use deface in wiki plugin 2017-10-26 21:23:51 +02:00
Patrick Gansterer
564492afe4 Add an option to automatically finish an order 2017-10-12 21:14:29 +02:00
Patrick Gansterer
7d112516a1 Fix error code when opening an invalid group order 2017-10-12 01:28:26 +02:00
Patrick Gansterer
bce9d9a8c2 Use Mail::Address to create email addresses with display names
This class escapes special characters in addresses correctly.
2017-10-12 01:19:19 +02:00
Patrick Gansterer
f509f85327 Save the timestamp of the last mail to supplier and confirm resending it 2017-10-11 23:48:27 +02:00
Patrick Gansterer
f27bbc2ffa Add a button to send the order to the supplier 2017-10-10 23:45:37 +02:00
Patrick Gansterer
b4ce8c31cc Use only the HTML format during rendering of error responses 2017-10-10 20:24:50 +02:00
Patrick Gansterer
0b79fe4f41 Set Return-Path in emails only if To is a String 2017-10-09 11:47:27 +02:00
Patrick Gansterer
386bc7382d Support integers for price_markup
The config panel writes an integer into the settings table in the
database, which results in a wrong calculation of the fc_price.
2017-10-08 12:33:44 +02:00
Patrick Gansterer
2d4891bf1d Remove code-duplication of artice price calculation 2017-10-08 12:20:54 +02:00
Patrick Gansterer
e017a1196e Improve the interface of FoodsoftMailReceiver 2017-10-03 17:26:33 +02:00
Patrick Gansterer
e9bae618ed Add workaround for mails with UTF-8 characters in To header 2017-10-03 09:46:09 +02:00
Patrick Gansterer
8fe633fc42 Include nested objects in database queries of Finance::BaseController 2017-10-02 19:06:39 +02:00
Patrick Gansterer
09548574cb Use the email address of the foodcoop as default for Reply-To 2017-10-02 19:06:39 +02:00
Patrick Gansterer
e4b1280952 User clearer syntax for setting values when not already set 2017-10-02 16:08:16 +02:00
Patrick Gansterer
287cce2e92 Make "via Foodsoft" in mail From-header translateable 2017-10-02 16:08:16 +02:00
Patrick Gansterer
578e929e0d Add handling for bounce mails 2017-10-02 16:02:39 +02:00
Patrick Gansterer
97abcabffa Log mail delivery errors to database and add an UI for it 2017-10-02 16:02:39 +02:00
Patrick Gansterer
01950b48a1 Add Discourse SSO to allow login into Discourse via Foodsoft 2017-10-01 00:48:05 +02:00
Patrick Gansterer
2264351cf5 Remove code duplication for catching errors when sending mails 2017-09-30 12:20:17 +02:00
Patrick Gansterer
d93aa23d1c Avoid disclosure of internal hostname via Message-ID header of mails
Use the host of default_url_options for generating that header instead.
2017-09-30 12:14:16 +02:00
Patrick Gansterer
add281c738 Remove email from subject of feedback mail
The mail address of the user sending the feedback is now set in the
Reply-To header of the mail already.
2017-09-30 12:14:16 +02:00
Patrick Gansterer
c71b91a32f Allow User objects in From mail field and set Reply-To if not set already 2017-09-30 12:14:16 +02:00
Patrick Gansterer
b5c9634315 Allow User objects in Bcc, Cc Reply-To, Sencer and To mail fields 2017-09-30 12:14:16 +02:00
Patrick Gansterer
04bf994c9a Override the mail method of Mailer to automatically add the foodcoop name 2017-09-30 12:14:16 +02:00
Patrick Gansterer
96a01daa34 Set the X-Auto-Response-Suppress header for all outgoing mails
Since Foodsoft can not forward any auto responses to the relevant users
it makes sense to tell MTAs to avoid them at all.
2017-09-30 12:14:15 +02:00
Patrick Gansterer
639a99fcfb Match the From for mails with the implementation in the messages plugin 2017-09-30 12:14:15 +02:00
Patrick Gansterer
0785eb2f22 Do not set :sender and :errors_to when sending mails
:sender matches :from in all relevant cases, while :errors_to is an
invalid (and very very outdated) option.
2017-09-30 12:14:15 +02:00
Patrick Gansterer
43c1833cd7 Set ActionMailer configuration in FoodsoftConfig 2017-09-30 12:14:15 +02:00
Patrick Gansterer
7bb5e74e0c Fix mailer/not_enough_users_assigned view 2017-09-30 12:07:47 +02:00
Patrick Gansterer
ba052efe5e Set the path of the _foodsoft_session cookie to the slug
This allows the usage of different foodcoops at the same time.
2017-09-29 00:47:00 +02:00
Patrick Gansterer
ac00942f34 Fix list of invoices when an invoice has an invalid created_by user 2017-09-26 13:13:20 +02:00
Patrick Gansterer
52dc7b1387 Raise a RoutingError for unknown foodcoop in multi_coop_installs
This gives the correct error code for request to files in the root
folder (e.g. /apple-touch-icon.png), which do not exist.
2017-09-25 10:16:03 +02:00
Patrick Gansterer
0edc780ec7 Add Discourse plugin 2017-09-22 13:58:00 +02:00
Patrick Gansterer
f8662c9184 Redirect to root_url of default_scope when no slug is given 2017-08-29 23:40:48 +02:00
Patrick Gansterer
329ac66cf1 Show only undeleted users in user select input fields (PR #486) 2017-08-21 11:27:02 +02:00
Patrick Gansterer
8798b886db Fix mailing of order_result (PR #493) 2017-08-21 11:17:54 +02:00
Patrick Gansterer
c6297f2864 Sort workgroups of tasks by name 2017-08-20 01:08:47 +02:00
Patrick Gansterer
6a110ca429 Show the Help link only when a help_url is set 2017-08-20 01:07:48 +02:00
Patrick Gansterer
c312bd5ebd Fall back to default_scope if an invalid foodcoop is provided
Before this change foodsoft redirect to the last active foodcoop, when
an invalid foodcoop is provided. After this change the default_scope
will be used all the time to avoid data disclosure.
2017-07-08 00:09:42 +02:00
Patrick Gansterer
4713539a09 Fix order by groups document after 020b75c
Use a OUTER JOIN instead of a INNER JOIN to include also the stock order
which does not have an entry in the groups table.
2017-06-28 13:53:38 +02:00
Patrick Gansterer
8ed87730a8 Fix listing of shared suppliers 2017-03-04 13:17:46 +01:00
Patrick Gansterer
e0dbd396e1 Hide break in shared group template if empty 2017-02-03 20:30:28 +01:00
Patrick Gansterer
1056b86f9d Make sure that newly created periodic task are not done 2017-01-26 20:54:53 +01:00
wvengen
2072fbb4d5 Allow plugins to override some document prices 2017-01-21 22:44:11 +01:00
Patrick Gansterer
c6731b4e4f Add IBAN field to supplier and user model 2017-01-21 22:43:48 +01:00
Patrick Gansterer
925727d3ae Show button for creating invoices also at finished orders
Check if a order is not opened instead of checking if it is closed.
2017-01-21 22:42:16 +01:00
Patrick Gansterer
233ed415c7 Add "Copy" button for settled orders #383 2017-01-21 22:41:44 +01:00
wvengen
36706511c0 Be a bit more safe displaying stock ordergroup 2016-08-12 15:56:45 +02:00
wvengen
d06a9ed3f0 Fix dynamic select2 usage (oops!) 2016-08-12 15:54:28 +02:00
wvengen
326016dfb5 Fix tricky i18n error on html render (not js) 2016-08-09 20:38:55 +02:00
wvengen
b9bdd04311 Fix current_order's ordergroups document preloading 2016-06-09 19:14:53 +02:00
wvengen
78604ae09f Fix order document preloading 2016-06-09 19:14:53 +02:00
wvengen
70c79137cf Fix order_articles document preloading 2016-06-09 19:14:53 +02:00