Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision fb5bcaea

Von Bernd Bleßmann vor mehr als 2 Jahren hinzugefügt

  • ID fb5bcaea13e9a689847f4f3ee4719f11888ec251
  • Vorgänger cc5d0de1
  • Nachfolger 54e099ac

WF Kunden-Angebot/-Auftrag -> Preisanfrage: Direktlieferung

Nachfrage, ob Lieferadresse als indiv. Lieferadresse in Einkaufsseite
übernommen werden soll.

Unterschiede anzeigen:

SL/Controller/Order.pm
857 857
  # check for direct delivery
858 858
  # copy shipto in custom shipto (custom shipto will be copied by new_from() in case)
859 859
  my $custom_shipto;
860
  if (   $::form->{type} eq sales_order_type() && $destination_type eq purchase_order_type()
860
  if (   $from_side eq 'sales' && $to_side eq 'purchase'
861 861
      && $::form->{use_shipto} && $self->order->shipto) {
862 862
    $custom_shipto = $self->order->shipto->clone('SL::DB::Order');
863 863
  }
......
878 878
    $item->{new_fake_id} = join('_', 'new', Time::HiRes::gettimeofday(), int rand 1000000000000);
879 879
  }
880 880

  
881
  if ($::form->{type} eq sales_order_type() && $destination_type eq purchase_order_type()) {
881
  if ($from_side eq 'sales' && $to_side eq 'purchase') {
882 882
    if ($::form->{use_shipto}) {
883 883
      $self->order->custom_shipto($custom_shipto) if $custom_shipto;
884 884
    } else {
......
2294 2294
        ],
2295 2295
        action => [
2296 2296
          t8('Save and RFQ'),
2297
          call     => [ 'kivi.submit_ajax_form', $self->url_for(action => "save_and_order_workflow", to_type => request_quotation_type()), '#order_form' ],
2297
          call     => [ 'kivi.Order.purchase_check_for_direct_delivery', { to_type => request_quotation_type() } ],
2298 2298
          only_if  => (any { $self->type eq $_ } (sales_order_type(), sales_quotation_type(), purchase_order_type())),
2299 2299
          disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef,
2300 2300
        ],
......
2307 2307
        ],
2308 2308
        action => [
2309 2309
          t8('Save and Purchase Order'),
2310
          call      => [ 'kivi.Order.purchase_order_check_for_direct_delivery', { to_type => purchase_order_type() } ],
2310
          call      => [ 'kivi.Order.purchase_check_for_direct_delivery', { to_type => purchase_order_type() } ],
2311 2311
          checks    => [ @req_trans_cost_art, @req_cusordnumber ],
2312 2312
          only_if   => (any { $self->type eq $_ } (sales_order_type(), request_quotation_type())),
2313 2313
          disabled  => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef,
js/kivi.Order.js
782 782
    kivi.SalesPurchase.edit_custom_shipto();
783 783
  };
784 784

  
785
  ns.purchase_order_check_for_direct_delivery = function(params) {
785
  ns.purchase_check_for_direct_delivery = function(params) {
786 786
    const to_type = params.to_type;
787 787

  
788
    if ($('#type').val() != 'sales_order') {
788
    if ($('#type').val() != 'sales_quotation' && $('#type').val() != 'sales_order') {
789 789
      kivi.submit_ajax_form("controller.pl", '#order_form', {action: 'Order/save_and_order_workflow', to_type: to_type});
790 790
      return;
791 791
    }

Auch abrufbar als: Unified diff