Fixes from live website

This commit is contained in:
Deon George
2013-04-20 11:40:44 +10:00
parent 13982be9f6
commit 79c76995b9
22 changed files with 283 additions and 55 deletions

View File

@@ -51,9 +51,6 @@ class Model_Payment extends ORM_OSB {
* @param $inv number, to allocate payment to an invoice
*/
public function add_item($invnum) {
if ($this->loaded() and ! $this->payment_items)
throw new Kohana_Exception('Need to load payment_items?');
// Find our id, if it exists
foreach ($this->payment_items as $pio)
if ($pio->invoice_id == $invnum)
@@ -156,6 +153,7 @@ class Model_Payment extends ORM_OSB {
/** LIST FUNCTIONS **/
public function list_unapplied() {
return array();
$pi = array();
// @todo database suffix needs to be dynamically calculated