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:
parent
798c769ddf
commit
be00aefb4c
@ -60,6 +60,8 @@ members.each_with_index do |member, index|
|
|||||||
output_html_fn = File.join(output_dir, invoice.basename + '.html')
|
output_html_fn = File.join(output_dir, invoice.basename + '.html')
|
||||||
output_pdf_fn = File.join(output_dir, invoice.basename + '.pdf')
|
output_pdf_fn = File.join(output_dir, invoice.basename + '.pdf')
|
||||||
|
|
||||||
|
next if File.exist?(output_html_fn)
|
||||||
|
|
||||||
File.write(output_html_fn, result)
|
File.write(output_html_fn, result)
|
||||||
|
|
||||||
system("wkhtmltopdf #{output_html_fn} #{output_pdf_fn}")
|
system("wkhtmltopdf #{output_html_fn} #{output_pdf_fn}")
|
||||||
|
Loading…
Reference in New Issue
Block a user