Skip to content

Commit

Permalink
Merge pull request #80 from konsept-ch/invoices
Browse files Browse the repository at this point in the history
change status for exportation
  • Loading branch information
firepolo authored Dec 5, 2023
2 parents 17452a4 + 23b2eee commit 74a3112
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/pages/ManualInvoicesPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -280,12 +280,9 @@ export function ManualInvoicesPage() {
{
name: 'Exporter pour Crésus',
action: () => {
const invoicesToExport =
selectedRowsIds.length > 0
? invoicesData.filter(
({ id, status }) => selectedRowsIds.includes(id) && status === 'A traiter'
)
: [data]
const invoicesToExport = (selectedRowsIds.length > 0 ? invoicesData : [data]).filter(
({ id, status }) => selectedRowsIds.includes(id) && status === 'Traitée'
)

const csvClient = Papa.unparse(
{
Expand Down

0 comments on commit 74a3112

Please sign in to comment.