neuen Artikel aus Angebots-/Auftrags-Maske anlegen: Variable besser benannt
[kivitendo-erp.git] / SL / Presenter / Part.pm
index 4f2105c..2f8624d 100644 (file)
@@ -229,6 +229,11 @@ If C<%params> contains C<part_type> only parts of this type will be used
 for autocompletion. You may comma separate multiple types as in
 C<part,assembly>.
 
+If C<%params> contains C<status> only parts of this status will be used
+for autocompletion. C<status> can be one of the following strings:
+C<active>, C<obsolete> or C<all>. C<active> is the default if C<status> is
+not given.
+
 If C<%params> contains C<unit> only parts with this unit will be used
 for autocompletion. You may comma separate multiple units as in
 C<h,min>.
@@ -236,6 +241,31 @@ C<h,min>.
 If C<%params> contains C<convertible_unit> only parts with a unit
 that's convertible to unit will be used for autocompletion.
 
+If C<%params> contains C<with_makemodel> or C<with_customer_partnumber> even
+parts will be used for autocompletion which partnumber is a vendor partnumber
+(makemodel) or a customer partnumber.
+
+If C<%params> contains C<multiple> an alternative popup will be opened,
+allowing multiple items to be selected. Note however that this requires
+an additional callback C<set_multi_items> to work.
+Also note that you can set C<multiple> to 0 (or not set C<multiple>) on
+creation of the picker, but can open the alternative multi select popup
+with js like this:
+C<$("#pp_id").data("part_picker").o.multiple=1; $("#pp_id").data("part_picker").open_dialog()'>
+where C<pp_id> is the dom id of the part picker.
+Or you can even do it the other way round setting C<multiple> to 1 on creation
+and open a single selection popup with js.
+
+If C<%params> contains C<multiple_pos_input> an input field with the dom id
+C<multi_items_position> will be rendered in the alternative popup.
+This can be used in the callback for C<set_multi_items> to controll the
+input postion for the items.
+
+If C<%params> contains C<multiple_limit> the alternative popup will not
+show any results if there are more than C<multiple_limit> results. A warning
+message is displayed in this case. Set C<multiple_limit> to 0 to disable
+the limitation. The limit defaults to 100.
+
 Obsolete parts will by default not be displayed for selection. However they are
 accepted as default values and can persist during updates. As with other
 selectors though, they are not selectable once overridden.
@@ -269,10 +299,7 @@ If more than one element matches the input, the internal state will be set to
 undefined.
 
 After that the action C<commit_one> will be executed, which defaults to
-opening a popup dialog for graphical interaction. If C<params> contains
-C<multiple> an alternative popup will be opened, allowing multiple items to be
-selected. Note however that this requires an additional callback
-C<set_multi_items> to work.
+opening a popup dialog for graphical interaction.
 
 =item * C<commit_none>