Revision 4e8df532
Von Tamino Steinert vor 8 Monaten hinzugefügt
SL/Dev/Record.pm | ||
---|---|---|
36 | 36 |
use SL::DB::Order::TypeData qw(:types); |
37 | 37 |
use SL::DB::DeliveryOrder; |
38 | 38 |
use SL::DB::DeliveryOrder::TypeData qw(:types); |
39 |
use SL::DB::Reclamation; |
|
40 |
use SL::DB::Reclamation::TypeData qw(:types); |
|
39 | 41 |
use SL::DB::Employee; |
40 | 42 |
use SL::Dev::Part qw(new_part); |
41 | 43 |
use SL::Dev::CustomerVendor qw(new_vendor new_customer); |
... | ... | |
245 | 247 |
sub create_sales_reclamation { |
246 | 248 |
my (%params) = @_; |
247 | 249 |
|
248 |
my $record_type = 'sales_reclamation';
|
|
250 |
my $record_type = SALES_RECLAMATION_TYPE();
|
|
249 | 251 |
my $reclamation_items = delete $params{reclamation_items} // _create_two_items($record_type); |
250 | 252 |
_check_items($reclamation_items, $record_type); |
251 | 253 |
|
... | ... | |
255 | 257 |
die "'customer' is not of type SL::DB::Customer" unless ref($customer) eq 'SL::DB::Customer'; |
256 | 258 |
|
257 | 259 |
my $reclamation = SL::DB::Reclamation->new( |
260 |
record_type => $record_type, |
|
258 | 261 |
customer_id => delete $params{customer_id} // $customer->id, |
259 | 262 |
taxzone_id => delete $params{taxzone_id} // $customer->taxzone->id, |
260 | 263 |
currency_id => delete $params{currency_id} // $::instance_conf->get_currency_id, |
... | ... | |
274 | 277 |
sub create_purchase_reclamation { |
275 | 278 |
my (%params) = @_; |
276 | 279 |
|
277 |
my $record_type = 'sales_reclamation';
|
|
280 |
my $record_type = PURCHASE_RECLAMATION_TYPE();
|
|
278 | 281 |
my $reclamation_items = delete $params{reclamation_items} // _create_two_items($record_type); |
279 | 282 |
_check_items($reclamation_items, $record_type); |
280 | 283 |
|
... | ... | |
284 | 287 |
die "'vendor' is not of type SL::DB::Vendor" unless ref($vendor) eq 'SL::DB::Vendor'; |
285 | 288 |
|
286 | 289 |
my $reclamation = SL::DB::Reclamation->new( |
290 |
record_type => $record_type, |
|
287 | 291 |
vendor_id => delete $params{vendor_id} // $vendor->id, |
288 | 292 |
taxzone_id => delete $params{taxzone_id} // $vendor->taxzone->id, |
289 | 293 |
currency_id => delete $params{currency_id} // $::instance_conf->get_currency_id, |
Auch abrufbar als: Unified diff
Reclamation: nutze Record-Type