Prevent exception when order has no payments

This commit is contained in:
David Cook
2013-08-22 11:31:07 +10:00
parent aab7176f2c
commit 346113966e

View File

@@ -21,7 +21,7 @@ module OpenFoodWeb
order_and_distributor_details << [order.created_at, order.id,
order.bill_address.full_name, order.email, order.bill_address.phone, order.bill_address.city,
line_item.product.sku, line_item.product.name, line_item.variant.options_text, line_item.quantity, line_item.max_quantity, line_item.price * line_item.quantity, line_item.distribution_fee,
order.payments.first.payment_method.andand.name,
order.payments.first.andand.payment_method.andand.name,
order.distributor.andand.name, order.distributor.address.address1, order.distributor.address.city, order.distributor.address.zipcode, order.special_instructions ]
end
end