mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Update invoice templates to use business address when form filled in
This commit is contained in:
committed by
Nihal M. Kelanthodika
parent
ed8edf0ab9
commit
f5743b3b36
@@ -18,12 +18,18 @@
|
||||
%h4= @order.order_cycle&.name
|
||||
%tr{ valign: "top" }
|
||||
%td{ align: "left", colspan: 3 }
|
||||
%strong= "#{t('.from')}: #{@order.distributor.name}"
|
||||
- if @order.distributor.business_address.blank?
|
||||
%strong= "#{t('.from')}: #{@order.distributor.name}"
|
||||
- else
|
||||
%strong= "#{t('.from')}: #{@order.distributor.business_address.company}"
|
||||
- if @order.distributor.abn.present?
|
||||
%br
|
||||
= "#{t(:abn)} #{@order.distributor.abn}"
|
||||
%br
|
||||
= @order.distributor.address.full_address
|
||||
- if @order.distributor.business_address.blank?
|
||||
= @order.distributor.address.full_address
|
||||
- else
|
||||
= @order.distributor.business_address.full_address
|
||||
%br
|
||||
= @order.distributor.contact.email
|
||||
%tr{ valign: "top" }
|
||||
|
||||
@@ -12,16 +12,28 @@
|
||||
= wicked_pdf_image_tag @order.distributor.logo(:small), width: 150, height: 150
|
||||
%tr{ valign: "top" }
|
||||
%td{ :align => "left" }
|
||||
%strong= @order.distributor.name
|
||||
%br
|
||||
= @order.distributor.address.address_part1
|
||||
%br
|
||||
= @order.distributor.address.address_part2
|
||||
%br
|
||||
= @order.distributor.email_address
|
||||
- if @order.distributor.phone.present?
|
||||
- if @order.distributor.business_address.blank?
|
||||
%strong= @order.distributor.name
|
||||
%br
|
||||
= @order.distributor.phone
|
||||
= @order.distributor.address.address_part1
|
||||
%br
|
||||
= @order.distributor.address.address_part2
|
||||
%br
|
||||
= @order.distributor.email_address
|
||||
- if @order.distributor.phone.present?
|
||||
%br
|
||||
= @order.distributor.phone
|
||||
- else
|
||||
%strong= @order.distributor.business_address.company
|
||||
%br
|
||||
= @order.distributor.business_address.address_part1
|
||||
%br
|
||||
= @order.distributor.business_address.address_part2
|
||||
%br
|
||||
= @order.distributor.email_address
|
||||
- if @order.distributor.business_address.phone.present?
|
||||
%br
|
||||
= @order.distributor.business_address.phone
|
||||
- if @order.distributor.abn.present?
|
||||
%br
|
||||
= "#{t :abn} #{@order.distributor.abn}"
|
||||
|
||||
Reference in New Issue
Block a user