2
0
forked from Wavyzz/dolibarr

Added status change on progress update. Updated task status & labels. Added status to update method.

This commit is contained in:
William Mead
2024-12-18 15:45:57 +01:00
parent dd9d459550
commit 9bb3345c7b
2 changed files with 18 additions and 4 deletions

View File

@@ -128,6 +128,11 @@ if ($action == 'update' && !GETPOST("cancel") && $user->hasRight('projet', 'cree
$object->progress = price2num(GETPOST('progress', 'alphanohtml'));
$object->budget_amount = GETPOSTFLOAT('budget_amount');
$object->billable = (GETPOST('billable', 'aZ') == 'yes' ? 1 : 0);
if (GETPOST('progress') == '100') {
$object->status = $object::STATUS_CLOSED;
} elseif (GETPOST('progress') != '0') {
$object->status = $object::STATUS_VALIDATED;
}
// Fill array 'array_options' with data from add form
$ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');