Skip to content

Commit

Permalink
Added VAT stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
lillem4n committed Mar 29, 2013
1 parent e2ff981 commit e07cfc2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
8 changes: 7 additions & 1 deletion classes/controller/admin/bills.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ public function action_bill()
if (isset($post_array['add_item']))
{
$_SESSION['bills']['items'][(count($_SESSION['bills']['items']) + 1).'item'] = count($_SESSION['bills']['items']) + 1;
$post_array['qty_item_'.count($_SESSION['bills']['items'])] = 1;
$post_array['vat_item_'.count($_SESSION['bills']['items'])] = 1.25;
$this->set_formdata($post_array);
}
else
Expand Down Expand Up @@ -122,7 +124,11 @@ public function action_bill()
}
else
{
$this->set_formdata(array('due_date' => date('Y-m-d', time() + 20*24*60*60)));
$this->set_formdata(array(
'due_date' => date('Y-m-d', time() + 20*24*60*60),
'qty_item_1' => 1,
'vat_item_1' => 1.25,
));
}

xml::to_XML($_SESSION['bills'], $this->xml_content);
Expand Down
5 changes: 5 additions & 0 deletions xsl/admin/bills.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,11 @@
<xsl:with-param name="label" select="'Quantity:'" />
</xsl:call-template>

<xsl:call-template name="form_line">
<xsl:with-param name="id" select="concat('vat_item_',.)" />
<xsl:with-param name="label" select="'VAT:'" />
</xsl:call-template>

<p>---</p>
</xsl:for-each>

Expand Down

0 comments on commit e07cfc2

Please sign in to comment.