File tree 1 file changed +11
-1
lines changed
src/store/modules/ADempiere/form/VPOS 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 15
15
// along with this program. If not, see <https://www.gnu.org/licenses/>.
16
16
17
17
import router from '@/router'
18
+ import language from '@/lang'
18
19
19
20
// Api Request Methods
20
21
import {
@@ -34,7 +35,7 @@ import {
34
35
} from '@/api/ADempiere/form/VPOS/CommandShortcut'
35
36
// Utils and Helper Methods
36
37
import { isEmptyValue } from '@/utils/ADempiere/valueUtils.js'
37
- import { showMessage } from '@/utils/ADempiere/notification'
38
+ import { showMessage , showNotification } from '@/utils/ADempiere/notification'
38
39
39
40
const VPOS = {
40
41
listDocumentTypes : [ ] ,
@@ -91,6 +92,15 @@ export default {
91
92
return new Promise ( resolve => {
92
93
const currentRouter = router . app . $route
93
94
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
+ }
94
104
if ( ! isEmptyValue ( posId ) ) id = posId
95
105
if ( isEmptyValue ( id ) ) {
96
106
dispatch ( 'listPointOfSale' )
You can’t perform that action at this time.
0 commit comments