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

@@ -50,6 +50,10 @@ class Company {
return Config::instance()->so->site_details('fax');
}
public static function email() {
return Config::instance()->so->site_details('email');
}
public static function contacts() {
return 'Tel: '.static::phone();
}

View File

@@ -12,8 +12,12 @@
class Currency {
public static function display($amount) {
// @todo $cid and therefore precision should come from a global session value.
return Num::format(Currency::round($amount),2,TRUE);
}
public static function round($amount) {
// @todo This rounding needs to be system configurable.
return Num::format(round($amount,2),2,TRUE);
return Num::round($amount,2);
}
}
?>

View File

@@ -69,7 +69,7 @@ class lnApp_SystemMessage extends HTMLRender {
/**
* Render an image for the System Message
*/
private static function image($type,$raw=false,$big=false,$alt='') {
public static function image($type,$raw=false,$big=false,$alt='') {
$mediapath = Route::get(static::$_media_path);
switch ($type) {

View File

@@ -129,7 +129,7 @@ abstract class ORMOSB extends ORM {
if ($this->_changed)
foreach ($this->_changed as $c)
if ($this->_table_columns[$c]['data_type'] == 'blob') {
$this->$c = $this->blob($this->$c,TRUE);
$this->_object[$c] = $this->blob($this->_object[$c],TRUE);
// We need to reset our auto_convert flag
if (isset($this->_table_columns[$c]['auto_convert']))