5
0
mirror of https://git.coop/cotech/fund.git synced 2024-12-18 09:33:05 +00:00

Don't generate invoice if file already exists

This commit is contained in:
Chris Lowis 2022-05-25 11:43:09 +01:00
parent 798c769ddf
commit be00aefb4c

View File

@ -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}")