Revision 187c4ee1
Von Jan Büren vor mehr als 3 Jahren hinzugefügt
SL/Controller/Part.pm | ||
---|---|---|
12 | 12 |
use SL::Locale::String qw(t8); |
13 | 13 |
use SL::JSON; |
14 | 14 |
use List::Util qw(sum); |
15 |
use List::UtilsBy qw(extract_by); |
|
15 | 16 |
use SL::Helper::Flash; |
16 | 17 |
use Data::Dumper; |
17 | 18 |
use DateTime; |
... | ... | |
230 | 231 |
|
231 | 232 |
$params{CUSTOM_VARIABLES} = CVar->get_custom_variables(module => 'IC', trans_id => $self->part->id); |
232 | 233 |
|
233 |
CVar->render_inputs('variables' => $params{CUSTOM_VARIABLES}, show_disabled_message => 1, partsgroup_id => $self->part->partsgroup_id) |
|
234 |
if (scalar @{ $params{CUSTOM_VARIABLES} }); |
|
234 |
if (scalar @{ $params{CUSTOM_VARIABLES} }) { |
|
235 |
CVar->render_inputs('variables' => $params{CUSTOM_VARIABLES}, show_disabled_message => 1, partsgroup_id => $self->part->partsgroup_id); |
|
236 |
$params{CUSTOM_VARIABLES_FIRST_TAB} = []; |
|
237 |
@{ $params{CUSTOM_VARIABLES_FIRST_TAB} } = extract_by { $_->{first_tab} == 1 } @{ $params{CUSTOM_VARIABLES} }; |
|
238 |
} |
|
235 | 239 |
|
236 | 240 |
my %title_hash = ( part => t8('Edit Part'), |
237 | 241 |
assembly => t8('Edit Assembly'), |
SL/DB/MetaSetup/CustomVariableConfig.pm | ||
---|---|---|
11 | 11 |
__PACKAGE__->meta->columns( |
12 | 12 |
default_value => { type => 'text' }, |
13 | 13 |
description => { type => 'text', not_null => 1 }, |
14 |
first_tab => { type => 'boolean', default => 'false', not_null => 1 }, |
|
14 | 15 |
flags => { type => 'text' }, |
15 | 16 |
id => { type => 'integer', not_null => 1, sequence => 'custom_variable_configs_id' }, |
16 | 17 |
includeable => { type => 'boolean', not_null => 1 }, |
doc/changelog | ||
---|---|---|
32 | 32 |
|
33 | 33 |
Kleinere neue Features und Detailverbesserungen: |
34 | 34 |
|
35 |
- Die benutzerdefinierten Variablen für Artikel können konfigurierbar im Tab Basisdaten |
|
36 |
angezeigt werden (ohne extra Klick auf einen weiteren Tab) |
|
35 | 37 |
- Der Lagerbestandsbericht wurde um die Anzeige von benutzerdefinierten Variablen |
36 | 38 |
aus dem Bereich Artikel erweitert |
37 | 39 |
- Im Lagerjournal ist standardmäßig die Berichtsanzeige um Dokument angehakt. |
sql/Pg-upgrade2/custom_variables_add_edit_position.sql | ||
---|---|---|
1 |
-- @tag: custom_variables_add_edit_position |
|
2 |
-- @description: Erweiterung custom_variables |
|
3 |
-- @depends: release_3_5_6_1 custom_variables |
|
4 |
|
|
5 |
ALTER TABLE custom_variable_configs ADD COLUMN first_tab BOOLEAN NOT NULL DEFAULT FALSE; |
|
6 |
|
templates/webpages/custom_variable_config/form.html | ||
---|---|---|
97 | 97 |
labeldx => LxERP.t8("Partsgroups where variables are shown")) %] |
98 | 98 |
</td> |
99 | 99 |
</tr> |
100 |
<tr data-show-for="IC"[% UNLESS SELF.module == 'IC' %] style="display: none;"[% END %]> |
|
101 |
<td align="right">[% 'Display in basic data tab' | $T8 %]</td> |
|
102 |
<td> |
|
103 |
[% L.radio_button_tag('config.first_tab', value='1', id='config.first_tab', label=LxERP.t8('Yes'), checked=(SELF.config.first_tab ? 1 : '')) %] |
|
104 |
[% L.radio_button_tag('config.first_tab', value='0', id='config.first_tab', label=LxERP.t8('No'), checked=(SELF.config.first_tab ? '' : 1)) %] |
|
105 |
</td> |
|
106 |
</tr> |
|
107 |
|
|
100 | 108 |
</table> |
101 | 109 |
</p> |
102 | 110 |
|
templates/webpages/part/_basic_data.html | ||
---|---|---|
75 | 75 |
<textarea id="part.formel" name="part.formel" rows="[% HTML.escape(notes_rows) %]" cols="30" wrap="soft" class="tooltipster-html" title="[% 'The formula needs the following syntax:<br>For regular article:<br>Variablename= Variable Unit;<br>Variablename2= Variable2 Unit2;<br>...<br>###<br>Variable + ( Variable2 / Variable )<br><b>Please be beware of the spaces in the formula</b><br>' | $T8 %]">[% HTML.escape(SELF.part.formel) %]</textarea> |
76 | 76 |
</td> |
77 | 77 |
</tr> |
78 |
[% IF CUSTOM_VARIABLES_FIRST_TAB %] |
|
79 |
<tr><td>[% 'Unchecked custom variables will not appear in orders and invoices.' | $T8 %]</td></tr> |
|
80 |
[%- FOREACH var = CUSTOM_VARIABLES_FIRST_TAB %] |
|
81 |
<tr> |
|
82 |
<td align="left" valign="top">[% var.VALID_BOX %] |
|
83 |
[%- IF !var.partsgroup_filtered %] |
|
84 |
[% HTML.escape(var.description) %] |
|
85 |
[%- END %] |
|
86 |
</tr> |
|
87 |
<tr><td>[% var.HTML_CODE %]</td></tr> |
|
88 |
[%- END %] |
|
89 |
[% END %] |
|
78 | 90 |
</table> |
79 | 91 |
</td> |
80 | 92 |
</tr> |
Auch abrufbar als: Unified diff
Artikel-BDVs unter Basisdaten anzeigen, falls konfiguriert
Die benutzerdefinierten Variablen für Artikel können konfigurierbar im Tab Basisdaten
angezeigt werden