Skip to content

Commit

Permalink
Merge pull request #69 from iRaySpace/master
Browse files Browse the repository at this point in the history
fix: Order processes
  • Loading branch information
iRaySpace authored Jul 17, 2019
2 parents a7e5138 + 0df2a68 commit 86d8fe0
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/container/SalesContainer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,17 @@ export default class SalesContainer extends React.Component {
};

onDeleteClick = () => {
const { changeValue } = this.props.stateStore;
changeValue("deleteDialogVisible", true, "Sales");
const { changeValue, isViewingOrder } = this.props.stateStore;

if (isViewingOrder) {
showAlert(
"Error",
"Unable to clear items. You can either void the line and/or cancel the order.",
null,
);
} else {
changeValue("deleteDialogVisible", true, "Sales");
}
};

onDeleteReceiptLine = () => {
Expand Down

0 comments on commit 86d8fe0

Please sign in to comment.