$stw->finish();
chop $ref->{taxaccounts};
- ## vendor_id ggf beim ersten mal noch nicht gesetzt nur vendor <name>--<id>
- ($form->{vendor}, $form->{vendor_id}) = split(/--/, $form->{vendor}) if ! $form->{vendor_id};
-
- if ( $form->{vendor_id} ) {
- my $mm = SL::DB::Manager::MakeModel->get_first(
- query => [ parts_id => $ref->{id} , make => $form->{vendor_id} ] );
- if ( $mm ) {
- $::lxdebug->message(LXDebug->DEBUG2(), "mm id=".$mm->{id}." price=".$mm->{lastcost});
- $ref->{lastcost} = $mm->{lastcost};
- }
- }
-
$ref->{onhand} *= 1;
push @{ $form->{item_list} }, $ref;
last;
}
}
- ## customer_id ggf beim ersten mal noch nicht gesetzt nur customer <name>--<id>
- ($form->{customer}, $form->{customer_id}) = split(/--/, $form->{customer}) if ! $form->{customer_id};
- if ( $form->{customer_id} ) {
- my $cprice = SL::DB::Manager::PartCustomerPrice->get_first(
- query => [ parts_id => $ref->{id} , customer_id => $form->{customer_id} ] );
- if ( $cprice ) {
- $::lxdebug->message(LXDebug->DEBUG2(), "cprice id=".$cprice->{id}." price=".$cprice->{price});
- $ref->{sellprice} = $cprice->{price};
- }
- }
$ref->{onhand} *= 1;
push @{ $form->{item_list} }, $ref;