From: Martin Helmling martin.helmling@octosoft.eu Date: Thu, 22 Dec 2016 08:12:19 +0000 (+0100) Subject: Falls ein Artikel nicht gefunden wird, kann gleich in die Erfassung gegangen werden X-Git-Tag: release-3.5.4~1747 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=71d405108050e9982291812b9e6919e94d7e6c2d;p=kivitendo-erp.git Falls ein Artikel nicht gefunden wird, kann gleich in die Erfassung gegangen werden Dies ist in der Manantenkonfigurierung einstellbar. --- diff --git a/SL/DB/MetaSetup/Default.pm b/SL/DB/MetaSetup/Default.pm index 496336480..640ef1d7b 100644 --- a/SL/DB/MetaSetup/Default.pm +++ b/SL/DB/MetaSetup/Default.pm @@ -34,6 +34,7 @@ __PACKAGE__->meta->columns( co_ustid => { type => 'text' }, coa => { type => 'text' }, company => { type => 'text' }, + create_part_if_not_found => { type => 'boolean', default => 'false' }, currency_id => { type => 'integer', not_null => 1 }, customer_hourly_rate => { type => 'numeric', precision => 8, scale => 2 }, customer_projects_only_in_sales => { type => 'boolean', default => 'false', not_null => 1 }, diff --git a/sql/Pg-upgrade2/create_part_if_not_found.sql b/sql/Pg-upgrade2/create_part_if_not_found.sql new file mode 100644 index 000000000..0f62ac3bc --- /dev/null +++ b/sql/Pg-upgrade2/create_part_if_not_found.sql @@ -0,0 +1,5 @@ +-- @tag: create_part_if_not_found +-- @description: Falls Artikel nicht gefunden wird gleich in die Erfassung gehen +-- @depends: release_3_2_0 +ALTER TABLE defaults ADD COLUMN create_part_if_not_found BOOLEAN DEFAULT FALSE; +UPDATE defaults SET create_part_if_not_found = TRUE; diff --git a/templates/webpages/client_config/_features.html b/templates/webpages/client_config/_features.html index 324c0c588..a06f1e090 100644 --- a/templates/webpages/client_config/_features.html +++ b/templates/webpages/client_config/_features.html @@ -84,6 +84,11 @@ [% L.input_tag('defaults.parts_image_css', SELF.defaults.parts_image_css, style=style) %] [% LxERP.t8('Style the picture with the following CSS code') %] + + [% LxERP.t8('If item not found, allow creation of new item') %] + [% L.yes_no_tag('defaults.create_part_if_not_found', SELF.defaults.create_part_if_not_found) %] + [% LxERP.t8('If searching a part from a document and no part is found then offer to create a new part.') %] + [% LxERP.t8('Normalize part description and part notes') %] [% L.yes_no_tag('defaults.normalize_part_descriptions', SELF.defaults.normalize_part_descriptions) %] diff --git a/templates/webpages/generic/new_item.html b/templates/webpages/generic/new_item.html index 6682bfddf..d30427a5b 100644 --- a/templates/webpages/generic/new_item.html +++ b/templates/webpages/generic/new_item.html @@ -7,8 +7,30 @@

[% 'searched part not for purchase' | $T8 %]

[%- ELSE %]

[% 'Item does not exists in the database' | $T8 %] +[% IF INSTANCE_CONF.get_create_part_if_not_found %] +

[% 'What type of item is this?' | $T8 %]

+ +
+ +

+ +  [% 'Part' | $T8 %]
+  [% 'Assembly' | $T8 %]
+  [% 'Service' | $T8 %]
+  [% 'Assortment' | $T8 %] +

+ + [%- FOREACH var = HIDDENS %] + + [%- END %] +

+ + + +[%- ELSE %] [%- END %] +[%- END %] [%- END %]