0

i'm facing a great issue with decimal places in base price in hybris with CPQ. in my local installation with mysql db, product base price is stored with 8 decimal digits the allows the correct final price.

in develop machine, with hana db, price is stored with 5 decimal digits that makes the final price wrong.

there's some setting to set up decimal digits?how can be possible this difference of behaviour?

thanks in advance Best regards

Marco

1 Answers1

0

You didn't describe version of your hybris. May be there are patch for this issue. You can override existing attribute and force for db type like below.

<attribute qualifier="totalPrice" redeclare="true">
    <persistence type="property">
        <columntype database="mysql">
            <value>DECIMAL(13, 8)</value>
        </columntype>
        <columntype database="sap">
            <value>DECIMAL(13, 8)</value>
        </columntype>
        <columntype>
            <value>DOUBLE</value>
        </columntype>           
    </persistence>
</attribute>

You need to initialize system for applying resize column. Otherwise you need to alter table manually.

mkysoft
  • 5,392
  • 1
  • 21
  • 30
  • Did you check column type in DB? – mkysoft Feb 24 '20 at 15:30
  • You can enable jdbc logging for catching SQL queries to determine problem related with hana or hybris ORM. Also you can try to directly edit hana table to enter correct value then check backoffice (not forget hybris cache, reset it from hac). – mkysoft Feb 25 '20 at 09:30