if ($form->{"project_id_$_"}); } (1..$form->{"rowcount"}));
my $vc = $form->{vc} eq "customer" ? "customers" : "vendors";
- $form->get_lists("contacts" => "ALL_CONTACTS",
- "shipto" => "ALL_SHIPTO",
+ $form->get_lists("shipto" => "ALL_SHIPTO",
"projects" => {
"key" => "ALL_PROJECTS",
"all" => 0,
"departments" => "ALL_DEPARTMENTS",
"business_types" => "ALL_BUSINESS_TYPES",
);
+ $::form->{ALL_CONTACTS} = SL::DB::Manager::Contact->get_all(query => [
+ or => [
+ cp_cv_id => $::form->{"$::form->{vc}_id"} * 1,
+ and => [
+ cp_cv_id => undef,
+ cp_id => $::form->{cp_id} * 1
+ ]
+ ]
+ ]);
map { $_->{value} = "$_->{description}--$_->{id}" } @{ $form->{ALL_DEPARTMENTS} };
map { $_->{value} = "$_->{name}--$_->{id}" } @{ $form->{ALL_VC} };
# show pricegroup in newly loaded invoice when creating invoice from delivery order
for my $i (1 .. $form->{rowcount}) {
- $form->{"sellprice_pg_$i"} = join /--/, $form->{"sellprice_$i"}, $form->{"pricegroup_id_$i"};
+ $form->{"sellprice_pg_$i"} = join '--', $form->{"sellprice_$i"}, $form->{"pricegroup_id_$i"};
}
IS->get_pricegroups_for_parts(\%myconfig, \%$form);
set_pricegroup($_) for 1 .. $form->{rowcount};
# show pricegroup in newly loaded invoice when creating invoice from delivery order
for my $i (1 .. $form->{rowcount}) {
- $form->{"sellprice_pg_$i"} = join /--/, $form->{"sellprice_$i"}, $form->{"pricegroup_id_$i"};
+ $form->{"sellprice_pg_$i"} = join '--', $form->{"sellprice_$i"}, $form->{"pricegroup_id_$i"};
}
IS->get_pricegroups_for_parts(\%myconfig, \%$form);
set_pricegroup($_) for 1 .. $form->{rowcount};