Improved contract logic
This commit is contained in:
@@ -65,7 +65,7 @@
|
||||
<xs:element ref="activities"/>
|
||||
<xs:element ref="start_date"/>
|
||||
<xs:element ref="end_date"/>
|
||||
<xs:element ref="planning"/>
|
||||
<xs:element ref="planning" minOccurs="0"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</scope>
|
||||
<contractor sex="M"><!-- (M|F|O) (O for other) --> <!-- this info is used to select the correct pronoun, not for profiling :) -->
|
||||
<name>Peter Pan</name>
|
||||
<ctcompany>Lost Boys Inc.</ctcompany><!-- delete element in case of freelancer without company -->
|
||||
<ctcompany>Lost Boys Inc.</ctcompany><!-- delete ctcompany element in case of freelancer without company -->
|
||||
<address>Cloud 9</address>
|
||||
<postal_code>1234 XX</postal_code>
|
||||
<city>Treehouse City</city>
|
||||
@@ -28,9 +28,14 @@
|
||||
</activities>
|
||||
<start_date>2016-08-18</start_date>
|
||||
<end_date>2016-09-15</end_date>
|
||||
<planning><!-- amount of work to be done between the start and end date -->
|
||||
<!-- amount of work to be done between the start and end date; delete <planning> and its children if not relevant -->
|
||||
<planning>
|
||||
<hours>30</hours><!-- non-negative integer, used for planned working hours over total engagement (for SINGLE ENGAGEMENT contract) or over each period in <per> (for FIXED TIME contract) -->
|
||||
<per>month</per><!-- (month|week) [NOTE: only used for FIXED TIME contract, value is ignored otherwise] -->
|
||||
<per>month</per><!-- (month|week|engagement) [NOTE: month/week are only used for FIXED TIME contract, for SINGLE ENGAGEMENT use 'engagement'] -->
|
||||
</planning>
|
||||
<!-- For the above planning bit, here are three possible cases:
|
||||
1. You have a fixed term contract with no specifically defined working hours: delete <planning> element
|
||||
2. You have a fixed term contract with some indication of how many hours you'll be working: fill in <hours> and <per> (month or week)
|
||||
3. You have a single engagement contract. Working hours clause is mandatory in this case. Fill in <hours> and <per> (engagement) -->
|
||||
</work>
|
||||
</contract_info>
|
||||
|
||||
@@ -51,13 +51,19 @@
|
||||
<snippet>wa_contractorcan</snippet>
|
||||
<snippet>wa_noemploymentintention</snippet>
|
||||
</snippet_group>
|
||||
<snippet_group set="agree">
|
||||
<!-- define agreement -->
|
||||
<snippet_group set="agree1">
|
||||
<!-- define agreement, first part -->
|
||||
<snippet>ag_period</snippet>
|
||||
<snippet>ag_noemployment</snippet>
|
||||
<snippet>ag_companyinstructs</snippet>
|
||||
<snippet>ag_ownrisk</snippet>
|
||||
</snippet_group>
|
||||
<snippet_group set="workinghours">
|
||||
<!-- define working hours (this snippet is isolated because it is subject to some extra logic - not all fixed term contracts have working hours defined) -->
|
||||
<snippet>ag_workinghours</snippet>
|
||||
</snippet_group>
|
||||
<snippet_group set="agree2">
|
||||
<!-- define rest of agreement -->
|
||||
<snippet>ag_payment_fixed_term</snippet>
|
||||
<snippet>ag_biggerscopewarning</snippet>
|
||||
<snippet>ag_propertyrights</snippet>
|
||||
|
||||
@@ -78,7 +78,32 @@
|
||||
</title>
|
||||
<ol type="1">
|
||||
<xsl:for-each
|
||||
select="$snippetSelectionRoot/selection[@subtype = $docSubType]/snippet_group[@set = 'agree']/snippet">
|
||||
select="$snippetSelectionRoot/selection[@subtype = $docSubType]/snippet_group[@set = 'agree1']/snippet">
|
||||
<xsl:element name="xi:include">
|
||||
<xsl:attribute name="href">
|
||||
<xsl:call-template name="docCheck">
|
||||
<xsl:with-param name="fileNameBase" select="."/>
|
||||
<xsl:with-param name="snippetDirectory" select="$snippetBase"/>
|
||||
</xsl:call-template>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
</xsl:for-each>
|
||||
<!-- need to isolate this snippet to insert some logic: not all contracts define working hours -->
|
||||
<xsl:if test="/contract_info/work/planning">
|
||||
<xsl:for-each
|
||||
select="$snippetSelectionRoot/selection[@subtype = $docSubType]/snippet_group[@set = 'workinghours']/snippet">
|
||||
<xsl:element name="xi:include">
|
||||
<xsl:attribute name="href">
|
||||
<xsl:call-template name="docCheck">
|
||||
<xsl:with-param name="fileNameBase" select="."/>
|
||||
<xsl:with-param name="snippetDirectory" select="$snippetBase"/>
|
||||
</xsl:call-template>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
<xsl:for-each
|
||||
select="$snippetSelectionRoot/selection[@subtype = $docSubType]/snippet_group[@set = 'agree2']/snippet">
|
||||
<xsl:element name="xi:include">
|
||||
<xsl:attribute name="href">
|
||||
<xsl:call-template name="docCheck">
|
||||
|
||||
Reference in New Issue
Block a user