Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 74ca7b2c

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

  • ID 74ca7b2cd0be09622f27cf4aed377a910fa609c3
  • Vorgänger b16a2fe1
  • Nachfolger a6d6eeff

RecordLinks für neue Lieferscheintypen

Unterschiede anzeigen:

SL/Presenter/DeliveryOrder.pm
15 15
  return _do_record($delivery_order, 'sales_delivery_order', %params);
16 16
}
17 17

  
18
sub rma_delivery_order {
19
  my ($delivery_order, %params) = @_;
20

  
21
  return _do_new_record($delivery_order, 'rma_delivery_order', %params);
22
}
23

  
18 24
sub purchase_delivery_order {
19 25
  my ($delivery_order, %params) = @_;
20 26

  
21 27
  return _do_record($delivery_order, 'purchase_delivery_order', %params);
22 28
}
23 29

  
30
sub supplier_delivery_order {
31
  my ($delivery_order, %params) = @_;
32

  
33
  return _do_new_record($delivery_order, 'supplier_delivery_order', %params);
34
}
35

  
36
sub _do_new_record {
37
  my ($delivery_order, $type, %params) = @_;
38

  
39
  $params{display} ||= 'inline';
40

  
41
  croak "Unknown display type '$params{display}'" unless $params{display} =~ m/^(?:inline|table-cell)$/;
42

  
43
  my $text = join '', (
44
    $params{no_link} ? '' : '<a href="contoller.pl?action=DeliveryOrder/edit&amp;type=' . $type . '&amp;id=' . escape($delivery_order->id) . '">',
45
    escape($delivery_order->donumber),
46
    $params{no_link} ? '' : '</a>',
47
  );
48
  is_escaped($text);
49
}
50

  
24 51
sub _do_record {
25 52
  my ($delivery_order, $type, %params) = @_;
26 53

  

Auch abrufbar als: Unified diff