Revision fedfc383
Von Moritz Bunkus vor fast 8 Jahren hinzugefügt
SL/Controller/Inventory.pm | ||
---|---|---|
44 | 44 |
$::request->layout->focus('#part_id_name'); |
45 | 45 |
my $transfer_types = WH->retrieve_transfer_types('in'); |
46 | 46 |
map { $_->{description} = $main::locale->text($_->{description}) } @{ $transfer_types }; |
47 |
$self->setup_stock_in_action_bar; |
|
47 | 48 |
$self->render('inventory/warehouse_selection_stock', title => $::form->{title}, TRANSFER_TYPES => $transfer_types ); |
48 | 49 |
} |
49 | 50 |
|
... | ... | |
56 | 57 |
'bins' => 'BINS', }); |
57 | 58 |
$::request->layout->use_javascript("${_}.js") for qw(kivi.PartsWarehouse); |
58 | 59 |
|
60 |
$self->setup_stock_usage_action_bar; |
|
59 | 61 |
$self->render('inventory/warehouse_usage', |
60 | 62 |
title => $::form->{title}, |
61 | 63 |
year => DateTime->today->year, |
... | ... | |
365 | 367 |
|
366 | 368 |
$report->set_options('raw_bottom_info_text' => $self->render('inventory/report_bottom', { output => 0 }) ); |
367 | 369 |
} |
368 |
$report->generate_with_headers(); |
|
370 |
$report->generate_with_headers(action_bar => 1);
|
|
369 | 371 |
|
370 | 372 |
$main::lxdebug->leave_sub(); |
371 | 373 |
|
... | ... | |
621 | 623 |
$::form->show_generic_error($msg); |
622 | 624 |
} |
623 | 625 |
|
626 |
sub setup_stock_in_action_bar { |
|
627 |
my ($self, %params) = @_; |
|
628 |
|
|
629 |
for my $bar ($::request->layout->get('actionbar')) { |
|
630 |
$bar->add( |
|
631 |
action => [ |
|
632 |
t8('Stock'), |
|
633 |
submit => [ '#form', { action => 'Inventory/stock' } ], |
|
634 |
checks => [ 'check_part_selection_before_stocking' ], |
|
635 |
accesskey => 'enter', |
|
636 |
], |
|
637 |
); |
|
638 |
} |
|
639 |
} |
|
640 |
|
|
641 |
sub setup_stock_usage_action_bar { |
|
642 |
my ($self, %params) = @_; |
|
643 |
|
|
644 |
for my $bar ($::request->layout->get('actionbar')) { |
|
645 |
$bar->add( |
|
646 |
action => [ |
|
647 |
t8('Show'), |
|
648 |
submit => [ '#form', { action => 'Inventory/usage' } ], |
|
649 |
accesskey => 'enter', |
|
650 |
], |
|
651 |
); |
|
652 |
} |
|
653 |
} |
|
654 |
|
|
624 | 655 |
1; |
625 | 656 |
__END__ |
626 | 657 |
|
... | ... | |
673 | 704 |
|
674 | 705 |
only for C<action_stock_usage> and C<action_usage>: |
675 | 706 |
|
676 |
Martin Helmling E<lt>martin.helmling@opendynamic.deE<gt> |
|
707 |
pMartin Helmling E<lt>martin.helmling@opendynamic.deE<gt>
|
|
677 | 708 |
|
678 | 709 |
|
679 | 710 |
=cut |
680 |
|
js/locale/de.js | ||
---|---|---|
64 | 64 |
"Map":"Karte", |
65 | 65 |
"More than one file selected, please set only one checkbox!":"Mehr als ein Element selektiert, bitte nur eine Box anklicken", |
66 | 66 |
"No":"Nein", |
67 |
"No article has been selected yet.":"Es wurde noch kein Artikel ausgewählt.", |
|
67 | 68 |
"No delievery orders selected, please set one checkbox!":"Kein Lieferschein selektiert, bitte eine Box anklicken!", |
68 | 69 |
"No delivery orders have been selected.":"Es wurden keine Lieferscheine ausgewählt.", |
69 | 70 |
"No entries have been selected.":"Es wurden keine Einträge ausgewählt.", |
locale/de/all | ||
---|---|---|
1839 | 1839 |
'No Journal' => 'Kein Journal', |
1840 | 1840 |
'No Vendor was found matching the search parameters.' => 'Zu dem Suchbegriff wurde kein Händler gefunden', |
1841 | 1841 |
'No action defined.' => 'Keine Aktion definiert.', |
1842 |
'No article has been selected yet.' => 'Es wurde noch kein Artikel ausgewählt.', |
|
1842 | 1843 |
'No articles have been added yet.' => 'Es wurden noch keine Artikel hinzugefügt.', |
1843 | 1844 |
'No background job has been created yet.' => 'Es wurden noch keine Hintergrund-Jobs angelegt.', |
1844 | 1845 |
'No bank account chosen!' => 'Kein Bankkonto ausgewählt!', |
templates/webpages/inventory/warehouse_selection_stock.html | ||
---|---|---|
7 | 7 |
|
8 | 8 |
[%- INCLUDE 'common/flash.html' %] |
9 | 9 |
|
10 |
<form name="Form" method="post" action="controller.pl"> |
|
10 |
<form name="Form" method="post" action="controller.pl" id="form">
|
|
11 | 11 |
|
12 | 12 |
<table> |
13 | 13 |
<tr> |
... | ... | |
66 | 66 |
<td>[% L.input_tag('comment', FORM.comment, size=60) %]</td> |
67 | 67 |
</tr> |
68 | 68 |
</table> |
69 |
|
|
70 |
<input type="hidden" name="action" value="Inventory/dispatch"> |
|
71 |
<input type="submit" id='action_stock' class="submit" name="action_stock" value="[% 'Stock' | $T8 %]" [% IF !SELF.part.id %]disabled[% END %]> |
|
72 | 69 |
</form> |
73 | 70 |
|
74 | 71 |
<div id='stock'> |
... | ... | |
86 | 83 |
function reload_bin_selection () { |
87 | 84 |
$.post("controller.pl", { action: 'Inventory/warehouse_changed', warehouse_id: function(){ return $('#warehouse_id').val() } }, kivi.eval_json_result); |
88 | 85 |
} |
86 |
function check_part_selection_before_stocking() { |
|
87 |
if ($('#part_id').val() !== '') |
|
88 |
return true; |
|
89 |
|
|
90 |
alert(kivi.t8('No article has been selected yet.')); |
|
91 |
return false; |
|
92 |
} |
|
89 | 93 |
$(function(){ |
90 | 94 |
$('#part_id').change(reload_warehouse_selection); |
91 |
$('#part_id').change(function(){ |
|
92 |
if ($('#part_id').val() > 0) |
|
93 |
$('#action_stock').removeAttr('disabled'); |
|
94 |
else |
|
95 |
$('#action_stock').attr('disabled', 'disabled'); |
|
96 |
}); |
|
97 | 95 |
$('#warehouse_id').change(reload_bin_selection); |
98 | 96 |
}) |
99 | 97 |
</script> |
templates/webpages/inventory/warehouse_usage.html | ||
---|---|---|
9 | 9 |
|
10 | 10 |
[%- INCLUDE 'common/flash.html' %] |
11 | 11 |
|
12 |
<form name="Form" method="post" action="controller.pl"> |
|
12 |
<form name="Form" method="post" action="controller.pl" id="form">
|
|
13 | 13 |
|
14 | 14 |
<table border="0"> |
15 | 15 |
<tr> |
... | ... | |
118 | 118 |
</tr> |
119 | 119 |
</table> |
120 | 120 |
</p> |
121 |
|
|
122 |
<p> |
|
123 |
<input type="hidden" name="action" value="Inventory/dispatch"> |
|
124 |
<input type="submit" id="action_usage" class="submit" name="action_usage" value="[% 'Continue' | $T8 %]"> |
|
125 |
</p> |
|
126 | 121 |
</form> |
Auch abrufbar als: Unified diff
ActionBar: Verwendung bei Lager → Einlagern, Lager → Berichte → Lagerentnahme