Merge remote-tracking branch 'origin/3.4' into develop
Conflicts: ChangeLog htdocs/commande/fiche.php htdocs/core/class/extrafields.class.php htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php
This commit is contained in:
commit
67820774bb
30
ChangeLog
30
ChangeLog
@ -2,7 +2,7 @@
|
|||||||
English Dolibarr ChangeLog
|
English Dolibarr ChangeLog
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
|
|
||||||
***** ChangeLog for 3.5 compared to 3.4 *****
|
***** ChangeLog for 3.5 compared to 3.4.* *****
|
||||||
For users:
|
For users:
|
||||||
- New: [ task #862 ] Add ODT on shipments
|
- New: [ task #862 ] Add ODT on shipments
|
||||||
- New: [ task #149 ] Add # of notes and attachments in tabs
|
- New: [ task #149 ] Add # of notes and attachments in tabs
|
||||||
@ -78,7 +78,7 @@ this was not a good pratice, since object->id is already known so no need to pro
|
|||||||
parameter. All methods addline in this case were modified to remove this information.
|
parameter. All methods addline in this case were modified to remove this information.
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 3.4 compared to 3.3.2 *****
|
***** ChangeLog for 3.4 compared to 3.3.* *****
|
||||||
For users:
|
For users:
|
||||||
- New: Can use ODS templates as document templates.
|
- New: Can use ODS templates as document templates.
|
||||||
- New: Add link to autofill/reset with quantity to ship when creating a
|
- New: Add link to autofill/reset with quantity to ship when creating a
|
||||||
@ -168,6 +168,8 @@ WARNING: If you used external modules, some of them may need to be upgraded due
|
|||||||
function to keep same behaviour.
|
function to keep same behaviour.
|
||||||
|
|
||||||
|
|
||||||
|
***** ChangeLog for 3.3.4 compared to 3.3.3 *****
|
||||||
|
- Fix: [ bug #1001 ] Social Contribution : State not correct
|
||||||
|
|
||||||
***** ChangeLog for 3.3.3 compared to 3.3.2 *****
|
***** ChangeLog for 3.3.3 compared to 3.3.2 *****
|
||||||
- Fix: [ bug #903 ] Fatal error: Call to undefined function dol_get_first_day() in htdocs/commande/liste.php
|
- Fix: [ bug #903 ] Fatal error: Call to undefined function dol_get_first_day() in htdocs/commande/liste.php
|
||||||
@ -212,7 +214,7 @@ WARNING: If you used external modules, some of them may need to be upgraded due
|
|||||||
- Fix: [ bug #762 ] Bad profit calculation in Reporting
|
- Fix: [ bug #762 ] Bad profit calculation in Reporting
|
||||||
- Fix: bug dictionnary with wrong prefix table
|
- Fix: bug dictionnary with wrong prefix table
|
||||||
|
|
||||||
***** ChangeLog for 3.3 compared to 3.2.3 *****
|
***** ChangeLog for 3.3 compared to 3.2.* *****
|
||||||
For users:
|
For users:
|
||||||
- New: Add holiday module, to declare and follow holidays of your employees.
|
- New: Add holiday module, to declare and follow holidays of your employees.
|
||||||
- New: Add margin management module.
|
- New: Add margin management module.
|
||||||
@ -390,7 +392,7 @@ Dolibarr license has also been updated from GPLv2+ to GPLv3+.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 3.2.0 compared to 3.1.3 *****
|
***** ChangeLog for 3.2.0 compared to 3.1.* *****
|
||||||
WARNING: PHP lower than 5.x are no more supported.
|
WARNING: PHP lower than 5.x are no more supported.
|
||||||
WARNING: Because of a major datastructure change onto supplier prices tables, be aware
|
WARNING: Because of a major datastructure change onto supplier prices tables, be aware
|
||||||
to make a backup of your database before making upgrade.
|
to make a backup of your database before making upgrade.
|
||||||
@ -631,7 +633,7 @@ For translators:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 3.0 compared to 2.9 *****
|
***** ChangeLog for 3.0 compared to 2.9.* *****
|
||||||
|
|
||||||
For users:
|
For users:
|
||||||
- New: Can edit date of cheque receipts.
|
- New: Can edit date of cheque receipts.
|
||||||
@ -727,7 +729,7 @@ For developers:
|
|||||||
- Qual: Removed deprecated code.
|
- Qual: Removed deprecated code.
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 2.9 compared to 2.8 *****
|
***** ChangeLog for 2.9 compared to 2.8.* *****
|
||||||
|
|
||||||
For users:
|
For users:
|
||||||
- New: POS module allow to choose which warehouse to use.
|
- New: POS module allow to choose which warehouse to use.
|
||||||
@ -845,7 +847,7 @@ For users:
|
|||||||
- Fix: bug #29526 : Numérotation Proposition Incorrecte après duplication
|
- Fix: bug #29526 : Numérotation Proposition Incorrecte après duplication
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 2.8 compared to 2.7 *****
|
***** ChangeLog for 2.8 compared to 2.7.* *****
|
||||||
|
|
||||||
For users:
|
For users:
|
||||||
- New: Support note on trips module
|
- New: Support note on trips module
|
||||||
@ -909,7 +911,7 @@ For users:
|
|||||||
- Fix: Update member photo.
|
- Fix: Update member photo.
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 2.7 compared to 2.6 *****
|
***** ChangeLog for 2.7 compared to 2.6.* *****
|
||||||
|
|
||||||
For users:
|
For users:
|
||||||
- New: Add a print icon to show a page to print without menus.
|
- New: Add a print icon to show a page to print without menus.
|
||||||
@ -1008,7 +1010,7 @@ For developers:
|
|||||||
- All install files are now in same directory /install.
|
- All install files are now in same directory /install.
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 2.6 compared to 2.5 *****
|
***** ChangeLog for 2.6 compared to 2.5.* *****
|
||||||
|
|
||||||
For users:
|
For users:
|
||||||
- New: Add filter on status in emailing selector for Dolibarr users.
|
- New: Add filter on status in emailing selector for Dolibarr users.
|
||||||
@ -1091,7 +1093,7 @@ For developers:
|
|||||||
- First change for future geoip module.
|
- First change for future geoip module.
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 2.5 compared to 2.4 *****
|
***** ChangeLog for 2.5 compared to 2.4.* *****
|
||||||
|
|
||||||
For users:
|
For users:
|
||||||
- Sessions timeout can be configured to overwrite PHP setup.
|
- Sessions timeout can be configured to overwrite PHP setup.
|
||||||
@ -1155,7 +1157,7 @@ For developers:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 2.4 compared to 2.2 *****
|
***** ChangeLog for 2.4 compared to 2.2.* *****
|
||||||
|
|
||||||
For users:
|
For users:
|
||||||
- Add a calendar module (module agenda) with ical/vcal/rss export.
|
- Add a calendar module (module agenda) with ical/vcal/rss export.
|
||||||
@ -1210,7 +1212,7 @@ For developers:
|
|||||||
Windows with Apache and Mysql included.
|
Windows with Apache and Mysql included.
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 2.2 compared to 2.1 *****
|
***** ChangeLog for 2.2 compared to 2.1.* *****
|
||||||
|
|
||||||
- Add more statistics on main page.
|
- Add more statistics on main page.
|
||||||
- Add option to add message on login page.
|
- Add option to add message on login page.
|
||||||
@ -1244,7 +1246,7 @@ For developers:
|
|||||||
- Can drag and drop boxes on main page.
|
- Can drag and drop boxes on main page.
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 2.1 compared to 2.0.1 *****
|
***** ChangeLog for 2.1 compared to 2.0.* *****
|
||||||
|
|
||||||
- Added a better installer.
|
- Added a better installer.
|
||||||
- Support user and groups permissions.
|
- Support user and groups permissions.
|
||||||
@ -1315,7 +1317,7 @@ Minor bug fixes
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 2.0 compared to 1.0 *****
|
***** ChangeLog for 2.0 compared to 1.0.* *****
|
||||||
|
|
||||||
ChangeLog file size is so important, that it is not included inside Dolibarr
|
ChangeLog file size is so important, that it is not included inside Dolibarr
|
||||||
package. You can find it at www.dolibarr.org
|
package. You can find it at www.dolibarr.org
|
||||||
|
|||||||
@ -914,7 +914,7 @@ else
|
|||||||
|
|
||||||
// Login Dolibarr
|
// Login Dolibarr
|
||||||
print '<tr><td>'.$langs->trans("LinkedToDolibarrUser").'</td><td class="valeur">';
|
print '<tr><td>'.$langs->trans("LinkedToDolibarrUser").'</td><td class="valeur">';
|
||||||
print $form->select_users($object->user_id,'userid',1);
|
print $form->select_dolusers($object->user_id,'userid',1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@ -155,7 +155,7 @@ $filter='s.client in (1,2,3)';
|
|||||||
print $form->select_company($id,'memberid',$filter,1);
|
print $form->select_company($id,'memberid',$filter,1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
print '<tr><td>'.$langs->trans("User").'</td><td>';
|
print '<tr><td>'.$langs->trans("User").'</td><td>';
|
||||||
print $form->select_users($userid,'userid',1);
|
print $form->select_dolusers($userid,'userid',1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
print '<tr><td align="center" colspan="2"><input type="submit" name="submit" class="button" value="'.$langs->trans("Refresh").'"></td></tr>';
|
print '<tr><td align="center" colspan="2"><input type="submit" name="submit" class="button" value="'.$langs->trans("Refresh").'"></td></tr>';
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|||||||
@ -142,7 +142,7 @@ print "</tr>";
|
|||||||
print '<tr class="impair"><td>'.$langs->trans("ResponsibleUser").'</td>';
|
print '<tr class="impair"><td>'.$langs->trans("ResponsibleUser").'</td>';
|
||||||
print '<td align="left">';
|
print '<td align="left">';
|
||||||
print '<input type="hidden" name="nom0" value="PRELEVEMENT_USER">';
|
print '<input type="hidden" name="nom0" value="PRELEVEMENT_USER">';
|
||||||
print $form->select_users($conf->global->PRELEVEMENT_USER,'value0',1);
|
print $form->select_dolusers($conf->global->PRELEVEMENT_USER,'value0',1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
|||||||
@ -344,9 +344,14 @@ else if ($action == 'add' && $user->rights->propal->creer)
|
|||||||
|
|
||||||
// Fill array 'array_options' with data from add form
|
// Fill array 'array_options' with data from add form
|
||||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
||||||
|
if($ret < 0) {
|
||||||
$id = $object->create($user);
|
$error++;
|
||||||
|
$action = 'create';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!$error) {
|
||||||
|
$id = $object->create($user);
|
||||||
|
|
||||||
if ($id > 0)
|
if ($id > 0)
|
||||||
{
|
{
|
||||||
@ -395,6 +400,7 @@ else if ($action == 'add' && $user->rights->propal->creer)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Classify billed
|
// Classify billed
|
||||||
else if ($action == 'classifybilled' && $user->rights->propal->cloturer)
|
else if ($action == 'classifybilled' && $user->rights->propal->cloturer)
|
||||||
@ -1150,6 +1156,12 @@ else if ($action == 'update_extras')
|
|||||||
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
|
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
|
||||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
||||||
|
|
||||||
|
if($ret < 0) {
|
||||||
|
$error++;
|
||||||
|
$action = 'edit_extras';
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!$error) {
|
||||||
// Actions on extra fields (by external module or standard code)
|
// Actions on extra fields (by external module or standard code)
|
||||||
// FIXME le hook fait double emploi avec le trigger !!
|
// FIXME le hook fait double emploi avec le trigger !!
|
||||||
$hookmanager->initHooks(array('propaldao'));
|
$hookmanager->initHooks(array('propaldao'));
|
||||||
@ -1167,7 +1179,7 @@ else if ($action == 'update_extras')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ($reshook < 0) $error++;
|
else if ($reshook < 0) $error++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->propal->creer)
|
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->propal->creer)
|
||||||
|
|||||||
@ -235,7 +235,7 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
// User
|
// User
|
||||||
print '<tr><td align="left">'.$langs->trans("CreatedBy").'</td><td align="left">';
|
print '<tr><td align="left">'.$langs->trans("CreatedBy").'</td><td align="left">';
|
||||||
print $form->select_users($userid,'userid',1);
|
print $form->select_dolusers($userid,'userid',1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
// Year
|
// Year
|
||||||
print '<tr><td align="left">'.$langs->trans("Year").'</td><td align="left">';
|
print '<tr><td align="left">'.$langs->trans("Year").'</td><td align="left">';
|
||||||
|
|||||||
@ -274,7 +274,10 @@ else if ($action == 'add' && $user->rights->commande->creer)
|
|||||||
|
|
||||||
// Fill array 'array_options' with data from add form
|
// Fill array 'array_options' with data from add form
|
||||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
||||||
|
if($ret < 0)
|
||||||
|
$error++;
|
||||||
|
|
||||||
|
if(!$error) {
|
||||||
$object_id = $object->create($user);
|
$object_id = $object->create($user);
|
||||||
|
|
||||||
if ($object_id > 0)
|
if ($object_id > 0)
|
||||||
@ -376,10 +379,19 @@ else if ($action == 'add' && $user->rights->commande->creer)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
// Required extrafield left blank, error message already defined by setOptionalsFromPost()
|
||||||
|
$action='create';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
// Fill array 'array_options' with data from add form
|
// Fill array 'array_options' with data from add form
|
||||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
||||||
|
if($ret < 0)
|
||||||
|
$error++;
|
||||||
|
|
||||||
|
if(!$error) {
|
||||||
$object_id = $object->create($user);
|
$object_id = $object->create($user);
|
||||||
|
|
||||||
// If some invoice's lines already known
|
// If some invoice's lines already known
|
||||||
@ -395,6 +407,7 @@ else if ($action == 'add' && $user->rights->commande->creer)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Insert default contacts if defined
|
// Insert default contacts if defined
|
||||||
if ($object_id > 0)
|
if ($object_id > 0)
|
||||||
@ -1167,6 +1180,10 @@ else if ($action == 'update_extras')
|
|||||||
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
|
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
|
||||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
||||||
|
|
||||||
|
if($ret < 0)
|
||||||
|
$error++;
|
||||||
|
|
||||||
|
if(!$error) {
|
||||||
// Actions on extra fields (by external module or standard code)
|
// Actions on extra fields (by external module or standard code)
|
||||||
// FIXME le hook fait double emploi avec le trigger !!
|
// FIXME le hook fait double emploi avec le trigger !!
|
||||||
$hookmanager->initHooks(array('orderdao'));
|
$hookmanager->initHooks(array('orderdao'));
|
||||||
@ -1184,6 +1201,11 @@ else if ($action == 'update_extras')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ($reshook < 0) $error++;
|
else if ($reshook < 0) $error++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$action = 'edit_extras';
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1372,7 +1394,7 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->commande->creer)
|
if (! $error && ! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->commande->creer)
|
||||||
{
|
{
|
||||||
if ($action == 'addcontact')
|
if ($action == 'addcontact')
|
||||||
{
|
{
|
||||||
|
|||||||
@ -257,7 +257,7 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
// User
|
// User
|
||||||
print '<tr><td align="left">'.$langs->trans("CreatedBy").'</td><td align="left">';
|
print '<tr><td align="left">'.$langs->trans("CreatedBy").'</td><td align="left">';
|
||||||
print $form->select_users($userid,'userid',1);
|
print $form->select_dolusers($userid,'userid',1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
// Year
|
// Year
|
||||||
print '<tr><td align="left">'.$langs->trans("Year").'</td><td align="left">';
|
print '<tr><td align="left">'.$langs->trans("Year").'</td><td align="left">';
|
||||||
|
|||||||
@ -280,7 +280,7 @@ if ($action == 'create')
|
|||||||
|
|
||||||
print "<tr>";
|
print "<tr>";
|
||||||
print '<td class="fieldrequired">'.$langs->trans("Person").'</td><td>';
|
print '<td class="fieldrequired">'.$langs->trans("Person").'</td><td>';
|
||||||
print $form->select_users(GETPOST('fk_user','int'),'fk_user',1);
|
print $form->select_dolusers(GETPOST('fk_user','int'),'fk_user',1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print "<tr>";
|
print "<tr>";
|
||||||
@ -375,7 +375,7 @@ else if ($id)
|
|||||||
// Who
|
// Who
|
||||||
print "<tr>";
|
print "<tr>";
|
||||||
print '<td class="fieldrequired">'.$langs->trans("Person").'</td><td>';
|
print '<td class="fieldrequired">'.$langs->trans("Person").'</td><td>';
|
||||||
print $form->select_users(GETPOST('fk_user','int')?GETPOST('fk_user','int'):$object->fk_user,'fk_user',0);
|
print $form->select_dolusers(GETPOST('fk_user','int')?GETPOST('fk_user','int'):$object->fk_user,'fk_user',0);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Date
|
// Date
|
||||||
|
|||||||
@ -220,7 +220,7 @@ print $form->select_company($socid,'socid',$filter,1,1);
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
// User
|
// User
|
||||||
print '<tr><td>'.$langs->trans("User").'/'.$langs->trans("SalesRepresentative").'</td><td>';
|
print '<tr><td>'.$langs->trans("User").'/'.$langs->trans("SalesRepresentative").'</td><td>';
|
||||||
print $form->select_users($userid,'userid',1);
|
print $form->select_dolusers($userid,'userid',1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
// Year
|
// Year
|
||||||
print '<tr><td>'.$langs->trans("Year").'</td><td>';
|
print '<tr><td>'.$langs->trans("Year").'</td><td>';
|
||||||
|
|||||||
@ -661,7 +661,8 @@ else if ($action == 'add' && $user->rights->facture->creer)
|
|||||||
// Fill array 'array_options' with data from add form
|
// Fill array 'array_options' with data from add form
|
||||||
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
|
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
|
||||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
||||||
|
if($ret < 0)
|
||||||
|
$error++;
|
||||||
|
|
||||||
// Replacement invoice
|
// Replacement invoice
|
||||||
if ($_POST['type'] == 1)
|
if ($_POST['type'] == 1)
|
||||||
@ -1906,7 +1907,10 @@ if ($action == 'update_extras')
|
|||||||
// Fill array 'array_options' with data from add form
|
// Fill array 'array_options' with data from add form
|
||||||
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
|
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
|
||||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
||||||
|
if($ret < 0)
|
||||||
|
$error++;
|
||||||
|
|
||||||
|
if(!$error) {
|
||||||
// Actions on extra fields (by external module or standard code)
|
// Actions on extra fields (by external module or standard code)
|
||||||
// FIXME le hook fait double emploi avec le trigger !!
|
// FIXME le hook fait double emploi avec le trigger !!
|
||||||
$hookmanager->initHooks(array('invoicedao'));
|
$hookmanager->initHooks(array('invoicedao'));
|
||||||
@ -1924,6 +1928,11 @@ if ($action == 'update_extras')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ($reshook < 0) $error++;
|
else if ($reshook < 0) $error++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$action = 'edit_extras';
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -235,7 +235,7 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
// User
|
// User
|
||||||
print '<tr><td>'.$langs->trans("CreatedBy").'</td><td>';
|
print '<tr><td>'.$langs->trans("CreatedBy").'</td><td>';
|
||||||
print $form->select_users($userid,'userid',1);
|
print $form->select_dolusers($userid,'userid',1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
// Year
|
// Year
|
||||||
print '<tr><td>'.$langs->trans("Year").'</td><td>';
|
print '<tr><td>'.$langs->trans("Year").'</td><td>';
|
||||||
|
|||||||
@ -262,7 +262,7 @@ if ($resql)
|
|||||||
// Expected to pay
|
// Expected to pay
|
||||||
print '<td align="right">'.price($objp->sc_amount).'</td>';
|
print '<td align="right">'.price($objp->sc_amount).'</td>';
|
||||||
// Status
|
// Status
|
||||||
print '<td align="center">'.$socialcontrib->LibStatut($objp->fk_statut,2).'</td>';
|
print '<td align="center">'.$socialcontrib->getLibStatut(4).'</td>';
|
||||||
// Amount payed
|
// Amount payed
|
||||||
print '<td align="right">'.price($objp->amount).'</td>';
|
print '<td align="right">'.price($objp->amount).'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|||||||
@ -850,12 +850,12 @@ if ($action == 'create')
|
|||||||
|
|
||||||
// Commercial suivi
|
// Commercial suivi
|
||||||
print '<tr><td width="20%" nowrap><span class="fieldrequired">'.$langs->trans("TypeContact_contrat_internal_SALESREPFOLL").'</span></td><td>';
|
print '<tr><td width="20%" nowrap><span class="fieldrequired">'.$langs->trans("TypeContact_contrat_internal_SALESREPFOLL").'</span></td><td>';
|
||||||
print $form->select_users(GETPOST("commercial_suivi_id")?GETPOST("commercial_suivi_id"):$user->id,'commercial_suivi_id',1,'');
|
print $form->select_dolusers(GETPOST("commercial_suivi_id")?GETPOST("commercial_suivi_id"):$user->id,'commercial_suivi_id',1,'');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Commercial signature
|
// Commercial signature
|
||||||
print '<tr><td width="20%" nowrap><span class="fieldrequired">'.$langs->trans("TypeContact_contrat_internal_SALESREPSIGN").'</span></td><td>';
|
print '<tr><td width="20%" nowrap><span class="fieldrequired">'.$langs->trans("TypeContact_contrat_internal_SALESREPSIGN").'</span></td><td>';
|
||||||
print $form->select_users(GETPOST("commercial_signature_id")?GETPOST("commercial_signature_id"):$user->id,'commercial_signature_id',1,'');
|
print $form->select_dolusers(GETPOST("commercial_signature_id")?GETPOST("commercial_signature_id"):$user->id,'commercial_signature_id',1,'');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td><span class="fieldrequired">'.$langs->trans("Date").'</span></td><td>';
|
print '<tr><td><span class="fieldrequired">'.$langs->trans("Date").'</span></td><td>';
|
||||||
|
|||||||
@ -2254,6 +2254,10 @@ abstract class CommonObject
|
|||||||
{
|
{
|
||||||
$value = isset($_POST["options_".$key])?dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]):$this->db->jdate($this->array_options['options_'.$key]);
|
$value = isset($_POST["options_".$key])?dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]):$this->db->jdate($this->array_options['options_'.$key]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($extrafields->attribute_required[$key])
|
||||||
|
$label = '<span class="fieldrequired">'.$label.'</span>';
|
||||||
|
|
||||||
$out .= '<td>'.$label.'</td>';
|
$out .= '<td>'.$label.'</td>';
|
||||||
$out .='<td colspan="'.$colspan.'">';
|
$out .='<td colspan="'.$colspan.'">';
|
||||||
|
|
||||||
|
|||||||
@ -683,7 +683,9 @@ class ExtraFields
|
|||||||
}
|
}
|
||||||
elseif ($type == 'sellist')
|
elseif ($type == 'sellist')
|
||||||
{
|
{
|
||||||
|
|
||||||
$out='<select class="flat" name="options_'.$key.'">';
|
$out='<select class="flat" name="options_'.$key.'">';
|
||||||
|
if (is_array($param['options'])) {
|
||||||
$param_list=array_keys($param['options']);
|
$param_list=array_keys($param['options']);
|
||||||
$InfoFieldList = explode(":", $param_list[0]);
|
$InfoFieldList = explode(":", $param_list[0]);
|
||||||
|
|
||||||
@ -726,8 +728,6 @@ class ExtraFields
|
|||||||
$num = $this->db->num_rows($resql);
|
$num = $this->db->num_rows($resql);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
if ($num)
|
if ($num)
|
||||||
{
|
|
||||||
while ($i < $num)
|
|
||||||
{
|
{
|
||||||
$labeltoshow='';
|
$labeltoshow='';
|
||||||
$obj = $this->db->fetch_object($resql);
|
$obj = $this->db->fetch_object($resql);
|
||||||
@ -785,9 +785,9 @@ class ExtraFields
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
$this->db->free();
|
$this->db->free();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$out.='</select>';
|
$out.='</select>';
|
||||||
}
|
}
|
||||||
elseif ($type == 'checkbox')
|
elseif ($type == 'checkbox')
|
||||||
@ -993,7 +993,9 @@ class ExtraFields
|
|||||||
*/
|
*/
|
||||||
function setOptionalsFromPost($extralabels,&$object)
|
function setOptionalsFromPost($extralabels,&$object)
|
||||||
{
|
{
|
||||||
global $_POST;
|
global $_POST, $langs;
|
||||||
|
$nofillrequired='';// For error when required field left blank
|
||||||
|
$error_field_required = array();
|
||||||
|
|
||||||
if (is_array($extralabels))
|
if (is_array($extralabels))
|
||||||
{
|
{
|
||||||
@ -1001,6 +1003,11 @@ class ExtraFields
|
|||||||
foreach ($extralabels as $key => $value)
|
foreach ($extralabels as $key => $value)
|
||||||
{
|
{
|
||||||
$key_type = $this->attribute_type[$key];
|
$key_type = $this->attribute_type[$key];
|
||||||
|
if($this->attribute_required[$key] && !GETPOST("options_$key",2))
|
||||||
|
{
|
||||||
|
$nofillrequired++;
|
||||||
|
$error_field_required[] = $value;
|
||||||
|
}
|
||||||
|
|
||||||
if (in_array($key_type,array('date','datetime')))
|
if (in_array($key_type,array('date','datetime')))
|
||||||
{
|
{
|
||||||
@ -1028,8 +1035,15 @@ class ExtraFields
|
|||||||
$object->array_options["options_".$key]=$value_key;
|
$object->array_options["options_".$key]=$value_key;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($nofillrequired) {
|
||||||
|
$langs->load('errors');
|
||||||
|
setEventMessage($langs->trans('ErrorFieldsRequired').' : '.implode(', ',$error_field_required),'errors');
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
else {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1061,6 +1061,7 @@ class Form
|
|||||||
* @param int $enableonly Array list of users id to be enabled. All other must be disabled
|
* @param int $enableonly Array list of users id to be enabled. All other must be disabled
|
||||||
* @param int $force_entity 0 or Id of environment to force
|
* @param int $force_entity 0 or Id of environment to force
|
||||||
* @return void
|
* @return void
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
function select_users($selected='',$htmlname='userid',$show_empty=0,$exclude='',$disabled=0,$include='',$enableonly='',$force_entity=0)
|
function select_users($selected='',$htmlname='userid',$show_empty=0,$exclude='',$disabled=0,$include='',$enableonly='',$force_entity=0)
|
||||||
{
|
{
|
||||||
@ -1079,9 +1080,10 @@ class Form
|
|||||||
* @param array $enableonly Array list of users id to be enabled. All other must be disabled
|
* @param array $enableonly Array list of users id to be enabled. All other must be disabled
|
||||||
* @param int $force_entity 0 or Id of environment to force
|
* @param int $force_entity 0 or Id of environment to force
|
||||||
* @param int $maxlength Maximum length of string into list (0=no limit)
|
* @param int $maxlength Maximum length of string into list (0=no limit)
|
||||||
|
* @param int $showstatus Show user status into label
|
||||||
* @return string HTML select string
|
* @return string HTML select string
|
||||||
*/
|
*/
|
||||||
function select_dolusers($selected='', $htmlname='userid', $show_empty=0, $exclude='', $disabled=0, $include='', $enableonly='', $force_entity=0, $maxlength=0)
|
function select_dolusers($selected='', $htmlname='userid', $show_empty=0, $exclude='', $disabled=0, $include='', $enableonly='', $force_entity=0, $maxlength=0, $showstatus=0)
|
||||||
{
|
{
|
||||||
global $conf,$user,$langs;
|
global $conf,$user,$langs;
|
||||||
|
|
||||||
@ -1164,13 +1166,10 @@ class Form
|
|||||||
}
|
}
|
||||||
|
|
||||||
$out.= $userstatic->getFullName($langs, 0, 0, $maxlength);
|
$out.= $userstatic->getFullName($langs, 0, 0, $maxlength);
|
||||||
if ($obj->statut == 1)
|
if ($showstatus)
|
||||||
{
|
{
|
||||||
$out.=" (".$langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'),'statut4').")";
|
if ($obj->statut == 1) $out.=" (".$langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'),'statut4').")";
|
||||||
}
|
else $out.=" (".$langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'),'statut5').")";
|
||||||
else
|
|
||||||
{
|
|
||||||
$out.=" (".$langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'),'statut5').")";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($conf->multicompany->enabled) && empty($conf->multicompany->transverse_mode) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
if (! empty($conf->multicompany->enabled) && empty($conf->multicompany->transverse_mode) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
||||||
|
|||||||
@ -347,9 +347,10 @@ class FormOther
|
|||||||
* @param string $selected Preselected value
|
* @param string $selected Preselected value
|
||||||
* @param string $htmlname Name of combo list (example: 'search_sale')
|
* @param string $htmlname Name of combo list (example: 'search_sale')
|
||||||
* @param User $user Object user
|
* @param User $user Object user
|
||||||
|
* @param int $showstatus Show user status into label
|
||||||
* @return string Html combo list code
|
* @return string Html combo list code
|
||||||
*/
|
*/
|
||||||
function select_salesrepresentatives($selected,$htmlname,$user)
|
function select_salesrepresentatives($selected,$htmlname,$user,$showstatus=0)
|
||||||
{
|
{
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
$langs->load('users');
|
$langs->load('users');
|
||||||
@ -385,13 +386,11 @@ class FormOther
|
|||||||
if ($obj_usr->rowid == $selected) $moreforfilter.=' selected="selected"';
|
if ($obj_usr->rowid == $selected) $moreforfilter.=' selected="selected"';
|
||||||
|
|
||||||
$moreforfilter.='>';
|
$moreforfilter.='>';
|
||||||
if ($obj_usr->statut == 1)
|
$moreforfilter.=dolGetFirstLastname($obj_usr->firstname,$obj_usr->name)." (".$obj_usr->login.')';
|
||||||
|
if ($showstatus)
|
||||||
{
|
{
|
||||||
$moreforfilter.=$obj_usr->firstname." ".$obj_usr->name." (".$obj_usr->login.')'." ". img_picto($langs->trans('Enabled'),'statut4').' '.$langs->trans('Enabled');
|
if ($obj_usr->statut == 1) $moreforfilter.=" ". img_picto($langs->trans('Enabled'),'statut4').' '.$langs->trans('Enabled');
|
||||||
}
|
else $moreforfilter.=" ". img_picto($langs->trans('Disabled'),'statut5').' '.$langs->trans('Disabled');
|
||||||
else
|
|
||||||
{
|
|
||||||
$moreforfilter.=$obj_usr->firstname." ".$obj_usr->name." (".$obj_usr->login.')'." ". img_picto($langs->trans('Disabled'),'statut5').' '.$langs->trans('Disabled');
|
|
||||||
}
|
}
|
||||||
$moreforfilter.='</option>';
|
$moreforfilter.='</option>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -787,6 +787,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
$pdf->MultiCell($widthrecbox, 4, $carac_client, 0, 'L');
|
$pdf->MultiCell($widthrecbox, 4, $carac_client, 0, 'L');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$pdf->SetTextColor(0,0,60);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -132,12 +132,12 @@ if ($resql)
|
|||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"cf.ref","","",'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"cf.ref","",$param,'',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","",'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,'',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Author"),$_SERVER["PHP_SELF"],"u.login","","",'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Author"),$_SERVER["PHP_SELF"],"u.login","",$param,'',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("AmountTTC"),$_SERVER["PHP_SELF"],"total_ttc","","",'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("AmountTTC"),$_SERVER["PHP_SELF"],"total_ttc","",$param,$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("OrderDate"),$_SERVER["PHP_SELF"],"dc","","",'align="center"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("OrderDate"),$_SERVER["PHP_SELF"],"dc","",$param,'align="center"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"cf.fk_statut","","",'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"cf.fk_statut","",$param,'align="right"',$sortfield,$sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
|
|||||||
@ -137,7 +137,7 @@ if($cp_events == 1)
|
|||||||
print $langs->trans('MotifCP').' : ';
|
print $langs->trans('MotifCP').' : ';
|
||||||
print $holiday->selectEventCP();
|
print $holiday->selectEventCP();
|
||||||
print ' '.$langs->trans('UserCP').' : ';
|
print ' '.$langs->trans('UserCP').' : ';
|
||||||
print $form->select_users('',"userCP",1,"",0,'');
|
print $form->select_dolusers('',"userCP",1,"",0,'');
|
||||||
print ' <input type="submit" value="'.$langs->trans("addEventToUserCP").'" name="bouton" class="button"/>';
|
print ' <input type="submit" value="'.$langs->trans("addEventToUserCP").'" name="bouton" class="button"/>';
|
||||||
|
|
||||||
print '</form><br>';
|
print '</form><br>';
|
||||||
|
|||||||
@ -299,7 +299,7 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->socie
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("AffectedTo").'</td><td>';
|
print '<tr><td>'.$langs->trans("AffectedTo").'</td><td>';
|
||||||
print $form->select_users($user->id,'userid',1);
|
print $form->select_dolusers($user->id,'userid',1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Date start
|
// Date start
|
||||||
|
|||||||
@ -323,7 +323,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '<td class="nowrap">';
|
print '<td class="nowrap">';
|
||||||
$contactoftask=$object->getListContactId('internal');
|
$contactoftask=$object->getListContactId('internal');
|
||||||
print img_object('','user');
|
print img_object('','user');
|
||||||
print $form->select_users($_POST["userid"]?$_POST["userid"]:$user->id,'userid',0,'',0,'',$contactoftask);
|
print $form->select_dolusers($_POST["userid"]?$_POST["userid"]:$user->id,'userid',0,'',0,'',$contactoftask);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Note
|
// Note
|
||||||
@ -412,7 +412,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '<td>';
|
print '<td>';
|
||||||
if ($_GET['action'] == 'editline' && $_GET['lineid'] == $task_time->rowid)
|
if ($_GET['action'] == 'editline' && $_GET['lineid'] == $task_time->rowid)
|
||||||
{
|
{
|
||||||
print $form->select_users($task_time->fk_user,'userid_line');
|
print $form->select_dolusers($task_time->fk_user,'userid_line');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user