@@ -548,7 +548,7 @@ discard block |
||
| 548 | 548 | |
| 549 | 549 | if (empty($obj->typeop_user)) { // Add test to avoid adding amount twice if a link already exists also on user. |
| 550 | 550 | $accountancy_code_user_general = (!empty($obj->accountancy_code_user_general)) ? $obj->accountancy_code_user_general : $account_employee; |
| 551 | - $compta_user = $userstatic->accountancy_code; |
|
| 551 | + $compta_user = $userstatic->accountancy_code; |
|
| 552 | 552 | if ($compta_user) { |
| 553 | 553 | $tabtp[$obj->rowid][$compta_user] += $amounttouse; |
| 554 | 554 | $tabuser[$obj->rowid] = array( |
@@ -1048,20 +1048,20 @@ discard block |
||
| 1048 | 1048 | print '"'.$key.'"'.$sep; |
| 1049 | 1049 | print '"'.$date.'"'.$sep; |
| 1050 | 1050 | print '"'.$val["type_payment"].'"'.$sep; |
| 1051 | - if ($tabtype[$key] == 'payment_supplier') { |
|
| 1052 | - $account_ledger = (!empty($obj->accountancy_code_supplier_general)) ? $obj->accountancy_code_supplier_general : $account_supplier; |
|
| 1053 | - print '"'.length_accountg($account_ledger).'"'.$sep; |
|
| 1054 | - } elseif ($tabtype[$key] == 'payment') { |
|
| 1055 | - $account_ledger = (!empty($obj->accountancy_code_customer_general)) ? $obj->accountancy_code_customer_general : $account_customer; |
|
| 1056 | - print '"'.length_accountg($account_ledger).'"'.$sep; |
|
| 1057 | - } elseif ($tabtype[$key] == 'payment_expensereport') { |
|
| 1058 | - print '"'.length_accountg(getDolGlobalString('ACCOUNTING_ACCOUNT_EXPENSEREPORT')).'"'.$sep; |
|
| 1059 | - } elseif ($tabtype[$key] == 'payment_salary') { |
|
| 1060 | - $account_ledger = (!empty($obj->accountancy_code_user_general)) ? $obj->accountancy_code_user_general : $account_employee; |
|
| 1061 | - print '"'.length_accountg($account_ledger).'"'.$sep; |
|
| 1062 | - } else { |
|
| 1063 | - print '"'.length_accountg(html_entity_decode($k)).'"'.$sep; |
|
| 1064 | - } |
|
| 1051 | + if ($tabtype[$key] == 'payment_supplier') { |
|
| 1052 | + $account_ledger = (!empty($obj->accountancy_code_supplier_general)) ? $obj->accountancy_code_supplier_general : $account_supplier; |
|
| 1053 | + print '"'.length_accountg($account_ledger).'"'.$sep; |
|
| 1054 | + } elseif ($tabtype[$key] == 'payment') { |
|
| 1055 | + $account_ledger = (!empty($obj->accountancy_code_customer_general)) ? $obj->accountancy_code_customer_general : $account_customer; |
|
| 1056 | + print '"'.length_accountg($account_ledger).'"'.$sep; |
|
| 1057 | + } elseif ($tabtype[$key] == 'payment_expensereport') { |
|
| 1058 | + print '"'.length_accountg(getDolGlobalString('ACCOUNTING_ACCOUNT_EXPENSEREPORT')).'"'.$sep; |
|
| 1059 | + } elseif ($tabtype[$key] == 'payment_salary') { |
|
| 1060 | + $account_ledger = (!empty($obj->accountancy_code_user_general)) ? $obj->accountancy_code_user_general : $account_employee; |
|
| 1061 | + print '"'.length_accountg($account_ledger).'"'.$sep; |
|
| 1062 | + } else { |
|
| 1063 | + print '"'.length_accountg(html_entity_decode($k)).'"'.$sep; |
|
| 1064 | + } |
|
| 1065 | 1065 | print '"'.length_accounta(html_entity_decode($k)).'"'.$sep; |
| 1066 | 1066 | print '"'.$reflabel.'"'.$sep; |
| 1067 | 1067 | print '"'.($mt < 0 ? price(-$mt) : '').'"'.$sep; |
@@ -1340,16 +1340,16 @@ discard block |
||
| 1340 | 1340 | $account_ledger = $k; |
| 1341 | 1341 | // Try to force general ledger account depending on type |
| 1342 | 1342 | if ($tabtype[$key] == 'payment') { |
| 1343 | - $account_ledger = (!empty($obj->accountancy_code_customer_general)) ? $obj->accountancy_code_customer_general : $account_customer; |
|
| 1343 | + $account_ledger = (!empty($obj->accountancy_code_customer_general)) ? $obj->accountancy_code_customer_general : $account_customer; |
|
| 1344 | 1344 | } |
| 1345 | 1345 | if ($tabtype[$key] == 'payment_supplier') { |
| 1346 | - $account_ledger = (!empty($obj->accountancy_code_supplier_general)) ? $obj->accountancy_code_supplier_general : $account_supplier; |
|
| 1346 | + $account_ledger = (!empty($obj->accountancy_code_supplier_general)) ? $obj->accountancy_code_supplier_general : $account_supplier; |
|
| 1347 | 1347 | } |
| 1348 | 1348 | if ($tabtype[$key] == 'payment_expensereport') { |
| 1349 | 1349 | $account_ledger = getDolGlobalString('ACCOUNTING_ACCOUNT_EXPENSEREPORT'); |
| 1350 | 1350 | } |
| 1351 | 1351 | if ($tabtype[$key] == 'payment_salary') { |
| 1352 | - $account_ledger = (!empty($obj->accountancy_code_user_general)) ? $obj->accountancy_code_user_general : $account_employee; |
|
| 1352 | + $account_ledger = (!empty($obj->accountancy_code_user_general)) ? $obj->accountancy_code_user_general : $account_employee; |
|
| 1353 | 1353 | } |
| 1354 | 1354 | if ($tabtype[$key] == 'payment_vat') { |
| 1355 | 1355 | $account_ledger = getDolGlobalString('ACCOUNTING_VAT_PAY_ACCOUNT'); |
@@ -67,7 +67,6 @@ |
||
| 67 | 67 | * Return widget settings |
| 68 | 68 | * |
| 69 | 69 | * @return array<string,array{icon?:string,indicator?:string,widget?:string,tooltip?:string|array{html:string,class:string},map:string,default:string}> Array |
| 70 | - |
|
| 71 | 70 | */ |
| 72 | 71 | public function getWidgets() |
| 73 | 72 | { |
@@ -24,12 +24,12 @@ |
||
| 24 | 24 | */ |
| 25 | 25 | |
| 26 | 26 | /** |
| 27 | - * @var CommonObject $object |
|
| 28 | - * @var Conf $conf |
|
| 29 | - * @var Translate $langs |
|
| 30 | - * @var string $action |
|
| 31 | - * @var array<string,mixed> $parameters |
|
| 32 | - */ |
|
| 27 | + * @var CommonObject $object |
|
| 28 | + * @var Conf $conf |
|
| 29 | + * @var Translate $langs |
|
| 30 | + * @var string $action |
|
| 31 | + * @var array<string,mixed> $parameters |
|
| 32 | + */ |
|
| 33 | 33 | |
| 34 | 34 | // Protection to avoid direct call of template |
| 35 | 35 | if (empty($conf) || !is_object($conf)) { |