From 4523d0b26e642e024a83e7866552460f3d3dafab Mon Sep 17 00:00:00 2001 From: viehlieb Date: Wed, 11 Oct 2023 14:53:47 +0200 Subject: [PATCH] wip move automatic invoices to plugin --- Dockerfile-dev | 3 +- Gemfile | 1 + Gemfile.lock | 8 + .../balancing/_order_article.html.haml | 2 +- .../finance/balancing/_results.html.haml | 2 + app/views/finance/balancing/_summary.haml | 4 +- app/views/finance/balancing/new.html.haml | 4 +- app/views/group_orders/edit.html.haml | 3 +- app/views/group_orders/new.html.haml | 3 +- docker-compose-dev.yml | 1 - .../concerns/send_group_order_invoice_pdf.rb | 17 - .../Alice WG_Rechnung202309290001.pdf | 2003 ----------------- .../insert_customer_number.html.haml.deface | 3 + .../insert_generate_invoice.html.haml.deface | 5 +- .../_orders/insert_links.html.haml.deface | 17 +- ...ce_contents_order_article.html.haml.deface | 3 + .../edit/fix_hover.html.haml.deface | 3 + .../new/fix_hover.html.haml.deface | 3 + .../models/order_article_override.rb | 4 + ...dit_results_by_articles_override.html.haml | 64 + .../_order_article_override.html.haml | 42 + .../_order_article_result_override.html.haml | 5 + .../group_order_invoices/_links.html.haml | 29 + .../views/group_order_invoices/create.js.erb | 1 + .../create_multiple.js.erb | 1 + .../views/group_order_invoices/destroy.js.erb | 1 + .../group_orders/_form_override.html.haml | 180 ++ .../mailer/group_order_invoice.text.haml | 1 + .../app/views/ordergroups/edit.html.haml | 72 + .../app/views/orders/_articles.html.haml | 53 + .../app/views/orders/show.html.haml | 97 + .../app/views/shared/_group.html.haml | 24 + .../automatic_invoices/config/locales/de.yml | 9 +- .../foodsoft_automatic_invoices.gemspec | 4 +- .../lib/foodsoft_automatic_invoices.rb | 1 + 35 files changed, 628 insertions(+), 2045 deletions(-) create mode 100644 app/views/finance/balancing/_results.html.haml delete mode 100644 plugins/automatic_invoices/app/controllers/concerns/send_group_order_invoice_pdf.rb delete mode 100644 plugins/automatic_invoices/app/documents/Alice WG_Rechnung202309290001.pdf create mode 100644 plugins/automatic_invoices/app/overrides/admin/ordergroups/_form/insert_customer_number.html.haml.deface create mode 100644 plugins/automatic_invoices/app/overrides/finance/balancing/_results/replace_contents_order_article.html.haml.deface create mode 100644 plugins/automatic_invoices/app/overrides/group_orders/edit/fix_hover.html.haml.deface create mode 100644 plugins/automatic_invoices/app/overrides/group_orders/new/fix_hover.html.haml.deface create mode 100644 plugins/automatic_invoices/app/views/finance/balancing/_edit_results_by_articles_override.html.haml create mode 100644 plugins/automatic_invoices/app/views/finance/balancing/_order_article_override.html.haml create mode 100644 plugins/automatic_invoices/app/views/finance/balancing/_order_article_result_override.html.haml create mode 100644 plugins/automatic_invoices/app/views/group_order_invoices/_links.html.haml create mode 100644 plugins/automatic_invoices/app/views/group_order_invoices/create.js.erb create mode 100644 plugins/automatic_invoices/app/views/group_order_invoices/create_multiple.js.erb create mode 100644 plugins/automatic_invoices/app/views/group_order_invoices/destroy.js.erb create mode 100644 plugins/automatic_invoices/app/views/group_orders/_form_override.html.haml create mode 100644 plugins/automatic_invoices/app/views/mailer/group_order_invoice.text.haml create mode 100644 plugins/automatic_invoices/app/views/ordergroups/edit.html.haml create mode 100644 plugins/automatic_invoices/app/views/orders/_articles.html.haml create mode 100644 plugins/automatic_invoices/app/views/orders/show.html.haml create mode 100644 plugins/automatic_invoices/app/views/shared/_group.html.haml diff --git a/Dockerfile-dev b/Dockerfile-dev index 37dce5f6..f25c2062 100644 --- a/Dockerfile-dev +++ b/Dockerfile-dev @@ -1,4 +1,4 @@ -FROM ruby:2.7 +FROM ruby:2.7.8 # Install dependencies RUN deps='libmagic-dev chromium nodejs' && \ @@ -19,6 +19,7 @@ ENV PORT=3000 \ WORKDIR /app +RUN gem update --system RUN gem install bundler RUN bundle config build.nokogiri "--use-system-libraries" diff --git a/Gemfile b/Gemfile index 5dc92369..a8d33863 100644 --- a/Gemfile +++ b/Gemfile @@ -71,6 +71,7 @@ gem 'foodsoft_links', path: 'plugins/links' gem 'foodsoft_messages', path: 'plugins/messages' gem 'foodsoft_polls', path: 'plugins/polls' gem 'foodsoft_wiki', path: 'plugins/wiki' +gem 'foodsoft_automatic_invoices', path: 'plugins/automatic_invoices' # plugins not enabled by default # gem 'foodsoft_current_orders', path: 'plugins/current_orders' diff --git a/Gemfile.lock b/Gemfile.lock index 7665a67f..74d736a6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -16,6 +16,13 @@ GIT acts_as_versioned (0.6.0) activerecord (>= 3.0.9) +PATH + remote: plugins/automatic_invoices + specs: + foodsoft_automatic_invoices (0.0.1) + deface (~> 1.9) + rails + PATH remote: plugins/discourse specs: @@ -630,6 +637,7 @@ DEPENDENCIES exception_notification factory_bot_rails faker + foodsoft_automatic_invoices! foodsoft_discourse! foodsoft_documents! foodsoft_links! diff --git a/app/views/finance/balancing/_order_article.html.haml b/app/views/finance/balancing/_order_article.html.haml index 47db3e31..89425ffa 100644 --- a/app/views/finance/balancing/_order_article.html.haml +++ b/app/views/finance/balancing/_order_article.html.haml @@ -22,6 +22,6 @@ %td = link_to t('ui.edit'), edit_order_order_article_path(order_article.order, order_article), remote: true, class: 'btn btn-mini' unless order_article.order.closed? -%td +%td.end = link_to t('ui.delete'), order_order_article_path(order_article.order, order_article), method: :delete, remote: true, data: {confirm: t('.confirm')}, class: 'btn btn-danger btn-mini' unless order_article.order.closed? diff --git a/app/views/finance/balancing/_results.html.haml b/app/views/finance/balancing/_results.html.haml new file mode 100644 index 00000000..0ab63e84 --- /dev/null +++ b/app/views/finance/balancing/_results.html.haml @@ -0,0 +1,2 @@ +%section#results + = render 'edit_results_by_articles' \ No newline at end of file diff --git a/app/views/finance/balancing/_summary.haml b/app/views/finance/balancing/_summary.haml index e466727f..476c7091 100644 --- a/app/views/finance/balancing/_summary.haml +++ b/app/views/finance/balancing/_summary.haml @@ -6,11 +6,11 @@ %tr %td= t('.net_amount') %td.numeric= number_to_currency(order.sum(:net)) - %tr + %tr.gross-amount %td= t('.gross_amount') %td.numeric= number_to_currency(order.sum(:gross)) %tr - %td= t('.fc_amount') + %td= t('.fc_amount_total') %td.numeric= number_to_currency(order.sum(:fc)) %tr %td= t('.groups_amount') diff --git a/app/views/finance/balancing/new.html.haml b/app/views/finance/balancing/new.html.haml index 7e143e08..0e238d2e 100644 --- a/app/views/finance/balancing/new.html.haml +++ b/app/views/finance/balancing/new.html.haml @@ -76,6 +76,6 @@ %li= link_to t('.articles_overview'), new_finance_order_path(order_id: @order.id, view: 'articles_overview'), remote: true -%section#results - = render 'edit_results_by_articles' += render "results" + %p= link_to_top diff --git a/app/views/group_orders/edit.html.haml b/app/views/group_orders/edit.html.haml index 86842fe7..5569c4a1 100644 --- a/app/views/group_orders/edit.html.haml +++ b/app/views/group_orders/edit.html.haml @@ -1 +1,2 @@ -= render 'form' \ No newline at end of file +#group-order-form + = render 'form' \ No newline at end of file diff --git a/app/views/group_orders/new.html.haml b/app/views/group_orders/new.html.haml index 86842fe7..418a3b93 100644 --- a/app/views/group_orders/new.html.haml +++ b/app/views/group_orders/new.html.haml @@ -1 +1,2 @@ -= render 'form' \ No newline at end of file +#group-order-form + = render 'form' diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index b0a325db..0a8b3fec 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -11,7 +11,6 @@ services: build: context: . dockerfile: Dockerfile-dev - platform: linux/x86_64 command: ./proc-start worker volumes: - bundle:/usr/local/bundle diff --git a/plugins/automatic_invoices/app/controllers/concerns/send_group_order_invoice_pdf.rb b/plugins/automatic_invoices/app/controllers/concerns/send_group_order_invoice_pdf.rb deleted file mode 100644 index 76e71c99..00000000 --- a/plugins/automatic_invoices/app/controllers/concerns/send_group_order_invoice_pdf.rb +++ /dev/null @@ -1,17 +0,0 @@ -module Concerns::SendGroupOrderInvoicePdf - extend ActiveSupport::Concern - - protected - - def create_invoice_pdf(group_order_invoice) - invoice_data = group_order_invoice.load_data_for_invoice - invoice_data[:title] = t('documents.group_order_invoice_pdf.title', supplier: invoice_data[:supplier]) - invoice_data[:no_footer] = true - GroupOrderInvoicePdf.new invoice_data - end - - def send_group_order_invoice_pdf(group_order_invoice) - pdf = create_invoice_pdf(group_order_invoice) - send_data pdf.to_pdf, filename: pdf.filename, type: 'application/pdf' - end -end diff --git a/plugins/automatic_invoices/app/documents/Alice WG_Rechnung202309290001.pdf b/plugins/automatic_invoices/app/documents/Alice WG_Rechnung202309290001.pdf deleted file mode 100644 index 731dd494..00000000 --- a/plugins/automatic_invoices/app/documents/Alice WG_Rechnung202309290001.pdf +++ /dev/null @@ -1,2003 +0,0 @@ -%PDF-1.3 -% -1 0 obj -<< /Creator -/Producer ->> -endobj -2 0 obj -<< /Type /Catalog -/Pages 3 0 R ->> -endobj -3 0 obj -<< /Type /Pages -/Count 1 -/Kids [7 0 R] ->> -endobj -4 0 obj -<< /Length 2 ->> -stream -q - -endstream -endobj -5 0 obj -<< /Type /Page -/Parent 3 0 R -/MediaBox [0 0 595.28 841.89] -/CropBox [0 0 595.28 841.89] -/BleedBox [0 0 595.28 841.89] -/TrimBox [0 0 595.28 841.89] -/ArtBox [0 0 595.28 841.89] -/Contents 4 0 R -/Resources << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI] -/Font << >> ->> ->> -endobj -6 0 obj -<< /Length 16701 ->> -stream -q - -BT -359.28 749.214 Td -/F2.0 12 Tf -<526563686e756e677374656c6c65722a696e> Tj -ET - - -BT -359.28 731.681 Td -/F2.0 9 Tf -[<46432054> 69.82422 <657374>] TJ -ET - - -BT -359.28 717.06 Td -/F2.0 9 Tf -[<47729f6e6520537472> 20.01953 <61a76520313033>] TJ -ET - - -BT -359.28 702.439 Td -/F2.0 9 Tf -<3130393937204265726c696e> Tj -ET - - -BT -359.28 687.818 Td -/F2.0 9 Tf -[<54> 69.82422 <656c65666f6e3a2030333020333233203233323439>] TJ -ET - - -BT -359.28 673.197 Td -/F2.0 9 Tf -<452d4d61696c3a20666f6f64736f667440666f6f64636f6f702e74657374> Tj -ET - - -BT -359.28 658.576 Td -/F2.0 9 Tf -<5374657565726e756d6d65723a20313636323736353133> Tj -ET - - -BT -36.0 749.214 Td -/F2.0 12 Tf -<526563686e756e6773656d70668a6e6765722a696e> Tj -ET - - -BT -36.0 731.681 Td -/F2.0 9 Tf -[<42657374656c6c67727570706520416c6963652057> 9.76562 <47>] TJ -ET - - -BT -359.28 619.214 Td -/F2.0 12 Tf -<526563686e756e6773646174756d3a2032392e30392e32303233> Tj -ET - - -BT -359.28 601.386 Td -/F2.0 12 Tf -<526563686e756e67736e756d6d65723a20323032333039323930303031> Tj -ET - - -BT -36.0 573.558 Td -/F2.0 12 Tf -<5a61686c756e67736172743a20477574686162656e> Tj -ET - - -BT -36.0 545.73 Td -/F2.0 12 Tf -<469f72206469652042657374656c6c756e672066616c6c656e20666f6c67656e646520506f7374656e20616e3a> Tj -ET - -/DeviceRGB cs -0.8 0.8 0.8 scn -57.64 484.322 80.0 52.76 re -f -0.0 0.0 0.0 scn -0.8 0.8 0.8 scn -137.64 484.322 80.0 52.76 re -f -0.0 0.0 0.0 scn -0.8 0.8 0.8 scn -217.64 484.322 80.0 52.76 re -f -0.0 0.0 0.0 scn -0.8 0.8 0.8 scn -297.64 484.322 80.0 52.76 re -f -0.0 0.0 0.0 scn -0.8 0.8 0.8 scn -377.64 484.322 80.0 52.76 re -f -0.0 0.0 0.0 scn -0.8 0.8 0.8 scn -457.64 484.322 80.0 52.76 re -f -0.0 0.0 0.0 scn -1 w -/DeviceRGB CS -0.4 0.4 0.4 SCN -57.64 537.082 m -137.64 537.082 l -S -[] 0 d -2 w -0.4 0.4 0.4 SCN -57.64 484.322 m -137.64 484.322 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -57.64 537.582 m -57.64 483.322 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -137.64 537.582 m -137.64 483.322 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -62.64 524.138 Td -/F3.0 8 Tf -<4e616d65> Tj -ET - -1 w -0.4 0.4 0.4 SCN -137.64 537.082 m -217.64 537.082 l -S -[] 0 d -2 w -0.4 0.4 0.4 SCN -137.64 484.322 m -217.64 484.322 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -137.64 537.582 m -137.64 483.322 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -217.64 537.582 m -217.64 483.322 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -186.448 524.138 Td -/F3.0 8 Tf -<416e7a61686c> Tj -ET - -1 w -0.4 0.4 0.4 SCN -217.64 537.082 m -297.64 537.082 l -S -[] 0 d -2 w -0.4 0.4 0.4 SCN -217.64 484.322 m -297.64 484.322 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -217.64 537.582 m -217.64 483.322 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -297.64 537.582 m -297.64 483.322 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -250.74416 524.138 Td -/F3.0 8 Tf -[<45696e7a656c7072> 20.01953 <656973>] TJ -ET - - -BT -266.36 515.586 Td -/F3.0 8 Tf -<286e6574746f29> Tj -ET - -1 w -0.4 0.4 0.4 SCN -297.64 537.082 m -377.64 537.082 l -S -[] 0 d -2 w -0.4 0.4 0.4 SCN -297.64 484.322 m -377.64 484.322 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -297.64 537.582 m -297.64 483.322 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -377.64 537.582 m -377.64 483.322 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -346.62416 524.138 Td -/F3.0 8 Tf -[<417274696b> 20.01953 <656c>] TJ -ET - - -BT -323.33616 515.586 Td -/F3.0 8 Tf -[<476573616d747072> 20.01953 <656973>] TJ -ET - - -BT -346.36 507.034 Td -/F3.0 8 Tf -<286e6574746f29> Tj -ET - -1 w -0.4 0.4 0.4 SCN -377.64 537.082 m -457.64 537.082 l -S -[] 0 d -2 w -0.4 0.4 0.4 SCN -377.64 484.322 m -457.64 484.322 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -377.64 537.582 m -377.64 483.322 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -457.64 537.582 m -457.64 483.322 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -429.112 524.138 Td -/F3.0 8 Tf -<4d7753742e> Tj -ET - -1 w -0.4 0.4 0.4 SCN -457.64 537.082 m -537.64 537.082 l -S -[] 0 d -2 w -0.4 0.4 0.4 SCN -457.64 484.322 m -537.64 484.322 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -457.64 537.582 m -457.64 483.322 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -537.64 537.582 m -537.64 483.322 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -506.62416 524.138 Td -/F3.0 8 Tf -[<417274696b> 20.01953 <656c>] TJ -ET - - -BT -483.33616 515.586 Td -/F3.0 8 Tf -[<476573616d747072> 20.01953 <656973>] TJ -ET - - -BT -482.944 507.034 Td -/F3.0 8 Tf -<2862727574746f2920696e6b6c2e> Tj -ET - - -BT -469.75812 498.482 Td -/F3.0 8 Tf -[<466f6f64636f6f706d6172> 9.76562 <6765>] TJ -ET - - -BT -521.88 489.93 Td -/F3.0 8 Tf -<3325> Tj -ET - -1 w -0.4 0.4 0.4 SCN -57.64 484.322 m -137.64 484.322 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -57.64 465.77 m -137.64 465.77 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -57.64 484.822 m -57.64 465.27 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -137.64 484.822 m -137.64 465.27 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -62.64 471.378 Td -/F2.0 8 Tf -<52656973> Tj -ET - -1 w -0.4 0.4 0.4 SCN -137.64 484.322 m -217.64 484.322 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -137.64 465.77 m -217.64 465.77 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -137.64 484.822 m -137.64 465.27 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -217.64 484.822 m -217.64 465.27 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -204.504 471.378 Td -/F2.0 8 Tf -<3130> Tj -ET - -1 w -0.4 0.4 0.4 SCN -217.64 484.322 m -297.64 484.322 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -217.64 465.77 m -297.64 465.77 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -217.64 484.822 m -217.64 465.27 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -297.64 484.822 m -297.64 465.27 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -271.192 471.378 Td -/F2.0 8 Tf -<332c323920> Tj -/F2.1 8 Tf -<21> Tj -ET - -1 w -0.4 0.4 0.4 SCN -297.64 484.322 m -377.64 484.322 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -297.64 465.77 m -377.64 465.77 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -297.64 484.822 m -297.64 465.27 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -377.64 484.822 m -377.64 465.27 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -346.624 471.378 Td -/F2.0 8 Tf -<33322c393020> Tj -/F2.1 8 Tf -<21> Tj -ET - -1 w -0.4 0.4 0.4 SCN -377.64 484.322 m -457.64 484.322 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -377.64 465.77 m -457.64 465.77 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -377.64 484.822 m -377.64 465.27 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -457.64 484.822 m -457.64 465.27 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -435.792 471.378 Td -/F2.0 8 Tf -<372e3025> Tj -ET - -1 w -0.4 0.4 0.4 SCN -457.64 484.322 m -537.64 484.322 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -457.64 465.77 m -537.64 465.77 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -457.64 484.822 m -457.64 465.27 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -537.64 484.822 m -537.64 465.27 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -506.624 471.378 Td -/F2.0 8 Tf -<33362c333020> Tj -/F2.1 8 Tf -<21> Tj -ET - -1 w -0.4 0.4 0.4 SCN -57.64 465.77 m -137.64 465.77 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -57.64 447.218 m -137.64 447.218 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -57.64 466.27 m -57.64 446.718 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -137.64 466.27 m -137.64 446.718 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -62.64 452.826 Td -/F2.0 8 Tf -<7a7a676c2e205066616e64> Tj -ET - -1 w -0.4 0.4 0.4 SCN -137.64 465.77 m -217.64 465.77 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -137.64 447.218 m -217.64 447.218 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -137.64 466.27 m -137.64 446.718 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -217.64 466.27 m -217.64 446.718 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -204.504 452.826 Td -/F2.0 8 Tf -<3130> Tj -ET - -1 w -0.4 0.4 0.4 SCN -217.64 465.77 m -297.64 465.77 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -217.64 447.218 m -297.64 447.218 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -217.64 466.27 m -217.64 446.718 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -297.64 466.27 m -297.64 446.718 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -271.192 452.826 Td -/F2.0 8 Tf -<302c313420> Tj -/F2.1 8 Tf -<21> Tj -ET - -1 w -0.4 0.4 0.4 SCN -297.64 465.77 m -377.64 465.77 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -297.64 447.218 m -377.64 447.218 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -297.64 466.27 m -297.64 446.718 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -377.64 466.27 m -377.64 446.718 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -351.192 452.826 Td -/F2.0 8 Tf -<312c343020> Tj -/F2.1 8 Tf -<21> Tj -ET - -1 w -0.4 0.4 0.4 SCN -377.64 465.77 m -457.64 465.77 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -377.64 447.218 m -457.64 447.218 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -377.64 466.27 m -377.64 446.718 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -457.64 466.27 m -457.64 446.718 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -435.792 452.826 Td -/F2.0 8 Tf -<372e3025> Tj -ET - -1 w -0.4 0.4 0.4 SCN -457.64 465.77 m -537.64 465.77 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -457.64 447.218 m -537.64 447.218 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -457.64 466.27 m -457.64 446.718 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -537.64 466.27 m -537.64 446.718 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -511.192 452.826 Td -/F2.0 8 Tf -<312c353020> Tj -/F2.1 8 Tf -<21> Tj -ET - -1 w -0.0 0.0 0.0 SCN -1 w -0.0 0.0 0.0 SCN -1 w -0.4 0.4 0.4 SCN -217.64 437.218 m -297.64 437.218 l -S -[] 0 d -2 w -0.4 0.4 0.4 SCN -217.64 418.666 m -297.64 418.666 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -217.64 437.718 m -217.64 417.666 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -297.64 437.718 m -297.64 417.666 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN -1 w -0.4 0.4 0.4 SCN -297.64 437.218 m -377.64 437.218 l -S -[] 0 d -2 w -0.4 0.4 0.4 SCN -297.64 418.666 m -377.64 418.666 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -297.64 437.718 m -297.64 417.666 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -377.64 437.718 m -377.64 417.666 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -352.648 424.274 Td -/F2.0 8 Tf -<4e6574746f> Tj -ET - -1 w -0.4 0.4 0.4 SCN -377.64 437.218 m -457.64 437.218 l -S -[] 0 d -2 w -0.4 0.4 0.4 SCN -377.64 418.666 m -457.64 418.666 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -377.64 437.718 m -377.64 417.666 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -457.64 437.718 m -457.64 417.666 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -433.0 424.274 Td -/F2.0 8 Tf -<4d775374> Tj -ET - -1 w -0.4 0.4 0.4 SCN -457.64 437.218 m -537.64 437.218 l -S -[] 0 d -2 w -0.4 0.4 0.4 SCN -457.64 418.666 m -537.64 418.666 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -457.64 437.718 m -457.64 417.666 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -537.64 437.718 m -537.64 417.666 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -509.816 424.274 Td -/F2.0 8 Tf -<42727574746f> Tj -ET - -1 w -0.0 0.0 0.0 SCN -1 w -0.0 0.0 0.0 SCN -1 w -0.4 0.4 0.4 SCN -217.64 418.666 m -297.64 418.666 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -217.64 400.114 m -297.64 400.114 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -217.64 419.166 m -217.64 399.614 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -297.64 419.166 m -297.64 399.614 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -232.00816 405.722 Td -/F2.0 8 Tf -[<5072> 20.01953 <6f64756b7465206d6974203725>] TJ -ET - -1 w -0.4 0.4 0.4 SCN -297.64 418.666 m -377.64 418.666 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -297.64 400.114 m -377.64 400.114 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -297.64 419.166 m -297.64 399.614 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -377.64 419.166 m -377.64 399.614 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -346.624 405.722 Td -/F2.0 8 Tf -<33322c393020> Tj -/F2.1 8 Tf -<21> Tj -ET - -1 w -0.4 0.4 0.4 SCN -377.64 418.666 m -457.64 418.666 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -377.64 400.114 m -457.64 400.114 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -377.64 419.166 m -377.64 399.614 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -457.64 419.166 m -457.64 399.614 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -431.192 405.722 Td -/F2.0 8 Tf -<332c343020> Tj -/F2.1 8 Tf -<21> Tj -ET - -1 w -0.4 0.4 0.4 SCN -457.64 418.666 m -537.64 418.666 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -457.64 400.114 m -537.64 400.114 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -457.64 419.166 m -457.64 399.614 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -537.64 419.166 m -537.64 399.614 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -506.624 405.722 Td -/F2.0 8 Tf -<33362c333020> Tj -/F2.1 8 Tf -<21> Tj -ET - -1 w -0.0 0.0 0.0 SCN -1 w -0.0 0.0 0.0 SCN -1 w -0.4 0.4 0.4 SCN -217.64 400.114 m -297.64 400.114 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -217.64 381.562 m -297.64 381.562 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -217.64 400.614 m -217.64 381.062 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -297.64 400.614 m -297.64 381.062 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -244.296 387.17 Td -/F2.0 8 Tf -<5066616e64206d6974203725> Tj -ET - -1 w -0.4 0.4 0.4 SCN -297.64 400.114 m -377.64 400.114 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -297.64 381.562 m -377.64 381.562 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -297.64 400.614 m -297.64 381.062 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -377.64 400.614 m -377.64 381.062 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -351.192 387.17 Td -/F2.0 8 Tf -<312c343020> Tj -/F2.1 8 Tf -<21> Tj -ET - -1 w -0.4 0.4 0.4 SCN -377.64 400.114 m -457.64 400.114 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -377.64 381.562 m -457.64 381.562 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -377.64 400.614 m -377.64 381.062 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -457.64 400.614 m -457.64 381.062 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -431.192 387.17 Td -/F2.0 8 Tf -<302c313020> Tj -/F2.1 8 Tf -<21> Tj -ET - -1 w -0.4 0.4 0.4 SCN -457.64 400.114 m -537.64 400.114 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -457.64 381.562 m -537.64 381.562 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -457.64 400.614 m -457.64 381.062 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -537.64 400.614 m -537.64 381.062 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -511.192 387.17 Td -/F2.0 8 Tf -<312c353020> Tj -/F2.1 8 Tf -<21> Tj -ET - -1 w -0.0 0.0 0.0 SCN -1 w -0.0 0.0 0.0 SCN -1 w -0.4 0.4 0.4 SCN -217.64 381.562 m -297.64 381.562 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -217.64 363.01 m -297.64 363.01 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -217.64 382.062 m -217.64 362.51 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -297.64 382.062 m -297.64 362.51 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -227.44016 368.618 Td -/F2.0 8 Tf -[<5072> 20.01953 <6f64756b7465206d697420313925>] TJ -ET - -1 w -0.4 0.4 0.4 SCN -297.64 381.562 m -377.64 381.562 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -297.64 363.01 m -377.64 363.01 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -297.64 382.062 m -297.64 362.51 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -377.64 382.062 m -377.64 362.51 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -351.192 368.618 Td -/F2.0 8 Tf -<302c303020> Tj -/F2.1 8 Tf -<21> Tj -ET - -1 w -0.4 0.4 0.4 SCN -377.64 381.562 m -457.64 381.562 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -377.64 363.01 m -457.64 363.01 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -377.64 382.062 m -377.64 362.51 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -457.64 382.062 m -457.64 362.51 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -431.192 368.618 Td -/F2.0 8 Tf -<302c303020> Tj -/F2.1 8 Tf -<21> Tj -ET - -1 w -0.4 0.4 0.4 SCN -457.64 381.562 m -537.64 381.562 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -457.64 363.01 m -537.64 363.01 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -457.64 382.062 m -457.64 362.51 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -537.64 382.062 m -537.64 362.51 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -511.192 368.618 Td -/F2.0 8 Tf -<302c303020> Tj -/F2.1 8 Tf -<21> Tj -ET - -1 w -0.0 0.0 0.0 SCN -1 w -0.0 0.0 0.0 SCN -1 w -0.4 0.4 0.4 SCN -217.64 363.01 m -297.64 363.01 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -217.64 344.458 m -297.64 344.458 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -217.64 363.51 m -217.64 343.958 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -297.64 363.51 m -297.64 343.958 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -239.728 350.066 Td -/F2.0 8 Tf -<5066616e64206d697420313925> Tj -ET - -1 w -0.4 0.4 0.4 SCN -297.64 363.01 m -377.64 363.01 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -297.64 344.458 m -377.64 344.458 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -297.64 363.51 m -297.64 343.958 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -377.64 363.51 m -377.64 343.958 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -351.192 350.066 Td -/F2.0 8 Tf -<302c303020> Tj -/F2.1 8 Tf -<21> Tj -ET - -1 w -0.4 0.4 0.4 SCN -377.64 363.01 m -457.64 363.01 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -377.64 344.458 m -457.64 344.458 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -377.64 363.51 m -377.64 343.958 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -457.64 363.51 m -457.64 343.958 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -431.192 350.066 Td -/F2.0 8 Tf -<302c303020> Tj -/F2.1 8 Tf -<21> Tj -ET - -1 w -0.4 0.4 0.4 SCN -457.64 363.01 m -537.64 363.01 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -457.64 344.458 m -537.64 344.458 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -457.64 363.51 m -457.64 343.958 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -537.64 363.51 m -537.64 343.958 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -511.192 350.066 Td -/F2.0 8 Tf -<302c303020> Tj -/F2.1 8 Tf -<21> Tj -ET - -1 w -0.0 0.0 0.0 SCN -1 w -0.0 0.0 0.0 SCN -1 w -0.4 0.4 0.4 SCN -217.64 344.458 m -297.64 344.458 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -217.64 323.768 m -297.64 323.768 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -217.64 344.958 m -217.64 323.268 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -297.64 344.958 m -297.64 323.268 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN -1 w -0.4 0.4 0.4 SCN -297.64 344.458 m -377.64 344.458 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -297.64 323.768 m -377.64 323.768 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -297.64 344.958 m -297.64 323.268 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -377.64 344.958 m -377.64 323.268 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN -1 w -0.4 0.4 0.4 SCN -377.64 344.458 m -457.64 344.458 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -377.64 323.768 m -457.64 323.768 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -377.64 344.958 m -377.64 323.268 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -457.64 344.958 m -457.64 323.268 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -415.34 329.984 Td -/F3.0 10 Tf -<476573616d74> Tj -ET - -1 w -0.4 0.4 0.4 SCN -457.64 344.458 m -537.64 344.458 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -457.64 323.768 m -537.64 323.768 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -457.64 344.958 m -457.64 323.268 l -S -[] 0 d -1 w -0.4 0.4 0.4 SCN -537.64 344.958 m -537.64 323.268 l -S -[] 0 d -1 w -0.0 0.0 0.0 SCN - -BT -499.65 329.984 Td -/F3.0 10 Tf -<33372c383020> Tj -/F3.1 10 Tf -<21> Tj -ET - -q -/DeviceRGB cs -0.0 0.0 0.0 scn -/DeviceRGB CS -0.0 0.0 0.0 SCN -1 w -0 J -0 j -[] 0 d - -BT -127.62212 793.65 Td -/F2.0 16 Tf -[<526563686e756e6720669f72206469652042657374656c6c756e6720626569204e61747572> 9.76562 <67757420539f64>] TJ -ET - - -BT -36.0 21.92 Td -/F2.0 8 Tf -<4469656e737461672c2031302e204f6b746f62657220323032332c2032313a303920556872> Tj -ET - - -BT -511.992 21.92 Td -/F2.0 8 Tf -<5365697465203120766f6e2031> Tj -ET - -Q -Q - -endstream -endobj -7 0 obj -<< /Type /Page -/Parent 3 0 R -/MediaBox [0 0 595.28 841.89] -/CropBox [0 0 595.28 841.89] -/BleedBox [0 0 595.28 841.89] -/TrimBox [0 0 595.28 841.89] -/ArtBox [0 0 595.28 841.89] -/Contents 6 0 R -/Resources << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI] -/Font << /F2.0 8 0 R -/F3.0 9 0 R -/F2.1 10 0 R -/F3.1 11 0 R ->> ->> ->> -endobj -8 0 obj -<< /Type /Font -/BaseFont /82b789+OpenSans -/Subtype /TrueType -/FontDescriptor 13 0 R -/FirstChar 32 -/LastChar 255 -/Widths 15 0 R -/ToUnicode 14 0 R ->> -endobj -9 0 obj -<< /Type /Font -/BaseFont /c51699+OpenSans-Bold -/Subtype /TrueType -/FontDescriptor 17 0 R -/FirstChar 32 -/LastChar 255 -/Widths 19 0 R -/ToUnicode 18 0 R ->> -endobj -10 0 obj -<< /Type /Font -/BaseFont /1166e8+OpenSans -/Subtype /TrueType -/FontDescriptor 21 0 R -/FirstChar 32 -/LastChar 255 -/Widths 23 0 R -/ToUnicode 22 0 R ->> -endobj -11 0 obj -<< /Type /Font -/BaseFont /584bf0+OpenSans-Bold -/Subtype /TrueType -/FontDescriptor 25 0 R -/FirstChar 32 -/LastChar 255 -/Widths 27 0 R -/ToUnicode 26 0 R ->> -endobj -12 0 obj -<< /Length1 12932 -/Length 8734 -/Filter [/FlateDecode] ->> -stream -x; \T}};\\b4Q1 -*,̥g*O-Spye^͞ep΀h}߻{,}9a@4j-+*@Ro0,)[Яi7 o\*5DÔ=iws61!D!\k3! [ƹ yk!4u_ zSL?mth#.C{AS_пfJ u=݌P-e $tբe$ - g2> ǡew-4"3둓ٌÚY(@FleVE0H -Pz(H4@`̛ ,te!},/fBVrɊViİZS:ÜQDd\E7FcFSP'-}LB`-cCq?-Y嫬(/>tS&L;nqc23Ƥ$'%&ď!E¬&AӨUϱ Ma/pu^v|' ż܄<): <PIX-bxakfz33Q8+qմJhߑ+WJ{fb:.P"Ԋyy@#֨s:uBG$4N8|WI%Ӫ*3Cv;mJgp0JI`b>4I; pJ wx;l #0Z̫ #6e9Ƒ.St\+!a1VDC`@)T@DaJNIb[ZIx#Q"ʯ  `xCȏsn@v .;l.6d. - bLSġ%\Zqn8sXTT!UWfC)!Bۤn k˪*@זW0S==*4(EH:"鐝CGP;xZ2 -@H 0jSA1(FA[s xf3 -LWzʫt4q-ag7*38c)\[quEUZ˔o@4\`.alH+yb-1[|>l8@Mu@ I4 <;v WKXJ8줳єJPqdET!] ّESJb&xJQ1i -gDE?g8?Uct46c4]e><= -Va† -Pa0L5PQ`7P -AMh9z }#+Ňeqq%~Hҙ6.#iUnmUTͬxowI%Բʀ+ BmG|qqZ7Ra~ȁց Sw[oXe齫+yu>OwUT\֣mB;ѫ ԏ]o8:L .e|bk Up7x#VapV5JUQ&GR]6V;_{\.OZ>M___`C~^i#!f)JJM$O'%22~.=TO-[R\ϜG}E.}N76kP -@FVm5<::q:ȥzh]T>)\rX;(lsI>fRV'd9I1icuLJ2H;qx0vD5qUnoꉒmp~TO^Of?Ft Tjtr -6΂1 <0lv2D%GSK=N֖wljX@IZKVnu;Aa^ y:=է82"CM Yc'N˙M?s/2 [Q^i9ąl%>OJ|t8l‚[fMfO+&$|/Omyݝ{Qȫ[q|E~F+055\-yp"vd -.ɔqH^yP߶1j%oqc-,;ya 3ÜFu>[[.W: -Z(?2(86+͙oPm˗^޷7mY־nE{X/|B 0  -F'<:nhawK|,yħ"eP@.@C33v5Yu疇_zkuWcy՗޼p Rr#)<777L{DHo{ aF㽑fVEQF4K[5}*o6^o5 -kB҈\=!;WfT\h┚/j^zG][6WmnÖM{/|W͝ū':yr(k,(hj ԬOS}]lĎտīȍ&zhG#w^OYaGٺ;Q9}+i4 Svÿ^ ;p=wxE~Á9DoJdj!H3 dw-S}z`r&iJ^E<4[T --Q:ʆ|-%яNF[wbXf&3A0iJAx(ԜN=O0!A۬S#h;ʰq ,p2f bD+wXF=g۾s煯ru9Q< 'wMoAS]f}aŪԻ/vSWrƭG}ɧ3VMxfsOȏ{dY5> Չey#)F,Vhg=UӰz=҈1B %WRLRv` ꞾIl%Gg$_ry˪[q$1y=X1&Bm׫^T0Š}Ë}z3r`GӺD+\W[%):wAQl^?].v_pJ<},ߧs~scmYdeezJO;̨gf4ru#π#<>|w/d=#DYx-n.r=[ Qlau>f>_WhhH&{KM||W~:!SmJG]+ї!]πjHj 3Z*q(GX]ߍ[=C'L{ZYL*5L5 2#0Hpky߅?4N9 V!NEXT2Z~?gLUzT\x7p5}Ay!\/Ozw8wm,,w ^k?7<1c[|^~G~My&,J66dx=pȺAޱdt1Ltl0§|V 5{,r1 ]7 (kSA  & yIB hc ~#8!Pz~w>:;. vL4q췪" E>vV1y Lc'199Tuns-6m^@* -;Evzvz^ڻ6J&Ne+/<̨5,UQӗRy^ -{#W3w g*SEC^w 7 4a>஁PJIfryrux=)YOw狏5;h=x]ysGYۻv|ck,;Y!F!Zp ZK.& ّ51r{²8$%b%gcl.G۷wJK:ծm;vlTͩO;Ds ̍QAE98PfDf~mj;d*^\#ꇩ%x2Vڽ΅VZlю;5 X 3H7q&e,U*H[}ţH-qo'#.)L zsKt<ӹFk=][ٹ8)..9t'x+Ddc38oTڡiN&㬊W jh~ fsكh8@o˿?}ӧc~r׽ڥ&lQ*)a3/?ۿ}_"sQ -5vUPgu] ų> o7(+͜c3<F!'_|y쿡=:wVv'z%'໤Q: -ȟGV&$2D{]\x[5M` KFr' 7}¸:Z5Kb |ݠÒL~'x{6RqF^@FȈ p $LO+z޾-6˛W1gɦmΜ\Ģ[V}cLaCBfEBܶM=ORe4}|Uw笗e}y /t+)q1܎z_:CÞm5s;F/(&/)!`<`f쨱cGf2xtV̌ +21^QVk4ǰc2Cf756@x";ƬkX=s<~A-۳GR&%rBz[ ᬽ'2Z M#Wa)p30B9lT {%dH*DplpF.*h1@fSЫ-0Dϵ(vD7c@Cy=wu6/ws< -)G=BG%Ͽ Sڧ Z Y kE)0d%&cUmZc4 g0WۋcM^KZSlEav aj;#m*Ht7lK[?k/džާ>о}yrv`H qk7wI @^P?HԈbVJVSp1چ+ܜ=TVv(jOXGn:Y ; UzIz4-fd"rn4Uر2ǺPu8nGgQeޙeU,(5L/hHeAPVFe0b^G>>a* g!y*2<6rζ)s0gC]:Y:~΄RJW\3x,oiplZEmku:`5(b TLX6  Ogs]DK'¾,oRˇNq u*320jX6('kV -lnRi\ .47O/J݆xU匈t:8)00ʀ:iz'fbSP+(J&%MyAb>yLHOP;ÙF.-z"j[}6} *XӍ@կ+kB߯Ϩ}Pre`EϞb/E1 M5ŠtU"3(A|f O2y'=:CEX6%lML%X7E2&ck'a4gRZxO"*2Yp9>{ .[:Ļv|_nMk~KaWvL)?yYU.Of.DtVO׳g7^-fd M3?5`Z3BmDžzȯeZPNjSHO9Bmܡ6s6¨PG{FIe7Zt#)AP[ʙ܆ m 7Պ6XԼan}OLMNINxi:1д0qjsB̿uz5u kZqpHްVLINͨkibJbJrf̬82F,khb[2_l3@a_*ή[6յ Ś6?<絷46[iBx}[[ؤ%K$C50XԘ-mkm8Hok\0vG[}8_H8mjbнYM-sg&M.ɻ,/f\؀ աZ$퇾Z5 Ls)jQfTDNpwBZ`GD9nۯ߄D4`uQV0:X0w"@j*v]LIY3=ZCɼDeoנ| FkBs~ţ_RTf-lڢCvkSڠ`Q D0~D3umkU"ٹ07(DeFd: ChyDRa? ^C,Zߥ^ -satU{d2)LDh(E5A5T&dl~8Q9F1h$FÉ8G*@L y\C*BQ t=c)P*P%*?@Jm$07Y0kl -endstream -endobj -13 0 obj -<< /Type /FontDescriptor -/FontName /82b789+OpenSans -/FontFile2 12 0 R -/FontBBox [-549 -270 1204 1047] -/Flags 4 -/StemV 0 -/ItalicAngle 0 -/Ascent 765 -/Descent -240 -/CapHeight 1462 -/XHeight 1096 ->> -endobj -14 0 obj -<< /Length 1278 -/Filter [/FlateDecode] ->> -stream -xenFὮBtHs&@nu{stԒ + }ik/y_!}t~]snVyg쾝+|<.÷}v)[eO/_q9_ɯ}ഏOmt_LLv͵LJ1w9)e6=n?[i(JKiU:JSz2QeL*EJ̔Ye,*+eU(NU-уk5x5F^ky ^#k5x5F^ky ^#kxZV^kZy-^+kxZV^kZy-^+uxu:N^:y^'uxu:N^:y^'xz^^zy=^/xz^^zy=^/o xo7 Aހ7y o xo7 Aހ7y oxo7jo$JI$$*I$ITH$$QI"IDD%$JI$$*I$ITD$$III$$u>M&Iބ7ɛ&y$o›Mx o7M&Iބ7ɛ&yUoa[5joSor4ۂsޮ>,x/x;Â31x; -JJ특xxx+!ÊwBxbx+ށr;2kΜJYeY7+|x oS7+[ƛețךyޢoV浖 -㭌"RW*4XqC^J[(^1»y]k}YM-x e#e_y+h܊7k:/Z5dUluz5n[eB&Si|y(%q& %+S%*ABijPU6\h,(+L,4G5sh>:OVRP*#i|e0U,*oU/*[U,Nmlx:&\}M)L2\%CHF7էʻBL)jƻJ1:%H߯:=S۳zrmkO媳7 -endstream -endobj -15 0 obj -[259 600 600 600 600 823 600 600 600 600 551 600 245 321 266 600 571 571 571 571 571 571 571 571 600 571 266 600 600 600 600 600 898 632 647 630 729 556 516 728 600 600 600 600 600 902 753 778 602 600 618 548 553 728 600 925 600 600 570 600 600 600 600 600 600 556 612 476 612 561 338 547 613 252 600 524 252 930 613 604 612 600 408 477 353 613 500 777 600 600 467 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 556 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 613 600 600 600 600 600 600 600 622 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600] -endobj -16 0 obj -<< /Length1 10220 -/Length 6785 -/Filter [/FlateDecode] ->> -stream -x:{|Tՙ<3w&!wr 1If0dH2IHAp&`!3$ 5VeՉR _-Xu?ծZky*Νo;sw|dF8PM:h&xVy׎ PC?q2O hmW."Ek1: s'Θ1/+r~GcRM G6ilA'>Gk1>GQ1tY ډZIInb(FA 15}XՋKmm[VcTv |+%׍NqvLFPh"joʏB#6E,{B14cm'=ɞ]ض-8cFhpl|-xzbI\t Q"H4'X7( f͝~CLJ#bu FX!B' z@@Eae0NX,0Y.0X_b̘GYY}mAeJbZR]01+ (q%&oM9PB`#!{%9*ABV L#b]:1t! qQf{NőB_ 6I-B;9&;p)茓gUbr!(B@Z[(XU vh#+5q} Q^u}G@ -WA>b1P' A -|^A;VŠBR7ڈz$'aו״( Ԅ\НlejsSڳ뺗& 6AK $_C7J #Ac&&~-9 iidBj .RFCJxP#n\YUijR»Z&xW[G}⮕g)LUwU&/xL FRK! - 2y̏и(=S%quOQqgVab=hp8n\)$"*kXʯ(=,`^-_s:Iժگn>C0My*r8zذq;B]!l/ai1IZ pFVŴRW|e<.mcx BRw9!' -A>,ߧvՋ"3LFs-cŲHHDheg2xf&eM3"MVaY`: t% Ms־SKK4泶]ڟ11PE}}݉A F@x܆Y<\ٖ8n^ûbmoqbcupؽU7ƼmjE'm*42_rtP5ۡf; -1(U m͜#OB0zcWߪxM>DCog103QsyJv/'w/C*jjV][npF u_,ES*5CCz|F0"*8ԖK I[9suYeϲ,ZSSs zļ4w;h=oQgJL~5),@q|)c-.\^[6:Mޮ.oO=qtގ sK۶s=z>#}"tG?E xޠ͢iTYi j :L>ZLvM~wžGb0O\.?v"oʑ$e ār -pȺ2(^*3P9>|w;|`%BZR^xh -Wgb\)_E(b}4<'E-]Ւ;mIvY93f>o -88ʐڌ*E%e>ͪ(|cU5+Y*غbuT9"I oq&Ñyڰ"D5W DF",Yˌ _/O303[6v7wRw;`ٳ C{2z਩sg)v9s`=phxV4D8#9*Mot -B -V**cr`\9F-I -9e./>=aR0s2DiT:j`O2Q!j8k>M;j?_mP{8!%KERKRE|ͧ^׏? IY%enwiImI*3grV^FZTÿb|ā=|aǾ1;2η}ExYt{dž _>k?~aő t򋫺[ǪR,2Ќ aw/zTwQzZj4"Q QBz=eiD !U'l A R]S =͔>^joiy_x|}R Յ{Gָ  -b],h0qꦐ8LQlS)Ms;@>05q3ԕt9l,QY~Iw&2pU<Mkw0s㘻k3tY,;slD<ϙpP)z=E*3E -M!4nj/o6I+6.#I"dyHQcʍ.}fߔ$?=xgO |.f-w|,\,HUh6ĵD)N)#WOˊlʱdAX*cIY´$W!{wiZlG/?t^jcqY S5P#rz=BF8^||+RT$AR=-6}"NjovU~gt30?oNv;*/9o X B:n>)dgh </X0 IϝSHAd#,fl]~__o__t{ml}!nO}bUeyՋk*G9(rV\Ѱ$U M̘R]4&JGef:Y*Km tb Y*ͨ 6dU8WTA2GrS9ِf<k ݤZ;OT~|p?+>FgL)awmA#PaPiڥ)vV+֪8ͫ q6d !apFr(PuWf=ƚ̦tʩ>!c\mKmbFWg_Y}]GO<ƚs ~Yvc 2dd8X1`n"CR/4>hG/\>f ΥgOS|̦ٓ~~&ZmJ -QhQ8E?4d'dRP>vb(as@&!+HQ'5vMcu-؋ ،}<'rRpȉjmbT1ݤѤ9&iB!xkm]dRԸ0vJyR - SpKy|3zdmQm6m -տbمs rȞdEeȏ5ofF* 3Lռn%i<=?_RP\!vW6܂!dq&ۮD+*e)y\X+T99$J%wH&چ`υy29[00+7 j>xnAGNlV~?gy|_tWeߞ>4+F2SY߱hlvCVTG{ASj1I \9נٍ{JR$eggp1 ~5jgO<8S_`K~xeZ4֠RT0gp(yBlk;&=T5])h_bx^Ee^Ri4-"XUJ -ie|=pW^Y>.+ kyu;>gn7A&9BIÐh -XBn٬T-iiNg^hzQdl]n4*;w0wyiN|v_Yeb%iel|\c!g3?yY~喡Aj-OܳWtR@n *;lV=k$Q>tlqZI|=7/Rhi{ pբTrt:'2u!`BxT]O!,Rm& mH{.ރc^TO~'/"b؄/)C9R!W3Ph 3 h -u"UމWyeʸ|# =G%ჽBqtrU!A|_Oww~zԲ~|p9 zV+ћAReIe.5V$<3^;}ehaq=t - %̈Zw;t9{S#U3T(PNF:K.CnO ZSm_)V)S&(96J8|~ [jl`Ǝ_fަ{BxeAYWVAl[z9&Cw3FA9u^'tnzrLɶ*|kZ| U> rh!hU)ye( T!jJQ@2O)vETJVQ#OM:{g?PV~oP)Ġo h۵ /mNḥV X.02&` -()ӨK J6%`9 G' --&`-Nס5 X0lNA+pM_OhhDGbЖᾞQI[T\T|npgcT mၑ%#сHtX,g"Y\Tt-~UtxŅEݥeyd/ WGaqt87„"bx6*G{FFð;:<ᾑH_7wpV9Zl޼0~7e( 2 -{G76?퍊KJ%{ VFx6GxV -`${("H; 0@h -hX X= b P1lqVTV. -?F XaN-[sF 8L$*oǯR$d!3 -Y_7Oy-*+ 2{m ZEexUQ*:Su+x{=fXgF@ίj5L4 -؅ʧݝ[@0:o:*hƵ\4)*+l:Faqֵs]o=/p(r_U9&@ş ofցr+]yP  ̓SqZ'( -@C5hͨr|j܂ݪff%o -endstream -endobj -17 0 obj -<< /Type /FontDescriptor -/FontName /c51699+OpenSans-Bold -/FontFile2 16 0 R -/FontBBox [-619 -292 1318 1068] -/Flags 4 -/StemV 0 -/ItalicAngle 0 -/Ascent 765 -/Descent -240 -/CapHeight 1462 -/XHeight 1118 ->> -endobj -18 0 obj -<< /Length 1278 -/Filter [/FlateDecode] ->> -stream -xenFὮBtHs&@nu{stԒ + }ik/y_!}t~]snVyg쾝+|<.÷}v)[eO/_q9_ɯ}ഏOmt_LLv͵LJ1w9)e6=n?[i(JKiU:JSz2QeL*EJ̔Ye,*+eU(NU-уk5x5F^ky ^#k5x5F^ky ^#kxZV^kZy-^+kxZV^kZy-^+uxu:N^:y^'uxu:N^:y^'xz^^zy=^/xz^^zy=^/o xo7 Aހ7y o xo7 Aހ7y oxo7jo$JI$$*I$ITH$$QI"IDD%$JI$$*I$ITD$$III$$u>M&Iބ7ɛ&y$o›Mx o7M&Iބ7ɛ&yUoa[5joSor4ۂsޮ>,x/x;Â31x; -JJ특xxx+!ÊwBxbx+ށr;2kΜJYeY7+|x oS7+[ƛețךyޢoV浖 -㭌"RW*4XqC^J[(^1»y]k}YM-x e#e_y+h܊7k:/Z5dUluz5n[eB&Si|y(%q& %+S%*ABijPU6\h,(+L,4G5sh>:OVRP*#i|e0U,*oU/*[U,Nmlx:&\}M)L2\%CHF7էʻBL)jƻJ1:%H߯:=S۳zrmkO媳7 -endstream -endobj -19 0 obj -[259 600 600 600 600 900 600 600 338 338 600 600 290 600 285 600 570 600 600 570 600 600 600 570 570 600 600 600 600 600 600 600 600 689 600 600 600 560 548 724 600 600 600 600 600 942 812 600 600 600 600 550 600 600 600 600 600 600 600 600 600 600 600 600 600 604 632 514 632 590 600 564 657 305 600 620 305 981 657 619 632 600 454 497 434 657 600 855 600 600 487 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600] -endobj -20 0 obj -<< /Length1 5032 -/Length 2934 -/Filter [/FlateDecode] ->> -stream -xkl[;<ݚǽMNeyM⸻nYĆ$6Ҋm4Dp(&qMQI~Po&6M -! &4-eH۱9ws@ B.E )?t<{I O,(9 B+Ӕ8[棶֐(/|`|mN)$ -sgWVꓨo:$% ys +C|WzHe #vلx Y| #9P|q,J? Ѐ7rB1\> ,[[ԩnzmx< Ԙ0XPmDk@jC=ӥ/0N ļ'MJ'@FM3w31`|l:AAWwE -Nc~h$<ݘ*Ђ r Uk^GOљcG'!o|px==:wI;[bnl1 z(*TZG)$)cn4WBUt]'IJTAB~C_oJ BꍠD)KA)F՛>a]Gq:QGŢ!ulc\WZw7kCH#daOpYSs3 )IurJNg=6JA΂7:r',p&OJI~Y-RqRJAum8-CY Oo rIT}EO#vQ OPɴd>.F$:RZR aaRFk7Vȓ1O1m#ayꔬ -#4 iݔ*6`Z09aaugQ*NU{]1U3Λ(,op6m8"T]xR -aWu V׃la$)Of$VRppӎM_B3NH -ŵٴ PLZ3"W {q2AWʩ-결BU45%GR!hVC`)*QX ʺB%99:$Y*۝?+Tfh{v^1^+3r8"Nʇ@ fNÌ$۫fUSʂ] tix{iǂ TVT&vؐ0Խ4 -jr ͨS`lÚh'0fwƜM5ǨabI`1 g`X.m,RfscY֒smؖda %Sqٷ&W&:v{|MK&))1f0qX Y,`Z³ZpK ]*l33#x$E.&̰DV~9)_teF~U B >+B|KSFeDP0Kӈ`suN3m$ք*RuXU9 iLU2V2o^&*Rw~ +˨5kd\W%Q_p%zu|Ph5,[_+!dh,]f6\HGp#^Rj4背>X݈%J/OU)ى[n^d+Cd9FtDcbAtG]ttD;}ۚ+0}>8}MQ=:j,6#DG|Q+1G->sl>nŵ\1 |GYdy<qk -"j&OdE팰?uR5=yJ.TK`xGX* I,;m0+\Ӆ⒋PtmmaIUۍn ZGv_oa=j5*X)}[T pޅix -. -\$fϰcLW#N4չ#^:s]pWs_Z7'w.x?ֶN0jvkl;ńs!ֈ[GΝ0iln5oA]&y粂OH{z{Nck;mmi'~o__K_?Nֿ wև:  V60;|6)>̣r,SChGA*v;W=|eܷlyxsȝf)x pCM~VVŅ[C.VyZ<猕 -_K -endstream -endobj -21 0 obj -<< /Type /FontDescriptor -/FontName /1166e8+OpenSans -/FontFile2 20 0 R -/FontBBox [-549 -270 1204 1047] -/Flags 4 -/StemV 0 -/ItalicAngle 0 -/Ascent 765 -/Descent -240 -/CapHeight 1462 -/XHeight 1096 ->> -endobj -22 0 obj -<< /Length 225 -/Filter [/FlateDecode] ->> -stream -x]Mn bD5B,="M9d0ԅ-?=ay_ -Jv>DG,ŒK[u,$ӱ\(%'[N.$;98}_&ӞW:58ЫofE ;P33_GFoalrecL\P{-0pfo 5bq,mݯ|#݉8R;CRSK+UpT -endstream -endobj -23 0 obj -[259 589 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600] -endobj -24 0 obj -<< /Length1 5120 -/Length 2949 -/Filter [/FlateDecode] ->> -stream -xX}lS?=q$$Xb; q vb$lj~1U?!uR?kXHӴjiӴi֩EV&;95]{|s=~>FX~iG{!t -X|N!6^MyڷPtvf$>`{u3wh?JjiM3(ۆ|gjp6Gdg3q :7H>Neɳ*t^KFULt8U;dWշ>+Q~qM6oo~$w1V7Q'])PB񇒹At*Isət*44/D:ͻVC\Tv=| -7~N w[u[PpY ꖳ>0;b5I֬z> -endobj -26 0 obj -<< /Length 225 -/Filter [/FlateDecode] ->> -stream -x]Mn bD5B,="M9d0ԅ-?=ay_ -Jv>DG,ŒK[u,$ӱ\(%'[N.$;98}_&ӞW:58ЫofE ;P33_GFoalrecL\P{-0pfo 5bq,mݯ|#݉8R;CRSK+UpT -endstream -endobj -27 0 obj -[259 570 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600] -endobj -xref -0 28 -0000000000 65535 f -0000000015 00000 n -0000000109 00000 n -0000000158 00000 n -0000000215 00000 n -0000000266 00000 n -0000000550 00000 n -0000017304 00000 n -0000017638 00000 n -0000017801 00000 n -0000017969 00000 n -0000018133 00000 n -0000018302 00000 n -0000027127 00000 n -0000027337 00000 n -0000028691 00000 n -0000029605 00000 n -0000036481 00000 n -0000036696 00000 n -0000038050 00000 n -0000038964 00000 n -0000041988 00000 n -0000042198 00000 n -0000042498 00000 n -0000043412 00000 n -0000046451 00000 n -0000046666 00000 n -0000046966 00000 n -trailer -<< /Size 28 -/Root 2 0 R -/Info 1 0 R ->> -startxref -47880 -%%EOF diff --git a/plugins/automatic_invoices/app/overrides/admin/ordergroups/_form/insert_customer_number.html.haml.deface b/plugins/automatic_invoices/app/overrides/admin/ordergroups/_form/insert_customer_number.html.haml.deface new file mode 100644 index 00000000..f266509b --- /dev/null +++ b/plugins/automatic_invoices/app/overrides/admin/ordergroups/_form/insert_customer_number.html.haml.deface @@ -0,0 +1,3 @@ +/ insert_after 'erb:contains(":contact_person")' +- if FoodsoftAutomaticInvoices.enabled? + = f.input :customer_number diff --git a/plugins/automatic_invoices/app/overrides/finance/balancing/_orders/insert_generate_invoice.html.haml.deface b/plugins/automatic_invoices/app/overrides/finance/balancing/_orders/insert_generate_invoice.html.haml.deface index 0b65c12f..f76b4b0a 100644 --- a/plugins/automatic_invoices/app/overrides/finance/balancing/_orders/insert_generate_invoice.html.haml.deface +++ b/plugins/automatic_invoices/app/overrides/finance/balancing/_orders/insert_generate_invoice.html.haml.deface @@ -1,3 +1,4 @@ / insert_after 'erb:contains(":updated_by")' -%th= heading_helper GroupOrderInvoice, :name -%th \ No newline at end of file +- if FoodsoftAutomaticInvoices.enabled? + %th= heading_helper GroupOrderInvoice, :name + %th \ No newline at end of file diff --git a/plugins/automatic_invoices/app/overrides/finance/balancing/_orders/insert_links.html.haml.deface b/plugins/automatic_invoices/app/overrides/finance/balancing/_orders/insert_links.html.haml.deface index ab72b0a8..a25ceb8b 100644 --- a/plugins/automatic_invoices/app/overrides/finance/balancing/_orders/insert_links.html.haml.deface +++ b/plugins/automatic_invoices/app/overrides/finance/balancing/_orders/insert_links.html.haml.deface @@ -1,9 +1,10 @@ / insert_after 'erb:contains("show_user(order.updated_by)")' -%td - - if order.closed? - -if FoodsoftConfig[:contact][:tax_number] && order.ordergroups.present? - = render :partial => 'group_order_invoices/links', locals:{order: order} - -else - = I18n.t('activerecord.attributes.group_order_invoice.tax_number_not_set') - - else - = t('orders.index.not_closed') +- if FoodsoftAutomaticInvoices.enabled? + %td + - if order.closed? + -if FoodsoftConfig[:contact][:tax_number] && order.ordergroups.present? + = render :partial => 'group_order_invoices/links', locals:{order: order} + -else + = I18n.t('activerecord.attributes.group_order_invoice.tax_number_not_set') + - else + = t('orders.index.not_closed') diff --git a/plugins/automatic_invoices/app/overrides/finance/balancing/_results/replace_contents_order_article.html.haml.deface b/plugins/automatic_invoices/app/overrides/finance/balancing/_results/replace_contents_order_article.html.haml.deface new file mode 100644 index 00000000..72c89b63 --- /dev/null +++ b/plugins/automatic_invoices/app/overrides/finance/balancing/_results/replace_contents_order_article.html.haml.deface @@ -0,0 +1,3 @@ +/ replace_contents "section#results" +- if FoodsoftAutomaticInvoices.enabled? + = render :partial => 'finance/balancing/edit_results_by_articles_override' \ No newline at end of file diff --git a/plugins/automatic_invoices/app/overrides/group_orders/edit/fix_hover.html.haml.deface b/plugins/automatic_invoices/app/overrides/group_orders/edit/fix_hover.html.haml.deface new file mode 100644 index 00000000..a867b3dc --- /dev/null +++ b/plugins/automatic_invoices/app/overrides/group_orders/edit/fix_hover.html.haml.deface @@ -0,0 +1,3 @@ +/ replace_contents "#group-order-form" +- if FoodsoftAutomaticInvoices.enabled? + = render "form_override" \ No newline at end of file diff --git a/plugins/automatic_invoices/app/overrides/group_orders/new/fix_hover.html.haml.deface b/plugins/automatic_invoices/app/overrides/group_orders/new/fix_hover.html.haml.deface new file mode 100644 index 00000000..a867b3dc --- /dev/null +++ b/plugins/automatic_invoices/app/overrides/group_orders/new/fix_hover.html.haml.deface @@ -0,0 +1,3 @@ +/ replace_contents "#group-order-form" +- if FoodsoftAutomaticInvoices.enabled? + = render "form_override" \ No newline at end of file diff --git a/plugins/automatic_invoices/app/overrides/models/order_article_override.rb b/plugins/automatic_invoices/app/overrides/models/order_article_override.rb index 0a5fbee7..bd6be1b6 100644 --- a/plugins/automatic_invoices/app/overrides/models/order_article_override.rb +++ b/plugins/automatic_invoices/app/overrides/models/order_article_override.rb @@ -7,5 +7,9 @@ if FoodsoftAutomaticInvoices.enabled? def total_deposit_price units * price.unit_quantity * price.deposit end + + def total_price_without_deposit + units * price.unit_quantity * price.fc_price_without_deposit + end end end diff --git a/plugins/automatic_invoices/app/views/finance/balancing/_edit_results_by_articles_override.html.haml b/plugins/automatic_invoices/app/views/finance/balancing/_edit_results_by_articles_override.html.haml new file mode 100644 index 00000000..df60a00c --- /dev/null +++ b/plugins/automatic_invoices/app/views/finance/balancing/_edit_results_by_articles_override.html.haml @@ -0,0 +1,64 @@ +- content_for :javascript do + :javascript + $(function() { + // create List for search-feature (using list.js, http://listjs.com) + var listjsResetPlugin = ['reset', {highlightClass: 'btn-primary'}]; + var listjsDelayPlugin = ['delay', {delayedSearchTime: 500}]; + new List(document.body, { + valueNames: ['name'], + engine: 'unlist', + plugins: [listjsResetPlugin, listjsDelayPlugin], + // make large pages work too (as we don't have paging - articles may disappear!) + page: 10000, + indexAsync: true + }); + $('input').keydown(function(event){ + if(event.keyCode == 13) { + event.preventDefault(); + return false; + } + }); + }); + + + +%table.ordered-articles.table.table-striped + %thead + %tr + %th + .input-append + = text_field_tag :article, params[:article], placeholder: (heading_helper Article, :name), class: 'delayed-search resettable search-query' + %th= heading_helper Article, :order_number + %th= t('.amount') + %th= heading_helper Article, :unit + %th= t('.net') + %th= t('.gross') + %th= t('.fc') + %th= heading_helper Article, :deposit + %th= heading_helper Article, :tax + %th{:colspan => "2"} + - unless @order.closed? + .btn-group + = link_to t('.add_article'), new_order_order_article_path(@order), remote: true, + class: 'btn btn-small' + = link_to '#', data: {toggle: 'dropdown'}, class: 'btn btn-small dropdown-toggle' do + %span.caret + %ul.dropdown-menu + %li= link_to t('.add_article'), new_order_order_article_path(@order), remote: true + %li= link_to t('.edit_transport'), edit_transport_finance_order_path(@order), remote: true + %tbody.list#result_table + - for order_article in @articles.select { |oa| oa.units > 0 } + = render :partial => "order_article_result_override", :locals => {:order_article => order_article} + + %tr + %td{ colspan: 10 } The following were not ordered + + - for order_article in @articles.select { |oa| oa.units == 0 } + = render :partial => "order_article_result_override", :locals => {:order_article => order_article} + + - if @order.transport + %tr + %td{ colspan: 5 }= heading_helper Order, :transport + %td{ colspan: 3, data: {value: @order.transport} }= number_to_currency(@order.transport) + %td= link_to t('ui.edit'), edit_transport_finance_order_path(@order), remote: true, + class: 'btn btn-mini' unless order_article.order.closed? diff --git a/plugins/automatic_invoices/app/views/finance/balancing/_order_article_override.html.haml b/plugins/automatic_invoices/app/views/finance/balancing/_order_article_override.html.haml new file mode 100644 index 00000000..0fd3a8f8 --- /dev/null +++ b/plugins/automatic_invoices/app/views/finance/balancing/_order_article_override.html.haml @@ -0,0 +1,42 @@ +%td.closed.name + = link_to order_article.article.name, '#', 'data-toggle-this' => "#group_order_articles_#{order_article.id}" +%td= order_article.article.order_number +%td{title: units_history_line(order_article, :plain => true)} + = order_article.units + = pkg_helper order_article.article_price + - if s=order_article.ordered_quantities_different_from_group_orders? + %span{:style => "color:red;font-weight: bold"}= s +%td #{order_article.article.unit} +%td + = number_to_currency(order_article.price.price, :unit => "") + :plain + / + = number_to_currency(order_article.total_price, :unit => "") +%td + - if FoodsoftConfig[:group_order_invoices]&.[](:separate_deposits) + = number_to_currency(order_article.price.gross_price_without_deposit, :unit => "") + :plain + / + = number_to_currency(order_article.total_gross_price_without_deposit, :unit => "") + -else + = number_to_currency(order_article.price.gross_price, :unit => "") + :plain + / + = number_to_currency(order_article.total_gross_price, :unit => "") +%td + = number_to_currency(order_article.price.fc_price_without_deposit, :unit => "") + :plain + / + = number_to_currency(order_article.total_price_without_deposit, :unit => "") +%td + = number_to_currency(order_article.price.deposit, :unit => "") unless order_article.price.deposit.zero? + :plain + / + = number_to_currency(order_article.total_deposit_price, :unit => "") unless order_article.price.deposit.zero? +%td= number_to_percentage(order_article.price.tax) unless order_article.price.tax.zero? +%td + = link_to t('ui.edit'), edit_order_order_article_path(order_article.order, order_article), remote: true, + class: 'btn btn-mini' unless order_article.order.closed? +%td + = link_to t('ui.delete'), order_order_article_path(order_article.order, order_article), method: :delete, + remote: true, data: {confirm: t('.confirm')}, class: 'btn btn-danger btn-mini' unless order_article.order.closed? diff --git a/plugins/automatic_invoices/app/views/finance/balancing/_order_article_result_override.html.haml b/plugins/automatic_invoices/app/views/finance/balancing/_order_article_result_override.html.haml new file mode 100644 index 00000000..2f531977 --- /dev/null +++ b/plugins/automatic_invoices/app/views/finance/balancing/_order_article_result_override.html.haml @@ -0,0 +1,5 @@ +%tr[order_article] + = render :partial => 'finance/balancing/order_article_override', :locals => {:order_article => order_article} + +%tr{:id => "group_order_articles_#{order_article.id}", :class => "results", :style => "display:none"} + = render :partial => 'finance/balancing/group_order_articles', :locals => {:order_article => order_article} \ No newline at end of file diff --git a/plugins/automatic_invoices/app/views/group_order_invoices/_links.html.haml b/plugins/automatic_invoices/app/views/group_order_invoices/_links.html.haml new file mode 100644 index 00000000..9e55cedf --- /dev/null +++ b/plugins/automatic_invoices/app/views/group_order_invoices/_links.html.haml @@ -0,0 +1,29 @@ +.row + .column.small-12 + - show_generate_with_date = true + - order.group_orders.each do |go| + - if go.group_order_invoice.present? + - show_generate_with_date = false + - if show_generate_with_date + = form_for :group_order_invoice, url: url_for('group_order_invoice#create_multiple'), remote: true do |f| + = f.label :invoice_date, I18n.t('activerecord.attributes.group_order_invoice.links.invoice_date') + = f.date_field :invoice_date, {value: Date.today, max: Date.today, required: true} + = f.hidden_field :order_id, value: order.id + = f.submit I18n.t('activerecord.attributes.group_order_invoice.links.generate_with_date'), class: 'btn btn small' + +- order.group_orders.includes([:group_order_invoice, :ordergroup]).each do |go| + .row + .column.small-3 + = label_tag go.ordergroup.name + - if go.group_order_invoice + .column.small-3 + = link_to I18n.t('activerecord.attributes.group_order_invoice.links.download'), group_order_invoice_path(go.group_order_invoice, :format => 'pdf'), class: 'btn btn-small' + .column.small-3 + = link_to I18n.t('activerecord.attributes.group_order_invoice.links.delete'), go.group_order_invoice, method: :delete, class: 'btn btn-danger btn-small', remote: true + - else + = button_to I18n.t('activerecord.attributes.group_order_invoice.links.generate'), group_order_invoices_path(:method => :post, group_order: go) ,class: 'btn btn-small', params: {id: order.id}, remote: true +- if order.group_orders.map(&:group_order_invoice).compact.present? + %br/ + .row + .column.small-3 + = link_to I18n.t('activerecord.attributes.group_order_invoice.links.download_all_zip'), download_all_group_order_invoices_path(order), class: 'btn btn-small' diff --git a/plugins/automatic_invoices/app/views/group_order_invoices/create.js.erb b/plugins/automatic_invoices/app/views/group_order_invoices/create.js.erb new file mode 100644 index 00000000..5a43e85d --- /dev/null +++ b/plugins/automatic_invoices/app/views/group_order_invoices/create.js.erb @@ -0,0 +1 @@ +$("#generate-invoice<%= params[:id] %>").html("<%= escape_javascript(render partial: 'links', locals: {order: @order}) %>"); diff --git a/plugins/automatic_invoices/app/views/group_order_invoices/create_multiple.js.erb b/plugins/automatic_invoices/app/views/group_order_invoices/create_multiple.js.erb new file mode 100644 index 00000000..11ebbe45 --- /dev/null +++ b/plugins/automatic_invoices/app/views/group_order_invoices/create_multiple.js.erb @@ -0,0 +1 @@ +$("#generate-invoice<%= @order.id %>").html("<%= escape_javascript(render partial: 'links', locals: {order: @order}) %>"); diff --git a/plugins/automatic_invoices/app/views/group_order_invoices/destroy.js.erb b/plugins/automatic_invoices/app/views/group_order_invoices/destroy.js.erb new file mode 100644 index 00000000..30ce5985 --- /dev/null +++ b/plugins/automatic_invoices/app/views/group_order_invoices/destroy.js.erb @@ -0,0 +1 @@ +$("#generate-invoice<%= @order.id %>").html("<%= escape_javascript(render partial: 'links', locals: {order: @order}) %>"); \ No newline at end of file diff --git a/plugins/automatic_invoices/app/views/group_orders/_form_override.html.haml b/plugins/automatic_invoices/app/views/group_orders/_form_override.html.haml new file mode 100644 index 00000000..0cd27c76 --- /dev/null +++ b/plugins/automatic_invoices/app/views/group_orders/_form_override.html.haml @@ -0,0 +1,180 @@ +- content_for :javascript do + - group_balance = FoodsoftConfig[:charge_members_manually] ? @ordering_data[:account_balance] : @ordering_data[:available_funds] + :javascript + $(function() { + #{data_to_js(@ordering_data)} + setGroupBalance(#{group_balance}); + setMinimumBalance(#{FoodsoftConfig[:minimum_balance] or 0}); + setToleranceBehaviour(#{FoodsoftConfig[:tolerance_is_costly]}); + setStockit(#{@order.stockit?}); + // create List for search-feature (using list.js, http://listjs.com) + var listjsResetPlugin = ['reset', {highlightClass: 'btn-primary'}]; + var listjsDelayPlugin = ['delay', {delayedSearchTime: 500}]; + new List(document.body, { + valueNames: ['name'], + engine: 'unlist', + plugins: [listjsResetPlugin, listjsDelayPlugin], + // make large pages work too (as we don't have paging - articles may disappear!) + page: 10000, + indexAsync: true + }); + }); + +- title t('.title'), false + +.row-fluid + .well.pull-left + = close_button :alert + %h2= @order.name + %dl.dl-horizontal + - unless @order.note.blank? + %dt= heading_helper Order, :note + %dd= @order.note + %dt= heading_helper Order, :created_by + %dd= show_user_link(@order.created_by) + %dt= heading_helper Order, :ends + %dd= format_time(@order.ends) + %dt= heading_helper Order, :pickup + %dd= format_date(@order.pickup) + - unless @order.stockit? or @order.supplier.min_order_quantity.blank? + %dt= heading_helper Supplier, :min_order_quantity, short: true + %dd= @order.supplier.min_order_quantity + %dt= t '.sum_amount' + %dd= number_to_currency @order.sum + - unless @group_order.new_record? + %dt= heading_helper GroupOrder, :updated_by + %dd + = show_user(@group_order.updated_by) + (#{format_time(@group_order.updated_on)}) + %dt= heading_helper Ordergroup, :account_balance + %dd= number_to_currency(@ordering_data[:account_balance]) + - unless FoodsoftConfig[:charge_members_manually] + %dt= heading_helper Ordergroup, :available_funds + %dd= number_to_currency(@ordering_data[:available_funds]) + + .well.pull-right + = close_button :alert + = render 'switch_order', current_order: @order + +.row-fluid + .well.clear + .form-search + .input-append + = text_field_tag :article, params[:article], placeholder: t('.search_article'), class: 'search-query delayed-search resettable' + %button.add-on.btn.reset-search{:type => :button, :title => t('.reset_article_search')} + %i.icon.icon-remove + += form_for @group_order do |f| + = f.hidden_field :lock_version + = f.hidden_field :order_id + = f.hidden_field :updated_by_user_id + = f.hidden_field :ordergroup_id + %table.table + %thead + %tr + %th= heading_helper Article, :name + - if @order.stockit? + %th{style: 'width:120px'}= heading_helper StockArticle, :supplier + %th{style: "width:13px;"} + %th{style: "width:4.5em;"}= t '.price' + %th{style: "width:4.5em;"}= heading_helper Article, :unit + - unless @order.stockit? + %th{style: "width:70px;"}= heading_helper OrderArticle, :missing_units, short: true + %th#col_required= heading_helper GroupOrderArticle, :quantity + %th#col_tolerance= heading_helper GroupOrderArticle, :tolerance + - else + %th(style="width:20px")= heading_helper StockArticle, :available + %th#col_required= heading_helper GroupOrderArticle, :quantity + %th{style: "width:15px;"}= heading_helper GroupOrderArticle, :total_price + %tbody.list + - @order.articles_grouped_by_category.each do |category, order_articles| + %tr.list-heading.article-category + %td + = category + %i.icon-tag + %td{colspan: "9"} + - order_articles.each do |order_article| + %tr{class: "#{cycle('even', 'odd', name: 'articles')} order-article #{get_missing_units_css_class(@ordering_data[:order_articles][order_article.id][:missing_units])}", valign: "top", tabindex: "0"} + %td.name= order_article.article.name + - if @order.stockit? + %td= truncate order_article.article.supplier.name, length: 15 + %td= h order_article.article.origin + %td= number_to_currency(@ordering_data[:order_articles][order_article.id][:price]) + %td= order_article.article.unit + %td + - if @order.stockit? + = @ordering_data[:order_articles][order_article.id][:quantity_available] + - else + %span{id: "missing_units_#{order_article.id}"}= @ordering_data[:order_articles][order_article.id][:missing_units] + + %td.quantity + %input{id: "q_#{order_article.id}", name: "group_order[group_order_articles_attributes][#{order_article.id}][quantity]", type: "hidden", value: @ordering_data[:order_articles][order_article.id][:quantity], 'data-min' => (@ordering_data[:order_articles][order_article.id][:quantity] if @order.boxfill?), 'data-max' => (@ordering_data[:order_articles][order_article.id][:quantity]+@ordering_data[:order_articles][order_article.id][:missing_units] if @order.boxfill?)}/ + %span.used{id: "q_used_#{order_article.id}"}= @ordering_data[:order_articles][order_article.id][:used_quantity] + + + %span.unused{id: "q_unused_#{order_article.id}"}= @ordering_data[:order_articles][order_article.id][:quantity] - @ordering_data[:order_articles][order_article.id][:used_quantity] + .btn-group + %a.btn.btn-ordering{'data-increase_quantity' => order_article.id} + %i.icon-plus + %a.btn.btn-ordering{'data-decrease_quantity' => order_article.id} + %i.icon-minus + + %td.tolerance{style: ('display:none' if @order.stockit?)} + %input{id: "t_#{order_article.id}", name: "group_order[group_order_articles_attributes][#{order_article.id}][tolerance]", type: "hidden", value: @ordering_data[:order_articles][order_article.id][:tolerance], 'data-min' => (@ordering_data[:order_articles][order_article.id][:tolerance] if @order.boxfill?)}/ + - if (@ordering_data[:order_articles][order_article.id][:unit] > 1) + %span.used{id: "t_used_#{order_article.id}"}= @ordering_data[:order_articles][order_article.id][:used_tolerance] + + + %span.unused{id: "t_unused_#{order_article.id}"}= @ordering_data[:order_articles][order_article.id][:tolerance] - @ordering_data[:order_articles][order_article.id][:used_tolerance] + .btn-group + %a.btn.btn-ordering{'data-increase_tolerance' => order_article.id} + %i.icon-plus + %a.btn.btn-ordering{'data-decrease_tolerance' => order_article.id} + %i.icon-minus + + %td{id: "td_price_#{order_article.id}", style: "text-align:right; padding-right:10px; width:4em"} + %span{id: "price_#{order_article.id}_display"}= number_to_currency(@ordering_data[:order_articles][order_article.id][:total_price]) + .article-info + .article-name= order_article.article.name + .pull-right + = t('.units_full') + ':' + %span{id: "units_#{order_article.id}"}= order_article.units_to_order + %br/ + = t('.units_total') + ':' + %span{id: "q_total_#{order_article.id}"}= @ordering_data[:order_articles][order_article.id][:quantity] + @ordering_data[:order_articles][order_article.id][:others_quantity] + %br/ + = t('.total_tolerance') + ':' + %span{id: "t_total_#{order_article.id}"}= @ordering_data[:order_articles][order_article.id][:tolerance] + @ordering_data[:order_articles][order_article.id][:others_tolerance] + %br/ + .pull-left + #{heading_helper Article, :manufacturer}: #{order_article.article.manufacturer} + %br/ + #{heading_helper Article, :units}: #{@order.stockit? ? order_article.article.quantity_available : @ordering_data[:order_articles][order_article.id][:unit]} * #{h order_article.article.unit} + %br/ + #{heading_helper Article, :note}: #{order_article.article.note} + %br/ + #order-footer + #info-box + #total-sum + %table + %tr + %td= t('.total_sum_amount') + ':' + %td.currency + %span#total_price= number_to_currency(@group_order.price) + %tr + - if FoodsoftConfig[:charge_members_manually] + - old_balance = @ordering_data[:account_balance] + %td= heading_helper(Ordergroup, :account_balance) + ':' + %td.currency= number_to_currency(@ordering_data[:account_balance]) + - else + - old_balance = @ordering_data[:available_funds] + %td= heading_helper(Ordergroup, :available_funds) + ':' + %td.currency= number_to_currency(@ordering_data[:available_funds]) + %tr + %td= t('.new_funds') + ':' + %td.currency + %strong + %span#new_balance= number_to_currency(old_balance - @group_order.price) + #order-button + = submit_tag( t('.action_save'), id: 'submit_button', class: 'btn btn-primary' ) + #{link_to t('ui.or_cancel'), group_orders_path} + %input#total_balance{name: "total_balance", type: "hidden", value: @ordergroup.account_balance - @group_order.price}/ + %input{name: "version", type: "hidden", value: @version}/ diff --git a/plugins/automatic_invoices/app/views/mailer/group_order_invoice.text.haml b/plugins/automatic_invoices/app/views/mailer/group_order_invoice.text.haml new file mode 100644 index 00000000..75948fbe --- /dev/null +++ b/plugins/automatic_invoices/app/views/mailer/group_order_invoice.text.haml @@ -0,0 +1 @@ += raw t '.text', group: @group.name, supplier: @supplier , foodcoop: FoodsoftConfig[:name] diff --git a/plugins/automatic_invoices/app/views/ordergroups/edit.html.haml b/plugins/automatic_invoices/app/views/ordergroups/edit.html.haml new file mode 100644 index 00000000..9e964c89 --- /dev/null +++ b/plugins/automatic_invoices/app/views/ordergroups/edit.html.haml @@ -0,0 +1,72 @@ +- title t('.title') +- form_for @ordergroup do |f| + = f.error_messages + %p + = f.label :type + %br/ + = f.text_field :type + %p + = f.label :name + %br/ + = f.text_field :name + %p + = f.label :description + %br/ + = f.text_field :description + %p + = f.label :account_balance + %br/ + = f.text_field :account_balance + %p + = f.label :account_updated + %br/ + = f.datetime_select :account_updated + %p + = f.label :created_on + %br/ + = f.datetime_select :created_on + %p + = f.label :role_admin + %br/ + = f.check_box :role_admin + %p + = f.label :role_suppliers + %br/ + = f.check_box :role_suppliers + %p + = f.label :role_article_meta + %br/ + = f.check_box :role_article_meta + %p + = f.label :role_finance + %br/ + = f.check_box :role_finance + %p + = f.label :role_invoices + %br/ + = f.check_box :role_invoices + %p + = f.label :role_orders + %br/ + = f.check_box :role_orders + %p + = f.label :deleted_at + %br/ + = f.datetime_select :deleted_at + %p + = f.label :contact_person + %br/ + = f.text_field :contact_person + %p + = f.label :customer_number + %br/ + = f.text_field :customer_number + %p + = f.label :contact_phone + %br/ + = f.text_field :contact_phone + %p + = f.label :contact_address + %br/ + = f.text_field :contact_address + %p= f.submit t('ui.edit') diff --git a/plugins/automatic_invoices/app/views/orders/_articles.html.haml b/plugins/automatic_invoices/app/views/orders/_articles.html.haml new file mode 100644 index 00000000..ff010144 --- /dev/null +++ b/plugins/automatic_invoices/app/views/orders/_articles.html.haml @@ -0,0 +1,53 @@ +%table.table.table-hover + %thead + %tr + %th= heading_helper Article, :name + %th= heading_helper Article, :unit + %th= t '.prices' + - if order.stockit? + %th= t '.units_ordered' + - if FoodsoftConfig[:group_order_invoices]&.[](:separate_deposits) + %th= t '.deposit' + - else + %th= 'Members' + %th= t '.units_full' + - total_net, total_gross, counter = 0, 0, 0 + %tbody.list + - order.articles_grouped_by_category.each do |category_name, order_articles| + %tr.list-heading.article-category + %td + = category_name + %i.icon-tag + %td{:colspan => "9"} + - order_articles.each do |order_article| + - net_price = order_article.price.price + - if FoodsoftConfig[:group_order_invoices]&.[](:separate_deposits) + - gross_price = order_article.price.gross_price_without_deposit + - else + - gross_price = order_article.price.gross_price + - unit_quantity = order_article.price.unit_quantity + - units = order_article.units + - total_net += units * unit_quantity * net_price + - total_gross += units * unit_quantity * gross_price + %tr{:class => cycle('even', 'odd', :name => 'articles') + ' ' + order_article_class(order_article)} + %td.name=h order_article.article.name + %td= order_article.article.unit + %td= "#{number_to_currency(net_price)} / #{number_to_currency(gross_price)}" + - if FoodsoftConfig[:group_order_invoices]&.[](:separate_deposits) + %td= "#{number_to_currency(order_article.price.deposit)}" + - if order.stockit? + %td= units + - else + - if unit_quantity > 1 or order_article.tolerance > 0 + %td= "#{order_article.quantity} + #{order_article.tolerance}" + - else + %td= "#{order_article.quantity}" + %td{title: units_history_line(order_article, plain: true)} + = units + = pkg_helper order_article.price +%p + = t '.prices_sum' + = "#{number_to_currency(total_net)} / #{number_to_currency(total_gross)}" +%p + = t '.article_count' + = order.order_articles.ordered.count diff --git a/plugins/automatic_invoices/app/views/orders/show.html.haml b/plugins/automatic_invoices/app/views/orders/show.html.haml new file mode 100644 index 00000000..1587f8e1 --- /dev/null +++ b/plugins/automatic_invoices/app/views/orders/show.html.haml @@ -0,0 +1,97 @@ +- title t('.title', name: @order.name) + +- if current_user.role_finance? || current_user.role_invoices? + - content_for :actionbar do + - if @order.invoice.present? + = link_to t('.show_invoice'), finance_invoice_path(@order.invoice), class: 'btn' + - elsif !@order.open? + = link_to t('.create_invoice'), new_finance_invoice_path(:order_id => @order, :supplier_id => @order.supplier), + class: 'btn' + +.well + = close_button :alert + %p + - description1 = raw t '.description1_order', + state: t("orders.state.#{@order.state}").capitalize, + supplier: supplier_link(@order), + who: show_user_link(@order.created_by) + - description1 += ' ' + - if @order.ends + - description1 += raw t '.description1_period.starts_ends', + starts: format_time(@order.starts), + ends: format_time(@order.ends) + - else + - description1 += raw t '.description1_period.starts', + starts: format_time(@order.starts) + - if @order.pickup + - description1 += ' ' + - description1 += raw t '.description1_period.pickup', + pickup: format_date(@order.pickup) + = description1 + '.' + %br + = raw t '.description2', + ordergroups: ordergroup_count(@order), + article_count: @order.order_articles.ordered.count, + net_sum: number_to_currency(@order.sum(:net) + @order.sum(:net_deposit)), + gross_sum: number_to_currency(@order.sum(:fc)) + + - unless @order.comments.blank? + = link_to t('.comments_link'), '#comments' + + - if @note.present? + %p + = heading_helper(Order, :note) + ': ' + = @order.note + +-# Proposing to remove this warning, since there is a valid period when the order is not settled yet. +-# Perhaps when the pickup day has been, or when the order isn't settled a week after it has been +-# closed, this message could be shown. +-#- if @order.finished? and !@order.closed? + .alert.alert-warning + = t '.warn_not_closed' + +.well.well-small + .btn-toolbar + .form-search.pull-right + .input-append + = text_field_tag :query, params[:query], class: 'search-query delayed-search resettable' + %button.add-on.btn.reset-search{:type => :button, :title => t('.search_reset')} + %i.icon.icon-remove + + .btn-toolbar + .btn-group.view_buttons + = update_articles_link @order, t('.articles'), :default, class: 'btn' + = update_articles_link @order, t('.sort_group'), :groups, class: 'btn' + = update_articles_link @order, t('.sort_article'), :articles, class: 'btn' + + - unless @order.open? + = render 'shared/order_download_button', order: @order, klass: '' + - if @order.open? + = link_to t('.action_end'), finish_order_path(@order), method: :post, class: 'btn btn-success', + data: {confirm: t('.confirm_end', order: @order.name)} + - if @order.supplier + - if @order.stock_group_order + = link_to t('.stock_order'), edit_group_order_path(@order.stock_group_order, order_id: @order.id), class: 'btn' + - else + = link_to t('.stock_order'), new_group_order_path(order_id: @order.id, stock_order: true), class: 'btn' + = link_to t('ui.edit'), edit_order_path(@order), class: 'btn' + - elsif not @order.closed? and not @order.stockit? + = link_to t('.send_to_supplier'), send_result_to_supplier_order_path(@order), method: :post, + class: "btn#{' btn-primary' unless @order.last_sent_mail}", + data: {confirm: @order.last_sent_mail && t('.confirm_send_to_supplier', when: format_time(@order.last_sent_mail)) } + = receive_button @order + - unless @order.closed? + = link_to t('ui.delete'), @order, data: {confirm: t('.confirm_delete')}, method: :delete, + class: 'btn btn-danger' + +%section#articles_table + = render @partial, order: @order + +%h2= t '.comments.title' +#comments + = render partial: 'shared/comments', locals: { comments: @order.comments } +#new_comment= render partial: 'order_comments/form', locals: { order_comment: @order.comments.build(user: current_user)} += link_to_top + += render 'show_js' += render 'shared/articles_by/common', order: @order diff --git a/plugins/automatic_invoices/app/views/shared/_group.html.haml b/plugins/automatic_invoices/app/views/shared/_group.html.haml new file mode 100644 index 00000000..c4d00679 --- /dev/null +++ b/plugins/automatic_invoices/app/views/shared/_group.html.haml @@ -0,0 +1,24 @@ +%dl + %dt= heading_helper(Ordergroup, :description) + ':' + %dd=h group.description + - if group.is_a?(Ordergroup) and (@current_user.role_admin? or @current_user.role_finance?) + %dt= heading_helper(Ordergroup, :contact) + ':' + %dd=h group.contact + %dt= heading_helper(Ordergroup, :contact_address) + ':' + %dd= link_to_gmaps group.contact_address + %dt= heading_helper(Ordergroup, :customer_number) + ':' + %dd=h group.customer_number + - if group.break_start? or group.break_end? + %dt= heading_helper(Ordergroup, :break) + ':' + %dd= raw t '.break', start: format_date(group.break_start), end: format_date(group.break_end) + - if group.is_a?(Workgroup) + %dt= t('.access') + ':' + %dd= format_roles(group) + %dt= heading_helper(Ordergroup, :user_tokens) + ':' + %dd + - members = group.users + = "(#{members.size})" + = members.collect{|u| show_user(u)}.join(", ") + - if group.is_a?(Ordergroup) and FoodsoftConfig[:use_apple_points] + %dt= t '.apple_limit' + %dd= group.ignore_apple_restriction ? t('.deactivated') : t('.activated') diff --git a/plugins/automatic_invoices/config/locales/de.yml b/plugins/automatic_invoices/config/locales/de.yml index 13a2e3dc..e0edb042 100644 --- a/plugins/automatic_invoices/config/locales/de.yml +++ b/plugins/automatic_invoices/config/locales/de.yml @@ -871,12 +871,13 @@ de: title: Bestellung abrechnen edit_note: title: Notiz bearbeiten - edit_results_by_articles: + edit_results_by_articles_override: add_article: Artikel hinzufügen amount: Menge edit_transport: Transportkosten bearbeiten gross: Brutto net: Netto + fc: FC edit_transport: title: Transportkosten verteilen group_order_articles: @@ -928,13 +929,13 @@ de: summary: changed: Daten wurden verändert! duration: von %{starts} bis %{ends} - fc_amount: 'FC-Betrag:' + fc_amount_total: 'FC-Gesamtbetrag:' deposit: 'Pfand brutto:' gross_deposit: 'Pfand brutto:' net_deposit: 'Pfand netto:' fc_deposit: 'Pfand FC-Betrag:' fc_profit: FC Gewinn - fc_amount: FC-Betrag (brutto) + fc_gross_amount: FC-Betrag (brutto) gross_amount: 'Bruttobetrag:' groups_amount: 'Gruppenbeträge:' net_amount: 'Nettobetrag:' @@ -1124,7 +1125,7 @@ de: closed: Diese Bestellung ist bereits abgeschlossen. no_member: Du bist kein Mitglieder einer Bestellgruppe. notfound: Fehlerhafte URL, das ist nicht Deine Bestellung. - form: + form_override: action_save: Bestellung speichern new_funds: Neuer Kontostand price: Preis diff --git a/plugins/automatic_invoices/foodsoft_automatic_invoices.gemspec b/plugins/automatic_invoices/foodsoft_automatic_invoices.gemspec index c920ea62..acf82674 100644 --- a/plugins/automatic_invoices/foodsoft_automatic_invoices.gemspec +++ b/plugins/automatic_invoices/foodsoft_automatic_invoices.gemspec @@ -12,8 +12,8 @@ Gem::Specification.new do |s| s.summary = "Foodsoft plugin to enhance foodsoft's accounting capabilities and to create and automatically deliver invoice pdfs for accounted orders." s.description = '' - s.files = Dir['{app,config,db,spec,lib}/**/*'] + ['Rakefile', 'README.md','/app/controllers/concerns/send_group_order_invoice_pdf.rb'] + s.files = Dir['{app,config,db,spec,lib}/**/**/**/*'] + ['Rakefile', 'README.md'] s.add_dependency 'rails' - s.add_dependency 'deface', '~> 1.0' + s.add_dependency 'deface', '~> 1.9' end diff --git a/plugins/automatic_invoices/lib/foodsoft_automatic_invoices.rb b/plugins/automatic_invoices/lib/foodsoft_automatic_invoices.rb index 8a248007..0132b685 100644 --- a/plugins/automatic_invoices/lib/foodsoft_automatic_invoices.rb +++ b/plugins/automatic_invoices/lib/foodsoft_automatic_invoices.rb @@ -2,6 +2,7 @@ require 'deface' require 'foodsoft_automatic_invoices/engine' require 'foodsoft_automatic_invoices/send_group_order_invoice_pdf' + module FoodsoftAutomaticInvoices def self.enabled? FoodsoftConfig[:use_automatic_invoices]