mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for displaying purchase order table in pdf
This commit is contained in:
parent
ff9bd79449
commit
66571b1cbd
@ -30,6 +30,7 @@ class PdfBuilder
|
|||||||
|
|
||||||
private CommonMarkConverter $commonmark;
|
private CommonMarkConverter $commonmark;
|
||||||
|
|
||||||
|
private float $payment_amount_total = 0;
|
||||||
/**
|
/**
|
||||||
* an array of sections to be injected into the template
|
* an array of sections to be injected into the template
|
||||||
*
|
*
|
||||||
@ -266,6 +267,7 @@ class PdfBuilder
|
|||||||
|
|
||||||
$tbody[] = $element;
|
$tbody[] = $element;
|
||||||
|
|
||||||
|
$this->payment_amount_total += $payment->pivot->amount;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -295,7 +297,8 @@ class PdfBuilder
|
|||||||
$payment = $this->service->options['payments']->first();
|
$payment = $this->service->options['payments']->first();
|
||||||
|
|
||||||
return [
|
return [
|
||||||
['element' => 'p', 'content' => \sprintf('%s: %s', ctrans('texts.amount_paid'), Number::formatMoney($this->service->options['payments']->sum('amount'), $this->service->config->client))],
|
// ['element' => 'p', 'content' => \sprintf('%s: %s', ctrans('texts.amount_paid'), Number::formatMoney($this->service->options['payments']->sum('amount'), $this->service->config->client))],
|
||||||
|
['element' => 'p', 'content' => \sprintf('%s: %s', ctrans('texts.amount_paid'), Number::formatMoney($this->payment_amount_total, $this->client))],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -338,6 +341,7 @@ class PdfBuilder
|
|||||||
{
|
{
|
||||||
|
|
||||||
$this->genericSectionBuilder()
|
$this->genericSectionBuilder()
|
||||||
|
->getProductAndTaskTables()
|
||||||
->getProductTotals();
|
->getProductTotals();
|
||||||
|
|
||||||
$this->mergeSections([
|
$this->mergeSections([
|
||||||
@ -1100,7 +1104,7 @@ class PdfBuilder
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates the product table
|
* Generates the product table
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
|
Loading…
x
Reference in New Issue
Block a user