Dies ist in der Manantenkonfigurierung einstellbar.
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 },
--- /dev/null
+-- @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;
<td> [% L.input_tag('defaults.parts_image_css', SELF.defaults.parts_image_css, style=style) %]</td>
<td>[% LxERP.t8('Style the picture with the following CSS code') %]</td>
</tr>
+ <tr>
+ <td align="right">[% LxERP.t8('If item not found, allow creation of new item') %]</td>
+ <td>[% L.yes_no_tag('defaults.create_part_if_not_found', SELF.defaults.create_part_if_not_found) %]</td>
+ <td>[% LxERP.t8('If searching a part from a document and no part is found then offer to create a new part.') %]</td>
+ </tr>
<tr>
<td align="right">[% LxERP.t8('Normalize part description and part notes') %]</td>
<td> [% L.yes_no_tag('defaults.normalize_part_descriptions', SELF.defaults.normalize_part_descriptions) %]</td>
<h4 class="error">[% 'searched part not for purchase' | $T8 %]</h4>
[%- ELSE %]
<h4 class="error">[% 'Item does not exists in the database' | $T8 %]
+[% IF INSTANCE_CONF.get_create_part_if_not_found %]
+ <p>[% 'What type of item is this?' | $T8 %]</h4>
+
+ <form method="post" action="controller.pl">
+
+ <p>
+
+ <input class="radio" type="radio" name="part_type" value="part" checked> [% 'Part' | $T8 %]<br>
+ <input class="radio" type="radio" name="part_type" value="assembly"> [% 'Assembly' | $T8 %]<br>
+ <input class="radio" type="radio" name="part_type" value="service"> [% 'Service' | $T8 %]<br>
+ <input class="radio" type="radio" name="part_type" value="assortment"> [% 'Assortment' | $T8 %]
+ <p>
+
+ [%- FOREACH var = HIDDENS %]
+ <input type="hidden" name="[% HTML.escape(var.name) %]" value="[% HTML.escape(var.value) %]">
+ [%- END %]
+ </p>
+
+ <input type="hidden" name="action" value="Part/dispatch">
+ <input class="submit" type="submit" name="action_add" value="[% 'Continue' | $T8 %]">
+[%- ELSE %]
</h4>
[%- END %]
+[%- END %]
[%- END %]
<input id='back_button' type='button' class="submit" value="[% 'Back' | $T8 %]">
</p>