Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 74c7135d

Von Moritz Bunkus vor mehr als 16 Jahren hinzugefügt

  • ID 74c7135dd76391b581476daffe240f2829493744
  • Vorgänger e73b17d6
  • Nachfolger 4a9b86a5

------------------------------------------------------------------------
r7132 | mbunkus | 2008-06-20 10:12:27 +0200 (Fri, 20 Jun 2008) | 1 line

Lieferscheine: Die Entscheidung, ob ein Lieferschein bearbeitet werden darf, wird vom Flag "delivered" abhängig gemacht, nicht von "closed".
------------------------------------------------------------------------

Unterschiede anzeigen:

bin/mozilla/do.pl
789 789

  
790 790
  $form->{saveasnew} = 1;
791 791
  $form->{closed}    = 0;
792
  $form->{delivered} = 0;
792 793
  map { delete $form->{$_} } qw(printed emailed queued);
793 794

  
794 795
  # Let Lx-Office assign a new order number if the user hasn't changed the
......
939 940
  $form->get_lists('warehouses' => { 'key'    => 'WAREHOUSES',
940 941
                                     'bins'   => 'BINS' });
941 942

  
942
  redo_stock_info('stock_info' => $stock_info, 'add_empty_row' => !$form->{closed});
943
  redo_stock_info('stock_info' => $stock_info, 'add_empty_row' => !$form->{delivered});
943 944

  
944 945
  get_basic_bin_wh_info($stock_info);
945 946

  
......
986 987

  
987 988
  my $stock_info = DO->unpack_stock_information('packed' => $form->{stock});
988 989

  
989
  if (!$form->{closed}) {
990
  if (!$form->{delivered}) {
990 991
    foreach my $row (@contents) {
991 992
      $row->{available_qty} = $form->format_amount_units('amount'      => $row->{qty} * 1,
992 993
                                                         'part_unit'   => $part_info->{unit},
......
1012 1013

  
1013 1014
  $form->header();
1014 1015
  print $form->parse_html_template('do/stock_out_form', { 'UNITS'      => $units_data,
1015
                                                          'WHCONTENTS' => $form->{closed} ? $stock_info : \@contents,
1016
                                                          'WHCONTENTS' => $form->{delivered} ? $stock_info : \@contents,
1016 1017
                                                          'PART_INFO'  => $part_info, });
1017 1018

  
1018 1019
  $lxdebug->leave_sub();
......
1056 1057
  $lxdebug->leave_sub();
1057 1058
}
1058 1059

  
1059
sub transfer_in_and_close {
1060
sub transfer_in {
1060 1061
  $lxdebug->enter_sub();
1061 1062

  
1062 1063
  my @part_ids = map { $form->{"id_${_}"} } grep { $form->{"id_${_}"} && $form->{"stock_in_${_}"} } (1 .. $form->{rowcount});
......
1093 1094
    }
1094 1095

  
1095 1096
    if (@{ $form->{ERRORS} }) {
1096
      push @{ $form->{ERRORS} }, $locale->text('The delivery order has not been closed. The warehouse contents have not changed.');
1097
      push @{ $form->{ERRORS} }, $locale->text('The delivery order has not been marked as delivered. The warehouse contents have not changed.');
1097 1098

  
1098 1099
      update();
1099 1100
      $lxdebug->leave_sub();
......
1105 1106
  DO->transfer_in_out('direction' => 'in',
1106 1107
                      'requests'  => \@all_requests);
1107 1108

  
1108
  $form->{closed}    = 1;
1109 1109
  $form->{delivered} = 1;
1110 1110

  
1111 1111
  save();
......
1113 1113
  $lxdebug->leave_sub();
1114 1114
}
1115 1115

  
1116
sub transfer_out_and_close {
1116
sub transfer_out {
1117 1117
  $lxdebug->enter_sub();
1118 1118

  
1119 1119
  my @part_ids = map { $form->{"id_${_}"} } grep { $form->{"id_${_}"} && $form->{"stock_out_${_}"} } (1 .. $form->{rowcount});
......
1186 1186
    }
1187 1187

  
1188 1188
    if (@{ $form->{ERRORS} }) {
1189
      push @{ $form->{ERRORS} }, $locale->text('The delivery order has not been closed. The warehouse contents have not changed.');
1189
      push @{ $form->{ERRORS} }, $locale->text('The delivery order has not been marked as delivered. The warehouse contents have not changed.');
1190 1190

  
1191 1191
      update();
1192 1192
      $lxdebug->leave_sub();
......
1198 1198
  DO->transfer_in_out('direction' => 'out',
1199 1199
                      'requests'  => \@all_requests);
1200 1200

  
1201
  $form->{closed}    = 1;
1202 1201
  $form->{delivered} = 1;
1203 1202

  
1204 1203
  save();

Auch abrufbar als: Unified diff