This topic contains 1 reply, has 0 voices, and was last updated by jordan.pes 7 years, 11 months ago.
-
AuthorPosts
-
December 9, 2016 at 3:01 pm #1919
jordan.pesHi all,
I;m currently working on an advanced pdf for customer statements, the goal is to group some of the statement lines together on a single line using a custom field that exists on the invoice record. The code is provided below.
#if>
#if>
#function>
#if>
#function>
#if>
#function>
#if>
#if> ${record.billaddress@label} ${record.billaddress} ${record@title} Date ${record.trandate} of ${record.amountDue@label} ${record.amountDue} ${record.lines.datecol@label} Invoice # ${record.lines.charge@label} ${record.lines.payment@label} ${record.lines.balance@label} #if>
#if>
#if>
#if>
#if>
${dateCol} ${prevGrpName} ${toCurrency(transCharge)} ${toCurrency(transPayment)} ${toCurrency(transBalance)} #if>
#if>
#if>
${dateCol} ${transGrpName} ${toCurrency(transCharge)} ${toCurrency(transPayment)} ${toCurrency(transBalance)} #if>
#if>
#if>
#if>
#if>
#list>
(i cut off the remaining code to save space in this post)
This advanced pdf is able to perform most of this functionality (e.g. the ‘transBalance’ variable is grouping together successfully) however i am experiencing issues when writing the ‘lline.charge’ and ‘line.payment’ values to the form. I have tried using the same code as i have used for transBalance but unfortunately it results in error. This is because the ‘line.charge’ and l’ine.payment’ values include blank/empty values whereas balance does not.
i need to try to test for whether ‘line.charge’ is blank, and if so assign my ‘transchargeTemp’ variable to 0, otherwise store the actual line.charge value.bu t for some reason it appears to be very difficult to test for the line.charge value being empty.
I have tried several approaches including the one in my code above,including but not limited to:
#if>
AND
#if>
Unfortunately both these always assign 0 as the transChargeTemp….
Has anyone have any experience of dealing with this issue on customer statement advanced pdfs and having overcome it?
thank you in advance, i hope my code can help some of you working on similar solutions in the future.
jordan
This is a cached copy. Click here to see the original post. -
December 21, 2016 at 2:58 am #1920
jordan.pesHi all,
In the end i was able to resolve this issue.
It stems from the fact that even when ‘line.charge’ and ‘line.payment’ appear to be blank they actually not, therefore when the ?number operation is run it is firing an error.
I still don’t know what character these fields are assigned as ?trim didnt remove it. In the end the following code was able to resolve the error.
-
AuthorPosts
You must be logged in to reply to this topic.