X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=invoice_view.php;h=8168c3ad89544d6ed51255cc5e23b5b036b2a06f;hb=56f1fd19f2c9c72878395b3275f03f192ccca082;hp=bfc672238ad4b503ca604da66f0c0ea41c48781e;hpb=0290e13bb8429bb198c21fcb9129b5599a47428d;p=timetracker.git diff --git a/invoice_view.php b/invoice_view.php index bfc67223..8168c3ad 100644 --- a/invoice_view.php +++ b/invoice_view.php @@ -61,7 +61,7 @@ $subtotal = 0; $tax = 0; foreach($invoice_items as $item) $subtotal += $item['cost']; -if ($tax_percent) { +if ($tax_percent > 0) { $tax_expenses = $user->isPluginEnabled('et'); foreach($invoice_items as $item) { if ($item['type'] == 2 && !$tax_expenses) @@ -89,7 +89,7 @@ elseif (MODE_PROJECTS_AND_TASKS == $user->tracking_mode) $form = new Form('invoiceForm'); // Hidden control for invoice id. -$form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_id)); +$form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_invoice_id)); // invoiceForm only contains controls for "Mark paid" block below invoice table. if ($user->isPluginEnabled('ps')) { $mark_paid_action_options = array('1'=>$i18n->get('dropdown.paid'),'2'=>$i18n->get('dropdown.not_paid')); @@ -106,16 +106,16 @@ if ($request->isPost()) { // Determine user action. $mark_paid = $request->getParameter('mark_paid_action_options') == 1 ? true : false; - ttInvoiceHelper::markPaid($cl_id, $mark_paid); + ttInvoiceHelper::markPaid($cl_invoice_id, $mark_paid); // Re-display this form. - header('Location: invoice_view.php?id='.$cl_id); + header('Location: invoice_view.php?id='.$cl_invoice_id); exit(); } } $smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('invoice_id', $cl_id); +$smarty->assign('invoice_id', $cl_invoice_id); $smarty->assign('invoice_name', $invoice['name']); $smarty->assign('invoice_date', $invoice_date->toString($user->date_format)); $smarty->assign('client_name', $client['name']);