File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,8 @@ public function action_bill()
53
53
if (isset ($ post_array ['add_item ' ]))
54
54
{
55
55
$ _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 ;
56
58
$ this ->set_formdata ($ post_array );
57
59
}
58
60
else
@@ -122,7 +124,11 @@ public function action_bill()
122
124
}
123
125
else
124
126
{
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
+ ));
126
132
}
127
133
128
134
xml::to_XML ($ _SESSION ['bills ' ], $ this ->xml_content );
Original file line number Diff line number Diff line change 148
148
<xsl : with-param name =" label" select =" 'Quantity:'" />
149
149
</xsl : call-template >
150
150
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
+
151
156
<p >---</p >
152
157
</xsl : for-each >
153
158
You can’t perform that action at this time.
0 commit comments