Compare commits

..

2 commits

Author SHA1 Message Date
03884e83a3 tiny change to summary.haml 2023-10-12 15:50:15 +02:00
6cee5cad1a override balancing helper- fix double match stockit 2023-10-12 15:40:35 +02:00
8 changed files with 24 additions and 5 deletions

View file

@ -1,6 +1,7 @@
%td.closed.name
= link_to order_article.article.name, '#', 'data-toggle-this' => "#group_order_articles_#{order_article.id}"
%td= order_article.article.order_number
-# :plain => true destroys deface functionality
%td{title: units_history_line(order_article, :plain => true)}
= order_article.units
= pkg_helper order_article.article_price

View file

@ -1,2 +1,3 @@
%section#results
= render 'edit_results_by_articles'
= render 'edit_results_by_articles'

View file

@ -10,7 +10,7 @@
%td= t('.gross_amount')
%td.numeric= number_to_currency(order.sum(:gross))
%tr
%td= t('.fc_amount_total')
%td= t('.fc_amount')
%td.numeric= number_to_currency(order.sum(:fc))
%tr
%td= t('.groups_amount')

View file

@ -860,7 +860,8 @@ de:
summary:
changed: Daten wurden verändert!
duration: von %{starts} bis %{ends}
fc_amount: 'FC-Betrag:'
fc_amount: 'FC-Gesamtbetrag:'
fc_amount_without_deposit: 'FC-Betrag (ohne Pfand):'
fc_profit: FC Gewinn
gross_amount: 'Bruttobetrag:'
groups_amount: 'Gruppenbeträge:'

View file

@ -4,7 +4,7 @@
%td= t('.gross_amount')
%td.numeric= number_to_currency(order.sum(:gross_without_deposit))
%tr
%td= t('.fc_amount')
%td= t('.fc_amount_without_deposit')
%td.numeric= number_to_currency(order.sum(:fc_without_deposit))
%tr
%td= t('.deposit')

View file

@ -0,0 +1,15 @@
if FoodsoftAutomaticInvoices.enabled?
Finance::BalancingHelper.class_eval do
def balancing_view_partial
view = params[:view] || 'edit_results'
case view
when 'edit_results'
'edit_results_by_articles_override'
when 'groups_overview'
'shared/articles_by/groups'
when 'articles_overview'
'shared/articles_by/articles'
end
end
end
end

View file

@ -1,4 +1,4 @@
/ insert_before 'erb:contains("order.stockit?")'
/ insert_before 'erb:contains("t \'.prices\'")'
- if FoodsoftAutomaticInvoices.enabled?
- if FoodsoftConfig[:group_order_invoices]&.[](:separate_deposits)
%th= t '.deposit'

View file

@ -1,3 +1,4 @@
-# :javascript destroy deface functionality
- content_for :javascript do
:javascript
$(function() {