Bug 39959: Add a total column to the invoices table
Test plan: 1. Create an order and receive it to create an invoice 2. In the invoices search, look for your invoice 3. There will be no total against the invoice 4. Apply patch and restart_all 5. Refresh the page, the total column should now be present Signed-off-by: Coleen Lilly <clilly@aacpl.net> Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
parent
2ce97a58e2
commit
ce3643073a
|
|
@ -2418,6 +2418,7 @@ sub GetInvoices {
|
|||
my $query = qq{
|
||||
SELECT aqinvoices.invoiceid, aqinvoices.invoicenumber, aqinvoices.booksellerid, aqinvoices.shipmentdate, aqinvoices.billingdate, aqinvoices.closedate, aqinvoices.shipmentcost, aqinvoices.shipmentcost_budgetid, aqinvoices.message_id,
|
||||
aqbooksellers.name AS suppliername,
|
||||
aqbooksellers.invoiceincgst,
|
||||
COUNT(
|
||||
DISTINCT IF(
|
||||
aqorders.datereceived IS NOT NULL,
|
||||
|
|
@ -2538,7 +2539,7 @@ sub GetInvoices {
|
|||
}
|
||||
|
||||
$query .=
|
||||
" GROUP BY aqinvoices.invoiceid, aqinvoices.invoicenumber, aqinvoices.booksellerid, aqinvoices.shipmentdate, aqinvoices.billingdate, aqinvoices.closedate, aqinvoices.shipmentcost, aqinvoices.shipmentcost_budgetid, aqinvoices.message_id, aqbooksellers.name";
|
||||
" GROUP BY aqinvoices.invoiceid, aqinvoices.invoicenumber, aqinvoices.booksellerid, aqinvoices.shipmentdate, aqinvoices.billingdate, aqinvoices.closedate, aqinvoices.shipmentcost, aqinvoices.shipmentcost_budgetid, aqinvoices.message_id, aqbooksellers.name, aqbooksellers.invoiceincgst";
|
||||
|
||||
if ( $args{order_by} ) {
|
||||
my ( $column, $direction ) = split / /, $args{order_by};
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
[% USE AuthorisedValues %]
|
||||
[% USE KohaDates %]
|
||||
[% USE Branches %]
|
||||
[% USE Price %]
|
||||
[% SET footerjs = 1 %]
|
||||
[% PROCESS 'i18n.inc' %]
|
||||
[% INCLUDE 'doc-head-open.inc' %]
|
||||
|
|
@ -66,6 +67,7 @@
|
|||
<th>Billing date</th>
|
||||
<th>Received bibliographic records</th>
|
||||
<th>Received items</th>
|
||||
<th>Total</th>
|
||||
<th>Status</th>
|
||||
<th class="no-sort"> </th>
|
||||
</tr>
|
||||
|
|
@ -91,6 +93,13 @@
|
|||
<td data-order="[% invoice.billingdate | html %]"> [% invoice.billingdate | $KohaDates %] </td>
|
||||
<td>[% invoice.receivedbiblios | html %]</td>
|
||||
<td>[% invoice.receiveditems | html %]</td>
|
||||
<td>
|
||||
[% IF invoice.invoiceincgst %]
|
||||
[% invoice.total_tax_included + invoice.total_adj + invoice.shipmentcost | $Price %]
|
||||
[% ELSE %]
|
||||
[% invoice.total_tax_excluded + invoice.total_adj + invoice.shipmentcost | $Price %]
|
||||
[% END %]
|
||||
</td>
|
||||
<td>
|
||||
[% IF invoice.closedate %]
|
||||
<span>Closed on [% invoice.closedate | $KohaDates %]</span>
|
||||
|
|
|
|||
Loading…
Reference in New Issue