Work on HTML invoice and internal logic

This commit is contained in:
Deon George
2012-01-09 12:35:24 +11:00
parent a464d73f9a
commit f0c1f8800e
12 changed files with 431 additions and 115 deletions

View File

@@ -167,7 +167,7 @@ class Model_Payment extends ORMOSB {
if ($pio->changed()) {
$old_pio = ORM::factory('payment_item',$pio->id);
if ($it = $pio->invoice->due()+ORM::factory('payment_item',$pio->id)->alloc_amt-$pio->alloc_amt < 0)
if (($it = $pio->invoice->due()+ORM::factory('payment_item',$pio->id)->alloc_amt-$pio->alloc_amt) < 0)
$msg .= ($msg ? ' ' : '').sprintf('Invoice %s over allocated by %3.2f.',$pio->invoice_id,$it);
}