mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 20:21:10 -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
@ -33,5 +33,25 @@ export default {
|
||||
|
||||
[types.SET_SELECT_ALL_STATE] (state, data) {
|
||||
state.selectAllField = data
|
||||
},
|
||||
|
||||
[types.SET_PAYMENT_MODES] (state, data) {
|
||||
state.paymentModes = data
|
||||
},
|
||||
|
||||
[types.ADD_PAYMENT_MODE] (state, data) {
|
||||
state.paymentModes.push(data.paymentMethod)
|
||||
state.paymentModes = [data.paymentMethod, ...state.paymentModes]
|
||||
},
|
||||
|
||||
[types.DELETE_PAYMENT_MODE] (state, id) {
|
||||
let index = state.paymentModes.findIndex(paymentMethod => paymentMethod.id === id)
|
||||
state.paymentModes.splice(index, 1)
|
||||
},
|
||||
|
||||
[types.UPDATE_PAYMENT_MODE] (state, data) {
|
||||
let pos = state.paymentModes.findIndex(paymentMethod => paymentMethod.id === data.paymentMethod.id)
|
||||
state.paymentModes.splice(pos, 1)
|
||||
state.paymentModes = [data.paymentMethod, ...state.paymentModes]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user