Sha256: 71d9f01c85c71b7b9973bb01aac723cfa08d2894d6b5ba2831484c7b73e3428c
Contents?: true
Size: 1.44 KB
Versions: 140
Compression:
Stored size: 1.44 KB
Contents
<div class="field"> <%= fields_for "#{prefix}[calculator_attributes]", calculator do |f| %> <%= f.label :preferred_amount %> <%= render "spree/admin/shared/number_with_currency", f: f, amount_attr: :preferred_amount, currency_attr: :preferred_currency %> <% end %> </div> <div class="field"> <p> <%= admin_hint( calculator.model_name.human, """ <p> This amount will be distributed to line items weighted relative to their price. More expensive line items will receive a greater share of the adjustment. </p> <p> For example, with three line items and a preferred amount of $15 we would end up with the following distribution: </p> <table> <thead> <tr> <th></th> <th>Price</th> <th>Weighted Adj.</th> </tr> </thead> <tbody> <tr> <td>Socks</td> <td>$5</td> <td>-$1.5</td> </tr> <tr> <td>Shoes</td> <td>$30</td> <td>-$9</td> </tr> <tr> <td>Slippers</td> <td>$15</td> <td>-$4.5</td> </tr> </tbody> </table> """ ) %> This amount will be the <strong>total</strong> discount spread amongst all of the line items. </p> </div>
Version data entries
140 entries across 140 versions & 4 rubygems