Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 166b320b

Von Tamino Steinert vor etwa 1 Jahr hinzugefügt

  • ID 166b320bdca4d919da631183dd28450330b7d0ac
  • Vorgänger 9640963c
  • Nachfolger 1fda5ec6

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

Unterschiede anzeigen:

js/kivi.Reclamation.js
800 800
    window.open("controller.pl?action=CustomerVendor/edit&db=" + encodeURIComponent(db) + "&id=" + encodeURIComponent($(id_selector).val()), '_blank');
801 801
  };
802 802

  
803
  ns.get_selected_rows = function() {
804
    let selected_rows = [];
805
    $('[name^="multi_id_"]').each( function() {
806
      if (this.checked) {
807
        selected_rows.push($(this).parents("tr").first());
808
      }
809
    });
810
    return selected_rows;
811
  }
812

  
813
  ns.toggle_selected_rows = function() {
814
    let selected_rows = [];
815
    $('[name^="multi_id_"]').each( function() {
816
      this.checked = !this.checked;
817
    });
818
    return selected_rows;
819
  }
820

  
821
  ns.delete_selected_rows = function() {
822
    selected_rows = ns.get_selected_rows();
823
    let row_count = selected_rows.length;
824
    if (row_count == 0) {
825
      alert(kivi.t8("No row selected."));
826
      return;
827
    }
828
    if (!confirm(kivi.t8("Do you want delete #1 rows?", [row_count]))) {
829
      return;
830
    }
831
    selected_rows.forEach(function(row) {
832
      $(row).remove();
833
    });
834
    ns.renumber_positions();
835
    ns.recalc_amounts_and_taxes();
836
  };
837

  
838
  ns.set_selected_to_reason = function() {
839
    let reason_id = $("#reason_for_selected").val();
840
    let selected_rows = ns.get_selected_rows();
841
    selected_rows.forEach(function(row) {
842
      $(row).find('[name="reclamation.reclamation_items[].reason_id"]').val(
843
        reason_id
844
      );
845
    });
846

  
847
  };
848

  
849
  ns.set_selected_to_reason_description_ext = function() {
850
    desc_ext_text = $("[name=reason_description_ext_for_selected]").val();
851
    let selected_rows = ns.get_selected_rows();
852
    selected_rows.forEach(function(row) {
853
      $(row).find('[name="reclamation.reclamation_items[].reason_description_ext"]').val(
854
        desc_ext_text
855
      );
856
    });
857
  };
858

  
859
  ns.set_selected_to_reason_description_int = function() {
860
    desc_int_text = $("[name=reason_description_int_for_selected]").val();
861
    let selected_rows = ns.get_selected_rows();
862
    selected_rows.forEach(function(row) {
863
      $(row).find('[name="reclamation.reclamation_items[].reason_description_int"]').val(
864
        desc_int_text
865
      );
866
    });
867
  };
868

  
803 869
});
804 870

  
805 871
$(function() {
......
859 925
    return false;
860 926
  });
861 927

  
928
  $('#select_all').click( function() {
929
    var checked = this.checked
930
    $('[name^="multi_id_"]').each(function() {
931
      this.checked =  checked;
932
    });
933
  });
934

  
862 935
  $('.reformat_number_as_null_number').change(kivi.Reclamation.reformat_number_as_null_number);
863 936

  
864 937
});
js/locale/de.js
55 55
"Do you really want to print?":"Wollen Sie wirklich drucken?",
56 56
"Do you really want to revert to this version?":"Möchten Sie wirklich auf diese Version zurücksetzen?",
57 57
"Do you really want to unimport the selected documents?":"Möchten Sie wirklich diese Dateien an die Quelle zurückgeben?",
58
"Do you want delete #1 rows?":"Wollen Sie #1 Zeilen löschen?",
58 59
"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?",
59 60
"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?",
60 61
"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?",
......
112 113
"No entries have been selected.":"Es wurden keine Einträge ausgewählt.",
113 114
"No file selected, please set one checkbox!":"Kein Element selektiert,bitte eine Box anklicken",
114 115
"No invoices have been selected.":"Es wurden keine Rechnungen ausgewählt.",
116
"No row selected.":"Keine Zeile ausgewählt.",
115 117
"Nov":"Nov",
116 118
"November":"November",
117 119
"Oct":"Okt",
js/locale/en.js
55 55
"Do you really want to print?":"",
56 56
"Do you really want to revert to this version?":"",
57 57
"Do you really want to unimport the selected documents?":"",
58
"Do you want delete #1 rows?":"",
58 59
"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?":"",
59 60
"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?":"",
60 61
"Do you want to set the account number \"#1\" to \"#2\" and the name \"#3\" to \"#4\"?":"",
......
112 113
"No entries have been selected.":"",
113 114
"No file selected, please set one checkbox!":"",
114 115
"No invoices have been selected.":"",
116
"No row selected.":"",
115 117
"Nov":"",
116 118
"November":"",
117 119
"Oct":"",
locale/de/all
358 358
  'Apply to all parts'          => 'Bei allen Artikeln setzen',
359 359
  'Apply to all transfers'      => 'Bei allen Lagerbewegungen setzen',
360 360
  'Apply to parts without booking group' => 'Bei allen Artikeln ohne gültige Buchungsgruppe setzen',
361
  'Apply to selected rows'      => 'Auf ausgewählte Zeilen anwenden',
361 362
  'Apply to transfers without bin' => 'Bei allen Lagerbewegungen ohne Lagerplatz setzen',
362 363
  'Apply to transfers without comment' => 'Bei allen Lagerbewegungen ohne Kommentar setzen',
363 364
  'Apply to transfers without warehouse' => 'Bei allen Lagerbewegungen ohne Lager setzen',
......
1128 1129
  'Delete profile'              => 'Profil löschen',
1129 1130
  'Delete quotation/order'      => 'Angebot/Auftrag löschen',
1130 1131
  'Delete requirement spec'     => 'Pflichtenheft löschen',
1132
  'Delete selected rows'        => 'Lösche ausgewählte Zeilen',
1131 1133
  'Delete shoporder'            => 'Shopbestellung löschen',
1132 1134
  'Delete template'             => 'Vorlage löschen',
1133 1135
  'Delete text block'           => 'Textblock löschen',
......
1243 1245
  '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.',
1244 1246
  'Do you really want to unimport the selected documents?' => 'Möchten Sie wirklich diese Dateien an die Quelle zurückgeben?',
1245 1247
  '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?',
1248
  'Do you want delete #1 rows?' => 'Wollen Sie #1 Zeilen löschen?',
1246 1249
  'Do you want to <b>limit</b> your search?' => 'Möchten Sie Ihre Suche <b>spezialisieren</b>?',
1247 1250
  '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?',
1248 1251
  '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?',
......
2428 2431
  'No report with id #1'        => 'Es gibt keinen Report mit der Id #1',
2429 2432
  'No requirement spec templates have been created yet.' => 'Es wurden noch keine Pflichtenheftvorlagen angelegt.',
2430 2433
  'No results.'                 => 'Keine Artikel',
2434
  'No row selected.'            => 'Keine Zeile ausgewählt.',
2431 2435
  'No search results found!'    => 'Keine Suchergebnisse gefunden!',
2432 2436
  'No sections created yet'     => 'Keine Abschnitte erstellt',
2433 2437
  'No sections have been created so far.' => 'Bisher wurden noch keine Abschnitte angelegt.',
......
4246 4250
  'To user login'               => 'Zum Benutzerlogin',
4247 4251
  'Today'                       => 'heute',
4248 4252
  'Toggle marker'               => 'Markierung umschalten',
4253
  'Toggle selection'            => 'Auswahl umkehren',
4249 4254
  'Too many results (#1 from #2).' => 'Zu viele Artikel (#1 von #2)',
4250 4255
  'Too much recursions in assembly tree (>100)' => 'Zu tiefe Verschachtelung (>100) des Erzeugnisbaum',
4251 4256
  'Top'                         => 'Oben',
locale/en/all
358 358
  'Apply to all parts'          => '',
359 359
  'Apply to all transfers'      => '',
360 360
  'Apply to parts without booking group' => '',
361
  'Apply to selected rows'      => '',
361 362
  'Apply to transfers without bin' => '',
362 363
  'Apply to transfers without comment' => '',
363 364
  'Apply to transfers without warehouse' => '',
......
1128 1129
  'Delete profile'              => '',
1129 1130
  'Delete quotation/order'      => '',
1130 1131
  'Delete requirement spec'     => '',
1132
  'Delete selected rows'        => '',
1131 1133
  'Delete shoporder'            => '',
1132 1134
  'Delete template'             => '',
1133 1135
  'Delete text block'           => '',
......
1243 1245
  'Do you really want to undo the selected SEPA exports? You have to reassign the export again.' => '',
1244 1246
  'Do you really want to unimport the selected documents?' => '',
1245 1247
  'Do you really want undo transfers the stock and set this order to undelivered?' => '',
1248
  'Do you want delete #1 rows?' => '',
1246 1249
  'Do you want to <b>limit</b> your search?' => '',
1247 1250
  '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?' => '',
1248 1251
  '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?' => '',
......
2427 2430
  'No report with id #1'        => '',
2428 2431
  'No requirement spec templates have been created yet.' => '',
2429 2432
  'No results.'                 => '',
2433
  'No row selected.'            => '',
2430 2434
  'No search results found!'    => '',
2431 2435
  'No sections created yet'     => '',
2432 2436
  'No sections have been created so far.' => '',
templates/design40_webpages/reclamation/tabs/basic_data.html
301 301
            [%- L.img_tag(src="image/expand.svg", alt=LxERP.t8('Show all details'), title=LxERP.t8('Show all details'), id='expand_all') %]
302 302
          [%- END %]
303 303
        </th>
304
          <th>
305
            [% L.checkbox_tag("select_all_multi_id", checked=0, alt=LxERP.t8('Select/Deselect all'), title=LxERP.t8('Select/Deselect all'), id='select_all') %]
306
          </th>
304 307
        <th>[% 'position' | $T8 %] </th>
305 308
        <th style='text-align:center'><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></th>
306 309
        <th style='text-align:center'><img src="image/close.png" alt="[%- LxERP.t8('delete item') %]"></th>
......
332 335
        <th id="discount_header_id"><a href='#' onClick='javascript:kivi.Reclamation.reorder_items("discount")'>  [%- 'Discount'    | $T8 %]</a></th>
333 336
        <th>[%- 'Extended' | $T8 %] </th>
334 337
      </tr>
338
      <tr>
339
        <th></th>
340
        <th class="center">
341
          [%- L.button_tag('kivi.Reclamation.toggle_selected_rows();', "🔄",
342
                           title=LxERP.t8("Toggle selection"),
343
                           alt=LxERP.t8("Toggle selection"),
344
                           ) %]
345
        </th>
346
        <th colspan="2"></th>
347
        <th class="center">
348
          [%- L.button_tag('kivi.Reclamation.delete_selected_rows();', LxERP.t8("X"),
349
                           title=LxERP.t8("Delete selected rows"),
350
                           alt=LxERP.t8("Delete selected rows"),
351
                           ) %]
352
        </th>
353
        [%- IF SELF.show_update_button -%]
354
        <th></th>
355
        [%- END -%]
356
        <th colspan="3"></th>
357
        <th>
358
          [% L.select_tag("reason_for_selected",
359
                          SELF.reclamation.valid_reclamation_reasons,
360
                          title_key = 'name',
361
                          value_key = 'id',
362
                          with_empty=1,
363
                          class="wi-small",
364
                          ) %]
365
          [%- L.button_tag('kivi.Reclamation.set_selected_to_reason()', "↓",
366
                           alt=LxERP.t8('Apply to selected rows'),
367
                           title=LxERP.t8('Apply to selected rows'),
368
                           ) %]
369
        </th>
370
        <th>
371
          [% L.areainput_tag("reason_description_ext_for_selected",
372
                             "",
373
                             size='40',
374
                             class="wi-mediumsmall",
375
                             ) %]
376
          [%- L.button_tag('kivi.Reclamation.set_selected_to_reason_description_ext()', "↓",
377
                           alt=LxERP.t8('Apply to selected rows'),
378
                           title=LxERP.t8('Apply to selected rows'),
379
                           ) %]
380
        </th>
381
        <th>
382
          [% L.areainput_tag("reason_description_int_for_selected",
383
                             "",
384
                             size='40',
385
                             class="wi-mediumsmall",
386
                             ) %]
387
          [%- L.button_tag('kivi.Reclamation.set_selected_to_reason_description_int()', "↓",
388
                           alt=LxERP.t8('Apply to selected rows'),
389
                           title=LxERP.t8('Apply to selected rows'),
390
                           ) %]
391
        </th>
392
        <th colspan="7"></th>
393
      </tr>
335 394
    </thead>
336 395

  
337 396
    [%- FOREACH item = SELF.reclamation.items_sorted %]
......
340 399

  
341 400
    <tfoot>
342 401
      <tr id="subtotal_row_id">
343
        <td colspan="13"></td>
402
        <td colspan="14"></td>
344 403
        [%- IF SELF.show_update_button -%]
345 404
        <td></td>
346 405
        [%- END -%]
......
351 410
        [%- PROCESS reclamation/tabs/basic_data/_tax_row.html TAX=tax TAXINCLUDED=SELF.reclamation.taxincluded %]
352 411
      [%- END %]
353 412
      <tr id="amount_row_id">
354
        <td colspan="13"></td>
413
        <td colspan="14"></td>
355 414
        [%- IF SELF.show_update_button -%]
356 415
        <td></td>
357 416
        [%- END -%]
templates/design40_webpages/reclamation/tabs/basic_data/_row.html
21 21
                     alt=LxERP.t8('Show details'), title=LxERP.t8('Show details'), class="expand") %]
22 22
      [%- END %]
23 23
    </td>
24
    <td>
25
      [% L.checkbox_tag('multi_id_' _ ITEM.position, value=ITEM.id, checked=0) %]
26
    </td>
24 27
    <td>
25 28
      <div name="position" class="center">
26 29
        [% HTML.escape(ITEM.position) %]
templates/design40_webpages/reclamation/tabs/basic_data/_tax_row.html
4 4
[%- USE L %]
5 5

  
6 6
<tr class="tax_row">
7
  <td colspan="13"></td>
7
  <td colspan="14"></td>
8 8
  [%- IF SELF.show_update_button -%]
9 9
  <td></td>
10 10
  [%- END -%]
......
13 13
</tr>
14 14
[%- IF TAXINCLUDED %]
15 15
<tr class="tax_row">
16
  <td colspan="13"></td>
16
  <td colspan="14"></td>
17 17
  [%- IF SELF.show_update_button -%]
18 18
  <td></td>
19 19
  [%- END -%]
templates/webpages/reclamation/tabs/basic_data.html
221 221
                    [%- L.img_tag(src="image/expand.svg", alt=LxERP.t8('Show all details'), title=LxERP.t8('Show all details'), id='expand_all') %]
222 222
                  [%- END %]
223 223
                </th>
224
                <th>
225
                  [% L.checkbox_tag("select_all_multi_id", checked=0, alt=LxERP.t8('Select/Deselect all'), title=LxERP.t8('Select/Deselect all'), id='select_all') %]
226
                </th>
224 227
                <th class="listheading" nowrap width="3" >[%- 'position'     | $T8 %] </th>
225 228
                <th class="listheading" style='text-align:center' nowrap width="1"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></th>
226 229
                <th class="listheading" style='text-align:center' nowrap width="1"><img src="image/close.png" alt="[%- LxERP.t8('delete item') %]"></th>
......
250 253
                <th id="discount_header_id"    class="listheading" nowrap width="15" ><a href='#' onClick='javascript:kivi.Reclamation.reorder_items("discount")'>  [%- 'Discount'    | $T8 %]</a></th>
251 254
                <th class="listheading" nowrap width="10">[%- 'Extended'     | $T8 %] </th>
252 255
              </tr>
256
              <tr class="listheading">
257
                <th></th>
258
                <th class="center">
259
                  [%- L.button_tag('kivi.Reclamation.toggle_selected_rows();', "🔄",
260
                                   title=LxERP.t8("Toggle selection"),
261
                                   alt=LxERP.t8("Toggle selection"),
262
                                   ) %]
263
                </th>
264
                <th colspan="2"></th>
265
                <th class="center">
266
                  [%- L.button_tag('kivi.Reclamation.delete_selected_rows();', LxERP.t8("X"),
267
                                   title=LxERP.t8("Delete selected rows"),
268
                                   alt=LxERP.t8("Delete selected rows"),
269
                                   ) %]
270
                </th>
271
                [%- IF SELF.show_update_button -%]
272
                <th></th>
273
                [%- END -%]
274
                <th colspan="3"></th>
275
                <th>
276
                  [% L.select_tag("reason_for_selected",
277
                                  SELF.reclamation.valid_reclamation_reasons,
278
                                  title_key = 'name',
279
                                  value_key = 'id',
280
                                  with_empty=1,
281
                                  class="wi-small",
282
                                  ) %]
283
                  [%- L.button_tag('kivi.Reclamation.set_selected_to_reason()', "↓",
284
                                   alt=LxERP.t8('Apply to selected rows'),
285
                                   title=LxERP.t8('Apply to selected rows'),
286
                                   ) %]
287
                </th>
288
                <th>
289
                  [% L.areainput_tag("reason_description_ext_for_selected",
290
                                     "",
291
                                     class="wi-mediumsmall",
292
                                     ) %]
293
                  [%- L.button_tag('kivi.Reclamation.set_selected_to_reason_description_ext()', "↓",
294
                                   alt=LxERP.t8('Apply to selected rows'),
295
                                   title=LxERP.t8('Apply to selected rows'),
296
                                   ) %]
297
                </th>
298
                <th>
299
                  [% L.areainput_tag("reason_description_int_for_selected",
300
                                     "",
301
                                     class="wi-mediumsmall",
302
                                     ) %]
303
                  [%- L.button_tag('kivi.Reclamation.set_selected_to_reason_description_int()', "↓",
304
                                   alt=LxERP.t8('Apply to selected rows'),
305
                                   title=LxERP.t8('Apply to selected rows'),
306
                                   ) %]
307
                </th>
308
                <th colspan="7"></th>
309
              </tr>
253 310
            </thead>
254 311

  
255 312
            [%- FOREACH item = SELF.reclamation.items_sorted %]
templates/webpages/reclamation/tabs/basic_data/_row.html
21 21
                     alt=LxERP.t8('Show details'), title=LxERP.t8('Show details'), class="expand") %]
22 22
      [%- END %]
23 23
    </td>
24
    <td>
25
      [% L.checkbox_tag('multi_id_' _ ITEM.position, value=ITEM.id, checked=0) %]
26
    </td>
24 27
    <td>
25 28
      <div name="position" class="numeric">
26 29
        [% HTML.escape(ITEM.position) %]

Auch abrufbar als: Unified diff