#L2572" data-txt="2572">
$webdav_file->store(data => \$content);
1;
} or do {
push @errors, t8('Storing PDF to webdav folder failed: #1', $@);
};
}
if ($reclamation->id && $::instance_conf->get_doc_storage) {
eval {
SL::File->save(object_id => $reclamation->id,
object_type => $reclamation->type,
mime_type => 'application/pdf',
source => 'created',
file_type => 'document',
file_name => $filename,
file_contents => $content);
1;
} or do {
push @errors, t8('Storing PDF in storage backend failed: #1', $@);
};
}

return @errors;
}

1;

__END__

=encoding utf-8

=head1 NAME

SL::Controller::Reclamation - controller for reclamations

=head1 SYNOPSIS

This is a new form to enter reclamations, written with the use
of controller and java script techniques.

The aim is to provide the user a good experience and a fast workflow.

=head2 Key Features

=over 4

=item *

One input row, so that input happens every time at the same place.

=item *

Use of pickers where possible.

=item *

Possibility to enter more than one item at once.

=item *

Item list in a scrollable area, so that the workflow buttons stay at
the bottom.

=item *

<<<<<<< HEAD
Ordering item rows with drag and drop is possible. Sorting item rows is possible
(by partnumber, description, reason, reason_description_int,
reason_description_ext, qty, sellprice and discount for now).
=======
Ordering item rows with drag and drop is possible. Sorting item rows is
possible (by partnumber, description, reason, qty, sellprice
and discount for now).
>>>>>>> 66ac9fa6c7 (Reclamation: don't need shipped_qty)

=item *

No C<update> is necessary. All entries and calculations are managed
with ajax-calls and the page only reloads on C<save>.

=item *

User can see changes immediately, because of the use of java script
and ajax.

=item *

Parts that are linked though RecordLinks are protected against price editing.

=back

=head1 CODE

=head2 Layout

=over 4

=item * C<SL/Controller/Reclamation.pm>

the controller

=item * C<template/webpages/reclamation/form.html>

main form

=item * C<template/webpages/reclamation/tabs/basic_data.html>

Main tab for basic_data.

This is the only tab here for now. "webdav", "documents", "attachements" and
"linked records" tabs are reused from generic code.

=over 4

=item * C<template/webpages/reclamation/tabs/basic_data/_business_info_row.html>

For displaying information on business type

=item * C<template/webpages/reclamation/tabs/basic_data/_item_input.html>

The input line for items

=item * C<template/webpages/reclamation/tabs/basic_data/_row.html>

One row for already entered items

=item * C<template/webpages/reclamation/tabs/basic_data/_second_row.html>

Foldable second row for already entered items with more fields

=item * C<template/webpages/reclamation/tabs/basic_data/_tax_row.html>

Displaying tax information

=item * C<template/webpages/reclamation/tabs/basic_data/_price_sources_dialog.html>

Dialog for selecting price and discount sources

=back

=item * C<js/kivi.Reclamation.js>

java script functions

=back

=head1 KNOWN BUGS AND CAVEATS

=over 4

=item *

Table header is not sticky in the scrolling area.

=item *

Sorting does not include C<position>, neither does reordering.

This behavior was implemented intentionally. But we can discuss, which behavior
should be implemented.

=back

=head1 To discuss / Nice to have

=over 4

=item *

Possibility to select PriceSources in input row?

=item *

This controller uses a (changed) copy of the template for the PriceSource
dialog. Maybe there could be used one code source.

=item *

A warning when leaving the page without saveing unchanged inputs.

=back

=head1 AUTHOR

Tamino Steinert E<lt>tamino.steinert@tamino.stE<gt>

=cut
(55-55/80)