mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Merge pull request #11126 from abdellani/show-invoice-number-on-invoices
Show invoice number on invoices
This commit is contained in:
@@ -5,6 +5,7 @@ class Invoice
|
||||
attr_reader :invoice
|
||||
|
||||
delegate :data, :date, to: :invoice
|
||||
delegate :number, to: :invoice, prefix: true
|
||||
|
||||
FINALIZED_NON_SUCCESSFUL_STATES = %w(canceled returned).freeze
|
||||
|
||||
|
||||
@@ -7,11 +7,20 @@
|
||||
%h6
|
||||
= "#{t('spree.admin.orders.invoice.issued_on')}: "
|
||||
= l @order.invoice_date
|
||||
%tr{ valign: "top" }
|
||||
%td{ :align => "left", colspan: 3 }
|
||||
%h6
|
||||
= "#{t('spree.admin.orders.invoice.order_number')}: "
|
||||
= @order.number
|
||||
%tr{ valign: "top" }
|
||||
%td{ :align => "left", colspan: 3 }
|
||||
%h6
|
||||
= "#{t('spree.admin.orders.invoice.invoice_number')}: "
|
||||
= @order.invoice_number
|
||||
%tr{ valign: "top" }
|
||||
%td{ :align => "left" }
|
||||
%h4
|
||||
= "#{t('spree.admin.orders.invoice.tax_invoice')}: "
|
||||
= "#{@order.number}"
|
||||
= "#{t('spree.admin.orders.invoice.tax_invoice')}"
|
||||
%td{width: "10%" }
|
||||
|
||||
%td{ :align => "right" }
|
||||
|
||||
@@ -43,6 +43,9 @@
|
||||
%td{ :align => "left", colspan: 2 }
|
||||
%tr{ valign: "top" }
|
||||
%td{ :align => "left" }
|
||||
%br
|
||||
= "#{t :invoice_number}:"
|
||||
= @order.invoice_number
|
||||
%br
|
||||
= t :invoice_issued_on
|
||||
= l @order.invoice_date
|
||||
|
||||
@@ -1834,7 +1834,7 @@ en:
|
||||
abn: "ABN:"
|
||||
acn: "ACN:"
|
||||
invoice_issued_on: "Invoice issued on:"
|
||||
order_number: "Invoice number:"
|
||||
order_number: "Order number:"
|
||||
date_of_transaction: "Date of transaction:"
|
||||
|
||||
menu_1_title: "Shops"
|
||||
@@ -4106,6 +4106,8 @@ See the %{link} to find out more about %{sitename}'s features and to start using
|
||||
from: "From"
|
||||
to: "Bill to"
|
||||
shipping: "Shipping"
|
||||
order_number: "Order Number"
|
||||
invoice_number: "Invoice Number"
|
||||
note:
|
||||
note_label: "Note:"
|
||||
no_note_present: "No note provided."
|
||||
|
||||
@@ -208,7 +208,7 @@ describe '
|
||||
end
|
||||
|
||||
it "filter by invoice number" do
|
||||
fill_in "Invoice number:", with: order2.number
|
||||
fill_in "Order number:", with: order2.number
|
||||
|
||||
page.find('.filter-actions .button[type=submit]').click
|
||||
|
||||
@@ -835,7 +835,7 @@ describe '
|
||||
|
||||
# Specify each filters
|
||||
uncheck 'Only show complete orders'
|
||||
fill_in "Invoice number", with: "R123456"
|
||||
fill_in "Order number", with: "R123456"
|
||||
tomselect_multiselect order_cycle.name, from: 'q[order_cycle_id_in][]'
|
||||
tomselect_multiselect distributor.name, from: 'q[distributor_id_in][]'
|
||||
tomselect_search_and_select shipping_method.name, from: 'shipping_method_id'
|
||||
@@ -854,7 +854,7 @@ describe '
|
||||
|
||||
# Check every filters to be equal
|
||||
expect(find_field("Only show complete orders")).not_to be_checked
|
||||
expect(find_field("Invoice number").value).to eq "R123456"
|
||||
expect(find_field("Order number").value).to eq "R123456"
|
||||
expect(find("#shipping_method_id-ts-control .item").text).to eq shipping_method.name
|
||||
expect(find("#q_state_eq-ts-control .item").text).to eq "complete"
|
||||
expect(find("#q_distributor_id_in").value).to eq [distributor.id.to_s]
|
||||
@@ -870,7 +870,7 @@ describe '
|
||||
it "and clear filters" do
|
||||
find("#clear_filters_button").click
|
||||
expect(find_field("Only show complete orders")).to be_checked
|
||||
expect(find_field("Invoice number").value).to eq ""
|
||||
expect(find_field("Order number").value).to eq ""
|
||||
expect(find("#shipping_method_id").value).to be_empty
|
||||
expect(find("#q_state_eq").value).to be_empty
|
||||
expect(find("#q_distributor_id_in").value).to be_empty
|
||||
|
||||
Reference in New Issue
Block a user