Clean code
This commit is contained in:
parent
97bdffc772
commit
9d0569a8e8
3 changed files with 8 additions and 9 deletions
|
|
@ -114,6 +114,11 @@ if (!defined('LOG_DEBUG')) {
|
|||
}
|
||||
}
|
||||
|
||||
if (!defined('SUBTOTALS_SPECIAL_CODE')) {
|
||||
define('SUBTOTALS_SPECIAL_CODE', 81);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Disable some not used PHP stream
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -20,9 +20,6 @@
|
|||
* or see https://www.gnu.org/
|
||||
*/
|
||||
|
||||
if (!defined('SUBTOTALS_SPECIAL_CODE')) {
|
||||
define('SUBTOTALS_SPECIAL_CODE', 81);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
|
|||
|
|
@ -30,14 +30,11 @@
|
|||
*/
|
||||
function subtotals_completesubstitutionarray_lines(&$substitutionarray, $langs, $object, $line)
|
||||
{
|
||||
global $conf, $db;
|
||||
|
||||
|
||||
if (defined('SUBTOTALS_SPECIAL_CODE')) {
|
||||
$substitutionarray['is_subtotals_line'] = ($line->special_code == SUBTOTALS_SPECIAL_CODE);
|
||||
$substitutionarray['is_subtotals_line'] = ($line->special_code == constant('SUBTOTALS_SPECIAL_CODE'));
|
||||
$substitutionarray['is_not_subtotals_line'] = !$substitutionarray['is_subtotals_line'];
|
||||
$substitutionarray['is_subtotals_title'] = (($line->special_code == SUBTOTALS_SPECIAL_CODE) && $line->qty > 0);
|
||||
$substitutionarray['is_subtotals_subtotal'] = (($line->special_code == SUBTOTALS_SPECIAL_CODE) && $line->qty < 0);
|
||||
$substitutionarray['is_subtotals_title'] = (($line->special_code == constant('SUBTOTALS_SPECIAL_CODE')) && $line->qty > 0);
|
||||
$substitutionarray['is_subtotals_subtotal'] = (($line->special_code == constant('SUBTOTALS_SPECIAL_CODE')) && $line->qty < 0);
|
||||
$subtotal_total = 0;
|
||||
if (isModEnabled('multicurrency') && $object->multicurrency_code != getDolCurrency()) {
|
||||
$subtotal_total = $object->getSubtotalLineMulticurrencyAmount($line); // @phan-suppress-current-line PhanPluginUnknownObjectMethodCall
|
||||
|
|
|
|||
Loading…
Reference in a new issue