Revision bcdeb6ec
Von Tamino Steinert vor fast 2 Jahren hinzugefügt
SL/DB/Reclamation.pm | ||
---|---|---|
258 | 258 |
SL::DB::Reclamation |
259 | 259 |
SL::DB::Order |
260 | 260 |
SL::DB::DeliveryOrder |
261 |
SL::DB::Invoice |
|
262 |
SL::DB::PurchaseInvoice |
|
261 | 263 |
); |
262 | 264 |
unless( $allowed_sources{ref $source} ) { |
263 | 265 |
croak("Unsupported source object type '" . ref($source) . "'"); |
... | ... | |
278 | 280 |
#Delivery Order |
279 | 281 |
{ from => 'sales_delivery_order', to => 'sales_reclamation', abbr => 'sdsr', }, |
280 | 282 |
{ from => 'purchase_delivery_order', to => 'purchase_reclamation', abbr => 'pdpr', }, |
283 |
#Invoice |
|
284 |
{ from => 'invoice', to => 'sales_reclamation', abbr => 'sisr', }, |
|
285 |
{ from => 'purchase_invoice', to => 'purchase_reclamation', abbr => 'pipr', }, |
|
281 | 286 |
); |
282 | 287 |
my $from_to = (grep { $_->{from} eq $source->type && $_->{to} eq $destination_type} @from_tos)[0]; |
283 | 288 |
if (!$from_to) { |
... | ... | |
373 | 378 |
$record_args{contact_id} = $source->cp_id; |
374 | 379 |
$record_args{cv_record_number} = $source->cusordnumber; |
375 | 380 |
# }}} for vim folds |
381 |
} elsif ( $is_abbr_any->(qw(sisr)) ) { #Invoice(ar) |
|
382 |
map { $record_args{$_} = $source->$_ } # {{{ for vim folds |
|
383 |
qw( |
|
384 |
amount |
|
385 |
currency_id |
|
386 |
customer_id |
|
387 |
delivery_term_id |
|
388 |
department_id |
|
389 |
globalproject_id |
|
390 |
intnotes |
|
391 |
language_id |
|
392 |
netamount |
|
393 |
notes |
|
394 |
payment_id |
|
395 |
salesman_id |
|
396 |
shippingpoint |
|
397 |
shipvia |
|
398 |
tax_point |
|
399 |
taxincluded |
|
400 |
taxzone_id |
|
401 |
transaction_description |
|
402 |
); |
|
403 |
$record_args{contact_id} = $source->cp_id; |
|
404 |
$record_args{cv_record_number} = $source->cusordnumber; |
|
405 |
# }}} for vim folds |
|
406 |
} elsif ( $is_abbr_any->(qw(pipr)) ) { #Invoice(ap) |
|
407 |
map { $record_args{$_} = $source->$_ } # {{{ for vim folds |
|
408 |
qw( |
|
409 |
amount |
|
410 |
currency_id |
|
411 |
delivery_term_id |
|
412 |
department_id |
|
413 |
globalproject_id |
|
414 |
intnotes |
|
415 |
language_id |
|
416 |
netamount |
|
417 |
notes |
|
418 |
payment_id |
|
419 |
shipvia |
|
420 |
tax_point |
|
421 |
taxincluded |
|
422 |
taxzone_id |
|
423 |
transaction_description |
|
424 |
vendor_id |
|
425 |
); |
|
426 |
$record_args{contact_id} = $source->cp_id; |
|
427 |
# }}} for vim folds |
|
376 | 428 |
} |
377 | 429 |
|
378 | 430 |
if ( ($from_to->{from} =~ m{sales}) && ($from_to->{to} =~ m{purchase}) ) { |
Auch abrufbar als: Unified diff
Workflow: (sales/purchase) invoice → reclamation