mirror of
https://github.com/rickbarrette/redmine_qbo_lineitems.git
synced 2026-07-02 00:51:08 -04:00
Compare commits
2 Commits
2026.4.1
...
0acf5ffca4
| Author | SHA1 | Date | |
|---|---|---|---|
| 0acf5ffca4 | |||
| 5b1d98aa07 |
@@ -1,42 +1,50 @@
|
|||||||
<% if @issue.line_items.any? %>
|
<% if @issue.line_items.any? || @issue.descendant_line_items_total > 0%>
|
||||||
<hr/>
|
<hr/>
|
||||||
<div>
|
<div>
|
||||||
<p><strong><%= t :label_line_items %></strong></p>
|
<p><strong><%= t :label_line_items %></strong></p>
|
||||||
|
|
||||||
<table class="list line-items-table">
|
<% total = 0 %>
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th style="width:70%;"><%= t :label_description %></th>
|
|
||||||
<th style="width:10%;"><%= t :label_qty %></th>
|
|
||||||
<th style="width:10%;"><%= t :label_price %></th>
|
|
||||||
<th style="width:10%;"><%= t :label_total %></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
|
|
||||||
<tbody>
|
<% if @issue.line_items.any?%>
|
||||||
<% total = 0 %>
|
|
||||||
|
|
||||||
<% @issue.line_items.each do |item| %>
|
|
||||||
<% line_total = item.quantity.to_f * item.unit_price.to_f %>
|
|
||||||
<% total += line_total %>
|
|
||||||
|
|
||||||
|
<table class="list line-items-table">
|
||||||
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td><%= h item.description %></td>
|
<th style="width:70%;"><%= t :label_description %></th>
|
||||||
<td><%= item.quantity %></td>
|
<th style="width:10%;"><%= t :label_qty %></th>
|
||||||
<td><%= number_to_currency(item.unit_price) %></td>
|
<th style="width:10%;"><%= t :label_price %></th>
|
||||||
<td><%= number_to_currency(line_total) %></td>
|
<th style="width:10%;"><%= t :label_total %></th>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
</thead>
|
||||||
</tbody>
|
|
||||||
|
|
||||||
<tfoot>
|
<tbody>
|
||||||
<tr>
|
|
||||||
<td colspan="3" style="text-align:right;"><strong><%= t :label_total %></strong></td>
|
<% @issue.line_items.each do |item| %>
|
||||||
<td>
|
<% line_total = item.quantity.to_f * item.unit_price.to_f %>
|
||||||
<strong><%= number_to_currency(total) %></strong>
|
<% total += line_total %>
|
||||||
</td>
|
|
||||||
</tr>
|
<tr>
|
||||||
<% if @issue.children? %>
|
<td><%= h item.description %></td>
|
||||||
|
<td><%= item.quantity %></td>
|
||||||
|
<td><%= number_to_currency(item.unit_price) %></td>
|
||||||
|
<td><%= number_to_currency(line_total) %></td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
</tbody>
|
||||||
|
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<tfoot>
|
||||||
|
<% if @issue.line_items.any?%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3" style="text-align:right;"><strong><%= t :label_total %></strong></td>
|
||||||
|
<td>
|
||||||
|
<strong><%= number_to_currency(total) %></strong>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% if @issue.descendant_line_items_total > 0 %>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="3" style="text-align:right;"><strong><%= t :label_running_total %></strong></td>
|
<td colspan="3" style="text-align:right;"><strong><%= t :label_running_total %></strong></td>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ Redmine::Plugin.register :redmine_qbo_lineitems do
|
|||||||
name 'Redmine QBO Line Items plugin'
|
name 'Redmine QBO Line Items plugin'
|
||||||
author 'Rick Barrette'
|
author 'Rick Barrette'
|
||||||
description 'A plugin for Redmine to extend the capabilitys of the Redmine QuickBooks Online plugin to attach billable line items to an isuue'
|
description 'A plugin for Redmine to extend the capabilitys of the Redmine QuickBooks Online plugin to attach billable line items to an isuue'
|
||||||
version '2026.4.1'
|
version '2026.4.2'
|
||||||
url 'https://github.com/rickbarrette/redmine_qbo_lineitems'
|
url 'https://github.com/rickbarrette/redmine_qbo_lineitems'
|
||||||
author_url 'https://barrettefabrication.com'
|
author_url 'https://barrettefabrication.com'
|
||||||
requires_redmine version_or_higher: '6.1.0'
|
requires_redmine version_or_higher: '6.1.0'
|
||||||
|
|||||||
Reference in New Issue
Block a user