Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 06110580

Von Sven Schöling vor mehr als 12 Jahren hinzugefügt

  • ID 061105807cbfb5b86b804e71db9509c996c93912
  • Vorgänger 59358b2a
  • Nachfolger 150db130

Lieferscheine einlagern/auslagern fragt jetzt nach, wenn die Menge nicht mit der angegeben übereinstimmt.

Zu Bug 1717.

Unterschiede anzeigen:

bin/mozilla/do.pl
984 984
  my $in_out   = $form->{type} =~ /^sales/ ? 'out' : 'in';
985 985
  my $sinfo    = DO->unpack_stock_information('packed' => $form->{"stock_${in_out}_${i}"});
986 986

  
987
  my $do_qty   = AM->sum_with_unit($::form->{"qty_$i"}, $::form->{"unit_$i"});
987 988
  my $sum      = AM->sum_with_unit(map { $_->{qty}, $_->{unit} } @{ $sinfo });
989
  my $matches  = $do_qty == $sum;
988 990

  
989 991
  my $content  = $form->format_amount_units('amount'      => $sum * 1,
990 992
                                            'part_unit'   => $form->{"partunit_$i"},
991 993
                                            'amount_unit' => $all_units->{$form->{"partunit_$i"}}->{base_unit},
992 994
                                            'conv_units'  => 'convertible_not_smaller',
993 995
                                            'max_places'  => 2);
994
  $content     = qq|<span id="stock_in_out_qty_display_${i}">${content}</span> <input type="button" onclick="open_stock_in_out_window('${in_out}', $i);" value="?">|;
996
  $content     = qq|<span id="stock_in_out_qty_display_${i}">${content}</span><input type=hidden id='stock_in_out_qty_matches_$i' value='$matches'> <input type="button" onclick="open_stock_in_out_window('${in_out}', $i);" value="?">|;
995 997

  
996 998
  $main::lxdebug->leave_sub();
997 999

  
......
1146 1148

  
1147 1149
  _stock_in_out_set_qty_display($stock_info);
1148 1150

  
1151
  my $do_qty       = AM->sum_with_unit($::form->parse_amount(\%::myconfig, $::form->{do_qty}), $::form->{do_unit});
1152
  my $transfer_qty = AM->sum_with_unit(map { $_->{qty}, $_->{unit} } @{ $stock_info });
1153

  
1149 1154
  $form->header();
1150
  print $form->parse_html_template('do/set_stock_in_out');
1155
  print $form->parse_html_template('do/set_stock_in_out', {
1156
    qty_matches => $do_qty == $transfer_qty,
1157
  });
1151 1158

  
1152 1159
  $main::lxdebug->leave_sub();
1153 1160
}
......
1241 1248
  } else {
1242 1249
    _stock_in_out_set_qty_display($stock_info);
1243 1250

  
1251
    my $do_qty       = AM->sum_with_unit($::form->parse_amount(\%::myconfig, $::form->{do_qty}), $::form->{do_unit});
1252
    my $transfer_qty = AM->sum_with_unit(map { $_->{qty}, $_->{unit} } @{ $stock_info });
1253

  
1244 1254
    $form->header();
1245
    print $form->parse_html_template('do/set_stock_in_out');
1255
    print $form->parse_html_template('do/set_stock_in_out', {
1256
      qty_matches => $do_qty == $transfer_qty,
1257
    });
1246 1258
  }
1247 1259

  
1248 1260
  $main::lxdebug->leave_sub();
locale/de/all
1878 1878
  'There are no items in stock.' => 'Dieser Artikel ist nicht eingelagert.',
1879 1879
  'There are no items on your TODO list at the moment.' => 'Ihre Aufgabenliste enth&auml;lt momentan keine Eintr&auml;ge.',
1880 1880
  'There are still entries in the database for which no unit has been assigned.' => 'Es gibt noch Eintr&auml;ge in der Datenbank, f&uuml;r die keine Einheit zugeordnet ist.',
1881
  'There are still transfers not matching the qty of the delivery order. Stock operations can not be changed later. Do you really want to proceed?' => 'Einige der Lagerbewegungen sind nicht vollständig und Lagerbewegungen können nachträglich nicht mehr verändert werden. Wollen Sie wirklich fortfahren?',
1881 1882
  'There are usually three ways to install Perl modules.' => 'Es gibt normalerweise drei Arten, ein Perlmodul zu installieren.',
1882 1883
  'There is at least one sales or purchase invoice for which Lx-Office recorded an inventory transaction with taxkeys even though no tax was recorded.' => 'Es gibt mindestens eine Einkaufs- oder Verkaufsrechnung, für die Lx-Office einen Steuerschlüssel ungleich 0 verzeichnet hat, obwohl für Warenbestandsbuchugen bei Rechnungen nie Steuern gebucht werden.',
1883 1884
  'There is at least one transaction for which the user has chosen a logically wrong taxkey.' => 'Es gibt mindestens eine Buchung, bei der ein logisch nicht passender Steuerschlüssel ausgewählt wurde.',
templates/webpages/do/form_footer.html
68 68
   [%- UNLESS delivered %]
69 69
   <input class="submit" type="submit" name="action_save" value="[% 'Save' | $T8 %]">
70 70
   [%- IF vc == 'customer' %]
71
   <input class="submit" type="submit" name="action_transfer_out" value="[% 'Transfer out' | $T8 %]">
71
   <input class="submit" type="submit" name="action_transfer_out" onclick="return check_transfer_qty()" value="[% 'Transfer out' | $T8 %]">
72 72
   [%- ELSE %]
73
   <input class="submit" type="submit" name="action_transfer_in" value="[% 'Transfer in' | $T8 %]">
73
   <input class="submit" type="submit" name="action_transfer_in"  onclick="return check_transfer_qty()" value="[% 'Transfer in' | $T8 %]">
74 74
   [%- END %]
75 75
   [%- END %]
76 76
   [%- IF id %]
......
96 96
  <input name="callback" type="hidden" value="[% HTML.escape(callback) %]">
97 97

  
98 98
 </form>
99

  
99
<script type='text/javascript'>
100
  function check_transfer_qty() {
101
    var all_match = true;
102
    var rowcount = $('input[name=rowcount]').val();
103
    for (var i = 1; i < rowcount; i++) {
104
      if ($('#stock_in_out_qty_matches_' + i).val() != 1) {
105
        all_match = false;
106
      }
107
    }
108

  
109
    if (all_match) {
110
      return true;
111
    } else {
112
      return confirm("[% 'There are still transfers not matching the qty of the delivery order. Stock operations can not be changed later. Do you really want to proceed?' | $T8 %]");
113
    }
114
  }
115
</script>
100 116
</body>
101 117
</html>
templates/webpages/do/set_stock_in_out.html
9 9
        var row = $('#row').attr('value');
10 10
        window.opener.document.getElementsByName("stock_" + $('#in_out').attr('value') + "_" + row)[0].value = $('#stock').attr('value');
11 11
        $(window.opener.document.getElementById("stock_in_out_qty_display_" + row)).html($('#qty_display').attr('value'));
12
        $(window.opener.document.getElementById("stock_in_out_qty_matches_" + row)).val([% qty_matches %]);
12 13

  
13 14
        window.close();
14 15
      }

Auch abrufbar als: Unified diff