Revision 233800e3
Von Bernd Bleßmann vor mehr als 2 Jahren hinzugefügt
SL/Controller/Order.pm | ||
---|---|---|
|
||
|
||
# safety
|
||
__PACKAGE__->run_before('check_auth');
|
||
__PACKAGE__->run_before('check_auth',
|
||
except => [ qw(close_quotations) ]);
|
||
|
||
__PACKAGE__->run_before('check_auth_for_edit',
|
||
except => [ qw(edit show_customer_vendor_details_dialog price_popup load_second_rows) ]);
|
||
except => [ qw(edit show_customer_vendor_details_dialog price_popup load_second_rows close_quotations) ]);
|
||
|
||
__PACKAGE__->run_before('recalc',
|
||
only => [ qw(save save_as_new save_and_delivery_order save_and_invoice save_and_invoice_for_advance_payment
|
||
... | ... | |
->render;
|
||
}
|
||
|
||
sub action_close_quotations {
|
||
my ($self) = @_;
|
||
|
||
my @redirect_params = $::form->{callback} ? ($::form->{callback})
|
||
: (controller => 'LoginScreen', action => 'user_login');
|
||
|
||
if (!$::form->{ids} || !@{$::form->{ids}}) {
|
||
flash_later('info', t8('Nothing selected!'));
|
||
$self->redirect_to(@redirect_params);
|
||
$::dispatcher->end_request;
|
||
}
|
||
|
||
my $sales_quotations = SL::DB::Manager::Order->get_all(where => [id => $::form->{ids},
|
||
or => [closed => 0, closed => undef],
|
||
quotation => 1,
|
||
'!customer_id' => undef]);
|
||
|
||
my $request_quotations = SL::DB::Manager::Order->get_all(where => [id => $::form->{ids},
|
||
or => [closed => 0, closed => undef],
|
||
quotation => 1,
|
||
'!vendor_id' => undef]);
|
||
|
||
$::auth->assert('sales_quotation_edit') if scalar @$sales_quotations;
|
||
$::auth->assert('request_quotation_edit') if scalar @$request_quotations;
|
||
|
||
my $employee_id = SL::DB::Manager::Employee->current->id;
|
||
SL::DB->client->with_transaction(sub {
|
||
SL::DB::Manager::Order->update_all(set => {closed => 1},
|
||
where => [id => $::form->{ids}]);
|
||
|
||
foreach my $quotation (@$sales_quotations, @$request_quotations) {
|
||
SL::DB::History->new(
|
||
trans_id => $quotation->id,
|
||
employee_id => $employee_id,
|
||
what_done => $quotation->type,
|
||
snumbers => 'quonumber_' . $quotation->number,
|
||
addition => 'SAVED',
|
||
)->save;
|
||
}
|
||
|
||
1;
|
||
}) || do {
|
||
$::form->error(t8('Closing the selected quotations failed: #1', SL::DB->client->error));
|
||
};
|
||
|
||
flash_later('info', t8('The selected quotations where closed.'));
|
||
$self->redirect_to(@redirect_params);
|
||
}
|
||
|
||
sub js_load_second_row {
|
||
my ($self, $item, $item_id, $do_parse) = @_;
|
||
|
bin/mozilla/oe.pl | ||
---|---|---|
my $content;
|
||
|
||
if (@{ $quotations }) {
|
||
my $callback = build_std_url('action');
|
||
my $edit_url = ($::instance_conf->get_feature_experimental_order)
|
||
? build_std_url('script=controller.pl', 'action=Order/edit')
|
||
: build_std_url('script=oe.pl', 'action=edit');
|
||
? build_std_url('script=controller.pl', 'action=Order/edit', 'callback=' . E($callback))
|
||
: build_std_url('script=oe.pl', 'action=edit', 'callback=' . E($callback));
|
||
|
||
$content = $form->parse_html_template('oe/report_for_todo_list', { 'QUOTATIONS' => $quotations,
|
||
'edit_url' => $edit_url });
|
||
'edit_url' => $edit_url,
|
||
'callback' => $callback });
|
||
}
|
||
|
||
$main::lxdebug->leave_sub();
|
doc/changelog | ||
---|---|---|
Spalte angezeigt werden. Es wird zuerst nur die erste Position angezeigt,
|
||
die Information weiterer Positionen lässt sich aus- und einklappen.
|
||
|
||
Kleinere neue Features und Detailverbesserungen:
|
||
|
||
- Angebote/Preisanfragen können aus der Aufgabenliste (auch auf dem
|
||
Startbildschrim) heraus geschlossen werden.
|
||
|
||
2022-05-20 - Release 3.6.1
|
||
|
||
Größere neue Features:
|
locale/de/all | ||
---|---|---|
'Close Books up to' => 'Die Bücher abschließen bis zum',
|
||
'Close Details' => 'Details schließen',
|
||
'Close Flash' => 'Schließen',
|
||
'Close Quotations' => 'Angebote/Preisanfragen schließen',
|
||
'Close SEPA exports' => 'SEPA-Export abschließen',
|
||
'Close Window' => 'Fenster Schließen',
|
||
'Close window' => 'Fenster schließen',
|
||
'Closed' => 'Geschlossen',
|
||
'Closing Balance' => 'Abschlußsaldo',
|
||
'Closing the selected quotations failed: #1' => 'Das Schließen der Angebote/Preisanfragen schlug fehl: #1',
|
||
'Collective Orders only work for orders from one customer!' => 'Sammelaufträge funktionieren nur für Aufträge von einem Kunden!',
|
||
'Column name' => 'Spaltenname',
|
||
'Comma' => 'Komma',
|
||
... | ... | |
'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?',
|
||
'The selected exports have been closed.' => 'Die ausgewählten Exporte wurden abgeschlossen.',
|
||
'The selected exports have been undone.' => 'Die ausgwählten Exporte wurden rückgängig gemacht.',
|
||
'The selected quotations where closed.' => 'Die ausgewählten Angebote/Preisanfragen wurden geschlossen.',
|
||
'The selected warehouse does not exist.' => 'Das ausgewählte Lager existiert nicht.',
|
||
'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.',
|
||
'The session has expired. Please log in again.' => 'Die Sitzung ist abgelaufen. Bitte melden Sie sich erneut an.',
|
locale/en/all | ||
---|---|---|
'Close Books up to' => '',
|
||
'Close Details' => '',
|
||
'Close Flash' => '',
|
||
'Close Quotations' => '',
|
||
'Close SEPA exports' => '',
|
||
'Close Window' => '',
|
||
'Close window' => '',
|
||
'Closed' => '',
|
||
'Closing Balance' => '',
|
||
'Closing the selected quotations failed: #1' => '',
|
||
'Collective Orders only work for orders from one customer!' => '',
|
||
'Column name' => '',
|
||
'Comma' => '',
|
||
... | ... | |
'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?' => '',
|
||
'The selected exports have been closed.' => '',
|
||
'The selected exports have been undone.' => '',
|
||
'The selected quotations where closed.' => '',
|
||
'The selected warehouse does not exist.' => '',
|
||
'The selected warehouse is empty, or no stocked items where found that match the filter settings.' => '',
|
||
'The session has expired. Please log in again.' => '',
|
templates/webpages/login/company_logo.html | ||
---|---|---|
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.'),
|
||
%]
|
||
</noscript>
|
||
[%- INCLUDE 'common/flash.html' %]
|
||
<center>
|
||
<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>
|
||
|
templates/webpages/oe/report_for_todo_list.html | ||
---|---|---|
[%- USE T8 %]
|
||
[% USE HTML %][% USE LxERP %]
|
||
[% USE HTML %][% USE LxERP %][% USE P %]
|
||
<h1>[% 'Overdue sales quotations and requests for quotations' | $T8 %]</h1>
|
||
|
||
<form method="post" action="controller.pl" id="todo_quotations_form">
|
||
[% P.hidden_tag('action', 'Order/dispatch') %]
|
||
[% P.hidden_tag('callback', HTML.escape(callback)) %]
|
||
|
||
<table width="100%">
|
||
<tr>
|
||
<td class="listheading"> </td>
|
||
<td class="listheading">[% 'Date' | $T8 %]</td>
|
||
<td class="listheading">[% 'Valid until' | $T8 %]</td>
|
||
<td class="listheading">[% 'Sales quotation' | $T8 %] / [% 'Request quotation' | $T8 %]</td>
|
||
... | ... | |
</tr>
|
||
|
||
[%- FOREACH row = QUOTATIONS %]
|
||
[%- SET RIGHT_TO_EDIT = ((row.vc == 'customer' && AUTH.assert('sales_quotation_edit', 1)) || (row.vc == 'vendor' && AUTH.assert('request_quotation_edit', 1))) %]
|
||
|
||
<tr class="listrow[% loop.count % 2 %]">
|
||
<td>
|
||
[%- IF RIGHT_TO_EDIT %]
|
||
[% P.checkbox_tag("ids[]", value=HTML.escape(row.id), checked="0") %]
|
||
[%- END %]
|
||
</td>
|
||
<td>[% HTML.escape(row.transdate) %]</td>
|
||
<td>[% HTML.escape(row.reqdate) %]</td>
|
||
<td>
|
||
... | ... | |
</tr>
|
||
[%- END %]
|
||
</table>
|
||
|
||
<p>
|
||
[% P.submit_tag('action_close_quotations', LxERP.t8('Close Quotations')) %]
|
||
</p>
|
||
</form>
|
templates/webpages/todo/show_todo_list.html | ||
---|---|---|
[%- USE HTML %]
|
||
<h1>[% 'Your TODO list' | $T8 %]</h1>
|
||
|
||
[%- INCLUDE 'common/flash.html' %]
|
||
|
||
[%- IF !todo_list %]
|
||
<p>
|
||
[% 'There are no items on your TODO list at the moment.' | $T8 %]
|
||
... | ... | |
[%- todo_list %]
|
||
|
||
[%- END %]
|
||
|
Auch abrufbar als: Unified diff
ToDo-Liste: Angebote schließen können