Revision 69fe0ae7
Von Tamino Steinert vor mehr als 2 Jahren hinzugefügt
| SL/DB/DeliveryOrder.pm | ||
|---|---|---|
|
# }}} for vim folds
|
||
|
} elsif ( ref($source) eq 'SL::DB::Reclamation' ) {
|
||
|
map{ ( $record_args{$_} = $source->$_ ) } # {{{ for vim folds
|
||
|
#billing_address_id #TODO(Tamino): add billing_address_id to reclamation
|
||
|
qw(
|
||
|
billing_address_id
|
||
|
currency_id
|
||
|
customer_id
|
||
|
delivery_term_id
|
||
| SL/DB/MetaSetup/Reclamation.pm | ||
|---|---|---|
|
|
||
|
__PACKAGE__->meta->columns(
|
||
|
amount => { type => 'numeric', precision => 15, scale => 5 },
|
||
|
billing_address_id => { type => 'integer' },
|
||
|
closed => { type => 'boolean', default => 'false', not_null => 1 },
|
||
|
contact_id => { type => 'integer' },
|
||
|
currency_id => { type => 'integer', not_null => 1 },
|
||
| ... | ... | |
|
__PACKAGE__->meta->allow_inline_column_values(1);
|
||
|
|
||
|
__PACKAGE__->meta->foreign_keys(
|
||
|
billing_address => {
|
||
|
class => 'SL::DB::AdditionalBillingAddress',
|
||
|
key_columns => { billing_address_id => 'id' },
|
||
|
},
|
||
|
|
||
|
contact => {
|
||
|
class => 'SL::DB::Contact',
|
||
|
key_columns => { contact_id => 'cp_id' },
|
||
| SL/DB/Order.pm | ||
|---|---|---|
|
: undef
|
||
|
: die "Wrong state for reqdate";
|
||
|
} elsif ( ref($source) eq 'SL::DB::Reclamation') {
|
||
|
#TODO(Tamino): add billing_address_id to reclamation
|
||
|
%args = ( map({ ( $_ => $source->$_ ) } qw(
|
||
|
amount currency_id customer_id delivery_term_id department_id
|
||
|
amount billing_address_id currency_id customer_id delivery_term_id department_id
|
||
|
exchangerate globalproject_id intnotes language_id netamount
|
||
|
notes payment_id reqdate salesman_id shippingpoint shipvia taxincluded
|
||
|
tax_point taxzone_id transaction_description vendor_id
|
||
| SL/DB/Reclamation.pm | ||
|---|---|---|
|
map { $record_args{$_} = $source->$_ } # {{{ for vim folds
|
||
|
qw(
|
||
|
amount
|
||
|
billing_address_id
|
||
|
contact_id
|
||
|
currency_id
|
||
|
customer_id
|
||
| ... | ... | |
|
map { $record_args{$_} = $source->$_ } # {{{ for vim folds
|
||
|
qw(
|
||
|
amount
|
||
|
billing_address_id
|
||
|
currency_id
|
||
|
customer_id
|
||
|
delivery_term_id
|
||
| ... | ... | |
|
} elsif ( $is_abbr_any->(qw(sdsr pdpr)) ) { #DeliveryOrder
|
||
|
map { $record_args{$_} = $source->$_ } # {{{ for vim folds
|
||
|
qw(
|
||
|
billing_address_id
|
||
|
currency_id
|
||
|
customer_id
|
||
|
delivery_term_id
|
||
| ... | ... | |
|
map { $record_args{$_} = $source->$_ } # {{{ for vim folds
|
||
|
qw(
|
||
|
amount
|
||
|
billing_address_id
|
||
|
currency_id
|
||
|
customer_id
|
||
|
delivery_term_id
|
||
| ... | ... | |
|
|
||
|
if ( ($from_to->{from} =~ m{sales}) && ($from_to->{to} =~ m{purchase}) ) {
|
||
|
$record_args{customer_id} = undef;
|
||
|
$record_args{billing_address_id} = undef;
|
||
|
$record_args{salesman_id} = undef;
|
||
|
$record_args{payment_id} = undef;
|
||
|
$record_args{delivery_term_id} = undef;
|
||
| sql/Pg-upgrade2/reclamation_add_additional_billing_addresses.sql | ||
|---|---|---|
|
-- @tag: reclamation_add_additional_billing_addresses
|
||
|
-- @description: Kundenstammdaten: zusätzliche Rechnungsadressen auch in Reclamation
|
||
|
-- @depends: reclamations customer_additional_billing_addresses
|
||
|
|
||
|
ALTER TABLE reclamations
|
||
|
ADD COLUMN billing_address_id INTEGER,
|
||
|
ADD FOREIGN KEY (billing_address_id)
|
||
|
REFERENCES additional_billing_addresses (id);
|
||
| t/workflow/invoice_to_reclamation.t | ||
|---|---|---|
|
ok Compare($purchase_invoice->strip->as_tree, $converted_purchase_reclamation->strip->as_tree, {ignore_hash_keys => [qw(
|
||
|
id employee_id itime mtime transdate
|
||
|
datepaid deliverydate direct_debit duedate gldate invoice orddate ordnumber paid quodate quonumber storno storno_id type
|
||
|
customer_id cv_record_number delivered closed exchangerate reqdate salesman_id shippingpoint shipto_id
|
||
|
billing_address_id customer_id cv_record_number delivered closed exchangerate reqdate salesman_id shippingpoint shipto_id
|
||
|
cp_id contact_id
|
||
|
invnumber record_number
|
||
|
)]});
|
||
| templates/webpages/reclamation/tabs/basic_data.html | ||
|---|---|---|
|
</td>
|
||
|
</tr>
|
||
|
|
||
|
[%- IF SELF.cv == "customer" %]
|
||
|
<tr id="billing_address_row"[% IF !SELF.reclamation.customer.additional_billing_addresses.as_list.size %] style="display:none"[% END %]>
|
||
|
<th align="right">[% 'Custom Billing Address' | $T8 %]</th>
|
||
|
<td>
|
||
|
[% L.select_tag('reclamation.billing_address_id',
|
||
|
SELF.reclamation.customer.additional_billing_addresses,
|
||
|
default=SELF.reclamation.billing_address_id,
|
||
|
title_key='displayable_id',
|
||
|
value_key='id',
|
||
|
with_empty=1,
|
||
|
style='width: 300px') %]
|
||
|
</td>
|
||
|
</tr>
|
||
|
[%- END %]
|
||
|
|
||
|
[%- PROCESS reclamation/tabs/basic_data/_business_info_row.html SELF=SELF %]
|
||
|
|
||
|
<tr>
|
||
Auch abrufbar als: Unified diff
Reclamation: add billing_address_id to reclamation