@@ -548,7 +548,7 @@ |
||
548 | 548 | $accountsystem->fetch(getDolGlobalInt('CHARTOFACCOUNTS')); |
549 | 549 | $sql = 'SELECT DISTINCT pcg_type FROM ' . MAIN_DB_PREFIX . 'accounting_account'; |
550 | 550 | $sql .= " WHERE fk_pcg_version = '" . $db->escape($accountsystem->ref) . "'"; |
551 | - $sql .= ' AND entity in (' . getEntity('accounting_account', 0) . ')'; // Always limit to current entity. No sharing in accountancy. |
|
551 | + $sql .= ' AND entity in (' . getEntity('accounting_account', 0) . ')'; // Always limit to current entity. No sharing in accountancy. |
|
552 | 552 | $sql .= ' LIMIT 50000'; // just as a sanity check |
553 | 553 | $resql = $db->query($sql); |
554 | 554 | if ($resql) { |
@@ -337,7 +337,7 @@ |
||
337 | 337 | print '<table class="border centpercent tableforfield">' . "\n"; |
338 | 338 | |
339 | 339 | // Common attributes |
340 | - $keyforbreak = 'date_acquisition'; // We change column just before this field |
|
340 | + $keyforbreak = 'date_acquisition'; // We change column just before this field |
|
341 | 341 | //unset($object->fields['fk_project']); // Hide field already shown in banner |
342 | 342 | //unset($object->fields['fk_soc']); // Hide field already shown in banner |
343 | 343 | include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_view.tpl.php'; |
@@ -71,7 +71,7 @@ |
||
71 | 71 | |
72 | 72 | // Default sort order (if not yet defined by previous GETPOST) |
73 | 73 | if (!$sortfield) { |
74 | - reset($object->fields); // Reset is required to avoid key() to return null. |
|
74 | + reset($object->fields); // Reset is required to avoid key() to return null. |
|
75 | 75 | $sortfield = "t." . key($object->fields); // Set here default search field. By default 1st field in definition. |
76 | 76 | } |
77 | 77 | if (!$sortorder) { |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'assetlist'; // To manage different context of search |
45 | 45 | $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page |
46 | 46 | $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') |
47 | -$mode = GETPOST('mode', 'alpha'); // mode view (kanban or common) |
|
47 | +$mode = GETPOST('mode', 'alpha'); // mode view (kanban or common) |
|
48 | 48 | $id = GETPOSTINT('id'); |
49 | 49 | |
50 | 50 | // Load variable for pagination |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | |
74 | 74 | // Default sort order (if not yet defined by previous GETPOST) |
75 | 75 | if (!$sortfield) { |
76 | - reset($object->fields); // Reset is required to avoid key() to return null. |
|
76 | + reset($object->fields); // Reset is required to avoid key() to return null. |
|
77 | 77 | $sortfield = "t." . key($object->fields); // Set here default search field. By default 1st field in definition. |
78 | 78 | } |
79 | 79 | if (!$sortorder) { |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | 'table' => 'asset_depreciation_options_economic', |
81 | 81 | 'fields' => array( |
82 | 82 | 'depreciation_type' => array('type' => 'smallint', 'label' => 'AssetDepreciationOptionDepreciationType', 'enabled' => '1', 'position' => 10, 'notnull' => 1, 'visible' => 1, 'default' => '0', 'arrayofkeyval' => array('0' => 'AssetDepreciationOptionDepreciationTypeLinear', '1' => 'AssetDepreciationOptionDepreciationTypeDegressive', '2' => 'AssetDepreciationOptionDepreciationTypeExceptional'), 'validate' => '1',), |
83 | - 'degressive_coefficient' => array('type' => 'double(24,8)', 'label' => 'AssetDepreciationOptionDegressiveRate', 'enabled' => '1', 'position' => 20, 'notnull' => 1, 'visible' => 1, 'default' => '0', 'isameasure' => '1', 'validate' => '1','enabled_field' => 'economic:depreciation_type:1'), |
|
83 | + 'degressive_coefficient' => array('type' => 'double(24,8)', 'label' => 'AssetDepreciationOptionDegressiveRate', 'enabled' => '1', 'position' => 20, 'notnull' => 1, 'visible' => 1, 'default' => '0', 'isameasure' => '1', 'validate' => '1', 'enabled_field' => 'economic:depreciation_type:1'), |
|
84 | 84 | 'duration' => array('type' => 'integer', 'label' => 'AssetDepreciationOptionDuration', 'enabled' => '1', 'position' => 30, 'notnull' => 1, 'visible' => 1, 'default' => '0', 'isameasure' => '1', 'validate' => '1',), |
85 | 85 | 'duration_type' => array('type' => 'smallint', 'label' => 'AssetDepreciationOptionDurationType', 'enabled' => '1', 'position' => 40, 'notnull' => 1, 'visible' => 1, 'default' => '0', 'arrayofkeyval' => array('0' => 'AssetDepreciationOptionDurationTypeAnnual', '1' => 'AssetDepreciationOptionDurationTypeMonthly'/*, '2'=>'AssetDepreciationOptionDurationTypeDaily'*/), 'validate' => '1',), |
86 | 86 | 'rate' => array('type' => 'double(24,8)', 'label' => 'AssetDepreciationOptionRate', 'enabled' => '1', 'position' => 50, 'visible' => 3, 'default' => '0', 'isameasure' => '1', 'validate' => '1', 'computed' => '$object->asset_depreciation_options->getRate("economic")',), |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | 'enabled_field' => 'economic:accelerated_depreciation_option:1', |
97 | 97 | 'fields' => array( |
98 | 98 | 'depreciation_type' => array('type' => 'smallint', 'label' => 'AssetDepreciationOptionDepreciationType', 'enabled' => '1', 'position' => 10, 'notnull' => 1, 'visible' => 1, 'default' => '0', 'arrayofkeyval' => array('0' => 'AssetDepreciationOptionDepreciationTypeLinear', '1' => 'AssetDepreciationOptionDepreciationTypeDegressive', '2' => 'AssetDepreciationOptionDepreciationTypeExceptional'), 'validate' => '1',), |
99 | - 'degressive_coefficient' => array('type' => 'double(24,8)', 'label' => 'AssetDepreciationOptionDegressiveRate', 'enabled' => '1', 'position' => 20, 'notnull' => 1, 'visible' => 1, 'default' => '0', 'isameasure' => '1', 'validate' => '1','enabled_field' => 'accelerated_depreciation:depreciation_type:1'), |
|
99 | + 'degressive_coefficient' => array('type' => 'double(24,8)', 'label' => 'AssetDepreciationOptionDegressiveRate', 'enabled' => '1', 'position' => 20, 'notnull' => 1, 'visible' => 1, 'default' => '0', 'isameasure' => '1', 'validate' => '1', 'enabled_field' => 'accelerated_depreciation:depreciation_type:1'), |
|
100 | 100 | 'duration' => array('type' => 'integer', 'label' => 'AssetDepreciationOptionDuration', 'enabled' => '1', 'position' => 30, 'notnull' => 1, 'visible' => 1, 'default' => '0', 'isameasure' => '1', 'validate' => '1',), |
101 | 101 | 'duration_type' => array('type' => 'smallint', 'label' => 'AssetDepreciationOptionDurationType', 'enabled' => '1', 'position' => 40, 'notnull' => 1, 'visible' => 1, 'default' => '0', 'arrayofkeyval' => array('0' => 'AssetDepreciationOptionDurationTypeAnnual', '1' => 'AssetDepreciationOptionDurationTypeMonthly'/*, '2'=>'AssetDepreciationOptionDurationTypeDaily'*/), 'validate' => '1',), |
102 | 102 | 'rate' => array('type' => 'double(24,8)', 'label' => 'AssetDepreciationOptionRate', 'enabled' => '1', 'position' => 50, 'visible' => 3, 'default' => '0', 'isameasure' => '1', 'validate' => '1', 'computed' => '$object->asset_depreciation_options->getRate("accelerated_depreciation")',), |
@@ -63,8 +63,8 @@ |
||
63 | 63 | */ |
64 | 64 | public $picto = 'asset'; |
65 | 65 | |
66 | - const STATUS_DRAFT = 0; // In progress |
|
67 | - const STATUS_DISPOSED = 9; // Disposed |
|
66 | + const STATUS_DRAFT = 0; // In progress |
|
67 | + const STATUS_DISPOSED = 9; // Disposed |
|
68 | 68 | |
69 | 69 | /** |
70 | 70 | * 'type' field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter[:Sortfield]]]', 'sellist:TableName:LabelFieldName[:KeyFieldName[:KeyFieldParent[:Filter[:Sortfield]]]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'text:none', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password') |
@@ -48,7 +48,7 @@ |
||
48 | 48 | 'receivable_on_assignment' => array('label' => 'AssetAccountancyCodeReceivableOnAssignment'), |
49 | 49 | 'proceeds_from_sales' => array('label' => 'AssetAccountancyCodeProceedsFromSales'), |
50 | 50 | 'vat_collected' => array('label' => 'AssetAccountancyCodeVatCollected'), |
51 | - 'vat_deductible' => array('label' => 'AssetAccountancyCodeVatDeductible','column_break' => true), |
|
51 | + 'vat_deductible' => array('label' => 'AssetAccountancyCodeVatDeductible', 'column_break' => true), |
|
52 | 52 | ), |
53 | 53 | ), |
54 | 54 | 'accelerated_depreciation' => array( |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | // Parameters |
36 | 36 | $action = GETPOST('action', 'aZ09'); |
37 | 37 | $backtopage = GETPOST('backtopage', 'alpha'); |
38 | -$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
38 | +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
39 | 39 | |
40 | 40 | if (empty($action)) { |
41 | 41 | $action = 'edit'; |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | //'gemini' => 'Gemini' |
72 | 72 | ); |
73 | 73 | |
74 | -$item = $formSetup->newItem('AI_API_SERVICE'); // Name of constant must end with _KEY so it is encrypted when saved into database. |
|
74 | +$item = $formSetup->newItem('AI_API_SERVICE'); // Name of constant must end with _KEY so it is encrypted when saved into database. |
|
75 | 75 | $item->setAsSelect($arrayofia); |
76 | 76 | $item->cssClass = 'minwidth150'; |
77 | 77 | |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $item->defaultFieldValue = ''; |
82 | 82 | $item->cssClass = 'minwidth500';*/ |
83 | 83 | |
84 | - $item = $formSetup->newItem('AI_API_' . strtoupper($ia) . '_KEY')->setAsSecureKey(); // Name of constant must end with _KEY so it is encrypted when saved into database. |
|
84 | + $item = $formSetup->newItem('AI_API_' . strtoupper($ia) . '_KEY')->setAsSecureKey(); // Name of constant must end with _KEY so it is encrypted when saved into database. |
|
85 | 85 | $item->nameText = $langs->trans("AI_API_KEY") . ' (' . $ialabel . ')'; |
86 | 86 | $item->defaultFieldValue = ''; |
87 | 87 | $item->fieldParams['hideGenerateButton'] = 1; |
@@ -34,7 +34,7 @@ |
||
34 | 34 | // Parameters |
35 | 35 | $action = GETPOST('action', 'aZ09'); |
36 | 36 | $backtopage = GETPOST('backtopage', 'alpha'); |
37 | -$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
37 | +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
38 | 38 | |
39 | 39 | if (empty($action)) { |
40 | 40 | $action = 'edit'; |