Skip to content

Commit

Permalink
calculation fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
devomid committed Jul 17, 2024
1 parent 5f55fda commit d9d3b8c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"author": "Omid Azad",
"main": "src/start.js",
"name": "frontend",
"version": "2.2.2",
"version": "2.2.3",
"private": false,
"dependencies": {
"@emotion/react": "^11.11.4",
Expand Down
2 changes: 1 addition & 1 deletion src/dialogs/about.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const About = ({ open, setOpen }) => {
SSP Price Calculation Utility{'\n'}
created and developed by: Omid Azad{'\n'}
Date created: May 5th 2024{'\n'}
Ver 2.2.2
Ver 2.2.3
</Typography>
</Box>
</Box>
Expand Down
6 changes: 3 additions & 3 deletions src/pages/EntrySection.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,12 @@ const EntrySection = () => {

if (originChandSherkati && !destChandSherkati) {
setOriginChandSherkatiPrice(halfOriginPrice);
upgradeDiffValue = destPrice - (originPrice + originChandSherkatiPrice);
upgradeDiffValue = Number(destPrice) - (Number(originPrice) + Number(originChandSherkatiPrice));
await setUpgradeDifference(upgradeDiffValue);

} else if (destChandSherkati && !originChandSherkati) {
setDestChandSherkatiPrice(halfDestPrice);
upgradeDiffValue = (destChandSherkatiPrice + destPrice) - originPrice;
upgradeDiffValue = (Number(destChandSherkatiPrice) + Number(destPrice)) - Number(originPrice);
await setUpgradeDifference(upgradeDiffValue);

} else if (originChandSherkati && destChandSherkati) {
Expand All @@ -164,7 +164,7 @@ const EntrySection = () => {
} else {
setOriginChandSherkatiPrice(0);
setDestChandSherkatiPrice(0);
upgradeDiffValue = destPrice - originPrice;
upgradeDiffValue = Number(destPrice) - Number(originPrice);
await setUpgradeDifference(upgradeDiffValue);
}

Expand Down

0 comments on commit d9d3b8c

Please sign in to comment.