Revision 40b2e1e7
Von Thomas Heck vor mehr als 11 Jahren hinzugefügt
SL/Controller/CustomerVendor.pm | ||
---|---|---|
93 | 93 |
if ( $self->{cv}->vendornumber ) { |
94 | 94 |
$cvs_by_nr = SL::DB::Manager::Vendor->get_all(query => [vendornumber => $self->{cv}->vendornumber]); |
95 | 95 |
} |
96 |
} |
|
97 |
else { |
|
96 |
} else { |
|
98 | 97 |
if ( $self->{cv}->customernumber ) { |
99 | 98 |
$cvs_by_nr = SL::DB::Manager::Customer->get_all(query => [customernumber => $self->{cv}->customernumber]); |
100 | 99 |
} |
... | ... | |
249 | 248 |
|
250 | 249 |
if( !$self->is_orphaned() ) { |
251 | 250 |
$self->action_edit(); |
252 |
} |
|
253 |
else { |
|
251 |
} else { |
|
254 | 252 |
|
255 | 253 |
$db->do_transaction(sub { |
256 | 254 |
$self->{cv}->delete(cascade => 1); |
... | ... | |
360 | 358 |
$arap = 'ap'; |
361 | 359 |
$db = 'vendor'; |
362 | 360 |
$qty_sign = ' * -1 AS qty'; |
363 |
} |
|
364 |
else { |
|
361 |
} else { |
|
365 | 362 |
$arap = 'ar'; |
366 | 363 |
$db = 'customer'; |
367 | 364 |
$qty_sign = ''; |
... | ... | |
448 | 445 |
|
449 | 446 |
if ( $_ eq 'birthday' && $self->{contact}->$name ) { |
450 | 447 |
$name => $self->{contact}->$name->to_lxoffice; |
451 |
} |
|
452 |
else { |
|
448 |
} else { |
|
453 | 449 |
$name => $self->{contact}->$name; |
454 | 450 |
} |
455 | 451 |
} |
... | ... | |
465 | 461 |
{ |
466 | 462 |
if ( $_->config->type eq 'number' ) { |
467 | 463 |
$_->config->name => $::form->format_amount(\%::myconfig, $_->value, -2); |
468 |
} |
|
469 |
else { |
|
464 |
} else { |
|
470 | 465 |
$_->config->name => $_->value; |
471 | 466 |
} |
472 | 467 |
} |
... | ... | |
568 | 563 |
if ( $::form->{cv}->{id} ) { |
569 | 564 |
if ( $self->is_vendor() ) { |
570 | 565 |
$self->{cv} = SL::DB::Vendor->new(id => $::form->{cv}->{id})->load(); |
571 |
} |
|
572 |
else { |
|
566 |
} else { |
|
573 | 567 |
$self->{cv} = SL::DB::Customer->new(id => $::form->{cv}->{id})->load(); |
574 | 568 |
} |
575 |
} |
|
576 |
else { |
|
569 |
} else { |
|
577 | 570 |
if ( $self->is_vendor() ) { |
578 | 571 |
$self->{cv} = SL::DB::Vendor->new(); |
579 |
} |
|
580 |
else { |
|
572 |
} else { |
|
581 | 573 |
$self->{cv} = SL::DB::Customer->new(); |
582 | 574 |
} |
583 | 575 |
} |
... | ... | |
601 | 593 |
|
602 | 594 |
if ( $::form->{note}->{id} ) { |
603 | 595 |
$self->{note} = SL::DB::Note->new(id => $::form->{note}->{id})->load(); |
604 |
} |
|
605 |
else { |
|
596 |
} else { |
|
606 | 597 |
$self->{note} = SL::DB::Note->new(); |
607 | 598 |
} |
608 | 599 |
$self->{note}->assign_attributes(%{$::form->{note}}); |
... | ... | |
620 | 611 |
|
621 | 612 |
if ( $::form->{shipto}->{shipto_id} ) { |
622 | 613 |
$self->{shipto} = SL::DB::Shipto->new(shipto_id => $::form->{shipto}->{shipto_id})->load(); |
623 |
} |
|
624 |
else { |
|
614 |
} else { |
|
625 | 615 |
$self->{shipto} = SL::DB::Shipto->new(); |
626 | 616 |
} |
627 | 617 |
$self->{shipto}->assign_attributes(%{$::form->{shipto}}); |
... | ... | |
632 | 622 |
|
633 | 623 |
if ( $::form->{contact}->{cp_id} ) { |
634 | 624 |
$self->{contact} = SL::DB::Contact->new(cp_id => $::form->{contact}->{cp_id})->load(); |
635 |
} |
|
636 |
else { |
|
625 |
} else { |
|
637 | 626 |
$self->{contact} = SL::DB::Contact->new(); |
638 | 627 |
} |
639 | 628 |
$self->{contact}->assign_attributes(%{$::form->{contact}}); |
... | ... | |
657 | 646 |
|
658 | 647 |
if ( $self->is_vendor() ) { |
659 | 648 |
$self->{cv} = SL::DB::Vendor->new(id => $::form->{id})->load(); |
660 |
} |
|
661 |
else { |
|
649 |
} else { |
|
662 | 650 |
$self->{cv} = SL::DB::Customer->new(id => $::form->{id})->load(); |
663 | 651 |
} |
664 | 652 |
|
... | ... | |
671 | 659 |
if ( $self->{shipto}->trans_id != $self->{cv}->id ) { |
672 | 660 |
die($::locale->text('Error')); |
673 | 661 |
} |
674 |
} |
|
675 |
else { |
|
662 |
} else { |
|
676 | 663 |
$self->{shipto} = SL::DB::Shipto->new(); |
677 | 664 |
} |
678 | 665 |
|
... | ... | |
682 | 669 |
if ( $self->{contact}->cp_cv_id != $self->{cv}->id ) { |
683 | 670 |
die($::locale->text('Error')); |
684 | 671 |
} |
685 |
} |
|
686 |
else { |
|
672 |
} else { |
|
687 | 673 |
$self->{contact} = SL::DB::Contact->new(); |
688 | 674 |
} |
689 | 675 |
} |
... | ... | |
693 | 679 |
|
694 | 680 |
if ( $self->is_vendor() ) { |
695 | 681 |
$self->{cv} = SL::DB::Vendor->new(); |
696 |
} |
|
697 |
else { |
|
682 |
} else { |
|
698 | 683 |
$self->{cv} = SL::DB::Customer->new(); |
699 | 684 |
} |
700 | 685 |
|
Auch abrufbar als: Unified diff
Cuddled else