Fix Invoice/Estimate template issues and Add Payment Receipt, Custom Payment Modes and Item units

This commit is contained in:
Jay Makwana
2020-01-05 07:22:36 +00:00
committed by Mohit Panjwani
parent 56a955befd
commit 4c33a5d88c
112 changed files with 5050 additions and 331 deletions

View File

@ -39,6 +39,25 @@ export default {
[types.SET_SELECT_ALL_STATE] (state, data) {
state.selectAllField = data
}
},
[types.ADD_ITEM_UNIT] (state, data) {
state.itemUnits.push(data.unit)
state.itemUnits = [data.unit, ...state.itemUnits]
},
[types.SET_ITEM_UNITS] (state, data) {
state.itemUnits = data
},
[types.DELETE_ITEM_UNIT] (state, id) {
let index = state.itemUnits.findIndex(unit => unit.id === id)
state.itemUnits.splice(index, 1)
},
[types.UPDATE_ITEM_UNIT] (state, data) {
let pos = state.itemUnits.findIndex(unit => unit.id === data.unit.id)
state.itemUnits.splice(pos, 1)
state.itemUnits = [data.unit, ...state.itemUnits]
}
}