title: How to set discount value in Quick Book?
body: <p>I am trying to apply discount value in Quick book but for some reason discount does not apply in Quickbook. Can you please guide me how can i resolve this issue?</p>
  
  <pre><code>https://github.com/ruckus/quickbooks-ruby/issues/267
  </code></pre>
  
  <p>Discount value code:</p>
  
  <pre><code>              discount_amount = discount_value
                discount_line_item = Quickbooks::Model::InvoiceLineItem.new
                discount_line_item.amount = discount_amount#149
                discount_line_item.discount_item! do |detail|
                  detail.discount_account_id = 48
                end
  
  Discount percentage code:
  
  discount_line_item = Quickbooks::Model::InvoiceLineItem.new
                discount_line_item.amount = discount_percentage_value#149
                discount_line_item.discount_item! do |detail|
                  detail.discount_percent = discount_percentage_value#60
                  detail.percent_based = percent_based
                  detail.discount_account_id = 48
  end
   invoice.line_items &lt;&lt; discount_line_item
  </code></pre>