diff --git a/src/components/Product.js b/src/components/Product.js index c0bef23..081d68a 100644 --- a/src/components/Product.js +++ b/src/components/Product.js @@ -353,22 +353,49 @@ class Product extends Component { -
- - {new Intl.NumberFormat('de-DE', {style: 'currency', currency: currency || 'EUR'}).format(price)} - ({this.props.t ? this.props.t('product.inclVatFooter', { vat }) : `incl. ${vat}% USt.,*`}) - - - - +
+ + + {this.props.rebate && this.props.rebate > 0 && ( + + {(() => { + const rebatePct = this.props.rebate / 100; + const originalPrice = Math.round((price / (1 - rebatePct)) * 10) / 10; + return new Intl.NumberFormat('de-DE', {style: 'currency', currency: currency || 'EUR'}).format(originalPrice); + })()} + + )} + {new Intl.NumberFormat('de-DE', {style: 'currency', currency: currency || 'EUR'}).format(price)} + + ({this.props.t ? this.props.t('product.inclVatFooter', { vat }) : `incl. ${vat}% USt.,*`}) + +
{cGrundEinheit && fGrundPreis && fGrundPreis != price && ( ({new Intl.NumberFormat('de-DE', {style: 'currency', currency: currency || 'EUR'}).format(fGrundPreis)}/{cGrundEinheit}) )} -
{/*incoming*/} diff --git a/src/components/ProductList.js b/src/components/ProductList.js index cbba217..4f7ad7a 100644 --- a/src/components/ProductList.js +++ b/src/components/ProductList.js @@ -454,7 +454,7 @@ class ProductList extends Component { } }} > -