From cf96d0cc4924c81daaa19e289cf4baed230d7ade Mon Sep 17 00:00:00 2001 From: Dmitry Sinina Date: Sat, 1 Sep 2018 19:15:57 +0300 Subject: [PATCH] fix manual invoice creation. closes #355 --- app/admin/billing/invoices.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/admin/billing/invoices.rb b/app/admin/billing/invoices.rb index 92ab5c43a..463b6fa42 100644 --- a/app/admin/billing/invoices.rb +++ b/app/admin/billing/invoices.rb @@ -38,8 +38,8 @@ controller do def create_resource(object) - object.model.type_id=Billing::InvoiceType::MANUAL #TODO fix this. We need separate method for manual creation - InvoiceGenerator.new(object.model).save! + object.type_id=Billing::InvoiceType::MANUAL #TODO fix this. We need separate method for manual creation + InvoiceGenerator.new(object).save! end def create