Hipster: Show statement label
This commit is contained in:
parent
926a599e8d
commit
672c832b9b
3 changed files with 13 additions and 0 deletions
|
|
@ -82,6 +82,12 @@ class PdfMaker
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Final method to get compiled HTML.
|
||||
*
|
||||
* @param bool $final @deprecated
|
||||
* @return mixed
|
||||
*/
|
||||
public function getCompiledHTML($final = false)
|
||||
{
|
||||
$html = $this->document->saveHTML();
|
||||
|
|
|
|||
|
|
@ -454,6 +454,7 @@ class HtmlEngine
|
|||
$data['$method'] = ['value' => ' ', 'label' => ctrans('texts.method')];
|
||||
|
||||
$data['$amount'] = ['value' => '', 'label' => ctrans('texts.amount')];
|
||||
$data['$statement'] = ['value' => '', 'label' => ctrans('texts.statement')];
|
||||
|
||||
$arrKeysLength = array_map('strlen', array_keys($data));
|
||||
array_multisort($arrKeysLength, SORT_DESC, $data);
|
||||
|
|
|
|||
|
|
@ -345,6 +345,12 @@
|
|||
? document.getElementById(tableIdentifier).style.display = 'none'
|
||||
: '';
|
||||
});
|
||||
|
||||
// If we have elements in these tables, we can change label to "Statement" & hide entity details.
|
||||
if (document.querySelectorAll('#statement-payment-table > tbody, #statement-payment-table > tbody, #statement-aging-table-totals > tbody').length > 0) {
|
||||
document.querySelector('.entity-label').innerText = '$statement_label';
|
||||
document.querySelector('.entity-details-wrapper').style.display = 'none';
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue