Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 3a77cbe1

Von Bernd Bleßmann vor etwa 2 Jahren hinzugefügt

  • ID 3a77cbe16e291187e5b271c83ee620eec0a0cb02
  • Vorgänger 09696cb9
  • Nachfolger b945837f

Belegberichte (Angebote/Aufträge) mit Positionsdetails

Unterschiede anzeigen:

bin/mozilla/oe.pl
37 37
use POSIX qw(strftime);
38 38

  
39 39
use SL::DB::Order;
40
use SL::DB::OrderItem;
40 41
use SL::DO;
41 42
use SL::FU;
42 43
use SL::OE;
......
44 45
use SL::IS;
45 46
use SL::Helper::UserPreferences::DisplayPreferences;
46 47
use SL::MoreCommon qw(ary_diff restore_form save_form);
48
use SL::Presenter::ItemsList;
47 49
use SL::ReportGenerator;
48 50
use SL::YAML;
49 51
use List::MoreUtils qw(uniq any none);
......
1056 1058
    "taxzone",                 "insertdate",
1057 1059
    "order_probability",       "expected_billing_date", "expected_netamount",
1058 1060
    "payment_terms",           "intnotes",              "order_status",
1061
    "items",
1059 1062
  );
1060 1063

  
1061 1064
  # only show checkboxes if gotten here via sales_order form.
......
1151 1154
    'payment_terms'           => { 'text' => $locale->text('Payment Terms'), },
1152 1155
    'intnotes'                => { 'text' => $locale->text('Internal Notes'), },
1153 1156
    'order_status'            => { 'text' => $locale->text('Status'), },
1157
    'items'                   => { 'text' => $locale->text('Positions'), },
1154 1158
    %column_defs_cvars,
1155 1159
  );
1156 1160

  
......
1169 1173
                             expected_netamount);
1170 1174

  
1171 1175
  $form->{"l_type"} = "Y";
1176

  
1172 1177
  map { $column_defs{$_}->{visible} = $form->{"l_${_}"} ? 1 : 0 } @columns;
1173 1178
  $column_defs{ids}->{visible} = $allow_multiple_orders ? 'HTML' : 0;
1174 1179

  
......
1299 1304

  
1300 1305
    foreach my $column (@columns) {
1301 1306
      next if ($column eq 'ids');
1307
      next if ($column eq 'items');
1302 1308
      $row->{$column} = {
1303 1309
        'data'  => $oe->{$column},
1304 1310
        'align' => $column_alignment{$column},
......
1314 1320

  
1315 1321
    $row->{$ordnumber}->{link} = $edit_url . "&id=" . E($oe->{id}) . "&callback=${callback}" unless $params{want_binary_pdf};
1316 1322

  
1323
    if ($form->{l_items}) {
1324
      my $items = SL::DB::Manager::OrderItem->get_all_sorted(where => [id => $oe->{item_ids}]);
1325
      $row->{items}->{raw_data}  = SL::Presenter::ItemsList::items_list($items)               if lc($report->{options}->{output_format}) eq 'html';
1326
      $row->{items}->{data}      = SL::Presenter::ItemsList::items_list($items, as_text => 1) if lc($report->{options}->{output_format}) ne 'html';
1327
    }
1328

  
1317 1329
    my $row_set = [ $row ];
1318 1330

  
1319 1331
    if (($form->{l_subtotal} eq 'Y')

Auch abrufbar als: Unified diff