Fix to not record /bin/bash allocation
This commit is contained in:
parent
8b88cd9fdf
commit
133ae4d5c6
@ -191,8 +191,12 @@ class Model_Payment extends ORM_OSB {
|
||||
parent::save($validation);
|
||||
|
||||
// Need to save the associated items and their taxes
|
||||
if ($this->saved()) {
|
||||
if (! $this->changed() OR $this->saved()) {
|
||||
foreach ($items as $pio) {
|
||||
// Skip applying 0 payments to invoices.
|
||||
if (Currency::round($pio->alloc_amt) == 0 AND ! $pio->loaded())
|
||||
continue;
|
||||
|
||||
$pio->payment_id = $this->id;
|
||||
|
||||
if (! $pio->check()) {
|
||||
@ -208,8 +212,9 @@ class Model_Payment extends ORM_OSB {
|
||||
}
|
||||
}
|
||||
|
||||
} else
|
||||
} else {
|
||||
throw new Kohana_Exception('Couldnt save payment for some reason?');
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user