Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 1112515f

Von Werner Hahn vor 2 Tagen hinzugefügt

  • ID 1112515fa3c90232a738ee739765d4ae97258f7d
  • Vorgänger 61dd13f4
  • Nachfolger f44bc952

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
    ->html('#data-status-line', delivery_order_status_line($self->order))
289
    ->render
290
}
291

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

Auch abrufbar als: Unified diff