Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 99f8e356

Von Werner Hahn vor etwa 19 Stunden hinzugefügt

  • ID 99f8e3568925c8fe95b2b4b4add4a6e80fb9b477
  • Vorgänger 61dd13f4
  • Nachfolger f6dca01c

S:C:DeliveryOrder: Methode zum Schließen "Als geschlossen markieren"

behebt #702
behebt #694

Unterschiede anzeigen:

SL/Controller/DeliveryOrder.pm
271 271
  $self->action_save();
272 272
}
273 273

  
274
# close a already saved order (potentially already delivered)
275
sub action_close_order {
276
  my ($self) = @_;
277

  
278
  $self->order->update_attributes(
279
    closed => 1
280
  );
281

  
282
  $self->js
283
    ->flash("info", t8("The record has been closed."))
284
    ->run('kivi.ActionBar.setDisabled', '#save_action',
285
          t8('This record has already been closed.'))
286
    ->run('kivi.ActionBar.setDisabled', '#save_and_close',
287
          t8('This record has already been closed.'))
288
    ->run('kivi.ActionBar.setDisabled', '#close_order',
289
          t8('This record has already been closed.'))
290
    ->html('#data-status-line', delivery_order_status_line($self->order))
291
    ->render
292
}
293

  
274 294
# print the order
275 295
#
276 296
# This is called if "print" is pressed in the print dialog.
......
1946 1966
              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
1947 1967
              warn_on_reqdate    => $::instance_conf->get_order_warn_no_deliverydate,
1948 1968
            }],
1949
          disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.')
1969
          disabled => !$may_edit_create       ? t8('You do not have the permissions to access this function.')
1950 1970
                    : $self->order->delivered ? t8('This record has already been delivered.')
1951
                    :                        undef,
1971
                    : $self->order->closed    ? t8('This record has already been closed.')
1972
                    :                           undef,
1952 1973
        ],
1953 1974
        action => [
1954 1975
          t8('Save and Close'),
......
1961 1982
                { name => 'back_to_caller', value => 1 },
1962 1983
              ],
1963 1984
            }],
1964
          disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.')
1985
          disabled => !$may_edit_create       ? t8('You do not have the permissions to access this function.')
1965 1986
                    : $self->order->delivered ? t8('This record has already been delivered.')
1987
                    : $self->order->closed    ? t8('This record has already been closed.')
1988
                    :                           undef,
1989
        ],
1990
        action => [
1991
          t8('Mark as closed'),
1992
          id       => 'close_order',
1993
          call     => [ 'kivi.DeliveryOrder.close_order' ],
1994
          confirm  => t8('This will remove the delivery order from showing as open even if contents are not delivered. Proceed?'),
1995
          disabled => !$may_edit_create    ? t8('You do not have the permissions to access this function.')
1996
                    : !$self->order->id    ? t8('This object has not been saved yet.')
1997
                    : $self->order->closed ? t8('This record has already been closed.')
1966 1998
                    :                        undef,
1967 1999
        ],
1968 2000
        action => [

Auch abrufbar als: Unified diff