Revision 295c1205
Von Tamino Steinert vor fast 2 Jahren hinzugefügt
SL/Controller/DeliveryOrder.pm | ||
---|---|---|
930 | 930 |
|
931 | 931 |
$self->merge_stock_data($stock_info, \@contents, $part, $unit); |
932 | 932 |
|
933 |
my @collection = ( |
|
934 |
{ 'description' => 'foo_1', 'id' => '1', |
|
935 |
'key_1' => [ |
|
936 |
{ 'id' => 3, 'description' => "bar_1", |
|
937 |
'key_2' => [ |
|
938 |
{ 'id' => 1, 'value' => "foobar_1", }, |
|
939 |
{ 'id' => 2, 'value' => "foobar_2", }, |
|
940 |
], |
|
941 |
}, |
|
942 |
{ 'id' => 4, 'description' => "bar_2", |
|
943 |
'key_2' => [], |
|
944 |
}, |
|
945 |
], |
|
946 |
}, |
|
947 |
{ 'description' => 'foo_2', 'id' => '2', |
|
948 |
'key_1' => [ |
|
949 |
{ 'id' => 1, 'description' => "bar_1", |
|
950 |
'key_2' => [ |
|
951 |
{ 'id' => 3, 'value' => "foobar_3", }, |
|
952 |
{ 'id' => 4, 'value' => "foobar_4", }, |
|
953 |
], |
|
954 |
}, |
|
955 |
{ 'id' => 2, 'description' => "bar_2", |
|
956 |
'stock' => [ |
|
957 |
{ 'id' => 5, 'value' => "test_5", }, |
|
958 |
], |
|
959 |
}, |
|
960 |
], |
|
961 |
}, |
|
962 |
); |
|
963 |
|
|
964 | 933 |
$self->render("delivery_order/stock_dialog", { layout => 0 }, |
965 |
WHCONTENTS => $self->order->delivered ? $stock_info : \@contents, |
|
934 |
WHCONTENTS => \@contents, |
|
935 |
STOCK_INFO => $stock_info, |
|
966 | 936 |
WAREHOUSES => SL::DB::Manager::Warehouse->get_all(with_objects=> ["bins",]), |
967 |
COLLECTION => \@collection, |
|
968 | 937 |
part => $part, |
969 | 938 |
do_qty => $qty, |
970 | 939 |
do_unit => $unit->unit, |
... | ... | |
975 | 944 |
); |
976 | 945 |
} |
977 | 946 |
|
947 |
sub action_add_stock_in_line_to_dialog { |
|
948 |
my ($self) = @_; |
|
949 |
|
|
950 |
my $do_qty = _parse_number($::form->{do_qty}); |
|
951 |
my $qty_sum = $::form->{qty_sum}; |
|
952 |
my $row_count = $::form->{row_count}; |
|
953 |
my $part = SL::DB::Part->load_cached($::form->{parts_id}) or die "need parts_id"; |
|
954 |
|
|
955 |
my $row_as_html = $self->p->render('delivery_order/stock_dialog/_stock_in_new_row', |
|
956 |
WAREHOUSES => SL::DB::Manager::Warehouse->get_all(with_objects=> ["bins",]), |
|
957 |
PART => $part, |
|
958 |
pos => $row_count + 1, |
|
959 |
remaining_qty => $do_qty - $qty_sum, |
|
960 |
); |
|
961 |
|
|
962 |
$self->js->append('#stock-in-out-table', $row_as_html)->render(); |
|
963 |
} |
|
964 |
|
|
978 | 965 |
sub action_update_stock_information { |
979 | 966 |
my ($self) = @_; |
980 | 967 |
|
Auch abrufbar als: Unified diff
Controller: DeliveryOrder: stock_dialog um Einlagern erweitert