From f3585befff5811afc5f6d2e8d37bf5edae7002a9 Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Mon, 15 Oct 2018 18:10:00 +0100 Subject: [PATCH] Fix customer missing from some order records - guest checkout? --- app/views/spree/admin/orders/invoice.html.haml | 5 +++-- app/views/spree/admin/orders/invoice2.html.haml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/views/spree/admin/orders/invoice.html.haml b/app/views/spree/admin/orders/invoice.html.haml index 0982ccc21f..982ef43f59 100644 --- a/app/views/spree/admin/orders/invoice.html.haml +++ b/app/views/spree/admin/orders/invoice.html.haml @@ -30,13 +30,14 @@   %td{ :align => "right" } %strong= "#{t('.to')}: #{@order.ship_address.full_name}" - - if @order.customer.code.present? + - if @order.andand.customer.andand.code.present? %br = "#{t('.code')}: #{@order.customer.code}" %br = @order.ship_address.full_address %br - = "#{@order.customer.email}," + - if @order.andand.customer.andand.email.present? + = "#{@order.customer.email}," = "#{@order.bill_address.phone}" = render 'spree/admin/orders/invoice_table' diff --git a/app/views/spree/admin/orders/invoice2.html.haml b/app/views/spree/admin/orders/invoice2.html.haml index 89f28ab308..837b2be21a 100644 --- a/app/views/spree/admin/orders/invoice2.html.haml +++ b/app/views/spree/admin/orders/invoice2.html.haml @@ -45,7 +45,7 @@ = t :invoice_billing_address %br %strong= @order.ship_address.full_name - - if @order.customer.code.present? + - if @order.andand.customer.andand.code.present? %br = "Code: #{@order.customer.code}" %br