21 |
21 |
use SL::DB::Default;
|
22 |
22 |
use SL::DB::Unit;
|
23 |
23 |
use SL::DB::Price;
|
|
24 |
use SL::DB::PriceFactor;
|
24 |
25 |
use SL::DB::Part;
|
25 |
26 |
use SL::DB::Printer;
|
26 |
27 |
use SL::DB::Language;
|
... | ... | |
39 |
40 |
use Rose::Object::MakeMethods::Generic
|
40 |
41 |
(
|
41 |
42 |
scalar => [ qw(item_ids_to_delete) ],
|
42 |
|
'scalar --get_set_init' => [ qw(order valid_types type cv p multi_items_models) ],
|
|
43 |
'scalar --get_set_init' => [ qw(order valid_types type cv p multi_items_models all_price_factors) ],
|
43 |
44 |
);
|
44 |
45 |
|
45 |
46 |
|
... | ... | |
413 |
414 |
$self->_recalc();
|
414 |
415 |
|
415 |
416 |
my $item_id = join('_', 'new', Time::HiRes::gettimeofday(), int rand 1000000000000);
|
416 |
|
my $row_as_html = $self->p->render('order/tabs/_row', ITEM => $item, ID => $item_id);
|
|
417 |
my $row_as_html = $self->p->render('order/tabs/_row',
|
|
418 |
ITEM => $item,
|
|
419 |
ID => $item_id,
|
|
420 |
ALL_PRICE_FACTORS => $self->all_price_factors
|
|
421 |
);
|
417 |
422 |
|
418 |
423 |
$self->js
|
419 |
424 |
->append('#row_table_id', $row_as_html)
|
... | ... | |
472 |
477 |
|
473 |
478 |
foreach my $item (@items) {
|
474 |
479 |
my $item_id = join('_', 'new', Time::HiRes::gettimeofday(), int rand 1000000000000);
|
475 |
|
my $row_as_html = $self->p->render('order/tabs/_row', ITEM => $item, ID => $item_id);
|
|
480 |
my $row_as_html = $self->p->render('order/tabs/_row',
|
|
481 |
ITEM => $item,
|
|
482 |
ID => $item_id,
|
|
483 |
ALL_PRICE_FACTORS => $self->all_price_factors
|
|
484 |
);
|
476 |
485 |
|
477 |
486 |
$self->js
|
478 |
487 |
->append('#row_table_id', $row_as_html)
|
... | ... | |
629 |
638 |
);
|
630 |
639 |
}
|
631 |
640 |
|
|
641 |
sub init_all_price_factors {
|
|
642 |
SL::DB::Manager::PriceFactor->get_all;
|
|
643 |
}
|
|
644 |
|
632 |
645 |
sub _check_auth {
|
633 |
646 |
my ($self) = @_;
|
634 |
647 |
|
... | ... | |
797 |
810 |
|
798 |
811 |
my %new_attr;
|
799 |
812 |
$new_attr{part} = $part;
|
800 |
|
$new_attr{description} = $part->description if ! $item->description;
|
801 |
|
$new_attr{qty} = 1.0 if ! $item->qty;
|
|
813 |
$new_attr{description} = $part->description if ! $item->description;
|
|
814 |
$new_attr{qty} = 1.0 if ! $item->qty;
|
|
815 |
$new_attr{price_factor_id} = $part->price_factor_id if ! $item->price_factor_id;
|
802 |
816 |
$new_attr{sellprice} = $price_src->price;
|
803 |
817 |
$new_attr{discount} = $discount_src->discount;
|
804 |
818 |
$new_attr{active_price_source} = $price_src;
|
Auftrags-Controller: Preisfaktor berücksichtigen