Skip to content

Commit 21e5379

Browse files
authored
Fix: Terminal Pvo (PanJiaChen#2804)
1 parent a271030 commit 21e5379

File tree

1 file changed

+11
-1
lines changed
  • src/store/modules/ADempiere/form/VPOS

1 file changed

+11
-1
lines changed

src/store/modules/ADempiere/form/VPOS/index.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
// along with this program. If not, see <https://www.gnu.org/licenses/>.
1616

1717
import router from '@/router'
18+
import language from '@/lang'
1819

1920
// Api Request Methods
2021
import {
@@ -34,7 +35,7 @@ import {
3435
} from '@/api/ADempiere/form/VPOS/CommandShortcut'
3536
// Utils and Helper Methods
3637
import { isEmptyValue } from '@/utils/ADempiere/valueUtils.js'
37-
import { showMessage } from '@/utils/ADempiere/notification'
38+
import { showMessage, showNotification } from '@/utils/ADempiere/notification'
3839

3940
const VPOS = {
4041
listDocumentTypes: [],
@@ -91,6 +92,15 @@ export default {
9192
return new Promise(resolve => {
9293
const currentRouter = router.app.$route
9394
const { posId } = currentRouter.query
95+
if (isEmptyValue(posId)) {
96+
showNotification({
97+
title: language.t('pointOfSales.withoutPOSTerminal'),
98+
message: router.app.$route.title,
99+
summary: router.app.$route.description,
100+
type: 'error'
101+
})
102+
return
103+
}
94104
if (!isEmptyValue(posId)) id = posId
95105
if (isEmptyValue(id)) {
96106
dispatch('listPointOfSale')

0 commit comments

Comments
 (0)