Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 80391646

Von Sven Schöling vor fast 3 Jahren hinzugefügt

  • ID 803916465d8a60d75ade24e06cffee6cc40c528c
  • Vorgänger c26b9ddd
  • Nachfolger d6cc1832

DeliveryOrder: remove periodic invoices support

Unterschiede anzeigen:

js/kivi.DeliveryOrder.js
598 598
    kivi.io.close_dialog();
599 599
  };
600 600

  
601
  ns.show_periodic_invoices_config_dialog = function() {
602
    if ($('#type').val() !== 'sales_order') return;
603

  
604
    kivi.popup_dialog({
605
      url:    'controller.pl?action=Order/show_periodic_invoices_config_dialog',
606
      data:   { type:              $('#type').val(),
607
                id:                $('#id').val(),
608
                config:            $('#order_periodic_invoices_config').val(),
609
                customer_id:       $('#order_customer_id').val(),
610
                transdate_as_date: $('#order_transdate_as_date').val(),
611
                language_id:       $('#language_id').val()
612
              },
613
      id:     'jq_periodic_invoices_config_dialog',
614
      load:   kivi.reinit_widgets,
615
      dialog: {
616
        title:  kivi.t8('Edit the configuration for periodic invoices'),
617
        width:  800,
618
        height: 650
619
      }
620
    });
621
    return true;
622
  };
623

  
624
  ns.close_periodic_invoices_config_dialog = function() {
625
    $('#jq_periodic_invoices_config_dialog').dialog('close');
626
  };
627

  
628
  ns.assign_periodic_invoices_config = function() {
629
    var data = $('[name="Form"]').serializeArray();
630
    data.push({ name: 'type',   value: $('#type').val() },
631
              { name: 'action', value: 'Order/assign_periodic_invoices_config' });
632
    $.post("controller.pl", data, kivi.eval_json_result);
633
  };
634

  
635
  ns.check_save_active_periodic_invoices = function() {
636
    var type = $('#type').val();
637
    if (type !== 'sales_order') return true;
638

  
639
    var active = false;
640
    $.ajax({
641
      url:      'controller.pl',
642
      data:     { action: 'Order/get_has_active_periodic_invoices',
643
                  type  : type,
644
                  id    : $('#id').val(),
645
                  config: $('#order_periodic_invoices_config').val(),
646
                },
647
      method:   "GET",
648
      async:    false,
649
      dataType: 'text',
650
      success:  function(val) {
651
        active = val;
652
      }
653
    });
654

  
655
    if (active == 1) {
656
      return confirm(kivi.t8('This sales order has an active configuration for periodic invoices. If you save then all subsequently created invoices will contain those changes as well, but not those that have already been created. Do you want to continue?'));
657
    }
658

  
659
    return true;
660
  };
661

  
662 601
  ns.show_vc_details_dialog = function() {
663 602
    if (!ns.check_cv()) return;
664 603
    var vc;

Auch abrufbar als: Unified diff