Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision d7a85179

Von Sven Schöling vor fast 8 Jahren hinzugefügt

  • ID d7a8517938d65265edd1ece1d0158f7011e8c63f
  • Vorgänger acfaa946
  • Nachfolger 32ea5056

Presenter::Record auf neue Konvention umgestellt

Unterschiede anzeigen:

SL/Presenter/Record.pm
25 25
  my %grouped = _group_records( [ $record ] ); # pass $record as arrayref
26 26
  my $type    = (keys %grouped)[0];
27 27

  
28
  return $self->sales_invoice(   $record, %params) if $type eq 'sales_invoices';
29
  return $self->purchase_invoice($record, %params) if $type eq 'purchase_invoices';
30
  return $self->ar_transaction(  $record, %params) if $type eq 'ar_transactions';
31
  return $self->ap_transaction(  $record, %params) if $type eq 'ap_transactions';
32
  return $self->gl_transaction(  $record, %params) if $type eq 'gl_transactions';
28
  return $record->presenter->render(%params);
33 29

  
34 30
  return '';
35 31
}
......
364 360
    type    => 'sales_invoice',
365 361
    columns => [
366 362
      [ $::locale->text('Invoice Date'),            'transdate'               ],
367
      [ $::locale->text('Type'),                    sub { $_[0]->displayable_type } ],
368
      [ $::locale->text('Invoice Number'),          sub { $self->sales_invoice($_[0], display => 'table-cell') } ],
363
      [ $::locale->text('Type'),                    sub { $_[0]->presenter->type } ],
364
      [ $::locale->text('Invoice Number'),          sub { $_[0]->presenter->table_cell } ],
369 365
      [ $::locale->text('Quotation Number'),        'quonumber' ],
370 366
      [ $::locale->text('Order Number'),            'ordnumber' ],
371 367
      [ $::locale->text('Customer'),                'customer'                ],
......
386 382
    type    => 'purchase_invoice',
387 383
    columns => [
388 384
      [ $::locale->text('Invoice Date'),                 'transdate'               ],
389
      [ $::locale->text('Invoice Number'),               sub { $self->purchase_invoice($_[0], display => 'table-cell') } ],
385
      [ $::locale->text('Invoice Number'),               sub { $_[0]->presenter->table_cell } ],
390 386
      [ $::locale->text('Request for Quotation Number'), 'quonumber' ],
391 387
      [ $::locale->text('Order Number'),                 'ordnumber' ],
392 388
      [ $::locale->text('Vendor'),                       'vendor'                 ],
......
407 403
    type    => 'ar_transaction',
408 404
    columns => [
409 405
      [ $::locale->text('Invoice Date'),            'transdate'               ],
410
      [ $::locale->text('Type'),                    sub { $_[0]->displayable_type } ],
411
      [ $::locale->text('Invoice Number'),          sub { $self->ar_transaction($_[0], display => 'table-cell') } ],
406
      [ $::locale->text('Type'),                    sub { $_[0]->presenter->type } ],
407
      [ $::locale->text('Invoice Number'),          sub { $_[0]->presenter->table_cell } ],
412 408
      [ $::locale->text('Customer'),                'customer'                ],
413 409
      [ $::locale->text('Net amount'),              'netamount'               ],
414 410
      [ $::locale->text('Paid'),                    'paid'                    ],
......
427 423
    type    => 'ap_transaction',
428 424
    columns => [
429 425
      [ $::locale->text('Invoice Date'),            'transdate'                      ],
430
      [ $::locale->text('Invoice Number'),          sub { $self->ap_transaction($_[0 ], display => 'table-cell') } ],
426
      [ $::locale->text('Invoice Number'),          sub { $_[0]->presenter->table_cell } ],
431 427
      [ $::locale->text('Vendor'),                  'vendor'                         ],
432 428
      [ $::locale->text('Net amount'),              'netamount'                      ],
433 429
      [ $::locale->text('Paid'),                    'paid'                           ],
......
447 443
    columns => [
448 444
      [ $::locale->text('Date'),        'transdate'                                                    ],
449 445
      [ $::locale->text('Reference'),   'reference'                                                    ],
450
      [ $::locale->text('Description'), sub { $self->gl_transaction($_[0 ], display => 'table-cell') } ],
446
      [ $::locale->text('Description'), sub { $_[0]->presenter->table_cell } ],
451 447
    ],
452 448
    %params,
453 449
  );

Auch abrufbar als: Unified diff