Skip to content

Commit e07cfc2

Browse files
committed
Added VAT stuff
1 parent e2ff981 commit e07cfc2

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

classes/controller/admin/bills.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ public function action_bill()
5353
if (isset($post_array['add_item']))
5454
{
5555
$_SESSION['bills']['items'][(count($_SESSION['bills']['items']) + 1).'item'] = count($_SESSION['bills']['items']) + 1;
56+
$post_array['qty_item_'.count($_SESSION['bills']['items'])] = 1;
57+
$post_array['vat_item_'.count($_SESSION['bills']['items'])] = 1.25;
5658
$this->set_formdata($post_array);
5759
}
5860
else
@@ -122,7 +124,11 @@ public function action_bill()
122124
}
123125
else
124126
{
125-
$this->set_formdata(array('due_date' => date('Y-m-d', time() + 20*24*60*60)));
127+
$this->set_formdata(array(
128+
'due_date' => date('Y-m-d', time() + 20*24*60*60),
129+
'qty_item_1' => 1,
130+
'vat_item_1' => 1.25,
131+
));
126132
}
127133

128134
xml::to_XML($_SESSION['bills'], $this->xml_content);

xsl/admin/bills.xsl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,11 @@
148148
<xsl:with-param name="label" select="'Quantity:'" />
149149
</xsl:call-template>
150150

151+
<xsl:call-template name="form_line">
152+
<xsl:with-param name="id" select="concat('vat_item_',.)" />
153+
<xsl:with-param name="label" select="'VAT:'" />
154+
</xsl:call-template>
155+
151156
<p>---</p>
152157
</xsl:for-each>
153158

0 commit comments

Comments
 (0)