Kontoauszug verbuchen: bei Vorschlägen Rechnungsnummer in Verwendungszweck highlighten
authorMoritz Bunkus <m.bunkus@linet-services.de>
Tue, 7 Feb 2017 13:24:40 +0000 (14:24 +0100)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Wed, 8 Feb 2017 16:31:01 +0000 (17:31 +0100)
css/kivitendo/main.css
css/lx-office-erp/main.css
templates/webpages/bank_transactions/tabs/automatic.html

index dd1ff54..f74c98d 100644 (file)
@@ -520,3 +520,10 @@ span.toggle_selected {
     max-width: 16px;
     max-height: 16px;
 }
+
+/* Bank transactions */
+#bank_transactions_proposals .invoice_number_highlight a,
+#bank_transactions_proposals span.invoice_number_highlight {
+  background-color: #006400;
+  color: #FFFFFF;
+}
index b3f2442..44c437f 100644 (file)
@@ -527,3 +527,10 @@ a.red {
     max-width: 16px;
     max-height: 16px;
 }
+
+/* Bank transactions */
+#bank_transactions_proposals .invoice_number_highlight a,
+#bank_transactions_proposals span.invoice_number_highlight {
+  background-color: #006400;
+  color: #FFFFFF;
+}
index 63f6d16..9caf501 100644 (file)
@@ -7,7 +7,7 @@
 [% L.hidden_tag('action', 'BankTransaction/dispatch') %]
 [% L.hidden_tag('ui_tab', ui_tab) %]
 
-<table>
+<table id="bank_transactions_proposals">
   <thead>
     <tr class="listheading">
       <th>[% L.checkbox_tag('check_all') %]</th>
           <td>[% proposal.transdate_as_date %]</td>
           <td align="right">[% LxERP.format_amount(proposal.amount,2) %]</td>
           <td></td>
-          <td>[% HTML.escape(proposal.purpose) %]</td>
+          <td>
+           [% SET purpose = HTML.escape(proposal.purpose)
+                  invnumber_found = '' ;
+              FOREACH proposed_invoice = proposal.proposals;
+                IF purpose.match(proposed_invoice.invnumber);
+                  SET invnumber_found = proposed_invoice.invnumber ;
+                END ;
+              END ;
+
+              IF invnumber_found ;
+                purpose.replace(invnumber_found, '<span class="invoice_number_highlight">' _ invnumber_found _ '</span>') ;
+              ELSE ;
+                purpose ;
+              END %]
+          </td>
           <td>[% HTML.escape(proposal.remote_name) %]</td>
         </tr>
 
           <td align="right">[% proposed_invoice.realamount %]</td>
           <td>[% proposed_invoice.skonto_type | $T8 %]
               [% L.hidden_tag("invoice_skontos." _ proposal.id _ "[]", proposed_invoice.skonto_type) %]</td>
-          <td>[% proposed_invoice.link %]</td>
+          <td[% IF proposed_invoice.invnumber == invnumber_found %] class="invoice_number_highlight"[% END %]>[% proposed_invoice.link %]</td>
           <td>[% HTML.escape(proposed_invoice.customer.name) %][% HTML.escape(proposed_invoice.vendor.name) %]</td>
         </tr>
         [% END %]
-        <tr><td style="height:10px"></td></tr>
+        <tr><td style="height:10px" colspan="8"></td></tr>
       </tbody>
     [% END %]
   [% END %]