Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision cac8aa9f

Von Sven Schöling vor etwa 3 Jahren hinzugefügt

  • ID cac8aa9f641d80197ade27ac81044a9061f595b4
  • Vorgänger 96032e41
  • Nachfolger c2075a3c

DeliveryOrder: stock info im dom speichern

Unterschiede anzeigen:

SL/Controller/DeliveryOrder.pm
890 890
sub action_stock_in_out_dialog {
891 891
  my ($self) = @_;
892 892

  
893
  my $part = SL::DB::Part->load_cached($::form->{parts_id}) or die "need parts_id";
894
  my $stock = $::form->{stock};
895
  my $unit = $::form->{unit};
896
  my $qty = _parse_number($::form->{qty_as_number});
893
  my $part    = SL::DB::Part->load_cached($::form->{parts_id}) or die "need parts_id";
894
  my $stock   = $::form->{stock};
895
  my $unit    = $::form->{unit};
896
  my $row     = $::form->{row};
897
  my $item_id = $::form->{item_id};
898
  my $qty     = _parse_number($::form->{qty_as_number});
897 899

  
898 900
  my $inout = $self->type_data->transfer;
899 901

  
......
904 906

  
905 907
  $self->render("delivery_order/stock_dialog", { layout => 0 },
906 908
    WHCONTENTS => $self->order->delivered ? $stock_info : \@contents,
907
    part  => $part,
908
    do_qty => $qty,
909
    do_unit => $unit,
910
    delivered => $self->order->delivered,
909
    part       => $part,
910
    do_qty     => $qty,
911
    do_unit    => $unit,
912
    delivered  => $self->order->delivered,
913
    row        => $row,
914
    itme_id    => $item_id,
911 915
  );
912 916
}
913 917

  
js/kivi.DeliveryOrder.js
119 119

  
120 120
    let row = $(".data-row").val();
121 121

  
122
    $.post("controller.pl", kivi.serialize({
123
        action: "DeliveryOrder/pack_stock_information",
124
        stock_info: data
122
    $.post("controller.pl",
123
      kivi.serialize({
124
        action:     "DeliveryOrder/pack_stock_information",
125
        stock_info: data,
126
        row:        row
125 127
      }),
126 128
      (data) => {
127
        $("[name=stock_info_" + row + "]").val(data);
129
        $("#" + row + " .data-stock-info").val(data);
128 130
        $("#stock_in_out_dialog").dialog("close");
129 131
      }
130 132
    );
templates/webpages/delivery_order/stock_dialog.html
30 30
  [% L.hidden_tag("do_qty", do_qty) %]
31 31
  [% L.hidden_tag("do_unit", do_unit) %]
32 32
  [% L.hidden_tag("row", row, class="data-row") %]
33
  [% L.hidden_tag("item_id", item_id) %]
33 34

  
34 35
  <p>
35 36
   <table id="stock-in-out-table">
templates/webpages/delivery_order/tabs/_row.html
16 16
      [%- END %]
17 17
      [% L.hidden_tag("orderitem_ids[+]", ID) %]
18 18
      [% L.hidden_tag("converted_from_orderitems_ids[+]", ITEM.converted_from_orderitems_id) %]
19
      [% L.hidden_tag("stock_info[+]", ITEM.stock_info, class="data-stock-info") %]
19 20
      [% L.hidden_tag("order.orderitems[+].id", ITEM.id, id='item_' _ ID) %]
20 21
      [% L.hidden_tag("order.orderitems[].parts_id", ITEM.parts_id) %]
21 22
    </td>

Auch abrufbar als: Unified diff