fix invoice getter

This commit is contained in:
yogesh_gohil
2019-11-15 12:55:35 +05:30
parent 090c33f63c
commit adbc04846c
3 changed files with 19 additions and 24 deletions

View File

@ -4,3 +4,7 @@ export const getTemplateId = (state) => state.invoiceTemplateId
export const selectedInvoices = (state) => state.selectedInvoices
export const totalInvoices = (state) => state.totalInvoices
export const selectedCustomer = (state) => state.selectedCustomer
export const getInvoice = (state) => (id) => {
let invId = parseInt(id)
return state.invoices.find(invoice => invoice.id === invId)
}