Revision 995e5842
Von Bernd Bleßmann vor etwa 9 Jahren hinzugefügt
SL/DB/Helper/FlattenToForm.pm | ||
---|---|---|
49 | 49 |
$form->{department} = $self->department->description if _has($self, 'department_id'); |
50 | 50 |
$form->{rowcount} = scalar(@{ $self->items }); |
51 | 51 |
|
52 |
my $items_name = ref($self) eq 'SL::DB::Order' ? 'orderitems' |
|
53 |
: ref($self) eq 'SL::DB::DeliveryOrder' ? 'delivery_order_items' |
|
54 |
: ref($self) eq 'SL::DB::Invoice' ? 'invoice' |
|
55 |
: ''; |
|
56 |
|
|
52 | 57 |
my $idx = 0; |
53 | 58 |
my $format_amounts = $params{format_amounts} ? 1 : 0; |
54 | 59 |
my $format_notnull = $params{format_amounts} ? 2 : 0; |
... | ... | |
60 | 65 |
$idx++; |
61 | 66 |
|
62 | 67 |
$form->{"partsgroup_${idx}"} = $item->part->partsgroup->partsgroup if _has($item->part, 'partsgroup_id'); |
68 |
_copy($item, $form, "${items_name}_", "_${idx}", 0, qw(id)) if $items_name; |
|
63 | 69 |
_copy($item->part, $form, '', "_${idx}", 0, qw(id partnumber weight)); |
64 | 70 |
_copy($item->part, $form, '', "_${idx}", 0, qw(listprice)); |
65 | 71 |
_copy($item, $form, '', "_${idx}", 0, qw(description project_id ship serialnumber pricegroup_id ordnumber donumber cusordnumber unit |
Auch abrufbar als: Unified diff
FlattenToForm: item_ids berücksichtigen.