Skip to content

Commit

Permalink
Merge pull request #5561 from coopdevs/defend-from-invoice-without-bi…
Browse files Browse the repository at this point in the history
…ll-address

Do not print the bill addr. name when there's none
  • Loading branch information
sauloperez authored Jul 1, 2020
2 parents 819af03 + 8c371fd commit 28376b1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
9 changes: 6 additions & 3 deletions app/views/spree/admin/orders/invoice.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,19 @@
%td{ align: "left" }
%strong= "#{t('.to')}:"
%br
= @order.bill_address.full_name
- if @order.bill_address
= @order.bill_address.full_name
- if @order.andand.customer.andand.code.present?
%br
= "#{t('.code')}: #{@order.customer.code}"
%br
= @order.bill_address.full_address
- if @order.bill_address
= @order.bill_address.full_address
%br
- if @order.andand.customer.andand.email.present?
= "#{@order.customer.email},"
= "#{@order.bill_address.phone}"
- if @order.bill_address
= "#{@order.bill_address.phone}"
%td
 
%td{ align: "left", style: "border-left: .1em solid black; padding-left: 1em" }
Expand Down
9 changes: 6 additions & 3 deletions app/views/spree/admin/orders/invoice2.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,17 @@
%td{ :align => "right" }
= t :invoice_billing_address
%br
%strong= @order.bill_address.full_name
- if @order.bill_address
%strong= @order.bill_address.full_name
- if @order.andand.customer.andand.code.present?
%br
= "Code: #{@order.customer.code}"
%br
= @order.bill_address.address_part1
- if @order.bill_address
= @order.bill_address.address_part1
%br
= @order.bill_address.address_part2
- if @order.bill_address
= @order.bill_address.address_part2

= render 'spree/admin/orders/invoice_table2'

Expand Down

0 comments on commit 28376b1

Please sign in to comment.