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/ap.pl
47 47
use SL::DB::Chart;
48 48
use SL::DB::Currency;
49 49
use SL::DB::Default;
50
use SL::DB::InvoiceItem;
50 51
use SL::DB::Order;
51 52
use SL::DB::PaymentTerm;
52 53
use SL::DB::PurchaseInvoice;
53 54
use SL::DB::RecordTemplate;
54 55
use SL::DB::Tax;
56
use SL::Presenter::ItemsList;
55 57
use SL::Webdav;
56 58
use SL::Locale::String qw(t8);
57 59

  
......
1045 1047
    qw(transdate id type invnumber ordnumber name netamount tax amount paid datepaid
1046 1048
       due duedate transaction_description notes employee globalprojectnumber department
1047 1049
       vendornumber country ustid taxzone payment_terms charts debit_chart direct_debit
1048
       insertdate);
1050
       insertdate items);
1049 1051

  
1050 1052
  my @hidden_variables = map { "l_${_}" } @columns;
1051 1053
  push @hidden_variables, "l_subtotal", qw(open closed vendor invnumber ordnumber transaction_description notes project_id
......
1082 1084
    'debit_chart'             => { 'text' => $locale->text('Debit Account'), },
1083 1085
    'direct_debit'            => { 'text' => $locale->text('direct debit'), },
1084 1086
    'insertdate'              => { 'text' => $locale->text('Insert Date'), },
1087
    'items'                   => { 'text' => $locale->text('Positions'), },
1085 1088
  );
1086 1089

  
1087 1090
  foreach my $name (qw(id transdate duedate invnumber ordnumber name datepaid employee shippingpoint shipvia transaction_description direct_debit department taxzone)) {
......
1176 1179
    my $row = { };
1177 1180

  
1178 1181
    foreach my $column (@columns) {
1182
      next if ($column eq 'items');
1183

  
1179 1184
      $row->{$column} = {
1180 1185
        'data'  => $ap->{$column},
1181 1186
        'align' => $column_alignment{$column},
......
1185 1190
    $row->{invnumber}->{link} = build_std_url("script=" . ($ap->{invoice} ? 'ir.pl' : 'ap.pl'), 'action=edit')
1186 1191
      . "&id=" . E($ap->{id}) . "&callback=${callback}";
1187 1192

  
1193
    if ($form->{l_items}) {
1194
      my $items = SL::DB::Manager::InvoiceItem->get_all_sorted(where => [id => $ap->{item_ids}]);
1195
      $row->{items}->{raw_data}  = SL::Presenter::ItemsList::items_list($items)               if lc($report->{options}->{output_format}) eq 'html';
1196
      $row->{items}->{data}      = SL::Presenter::ItemsList::items_list($items, as_text => 1) if lc($report->{options}->{output_format}) ne 'html';
1197
    }
1198

  
1188 1199
    my $row_set = [ $row ];
1189 1200

  
1190 1201
    if (($form->{l_subtotal} eq 'Y')

Auch abrufbar als: Unified diff