invoicing: parent site not current site

This commit is contained in:
Kyle Drake 2023-11-30 15:32:31 -06:00
parent 08ac0510a6
commit 36e35c913e
2 changed files with 2 additions and 2 deletions

View file

@ -18,7 +18,7 @@ end
get '/settings/invoices/?' do get '/settings/invoices/?' do
require_login require_login
@title = 'Invoices' @title = 'Invoices'
@invoices = current_site.stripe_customer_id ? Stripe::Invoice.list(customer: current_site.stripe_customer_id) : [] @invoices = parent_site.stripe_customer_id ? Stripe::Invoice.list(customer: parent_site.stripe_customer_id) : []
erb :'settings/invoices' erb :'settings/invoices'
end end

View file

@ -12,7 +12,7 @@
You currently have the <strong>Free Plan (<%= current_site.maximum_space.to_space_pretty %>)</strong>.<br>Want to get more space and help Neocities? Become a supporter! You currently have the <strong>Free Plan (<%= current_site.maximum_space.to_space_pretty %>)</strong>.<br>Want to get more space and help Neocities? Become a supporter!
</p> </p>
<a href="/supporter">Supporter Info</a> <a href="/supporter">Supporter Info</a>
<% if current_site.stripe_customer_id || current_site.paypal_profile_id %> <% if parent_site.stripe_customer_id || parent_site.paypal_profile_id %>
<br> <br>
<a href="/settings/invoices">Generated Invoices</a> <a href="/settings/invoices">Generated Invoices</a>
<% end %> <% end %>