Skip to content

Commit a87a88b

Browse files
committed
[TASK] Change prices in database to fixed-point numbers
1 parent 99f0051 commit a87a88b

2 files changed

Lines changed: 10 additions & 11 deletions

File tree

Build/phpstan.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ parameters:
44
- ../Classes
55
- ../Configuration
66
- ../Tests
7-
- ../ext_emconf.php
87
- ../ext_localconf.php
98
excludePaths:
109
- ../Tests/Acceptance/Support/_generated

ext_tables.sql

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ CREATE TABLE tx_cartproducts_domain_model_product_product (
1717
min_number_in_order int(11) unsigned DEFAULT '0' NOT NULL,
1818
max_number_in_order int(11) unsigned DEFAULT '0' NOT NULL,
1919

20-
price double(11,2) DEFAULT '0.00' NOT NULL,
20+
price decimal(17,5) DEFAULT '0.00' NOT NULL,
2121
is_net_price tinyint(4) unsigned DEFAULT '0' NOT NULL,
2222
special_prices int(11) unsigned DEFAULT '0' NOT NULL,
2323
quantity_discounts int(11) unsigned DEFAULT '0' NOT NULL,
24-
price_measure double(11,2) DEFAULT '0.00' NOT NULL,
24+
price_measure decimal(17,5) DEFAULT '0.00' NOT NULL,
2525
price_measure_unit varchar(8) DEFAULT '' NOT NULL,
26-
base_price_measure double(11,2) DEFAULT '0.00' NOT NULL,
26+
base_price_measure decimal(17,5) DEFAULT '0.00' NOT NULL,
2727
base_price_measure_unit varchar(8) DEFAULT '' NOT NULL,
2828

29-
service_attribute1 double(11,2) DEFAULT '0.00' NOT NULL,
30-
service_attribute2 double(11,2) DEFAULT '0.00' NOT NULL,
31-
service_attribute3 double(11,2) DEFAULT '0.00' NOT NULL,
29+
service_attribute1 decimal(17,5) DEFAULT '0.00' NOT NULL,
30+
service_attribute2 decimal(17,5) DEFAULT '0.00' NOT NULL,
31+
service_attribute3 decimal(17,5) DEFAULT '0.00' NOT NULL,
3232

3333
handle_stock tinyint(4) unsigned DEFAULT '0' NOT NULL,
3434
handle_stock_in_variants tinyint(4) unsigned DEFAULT '0' NOT NULL,
@@ -99,7 +99,7 @@ CREATE TABLE tx_cartproducts_domain_model_product_specialprice (
9999

100100
frontend_user_group int(11) unsigned DEFAULT '0' NOT NULL,
101101

102-
price double(11,2) DEFAULT '0.00' NOT NULL,
102+
price decimal(17,5) DEFAULT '0.00' NOT NULL,
103103

104104
tstamp int(11) unsigned DEFAULT '0' NOT NULL,
105105
crdate int(11) unsigned DEFAULT '0' NOT NULL,
@@ -140,7 +140,7 @@ CREATE TABLE tx_cartproducts_domain_model_product_quantitydiscount (
140140

141141
frontend_user_group int(11) unsigned DEFAULT '0' NOT NULL,
142142

143-
price double(11,2) DEFAULT '0.00' NOT NULL,
143+
price decimal(17,5) DEFAULT '0.00' NOT NULL,
144144
quantity int(11) unsigned DEFAULT '0' NOT NULL,
145145

146146
tstamp int(11) unsigned DEFAULT '0' NOT NULL,
@@ -304,12 +304,12 @@ CREATE TABLE tx_cartproducts_domain_model_product_bevariant (
304304
be_variant_attribute_option2 int(11) unsigned DEFAULT '0' NOT NULL,
305305
be_variant_attribute_option3 int(11) unsigned DEFAULT '0' NOT NULL,
306306

307-
price double(11,2) DEFAULT '0.00' NOT NULL,
307+
price decimal(17,5) DEFAULT '0.00' NOT NULL,
308308

309309
special_prices int(11) unsigned DEFAULT '0' NOT NULL,
310310

311311
price_calc_method int(11) unsigned DEFAULT '0' NOT NULL,
312-
price_measure double(11,2) DEFAULT '0.00' NOT NULL,
312+
price_measure decimal(17,5) DEFAULT '0.00' NOT NULL,
313313
price_measure_unit varchar(8) DEFAULT '' NOT NULL,
314314

315315
stock int(11) unsigned DEFAULT '0' NOT NULL,

0 commit comments

Comments
 (0)