diff --git a/htdocs/projet/contact.php b/htdocs/projet/contact.php index 68c9b530c88..4b9aaf58b8b 100644 --- a/htdocs/projet/contact.php +++ b/htdocs/projet/contact.php @@ -240,6 +240,14 @@ if ($id > 0 || ! empty($ref)) print nl2br($object->description); print ''; + // Bill time + if (! empty($conf->global->PROJECT_BILL_TIME_SPENT)) + { + print ''.$langs->trans("BillTime").''; + print yn($object->bill_time); + print ''; + } + // Categories if ($conf->categorie->enabled) { print ''.$langs->trans("Categories").''; diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index e0ecf9d6051..7c44fb9850b 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -217,6 +217,14 @@ print ''.$langs->trans("Description").''; print nl2br($object->description); print ''; +// Bill time +if (! empty($conf->global->PROJECT_BILL_TIME_SPENT)) +{ + print ''.$langs->trans("BillTime").''; + print yn($object->bill_time); + print ''; +} + // Categories if($conf->categorie->enabled) { print ''.$langs->trans("Categories").''; @@ -686,8 +694,8 @@ foreach ($listofreferent as $key => $value) // and the final balance print ''; print ''.$langs->trans("Profit").''; -print ''.price($balance_ht).''; -print ''.price($balance_ttc).''; +print ''.price(price2num($balance_ht, 'MT')).''; +print ''.price(price2num($balance_ttc, 'MT')).''; print ''; print ""; diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index d9fcc8b642a..47c88885bc4 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -91,13 +91,14 @@ $planned_workload=$planned_workloadhour*3600+$planned_workloadmin*60; $userAccess=0; -$parameters=array('id'=>$id); -$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); /* * Actions */ +$parameters=array('id'=>$id); +$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + // Purge search criteria if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All tests are required to be compatible with all browsers { @@ -404,6 +405,14 @@ if ($id > 0 || ! empty($ref)) print nl2br($object->description); print ''; + // Bill time + if (! empty($conf->global->PROJECT_BILL_TIME_SPENT)) + { + print ''.$langs->trans("BillTime").''; + print yn($object->bill_time); + print ''; + } + // Categories if($conf->categorie->enabled) { print ''.$langs->trans("Categories").''; diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index bcfc7bde557..7ff93c7b4da 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -399,13 +399,16 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) print nl2br($projectstatic->description); print ''; - // Bill time ? - print ''.$langs->trans("BillTime").''; - print yn($projectstatic->bill_time); - print ''; + // Bill time + if (! empty($conf->global->PROJECT_BILL_TIME_SPENT)) + { + print ''.$langs->trans("BillTime").''; + print yn($projectstatic->bill_time); + print ''; + } // Categories - if($conf->categorie->enabled) { + if ($conf->categorie->enabled) { print ''.$langs->trans("Categories").''; print $form->showCategories($projectstatic->id,'project',1); print ""; diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index e20e37e5cdc..5935a1d01a1 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -304,13 +304,13 @@ if (empty($reshook)) if (GETPOST('getcustomercode')) { // We defined value code_client - $_POST["code_client"]="Acompleter"; + $_POST["customer_code"]="Acompleter"; } if (GETPOST('getsuppliercode')) { // We defined value code_fournisseur - $_POST["code_fournisseur"]="Acompleter"; + $_POST["supplier_code"]="Acompleter"; } if($action=='set_localtax1') @@ -417,8 +417,8 @@ if (empty($reshook)) $object->idprof5 = trim(GETPOST('idprof5', 'alpha')); $object->idprof6 = trim(GETPOST('idprof6', 'alpha')); $object->prefix_comm = GETPOST('prefix_comm', 'alpha'); - $object->code_client = GETPOST('code_client', 'alpha'); - $object->code_fournisseur = GETPOST('code_fournisseur', 'alpha'); + $object->code_client = GETPOST('customer_code', 'alpha'); + $object->code_fournisseur = GETPOST('supplier_code', 'alpha'); $object->capital = GETPOST('capital', 'alpha'); $object->barcode = GETPOST('barcode', 'alpha'); @@ -947,14 +947,14 @@ else $object->client = GETPOST('client')?GETPOST('client'):$object->client; if(empty($duplicate_code_error)) { - $object->code_client = GETPOST('code_client', 'alpha'); + $object->code_client = GETPOST('customer_code', 'alpha'); $object->fournisseur = GETPOST('fournisseur')?GETPOST('fournisseur'):$object->fournisseur; } else { setEventMessages($langs->trans('NewCustomerSupplierCodeProposed'),'', 'warnings'); } - $object->code_fournisseur = GETPOST('code_fournisseur', 'alpha'); + $object->code_fournisseur = GETPOST('supplier_code', 'alpha'); $object->address = GETPOST('address', 'alpha'); $object->zip = GETPOST('zipcode', 'alpha'); $object->town = GETPOST('town', 'alpha'); @@ -1190,7 +1190,7 @@ else print '
'; $tmpcode=$object->code_client; if (empty($tmpcode) && ! empty($modCodeClient->code_auto)) $tmpcode=$modCodeClient->getNextValue($object,0); - print ''; + print ''; print ''; $s=$modCodeClient->getToolTip($langs,$object,0); print $form->textwithpicto('',$s,1); @@ -1218,7 +1218,7 @@ else print '
'; $tmpcode=$object->code_fournisseur; if (empty($tmpcode) && ! empty($modCodeFournisseur->code_auto)) $tmpcode=$modCodeFournisseur->getNextValue($object,1); - print ''; + print ''; print ''; $s=$modCodeFournisseur->getToolTip($langs,$object,1); print $form->textwithpicto('',$s,1); @@ -1570,9 +1570,9 @@ else $object->name = GETPOST('name', 'alpha'); $object->prefix_comm = GETPOST('prefix_comm', 'alpha'); $object->client = GETPOST('client', 'int'); - $object->code_client = GETPOST('code_client', 'alpha'); + $object->code_client = GETPOST('customer_code', 'alpha'); $object->fournisseur = GETPOST('fournisseur', 'int'); - $object->code_fournisseur = GETPOST('code_fournisseur', 'alpha'); + $object->code_fournisseur = GETPOST('supplier_code', 'alpha'); $object->address = GETPOST('address', 'alpha'); $object->zip = GETPOST('zipcode', 'alpha'); $object->town = GETPOST('town', 'alpha'); @@ -1776,16 +1776,16 @@ else $tmpcode=$object->code_client; if (empty($tmpcode) && ! empty($object->oldcopy->code_client)) $tmpcode=$object->oldcopy->code_client; // When there is an error to update a thirdparty, the number for supplier and customer code is kept to old value. if (empty($tmpcode) && ! empty($modCodeClient->code_auto)) $tmpcode=$modCodeClient->getNextValue($object,0); - print ''; + print ''; } else if ($object->codeclient_modifiable()) { - print ''; + print ''; } else { print $object->code_client; - print ''; + print ''; } print ''; $s=$modCodeClient->getToolTip($langs,$object,0); @@ -1816,16 +1816,16 @@ else $tmpcode=$object->code_fournisseur; if (empty($tmpcode) && ! empty($object->oldcopy->code_fournisseur)) $tmpcode=$object->oldcopy->code_fournisseur; // When there is an error to update a thirdparty, the number for supplier and customer code is kept to old value. if (empty($tmpcode) && ! empty($modCodeFournisseur->code_auto)) $tmpcode=$modCodeFournisseur->getNextValue($object,1); - print ''; + print ''; } else if ($object->codefournisseur_modifiable()) { - print ''; + print ''; } else { print $object->code_fournisseur; - print ''; + print ''; } print ''; $s=$modCodeFournisseur->getToolTip($langs,$object,1);