Fix
This commit is contained in:
1 parent
486502852e
commit
0e48ea427b
23 files changed
+386
-78
No files matched your search
@@ -1,7 +1,6 @@
|
||||
package httpapi
|
||||
|
||||
import (
|
||||
"encoding/csv"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"strings"
|
||||
@@ -25,7 +24,10 @@ func (s *Server) handleAdminExportCompanyInvoices(w http.ResponseWriter, r *http
|
||||
w.Header().Set("Content-Type", "text/csv; charset=utf-8")
|
||||
w.Header().Set("Content-Disposition", `attachment; filename="descrybe-stripe-invoices.csv"`)
|
||||
w.Header().Set("Cache-Control", "private, no-store")
|
||||
out := csv.NewWriter(w)
|
||||
out, err := newUTF8CSVWriter(w)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_ = out.Write([]string{"company_id", "invoice_id", "number", "status", "currency", "created_unix", "amount_due_minor", "amount_paid_minor", "amount_remaining_minor", "hosted_invoice_url", "invoice_pdf"})
|
||||
for _, row := range rows {
|
||||
_ = out.Write([]string{id.String(), row.ID, row.Number, row.Status, row.Currency,
|
||||
|
||||
Reference in new issue
Block a user