mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 18:34:30 -04:00
Hipster: Show statement label
This commit is contained in:
parent
926a599e8d
commit
672c832b9b
@ -82,6 +82,12 @@ class PdfMaker
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Final method to get compiled HTML.
|
||||||
|
*
|
||||||
|
* @param bool $final @deprecated
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
public function getCompiledHTML($final = false)
|
public function getCompiledHTML($final = false)
|
||||||
{
|
{
|
||||||
$html = $this->document->saveHTML();
|
$html = $this->document->saveHTML();
|
||||||
|
@ -454,6 +454,7 @@ class HtmlEngine
|
|||||||
$data['$method'] = ['value' => ' ', 'label' => ctrans('texts.method')];
|
$data['$method'] = ['value' => ' ', 'label' => ctrans('texts.method')];
|
||||||
|
|
||||||
$data['$amount'] = ['value' => '', 'label' => ctrans('texts.amount')];
|
$data['$amount'] = ['value' => '', 'label' => ctrans('texts.amount')];
|
||||||
|
$data['$statement'] = ['value' => '', 'label' => ctrans('texts.statement')];
|
||||||
|
|
||||||
$arrKeysLength = array_map('strlen', array_keys($data));
|
$arrKeysLength = array_map('strlen', array_keys($data));
|
||||||
array_multisort($arrKeysLength, SORT_DESC, $data);
|
array_multisort($arrKeysLength, SORT_DESC, $data);
|
||||||
|
@ -345,6 +345,12 @@
|
|||||||
? document.getElementById(tableIdentifier).style.display = 'none'
|
? 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>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user