Site/Module setup work and auto_format fixes

This commit is contained in:
Deon George
2012-01-02 12:35:47 +11:00
parent 407eed04c9
commit a464d73f9a
19 changed files with 138 additions and 26 deletions

View File

@@ -17,8 +17,18 @@
class Controller_Admin_Invoice extends Controller_TemplateDefault_Admin {
protected $secure_actions = array(
'list'=>TRUE,
'setup'=>TRUE,
);
public function action_setup() {
$this->setup(array(
'GEN_DAYS'=>_('Generate Invoices this many days in advance of the due date'),
'GEN_SOON_DAYS'=>_('Days before GEN_DAYS to list invoices that will be generated'),
'TAX_ID'=>_('TAX ID shown on invoices'),
'TAX_ID_NAME'=>_('TAX ID name shown on invoices'),
));
}
/**
* Show a list of invoices
*/

View File

@@ -42,7 +42,7 @@ class Invoice_TCPDF_Default extends Invoice_TCPDF {
$this->SetFont('helvetica','',10);
$this->SetXY($x,$y); $this->Cell(0,0,Company::taxid()); $y += 6;
$this->SetXY($x,$y); $this->Cell(0,0,Company::street()); $y += 4;
$this->SetXY($x,$y); $this->Cell(0,0,Company::street(', ')); $y += 4;
$this->SetXY($x,$y); $this->Cell(0,0,sprintf('%s, %s %s',Company::city(),Company::state(),Company::pcode())); $y += 4;
$y += 2;
@@ -92,7 +92,7 @@ class Invoice_TCPDF_Default extends Invoice_TCPDF {
$y = 216;
$this->SetFont('helvetica','',10);
$this->SetXY(18,$y); $this->Cell(0,0,Company::name()); $y += 4;
$this->SetXY(18,$y); $this->Cell(0,0,Company::street()); $y += 4;
$this->SetXY(18,$y); $this->Cell(0,0,Company::street(', ')); $y += 4;
$this->SetXY(18,$y); $this->Cell(0,0,sprintf('%s, %s %s',Company::city(),Company::state(),Company::pcode())); $y += 4;
// Previous Due
@@ -122,7 +122,7 @@ class Invoice_TCPDF_Default extends Invoice_TCPDF {
else
$name = $this->io->account->name();
$this->SetXY($x,$y); $this->Cell(0,0,html_entity_decode($name,ENT_NOQUOTES)); $y += 5;
$this->SetXY($x,$y); $this->Cell(0,0,html_entity_decode($name,ENT_NOQUOTES)); $y += 5;
$this->SetXY($x,$y); $this->Cell(0,0,sprintf('%s %s ',$this->io->account->address1,$this->io->account->address2)); $y += 5;
$this->SetXY($x,$y); $this->Cell(0,0,sprintf('%s, %s %s',$this->io->account->city,$this->io->account->state,$this->io->account->zip)); $y += 5;
}