Wird über eine Option in der Mandantenkonfiguration eingeschaltet.
profit_determination => { type => 'text' },
purchase_delivery_order_show_delete => { type => 'boolean', default => 'true' },
purchase_order_show_delete => { type => 'boolean', default => 'true' },
+ require_transaction_description_ps => { type => 'boolean', default => 'false', not_null => 1 },
requirement_spec_section_order_part_id => { type => 'integer' },
revtrans => { type => 'boolean', default => 'false' },
rfqnumber => { type => 'text' },
return confirm(kivi.t8('This sales order has an active configuration for periodic invoices. If you save then all subsequently created invoices will contain those changes as well, but not those that have already been created. Do you want to continue?'));
};
+ this.check_transaction_description = function() {
+ if ($('#transaction_description').val() != '')
+ return true;
+
+ alert(kivi.t8('A transaction description is required.'));
+ return false;
+ };
+
this.on_submit_checks = function() {
var $button = $(this);
if (($button.data('check-transfer-qty') == 1) && !kivi.SalesPurchase.delivery_order_check_transfer_qty())
if (($button.data('warn-save-active-periodic-invoice') == 1) && !kivi.SalesPurchase.oe_warn_save_active_periodic_invoice())
return false;
+ if (($button.data('require-transaction-description') == 1) && !kivi.SalesPurchase.check_transaction_description())
+ return false;
+
return true;
};
namespace("kivi").setupLocale({
+"A transaction description is required.":"Die Vorgangsbezeichnung muss eingegeben werden.",
"Add function block":"Funktionsblock hinzufügen",
"Add linked record":"Verknüpften Beleg hinzufügen",
"Add picture":"Bild hinzufügen",
'A lot of the usability of kivitendo has been enhanced with javascript. Although it is currently possible to use every aspect of kivitendo without javascript, we strongly recommend it. In a future version this may change and javascript may be necessary to access advanced features.' => 'Die Bedienung von kivitendo wurde an vielen Stellen mit Javascript verbessert. Obwohl es derzeit möglich ist, jeden Aspekt von kivitendo auch ohne Javascript zu benutzen, empfehlen wir es. In einer zukünftigen Version wird Javascript eventuell notwendig sein um weitergehende Features zu benutzen.',
'A lower-case character is required.' => 'Ein Kleinbuchstabe ist vorgeschrieben.',
'A special character is required (valid characters: #1).' => 'Ein Sonderzeichen ist vorgeschrieben (gültige Zeichen: #1).',
+ 'A transaction description is required.' => 'Die Vorgangsbezeichnung muss eingegeben werden.',
'A unit with this name does already exist.' => 'Eine Einheit mit diesem Namen existiert bereits.',
'A valid taxkey is missing!' => 'Einen gültiger Steuerschlüssel fehlt!',
'A variable marked as \'editable\' can be changed in each quotation, order, invoice etc.' => 'Eine als \'editierbar\' markierte Variable kann in jedem Angebot, Auftrag, jeder Rechnung etc für jede Position geändert werden.',
'If amounts differ more than "Maximal amount difference" (see settings), this item is marked as invalid.' => 'Weichen die Beträge mehr als die "maximale Betragsabweichung" (siehe Einstellungen) ab, so wird diese Position als ungültig markiert.',
'If checked the taxkey will not be exported in the DATEV Export, but only IF chart taxkeys differ from general ledger taxkeys' => 'Falls angehakt wird der DATEV-Steuerschlüssel bei Buchungen auf dieses Konto nicht beim DATEV-Export mitexportiert, allerdings nur wenn zusätzlich der Konto-Steuerschlüssel vom Buchungs (Hauptbuch) Steuerschlüssel abweicht',
'If configured this bin will be preselected for all new parts. Also this bin will be used as the master default bin, if default transfer out with master bin is activated.' => 'Falls konfiguriert, wird dieses Lager mit Lagerplatz für neu angelegte Waren vorausgewählt.',
+ 'If enabled purchase and sales records cannot be saved if no transaction description has been entered.' => 'Wenn angeschaltet, so können Einkaufs- und Verkaufsbelege nicht gespeichert werden, solange keine Vorgangsbezeichnung eingegeben wurde.',
'If missing then the start date will be used.' => 'Falls es fehlt, so wird die erste Rechnung für das Startdatum erzeugt.',
'If the article type is set to \'mixed\' then a column called \'type\' must be present.' => 'Falls der Artikeltyp auf \'gemischt\' gestellt wird, muss eine Spalte namens \'type\' vorhanden sein.',
'If the automatic creation of invoices for fees and interest is switched on for a dunning level then the following accounts will be used for the invoice.' => 'Wenn das automatische Erstellen einer Rechnung über Mahngebühren und Zinsen für ein Mahnlevel aktiviert ist, so werden die folgenden Konten für die Rechnung benutzt.',
'Purchase net amount' => 'EK-Betrag',
'Purchase price' => 'EK-Preis',
'Purchase price total' => 'EK-Betrag',
+ 'Purchasing & Sales' => 'Einkauf & Verkauf',
'Purpose' => 'Verwendungszweck',
'Qty' => 'Menge',
'Qty according to delivery order' => 'Menge laut Lieferschein',
'Requested execution date from' => 'Gewünschtes Ausführungsdatum von',
'Requested execution date to' => 'Gewünschtes Ausführungsdatum bis',
'Requests for Quotation' => 'Preisanfragen',
+ 'Require a transaction description in purchase and sales records' => 'Vorgangsbezeichnung in Einkaufs- und Verkaufsbelegen erzwingen',
'Required by' => 'Lieferdatum',
'Requirement Spec Status' => 'Pflichtenheftstatus',
'Requirement Spec Statuses' => 'Pflichtenheftstatus',
--- /dev/null
+-- @tag: defaults_require_transaction_description
+-- @description: Mandantenkonfiguration: optional Existenz der Vorgangsbezeichnung erzwingen
+-- @depends: release_3_1_0
+ALTER TABLE defaults ADD COLUMN require_transaction_description_ps BOOLEAN;
+UPDATE defaults SET require_transaction_description_ps = FALSE;
+
+ALTER TABLE defaults
+ ALTER COLUMN require_transaction_description_ps SET DEFAULT FALSE,
+ ALTER COLUMN require_transaction_description_ps SET NOT NULL;
</tr>
</tr>
+ <tr><td class="listheading" colspan="4">[% LxERP.t8("Purchasing & Sales") %]</td></tr>
+
+ <tr>
+ <td align="right">[% LxERP.t8('Require a transaction description in purchase and sales records') %]</td>
+ <td>[% L.yes_no_tag('defaults.require_transaction_description_ps', SELF.defaults.require_transaction_description_ps) %]</td>
+ <td>[% LxERP.t8('If enabled purchase and sales records cannot be saved if no transaction description has been entered.') %]</td>
+ </tr>
+
<tr><td class="listheading" colspan="4">[% LxERP.t8("Requirement Specs") %]</td></tr>
<tr>
<input class="submit" type="submit" name="action_ship_to" value="[% 'Ship to' | $T8 %]">
[%- END %]
[%- END %]
- <input class="submit" type="submit" name="action_print" value="[% 'Print' | $T8 %]">
- <input class="submit" type="submit" name="action_e_mail" value="[% 'E-mail' | $T8 %]">
+ <input class="submit" type="submit" name="action_print" value="[% 'Print' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
+ <input class="submit" type="submit" name="action_e_mail" value="[% 'E-mail' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
[%- UNLESS delivered %]
- <input class="submit" type="submit" name="action_save" value="[% 'Save' | $T8 %]">
+ <input class="submit" type="submit" name="action_save" value="[% 'Save' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
[%- IF vc == 'customer' %]
- <input class="submit" type="submit" name="action_transfer_out" value="[% 'Transfer out' | $T8 %]" data-check-transfer-qty="1">
+ <input class="submit" type="submit" name="action_transfer_out" value="[% 'Transfer out' | $T8 %]" data-check-transfer-qty="1" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
[% IF transfer_default %]
- <input class="submit" type="submit" name="action_transfer_out_default" value="[% 'Transfer out via default' | $T8 %]">
+ <input class="submit" type="submit" name="action_transfer_out_default" value="[% 'Transfer out via default' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
[%- END %]
[%- ELSE %]
- <input class="submit" type="submit" name="action_transfer_in" value="[% 'Transfer in' | $T8 %]" data-check-transfer-qty="1">
+ <input class="submit" type="submit" name="action_transfer_in" value="[% 'Transfer in' | $T8 %]" data-check-transfer-qty="1" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
[% IF transfer_default %]
- <input class="submit" type="submit" name="action_transfer_in_default" value="[% 'Transfer in via default' | $T8 %]">
+ <input class="submit" type="submit" name="action_transfer_in_default" value="[% 'Transfer in via default' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
[%- END %]
[%- END %]
[%- END %]
[%- IF id %]
<input type="button" class="submit" onclick="follow_up_window()" value="[% 'Follow-Up' | $T8 %]">
[%- UNLESS closed %]
- <input class="submit" type="submit" name="action_mark_closed" value="[% 'Mark closed' | $T8 %]">
+ <input class="submit" type="submit" name="action_mark_closed" value="[% 'Mark closed' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
[%- END %]
<input type="button" class="submit" onclick="set_history_window([% id %]);" name="history" id="history" value="[% 'history' | $T8 %]">
[%- END %]
[%- IF id %]
<p>
[% 'Workflow Delivery Order' | $T8 %]<br>
- <input class="submit" type="submit" name="action_save_as_new" value="[% 'Save as new' | $T8 %]">
+ <input class="submit" type="submit" name="action_save_as_new" value="[% 'Save as new' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
[% UNLESS delivered || (vc == 'customer' && !INSTANCE_CONF.get_sales_delivery_order_show_delete) || (vc == 'vendor' && !INSTANCE_CONF.get_purchase_delivery_order_show_delete) %]
[% L.submit_tag('action_delete', LxERP.t8('Delete'), confirm=LxERP.t8('Are you sure?')) %]
[% END %]
<tr>
<th align="right">[% 'Transaction description' | $T8 %]</th>
- <td colspan="3"><input name="transaction_description" size="35" value="[% HTML.escape(transaction_description) %]"[% RO %]></td>
+ <td colspan="3"><input name="transaction_description" id="transaction_description" size="35" value="[% HTML.escape(transaction_description) %]"[% RO %]></td>
</tr>
</table>
<input class="submit" type="submit" accesskey="u" name="action" id="update_button" value="[% 'Update' | $T8 %]">
<input class="submit" type="submit" name="action" value="[% 'Ship to' | $T8 %]">
- <input class="submit" type="submit" name="action" value="[% 'Print' | $T8 %]">
- <input class="submit" type="submit" name="action" value="[% 'E-mail' | $T8 %]">
+ <input class="submit" type="submit" name="action" value="[% 'Print' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
+ <input class="submit" type="submit" name="action" value="[% 'E-mail' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
[% IF show_storno %]
- <input class="submit" type="submit" name="action" value="[% 'Storno' | $T8 %]">
+ <input class="submit" type="submit" name="action" value="[% 'Storno' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
[% END %]
<input class="submit" type="submit" name="action" value="[% 'Post Payment' | $T8 %]">
<input class="submit" type="submit" name="action" value="[% 'Use As New' | $T8 %]">
[% IF id && !is_type_credit_note %]
- <input class="submit" type="submit" name="action" value="[% 'Credit Note' | $T8 %]">
+ <input class="submit" type="submit" name="action" value="[% 'Credit Note' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
[% END %]
[% IF show_delete && !storno %]
<input class="submit" type="submit" name="action" value="[% 'Delete' | $T8 %]">
- <input class="submit" type="submit" name="action" value="[% 'Post' | $T8 %]">
+ <input class="submit" type="submit" name="action" value="[% 'Post' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
[% END %]
<input class="submit" type="submit" name="action" value="[% 'Order' | $T8 %]">
<input type="button" class="submit" onclick="follow_up_window()" value="[% 'Follow-Up' | $T8 %]">
[% UNLESS locked %]
<input class="submit" type="submit" name="action" id="update_button" value="[% 'Update' | $T8 %]">
<input class="submit" type="submit" name="action" value="[% 'Ship to' | $T8 %]">
- <input class="submit" type="submit" name="action" value="[% 'Preview' | $T8 %]">
- <input class="submit" type="submit" name="action" value="[% 'Post and E-mail' | $T8 %]">
- <input class="submit" type="submit" name="action" value="[% 'Print and Post' | $T8 %]">
- <input class="submit" type="submit" name="action" value="[% 'Post' | $T8 %]">
+ <input class="submit" type="submit" name="action" value="[% 'Preview' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
+ <input class="submit" type="submit" name="action" value="[% 'Post and E-mail' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
+ <input class="submit" type="submit" name="action" value="[% 'Print and Post' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
+ <input class="submit" type="submit" name="action" value="[% 'Post' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
<input class="submit" type="submit" name="action" value="[% 'Save Draft' | $T8 %]">
[%- END %]
[% END # id %]
<input type="hidden" name="customer_discount" value="[% customer_discount %]">
<input type="hidden" name="gldate" value="[% gldate %]">
</form>
+<script type='text/javascript'>
+ $(kivi.SalesPurchase.init_on_submit_checks);
+</script>
</tr>
<tr>
<th align="right">[% 'Transaction description' | $T8 %]</th>
- <td colspan="3"><input size='35' name="transaction_description" value="[% HTML.escape(transaction_description) %]"></td>
+ <td colspan="3"><input size='35' name="transaction_description" id="transaction_description" value="[% HTML.escape(transaction_description) %]"></td>
</tr>
</table>
</td>
[% label_edit %]<br>
<input class="submit" type="submit" name="action_update" id="update_button" value="[% 'Update' | $T8 %]">
<input class="submit" type="submit" name="action_ship_to" value="[% 'Ship to' | $T8 %]">
-<input class="submit" type="submit" name="action_print" value="[% 'Print' | $T8 %]">
-<input class="submit" type="submit" name="action_e_mail" value="[% 'E-mail' | $T8 %]">
-<input class="submit" type="submit" name="action_save" value="[% 'Save' | $T8 %]"[% IF warn_save_active_periodic_invoice %] data-warn-save-active-periodic-invoice="1"[% END %]>
-<input class="submit" type="submit" name="action_save_and_close" value="[% 'Save and Close' | $T8 %]"[% IF warn_save_active_periodic_invoice %] data-warn-save-active-periodic-invoice="1"[% END %]>
+<input class="submit" type="submit" name="action_print" value="[% 'Print' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
+<input class="submit" type="submit" name="action_e_mail" value="[% 'E-mail' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
+<input class="submit" type="submit" name="action_save" value="[% 'Save' | $T8 %]"[% IF warn_save_active_periodic_invoice %] data-warn-save-active-periodic-invoice="1"[% END %] data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
+<input class="submit" type="submit" name="action_save_and_close" value="[% 'Save and Close' | $T8 %]"[% IF warn_save_active_periodic_invoice %] data-warn-save-active-periodic-invoice="1"[% END %] data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
[%- IF id %]
<input type="button" class="submit" onclick="follow_up_window()" value="[% 'Follow-Up' | $T8 %]">
<input type="button" class="submit" onclick="set_history_window([% HTML.escape(id) %])" name="history" id="history" value="[% 'history' | $T8 %]">
<br>[% label_workflow %]<br>
- <input class="submit" type="submit" name="action_save_as_new" value="[% 'Save as new' | $T8 %]">
+ <input class="submit" type="submit" name="action_save_as_new" value="[% 'Save as new' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
[%- UNLESS (is_sales_ord && !INSTANCE_CONF.get_sales_order_show_delete) || (is_pur_ord && !INSTANCE_CONF.get_purchase_order_show_delete) %]
[% L.submit_tag('action_delete', LxERP.t8('Delete'), confirm=LxERP.t8('Are you sure?')) %]
</tr>
<tr>
<th align="right">[% 'Transaction description' | $T8 %]</th>
- <td colspan="3"><input name="transaction_description" size="35" value="[% HTML.escape(transaction_description) %]"></td>
+ <td colspan="3"><input name="transaction_description" id="transaction_description" size="35" value="[% HTML.escape(transaction_description) %]"></td>
</tr>
[%- IF show_delivery_customer %]
<tr>