Repository navigation
Description
Background information
IMPORTANT: If you choose to ignore this issue report template, your issue will be closed as we cannot help without the requested information.
Please make sure you tick (add an x between the square brackets with no spaces) the following check boxes:
- Reporting an issue of an unmodified OSPOS installation
- Checked open and closed issues and no similar issue was already reported (please make sure you searched!)
- Read README, WHATS_NEW, INSTALL.md and UPGRADE
- Read the FAQ for any known install and/or upgrade gotchas (in specific PHP extensions installed)
- Read the wiki
- Executed any database upgrade scripts if an upgrade pre 3.0.0 (e.g. database/2.4_to_3.0.sql)
- Aware the installation code is in bintray (see README), and GitHub master is for developers only and therefore not complete nor stable
Installation information
OSPOS Installation Info: 3.3.2 - e83059
Language Code: en-US
Extensions & Modules:
» GD: Enabled ✓
» BC Math: Enabled ✓
» INTL: Enabled ✓
» OpenSSL: Enabled ✓
» MBString: Enabled ✓
» Curl: Enabled ✓
User Configuration:
.Browser: Firefox
.Server Software: Server
.PHP Version: 7.4.4
.DB Version: 5.7.29-log
.Server Port: 80
.OS: FreeBSD 11.3-RELEASE-p9
File Permissions:
» [application/logs:] - 0770 | Writable ✓
» [public/uploads:] - 0774 | Writable ✓
» [public/uploads/item_pics:] - 0774 | Writable ✓
» [import_customers.csv:] - 0640 | Not Writable ✗
New Feature
Currently DECIMAL attribute type has a fixed precision of 3. This is fine in many cases such as attributes with weights and lengths, but it won't do when storing attributes that require integer precision (0) or money precision (2). For example if you have an attribute representing the number of pages in a book you will want to set that precision to be 0 or if you want an attribute for your computers showing the Manufacturer's Suggested Retail Price you would want the attribute set to a precision of 2.
@opensourcepos/org or anyone else, do you have any comments on me making this change? It would probably mean:
- Adding a column called definition_precision to the attribute_definitions table.
- Adding a dropdown to the attribute form view representing precisions of 0-3 (with the default of 3).
- Making the dropdown invisible when the attribute type is not a DECIMAL (a la definition_unit).
- Changing the business logic to truncate the value of decimals when storing and retrieving DECIMAL attribute types.
The database decimal_value field would remain as is, since at the database level it would still get stored the same (e.g., 123.000 pages in a book in the database, but it would get displayed as 123 to the user)
Activity
stale commentedon Jul 3, 2020
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
objecttothis commentedon Jul 3, 2020
This is still in the works.
daN4cat commentedon Jul 4, 2020
Add a label to avoid the automatic closure.
[-]Enhancement: Precision in DECIMAL attribute type[/-][+][Enhancement]: Precision in DECIMAL attribute type[/+]