Berichte->Aufträge/Lieferantenaufträge: Zahlungsbedingungen anzeigen
authorBernd Bleßmann <bernd@kivitendo-premium.de>
Mon, 18 May 2015 06:59:30 +0000 (08:59 +0200)
committerBernd Bleßmann <bernd@kivitendo-premium.de>
Mon, 18 May 2015 06:59:30 +0000 (08:59 +0200)
SL/OE.pm
bin/mozilla/oe.pl
templates/webpages/oe/search.html

index b8dd560..8430e2a 100644 (file)
--- a/SL/OE.pm
+++ b/SL/OE.pm
@@ -111,6 +111,7 @@ sub transactions {
     qq|  o.marge_total, o.marge_percent, | .
     qq|  o.itime::DATE AS insertdate, | .
     qq|  ex.$rate AS exchangerate, | .
+    qq|  pt.description AS payment_terms, | .
     qq|  pr.projectnumber AS globalprojectnumber, | .
     qq|  e.name AS employee, s.name AS salesman, | .
     qq|  ct.${vc}number AS vcnumber, ct.country, ct.ustid, ct.business_id,  | .
@@ -125,6 +126,7 @@ sub transactions {
     qq|LEFT JOIN exchangerate ex ON (ex.currency_id = o.currency_id | .
     qq|  AND ex.transdate = o.transdate) | .
     qq|LEFT JOIN project pr ON (o.globalproject_id = pr.id) | .
+    qq|LEFT JOIN payment_terms pt ON (pt.id = o.payment_id)| .
     qq|LEFT JOIN tax_zones tz ON (o.taxzone_id = tz.id) | .
     qq|$periodic_invoices_joins | .
     qq|WHERE (o.quotation = ?) |;
@@ -307,6 +309,7 @@ SQL
     "shippingpoint"           => "o.shippingpoint",
     "insertdate"              => "o.itime",
     "taxzone"                 => "tz.description",
+    "payment_terms"           => "pt.description",
   );
   if ($form->{sort} && grep($form->{sort}, keys(%allowed_sort_columns))) {
     $sortorder = $allowed_sort_columns{$form->{sort}} . " ${sortdir}"  . ", o.itime ${sortdir}";
index 93e9f2a..9d297b8 100644 (file)
@@ -853,6 +853,7 @@ sub orders {
     "country",                 "shippingpoint",
     "taxzone",                 "insertdate",
     "order_probability",       "expected_billing_date", "expected_netamount",
+    "payment_terms",
   );
 
   # only show checkboxes if gotten here via sales_order form.
@@ -944,10 +945,11 @@ sub orders {
     'order_probability'       => { 'text' => $locale->text('Order probability'), },
     'expected_billing_date'   => { 'text' => $locale->text('Exp. bill. date'), },
     'expected_netamount'      => { 'text' => $locale->text('Exp. netamount'), },
+    'payment_terms'           => { 'text' => $locale->text('Payment Terms'), },
     %column_defs_cvars,
   );
 
-  foreach my $name (qw(id transdate reqdate quonumber ordnumber cusordnumber name employee salesman shipvia transaction_description shippingpoint taxzone insertdate)) {
+  foreach my $name (qw(id transdate reqdate quonumber ordnumber cusordnumber name employee salesman shipvia transaction_description shippingpoint taxzone insertdate payment_terms)) {
     my $sortdir                 = $form->{sort} eq $name ? 1 - $form->{sortdir} : $form->{sortdir};
     $column_defs{$name}->{link} = $href . "&sort=$name&sortdir=$sortdir";
   }
index 323fd23..b7a2491 100644 (file)
          <input name="l_marge_percent" id="l_marge_percent" class="checkbox" type="checkbox" value="Y">
          <label for="l_marge_percent">[% 'Ertrag prozentual' | $T8 %]</label>
         </td>
+        <td>
+         <input name="l_payment_terms" id="l_payment_terms" class="checkbox" type="checkbox" value="Y">
+         <label for="l_payment_terms">[% 'Payment Terms' | $T8 %]</label>
+        </td>
        </tr>
        <tr>
         <td>