Sha256: a942757d0248b7bfdb661a163b4db8a698b9106b3b51551cd920b598f43edd98
Contents?: true
Size: 1.94 KB
Versions: 8
Compression:
Stored size: 1.94 KB
Contents
- include_download_column = order.purchased? && order.order_items.any? { |order_item| order_item.purchased_download_url.present? rescue false } - include_quantity_column = order.order_items.any? { |order_item| order_item.quantity > 1 } .effective-order-items %table.table %thead %tr - if include_quantity_column %th.quantity Qty - if include_download_column %th.download Download %th.item= order.order_items.length > 1 ? 'Items' : 'Item' %th.price Price %tbody - order.order_items.each do |item| %tr - if include_quantity_column %td.quantity= item.quantity - if include_download_column %td.download - if item.purchased? && (item.purchased_download_url rescue nil).present? = link_to 'download', item.purchased_download_url - else = '-' %td.item = item.title.html_safe - if order.new_record? && item.purchasable.kind_of?(Effective::Subscription) = render :partial => 'effective/orders/stripe/subscription_fields', :locals => {:form => form, :subscription => item.purchasable } %td.price= price_to_currency(item.price) %tfoot - if order.tax > 0 %tr - if include_quantity_column %th.quantity - if include_download_column %th.download %th.subtotal Subtotal %td.price.subtotal-price= price_to_currency(order.subtotal) %tr - if include_quantity_column %th.quantity - if include_download_column %th.download %th.tax Tax %td.price.tax-price= price_to_currency(order.tax) %tr - if include_quantity_column %th.quantity - if include_download_column %th.download %th.total Total Due %td.price.total-price= price_to_currency(order.total)
Version data entries
8 entries across 8 versions & 1 rubygems