Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 47b2bb2b

Von Bernd Bleßmann vor mehr als 1 Jahr hinzugefügt

  • ID 47b2bb2b25f10ba97bb24ab3aba6e18e3e58c0a3
  • Vorgänger eaf9e172
  • Nachfolger 1ced201d

Auftrags-Eingang: Controller

Unterschiede anzeigen:

SL/Controller/Order.pm
77 77
  my ($self) = @_;
78 78

  
79 79
  $self->order->transdate(DateTime->now_local());
80
  my $extra_days = $self->type eq sales_quotation_type() ? $::instance_conf->get_reqdate_interval       :
81
                   $self->type eq sales_order_type()     ? $::instance_conf->get_delivery_date_interval : 1;
80
  my $extra_days = $self->type eq sales_quotation_type()    ? $::instance_conf->get_reqdate_interval       :
81
                   $self->type eq sales_order_type()        ? $::instance_conf->get_delivery_date_interval :
82
                   $self->type eq sales_order_intake_type() ? $::instance_conf->get_delivery_date_interval : 1;
82 83

  
83
  if (   ($self->type eq sales_order_type()     &&  $::instance_conf->get_deliverydate_on)
84
  if (($self->type eq sales_order_intake_type() &&  $::instance_conf->get_deliverydate_on)
85
      || ($self->type eq sales_order_type()     &&  $::instance_conf->get_deliverydate_on)
84 86
      || ($self->type eq sales_quotation_type() &&  $::instance_conf->get_reqdate_on)
85 87
      && (!$self->order->reqdate)) {
86 88
    $self->order->reqdate(DateTime->today_local->next_workday(extra_days => $extra_days));
......
207 209
    return $self->js->render();
208 210
  }
209 211

  
210
  my $text = $self->type eq sales_order_type()       ? $::locale->text('The order has been deleted')
211
           : $self->type eq purchase_order_type()    ? $::locale->text('The order has been deleted')
212
           : $self->type eq sales_quotation_type()   ? $::locale->text('The quotation has been deleted')
213
           : $self->type eq request_quotation_type() ? $::locale->text('The rfq has been deleted')
212
  my $text = $self->type eq sales_order_intake_type() ? $::locale->text('The order intake has been deleted')
213
           : $self->type eq sales_order_type()        ? $::locale->text('The order confirmation has been deleted')
214
           : $self->type eq purchase_order_type()     ? $::locale->text('The order has been deleted')
215
           : $self->type eq sales_quotation_type()    ? $::locale->text('The quotation has been deleted')
216
           : $self->type eq request_quotation_type()  ? $::locale->text('The rfq has been deleted')
214 217
           : '';
215 218
  flash_later('info', $text);
216 219

  
......
233 236
    return $self->js->render();
234 237
  }
235 238

  
236
  my $text = $self->type eq sales_order_type()       ? $::locale->text('The order has been saved')
237
           : $self->type eq purchase_order_type()    ? $::locale->text('The order has been saved')
238
           : $self->type eq sales_quotation_type()   ? $::locale->text('The quotation has been saved')
239
           : $self->type eq request_quotation_type() ? $::locale->text('The rfq has been saved')
239
  my $text = $self->type eq sales_order_intake_type() ? $::locale->text('The order intake has been saved')
240
           : $self->type eq sales_order_type()        ? $::locale->text('The order confirmation has been saved')
241
           : $self->type eq purchase_order_type()     ? $::locale->text('The order has been saved')
242
           : $self->type eq sales_quotation_type()    ? $::locale->text('The quotation has been saved')
243
           : $self->type eq request_quotation_type()  ? $::locale->text('The rfq has been saved')
240 244
           : '';
241 245
  flash_later('info', $text);
242 246

  
......
303 307

  
304 308
  # Set new reqdate unless changed if it is enabled in client config
305 309
  if ($order->reqdate == $saved_order->reqdate) {
306
    my $extra_days = $self->type eq sales_quotation_type() ? $::instance_conf->get_reqdate_interval       :
307
                     $self->type eq sales_order_type()     ? $::instance_conf->get_delivery_date_interval : 1;
310
    my $extra_days = $self->type eq sales_quotation_type()    ? $::instance_conf->get_reqdate_interval       :
311
                     $self->type eq sales_order_type()        ? $::instance_conf->get_delivery_date_interval :
312
                     $self->type eq sales_order_intake_type() ? $::instance_conf->get_delivery_date_interval : 1;
308 313

  
309
    if (   ($self->type eq sales_order_type()     &&  !$::instance_conf->get_deliverydate_on)
310
        || ($self->type eq sales_quotation_type() &&  !$::instance_conf->get_reqdate_on)) {
314
    if (   ($self->type eq sales_order_intake_type() &&  !$::instance_conf->get_deliverydate_on)
315
        || ($self->type eq sales_order_type()        &&  !$::instance_conf->get_deliverydate_on)
316
        || ($self->type eq sales_quotation_type()    &&  !$::instance_conf->get_reqdate_on)) {
311 317
      $new_attrs{reqdate} = '';
312 318
    } else {
313 319
      $new_attrs{reqdate} = DateTime->today_local->next_workday(extra_days => $extra_days);
......
927 933
  my $destination_type = $::form->{to_type} ? $::form->{to_type} : '';
928 934

  
929 935
  my $from_side        = $self->order->is_sales ? 'sales' : 'purchase';
930
  my $to_side          = (any { $destination_type eq $_ } (sales_order_type(), sales_quotation_type())) ? 'sales' : 'purchase';
936
  my $to_side          = (any { $destination_type eq $_ } (sales_order_intake_type(), sales_order_type(), sales_quotation_type())) ? 'sales' : 'purchase';
931 937

  
932 938
  # check for direct delivery
933 939
  # copy shipto in custom shipto (custom shipto will be copied by new_from() in case)
......
1707 1713
#
1708 1714

  
1709 1715
sub init_valid_types {
1710
  [ sales_order_type(), purchase_order_type(), sales_quotation_type(), request_quotation_type() ];
1716
  [ sales_order_intake_type(), sales_order_type(), purchase_order_type(), sales_quotation_type(), request_quotation_type() ];
1711 1717
}
1712 1718

  
1713 1719
sub init_type {
......
1723 1729
sub init_cv {
1724 1730
  my ($self) = @_;
1725 1731

  
1726
  my $cv = (any { $self->type eq $_ } (sales_order_type(),    sales_quotation_type()))   ? 'customer'
1727
         : (any { $self->type eq $_ } (purchase_order_type(), request_quotation_type())) ? 'vendor'
1732
  my $cv = (any { $self->type eq $_ } (sales_order_intake_type(), sales_order_type(),    sales_quotation_type())) ? 'customer'
1733
         : (any { $self->type eq $_ } (purchase_order_type(), request_quotation_type()))                          ? 'vendor'
1728 1734
         : die "Not a valid type for order";
1729 1735

  
1730 1736
  return $cv;
......
1784 1790
  my ($self) = @_;
1785 1791

  
1786 1792
  my $right_for = { map { $_ => $_.'_edit' . ' | ' . $_.'_view' } @{$self->valid_types} };
1793
  $right_for->{ sales_order_intake_type() } = 'sales_order_edit | sales_order_view';
1787 1794

  
1788 1795
  my $right   = $right_for->{ $self->type };
1789 1796
  $right    ||= 'DOES_NOT_EXIST';
......
1795 1802
  my ($self) = @_;
1796 1803

  
1797 1804
  my $right_for = { map { $_ => $_.'_edit' } @{$self->valid_types} };
1805
  $right_for->{ sales_order_intake_type() } = 'sales_order_edit';
1798 1806

  
1799 1807
  my $right   = $right_for->{ $self->type };
1800 1808
  $right    ||= 'DOES_NOT_EXIST';
......
1945 1953
  $order   = SL::DB::Order->new(id => $::form->{id})->load(with => [ 'orderitems', 'orderitems.part' ]) if $::form->{id};
1946 1954
  $order ||= SL::DB::Order->new(orderitems  => [],
1947 1955
                                quotation   => (any { $self->type eq $_ } (sales_quotation_type(), request_quotation_type())),
1956
                                intake      => (any { $self->type eq $_ } (sales_order_intake_type())),
1948 1957
                                currency_id => $::instance_conf->get_currency_id(),);
1949 1958

  
1950 1959
  my $cv_id_method = $self->cv . '_id';
......
2331 2340
    $item->active_discount_source($price_source->discount_from_source($item->active_discount_source));
2332 2341
  }
2333 2342

  
2334
  if (any { $self->type eq $_ } (sales_order_type(), purchase_order_type())) {
2343
  if (any { $self->type eq $_ } (sales_order_intake_type(), sales_order_type(), purchase_order_type())) {
2335 2344
    # Calculate shipped qtys here to prevent calling calculate for every item via the items method.
2336 2345
    # Do not use write_to_objects to prevent order->delivered to be set, because this should be
2337 2346
    # the value from db, which can be set manually or is set when linked delivery orders are saved.
......
2350 2359
                                                } } @all_objects;
2351 2360
  }
2352 2361

  
2353
  if (   (any { $self->type eq $_ } (sales_quotation_type(), sales_order_type()))
2362
  if (   (any { $self->type eq $_ } (sales_quotation_type(), sales_order_intake_type(), sales_order_type()))
2354 2363
      && $::instance_conf->get_transport_cost_reminder_article_number_id ) {
2355 2364
    $self->{template_args}->{transport_cost_reminder_article} = SL::DB::Part->new(id => $::instance_conf->get_transport_cost_reminder_article_number_id)->load;
2356 2365
  }
......
2369 2378
  my ($self, %params) = @_;
2370 2379

  
2371 2380
  my $deletion_allowed = (any { $self->type eq $_ } (sales_quotation_type(), request_quotation_type()))
2372
                      || (($self->type eq sales_order_type())    && $::instance_conf->get_sales_order_show_delete)
2373
                      || (($self->type eq purchase_order_type()) && $::instance_conf->get_purchase_order_show_delete);
2381
                      || (($self->type eq sales_order_type())        && $::instance_conf->get_sales_order_show_delete)
2382
                      || (($self->type eq sales_order_intake_type()) && $::instance_conf->get_sales_order_show_delete)
2383
                      || (($self->type eq purchase_order_type())     && $::instance_conf->get_purchase_order_show_delete);
2374 2384

  
2375 2385
  my @req_trans_cost_art = qw(kivi.Order.check_transport_cost_article_presence) x!!$::instance_conf->get_transport_cost_reminder_article_number_id;
2376
  my @req_cusordnumber   = qw(kivi.Order.check_cusordnumber_presence)           x($self->type eq sales_order_type() && $::instance_conf->get_order_warn_no_cusordnumber);
2386
  my @req_cusordnumber   = qw(kivi.Order.check_cusordnumber_presence)           x(( any {$self->type eq $_} (sales_order_intake_type(), sales_order_type()) ) && $::instance_conf->get_order_warn_no_cusordnumber);
2377 2387

  
2378 2388
  my $has_invoice_for_advance_payment;
2379 2389
  if ($self->order->id && $self->type eq sales_order_type()) {
......
2388 2398
  }
2389 2399

  
2390 2400
  my $right_for         = { map { $_ => $_.'_edit' } @{$self->valid_types} };
2401
  $right_for->{ sales_order_intake_type() } = 'sales_order_edit';
2391 2402
  my $right             = $right_for->{ $self->type };
2392 2403
  $right              ||= 'DOES_NOT_EXIST';
2393 2404
  my $may_edit_create   = $::auth->assert($right, 'may fail');
......
2452 2463
          t8('Save and Quotation'),
2453 2464
          call     => [ 'kivi.submit_ajax_form', $self->url_for(action => "save_and_order_workflow", to_type => sales_quotation_type()), '#order_form' ],
2454 2465
          checks   => [ @req_trans_cost_art, @req_cusordnumber ],
2455
          only_if  => (any { $self->type eq $_ } (sales_order_type(), request_quotation_type())),
2466
          only_if  => (any { $self->type eq $_ } (sales_order_intake_type(), sales_order_type(), request_quotation_type())),
2456 2467
          disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef,
2457 2468
        ],
2458 2469
        action => [
2459 2470
          t8('Save and RFQ'),
2460 2471
          call     => [ 'kivi.Order.purchase_check_for_direct_delivery', { to_type => request_quotation_type() } ],
2461
          only_if  => (any { $self->type eq $_ } (sales_order_type(), sales_quotation_type(), purchase_order_type())),
2472
          only_if  => (any { $self->type eq $_ } (sales_order_intake_type(), sales_order_type(), sales_quotation_type(), purchase_order_type())),
2462 2473
          disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef,
2463 2474
        ],
2464 2475
        action => [
2465
          t8('Save and Sales Order'),
2476
          t8('Save and Sales Order Intake'),
2477
          call     => [ 'kivi.submit_ajax_form', $self->url_for(action => "save_and_order_workflow", to_type => sales_order_intake_type()), '#order_form' ],
2478
          only_if  => (any { $self->type eq $_ } (sales_quotation_type())),
2479
          disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef,
2480
        ],
2481
        action => [
2482
          t8('Save and Sales Order Confirmation'),
2466 2483
          call     => [ 'kivi.submit_ajax_form', $self->url_for(action => "save_and_order_workflow", to_type => sales_order_type()), '#order_form' ],
2467 2484
          checks   => [ @req_trans_cost_art ],
2468
          only_if  => (any { $self->type eq $_ } (sales_quotation_type(), request_quotation_type(), purchase_order_type())),
2485
          only_if  => (any { $self->type eq $_ } (sales_quotation_type(), sales_order_intake_type(), request_quotation_type(), purchase_order_type())),
2469 2486
          disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef,
2470 2487
        ],
2471 2488
        action => [
2472 2489
          t8('Save and Purchase Order'),
2473 2490
          call      => [ 'kivi.Order.purchase_check_for_direct_delivery', { to_type => purchase_order_type() } ],
2474 2491
          checks    => [ @req_trans_cost_art, @req_cusordnumber ],
2475
          only_if   => (any { $self->type eq $_ } (sales_order_type(), request_quotation_type())),
2492
          only_if   => (any { $self->type eq $_ } (sales_order_intake_type(), sales_order_type(), request_quotation_type())),
2476 2493
          disabled  => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef,
2477 2494
        ],
2478 2495
        action => [
......
2526 2543
                         @req_trans_cost_art, @req_cusordnumber,
2527 2544
          ],
2528 2545
          disabled  => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef,
2546
          not_if    => (any { $self->type eq $_ } (sales_order_intake_type())),
2529 2547
        ],
2530 2548
        action => [
2531 2549
          ($has_invoice_for_advance_payment ? t8('Save and Further Invoice for Advance Payment') : t8('Save and Invoice for Advance Payment')),
......
2764 2782
  return '' if none { lc($action)} qw(add edit);
2765 2783

  
2766 2784
  # for locales:
2785
  # $::locale->text("Add Sales Order Intake");
2767 2786
  # $::locale->text("Add Sales Order");
2768 2787
  # $::locale->text("Add Purchase Order");
2769 2788
  # $::locale->text("Add Quotation");
2770 2789
  # $::locale->text("Add Request for Quotation");
2790
  # $::locale->text("Edit Sales Order Intake");
2771 2791
  # $::locale->text("Edit Sales Order");
2772 2792
  # $::locale->text("Edit Purchase Order");
2773 2793
  # $::locale->text("Edit Quotation");
2774 2794
  # $::locale->text("Edit Request for Quotation");
2775 2795

  
2776 2796
  $action = ucfirst(lc($action));
2777
  return $self->type eq sales_order_type()       ? $::locale->text("$action Sales Order")
2778
       : $self->type eq purchase_order_type()    ? $::locale->text("$action Purchase Order")
2779
       : $self->type eq sales_quotation_type()   ? $::locale->text("$action Quotation")
2780
       : $self->type eq request_quotation_type() ? $::locale->text("$action Request for Quotation")
2797
  return $self->type eq sales_order_intake_type() ? $::locale->text("$action Sales Order Intake")
2798
       : $self->type eq sales_order_type()        ? $::locale->text("$action Sales Order")
2799
       : $self->type eq purchase_order_type()     ? $::locale->text("$action Purchase Order")
2800
       : $self->type eq sales_quotation_type()    ? $::locale->text("$action Quotation")
2801
       : $self->type eq request_quotation_type()  ? $::locale->text("$action Request for Quotation")
2781 2802
       : '';
2782 2803
}
2783 2804

  
......
2855 2876
  return ($price_src, $discount_src);
2856 2877
}
2857 2878

  
2879
sub sales_order_intake_type {
2880
  'sales_order_intake';
2881
}
2882

  
2858 2883
sub sales_order_type {
2859 2884
  'sales_order';
2860 2885
}
......
2872 2897
}
2873 2898

  
2874 2899
sub nr_key {
2875
  return $_[0]->type eq sales_order_type()       ? 'ordnumber'
2876
       : $_[0]->type eq purchase_order_type()    ? 'ordnumber'
2877
       : $_[0]->type eq sales_quotation_type()   ? 'quonumber'
2878
       : $_[0]->type eq request_quotation_type() ? 'quonumber'
2900
  return $_[0]->type eq sales_order_intake_type() ? 'ordnumber'
2901
       : $_[0]->type eq sales_order_type()        ? 'ordnumber'
2902
       : $_[0]->type eq purchase_order_type()     ? 'ordnumber'
2903
       : $_[0]->type eq sales_quotation_type()    ? 'quonumber'
2904
       : $_[0]->type eq request_quotation_type()  ? 'quonumber'
2879 2905
       : '';
2880 2906
}
2881 2907

  
......
2889 2915
    return $self->js->render();
2890 2916
  }
2891 2917

  
2892
  my $text = $self->type eq sales_order_type()       ? $::locale->text('The order has been saved')
2893
           : $self->type eq purchase_order_type()    ? $::locale->text('The order has been saved')
2894
           : $self->type eq sales_quotation_type()   ? $::locale->text('The quotation has been saved')
2895
           : $self->type eq request_quotation_type() ? $::locale->text('The rfq has been saved')
2918
  my $text = $self->type eq sales_order_intake_type() ? $::locale->text('The order intake has been saved')
2919
           : $self->type eq sales_order_type()        ? $::locale->text('The order confirmation has been saved')
2920
           : $self->type eq purchase_order_type()     ? $::locale->text('The order has been saved')
2921
           : $self->type eq sales_quotation_type()    ? $::locale->text('The quotation has been saved')
2922
           : $self->type eq request_quotation_type()  ? $::locale->text('The rfq has been saved')
2896 2923
           : '';
2897 2924
  flash_later('info', $text);
2898 2925

  
SL/DB/Order.pm
143 143
sub type {
144 144
  my $self = shift;
145 145

  
146
  return 'sales_order'       if $self->customer_id && ! $self->quotation;
147
  return 'purchase_order'    if $self->vendor_id   && ! $self->quotation;
148
  return 'sales_quotation'   if $self->customer_id &&   $self->quotation;
149
  return 'request_quotation' if $self->vendor_id   &&   $self->quotation;
146
  return 'sales_order_intake' if $self->customer_id &&   $self->intake;
147
  return 'sales_order'        if $self->customer_id && ! $self->quotation;
148
  return 'purchase_order'     if $self->vendor_id   && ! $self->quotation;
149
  return 'sales_quotation'    if $self->customer_id &&   $self->quotation;
150
  return 'request_quotation'  if $self->vendor_id   &&   $self->quotation;
150 151

  
151 152
  return;
152 153
}
js/kivi.Order.js
1 1
namespace('kivi.Order', function(ns) {
2 2
  ns.check_cv = function() {
3
    if ($('#type').val() == 'sales_order' || $('#type').val() == 'sales_quotation') {
3
    if ($('#type').val() == 'sales_order_intake' || $('#type').val() == 'sales_order' || $('#type').val() == 'sales_quotation') {
4 4
      if ($('#order_customer_id').val() === '') {
5 5
        alert(kivi.t8('Please select a customer.'));
6 6
        return false;
......
716 716
    var vc;
717 717
    var vc_id;
718 718
    var title;
719
    if ($('#type').val() == 'sales_order' || $('#type').val() == 'sales_quotation' ) {
719
    if ($('#type').val() == 'sales_order_intake' || $('#type').val() == 'sales_order' || $('#type').val() == 'sales_quotation' ) {
720 720
      vc    = 'customer';
721 721
      vc_id = $('#order_customer_id').val();
722 722
      title = kivi.t8('Customer details');
......
789 789
  ns.purchase_check_for_direct_delivery = function(params) {
790 790
    const to_type = params.to_type;
791 791

  
792
    if ($('#type').val() != 'sales_quotation' && $('#type').val() != 'sales_order') {
792
    if ($('#type').val() != 'sales_quotation' && $('#type').val() != 'sales_order_intake' && $('#type').val() != 'sales_order') {
793 793
      kivi.submit_ajax_form("controller.pl", '#order_form', {action: 'Order/save_and_order_workflow', to_type: to_type});
794 794
      return;
795 795
    }
......
858 858
    var type = $('#type').val();
859 859

  
860 860
    var number_info = '';
861
    if ($('#type').val() == 'sales_order' || $('#type').val() == 'purchase_order') {
861
    if ($('#type').val() == 'sales_order_intake' || $('#type').val() == 'sales_order' || $('#type').val() == 'purchase_order') {
862 862
      number_info = $('#order_ordnumber').val();
863 863
    } else if ($('#type').val() == 'sales_quotation' || $('#type').val() == 'request_quotation') {
864 864
      number_info = $('#order_quonumber').val();
865 865
    }
866 866

  
867 867
    var name_info = '';
868
    if ($('#type').val() == 'sales_order' || $('#type').val() == 'sales_quotation') {
868
    if ($('#type').val() == 'sales_order_intake' || $('#type').val() == 'sales_order' || $('#type').val() == 'sales_quotation') {
869 869
      name_info = $('#order_customer_id_name').val();
870 870
    } else if ($('#type').val() == 'purchase_order' || $('#type').val() == 'request_quotation') {
871 871
      name_info = $('#order_vendor_id_name').val();
......
989 989
});
990 990

  
991 991
$(function() {
992
  if ($('#type').val() == 'sales_order' || $('#type').val() == 'sales_quotation' ) {
992
  if ($('#type').val() == 'sales_order_intake' || $('#type').val() == 'sales_order' || $('#type').val() == 'sales_quotation' ) {
993 993
    $('#order_customer_id').change(kivi.Order.reload_cv_dependent_selections);
994 994
  } else {
995 995
    $('#order_vendor_id').change(kivi.Order.reload_cv_dependent_selections);
menus/user/90-sales-order-intake.yaml
1
- parent: ar
2
  id: ar_add_sales_order_intake_experimental
3
  name: Add Sales Order Intake
4
  icon: sales_order_add
5
  order: 290
6
  access: sales_order_edit & client/feature_experimental_order
7
  params:
8
    action: Order/add
9
    type: sales_order_intake
10
- parent: ar
11
  id: ar_add_sales_order_experimental
12
  name: Add Sales Order Confirmation
templates/webpages/order/tabs/_item_input.html
40 40
        </td>
41 41
        [%- SET price = '' %]
42 42
        [%- IF SELF.created_part %]
43
          [%- SET price = LxERP.format_amount(((SELF.type == 'sales_quotation' || SELF.type == 'sales_order') ? SELF.created_part.sellprice : SELF.created_part.lastcost), -2) -%]
43
          [%- SET price = LxERP.format_amount(((SELF.type == 'sales_quotation' || SELF.type == 'sales_order_intake' || SELF.type == 'sales_order') ? SELF.created_part.sellprice : SELF.created_part.lastcost), -2) -%]
44 44
        [%- END %]
45 45
        <td>[% L.input_tag('add_item.sellprice_as_number', price, size = 10, class="add_item_input numeric tooltipster-html") %]</td>
46 46
        <td>[% L.input_tag('add_item.discount_as_percent', '', size = 5, class="add_item_input numeric tooltipster-html") %]</td>
templates/webpages/order/tabs/_price_sources_dialog.html
5 5
[% SET best_price = price_source.best_price %]
6 6
[% SET best_discount = price_source.best_discount %]
7 7
[% SET price_editable = 0 %]
8
[% IF (FORM.type == "sales_order" || FORM.type == "sales_quotation") %]
8
[% IF (FORM.type == "sales_order" || FORM.type == "sales_order_intake" || FORM.type == "sales_quotation") %]
9 9
  [% SET price_editable = AUTH.assert('sales_edit_prices', 1) %]
10 10
[% END %]
11 11
[% IF (FORM.type == "purchase_order" || FORM.type == "request_quotation") %]
templates/webpages/order/tabs/_row.html
63 63
      [%- L.hidden_tag("order.orderitems[].longdescription", ITEM.longdescription) %]
64 64
      [%- L.button_tag("kivi.Order.show_longdescription_dialog(this)", LxERP.t8("L")) %]
65 65
    </td>
66
    [%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
66
    [%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
67 67
    <td nowrap>
68 68
      [%- L.div_tag(LxERP.format_amount(ITEM.shipped_qty, 2, 0) _ ' ' _ ITEM.unit, name="shipped_qty", class="numeric") %]
69 69
    </td>
......
100 100
                       name = "price_chooser_button") %]
101 101
    </td>
102 102
    [% SET RIGHT_TO_EDIT_PRICES = 0 %]
103
    [% IF (SELF.type == "sales_order" || SELF.type == "sales_quotation") %]
103
    [% IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "sales_quotation") %]
104 104
      [% SET RIGHT_TO_EDIT_PRICES = AUTH.assert('sales_edit_prices', 1) %]
105 105
    [% END %]
106 106
    [% IF (SELF.type == "purchase_order" || SELF.type == "request_quotation") %]
templates/webpages/order/tabs/_second_row.html
6 6

  
7 7
<table>
8 8
  <tr><td colspan="100%">
9
    [%- IF (TYPE == "sales_order" || TYPE == "purchase_order") %]
9
    [%- IF (TYPE == "sales_order_intake" || TYPE == "sales_order" || TYPE == "purchase_order") %]
10 10
      <b>[%- 'Serial No.' | $T8 %]</b>&nbsp;
11 11
      [%- L.input_tag("order.orderitems[].serialnumber", ITEM.serialnumber, size = 15 "data-validate"="trimmed_whitespaces") %]&nbsp;
12 12
    [%- END %]
13 13
    <b>[%- 'Project' | $T8 %]</b>&nbsp;
14 14
    [% P.project.picker("order.orderitems[].project_id", ITEM.project_id, size = 15) %]&nbsp;
15
    [%- IF (TYPE == "sales_order" || TYPE == "purchase_order") %]
15
    [%- IF (TYPE == "sales_order_intake" || TYPE == "sales_order" || TYPE == "purchase_order") %]
16 16
      <b>[%- 'Reqdate' | $T8 %]</b>&nbsp;
17 17
      [% L.date_tag("order.orderitems[].reqdate_as_date", ITEM.reqdate_as_date) %]&nbsp;
18 18
    [%- END %]
......
22 22
      <b>[%- 'Recurring billing' | $T8 %]</b>&nbsp;
23 23
      [% L.select_tag("order.orderitems[].recurring_billing_mode", [[ 'always', LxERP.t8('always') ], [ 'once',   LxERP.t8('once')   ], [ 'never',  LxERP.t8('never')  ]], default=ITEM.recurring_billing_mode) %]&nbsp;
24 24
    [%- END %]
25
    [%- IF (TYPE == "sales_order" || TYPE == "sales_quotation") %]
25
    [%- IF (TYPE == "sales_order_intake" || TYPE == "sales_order" || TYPE == "sales_quotation") %]
26 26
      <b>[%- 'Ertrag' | $T8 %]</b>&nbsp;
27 27
        <span name="linemargin">
28 28
          <span[%- IF ITEM.marge_total < 0 -%] class="plus0"[%- END -%]>
templates/webpages/order/tabs/basic_data.html
176 176
          </tr>
177 177
          [% END %]
178 178

  
179
          [%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
179
          [%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
180 180
          <tr>
181 181
            <th width="70%" align="right" nowrap>[% 'Order Number' | $T8 %]</th>
182 182
            <td>
......
192 192
          </tr>
193 193
          [%- END -%]
194 194

  
195
          [%- IF (SELF.type == "sales_order" || SELF.type == "sales_quotation") -%]
195
          [%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "sales_quotation") -%]
196 196
            [%- SET quo_nr_txt = 'Quotation Number' -%]
197 197
          [%- ELSE -%]
198 198
            [%- SET quo_nr_txt = 'RFQ Number' -%]
......
200 200
          <tr>
201 201
            <th width="70%" align="right" nowrap>[% quo_nr_txt | $T8 %]</th>
202 202
            <td>
203
              [%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
203
              [%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
204 204
                [% L.input_tag('order.quonumber', SELF.order.quonumber, size = 11) %]
205 205
              [%- ELSIF INSTANCE_CONF.get_sales_purchase_record_numbers_changeable %]
206 206
                [% L.input_tag('order.quonumber', SELF.order.quonumber, size = 11, onchange='kivi.Order.set_number_in_title(this)') %]
......
213 213
            </td>
214 214
          </tr>
215 215

  
216
          [%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
216
          [%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
217 217
          <tr>
218 218
            <th width="70%" align="right" nowrap>[% 'Customer Order Number' | $T8 %]</th>
219 219
            <td>[% L.input_tag('order.cusordnumber', SELF.order.cusordnumber, size = 11) %]</td>
220 220
          </tr>
221 221
          [%- END -%]
222 222

  
223
          [%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
223
          [%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
224 224
            [%- SET transdate_txt = 'Order Date' -%]
225 225
          [%- ELSIF SELF.type == "sales_quotation" -%]
226 226
            [%- SET transdate_txt = 'Quotation Date' -%]
......
237 237
            <td>[% L.date_tag('order.tax_point_as_date', SELF.order.tax_point_as_date, class="recalc") %]</td>
238 238
          </tr>
239 239

  
240
          [%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
240
          [%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
241 241
            [%- SET reqdate_txt = 'Reqdate'; SET reqdate_class = 'recalc' -%]
242 242
          [%- ELSIF SELF.type == "sales_quotation" -%]
243 243
            [%- SET reqdate_txt = 'Valid until'; SET reqdate_class = '' -%]
......
312 312
                [%- END -%]
313 313
                <th id="partclass_header_id"    class="listheading" nowrap width="2">[%- 'Type'  | $T8 %]</th>
314 314
                <th id="description_header_id"  class="listheading" nowrap           ><a href='#' onClick='javascript:kivi.Order.reorder_items("description")'>[%- 'Description' | $T8 %]</a></th>
315
                [%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
315
                [%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
316 316
                <th id="shipped_qty_header_id"  class="listheading" nowrap width="5" ><a href='#' onClick='javascript:kivi.Order.reorder_items("shipped_qty")'>[%- 'Delivered'   | $T8 %]</a></th>
317 317
                [%- END -%]
318 318
                <th id="qty_header_id"          class="listheading" nowrap width="5" ><a href='#' onClick='javascript:kivi.Order.reorder_items("qty")'>        [%- 'Qty'         | $T8 %]</a></th>
......
391 391
              </table>
392 392
            </td>
393 393

  
394
            [%- IF (SELF.type == "sales_order" || SELF.type == "sales_quotation") -%]
394
            [%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "sales_quotation") -%]
395 395
            [%- SET marge_class = (SELF.order.marge_total < 0) ? 'plus0' : '' -%]
396 396
            <td>
397 397
              <table>

Auch abrufbar als: Unified diff