1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00
Commit Graph

646 Commits

Author SHA1 Message Date
Sylvain
ecf80b0591 ability to set invoices as erroneous 2021-05-24 16:34:27 +02:00
Sylvain
c7a59c8cb7 WIP: refactoring to singularize the booking process
We need to achieve only one process for all booking, not one for subscription, one for reservations, etc.
Moreover we must store one object per invoice_item/payment_schedule_object and stop using Invoice.invoiced or PaymentSchedule.scheduled
2021-05-21 18:25:18 +02:00
Sylvain
b151802923 WIP: fix invoices without invoiced_id
TODO: fix datetime parsing
2021-05-21 18:21:24 +02:00
Sylvain
66f81a975e WIP: array of items
Migration from cart_items:{reservation:{}, subscription:{}, ...}
to cart_items:{items:[{reservation:{}, ...}], ...}
2021-05-19 18:12:52 +02:00
Sylvain
6bcd9f6fef Merge branch 'dev' into payzen 2021-05-17 15:07:41 +02:00
Sylvain
bf2407467b [bug] unable to sort invoices by date
This is a workaround. The real issue is that some invoices does not have the invoiced_id data for Reservation. This is likely due to the fact that invoices are created and saved before the reservation is saved (so they don't have an ID).

@see app/services/reservations/reserve.rb#34
2021-05-17 12:34:12 +02:00
Sylvain
0992999a32 [bug] some invoices does not have the name of the user 2021-05-14 17:07:38 +02:00
Sylvain
e3187460ea create payment schedules on payzen
Also: make generic the creation of products on remote gateway
Also: make generic the call to gateway specific actions
2021-04-30 16:07:19 +02:00
Sylvain
aaf36dcc0a reserve events w/ payzen
we cannot use the <cart> directive because the layout is too much different
2021-04-29 16:29:35 +02:00
Sylvain
3dc686840c front adaptation to cartItems
fix payzen customer cart creation
TODO: refactor the payOnSite modals
2021-04-27 17:18:20 +02:00
Sylvain
d5f7bd7abd fix test Reservations::CreateTest
create subscription w/ the reservation if applicable
+ refactor payments_controller to factorize the on_*_success codes
2021-04-26 17:42:03 +02:00
Sylvain
da372cf8ad fix test Events::AsUserTest
the event price calculalation was using a variable not reinitialized
2021-04-26 16:38:00 +02:00
Sylvain
53e9a1c4f2 fix running test create_as_admin_test
- do not create an empty payment gateway object if not needed
2021-04-26 12:00:07 +02:00
Sylvain
b9e8c8867c fix running test renew_as_admin_test 2021-04-26 11:40:26 +02:00
Sylvain
bc6ef8ef50 WIP: move backend code base to new architecture
- from stripe only to payment gateway abstract
- from reservation params style to unified cart_items

TODO: fix not passing tests,
subscriptions/renew_as_admin_test.rb fails because InvoiceItem(9).amount = nil
2021-04-23 17:54:59 +02:00
Sylvain
94cbcd3236 refactor to use the new price computation system based on ShoppingCart 2021-04-23 12:52:06 +02:00
Sylvain
e456ddc7c9 WIP: refactor the price computation system 2021-04-22 19:24:08 +02:00
Sylvain
26dfbef5e1 WIP: refactor models to use payment_gateway_objects 2021-04-21 17:38:06 +02:00
Sylvain
434ec9c205 refactored Invoices to get rid of stripe references 2021-04-20 17:22:53 +02:00
Sylvain
a897d37b2d improved footprint debug process 2021-04-16 16:03:10 +02:00
Sylvain
4ffd357841 WIP: migrate stripe ids in DB 2021-04-16 12:25:48 +02:00
Sylvain
343b2f7d23 refactor code related to archiving 2021-04-16 10:34:02 +02:00
Sylvain
07ea6e8c69 renamed SUPERADMIN_EMAIL to ADMINSYS_EMAIL
The previous was too much subject to confusions
2021-04-14 15:04:41 +02:00
Sylvain
4e512dda45 validate the payment server side 2021-04-13 17:16:05 +02:00
Sylvain
67d0ce24b4 set payzen currency
also: refactored the comments in the react components to fit high quality
2021-04-07 16:21:12 +02:00
Sylvain
63c81b82c1 Merge branch 'dev' into payzen 2021-04-06 15:03:27 +02:00
Sylvain
e06f3beeab [bug] notification not sent
notification sent to the project author when a collaborator has confirmed his participation
2021-04-06 14:16:03 +02:00
Sylvain
54c1a3cfd9 payzen keys configuration form 2021-03-31 16:03:51 +02:00
Sylvain
5aacd6695c Merge branch 'dev' into payzen 2021-03-30 09:22:47 +02:00
Sylvain
818e9e99fc [bug] unable to update a coupon 2021-03-29 10:19:06 +02:00
Sylvain
5b854ea831 Merge branch 'dev' into payzen 2021-03-24 14:34:24 +01:00
Sylvain
7099f1f317 address required
- Ability to set the address as a mandatory field
- The address is new requested when creating an account
- The profile completion page is less fuzzy for people landing on it without enabled SSO
2021-03-23 11:49:05 +01:00
Sylvain
f535be5b05 WIP: address_required 2021-03-22 18:02:56 +01:00
Sylvain
141f4f31b1 Merge branch 'dev' into payzen 2021-03-10 15:23:56 +01:00
Sylvain
9d747db095 Ability to disable the trainings module 2021-03-10 13:25:53 +01:00
Sylvain
3ea06826ad WIP: select gateway 2021-03-03 15:28:56 +01:00
Sylvain
ecb23c02b9 fix extend susbcription w/ payment schedule 2021-02-10 13:32:13 +01:00
Sylvain
8468a3c6de rake task to regenerate payment schedules PDF files 2021-02-10 11:40:23 +01:00
Sylvain
f3ad59d33a fix cancel schedule 2021-02-09 16:26:09 +01:00
Sylvain
ff0c69fc58 stripe card update + cancel subscription 2021-02-09 15:44:56 +01:00
Sylvain
0e7226c85c handle stripe requires_action 2021-02-08 15:28:47 +01:00
Sylvain
163976b988 WIP: error handling for card payments on later deadlines 2021-01-27 17:24:10 +01:00
Sylvain
39c3164b47 WIP: admin interface to manage payment schedules 2021-01-26 17:31:11 +01:00
Sylvain
01a0612a4b fix create invoice for each due date 2021-01-25 14:37:07 +01:00
Sylvain
26636254bd generate the invoices for each schedule item and notify if something goes wrong 2021-01-25 13:05:27 +01:00
Sylvain
e5439901d6 fix generate payment schedule pdf + send by mail
TODO: total amount does not match with sum of all lines
- generate invoices for each PS-item
- interface to access the payment schedules
2021-01-19 16:47:51 +01:00
Sylvain
12e99f4c9c generate payment schedule pdf 2021-01-04 18:12:44 +01:00
Sylvain
37af665991 save subcription id in payment schedule item 2021-01-04 17:03:44 +01:00
Sylvain
8b13ae45ac all tests passing 2021-01-04 16:26:52 +01:00
Sylvain
728ae4310c improved testing of payment schedules + some fixes
TODO: fix the test
rails test test/integration/reservations/create_test.rb
Reservations::CreateTest#test_user_reserves_a_machine_and_renew_a_subscription_with_payment_schedule_and_coupon_and_wallet [test/integration/reservations/create_test.rb:841]
Minitest::Assertion: Expected: "stripe"
  Actual: nil
2020-12-30 18:43:33 +01:00
Sylvain
dc00df4afc fix stripe subscription w/ coupon + wallet 2020-12-30 12:19:33 +01:00
Sylvain
b8319a5124 handle percent coupons w/ stripe subscriptions 2020-12-30 10:17:39 +01:00
Sylvain
fba5f57a1c handle wallet transaction w/ stripe subscription 2020-12-29 18:55:00 +01:00
Sylvain
feeed2f450 fix take a reservation + subscription
FIXME:
ActionView::Template::Error (undefined method `iso8601' for nil:NilClass)
Callstack:
  app/views/api/reservations/show.json.jbuilder:40:in `_app_views_api_reservations_show_json_jbuilder'
  app/controllers/api/payments_controller.rb:91:in `confirm_payment_schedule'
2020-12-28 18:30:27 +01:00
Sylvain
3e4892d3a5 WIP: creating payment schedule workers
see TODO in app/workers/payment_schedule*
2020-12-23 16:56:19 +01:00
Sylvain
32b0222da5 save payment schedules PDF to a persistant volume storage 2020-12-22 16:39:37 +01:00
Sylvain
bbf88846dd refactored Invoice & PaymentSchedule to use inheritance 2020-12-22 14:43:08 +01:00
Sylvain
6fa9780ad5 refactor chainable/footprint protected models to use inheritance 2020-12-22 09:53:41 +01:00
Sylvain
d3a41903cd WIP: exclude invoice_id from footprint in payment_schedule_item 2020-12-21 17:37:58 +01:00
Sylvain
609d19e5d1 refactored subscription process + renew (update) subscription/ offre free days 2020-12-21 16:12:34 +01:00
Sylvain
40c78974b8 refactoring of reservation:pay_and_save
TODO: debug with tests,
refactor subscription:pay_and_save on the same template
2020-12-16 18:33:43 +01:00
Sylvain
908ccf5bab handle reservations+subscription w/ schedule
integration testing for payment schedule
debug reservation process
2020-12-14 17:42:23 +01:00
Sylvain
5941446a72 fixes for card payment 2020-12-02 14:28:41 +01:00
Sylvain
34a9084501 pass payment method to the ruby service 2020-11-23 11:48:44 +01:00
Sylvain
678af0de1f using stripe api + improved ui + ui to configure schedules reference
TODO: as an admin, I can select if payment_method = (stripe || local)
2020-11-16 16:37:40 +01:00
Sylvain
b5504d2342 create stripe subscription with all data 2020-11-12 16:44:55 +01:00
Sylvain
ed5b90cbdc add stp_product_id to all items that can be scheduled 2020-11-12 12:14:51 +01:00
Sylvain
78847bdb4b WIP: create subscription on stripe 2020-11-10 17:02:21 +01:00
Sylvain
21bd1312bc compute payment schedule + basic display 2020-11-03 16:50:11 +01:00
Sylvain
408531d13a use i18next instead of angular-translate for react components 2020-11-02 11:07:08 +01:00
Sylvain
14091f547e parse multiple scss files for theme 2020-10-29 16:11:19 +01:00
Sylvain
4f877ab05d react coponent: plan-card + extracted scss from stylesheet.rb into themes/ 2020-10-29 15:53:29 +01:00
Sylvain
106d8be4c8 Merge branch 'dev' into monthly-payment 2020-10-28 12:11:49 +01:00
Sylvain
1699bbf143 [bug] theme primary color is ignored on links 2020-10-28 12:10:25 +01:00
Sylvain
ddd2b252ab fix caret color 2020-10-28 10:27:59 +01:00
Sylvain
ccd3e93428 fix about link color 2020-10-28 10:03:04 +01:00
Sylvain
44525f9bad Merge branch 'dev' into monthly-payment 2020-10-28 09:53:28 +01:00
Sylvain
bf76157703 Initialize new plans with default prices for machines & spaces 2020-10-28 09:24:31 +01:00
Sylvain
a9cc0b391b save products and prices to stripe for each plans 2020-10-27 16:46:38 +01:00
Sylvain
6be51feeb2 save stp_price_id for each plan 2020-10-27 16:03:20 +01:00
Sylvain
840be2c6c0 renamed RepaymentSchedule to PaymentSchedule 2020-10-27 16:02:41 +01:00
Sylvain
52f3bd956f database structure for payment schedule 2020-10-27 11:32:20 +01:00
Sylvain
2227a59275 [bug] unable to rename a group containing users 2020-10-20 15:52:14 +02:00
Sylvain
b5a4e724e8 [bug] email notification after reservation update have wrong previous date (#234) 2020-10-20 15:14:11 +02:00
Sylvain
57b76d156b Alert before cancelling a reservation that credits will be lost 2020-09-29 12:03:13 +02:00
Sylvain
13bc5334cc ability to configure until when the events are shown on the home page 2020-09-29 09:39:32 +02:00
Sylvain
14b0b2ac30 class documentation 2020-07-21 19:28:30 +02:00
Sylvain
7bf06ff23e debug footprints 2020-07-21 19:25:21 +02:00
Sylvain
e644e4894a using unaccent to build project search index + updated doc 2020-06-30 15:58:39 +02:00
Sylvain
e95b270433 multiples fixes
- improved project search
- fix db schema (sql)
- improved doc
- removed es_language_analyzer var (deprecated)
2020-06-24 17:22:38 +02:00
Sylvain
8137418904 improved test for accounting periods 2020-06-24 15:25:17 +02:00
Sylvain
e288f66997 use search index to speed up projects searches 2020-06-23 17:06:59 +02:00
Sylvain
7140571d63 filter & search projets from postgres 2020-06-23 11:19:20 +02:00
Sylvain
1a6cd356bf WIP: using postgres for full-text search in projects 2020-06-22 16:28:05 +02:00
Sylvain
d83e3a8d26 using gem pg_search 2020-06-22 11:25:35 +02:00
Sylvain
7af6f18973 source for building search engine 2020-06-17 16:56:10 +02:00
Sylvain
a164ec402d poc using tsvector 2020-06-17 16:49:38 +02:00
Sylvain
40dd39304e enable/disable statistics module fomr the UI 2020-06-17 12:20:51 +02:00
Sylvain
24155bc009 ability to lock settings from the env vars 2020-06-15 13:20:48 +02:00
Sylvain
42872ab107 configure wallet from UI 2020-06-15 12:44:43 +02:00
Sylvain
f46c78a476 read email_confirmation_required from the UI 2020-06-15 11:57:13 +02:00
Sylvain
48bcf0b838 configure invoices prefix from the DB 2020-06-15 10:58:15 +02:00
Sylvain
78518e17fb read stripe_currency from the UI
We prevent the currency from being changed if any stripe payment was made, because a stripe user cannot made pay with different currencies. If we try to charge a user with a different currency than the currency he used for a previous payment, this will fail; so we must prevent this case
2020-06-10 16:37:11 +02:00
Sylvain
4b8504f531 fix tests 2020-06-10 11:52:54 +02:00
Sylvain
82d6677cff read stripe_api_key from db 2020-06-10 11:33:03 +02:00
Sylvain
dbda82ac9b notify after members sync on stripe 2020-06-09 15:06:46 +02:00
Sylvain
d5939a9de5 set the stripe keys from the UI 2020-06-09 13:09:31 +02:00
Sylvain
06b5da9df8 configure online payment from the UI 2020-06-08 17:42:59 +02:00
Sylvain
b44a8da73b set openlab_default from the UI 2020-06-08 16:15:44 +02:00
Sylvain
f78eb10c75 use openlab_app_secret from db w/ openlab_ruby gem 2020-06-08 15:17:56 +02:00
Sylvain
88f2fb3749 secure the settings API (read) + read the openlab settings from the db 2020-06-08 15:08:07 +02:00
Sylvain
db8de18bd4 set openlab-projects id & secret from the UI 2020-06-08 11:38:49 +02:00
Sylvain
5c152412db test mime type of a file
use marcel to test mime types
updated mimemagic
2020-06-03 16:25:13 +02:00
Sylvain
ebe602ad1c WIP: enforce mime type checking for uploads 2020-06-02 19:18:57 +02:00
Sylvain
45013be950 configure default_host & default_protocol from env
reverts 478a6c40 (partially) & b2434864
2020-06-02 18:29:24 +02:00
Sylvain
9a0f36c245 configure disqus_shortname from the UI 2020-06-01 18:31:43 +02:00
Sylvain
478a6c409d define default_protocol & default_host from the UI + fix email_from + various minor fixes 2020-06-01 17:32:32 +02:00
Sylvain
0617e4cd26 configure default_mail_from from the UI 2020-06-01 12:15:16 +02:00
Sylvain
434c211ccf configure the features tour display mode from the UI 2020-05-27 18:49:53 +02:00
Sylvain
0d211e2e31 configure google recaptcha from UI 2020-05-27 16:35:30 +02:00
Sylvain
c3846e7080 configure twitter analytics from the UI 2020-05-27 15:39:39 +02:00
Sylvain
628a0f3bc3 configure facebook_app_id from the UI 2020-05-27 12:29:51 +02:00
Sylvain
2d628d8826 disable the invoicing module from the UI config panel 2020-05-26 18:07:07 +02:00
Sylvain
537743a740 configure the plans module from the admin UI 2020-05-26 15:39:28 +02:00
Sylvain
6cc6bba7ce refactored app to gather spaces module status from the settings 2020-05-26 13:59:40 +02:00
Sylvain
fd93093f0d UI to configure the spaces module 2020-05-26 10:53:49 +02:00
Sylvain
acefc325f6 configure events_in_calendar form the UI panel 2020-05-25 17:36:53 +02:00
Sylvain
ba4c39ca99 use slot duration from the db setting 2020-05-25 12:55:01 +02:00
Sylvain
a63340188b configure default slot duration from settings panel 2020-05-25 12:55:01 +02:00
Sylvain
ddce7f516a configuration of book concurrent slots through the settings interface 2020-05-25 12:55:00 +02:00
Sylvain
419605e551 configuration of google analytics tracking ID through the settings interface 2020-05-25 12:55:00 +02:00
Sylvain
13bcd9a1f8 use phoneRequired from settings instead of env 2020-05-25 12:54:19 +02:00
Sylvain
f80eb230ca refactored code to use Setting.get 2020-05-25 12:54:19 +02:00
Sylvain
654d4b1cb4 setting: phone_required 2020-05-25 12:54:19 +02:00
Sylvain
18e2b032ae fix import users from csv 2020-05-19 11:45:51 +02:00
Sylvain
2b95c043e3 Removed dependency to has_secure_token to fix warnings about already initialized constant 2020-05-18 17:45:01 +02:00
Sylvain
fdc2f60ff5 [bug] when a new account is created through the sign-up modal, the role is not reported in the StatisticProfile (#196)
Also: if a member was deleted the /api/members/mapping will raise an error
2020-05-18 16:23:53 +02:00
Sylvain
14c8cbbf57 typos 2020-05-11 17:17:37 +02:00
Sylvain
9f8fb1a95c fix tests + fix price.compute flor slots 2020-05-11 13:52:27 +02:00
Sylvain
1fdea63828 correct some errors due to Price.compute refactoring 2020-05-11 10:56:23 +02:00
Sylvain
06502cde33 [bug] accounting periods totals are wrong for periods closed after 2019-08-01 2020-05-11 10:10:52 +02:00
Sylvain
be23cf27c3 use Price.compute to generate invoice items 2020-05-06 12:43:47 +02:00
Sylvain
19de8ca319 fix: manager can offer slot to other users 2020-05-06 09:58:15 +02:00
Sylvain
e6f8a34aa4 [ongoing] compute per based on a hourly rate 2020-05-05 17:56:47 +02:00
Sylvain
34935cbc35 decrease higher limit for black text on primary color 2020-05-05 16:20:44 +02:00
Sylvain
2d8df2c1cd Ability to promote a user to a higher role (member > manager > admin) 2020-05-05 11:28:04 +02:00
Sylvain
06a5bff084 [ongoing] change user role 2020-05-04 18:32:25 +02:00
Sylvain
3319e68526 Auto-adjusts text colors based on the selected theme colors 2020-05-04 13:20:57 +02:00
Sylvain
29e7ac2f08 [bug] background image of the profile is not shown and wrong menu hover color 2020-05-04 12:10:13 +02:00
Sylvain
7640704568 fix payment method on invoices operated by a manager 2020-05-04 11:36:06 +02:00