Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 44fff8c6

Von Niklas Schmidt vor 4 Tagen hinzugefügt

  • ID 44fff8c68ba5fb00f73080ec902b331f31bf7022
  • Vorgänger f3017a41
  • Nachfolger e148b1c2

S:C:DeliveryOrder: Stock in out dialog: Button Speichern und Weiter eingefügt

Unterschiede anzeigen:

SL/Controller/DeliveryOrder.pm
953 953
  my $row     = $::form->{row};
954 954
  my $item_id = $::form->{item_id};
955 955
  my $qty     = _parse_number($::form->{qty_as_number});
956
  my $row_ui_id = $::form->{row_ui_id};
957
  my $next_button = $::form->{next_button} eq 'true';
956 958

  
957 959
  my $inout = $self->type_data->properties("transfer");
958 960

  
......
973 975
    row        => $row,
974 976
    item_id    => $item_id,
975 977
    in_out     => $inout,
978
    row_ui_id  => $row_ui_id,
979
    next_button => $next_button,
976 980
  );
977 981
}
978 982

  
js/kivi.DeliveryOrder.js
98 98
    });
99 99
  };
100 100

  
101
  ns.stock_in_out_dialog_row_by_id = function(id) {
102
    var row = $("#row_table_id").find("tbody.row_entry.listrow").eq(id).find("tr").first().find("td").first();
103
    return row;
104
  };
105

  
106
  ns.next_stock_in_out_dialog = function(id) {
107
    ns.save_updated_stock(false);
108

  
109
    var row = ns.stock_in_out_dialog_row_by_id(id);
110
    var in_out = $("#stock_in_out_dialog").find("[name$=in_out]").val();
111

  
112
    if (row["length"] != 0)
113
      ns.open_stock_in_out_dialog(row, in_out);
114
  };
115

  
101 116
  ns.open_stock_in_out_dialog = function(clicked, in_out) {
102 117
    var $row = $(clicked).parents("tbody").first();
103 118
    var id = $row.find('[name="orderitem_ids[+]"]').val();
104 119
    $row.uniqueId();
105 120

  
121
    var pos = $(clicked).parents("tr").first().children().find('[name="position"]').first().text();
122

  
123
    var next_row = ns.stock_in_out_dialog_row_by_id(pos);
124
    var next_button = (next_row["length"] != 0);
125

  
106 126
    kivi.popup_dialog({
107 127
      id: "stock_in_out_dialog",
108 128
      url: "controller.pl?action=DeliveryOrder/stock_in_out_dialog",
......
115 135
        stock:         $row.find("[name$=stock_info]").val(),
116 136
        item_id:       id,
117 137
        row:           $row.attr("id"),
138
        row_ui_id:     pos,
139
        next_button:   next_button,
118 140
      },
119 141
      dialog: { title: kivi.t8('Transfer stock') }
120 142
    });
locale/de/all
3465 3465
  'Save and Further Invoice for Advance Payment' => 'Speichern und weitere Anzahlungsrechnung',
3466 3466
  'Save and Invoice'            => 'Speichern und Rechnung erfassen',
3467 3467
  'Save and Invoice for Advance Payment' => 'Speichern und Anzahlungsrechnung',
3468
  'Save and Next'               => 'Speichern und weiter',
3468 3469
  'Save and Order'              => 'Speichern und Auftrag erfassen',
3469 3470
  'Save and Purchase Delivery Order' => 'Speichern und Lieferschein (Einkauf)',
3470 3471
  'Save and Purchase Delivery Order with item selection' => 'Speichern und Lieferschein (Einkauf) mit Artikelauswahl',
locale/en/all
3464 3464
  'Save and Further Invoice for Advance Payment' => '',
3465 3465
  'Save and Invoice'            => '',
3466 3466
  'Save and Invoice for Advance Payment' => '',
3467
  'Save and Next'               => '',
3467 3468
  'Save and Order'              => '',
3468 3469
  'Save and Purchase Delivery Order' => '',
3469 3470
  'Save and Purchase Delivery Order with item selection' => '',
templates/design40_webpages/delivery_order/stock_dialog.html
25 25
 [% L.hidden_tag("do_unit", do_unit) %]
26 26
 [% L.hidden_tag("row", row, class="data-row") %]
27 27
 [% L.hidden_tag("item_id", item_id) %]
28
 [% L.hidden_tag("row_ui_id", row_ui_id) %]
28 29

  
29 30
 [%- IF delivered %]
30 31
  [% PROCESS "delivery_order/stock_dialog/_stock_delivered_dialog.html" %]
......
54 55

  
55 56
  <hr size="3" noshade>
56 57

  
57
  <p>[% L.button_tag('kivi.DeliveryOrder.save_updated_stock(true)', LxERP.t8('Save')) %]</p>
58
  <p>
59
    [% L.button_tag('kivi.DeliveryOrder.save_updated_stock(true)', LxERP.t8('Save and Close')) %]
60
    [%- IF next_button %]
61
      [% L.button_tag("kivi.DeliveryOrder.next_stock_in_out_dialog($row_ui_id)", LxERP.t8('Save and Next')) %]
62
    [%- END %]
63
  </p>
58 64

  
59 65
  [%- END %]
60 66
 </form>

Auch abrufbar als: Unified diff