The name we want to display on this invoice is the name of the
customer, or more specifically the placing customer. That name may be
different from the name on whatever address the order is shipped to.
By looking at this code you can see that it gets a name for a
specific date, namely this invoice date. The seems to be to make sure
the name on an invoice doesn't change even if a Party's name is changed.
Hopefully this clears up what this code is for. There are a few
things to keep in mind and they are all important in general, and not
just in this case.
-David
On Nov 21, 2006, at 6:49 PM, Hans Bakker wrote:
Hi Si,
Do you trhink that the content of the invoice should change when
the billing
address is changed later, after sending the invoice? Our should it
stay at
the orginal content?
regards,
Hans
On Wednesday 22 November 2006 08:37, Si Chen wrote:
Hi,
Something about viewInvoice.fo.ftl looks wrong to me. I don't want
to remove something which people are using, so I thought I'd check.
When printing the billing address of this invoice, there is this code
block:
<#if billingAddress?has_content>
<#assign billingPartyNameResult = dispatcher.runSync
("getPartyNameForDate", Static["org.ofbiz.base.util.UtilMisc"].toMap
("partyId", billingParty.partyId, "compareDate", invoice.invoiceDate,
"userLogin", userLogin))/>
<fo:block>${billingPartyNameResult.fullName?default
(billingAddress.toName)?default("Billing Name Not Found")}</fo:block>
<#if billingAddress.attnName?exists>
<fo:block>${billingAddress.attnName}</fo:block>
</#if>
Why do we need to do this getPartyNameForDate? Shouldn't it just be
billingAddress.toName?
Best Regards,
Si
[EMAIL PROTECTED]
--
Regards,
Hans Bakker
ANT Websystems Co.,Ltd (http://www.antwebsystems.com)
If you want to verify that this message really originates from
from the above person, download the public key from:
http://www.antwebsystems.com/hbakkerAntwebsystems.asc