Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision e9013716

Von Tamino Steinert vor mehr als 2 Jahren hinzugefügt

  • ID e9013716fffd65de9d3df3ae7608cbd6c5c99de8
  • Vorgänger 44212e4b
  • Nachfolger b2670cff

Workflow: sales_reclamation → credit_note

Unterschiede anzeigen:

SL/Controller/Reclamation.pm
70 70
                          workflow_save_and_sales_or_purchase_reclamation
71 71
                          save_and_order
72 72
                          save_and_delivery_order
73
                          save_and_credit_note
73 74
                       )]);
74 75

  
75 76
__PACKAGE__->run_before('get_unalterable_data',
......
79 80
                          workflow_save_and_sales_or_purchase_reclamation
80 81
                          save_and_order
81 82
                          save_and_delivery_order
83
                          save_and_credit_note
82 84
                        )]);
83 85

  
84 86
#
......
602 604
  );
603 605
}
604 606

  
607
# save the reclamation and redirect to the frontend subroutine for a new
608
# credit_note
609
sub action_save_and_credit_note {
610
  my ($self) = @_;
611

  
612
  # always save
613
  $self->save_with_render_error();
614

  
615
  if (!$self->reclamation->is_sales) {
616
    $self->js->flash('error', t8("Can't convert Purchase Reclamation to Credit Note"));
617
    return $self->js->render();
618
  }
619

  
620
  $self->save_and_redirect_to(
621
    controller => 'is.pl',
622
    action     => 'credit_note_from_reclamation',
623
    from_id    => $self->reclamation->id,
624
  );
625
}
626

  
605 627
# set form elements in respect to a changed customer or vendor
606 628
#
607 629
# This action is called on an change of the customer/vendor picker.
......
2233 2255
            $::instance_conf->get_reclamation_warn_no_reqdate,
2234 2256
          ],
2235 2257
        ],
2258
        action => [
2259
          t8('Save and Credit Note'),
2260
          call      => [
2261
            'kivi.Reclamation.save', 'save_and_credit_note',
2262
            $::instance_conf->get_reclamation_warn_duplicate_parts,
2263
            $::instance_conf->get_reclamation_warn_no_reqdate,
2264
          ],
2265
          only_if   => (any { $self->type eq $_ } (sales_reclamation_type())),
2266
        ],
2236 2267
      ], # end of combobox "Workflow"
2237 2268

  
2238 2269
      combobox => [

Auch abrufbar als: Unified diff