Email invoices to users

This commit is contained in:
Deon George
2011-10-13 09:20:08 +11:00
parent c419b50bac
commit 0bbda5352e
13 changed files with 264 additions and 54 deletions

View File

@@ -450,5 +450,23 @@ class Model_Invoice extends ORMOSB {
return $result;
}
public function html() {
// @todo This should be in a config file.
$css = '<style type="text/css">';
$css .= 'table.box-left { border: 1px solid #AAAACC; margin-right: auto; }';
$css .= 'tr.head { font-weight: bold; }';
$css .= 'td.head { font-weight: bold; }';
$css .= 'td.right { text-align: right; }';
$css .= 'tr.odd { background-color: #FCFCFE; }';
$css .= 'tr.even { background-color: #F6F6F8; }';
$css .= '</style>';
$output = View::factory('invoice/user/email')
->set('mediapath',Route::get('default/media'))
->set('io',$this);
return $css.$output;
}
}
?>