From 6a613a2203f672c98cbe69f7b5973846f38ba6b4 Mon Sep 17 00:00:00 2001 From: Ahmed Ejaz Date: Thu, 5 Dec 2024 18:53:35 +0500 Subject: [PATCH] 13013: add producer charges gst column --- config/locales/en.yml | 1 + lib/reporting/reports/suppliers/base.rb | 1 + lib/reporting/reports/suppliers/helpers/columns_helper.rb | 6 ++++++ 3 files changed, 8 insertions(+) diff --git a/config/locales/en.yml b/config/locales/en.yml index 07a974d49a..b67986c78c 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -3320,6 +3320,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using report_header_item_fees_price: "Item + Fees (%{currency})" report_header_admin_handling_fees: "Admin & Handling (%{currency})" report_header_ship_price: "Ship (%{currency})" + report_header_producer_charges_gst: Producer charges GST? report_header_pay_fee_price: "Pay fee (%{currency})" report_header_total_price: "Total (%{currency})" report_header_product_total_price: "Product Total (%{currency})" diff --git a/lib/reporting/reports/suppliers/base.rb b/lib/reporting/reports/suppliers/base.rb index f6723ffdc8..dadc4a2b78 100644 --- a/lib/reporting/reports/suppliers/base.rb +++ b/lib/reporting/reports/suppliers/base.rb @@ -28,6 +28,7 @@ module Reporting producer:, producer_address:, producer_abn_acn:, + producer_charges_gst:, email:, hub:, hub_address:, diff --git a/lib/reporting/reports/suppliers/helpers/columns_helper.rb b/lib/reporting/reports/suppliers/helpers/columns_helper.rb index 2405a5442a..f110822cbd 100644 --- a/lib/reporting/reports/suppliers/helpers/columns_helper.rb +++ b/lib/reporting/reports/suppliers/helpers/columns_helper.rb @@ -23,6 +23,12 @@ module Reporting end end + def producer_charges_gst + proc do |line_items| + supplier(line_items).charges_sales_tax ? I18n.t(:yes) : I18n.t(:no) + end + end + def email proc { |line_item| supplier(line_item).email_address } end