Revision dc28e1c2
Von Tamino Steinert vor fast 2 Jahren hinzugefügt
SL/DB/DeliveryOrder.pm | ||
---|---|---|
184 | 184 |
# }}} for vim folds |
185 | 185 |
} elsif ( ref($source) eq 'SL::DB::Reclamation' ) { |
186 | 186 |
map{ ( $record_args{$_} = $source->$_ ) } # {{{ for vim folds |
187 |
#billing_address_id #TODO(Tamino): add billing_address_id to reclamation |
|
188 | 187 |
qw( |
188 |
billing_address_id |
|
189 | 189 |
currency_id |
190 | 190 |
customer_id |
191 | 191 |
delivery_term_id |
SL/DB/MetaSetup/Reclamation.pm | ||
---|---|---|
10 | 10 |
|
11 | 11 |
__PACKAGE__->meta->columns( |
12 | 12 |
amount => { type => 'numeric', precision => 15, scale => 5 }, |
13 |
billing_address_id => { type => 'integer' }, |
|
13 | 14 |
closed => { type => 'boolean', default => 'false', not_null => 1 }, |
14 | 15 |
contact_id => { type => 'integer' }, |
15 | 16 |
currency_id => { type => 'integer', not_null => 1 }, |
... | ... | |
48 | 49 |
__PACKAGE__->meta->allow_inline_column_values(1); |
49 | 50 |
|
50 | 51 |
__PACKAGE__->meta->foreign_keys( |
52 |
billing_address => { |
|
53 |
class => 'SL::DB::AdditionalBillingAddress', |
|
54 |
key_columns => { billing_address_id => 'id' }, |
|
55 |
}, |
|
56 |
|
|
51 | 57 |
contact => { |
52 | 58 |
class => 'SL::DB::Contact', |
53 | 59 |
key_columns => { contact_id => 'cp_id' }, |
SL/DB/Order.pm | ||
---|---|---|
412 | 412 |
: undef |
413 | 413 |
: die "Wrong state for reqdate"; |
414 | 414 |
} elsif ( ref($source) eq 'SL::DB::Reclamation') { |
415 |
#TODO(Tamino): add billing_address_id to reclamation |
|
416 | 415 |
%args = ( map({ ( $_ => $source->$_ ) } qw( |
417 |
amount currency_id customer_id delivery_term_id department_id |
|
416 |
amount billing_address_id currency_id customer_id delivery_term_id department_id
|
|
418 | 417 |
exchangerate globalproject_id intnotes language_id netamount |
419 | 418 |
notes payment_id reqdate salesman_id shippingpoint shipvia taxincluded |
420 | 419 |
tax_point taxzone_id transaction_description vendor_id |
SL/DB/Reclamation.pm | ||
---|---|---|
353 | 353 |
map { $record_args{$_} = $source->$_ } # {{{ for vim folds |
354 | 354 |
qw( |
355 | 355 |
amount |
356 |
billing_address_id |
|
356 | 357 |
contact_id |
357 | 358 |
currency_id |
358 | 359 |
customer_id |
... | ... | |
379 | 380 |
map { $record_args{$_} = $source->$_ } # {{{ for vim folds |
380 | 381 |
qw( |
381 | 382 |
amount |
383 |
billing_address_id |
|
382 | 384 |
currency_id |
383 | 385 |
customer_id |
384 | 386 |
delivery_term_id |
... | ... | |
405 | 407 |
} elsif ( $is_abbr_any->(qw(sdsr pdpr)) ) { #DeliveryOrder |
406 | 408 |
map { $record_args{$_} = $source->$_ } # {{{ for vim folds |
407 | 409 |
qw( |
410 |
billing_address_id |
|
408 | 411 |
currency_id |
409 | 412 |
customer_id |
410 | 413 |
delivery_term_id |
... | ... | |
430 | 433 |
map { $record_args{$_} = $source->$_ } # {{{ for vim folds |
431 | 434 |
qw( |
432 | 435 |
amount |
436 |
billing_address_id |
|
433 | 437 |
currency_id |
434 | 438 |
customer_id |
435 | 439 |
delivery_term_id |
... | ... | |
477 | 481 |
|
478 | 482 |
if ( ($from_to->{from} =~ m{sales}) && ($from_to->{to} =~ m{purchase}) ) { |
479 | 483 |
$record_args{customer_id} = undef; |
484 |
$record_args{billing_address_id} = undef; |
|
480 | 485 |
$record_args{salesman_id} = undef; |
481 | 486 |
$record_args{payment_id} = undef; |
482 | 487 |
$record_args{delivery_term_id} = undef; |
sql/Pg-upgrade2/reclamation_add_additional_billing_addresses.sql | ||
---|---|---|
1 |
-- @tag: reclamation_add_additional_billing_addresses |
|
2 |
-- @description: Kundenstammdaten: zusätzliche Rechnungsadressen auch in Reclamation |
|
3 |
-- @depends: reclamations customer_additional_billing_addresses |
|
4 |
|
|
5 |
ALTER TABLE reclamations |
|
6 |
ADD COLUMN billing_address_id INTEGER, |
|
7 |
ADD FOREIGN KEY (billing_address_id) |
|
8 |
REFERENCES additional_billing_addresses (id); |
t/workflow/invoice_to_reclamation.t | ||
---|---|---|
265 | 265 |
ok Compare($purchase_invoice->strip->as_tree, $converted_purchase_reclamation->strip->as_tree, {ignore_hash_keys => [qw( |
266 | 266 |
id employee_id itime mtime transdate |
267 | 267 |
datepaid deliverydate direct_debit duedate gldate invoice orddate ordnumber paid quodate quonumber storno storno_id type |
268 |
customer_id cv_record_number delivered closed exchangerate reqdate salesman_id shippingpoint shipto_id |
|
268 |
billing_address_id customer_id cv_record_number delivered closed exchangerate reqdate salesman_id shippingpoint shipto_id
|
|
269 | 269 |
cp_id contact_id |
270 | 270 |
invnumber record_number |
271 | 271 |
)]}); |
templates/webpages/reclamation/tabs/basic_data.html | ||
---|---|---|
51 | 51 |
</td> |
52 | 52 |
</tr> |
53 | 53 |
|
54 |
[%- IF SELF.cv == "customer" %] |
|
55 |
<tr id="billing_address_row"[% IF !SELF.reclamation.customer.additional_billing_addresses.as_list.size %] style="display:none"[% END %]> |
|
56 |
<th align="right">[% 'Custom Billing Address' | $T8 %]</th> |
|
57 |
<td> |
|
58 |
[% L.select_tag('reclamation.billing_address_id', |
|
59 |
SELF.reclamation.customer.additional_billing_addresses, |
|
60 |
default=SELF.reclamation.billing_address_id, |
|
61 |
title_key='displayable_id', |
|
62 |
value_key='id', |
|
63 |
with_empty=1, |
|
64 |
style='width: 300px') %] |
|
65 |
</td> |
|
66 |
</tr> |
|
67 |
[%- END %] |
|
68 |
|
|
54 | 69 |
[%- PROCESS reclamation/tabs/basic_data/_business_info_row.html SELF=SELF %] |
55 | 70 |
|
56 | 71 |
<tr> |
Auch abrufbar als: Unified diff
Reclamation: add billing_address_id to reclamation