Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision d030c273

Von Tamino Steinert vor etwa 2 Jahren hinzugefügt

  • ID d030c2731e67ef87b8eba6774ae1ba1cca1c730f
  • Vorgänger 2aa88240

Reclamation: multi edit for: delete, reason, res_desc_ext, res_desc_int

Unterschiede anzeigen:

js/kivi.Reclamation.js
window.open("controller.pl?action=CustomerVendor/edit&db=" + encodeURIComponent(db) + "&id=" + encodeURIComponent($(id_selector).val()), '_blank');
};
ns.get_selected_rows = function() {
let selected_rows = [];
$('[name^="multi_id_"]').each( function() {
if (this.checked) {
selected_rows.push($(this).parents("tr").first());
}
});
return selected_rows;
}
ns.toggle_selected_rows = function() {
let selected_rows = [];
$('[name^="multi_id_"]').each( function() {
this.checked = !this.checked;
});
return selected_rows;
}
ns.delete_selected_rows = function() {
selected_rows = ns.get_selected_rows();
let row_count = selected_rows.length;
if (row_count == 0) {
alert(kivi.t8("No row selected."));
return;
}
if (!confirm(kivi.t8("Do you want delete #1 rows?", [row_count]))) {
return;
}
selected_rows.forEach(function(row) {
$(row).remove();
});
ns.renumber_positions();
ns.recalc_amounts_and_taxes();
};
ns.set_selected_to_reason = function() {
let reason_id = $("#reason_for_selected").val();
let selected_rows = ns.get_selected_rows();
selected_rows.forEach(function(row) {
$(row).find('[name="reclamation.reclamation_items[].reason_id"]').val(
reason_id
);
});
};
ns.set_selected_to_reason_description_ext = function() {
desc_ext_text = $("[name=reason_description_ext_for_selected]").val();
let selected_rows = ns.get_selected_rows();
selected_rows.forEach(function(row) {
$(row).find('[name="reclamation.reclamation_items[].reason_description_ext"]').val(
desc_ext_text
);
});
};
ns.set_selected_to_reason_description_int = function() {
desc_int_text = $("[name=reason_description_int_for_selected]").val();
let selected_rows = ns.get_selected_rows();
selected_rows.forEach(function(row) {
$(row).find('[name="reclamation.reclamation_items[].reason_description_int"]').val(
desc_int_text
);
});
};
});
$(function() {
......
return false;
});
$('#select_all').click( function() {
var checked = this.checked
$('[name^="multi_id_"]').each(function() {
this.checked = checked;
});
});
$('.reformat_number_as_null_number').change(kivi.Reclamation.reformat_number_as_null_number);
});
js/locale/de.js
"Do you really want to print?":"Wollen Sie wirklich drucken?",
"Do you really want to revert to this version?":"Möchten Sie wirklich auf diese Version zurücksetzen?",
"Do you really want to unimport the selected documents?":"Möchten Sie wirklich diese Dateien an die Quelle zurückgeben?",
"Do you want delete #1 rows?":"Wollen Sie #1 Zeilen löschen?",
"Do you want to carry this shipping address over to the new purchase document so that the vendor can deliver the goods directly to your customer?":"Möchten Sie diese Lieferadresse in den neuen Einkaufsbeleg übernehmen, damit der Händler die Waren direkt an Ihren Kunden liefern kann?",
"Do you want to carry this shipping address over to the new purchase reclamation so that the vendor can deliver the goods directly to your customer?":"Möchten Sie diese Lieferadresse in die neue Einkaufsreklamation übernehmen, damit der Händler die Waren direkt an Ihren Kunden liefern kann?",
"Do you want to set the account number \"#1\" to \"#2\" and the name \"#3\" to \"#4\"?":"Soll die Kontonummer \"#1\" zu \"#2\" und den Name \"#3\" zu \"#4\" geändert werden?",
......
"No entries have been selected.":"Es wurden keine Einträge ausgewählt.",
"No file selected, please set one checkbox!":"Kein Element selektiert,bitte eine Box anklicken",
"No invoices have been selected.":"Es wurden keine Rechnungen ausgewählt.",
"No row selected.":"Keine Zeile ausgewählt.",
"Nov":"Nov",
"November":"November",
"Oct":"Okt",
js/locale/en.js
"Do you really want to print?":"",
"Do you really want to revert to this version?":"",
"Do you really want to unimport the selected documents?":"",
"Do you want delete #1 rows?":"",
"Do you want to carry this shipping address over to the new purchase document so that the vendor can deliver the goods directly to your customer?":"",
"Do you want to carry this shipping address over to the new purchase reclamation so that the vendor can deliver the goods directly to your customer?":"",
"Do you want to set the account number \"#1\" to \"#2\" and the name \"#3\" to \"#4\"?":"",
......
"No entries have been selected.":"",
"No file selected, please set one checkbox!":"",
"No invoices have been selected.":"",
"No row selected.":"",
"Nov":"",
"November":"",
"Oct":"",
locale/de/all
'Apply to all parts' => 'Bei allen Artikeln setzen',
'Apply to all transfers' => 'Bei allen Lagerbewegungen setzen',
'Apply to parts without booking group' => 'Bei allen Artikeln ohne gültige Buchungsgruppe setzen',
'Apply to selected rows' => 'Auf ausgewählte Zeilen anwenden',
'Apply to transfers without bin' => 'Bei allen Lagerbewegungen ohne Lagerplatz setzen',
'Apply to transfers without comment' => 'Bei allen Lagerbewegungen ohne Kommentar setzen',
'Apply to transfers without warehouse' => 'Bei allen Lagerbewegungen ohne Lager setzen',
......
'Delete profile' => 'Profil löschen',
'Delete quotation/order' => 'Angebot/Auftrag löschen',
'Delete requirement spec' => 'Pflichtenheft löschen',
'Delete selected rows' => 'Lösche ausgewählte Zeilen',
'Delete shoporder' => 'Shopbestellung löschen',
'Delete template' => 'Vorlage löschen',
'Delete text block' => 'Textblock löschen',
......
'Do you really want to undo the selected SEPA exports? You have to reassign the export again.' => 'Möchten Sie wirklich die ausgewählten SEPA-Exports rückgängig machen? Der Export muss anschließend neu erzeugt werden.',
'Do you really want to unimport the selected documents?' => 'Möchten Sie wirklich diese Dateien an die Quelle zurückgeben?',
'Do you really want undo transfers the stock and set this order to undelivered?' => 'Wollen sie wirklich die Lagerbewegung rückgängig machen und den Beleg als nicht geliefert setzen?',
'Do you want delete #1 rows?' => 'Wollen Sie #1 Zeilen löschen?',
'Do you want to <b>limit</b> your search?' => 'Möchten Sie Ihre Suche <b>spezialisieren</b>?',
'Do you want to carry this shipping address over to the new purchase document so that the vendor can deliver the goods directly to your customer?' => 'Möchten Sie diese Lieferadresse in den neuen Einkaufsbeleg übernehmen, damit der Händler die Waren direkt an Ihren Kunden liefern kann?',
'Do you want to carry this shipping address over to the new purchase reclamation so that the vendor can deliver the goods directly to your customer?' => 'Möchten Sie diese Lieferadresse in die neue Einkaufsreklamation übernehmen, damit der Händler die Waren direkt an Ihren Kunden liefern kann?',
......
'No report with id #1' => 'Es gibt keinen Report mit der Id #1',
'No requirement spec templates have been created yet.' => 'Es wurden noch keine Pflichtenheftvorlagen angelegt.',
'No results.' => 'Keine Artikel',
'No row selected.' => 'Keine Zeile ausgewählt.',
'No search results found!' => 'Keine Suchergebnisse gefunden!',
'No sections created yet' => 'Keine Abschnitte erstellt',
'No sections have been created so far.' => 'Bisher wurden noch keine Abschnitte angelegt.',
......
'To user login' => 'Zum Benutzerlogin',
'Today' => 'heute',
'Toggle marker' => 'Markierung umschalten',
'Toggle selection' => 'Auswahl umkehren',
'Too many results (#1 from #2).' => 'Zu viele Artikel (#1 von #2)',
'Too much recursions in assembly tree (>100)' => 'Zu tiefe Verschachtelung (>100) des Erzeugnisbaum',
'Top' => 'Oben',
locale/en/all
'Apply to all parts' => '',
'Apply to all transfers' => '',
'Apply to parts without booking group' => '',
'Apply to selected rows' => '',
'Apply to transfers without bin' => '',
'Apply to transfers without comment' => '',
'Apply to transfers without warehouse' => '',
......
'Delete profile' => '',
'Delete quotation/order' => '',
'Delete requirement spec' => '',
'Delete selected rows' => '',
'Delete shoporder' => '',
'Delete template' => '',
'Delete text block' => '',
......
'Do you really want to undo the selected SEPA exports? You have to reassign the export again.' => '',
'Do you really want to unimport the selected documents?' => '',
'Do you really want undo transfers the stock and set this order to undelivered?' => '',
'Do you want delete #1 rows?' => '',
'Do you want to <b>limit</b> your search?' => '',
'Do you want to carry this shipping address over to the new purchase document so that the vendor can deliver the goods directly to your customer?' => '',
'Do you want to carry this shipping address over to the new purchase reclamation so that the vendor can deliver the goods directly to your customer?' => '',
......
'No report with id #1' => '',
'No requirement spec templates have been created yet.' => '',
'No results.' => '',
'No row selected.' => '',
'No search results found!' => '',
'No sections created yet' => '',
'No sections have been created so far.' => '',
templates/design40_webpages/reclamation/tabs/basic_data.html
[%- L.img_tag(src="image/expand.svg", alt=LxERP.t8('Show all details'), title=LxERP.t8('Show all details'), id='expand_all') %]
[%- END %]
</th>
<th>
[% L.checkbox_tag("select_all_multi_id", checked=0, alt=LxERP.t8('Select/Deselect all'), title=LxERP.t8('Select/Deselect all'), id='select_all') %]
</th>
<th>[% 'position' | $T8 %] </th>
<th style='text-align:center'><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></th>
<th style='text-align:center'><img src="image/close.png" alt="[%- LxERP.t8('delete item') %]"></th>
......
<th id="discount_header_id"><a href='#' onClick='javascript:kivi.Reclamation.reorder_items("discount")'> [%- 'Discount' | $T8 %]</a></th>
<th>[%- 'Extended' | $T8 %] </th>
</tr>
<tr>
<th></th>
<th class="center">
[%- L.button_tag('kivi.Reclamation.toggle_selected_rows();', "🔄",
title=LxERP.t8("Toggle selection"),
alt=LxERP.t8("Toggle selection"),
) %]
</th>
<th colspan="2"></th>
<th class="center">
[%- L.button_tag('kivi.Reclamation.delete_selected_rows();', LxERP.t8("X"),
title=LxERP.t8("Delete selected rows"),
alt=LxERP.t8("Delete selected rows"),
) %]
</th>
[%- IF SELF.show_update_button -%]
<th></th>
[%- END -%]
<th colspan="3"></th>
<th>
[% L.select_tag("reason_for_selected",
SELF.reclamation.valid_reclamation_reasons,
title_key = 'name',
value_key = 'id',
with_empty=1,
class="wi-small",
) %]
[%- L.button_tag('kivi.Reclamation.set_selected_to_reason()', "↓",
alt=LxERP.t8('Apply to selected rows'),
title=LxERP.t8('Apply to selected rows'),
) %]
</th>
<th>
[% L.areainput_tag("reason_description_ext_for_selected",
"",
size='40',
class="wi-mediumsmall",
) %]
[%- L.button_tag('kivi.Reclamation.set_selected_to_reason_description_ext()', "↓",
alt=LxERP.t8('Apply to selected rows'),
title=LxERP.t8('Apply to selected rows'),
) %]
</th>
<th>
[% L.areainput_tag("reason_description_int_for_selected",
"",
size='40',
class="wi-mediumsmall",
) %]
[%- L.button_tag('kivi.Reclamation.set_selected_to_reason_description_int()', "↓",
alt=LxERP.t8('Apply to selected rows'),
title=LxERP.t8('Apply to selected rows'),
) %]
</th>
<th colspan="7"></th>
</tr>
</thead>
[%- FOREACH item = SELF.reclamation.items_sorted %]
......
<tfoot>
<tr id="subtotal_row_id">
<td colspan="13"></td>
<td colspan="14"></td>
[%- IF SELF.show_update_button -%]
<td></td>
[%- END -%]
......
[%- PROCESS reclamation/tabs/basic_data/_tax_row.html TAX=tax TAXINCLUDED=SELF.reclamation.taxincluded %]
[%- END %]
<tr id="amount_row_id">
<td colspan="13"></td>
<td colspan="14"></td>
[%- IF SELF.show_update_button -%]
<td></td>
[%- END -%]
templates/design40_webpages/reclamation/tabs/basic_data/_row.html
alt=LxERP.t8('Show details'), title=LxERP.t8('Show details'), class="expand") %]
[%- END %]
</td>
<td>
[% L.checkbox_tag('multi_id_' _ ITEM.position, value=ITEM.id, checked=0) %]
</td>
<td>
<div name="position" class="center">
[% HTML.escape(ITEM.position) %]
templates/design40_webpages/reclamation/tabs/basic_data/_tax_row.html
[%- USE L %]
<tr class="tax_row">
<td colspan="13"></td>
<td colspan="14"></td>
[%- IF SELF.show_update_button -%]
<td></td>
[%- END -%]
......
</tr>
[%- IF TAXINCLUDED %]
<tr class="tax_row">
<td colspan="13"></td>
<td colspan="14"></td>
[%- IF SELF.show_update_button -%]
<td></td>
[%- END -%]
templates/webpages/reclamation/tabs/basic_data.html
[%- L.img_tag(src="image/expand.svg", alt=LxERP.t8('Show all details'), title=LxERP.t8('Show all details'), id='expand_all') %]
[%- END %]
</th>
<th>
[% L.checkbox_tag("select_all_multi_id", checked=0, alt=LxERP.t8('Select/Deselect all'), title=LxERP.t8('Select/Deselect all'), id='select_all') %]
</th>
<th class="listheading" nowrap width="3" >[%- 'position' | $T8 %] </th>
<th class="listheading" style='text-align:center' nowrap width="1"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></th>
<th class="listheading" style='text-align:center' nowrap width="1"><img src="image/close.png" alt="[%- LxERP.t8('delete item') %]"></th>
......
<th id="discount_header_id" class="listheading" nowrap width="15" ><a href='#' onClick='javascript:kivi.Reclamation.reorder_items("discount")'> [%- 'Discount' | $T8 %]</a></th>
<th class="listheading" nowrap width="10">[%- 'Extended' | $T8 %] </th>
</tr>
<tr class="listheading">
<th></th>
<th class="center">
[%- L.button_tag('kivi.Reclamation.toggle_selected_rows();', "🔄",
title=LxERP.t8("Toggle selection"),
alt=LxERP.t8("Toggle selection"),
) %]
</th>
<th colspan="2"></th>
<th class="center">
[%- L.button_tag('kivi.Reclamation.delete_selected_rows();', LxERP.t8("X"),
title=LxERP.t8("Delete selected rows"),
alt=LxERP.t8("Delete selected rows"),
) %]
</th>
[%- IF SELF.show_update_button -%]
<th></th>
[%- END -%]
<th colspan="3"></th>
<th>
[% L.select_tag("reason_for_selected",
SELF.reclamation.valid_reclamation_reasons,
title_key = 'name',
value_key = 'id',
with_empty=1,
class="wi-small",
) %]
[%- L.button_tag('kivi.Reclamation.set_selected_to_reason()', "↓",
alt=LxERP.t8('Apply to selected rows'),
title=LxERP.t8('Apply to selected rows'),
) %]
</th>
<th>
[% L.areainput_tag("reason_description_ext_for_selected",
"",
class="wi-mediumsmall",
) %]
[%- L.button_tag('kivi.Reclamation.set_selected_to_reason_description_ext()', "↓",
alt=LxERP.t8('Apply to selected rows'),
title=LxERP.t8('Apply to selected rows'),
) %]
</th>
<th>
[% L.areainput_tag("reason_description_int_for_selected",
"",
class="wi-mediumsmall",
) %]
[%- L.button_tag('kivi.Reclamation.set_selected_to_reason_description_int()', "↓",
alt=LxERP.t8('Apply to selected rows'),
title=LxERP.t8('Apply to selected rows'),
) %]
</th>
<th colspan="7"></th>
</tr>
</thead>
[%- FOREACH item = SELF.reclamation.items_sorted %]
templates/webpages/reclamation/tabs/basic_data/_row.html
alt=LxERP.t8('Show details'), title=LxERP.t8('Show details'), class="expand") %]
[%- END %]
</td>
<td>
[% L.checkbox_tag('multi_id_' _ ITEM.position, value=ITEM.id, checked=0) %]
</td>
<td>
<div name="position" class="numeric">
[% HTML.escape(ITEM.position) %]

Auch abrufbar als: Unified diff