Commit eab57ffe authored by Shani's avatar Shani

Merge branch 'release-5.8.9' into dev

# Conflicts:
#	config/globalSettings.dev.js
#	config/globalSettings.prod.js
#	public/js/components/Events/ConditionsTypes/ConditionBalance.js
#	public/js/components/Events/EventsUtil.js
parents 99705f0f 4b8df7b9
......@@ -34,8 +34,12 @@ export const getLimitationFromBalanceConditionPath = (path) => {
return 'none';
};
export const getOverGroupFromBalanceConditionPath = path =>
(path.indexOf('.over_group.') !== -1 ? 'over_group' : 'none');
export const getOverGroupFromBalanceConditionPath = (path) => {
if (path.indexOf('.over_group.') !== -1) {
return 'over_group';
}
return 'none';
};
export const getActivityTypeFromBalanceConditionPath = (path, limitation) => {
if (limitation !== 'activity_type') {
......
......@@ -39,6 +39,18 @@ export default class PricingMapping extends Component {
onChangeApriceExists = () => {
this.onChangeApriceField(undefined);
this.onChangeApriceMultExists();
this.onChangeTaxIncluded({ target: { value: undefined } });
}
onChangeTaxIncluded = (e) => {
const { value } = e.target;
const packet = {
target: {
value,
id: 'tax_included',
},
};
this.onSetPricingMapping(packet);
}
onChangeApriceMult = (e) => {
......@@ -58,6 +70,7 @@ export default class PricingMapping extends Component {
renderPrice = () => {
const { mapping } = this.props;
const aprice = mapping.getIn(['aprice_field'], null);
const taxIncluded = mapping.get('tax_included', false) && aprice !== null;
const apriceInputProps = {
fieldType: 'select',
placeholder: 'Select price field...',
......@@ -98,6 +111,15 @@ export default class PricingMapping extends Component {
<div className="col-lg-1">
<Help contents="When checked, the price taken will be multiplied by the constant entered" />
</div>
<div className="col-lg-10 col-lg form-inner-edit-row">
<Field
fieldType="checkbox"
value={taxIncluded}
label="Tax is included"
disabled={!aprice}
onChange={this.onChangeTaxIncluded}
/>
</div>
</div>
</div>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment