From beece545de5cab673f3f5683261d832c51807d57 Mon Sep 17 00:00:00 2001 From: Arun Kumar Mohan Date: Sat, 6 Feb 2021 18:44:30 -0500 Subject: [PATCH] Remove cost price field from product variant form --- app/services/permitted_attributes/variant.rb | 2 +- app/views/spree/admin/variants/_form.html.haml | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/app/services/permitted_attributes/variant.rb b/app/services/permitted_attributes/variant.rb index a04928af0d..f6d22c42ac 100644 --- a/app/services/permitted_attributes/variant.rb +++ b/app/services/permitted_attributes/variant.rb @@ -5,7 +5,7 @@ module PermittedAttributes def self.attributes [ :id, :sku, :on_hand, :on_demand, - :cost_price, :price, :unit_value, :unit_description, + :price, :unit_value, :unit_description, :display_name, :display_as, :weight, :height, :width, :depth ] diff --git a/app/views/spree/admin/variants/_form.html.haml b/app/views/spree/admin/variants/_form.html.haml index 0123c7de18..dd84560ec5 100644 --- a/app/views/spree/admin/variants/_form.html.haml +++ b/app/views/spree/admin/variants/_form.html.haml @@ -34,9 +34,6 @@ .field = f.label :price, t('.price') = f.text_field :price, value: number_to_currency(@variant.price, unit: ''), class: 'fullwidth' - .field - = f.label :cost_price, t('.cost_price') - = f.text_field :cost_price, value: number_to_currency(@variant.cost_price, unit: ''), class: 'fullwidth' %div{ 'set-on-demand' => '' } .field.checkbox