[OGo-Users] Print the location address instead of mail address
in formletters
Christian Naumer
users@opengroupware.org
Thu, 24 Jan 2008 08:37:34 +0100
Adam Tauno Williams schrieb:
> So you should be able to specify the specific address in a formletter b=
y
> using the address kind instead of "toAddress" and get the value you
> want.
>=20
> Like -=20
> formletter_kinds =3D ("myForm");
> LSEnterpriseFormLetter =3D {
> myForm =3D (
> { key =3D "ship.name1"; suffix =3D "\n"; },
> { key =3D "ship.name2"; suffix =3D "\n"; },
> { key =3D "ship.name3"; suffix =3D "\n"; },
> { key =3D "ship.street"; suffix =3D "\n"; },
> { key =3D "ship.zip"; suffix =3D " "; },
> { key =3D "ship.city"; suffix =3D "\n\n\n\n\n\n\n"; },
> { key =3D "toPerson.salutation"; suffix =3D " "; },
> { key =3D "toPerson.name"; suffix =3D ",\n\n"; }
> );
> - for example.
Yes this should work. Some time ago I had the same problem and since we
had just bought a feature from Skyrix we got a config file doing just
this. This config just exports all addresses. Additionally it also
changes the behaviour for enterprise addresses in that it always takes
the address of the contact not that of the company.
regards
Christian
RequiredAttributes =3D {
Person =3D ("degree", "firstname", "name", "salutation", "sex",
"email1", "isGeek", "petName" );
Enterprise =3D ("description", "bank", "bank_code", "account");
Address =3D ("name1", "name2", "name3", "street", "zip", "city");
Telephone =3D ("number", "type", "info");
};
LSPersonFormLetter =3D {
person_formletter_test =3D (
{ key =3D "mailing.name1"; suffix =3D "\n"; },
{ key =3D "mailing.name2"; suffix =3D "\n"; },
{ key =3D "mailing.name3"; suffix =3D "\n"; },
{ key =3D "degree"; suffix =3D " "; },
{ key =3D "firstname"; suffix =3D " "; },
{ key =3D "name"; suffix =3D "\n\n"; },
{ key =3D "mailing.street"; suffix =3D "\n"; },
{ key =3D "mailing.zip"; suffix =3D " "; },
{ key =3D "mailing.city"; suffix =3D "\n\n\n\n\n\n"; },
{ key =3D "salutation"; suffix =3D " "; },
{ key =3D "name"; suffix =3D ",\n\n"; },
// next test...
{ key =3D "location.name1"; suffix =3D "\n"; },
{ key =3D "location.name2"; suffix =3D "\n"; },
{ key =3D "location.name3"; suffix =3D "\n"; },
{ key =3D "degree"; suffix =3D " "; },
{ key =3D "firstname"; suffix =3D " "; },
{ key =3D "name"; suffix =3D "\n\n"; },
{ key =3D "location.street"; suffix =3D "\n"; },
{ key =3D "location.zip"; suffix =3D " "; },
{ key =3D "location.city"; suffix =3D "\n\n\n\n\n\n"; },
{ key =3D "salutation"; suffix =3D " "; },
{ key =3D "name"; suffix =3D ",\n\n"; },
// next test...
{ key =3D "private.name1"; suffix =3D "\n"; },
{ key =3D "private.name2"; suffix =3D "\n"; },
{ key =3D "private.name3"; suffix =3D "\n"; },
{ key =3D "degree"; suffix =3D " "; },
{ key =3D "firstname"; suffix =3D " "; },
{ key =3D "name"; suffix =3D "\n\n"; },
{ key =3D "private.street"; suffix =3D "\n"; },
{ key =3D "private.zip"; suffix =3D " "; },
{ key =3D "private.city"; suffix =3D "\n\n\n\n\n\n"; },
{ key =3D "salutation"; suffix =3D " "; },
{ key =3D "name"; suffix =3D ",\n\n"; },
);
};
LSEnterpriseFormLetter =3D {
enterprise_formletter_test =3D (
{ key =3D "toAddress.name1"; suffix =3D "\n"; },
{ key =3D "toAddress.name2"; suffix =3D "\n"; },
{ key =3D "toAddress.name3"; suffix =3D "\n"; },
{ key =3D "toAddress.street"; suffix =3D "\n"; },
{ key =3D "toAddress.zip"; suffix =3D " "; },
{ key =3D "toAddress.city"; suffix =3D "\n\n\n\n\n\n\n"; },
{ key =3D "toPerson.salutation"; suffix =3D " "; },
{ key =3D "toPerson.name"; suffix =3D ",\n\n"; }
);
};
--=20
Dr. Christian Naumer
Scientist Molecular Biology
B.R.A.I.N Aktiengesellschaft
Darmstaedter Str. 34-36, D-64673 Zwingenberg
e-mail cn@brain-biotech.de, homepage www.brain-biotech.de
fon +49-6251-9331-30 / fax +49-6251-9331-11
Sitz der Gesellschaft: Zwingenberg/Bergstrasse
Registergericht AG Darmstadt, HRB 24758
Vorstand: Dr. Holger Zinke (Vorsitz), Dr. J=FCrgen Eck
Vorsitzender des Aufsichtsrats: Ulrich Putsch