Remove orphaned code

Issue#children_line_items, #children_line_items_total and
#line_items_total (the issue page uses the descendants' total), and the
unused notice_added_from key (the "Added from:" memo stays literal:
redmine_qbo matches it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-17 19:48:17 -05:00
1 parent d0a51a6d30
commit 9296f3f4b4
2 files changed
-15

No files matched your search

-1
View File
@@ -21,7 +21,6 @@ en:
label_running_total: "Running Total" label_running_total: "Running Total"
label_total: "Total" label_total: "Total"
notice_added_from: "Added from issue #"
label_billed: "Billed" label_billed: "Billed"
text_line_item_billed: "Already added to a QuickBooks estimate, so it can't be changed or removed." text_line_item_billed: "Already added to a QuickBooks estimate, so it can't be changed or removed."
-14
View File
@@ -75,16 +75,6 @@ module LineItems
old_value: old_value, value: value) old_value: old_value, value: value)
end end
# Returns line items for immediate children
def children_line_items
LineItem.where(issue_id: self.children.pluck(:id))
end
# Calculates the total value of all child line items
def children_line_items_total
children_line_items.sum(:line_total)
end
# Returns line items for the entire tree below this issue # Returns line items for the entire tree below this issue
def descendant_line_items def descendant_line_items
LineItem.where(issue_id: self.descendants.pluck(:id)) LineItem.where(issue_id: self.descendants.pluck(:id))
@@ -95,10 +85,6 @@ module LineItems
descendant_line_items.sum(:line_total) descendant_line_items.sum(:line_total)
end end
def line_items_total
line_items.sum(:line_total)
end
# Applies line item changes from the issue form, enforcing permissions on the server (the form # Applies line item changes from the issue form, enforcing permissions on the server (the form
# hides buttons, but a request can be crafted by hand or sent through the API): # hides buttons, but a request can be crafted by hand or sent through the API):
# - new lines need "Add line items", changes need "Edit line items", removals need "Delete line items" # - new lines need "Add line items", changes need "Edit line items", removals need "Delete line items"