Connecting Tech Pros Worldwide Forums | Help | Site Map

Place the total of the invoice on the last page of the invoice detail lines

Newbie
 
Join Date: Oct 2008
Posts: 2
#1: Oct 23 '08
Please shine the light, how do you place the total on the last page of the invoice? how do you find out the it is a last page of the detail lines then place the total of the invoice into that last page.

Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,650
#2: Oct 23 '08

re: Place the total of the invoice on the last page of the invoice detail lines


Quote:

Originally Posted by Ly Cao

Please shine the light, how do you place the total on the last page of the invoice?

usually by writing it on the sheet with the largest page number.

(what I wanted to make clear is, if you don't provide us with information we can't answer properly, see how to ask a question )

PS if you post code, don't forget to use [code] tags
Newbie
 
Join Date: Oct 2008
Posts: 2
#3: Oct 24 '08

re: Place the total of the invoice on the last page of the invoice detail lines


Quote:

Originally Posted by Dormilich

usually by writing it on the sheet with the largest page number.

(what I wanted to make clear is, if you don't provide us with information we can't answer properly, see how to ask a question )

PS if you post code, don't forget to use [code] tags

Sorry, I realized it after it had been posted, I then tried to attach more info but some how it didn't save. Hope it works this time.
I am using XSL version 1.1 in solaris 5.8 and xml version 1.0 encoding="UTF-8"
Please find attached an XSL which display total on the page by itself. Please show me how to get it to display on the last page of the details line. <fo:static-content flow-name="xsl-region-after">
<fo:block font-size="10pt" font-weight="bold" text-align="center">
<fo:table border="0.2pt solid rgb( 13, 18, 137)">
<fo:table-column column-width="30mm"/>
<fo:table-column column-width="80mm"/>
<fo:table-column column-width="25mm"/>
<fo:table-column column-width="25mm"/>
<fo:table-column column-width="20mm"/>
<fo:table-body>

<fo:table-row>
<fo:table-cell number-rows-spanned="3" padding="1mm">
<fo:block text-align="left" font-weight="normal" padding="0.8mm">
</fo:block>
</fo:table-cell>

</fo:table-row>

<fo:table-row>
<fo:table-cell padding="1mm" border="0.2pt solid rgb(13, 18, 137)">
<fo:block text-align="right" font-weight="bold">
SALE VALUE (EXCLUSIVE OF GST)
</fo:block>
<fo:block text-align="right" font-weight="bold" space-after="1mm">
GST AMOUNT
</fo:block>
</fo:table-cell>
<fo:table-cell border="0.2pt solid rgb(13, 18, 137)" padding="1mm">
<fo:block text-align="right" font-weight="normal">
$<xsl:value-of select="format-number(substring-after(row[1]/column[49
],'$') + substring-after(row[1]/column[43],'$') + substring-after(row[1]/column[
44],'$') + substring-after(row[1]/column[45],'$') - substring-after(row[1]/colum
n[78],'$') - (substring-after(row[1]/column[66],'$') * row[1]/column[42]),'0.00
')"/> </fo:block>

<!-- GST AMOUNT -->
<fo:block text-align="right" font-weight="normal">
<xsl:value-of select="row[1]/column[70]"/>
</fo:block>
</fo:table-cell>
</fo:table-row>

<fo:table-row>
<fo:table-cell padding="1mm" border="0.2pt solid rgb(13, 18, 137)">
<fo:block text-align="right" font-size="11pt" font-weight="bold" space
-before="2mm">
TOTAL AMOUNT PAYABLE
</fo:block>
</fo:table-cell>
<fo:table-cell padding="1mm" border="0.2pt solid rgb(13, 18, 137)">
<fo:block text-align="right" font-size="11pt" font-weight="bold" space
-before="2mm">
$<xsl:value-of select="format-number((substring-after(row[1]/column[4
9],'$') + substring-after(row[1]/column[43],'$') + substring-after(row[1]/column
[44],'$') + substring-after(row[1]/column[45],'$') - substring-after(row[1]/colu
mn[78],'$') - (substring-after(row[1]/column[66],'$') * row[1]/column[42])) + s
ubstring-after(row[1]/column[70],'$'),'0.00')"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>
<fo:block id="last-page"/>
</fo:static-content>
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,650
#4: Oct 25 '08

re: Place the total of the invoice on the last page of the invoice detail lines


with xsl-fo you can create a "last page" template where you put your total in. <fo:static-content> seems not to be the most suited place for the total. (as I can tell from a quick read at www.w3schools.com/xslfo/)

regards
Reply