Revision 19c3be79
Von Kivitendo Admin vor etwa 8 Jahren hinzugefügt
SL/DB/DeliveryOrderItem.pm | ||
---|---|---|
38 | 38 |
|
39 | 39 |
sub record { goto &delivery_order } |
40 | 40 |
|
41 |
sub displayable_delivery_order_info { |
|
42 |
my ($self, $dec) = @_; |
|
43 |
|
|
44 |
$dec //= 2; |
|
45 |
|
|
46 |
return SL::Presenter->get->sales_delivery_order($self->delivery_order, display => 'inline') |
|
47 |
. " " . $::form->format_amount(\%::myconfig, $self->qty, $dec) . " " . $self->unit |
|
48 |
. " (" . $self->delivery_order->transdate->to_kivitendo . ")"; |
|
49 |
}; |
|
50 |
|
|
51 |
__END__ |
|
52 |
|
|
53 |
=pod |
|
54 |
|
|
55 |
=encoding utf-8 |
|
56 |
|
|
57 |
=head1 NAME |
|
58 |
|
|
59 |
SL::DB::DeliveryOrderItem Model for the 'delivery_order_items' table |
|
60 |
|
|
61 |
=head1 SYNOPSIS |
|
62 |
|
|
63 |
This is a standard Rose::DB::Object based model and can be used as one. |
|
64 |
|
|
65 |
=head1 METHODS |
|
66 |
|
|
67 |
=over 4 |
|
68 |
|
|
69 |
=item C<displayable_delivery_order_info DEC> |
|
70 |
|
|
71 |
Returns a string with information about the delivery order item in relation to |
|
72 |
its delivery order, specifically |
|
73 |
|
|
74 |
* the (HTML-linked) delivery order number |
|
75 |
|
|
76 |
* the qty and unit of the part in the delivery order |
|
77 |
|
|
78 |
* the date of the delivery order |
|
79 |
|
|
80 |
Doesn't include any part information, it is assumed that is already shown elsewhere. |
|
81 |
|
|
82 |
The method takes an optional argument "dec" which determines how many decimals to |
|
83 |
round to, as used by format_amount. |
|
84 |
|
|
85 |
SL::DB::Manager::DeliveryOrderItem->get_first->displayable_delivery_order_info(0); |
|
86 |
# 201601234 5 Stck (12.12.2016) |
|
87 |
|
|
88 |
=back |
|
89 |
|
|
90 |
=head1 AUTHORS |
|
91 |
|
|
92 |
G. Richardson E<lt>grichardson@kivitendo-premium.deE<gt> |
|
93 |
|
|
94 |
=cut |
|
95 |
|
|
41 | 96 |
1; |
Auch abrufbar als: Unified diff
displayable_delivery_order_info für DeliveryOrderItem