Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision b008860a

Von Bernd Bleßmann vor mehr als 2 Jahren hinzugefügt

  • ID b008860ae0d3a6d48a25b0e822e281a63dcaa432
  • Vorgänger 916ec1da
  • Nachfolger 0c318d78

Belegberichte (Rechnungen) mit Positionsdetails

Unterschiede anzeigen:

bin/mozilla/ar.pl
48 48
use SL::DB::Default;
49 49
use SL::DB::Employee;
50 50
use SL::DB::Invoice;
51
use SL::DB::InvoiceItem;
51 52
use SL::DB::RecordTemplate;
52 53
use SL::DB::Tax;
53 54
use SL::Helper::Flash qw(flash flash_later);
54 55
use SL::Locale::String qw(t8);
55 56
use SL::Presenter::Tag;
56 57
use SL::Presenter::Chart;
58
use SL::Presenter::ItemsList;
57 59
use SL::ReportGenerator;
58 60

  
59 61
require "bin/mozilla/common.pl";
......
1028 1030
    qw(ids transdate id type invnumber ordnumber cusordnumber donumber deliverydate name netamount tax amount paid
1029 1031
       datepaid due duedate transaction_description notes salesman employee shippingpoint shipvia
1030 1032
       marge_total marge_percent globalprojectnumber customernumber country ustid taxzone
1031
       payment_terms charts customertype direct_debit dunning_description department attachments);
1033
       payment_terms charts customertype direct_debit dunning_description department attachments
1034
       items);
1032 1035

  
1033 1036
  my $ct_cvar_configs                 = CVar->get_configs('module' => 'CT');
1034 1037
  my @ct_includeable_custom_variables = grep { $_->{includeable} } @{ $ct_cvar_configs };
......
1084 1087
    'department'              => { 'text' => $locale->text('Department'), },
1085 1088
    dunning_description       => { 'text' => $locale->text('Dunning level'), },
1086 1089
    attachments               => { 'text' => $locale->text('Attachments'), },
1090
    items                     => { 'text' => $locale->text('Positions'), },
1087 1091
    %column_defs_cvars,
1088 1092
  );
1089 1093

  
......
1252 1256
    my $row = { };
1253 1257

  
1254 1258
    foreach my $column (@columns) {
1259
      next if ($column eq 'items');
1260

  
1255 1261
      $row->{$column} = {
1256 1262
        'data'  => $ar->{$column},
1257 1263
        'align' => $column_alignment{$column},
......
1281 1287

  
1282 1288
    }
1283 1289

  
1290
    if ($form->{l_items}) {
1291
      my $items = SL::DB::Manager::InvoiceItem->get_all_sorted(where => [id => $ar->{item_ids}]);
1292
      $row->{items}->{raw_data}  = SL::Presenter::ItemsList::items_list($items)               if lc($report->{options}->{output_format}) eq 'html';
1293
      $row->{items}->{data}      = SL::Presenter::ItemsList::items_list($items, as_text => 1) if lc($report->{options}->{output_format}) ne 'html';
1294
    }
1295

  
1284 1296
    my $row_set = [ $row ];
1285 1297

  
1286 1298
    if (($form->{l_subtotal} eq 'Y')

Auch abrufbar als: Unified diff