Minor updatess
This commit is contained in:
@@ -135,7 +135,7 @@ class Invoice_TCPDF_Default extends Invoice_TCPDF {
|
||||
|
||||
// Draw a box.
|
||||
$this->SetFillColor(245);
|
||||
$this->SetXY($x-1,$y-1); $this->Cell(0,35+5+($this->io->credit_amt ? 5 : 0),'',1,0,'',1);
|
||||
$this->SetXY($x-1,$y-1); $this->Cell(0,35+5+($this->io->total_credits() ? 5 : 0),'',1,0,'',1);
|
||||
|
||||
// Draw a box around the invoice due date and amount due.
|
||||
$this->SetFont('helvetica','B',11);
|
||||
@@ -172,12 +172,12 @@ class Invoice_TCPDF_Default extends Invoice_TCPDF {
|
||||
$this->SetFont('helvetica','B',11);
|
||||
$this->SetXY($x+55,$y); $this->Cell(0,0,$this->io->payments_total('TRUE'),0,0,'R');
|
||||
|
||||
if ($this->io->credit_amt) {
|
||||
if ($this->io->total_credits()) {
|
||||
$y += 5;
|
||||
$this->SetFont('helvetica','',10);
|
||||
$this->SetXY($x,$y); $this->Cell(0,0,'Credits Received');
|
||||
$this->SetFont('helvetica','B',11);
|
||||
$this->SetXY($x+55,$y); $this->Cell(0,0,$this->io->display('credit_amt'),0,0,'R');
|
||||
$this->SetXY($x+55,$y); $this->Cell(0,0,$this->io->total_credits(TRUE),0,0,'R');
|
||||
}
|
||||
|
||||
$y += 5;
|
||||
@@ -319,7 +319,7 @@ class Invoice_TCPDF_Default extends Invoice_TCPDF {
|
||||
$this->SetFillColor(245);
|
||||
$this->SetXY($x-1,$y-1);
|
||||
$this->Cell(0,5*(
|
||||
1+1+1+3+($this->io->discount_amt ? 1 : 0)+1+($this->io->credit_amt ? 1 : 0)+$box
|
||||
1+1+1+3+($this->io->total_discounts() ? 1 : 0)+1+($this->io->total_credits() ? 1 : 0)+$box
|
||||
)+1+4,'',1,0,'',1);
|
||||
|
||||
$this->SetFont('helvetica','B',11);
|
||||
@@ -355,7 +355,7 @@ class Invoice_TCPDF_Default extends Invoice_TCPDF {
|
||||
|
||||
// Calculate our rounding error
|
||||
// @todo This shouldnt be required.
|
||||
$subtotal = Currency::round($subtotal-$this->io->discount_amt);
|
||||
#$subtotal = Currency::round($subtotal-$this->io->total_discounts());
|
||||
|
||||
if (Currency::round($this->io->subtotal()) != $subtotal) {
|
||||
$this->SetFont('helvetica','',9);
|
||||
@@ -369,7 +369,7 @@ class Invoice_TCPDF_Default extends Invoice_TCPDF {
|
||||
}
|
||||
|
||||
// Draw Discounts.
|
||||
if ($this->io->discount_amt) {
|
||||
if ($this->io->total_discounts()) {
|
||||
$y += 5;
|
||||
$this->SetY($y);
|
||||
|
||||
@@ -377,7 +377,7 @@ class Invoice_TCPDF_Default extends Invoice_TCPDF {
|
||||
$this->SetX($x+8);
|
||||
$this->Cell(0,0,_('Discount'));
|
||||
$this->SetX($x+135);
|
||||
$this->Cell(0,0,Currency::display(-$this->io->discount_amt),0,0,'R');
|
||||
$this->Cell(0,0,Currency::display(-$this->io->total_discounts()),0,0,'R');
|
||||
}
|
||||
|
||||
// Subtotal and tax.
|
||||
@@ -415,7 +415,7 @@ class Invoice_TCPDF_Default extends Invoice_TCPDF {
|
||||
$this->SetX($x+135);
|
||||
$this->Cell(0,0,$this->io->payments_total(TRUE),0,0,'R');
|
||||
|
||||
if ($this->io->credit_amt) {
|
||||
if ($this->io->total_credits()) {
|
||||
$y += 5;
|
||||
$this->SetY($y);
|
||||
|
||||
@@ -423,7 +423,7 @@ class Invoice_TCPDF_Default extends Invoice_TCPDF {
|
||||
$this->SetX($x+8);
|
||||
$this->Cell(0,0,_('Less Credits'));
|
||||
$this->SetX($x+135);
|
||||
$this->Cell(0,0,Currency::display(-$this->io->credit_amt),0,0,'R');
|
||||
$this->Cell(0,0,Currency::display(-$this->io->total_credits()),0,0,'R');
|
||||
}
|
||||
|
||||
$y += 5;
|
||||
@@ -479,7 +479,7 @@ class Invoice_TCPDF_Default extends Invoice_TCPDF {
|
||||
|
||||
$this->SetFont('helvetica','',8);
|
||||
$this->SetX($x);
|
||||
$this->Cell(0,0,$ito->service->service_name());
|
||||
$this->Cell(0,0,sprintf('%s - %s',$ito->product->name(),$ito->service->name()));
|
||||
|
||||
if ($ito->price_base) {
|
||||
$this->SetX($x+160);
|
||||
|
Reference in New Issue
Block a user