Total in action view

Phoca Cart - complex e-commerce extension
akasit
Phoca Member
Phoca Member
Posts: 21
Joined: 15 Mar 2016, 17:07

Total in action view

Post by akasit »

Hi Jan
I test Order and Total in Order Checkout 11,553.86
Image
but
View Order history in Action view Total in Order Change to 11.553.90
Image
How to fix Total not change 11,553.86 in Action view

Thank you
Ryu
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Total in action view

Post by Jan »

Hi, thank you for the info, I have found it is a mysql issue so I need to find a solution for this.

If the float number is < 10000 - then everything is OK 755,86 is 755,86
If the float number is > 10000 - then it is rounded 11553,86 is 11553,90

It seems like changing the column type of the values will be needed, from float -> to decimal(15,4)

Table: jos_phocacart_order_total
ALTER TABLE `jos_phocacart_order_total` CHANGE `amount` `amount` DECIMAL( 15, 4 ) NOT NULL DEFAULT '0';

Table: jos_phocacart_order_products
ALTER TABLE `jos_phocacart_order_products` CHANGE `netto` `netto` DECIMAL( 15, 4 ) NOT NULL DEFAULT '0';
ALTER TABLE `jos_phocacart_order_products` CHANGE `tax` `tax` DECIMAL( 15, 4 ) NOT NULL DEFAULT '0';
ALTER TABLE `jos_phocacart_order_products` CHANGE `brutto` `brutto` DECIMAL( 15, 4 ) NOT NULL DEFAULT '0';
ALTER TABLE `jos_phocacart_order_products` CHANGE `dnetto` `dnetto` DECIMAL( 15, 4 ) NOT NULL DEFAULT '0';
ALTER TABLE `jos_phocacart_order_products` CHANGE `dtax` `dtax` DECIMAL( 15, 4 ) NOT NULL DEFAULT '0';
ALTER TABLE `jos_phocacart_order_products` CHANGE `dbrutto` `dbrutto` DECIMAL( 15, 4 ) NOT NULL DEFAULT '0';
ALTER TABLE `jos_phocacart_order_products` CHANGE `damount` `damount` DECIMAL( 15, 4 ) NOT NULL DEFAULT '0';
ALTER TABLE `jos_phocacart_order_products` CHANGE `weight` `weight` DECIMAL( 10, 4 ) NOT NULL DEFAULT '0';
ALTER TABLE `jos_phocacart_order_products` CHANGE `volume` `volume` DECIMAL( 10, 4 ) NOT NULL DEFAULT '0';

I will change them for next version, there will be more columns which need to be transformed.

Jan
If you find Phoca extensions useful, please support the project
akasit
Phoca Member
Phoca Member
Posts: 21
Joined: 15 Mar 2016, 17:07

Re: Total in action view

Post by akasit »

Oh Thank you very much.
It ok.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Total in action view

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
Post Reply