Don't generate invoice if file already exists

master
Chris Lowis 6 months ago
parent 798c769ddf
commit be00aefb4c
  1. 2
      scripts/generate_invoices.rb

@ -60,6 +60,8 @@ members.each_with_index do |member, index|
output_html_fn = File.join(output_dir, invoice.basename + '.html')
output_pdf_fn = File.join(output_dir, invoice.basename + '.pdf')
next if File.exist?(output_html_fn)
File.write(output_html_fn, result)
system("wkhtmltopdf #{output_html_fn} #{output_pdf_fn}")

Loading…
Cancel
Save