44d1d18689
* feat(dashboard,types): add credit lines + loyalty changes * chore: fix types * chore: fix specs * chore: use correct plugin name * chore: use new currency input --------- Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
9 lines
242 B
TypeScript
9 lines
242 B
TypeScript
import { OrderCreditLineDTO } from "@medusajs/types"
|
|
|
|
export const getTotalCreditLines = (creditLines: OrderCreditLineDTO[]) =>
|
|
creditLines.reduce((acc, creditLine) => {
|
|
acc = acc + (creditLine.amount as number)
|
|
|
|
return acc
|
|
}, 0)
|