Revision 233800e3
Von Bernd Bleßmann vor mehr als 2 Jahren hinzugefügt
SL/Controller/Order.pm | ||
---|---|---|
59 | 59 |
|
60 | 60 |
|
61 | 61 |
# safety |
62 |
__PACKAGE__->run_before('check_auth'); |
|
62 |
__PACKAGE__->run_before('check_auth', |
|
63 |
except => [ qw(close_quotations) ]); |
|
63 | 64 |
|
64 | 65 |
__PACKAGE__->run_before('check_auth_for_edit', |
65 |
except => [ qw(edit show_customer_vendor_details_dialog price_popup load_second_rows) ]); |
|
66 |
except => [ qw(edit show_customer_vendor_details_dialog price_popup load_second_rows close_quotations) ]);
|
|
66 | 67 |
|
67 | 68 |
__PACKAGE__->run_before('recalc', |
68 | 69 |
only => [ qw(save save_as_new save_and_delivery_order save_and_invoice save_and_invoice_for_advance_payment |
... | ... | |
1380 | 1381 |
->render; |
1381 | 1382 |
} |
1382 | 1383 |
|
1384 |
sub action_close_quotations { |
|
1385 |
my ($self) = @_; |
|
1386 |
|
|
1387 |
my @redirect_params = $::form->{callback} ? ($::form->{callback}) |
|
1388 |
: (controller => 'LoginScreen', action => 'user_login'); |
|
1389 |
|
|
1390 |
if (!$::form->{ids} || !@{$::form->{ids}}) { |
|
1391 |
flash_later('info', t8('Nothing selected!')); |
|
1392 |
$self->redirect_to(@redirect_params); |
|
1393 |
$::dispatcher->end_request; |
|
1394 |
} |
|
1395 |
|
|
1396 |
my $sales_quotations = SL::DB::Manager::Order->get_all(where => [id => $::form->{ids}, |
|
1397 |
or => [closed => 0, closed => undef], |
|
1398 |
quotation => 1, |
|
1399 |
'!customer_id' => undef]); |
|
1400 |
|
|
1401 |
my $request_quotations = SL::DB::Manager::Order->get_all(where => [id => $::form->{ids}, |
|
1402 |
or => [closed => 0, closed => undef], |
|
1403 |
quotation => 1, |
|
1404 |
'!vendor_id' => undef]); |
|
1405 |
|
|
1406 |
$::auth->assert('sales_quotation_edit') if scalar @$sales_quotations; |
|
1407 |
$::auth->assert('request_quotation_edit') if scalar @$request_quotations; |
|
1408 |
|
|
1409 |
my $employee_id = SL::DB::Manager::Employee->current->id; |
|
1410 |
SL::DB->client->with_transaction(sub { |
|
1411 |
SL::DB::Manager::Order->update_all(set => {closed => 1}, |
|
1412 |
where => [id => $::form->{ids}]); |
|
1413 |
|
|
1414 |
foreach my $quotation (@$sales_quotations, @$request_quotations) { |
|
1415 |
SL::DB::History->new( |
|
1416 |
trans_id => $quotation->id, |
|
1417 |
employee_id => $employee_id, |
|
1418 |
what_done => $quotation->type, |
|
1419 |
snumbers => 'quonumber_' . $quotation->number, |
|
1420 |
addition => 'SAVED', |
|
1421 |
)->save; |
|
1422 |
} |
|
1423 |
|
|
1424 |
1; |
|
1425 |
}) || do { |
|
1426 |
$::form->error(t8('Closing the selected quotations failed: #1', SL::DB->client->error)); |
|
1427 |
}; |
|
1428 |
|
|
1429 |
flash_later('info', t8('The selected quotations where closed.')); |
|
1430 |
$self->redirect_to(@redirect_params); |
|
1431 |
} |
|
1432 |
|
|
1383 | 1433 |
sub js_load_second_row { |
1384 | 1434 |
my ($self, $item, $item_id, $do_parse) = @_; |
1385 | 1435 |
|
bin/mozilla/oe.pl | ||
---|---|---|
2205 | 2205 |
my $content; |
2206 | 2206 |
|
2207 | 2207 |
if (@{ $quotations }) { |
2208 |
my $callback = build_std_url('action'); |
|
2208 | 2209 |
my $edit_url = ($::instance_conf->get_feature_experimental_order) |
2209 |
? build_std_url('script=controller.pl', 'action=Order/edit') |
|
2210 |
: build_std_url('script=oe.pl', 'action=edit'); |
|
2210 |
? build_std_url('script=controller.pl', 'action=Order/edit', 'callback=' . E($callback))
|
|
2211 |
: build_std_url('script=oe.pl', 'action=edit', 'callback=' . E($callback));
|
|
2211 | 2212 |
|
2212 | 2213 |
$content = $form->parse_html_template('oe/report_for_todo_list', { 'QUOTATIONS' => $quotations, |
2213 |
'edit_url' => $edit_url }); |
|
2214 |
'edit_url' => $edit_url, |
|
2215 |
'callback' => $callback }); |
|
2214 | 2216 |
} |
2215 | 2217 |
|
2216 | 2218 |
$main::lxdebug->leave_sub(); |
doc/changelog | ||
---|---|---|
22 | 22 |
Spalte angezeigt werden. Es wird zuerst nur die erste Position angezeigt, |
23 | 23 |
die Information weiterer Positionen lässt sich aus- und einklappen. |
24 | 24 |
|
25 |
Kleinere neue Features und Detailverbesserungen: |
|
26 |
|
|
27 |
- Angebote/Preisanfragen können aus der Aufgabenliste (auch auf dem |
|
28 |
Startbildschrim) heraus geschlossen werden. |
|
29 |
|
|
25 | 30 |
2022-05-20 - Release 3.6.1 |
26 | 31 |
|
27 | 32 |
Größere neue Features: |
locale/de/all | ||
---|---|---|
694 | 694 |
'Close Books up to' => 'Die Bücher abschließen bis zum', |
695 | 695 |
'Close Details' => 'Details schließen', |
696 | 696 |
'Close Flash' => 'Schließen', |
697 |
'Close Quotations' => 'Angebote/Preisanfragen schließen', |
|
697 | 698 |
'Close SEPA exports' => 'SEPA-Export abschließen', |
698 | 699 |
'Close Window' => 'Fenster Schließen', |
699 | 700 |
'Close window' => 'Fenster schließen', |
700 | 701 |
'Closed' => 'Geschlossen', |
701 | 702 |
'Closing Balance' => 'Abschlußsaldo', |
703 |
'Closing the selected quotations failed: #1' => 'Das Schließen der Angebote/Preisanfragen schlug fehl: #1', |
|
702 | 704 |
'Collective Orders only work for orders from one customer!' => 'Sammelaufträge funktionieren nur für Aufträge von einem Kunden!', |
703 | 705 |
'Column name' => 'Spaltenname', |
704 | 706 |
'Comma' => 'Komma', |
... | ... | |
3763 | 3765 |
'The selected database is still configured for client "#1". If you delete the database that client will stop working until you re-configure it. Do you still want to delete the database?' => 'Die auswählte Datenbank ist noch für Mandant "#1" konfiguriert. Wenn Sie die Datenbank löschen, wird der Mandanten nicht mehr funktionieren, bis er anders konfiguriert wurde. Möchten Sie die Datenbank trotzdem löschen?', |
3764 | 3766 |
'The selected exports have been closed.' => 'Die ausgewählten Exporte wurden abgeschlossen.', |
3765 | 3767 |
'The selected exports have been undone.' => 'Die ausgwählten Exporte wurden rückgängig gemacht.', |
3768 |
'The selected quotations where closed.' => 'Die ausgewählten Angebote/Preisanfragen wurden geschlossen.', |
|
3766 | 3769 |
'The selected warehouse does not exist.' => 'Das ausgewählte Lager existiert nicht.', |
3767 | 3770 |
'The selected warehouse is empty, or no stocked items where found that match the filter settings.' => 'Das ausgewählte Lager ist leer, oder in ihm wurden keine zu den Sucheinstellungen passenden eingelagerten Artikel gefunden.', |
3768 | 3771 |
'The session has expired. Please log in again.' => 'Die Sitzung ist abgelaufen. Bitte melden Sie sich erneut an.', |
locale/en/all | ||
---|---|---|
694 | 694 |
'Close Books up to' => '', |
695 | 695 |
'Close Details' => '', |
696 | 696 |
'Close Flash' => '', |
697 |
'Close Quotations' => '', |
|
697 | 698 |
'Close SEPA exports' => '', |
698 | 699 |
'Close Window' => '', |
699 | 700 |
'Close window' => '', |
700 | 701 |
'Closed' => '', |
701 | 702 |
'Closing Balance' => '', |
703 |
'Closing the selected quotations failed: #1' => '', |
|
702 | 704 |
'Collective Orders only work for orders from one customer!' => '', |
703 | 705 |
'Column name' => '', |
704 | 706 |
'Comma' => '', |
... | ... | |
3762 | 3764 |
'The selected database is still configured for client "#1". If you delete the database that client will stop working until you re-configure it. Do you still want to delete the database?' => '', |
3763 | 3765 |
'The selected exports have been closed.' => '', |
3764 | 3766 |
'The selected exports have been undone.' => '', |
3767 |
'The selected quotations where closed.' => '', |
|
3765 | 3768 |
'The selected warehouse does not exist.' => '', |
3766 | 3769 |
'The selected warehouse is empty, or no stocked items where found that match the filter settings.' => '', |
3767 | 3770 |
'The session has expired. Please log in again.' => '', |
templates/webpages/login/company_logo.html | ||
---|---|---|
6 | 6 |
label_information = LxERP.t8('A lot of the usability of kivitendo has been enhanced with javascript. Although it is currently possible to use every aspect of kivitendo without javascript, we strongly recommend it. In a future version this may change and javascript may be necessary to access advanced features.'), |
7 | 7 |
%] |
8 | 8 |
</noscript> |
9 |
[%- INCLUDE 'common/flash.html' %] |
|
9 | 10 |
<center> |
10 | 11 |
<a class="nomobile" href="http://www.kivitendo.de" target="_top"><img src="image/kivitendo[% xmas %].png" class='kivitendo-logo' border="0" alt='[% 'kivitendo' | $T8 %]' title="[% 'kivitendo Homepage' | $T8 %]"></a> |
11 | 12 |
|
templates/webpages/oe/report_for_todo_list.html | ||
---|---|---|
1 | 1 |
[%- USE T8 %] |
2 |
[% USE HTML %][% USE LxERP %] |
|
2 |
[% USE HTML %][% USE LxERP %][% USE P %]
|
|
3 | 3 |
<h1>[% 'Overdue sales quotations and requests for quotations' | $T8 %]</h1> |
4 | 4 |
|
5 |
<form method="post" action="controller.pl" id="todo_quotations_form"> |
|
6 |
[% P.hidden_tag('action', 'Order/dispatch') %] |
|
7 |
[% P.hidden_tag('callback', HTML.escape(callback)) %] |
|
8 |
|
|
5 | 9 |
<table width="100%"> |
6 | 10 |
<tr> |
11 |
<td class="listheading"> </td> |
|
7 | 12 |
<td class="listheading">[% 'Date' | $T8 %]</td> |
8 | 13 |
<td class="listheading">[% 'Valid until' | $T8 %]</td> |
9 | 14 |
<td class="listheading">[% 'Sales quotation' | $T8 %] / [% 'Request quotation' | $T8 %]</td> |
... | ... | |
14 | 19 |
</tr> |
15 | 20 |
|
16 | 21 |
[%- FOREACH row = QUOTATIONS %] |
22 |
[%- SET RIGHT_TO_EDIT = ((row.vc == 'customer' && AUTH.assert('sales_quotation_edit', 1)) || (row.vc == 'vendor' && AUTH.assert('request_quotation_edit', 1))) %] |
|
23 |
|
|
17 | 24 |
<tr class="listrow[% loop.count % 2 %]"> |
25 |
<td> |
|
26 |
[%- IF RIGHT_TO_EDIT %] |
|
27 |
[% P.checkbox_tag("ids[]", value=HTML.escape(row.id), checked="0") %] |
|
28 |
[%- END %] |
|
29 |
</td> |
|
18 | 30 |
<td>[% HTML.escape(row.transdate) %]</td> |
19 | 31 |
<td>[% HTML.escape(row.reqdate) %]</td> |
20 | 32 |
<td> |
... | ... | |
40 | 52 |
</tr> |
41 | 53 |
[%- END %] |
42 | 54 |
</table> |
55 |
|
|
56 |
<p> |
|
57 |
[% P.submit_tag('action_close_quotations', LxERP.t8('Close Quotations')) %] |
|
58 |
</p> |
|
59 |
</form> |
templates/webpages/todo/show_todo_list.html | ||
---|---|---|
2 | 2 |
[%- USE HTML %] |
3 | 3 |
<h1>[% 'Your TODO list' | $T8 %]</h1> |
4 | 4 |
|
5 |
[%- INCLUDE 'common/flash.html' %] |
|
6 |
|
|
5 | 7 |
[%- IF !todo_list %] |
6 | 8 |
<p> |
7 | 9 |
[% 'There are no items on your TODO list at the moment.' | $T8 %] |
... | ... | |
12 | 14 |
[%- todo_list %] |
13 | 15 |
|
14 | 16 |
[%- END %] |
15 |
|
Auch abrufbar als: Unified diff
ToDo-Liste: Angebote schließen können