DEV Community

Discussion on: 4 Errors I Made When Building A Financial Application

Collapse
 
mottavianidev profile image
mottaviani-dev

Decimal(15,2) is never enought precision since the database is going to potentially apply unwanted rounding. 17,4 or 18,5 makes you sleep at night when you will apply rounding/flooring yourself by your business rules.

Do not write ebooks about what you dont know.

Moneyphp is your best mate, stick to it.

(You may also need a product_snapshot table alongside a product_snapshot_attributes)