Auftrags-Controller: Zahlungs- und Lieferbedingungen
authorBernd Bleßmann <bernd@kivitendo-premium.de>
Wed, 16 Sep 2015 07:55:25 +0000 (09:55 +0200)
committerG. Richardson <information@kivitendo-premium.de>
Mon, 16 Nov 2015 15:15:57 +0000 (16:15 +0100)
SL/Controller/Order.pm
templates/webpages/order/tabs/basic_data.html

index 836351e..9d9624d 100644 (file)
@@ -352,13 +352,15 @@ sub _save {
 sub _pre_render {
   my ($self) = @_;
 
-  $self->{all_taxzones}  = SL::DB::Manager::TaxZone->get_all_sorted();
-  $self->{all_employees} = SL::DB::Manager::Employee->get_all(where => [ or => [ id => $self->order->employee_id,
-                                                                                 deleted => 0 ] ],
-                                                              sort_by => 'name');
-  $self->{all_projects}  = SL::DB::Manager::Project->get_all(where => [ or => [ id => $self->order->globalproject_id,
-                                                                                active => 1 ] ],
-                                                             sort_by => 'projectnumber');
+  $self->{all_taxzones}        = SL::DB::Manager::TaxZone->get_all_sorted();
+  $self->{all_employees}       = SL::DB::Manager::Employee->get_all(where => [ or => [ id => $self->order->employee_id,
+                                                                                       deleted => 0 ] ],
+                                                                    sort_by => 'name');
+  $self->{all_projects}        = SL::DB::Manager::Project->get_all(where => [ or => [ id => $self->order->globalproject_id,
+                                                                                      active => 1 ] ],
+                                                                   sort_by => 'projectnumber');
+  $self->{all_payment_terms}   = SL::DB::Manager::PaymentTerm->get_all_sorted();
+  $self->{all_delivery_terms}  = SL::DB::Manager::DeliveryTerm->get_all_sorted();
 
   $self->{current_employee_id} = SL::DB::Manager::Employee->current->id;
 }
index da1cbaf..374b9d8 100644 (file)
     </tr>
 
     <tr>
-      <td align="right">
-        <table>
-          [%- IF NOT taxincluded %]
+      <td colspan="100%" width="100%">
+        <table width="100%">
           <tr>
-            <th align="right">[%- 'Subtotal' | $T8 %]</th>
-            <td align="right">
-              [%- L.div_tag(SELF.order.netamount_as_number, id='netamount_id') %]
+            <td>
+              <table>
+                <tr>
+                  <th align="right">[% 'Payment Terms' | $T8 %]</th>
+                  <td>[% L.select_tag('order.payment_id',
+                                      SELF.all_payment_terms,
+                                      default = SELF.order.payment_id,
+                                      with_empty = 1,
+                                      title_key = 'description',
+                                      style = 'width: 250px;') %]</td>
+                </tr>
+                <tr>
+                  <th align="right">[% 'Delivery Terms' | $T8 %]</th>
+                  <td>[% L.select_tag('order.delivery_term_id',
+                                      SELF.all_delivery_terms,
+                                      default = SELF.order.delivery_term_id,
+                                      with_empty = 1,
+                                      title_key = 'description',
+                                      style = 'width: 250px;') %]</td>
+                </tr>
+              </table>
             </td>
-          </tr>
-          [%- END %]
-          [%- FOREACH tax = SELF.taxes %]
-            [%- PROCESS order/tabs/_tax_row.html TAX=tax %]
-          [%- END %]
-          <tr id="amount_row_id">
-            <th align="right">[%- 'Total' | $T8 %]</th>
+
             <td align="right">
-              [%- L.div_tag(SELF.order.amount_as_number, id='amount_id') %]
+              <table>
+                [%- IF NOT taxincluded %]
+                <tr>
+                  <th align="right">[%- 'Subtotal' | $T8 %]</th>
+                  <td align="right">
+                    [%- L.div_tag(SELF.order.netamount_as_number, id='netamount_id') %]
+                  </td>
+                </tr>
+                [%- END %]
+                [%- FOREACH tax = SELF.taxes %]
+                  [%- PROCESS order/tabs/_tax_row.html TAX=tax %]
+                [%- END %]
+                <tr id="amount_row_id">
+                  <th align="right">[%- 'Total' | $T8 %]</th>
+                  <td align="right">
+                    [%- L.div_tag(SELF.order.amount_as_number, id='amount_id') %]
+                </tr>
+              </table>
+            </td>
+
           </tr>
         </table>
       </td>