mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 12:11:08 -04:00
Fix Invoice/Estimate template issues and Add Payment Receipt, Custom Payment Modes and Item units
This commit is contained in:
committed by
Mohit Panjwani
parent
56a955befd
commit
4c33a5d88c
@ -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]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user