Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 6e8c0011

Von Bernd Bleßmann vor etwa 4 Jahren hinzugefügt

  • ID 6e8c0011e9724aa7e06cd04e62fb95dcc97cdf10
  • Vorgänger 89938f61
  • Nachfolger 4c058bb9

Auftrags-Controller: Wiedervorlage

Hier werden die vorhandenen Funktionenn und das Template verwendet, wobei
die Eingabemaske in einem eigenen Browser-Fenster gerendert wird.

Todo: Umstellung auf Dialog für alle Masken (evtl. ein eigener
FollowUp-Controller und Methoden dafür in SL::DB::FollowUp)

Refs #375 (redmine)

Unterschiede anzeigen:

SL/Controller/Order.pm
1815 1815
  $self->get_item_cvpartnumber($_) for @{$self->order->items_sorted};
1816 1816

  
1817 1817
  $::request->{layout}->use_javascript("${_}.js") for qw(kivi.SalesPurchase kivi.Order kivi.File ckeditor/ckeditor ckeditor/adapters/jquery
1818
                                                         edit_periodic_invoices_config calculate_qty kivi.Validator);
1818
                                                         edit_periodic_invoices_config calculate_qty kivi.Validator follow_up);
1819 1819
  $self->setup_edit_action_bar;
1820 1820
}
1821 1821

  
......
1907 1907
        disabled => !$self->order->id ? t8('This object has not been saved yet.') : undef,
1908 1908
        only_if  => $deletion_allowed,
1909 1909
      ],
1910

  
1911
      combobox => [
1912
        action => [
1913
          t8('more')
1914
        ],
1915
        action => [
1916
          t8('Follow-Up'),
1917
          call     => [ 'kivi.Order.follow_up_window' ],
1918
          disabled => !$self->order->id ? t8('This object has not been saved yet.') : undef,
1919
          only_if  => $::auth->assert('productivity'),
1920
        ],
1921
      ], # end of combobox "more"
1910 1922
    );
1911 1923
  }
1912 1924
}
js/kivi.Order.js
906 906
                                width:  500 }});
907 907
  };
908 908

  
909
  ns.follow_up_window = function() {
910
    var id   = $('#id').val();
911
    var type = $('#type').val();
912

  
913
    var number_info = '';
914
    if ($('#type').val() == 'sales_order' || $('#type').val() == 'purchase_order') {
915
      number_info = $('#order_ordnumber').val();
916
    } else if ($('#type').val() == 'sales_quotation' || $('#type').val() == 'request_quotation') {
917
      number_info = $('#order_quonumber').val();
918
    }
919

  
920
    var name_info = '';
921
    if ($('#type').val() == 'sales_order' || $('#type').val() == 'sales_quotation') {
922
      name_info = $('#order_customer_id_name').val();
923
    } else if ($('#type').val() == 'purchase_order' || $('#type').val() == 'request_quotation') {
924
      name_info = $('#order_vendor_id_name').val();
925
    }
926

  
927
    var info = '';
928
    if (number_info !== '') { info += ' (' + number_info + ')' }
929
    if (name_info   !== '') { info += ' (' + name_info + ')' }
930

  
931
    $('<input type="hidden" name="follow_up_rowcount">').appendTo('#order_form').val(1);
932
    $('<input type="hidden" name="follow_up_trans_id_1">').appendTo('#order_form').val(id);
933
    $('<input type="hidden" name="follow_up_trans_type_1">').appendTo('#order_form').val(type);
934
    $('<input type="hidden" name="follow_up_trans_info_1">').appendTo('#order_form').val(info);
935

  
936
    follow_up_window();
937
  };
938

  
909 939
});
910 940

  
911 941
$(function() {

Auch abrufbar als: Unified diff