From 6c9267d791b13c093cd159ba5c06785f00b76464 Mon Sep 17 00:00:00 2001 From: Kyle Drake Date: Wed, 4 Oct 2017 20:29:15 -0700 Subject: [PATCH] Migration and template for email invoice --- migrations/108_email_invoice.rb | 9 +++++++++ views/templates/email/invoice.erb | 13 +++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 migrations/108_email_invoice.rb create mode 100644 views/templates/email/invoice.erb diff --git a/migrations/108_email_invoice.rb b/migrations/108_email_invoice.rb new file mode 100644 index 00000000..ef1066f6 --- /dev/null +++ b/migrations/108_email_invoice.rb @@ -0,0 +1,9 @@ +Sequel.migration do + up { + DB.add_column :sites, :email_invoice, :boolean, default: false + } + + down { + DB.drop_column :sites, :email_invoice + } +end diff --git a/views/templates/email/invoice.erb b/views/templates/email/invoice.erb new file mode 100644 index 00000000..8553c4e2 --- /dev/null +++ b/views/templates/email/invoice.erb @@ -0,0 +1,13 @@ +Neocities Invoice + +For: Neocities Supporter Account + +Date: <%= date.strftime("%D") %> + +Billing Period: <%= period_start.strftime("%D") %> - <%= period_end.strftime("%D") %> + +Amount: <%= Money.new(amount, "USD").format %> + +You have been successfully charged. Thank you for being a Neocities supporter! + +- The Neocities Team