-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0f0749d
commit c0e95d2
Showing
4 changed files
with
227 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
general-ledger.xslt | ||
Copyright (c) 2023-2024 Ishan Pranav. All rights reserved. | ||
Licensed under the MIT License. | ||
--> | ||
<xsl:stylesheet | ||
version="1.0" | ||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
xmlns:msxsl="urn:schemas-microsoft-com:xslt" | ||
xmlns:html="http://www.w3.org/1999/xhtml" | ||
xmlns:liber="urn:liber" | ||
exclude-result-prefixes="msxsl"> | ||
<xsl:include href="base/financial-statement.xslt"/> | ||
<xsl:output method="html" indent="yes"/> | ||
<xsl:template match="/report"> | ||
<xsl:call-template name="financial-statement"> | ||
<xsl:with-param name="title" select="title"/> | ||
<xsl:with-param name="table"> | ||
<thead> | ||
<tr> | ||
<th colspan="5" class="subtitle"> | ||
<xsl:value-of select="company/name"/> | ||
</th> | ||
</tr> | ||
<tr> | ||
<th colspan="5" class="title"> | ||
<xsl:value-of select="title"/> | ||
</th> | ||
</tr> | ||
<tr> | ||
<th colspan="5" class="bar dateline"> | ||
<xsl:value-of select="liber:ftspanl(started, posted)"/> | ||
</th> | ||
</tr> | ||
<tr> | ||
<th class="left"> | ||
<xsl:value-of select="liber:gets('date')"/> | ||
</th> | ||
<th class="left"> | ||
<xsl:value-of select="liber:gets('name')"/> | ||
</th> | ||
<th></th> | ||
<th> | ||
<xsl:value-of select="liber:gets('debit')"/> | ||
</th> | ||
<th> | ||
<xsl:value-of select="liber:gets('credit')"/> | ||
</th> | ||
</tr> | ||
<tr> | ||
<th class="heading" colspan="1"></th> | ||
<td class="heading left"> | ||
<xsl:value-of select="liber:gets('description')"/> | ||
</td> | ||
<th class="heading"> | ||
<xsl:value-of select="liber:gets('account')"/> | ||
</th> | ||
<th class="heading" colspan="2"></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<xsl:for-each select="company/transaction"> | ||
<tr> | ||
<td class="left"> | ||
<xsl:value-of select="liber:fdates(posted)"/> | ||
</td> | ||
<td class="left" colspan="2"> | ||
<xsl:value-of select="name"/> | ||
</td> | ||
<td class="subtotal" colspan="2"></td> | ||
</tr> | ||
<xsl:for-each select="line[account = //account/name]"> | ||
<tr> | ||
<td colspan="1"></td> | ||
<td class="left"> | ||
<xsl:value-of select="description"/> | ||
</td> | ||
<td class="left in-2"> | ||
<xsl:value-of select="account"/> | ||
</td> | ||
<td class="right"> | ||
<xsl:value-of select="liber:fm(debit)"/> | ||
</td> | ||
<td class="right"> | ||
<xsl:value-of select="liber:fm(credit)"/> | ||
</td> | ||
</tr> | ||
</xsl:for-each> | ||
</xsl:for-each> | ||
</tbody> | ||
<tfoot> | ||
<tr> | ||
<th class="left" colspan="3"> | ||
<xsl:value-of select="liber:gets('total')"/> | ||
</th> | ||
<td class="total right"> | ||
<xsl:value-of select="liber:fm(sum(company/transaction/line[account = //account/name]/debit))"/> | ||
</td> | ||
<td class="total right"> | ||
<xsl:value-of select="liber:fm(sum(company/transaction/line[account = //account/name]/credit))"/> | ||
</td> | ||
</tr> | ||
</tfoot> | ||
</xsl:with-param> | ||
</xsl:call-template> | ||
</xsl:template> | ||
</xsl:stylesheet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
general-ledger.xslt | ||
Copyright (c) 2023-2024 Ishan Pranav. All rights reserved. | ||
Licensed under the MIT License. | ||
--> | ||
<xsl:stylesheet | ||
version="1.0" | ||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
xmlns:msxsl="urn:schemas-microsoft-com:xslt" | ||
xmlns:html="http://www.w3.org/1999/xhtml" | ||
xmlns:liber="urn:liber" | ||
exclude-result-prefixes="msxsl"> | ||
<xsl:include href="base/financial-statement.xslt"/> | ||
<xsl:output method="html" indent="yes"/> | ||
<xsl:template match="/report"> | ||
<xsl:call-template name="financial-statement"> | ||
<xsl:with-param name="title" select="title"/> | ||
<xsl:with-param name="table"> | ||
<thead> | ||
<tr> | ||
<th colspan="5" class="subtitle"> | ||
<xsl:value-of select="company/name"/> | ||
</th> | ||
</tr> | ||
<tr> | ||
<th colspan="5" class="title"> | ||
<xsl:value-of select="title"/> | ||
</th> | ||
</tr> | ||
<tr> | ||
<th colspan="5" class="bar dateline"> | ||
<xsl:value-of select="liber:ftspanl(started, posted)"/> | ||
</th> | ||
</tr> | ||
<tr> | ||
<th class="left"> | ||
<xsl:value-of select="liber:gets('date')"/> | ||
</th> | ||
<th class="left"> | ||
<xsl:value-of select="liber:gets('name')"/> | ||
</th> | ||
<th></th> | ||
<th> | ||
<xsl:value-of select="liber:gets('debit')"/> | ||
</th> | ||
<th> | ||
<xsl:value-of select="liber:gets('credit')"/> | ||
</th> | ||
</tr> | ||
<tr> | ||
<th class="heading" colspan="1"></th> | ||
<td class="heading left"> | ||
<xsl:value-of select="liber:gets('description')"/> | ||
</td> | ||
<th class="heading"> | ||
<xsl:value-of select="liber:gets('account')"/> | ||
</th> | ||
<th class="heading" colspan="2"></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<xsl:for-each select="company/transaction"> | ||
<tr> | ||
<td class="left"> | ||
<xsl:value-of select="liber:fdates(posted)"/> | ||
</td> | ||
<td class="left" colspan="2"> | ||
<xsl:value-of select="name"/> | ||
</td> | ||
<td class="subtotal" colspan="2"></td> | ||
</tr> | ||
<xsl:for-each select="line[account = //account/name]"> | ||
<tr> | ||
<td colspan="1"></td> | ||
<td class="left"> | ||
<xsl:value-of select="description"/> | ||
</td> | ||
<td class="left in-2"> | ||
<xsl:value-of select="account"/> | ||
</td> | ||
<td class="right"> | ||
<xsl:value-of select="liber:fm(debit)"/> | ||
</td> | ||
<td class="right"> | ||
<xsl:value-of select="liber:fm(credit)"/> | ||
</td> | ||
</tr> | ||
</xsl:for-each> | ||
</xsl:for-each> | ||
</tbody> | ||
<tfoot> | ||
<tr> | ||
<th class="left" colspan="3"> | ||
<xsl:value-of select="liber:gets('total')"/> | ||
</th> | ||
<td class="total right"> | ||
<xsl:value-of select="liber:fm(sum(company/transaction/line[account = //account/name]/debit))"/> | ||
</td> | ||
<td class="total right"> | ||
<xsl:value-of select="liber:fm(sum(company/transaction/line[account = //account/name]/credit))"/> | ||
</td> | ||
</tr> | ||
</tfoot> | ||
</xsl:with-param> | ||
</xsl:call-template> | ||
</xsl:template> | ||
</xsl:stylesheet> |