Work on invoices, products and other minor things

This commit is contained in:
Deon George
2011-10-11 19:52:31 +11:00
parent 50a096e22a
commit 718c42be65
12 changed files with 393 additions and 257 deletions

View File

@@ -22,16 +22,17 @@ class Tax {
public static function detail($cid,$zone,$value=0) {
$tax = ORM::factory('tax')
->where('country_id','=',$cid)
->and_where('zone','=',$zone);
->and_where('zone','=',$zone)
->find_all();
$taxes = array();
foreach ($tax->find_all() as $item) {
foreach ($tax as $to) {
$total = array();
$total['id'] = $item->id;
$total['description'] = $item->description;
$total['amount'] = $item->rate*$value;
$total['rate'] = $item->rate;
$total['id'] = $to->id;
$total['description'] = $to->description;
$total['amount'] = $to->rate*$value;
$total['rate'] = $to->rate;
array_push($taxes,$total);
}