Revision 98056ff9
Von Moritz Bunkus vor mehr als 7 Jahren hinzugefügt
SL/DB/Helper/FlattenToForm.pm | ||
---|---|---|
107 | 107 |
} |
108 | 108 |
|
109 | 109 |
_copy_custom_variables($self, $form, 'vc_cvar_', '', $cvar_validity{vc}); |
110 |
_copy_custom_variables($self->contact, $form, 'cp_cvar_', '') if $self->contact; |
|
110 | 111 |
|
111 | 112 |
return $self; |
112 | 113 |
} |
... | ... | |
133 | 134 |
sub _copy_custom_variables { |
134 | 135 |
my ($src, $form, $prefix, $postfix, $cvar_validity) = @_; |
135 | 136 |
|
136 |
my $obj = (any { ref($src) eq $_ } qw(SL::DB::OrderItem SL::DB::DeliveryOrderItem SL::DB::InvoiceItem)) |
|
137 |
my $obj = (any { ref($src) eq $_ } qw(SL::DB::OrderItem SL::DB::DeliveryOrderItem SL::DB::InvoiceItem SL::DB::Contact))
|
|
137 | 138 |
? $src |
138 | 139 |
: $src->customervendor; |
139 | 140 |
|
SL/DN.pm | ||
---|---|---|
1033 | 1033 |
translation_type => 'greetings::' . ($form->{cp_gender} eq 'f' ? 'female' : 'male'), |
1034 | 1034 |
language_id => $form->{language_id}, |
1035 | 1035 |
allow_fallback => 1); |
1036 |
if ($form->{cp_id}) { |
|
1037 |
$custom_variables = CVar->get_custom_variables(dbh => $form->get_standard_dbh, |
|
1038 |
module => 'Contacts', |
|
1039 |
trans_id => $form->{cp_id}); |
|
1040 |
$form->{"cp_cvar_$_->{name}"} = $_->{value} for @{ $custom_variables }; |
|
1041 |
} |
|
1042 |
|
|
1036 | 1043 |
} |
1037 | 1044 |
|
1038 | 1045 |
1; |
SL/IR.pm | ||
---|---|---|
1447 | 1447 |
'trans_id' => $form->{vendor_id}); |
1448 | 1448 |
map { $form->{"vc_cvar_$_->{name}"} = $_->{value} } @{ $custom_variables }; |
1449 | 1449 |
|
1450 |
if ($form->{cp_id}) { |
|
1451 |
$custom_variables = CVar->get_custom_variables(dbh => $dbh, |
|
1452 |
module => 'Contacts', |
|
1453 |
trans_id => $form->{cp_id}); |
|
1454 |
$form->{"cp_cvar_$_->{name}"} = $_->{value} for @{ $custom_variables }; |
|
1455 |
} |
|
1456 |
|
|
1450 | 1457 |
$form->{cp_greeting} = GenericTranslations->get('dbh' => $dbh, |
1451 | 1458 |
'translation_type' => 'greetings::' . ($form->{cp_gender} eq 'f' ? 'female' : 'male'), |
1452 | 1459 |
'allow_fallback' => 1); |
SL/IS.pm | ||
---|---|---|
664 | 664 |
'trans_id' => $form->{customer_id}); |
665 | 665 |
map { $form->{"vc_cvar_$_->{name}"} = $_->{value} } @{ $custom_variables }; |
666 | 666 |
|
667 |
if ($form->{cp_id}) { |
|
668 |
$custom_variables = CVar->get_custom_variables(dbh => $dbh, |
|
669 |
module => 'Contacts', |
|
670 |
trans_id => $form->{cp_id}); |
|
671 |
$form->{"cp_cvar_$_->{name}"} = $_->{value} for @{ $custom_variables }; |
|
672 |
} |
|
673 |
|
|
667 | 674 |
$form->{cp_greeting} = GenericTranslations->get('dbh' => $dbh, |
668 | 675 |
'translation_type' => 'greetings::' . ($form->{cp_gender} eq 'f' ? 'female' : 'male'), |
669 | 676 |
'language_id' => $language_id, |
doc/dokumentation.xml | ||
---|---|---|
5391 | 5391 |
<para>Die benutzerdefinierten Variablen der Lieferadressen stehen |
5392 | 5392 |
unter einem ähnlichen Namensschema zur Verfügung. Hier lautet der |
5393 | 5393 |
Präfix <varname>shiptocvar_</varname>.</para> |
5394 |
|
|
5395 |
<para>Analog stehen die benutzerdefinierten Variablen für Ansprechpersonen mit dem Namenspräfix <varname>cp_cvar_</varname> zur Verfügung.</para> |
|
5394 | 5396 |
</sect3> |
5395 | 5397 |
</sect2> |
5396 | 5398 |
|
Auch abrufbar als: Unified diff
benutzerdefinierte Variablen Ansprechpersonen beim Ausdruck als cp_cvar_…