estimate not e

This commit is contained in:
2022-03-14 19:39:36 -04:00
parent 3ea2cd14d1
commit b7e3ea9e3d

View File

@@ -28,7 +28,7 @@ class EstimateController < ApplicationController
estimate = get_estimate
begin
send_data estimate.pdf, filename: "estimate #{e.doc_number}.pdf", :disposition => 'inline', :type => "application/pdf"
send_data estimate.pdf, filename: "estimate #{estimate.doc_number}.pdf", :disposition => 'inline', :type => "application/pdf"
rescue
redirect_to :back, :flash => { :error => "Estimate not found" }
end
@@ -41,7 +41,7 @@ class EstimateController < ApplicationController
estimate = get_estimate
begin
send_data estimate.pdf, filename: "estimate #{e.doc_number}.pdf", :disposition => 'inline', :type => "application/pdf"
send_data estimate.pdf, filename: "estimate #{estimate.doc_number}.pdf", :disposition => 'inline', :type => "application/pdf"
rescue
redirect_to :back, :flash => { :error => "Estimate not found" }
end