Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase value range for groups.account_balance #322

Closed
bennibu opened this issue Oct 9, 2014 · 2 comments
Closed

Increase value range for groups.account_balance #322

bennibu opened this issue Oct 9, 2014 · 2 comments
Labels
Milestone

Comments

@bennibu
Copy link
Contributor

bennibu commented Oct 9, 2014

A lot of coops doesn't use the account balance / transactions system with real money. That's why they often fill up the group accounts with a high value in the first place, to avoid doing this again. In this case, the allowed range for groups.account_balance of a maximum of 8 digits is a bit too small, I guess. So I would prefer to increase this to precision: 12, scale: 2.

Yesterday there was an error related to this, which is not easy to fix with this small range:

Mysql2::Error: Out of range value for column 'account_balance' at row 1: UPDATE `groups` SET `account_balance` = 1000899.44, `stats` = '---\n:jobs_size: 0\n:orders_sum:821.85\n' WHERE `groups`.`type` IN ('Ordergroup') AND `groups`.`id` = 41"
@wvengen
Copy link
Member

wvengen commented Oct 9, 2014

What about making the financial part optional? That would also improve usability for them.

I don't see any problem in increasing the account_balance precision. Please note that setting the minimum balance required for ordering to a large negative value may be another workaround.

@wvengen wvengen added this to the 4.3 milestone Oct 9, 2014
@wvengen
Copy link
Member

wvengen commented Nov 23, 2014

I vote for increasing the precision for 4.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants