Revision 2bc58307
Von Kivitendo Admin vor etwa 8 Jahren hinzugefügt
SL/Dev/Record.pm | ||
---|---|---|
payment_id => $params{payment_id} // undef,
|
||
gldate => DateTime->today_local->to_kivitendo,
|
||
invoiceitems => $invoiceitems,
|
||
%params,
|
||
);
|
||
$invoice->assign_attributes(%params) if %params;
|
||
|
||
$invoice->post;
|
||
return $invoice;
|
||
... | ... | |
salesman_id => $params{employee_id} // SL::DB::Manager::Employee->current->id,
|
||
transdate => $params{transdate} // DateTime->today_local->to_kivitendo,
|
||
orderitems => $orderitems,
|
||
%params
|
||
);
|
||
$delivery_order->assign_attributes(%params) if %params;
|
||
$delivery_order->save;
|
||
return $delivery_order;
|
||
}
|
||
... | ... | |
# salesman_id => delete $params{employee_id} // SL::DB::Manager::Employee->current->id,
|
||
transdate => delete $params{transdate} // DateTime->today_local->to_kivitendo,
|
||
orderitems => $orderitems,
|
||
%params
|
||
);
|
||
$order->assign_attributes(%params) if %params;
|
||
|
||
if ( $save ) {
|
||
$order->calculate_prices_and_taxes;
|
||
... | ... | |
transdate => delete $params{transdate} // DateTime->today_local->to_kivitendo,
|
||
'closed' => undef,
|
||
orderitems => $orderitems,
|
||
%params
|
||
);
|
||
$order->assign_attributes(%params) if %params;
|
||
|
||
if ( $save ) {
|
||
$order->calculate_prices_and_taxes; # not tested for purchase orders
|
||
... | ... | |
description => $part->description,
|
||
unit => $part->unit,
|
||
qty => $params{qty} || 5,
|
||
%params,
|
||
);
|
||
$item->assign_attributes(%params) if %params;
|
||
return $item;
|
||
}
|
||
|
||
... | ... | |
valid => 1,
|
||
project_status_id => SL::DB::Manager::ProjectStatus->find_by(name => "running")->id,
|
||
project_type_id => SL::DB::Manager::ProjectType->find_by(description => "Standard")->id,
|
||
%params,
|
||
)->save;
|
||
$project->assign_attributes(%params) if %params;
|
||
return $project;
|
||
}
|
||
|
Auch abrufbar als: Unified diff
SL::Dev::Record - params immer per assign_attributes übergeben
Ansonsten wurden bei leerem Hash die vorherigen Werte überschrieben.