From a92c43941858879f869d9f6f63ed590cf2a81be5 Mon Sep 17 00:00:00 2001 From: viehlieb Date: Tue, 17 Jan 2023 17:43:53 +0100 Subject: [PATCH] adjust db to use invoices --- app/documents/group_order_invoice_pdf.rb | 2 +- db/schema.rb | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/app/documents/group_order_invoice_pdf.rb b/app/documents/group_order_invoice_pdf.rb index aba39506..bc6c5c43 100644 --- a/app/documents/group_order_invoice_pdf.rb +++ b/app/documents/group_order_invoice_pdf.rb @@ -1,4 +1,4 @@ -class GroupOrderInvoicePdf < RenderPDF +class GroupOrderInvoicePdf < RenderPdf def filename I18n.t('documents.group_order_invoice_pdf.filename', :number => @options[:invoice_number]) + '.pdf' end diff --git a/db/schema.rb b/db/schema.rb index 50c24c41..742cd8ea 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -182,6 +182,16 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_06_144440) do t.index ["order_article_id"], name: "index_group_order_articles_on_order_article_id" end + create_table "group_order_invoices", charset: "utf8mb4", collation: "utf8mb4_general_ci", force: :cascade do |t| + t.integer "group_order_id" + t.bigint "invoice_number" + t.date "invoice_date" + t.string "payment_method" + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false + t.index ["group_order_id"], name: "index_group_order_invoices_on_group_order_id", unique: true + end + create_table "group_orders", id: :integer, charset: "utf8mb4", collation: "utf8mb4_general_ci", force: :cascade do |t| t.integer "ordergroup_id" t.integer "order_id", default: 0, null: false