Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2021-08-02 19:03:38 +02:00
commit 0058e32207
24 changed files with 265 additions and 150 deletions

View File

@ -228,8 +228,9 @@ Following changes may create regressions for some external modules, but were nec
* If your database is PostgreSQL, you must use version 9.1.0 or more (Dolibarr need the SQL function CONCAT) * If your database is PostgreSQL, you must use version 9.1.0 or more (Dolibarr need the SQL function CONCAT)
* If your database is MySQL or MariaDB, you need at least version 5.1 * If your database is MySQL or MariaDB, you need at least version 5.1
* Function set_price_level() has been renamed into setPriceLevel() to follow camelcase rules * Function set_price_level() has been renamed into setPriceLevel() to follow camelcase rules
* removed deprecated substitution key __REFCLIENT__ (replaced with __REF_CLIENT__) * Removed deprecated substitution key __REFCLIENT__ (replaced with __REF_CLIENT__)
* Removed constant MAIN_COUNTRIES_IN_EEC. You can now set if country is in Europe or not from the dictionary of countries. * Removed constant MAIN_COUNTRIES_IN_EEC. You can now set if country is in Europe or not from the dictionary of countries.
* v14 seems to work correctly on PHP v8 but it generates a lot of verbose warnings. Currently, v14 i snot yet officialy supported with PHP 8.
***** ChangeLog for 13.0.4 compared to 13.0.3 ***** ***** ChangeLog for 13.0.4 compared to 13.0.3 *****

View File

@ -576,7 +576,7 @@ if (!empty($sortfield)) {
// Export into a file with format defined into setup (FEC, CSV, ...) // Export into a file with format defined into setup (FEC, CSV, ...)
// Must be after definition of $sql // Must be after definition of $sql
if ($action == 'export_fileconfirm' && $user->rights->accounting->mouvements->export) { if ($action == 'export_fileconfirm' && $user->rights->accounting->mouvements->export) {
// TODO Replace the fetchAll + ->export later that consume too much memory on large export with the query($sql) and loop on each line to export them. // TODO Replace the fetchAll to get all ->line followed by call to ->export(). It consumew too much memory on large export. Replace this with the query($sql) and loop on each line to export them.
$result = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter, 'AND', (empty($conf->global->ACCOUNTING_REEXPORT) ? 0 : 1)); $result = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter, 'AND', (empty($conf->global->ACCOUNTING_REEXPORT) ? 0 : 1));
if ($result < 0) { if ($result < 0) {
@ -822,7 +822,7 @@ if (!empty($arrayfields['t.piece_num']['checked'])) {
// Code journal // Code journal
if (!empty($arrayfields['t.code_journal']['checked'])) { if (!empty($arrayfields['t.code_journal']['checked'])) {
print '<td class="liste_titre center">'; print '<td class="liste_titre center">';
print $formaccounting->multi_select_journal($search_ledger_code, 'search_ledger_code', 0, 1, 1, 1); print $formaccounting->multi_select_journal($search_ledger_code, 'search_ledger_code', 0, 1, 1, 1, 'maxwidth150');
print '</td>'; print '</td>';
} }
// Date document // Date document
@ -865,7 +865,7 @@ if (!empty($arrayfields['t.subledger_account']['checked'])) {
print $formaccounting->select_auxaccount($search_accountancy_aux_code_end, 'search_accountancy_aux_code_end', $langs->trans('to'), 'maxwidth250', 'subledgeraccount'); print $formaccounting->select_auxaccount($search_accountancy_aux_code_end, 'search_accountancy_aux_code_end', $langs->trans('to'), 'maxwidth250', 'subledgeraccount');
print '</div>'; print '</div>';
} else { } else {
print '<input type="text" class="maxwidth100" name="search_accountancy_aux_code" value="'.$search_accountancy_aux_code.'">'; print '<input type="text" class="maxwidth75" name="search_accountancy_aux_code" value="'.$search_accountancy_aux_code.'">';
} }
print '</td>'; print '</td>';
} }

View File

@ -2,7 +2,7 @@
/* Copyright (C) 2016 Neil Orley <neil.orley@oeris.fr> /* Copyright (C) 2016 Neil Orley <neil.orley@oeris.fr>
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com> * Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2020 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2013-2020 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2020 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2013-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -56,6 +56,14 @@ $search_date_export_endmonth = GETPOST('search_date_export_endmonth', 'int');
$search_date_export_endday = GETPOST('search_date_export_endday', 'int'); $search_date_export_endday = GETPOST('search_date_export_endday', 'int');
$search_date_export_start = dol_mktime(0, 0, 0, $search_date_export_startmonth, $search_date_export_startday, $search_date_export_startyear); $search_date_export_start = dol_mktime(0, 0, 0, $search_date_export_startmonth, $search_date_export_startday, $search_date_export_startyear);
$search_date_export_end = dol_mktime(23, 59, 59, $search_date_export_endmonth, $search_date_export_endday, $search_date_export_endyear); $search_date_export_end = dol_mktime(23, 59, 59, $search_date_export_endmonth, $search_date_export_endday, $search_date_export_endyear);
$search_date_validation_startyear = GETPOST('search_date_validation_startyear', 'int');
$search_date_validation_startmonth = GETPOST('search_date_validation_startmonth', 'int');
$search_date_validation_startday = GETPOST('search_date_validation_startday', 'int');
$search_date_validation_endyear = GETPOST('search_date_validation_endyear', 'int');
$search_date_validation_endmonth = GETPOST('search_date_validation_endmonth', 'int');
$search_date_validation_endday = GETPOST('search_date_validation_endday', 'int');
$search_date_validation_start = dol_mktime(0, 0, 0, $search_date_validation_startmonth, $search_date_validation_startday, $search_date_validation_startyear);
$search_date_validation_end = dol_mktime(23, 59, 59, $search_date_validation_endmonth, $search_date_validation_endday, $search_date_validation_endyear);
$search_accountancy_code = GETPOST("search_accountancy_code"); $search_accountancy_code = GETPOST("search_accountancy_code");
$search_accountancy_code_start = GETPOST('search_accountancy_code_start', 'alpha'); $search_accountancy_code_start = GETPOST('search_accountancy_code_start', 'alpha');
@ -144,6 +152,7 @@ $arrayfields = array(
't.credit'=>array('label'=>$langs->trans("Credit"), 'checked'=>1), 't.credit'=>array('label'=>$langs->trans("Credit"), 'checked'=>1),
't.lettering_code'=>array('label'=>$langs->trans("LetteringCode"), 'checked'=>1), 't.lettering_code'=>array('label'=>$langs->trans("LetteringCode"), 'checked'=>1),
't.date_export'=>array('label'=>$langs->trans("DateExport"), 'checked'=>1), 't.date_export'=>array('label'=>$langs->trans("DateExport"), 'checked'=>1),
't.date_validated'=>array('label'=>$langs->trans("DateValidation"), 'checked'=>1),
); );
if (empty($conf->global->ACCOUNTING_ENABLE_LETTERING)) { if (empty($conf->global->ACCOUNTING_ENABLE_LETTERING)) {
@ -221,6 +230,14 @@ if (empty($reshook)) {
$search_date_export_endyear = ''; $search_date_export_endyear = '';
$search_date_export_endmonth = ''; $search_date_export_endmonth = '';
$search_date_export_endday = ''; $search_date_export_endday = '';
$search_date_validation_start = '';
$search_date_validation_end = '';
$search_date_validation_startyear = '';
$search_date_validation_startmonth = '';
$search_date_validation_startday = '';
$search_date_validation_endyear = '';
$search_date_validation_endmonth = '';
$search_date_validation_endday = '';
$search_debit = ''; $search_debit = '';
$search_credit = ''; $search_credit = '';
$search_lettering_code = ''; $search_lettering_code = '';
@ -301,6 +318,14 @@ if (empty($reshook)) {
$filter['t.date_export<='] = $search_date_export_end; $filter['t.date_export<='] = $search_date_export_end;
$param .= '&search_date_export_endmonth='.$search_date_export_endmonth.'&search_date_export_endday='.$search_date_export_endday.'&search_date_export_endyear='.$search_date_export_endyear; $param .= '&search_date_export_endmonth='.$search_date_export_endmonth.'&search_date_export_endday='.$search_date_export_endday.'&search_date_export_endyear='.$search_date_export_endyear;
} }
if (!empty($search_date_validation_start)) {
$filter['t.date_validated>='] = $search_date_validation_start;
$param .= '&search_date_validation_startmonth='.$search_date_validation_startmonth.'&search_date_validation_startday='.$search_date_validation_startday.'&search_date_validation_startyear='.$search_date_validation_startyear;
}
if (!empty($search_date_validation_end)) {
$filter['t.date_validated<='] = $search_date_validation_end;
$param .= '&search_date_validation_endmonth='.$search_date_validation_endmonth.'&search_date_validation_endday='.$search_date_validation_endday.'&search_date_validation_endyear='.$search_date_validation_endyear;
}
} }
if ($action == 'delbookkeeping' && $user->rights->accounting->mouvements->supprimer) { if ($action == 'delbookkeeping' && $user->rights->accounting->mouvements->supprimer) {
@ -564,6 +589,17 @@ if (!empty($arrayfields['t.date_export']['checked'])) {
print '</div>'; print '</div>';
print '</td>'; print '</td>';
} }
// Date validation
if (!empty($arrayfields['t.date_validated']['checked'])) {
print '<td class="liste_titre center">';
print '<div class="nowrap">';
print $form->selectDate($search_date_validation_start, 'search_date_validation_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("From"));
print '</div>';
print '<div class="nowrap">';
print $form->selectDate($search_date_validation_end, 'search_date_validation_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("to"));
print '</div>';
print '</td>';
}
// Fields from hook // Fields from hook
$parameters = array('arrayfields'=>$arrayfields); $parameters = array('arrayfields'=>$arrayfields);
@ -605,6 +641,9 @@ if (!empty($arrayfields['t.lettering_code']['checked'])) {
if (!empty($arrayfields['t.date_export']['checked'])) { if (!empty($arrayfields['t.date_export']['checked'])) {
print_liste_field_titre($arrayfields['t.date_export']['label'], $_SERVER['PHP_SELF'], "t.date_export", "", $param, '', $sortfield, $sortorder, 'center '); print_liste_field_titre($arrayfields['t.date_export']['label'], $_SERVER['PHP_SELF'], "t.date_export", "", $param, '', $sortfield, $sortorder, 'center ');
} }
if (!empty($arrayfields['t.date_validated']['checked'])) {
print_liste_field_titre($arrayfields['t.date_validated']['label'], $_SERVER['PHP_SELF'], "t.date_validated", "", $param, '', $sortfield, $sortorder, 'center ');
}
// Hook fields // Hook fields
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder); $parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder);
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
@ -635,7 +674,7 @@ while ($i < min($num, $limit)) {
// Is it a break ? // Is it a break ?
if ($accountg != $displayed_account_number || !isset($displayed_account_number)) { if ($accountg != $displayed_account_number || !isset($displayed_account_number)) {
$colnumber = 5; $colnumber = 5;
$colnumberend = 7; $colnumberend = 8;
if (empty($conf->global->ACCOUNTING_ENABLE_LETTERING) || empty($arrayfields['t.lettering_code']['checked'])) { if (empty($conf->global->ACCOUNTING_ENABLE_LETTERING) || empty($arrayfields['t.lettering_code']['checked'])) {
$colnumber--; $colnumber--;
@ -643,6 +682,9 @@ while ($i < min($num, $limit)) {
if (empty($arrayfields['t.date_export']['checked'])) { if (empty($arrayfields['t.date_export']['checked'])) {
$colnumber--; $colnumber--;
} }
if (empty($arrayfields['t.date_validated']['checked'])) {
$colnumber--;
}
$colspan = $totalarray['nbfield'] - $colnumber; $colspan = $totalarray['nbfield'] - $colnumber;
$colspanend = $totalarray['nbfield'] - $colnumberend; $colspanend = $totalarray['nbfield'] - $colnumberend;
@ -845,6 +887,14 @@ while ($i < min($num, $limit)) {
} }
} }
// Validated operation date
if (!empty($arrayfields['t.date_validated']['checked'])) {
print '<td class="center">'.dol_print_date($line->date_validation, 'dayhour').'</td>';
if (!$i) {
$totalarray['nbfield']++;
}
}
// Fields from hook // Fields from hook
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj); $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook

View File

@ -2,7 +2,7 @@
/* Copyright (C) 2016 Neil Orley <neil.orley@oeris.fr> /* Copyright (C) 2016 Neil Orley <neil.orley@oeris.fr>
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com> * Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2020 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2013-2020 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2020 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2013-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2018-2020 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) 2018-2020 Frédéric France <frederic.france@netlogic.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -46,7 +46,7 @@ $search_date_endyear = GETPOST('search_date_endyear', 'int');
$search_date_endmonth = GETPOST('search_date_endmonth', 'int'); $search_date_endmonth = GETPOST('search_date_endmonth', 'int');
$search_date_endday = GETPOST('search_date_endday', 'int'); $search_date_endday = GETPOST('search_date_endday', 'int');
$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); $search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);
$search_date_end = dol_mktime(0, 0, 0, $search_date_endmonth, $search_date_endday, $search_date_endyear); $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
$search_doc_date = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int')); $search_doc_date = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int'));
$search_date_export_startyear = GETPOST('search_date_export_startyear', 'int'); $search_date_export_startyear = GETPOST('search_date_export_startyear', 'int');
$search_date_export_startmonth = GETPOST('search_date_export_startmonth', 'int'); $search_date_export_startmonth = GETPOST('search_date_export_startmonth', 'int');
@ -55,7 +55,15 @@ $search_date_export_endyear = GETPOST('search_date_export_endyear', 'int');
$search_date_export_endmonth = GETPOST('search_date_export_endmonth', 'int'); $search_date_export_endmonth = GETPOST('search_date_export_endmonth', 'int');
$search_date_export_endday = GETPOST('search_date_export_endday', 'int'); $search_date_export_endday = GETPOST('search_date_export_endday', 'int');
$search_date_export_start = dol_mktime(0, 0, 0, $search_date_export_startmonth, $search_date_export_startday, $search_date_export_startyear); $search_date_export_start = dol_mktime(0, 0, 0, $search_date_export_startmonth, $search_date_export_startday, $search_date_export_startyear);
$search_date_export_end = dol_mktime(0, 0, 0, $search_date_export_endmonth, $search_date_export_endday, $search_date_export_endyear); $search_date_export_end = dol_mktime(23, 59, 59, $search_date_export_endmonth, $search_date_export_endday, $search_date_export_endyear);
$search_date_validation_startyear = GETPOST('search_date_validation_startyear', 'int');
$search_date_validation_startmonth = GETPOST('search_date_validation_startmonth', 'int');
$search_date_validation_startday = GETPOST('search_date_validation_startday', 'int');
$search_date_validation_endyear = GETPOST('search_date_validation_endyear', 'int');
$search_date_validation_endmonth = GETPOST('search_date_validation_endmonth', 'int');
$search_date_validation_endday = GETPOST('search_date_validation_endday', 'int');
$search_date_validation_start = dol_mktime(0, 0, 0, $search_date_validation_startmonth, $search_date_validation_startday, $search_date_validation_startyear);
$search_date_validation_end = dol_mktime(23, 59, 59, $search_date_validation_endmonth, $search_date_validation_endday, $search_date_validation_endyear);
$search_accountancy_code = GETPOST("search_accountancy_code"); $search_accountancy_code = GETPOST("search_accountancy_code");
$search_accountancy_code_start = GETPOST('search_accountancy_code_start', 'alpha'); $search_accountancy_code_start = GETPOST('search_accountancy_code_start', 'alpha');
@ -144,6 +152,7 @@ $arrayfields = array(
't.credit'=>array('label'=>$langs->trans("Credit"), 'checked'=>1), 't.credit'=>array('label'=>$langs->trans("Credit"), 'checked'=>1),
't.lettering_code'=>array('label'=>$langs->trans("LetteringCode"), 'checked'=>1), 't.lettering_code'=>array('label'=>$langs->trans("LetteringCode"), 'checked'=>1),
't.date_export'=>array('label'=>$langs->trans("DateExport"), 'checked'=>1), 't.date_export'=>array('label'=>$langs->trans("DateExport"), 'checked'=>1),
't.date_validated'=>array('label'=>$langs->trans("DateValidation"), 'checked'=>1),
); );
if (empty($conf->global->ACCOUNTING_ENABLE_LETTERING)) { if (empty($conf->global->ACCOUNTING_ENABLE_LETTERING)) {
@ -221,6 +230,14 @@ if (empty($reshook)) {
$search_date_export_endyear = ''; $search_date_export_endyear = '';
$search_date_export_endmonth = ''; $search_date_export_endmonth = '';
$search_date_export_endday = ''; $search_date_export_endday = '';
$search_date_validation_start = '';
$search_date_validation_end = '';
$search_date_validation_startyear = '';
$search_date_validation_startmonth = '';
$search_date_validation_startday = '';
$search_date_validation_endyear = '';
$search_date_validation_endmonth = '';
$search_date_validation_endday = '';
$search_debit = ''; $search_debit = '';
$search_credit = ''; $search_credit = '';
$search_lettering_code = ''; $search_lettering_code = '';
@ -301,6 +318,14 @@ if (empty($reshook)) {
$filter['t.date_export<='] = $search_date_export_end; $filter['t.date_export<='] = $search_date_export_end;
$param .= '&search_date_export_endmonth='.$search_date_export_endmonth.'&search_date_export_endday='.$search_date_export_endday.'&search_date_export_endyear='.$search_date_export_endyear; $param .= '&search_date_export_endmonth='.$search_date_export_endmonth.'&search_date_export_endday='.$search_date_export_endday.'&search_date_export_endyear='.$search_date_export_endyear;
} }
if (!empty($search_date_validation_start)) {
$filter['t.date_validated>='] = $search_date_validation_start;
$param .= '&search_date_validation_startmonth='.$search_date_validation_startmonth.'&search_date_validation_startday='.$search_date_validation_startday.'&search_date_validation_startyear='.$search_date_validation_startyear;
}
if (!empty($search_date_validation_end)) {
$filter['t.date_validated<='] = $search_date_validation_end;
$param .= '&search_date_validation_endmonth='.$search_date_validation_endmonth.'&search_date_validation_endday='.$search_date_validation_endday.'&search_date_validation_endyear='.$search_date_validation_endyear;
}
} }
if ($action == 'delbookkeeping' && $user->rights->accounting->mouvements->supprimer) { if ($action == 'delbookkeeping' && $user->rights->accounting->mouvements->supprimer) {
@ -373,7 +398,6 @@ $title_page = $langs->trans("Operations").' - '.$langs->trans("VueByAccountAccou
llxHeader('', $title_page); llxHeader('', $title_page);
// List // List
$nbtotalofrecords = ''; $nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
@ -448,7 +472,6 @@ print '<input type="hidden" name="formfilteraction" id="formfilteraction" value=
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">'; print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
$parameters = array(); $parameters = array();
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
if (empty($reshook)) { if (empty($reshook)) {
@ -568,6 +591,17 @@ if (!empty($arrayfields['t.date_export']['checked'])) {
print '</div>'; print '</div>';
print '</td>'; print '</td>';
} }
// Date validation
if (!empty($arrayfields['t.date_validated']['checked'])) {
print '<td class="liste_titre center">';
print '<div class="nowrap">';
print $form->selectDate($search_date_validation_start, 'search_date_validation_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("From"));
print '</div>';
print '<div class="nowrap">';
print $form->selectDate($search_date_validation_end, 'search_date_validation_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("to"));
print '</div>';
print '</td>';
}
// Fields from hook // Fields from hook
$parameters = array('arrayfields'=>$arrayfields); $parameters = array('arrayfields'=>$arrayfields);
@ -609,6 +643,9 @@ if (!empty($arrayfields['t.lettering_code']['checked'])) {
if (!empty($arrayfields['t.date_export']['checked'])) { if (!empty($arrayfields['t.date_export']['checked'])) {
print_liste_field_titre($arrayfields['t.date_export']['label'], $_SERVER['PHP_SELF'], "t.date_export", "", $param, '', $sortfield, $sortorder, 'center '); print_liste_field_titre($arrayfields['t.date_export']['label'], $_SERVER['PHP_SELF'], "t.date_export", "", $param, '', $sortfield, $sortorder, 'center ');
} }
if (!empty($arrayfields['t.date_validated']['checked'])) {
print_liste_field_titre($arrayfields['t.date_validated']['label'], $_SERVER['PHP_SELF'], "t.date_validated", "", $param, '', $sortfield, $sortorder, 'center ');
}
// Hook fields // Hook fields
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder); $parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder);
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
@ -639,7 +676,7 @@ while ($i < min($num, $limit)) {
// Is it a break ? // Is it a break ?
if ($accountg != $displayed_account_number || !isset($displayed_account_number)) { if ($accountg != $displayed_account_number || !isset($displayed_account_number)) {
$colnumber = 5; $colnumber = 5;
$colnumberend = 7; $colnumberend = 8;
if (empty($conf->global->ACCOUNTING_ENABLE_LETTERING) || empty($arrayfields['t.lettering_code']['checked'])) { if (empty($conf->global->ACCOUNTING_ENABLE_LETTERING) || empty($arrayfields['t.lettering_code']['checked'])) {
$colnumber--; $colnumber--;
@ -647,10 +684,12 @@ while ($i < min($num, $limit)) {
if (empty($arrayfields['t.date_export']['checked'])) { if (empty($arrayfields['t.date_export']['checked'])) {
$colnumber--; $colnumber--;
} }
if (empty($arrayfields['t.date_validated']['checked'])) {
$colnumber--;
}
$colspan = $totalarray['nbfield'] - $colnumber; $colspan = $totalarray['nbfield'] - $colnumber;
$colspanend = $totalarray['nbfield'] - $colnumberend; $colspanend = $totalarray['nbfield'] - $colnumberend;
// Show a subtotal by accounting account // Show a subtotal by accounting account
if (isset($displayed_account_number)) { if (isset($displayed_account_number)) {
print '<tr class="liste_total">'; print '<tr class="liste_total">';
@ -859,6 +898,14 @@ while ($i < min($num, $limit)) {
} }
} }
// Validated operation date
if (!empty($arrayfields['t.date_validated']['checked'])) {
print '<td class="center">'.dol_print_date($line->date_validation, 'dayhour').'</td>';
if (!$i) {
$totalarray['nbfield']++;
}
}
// Fields from hook // Fields from hook
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj); $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook

View File

@ -5,7 +5,7 @@
* Copyright (C) 2015 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2015 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> * Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2016 Pierre-Henry Favre <phf@atm-consulting.fr> * Copyright (C) 2016 Pierre-Henry Favre <phf@atm-consulting.fr>
* Copyright (C) 2016-2020 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2016-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2013-2017 Olivier Geffroy <jeff@jeffinfo.com> * Copyright (C) 2013-2017 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2017 Elarifr. Ari Elbaz <github@accedinfo.com> * Copyright (C) 2017 Elarifr. Ari Elbaz <github@accedinfo.com>
* Copyright (C) 2017-2019 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) 2017-2019 Frédéric France <frederic.france@netlogic.fr>
@ -477,34 +477,43 @@ class AccountancyExport
} }
/** /**
* Export format : CIEL * Export format : CIEL (Format XIMPORT)
* Format since 2003 compatible CIEL version > 2002 / Sage50
* Last review for this format : 2021/07/28 Alexandre Spangaro (aspangaro@open-dsi.fr)
*
* Help : https://sage50c.online-help.sage.fr/aide-technique/
* In sage software | Use menu : "Exchange" > "Importing entries..."
*
* If you want to force filename to "XIMPORT.TXT" for automatically import file present in a directory :
* use constant ACCOUNTING_EXPORT_XIMPORT_FORCE_FILENAME
* *
* @param array $TData data * @param array $TData data
* @return void * @return void
*/ */
public function exportCiel(&$TData) public function exportCiel(&$TData)
{ {
global $conf;
$end_line = "\r\n"; $end_line = "\r\n";
$i = 1; $i = 1;
$date_ecriture = dol_print_date(dol_now(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be yyyymmdd
foreach ($TData as $data) { foreach ($TData as $data) {
$code_compta = $data->numero_compte; $code_compta = length_accountg($data->numero_compte);
if (!empty($data->subledger_account)) { if (!empty($data->subledger_account)) {
$code_compta = $data->subledger_account; $code_compta = length_accounta($data->subledger_account);
} }
$date_document = dol_print_date($data->doc_date, '%Y%m%d');
$date_echeance = dol_print_date($data->date_lim_reglement, '%Y%m%d');
$Tab = array(); $Tab = array();
$Tab['num_ecriture'] = str_pad($i, 5); $Tab['num_ecriture'] = str_pad($data->piece_num, 5);
$Tab['code_journal'] = str_pad($data->code_journal, 2); $Tab['code_journal'] = str_pad($data->code_journal, 2);
$Tab['date_ecriture'] = $date_ecriture; $Tab['date_ecriture'] = str_pad($date_document, 8, ' ', STR_PAD_LEFT);
$Tab['date_ope'] = dol_print_date($data->doc_date, $conf->global->ACCOUNTING_EXPORT_DATE); $Tab['date_echeance'] = str_pad($date_echeance, 8, ' ', STR_PAD_LEFT);
$Tab['num_piece'] = str_pad(self::trunc($data->piece_num, 12), 12); $Tab['num_piece'] = str_pad(self::trunc($data->doc_ref, 12), 12);
$Tab['num_compte'] = str_pad(self::trunc($code_compta, 11), 11); $Tab['num_compte'] = str_pad(self::trunc($code_compta, 11), 11);
$Tab['libelle_ecriture'] = str_pad(self::trunc(dol_string_unaccent($data->doc_ref).dol_string_unaccent($data->label_operation), 25), 25); $Tab['libelle_ecriture'] = str_pad(self::trunc(dol_string_unaccent($data->doc_ref).dol_string_unaccent($data->label_operation), 25), 25);
$Tab['montant'] = str_pad(abs($data->debit - $data->credit), 13, ' ', STR_PAD_LEFT); $Tab['montant'] = str_pad(price2fec(abs($data->debit - $data->credit)), 13, ' ', STR_PAD_LEFT);
$Tab['type_montant'] = str_pad($data->sens, 1); $Tab['type_montant'] = str_pad($data->sens, 1);
$Tab['vide'] = str_repeat(' ', 18); $Tab['vide'] = str_repeat(' ', 18);
$Tab['intitule_compte'] = str_pad(self::trunc(dol_string_unaccent($data->label_operation), 34), 34); $Tab['intitule_compte'] = str_pad(self::trunc(dol_string_unaccent($data->label_operation), 34), 34);

View File

@ -16,6 +16,8 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
// $formatexportset ùust be defined
// Protection to avoid direct call of template // Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) { if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL"; print "Error, template page can't be called as URL";
@ -56,6 +58,8 @@ if ($accountancyexport->getFormatCode($formatexportset) == $accountancyexport::$
$endaccountingperiod = dol_print_date(dol_get_last_day($tmparray['year'], $tmparray['mon']), 'dayxcard'); $endaccountingperiod = dol_print_date(dol_get_last_day($tmparray['year'], $tmparray['mon']), 'dayxcard');
$completefilename = $siren."FEC".$endaccountingperiod.".txt"; $completefilename = $siren."FEC".$endaccountingperiod.".txt";
} elseif ($accountancyexport->getFormatCode($formatexportset) == $accountancyexport::$EXPORT_TYPE_CIEL && $type_export == "general_ledger" && !empty($conf->global->ACCOUNTING_EXPORT_XIMPORT_FORCE_FILENAME)) {
$completefilename = "XIMPORT.TXT";
} else { } else {
$completefilename = ($code ? $code."_" : "").($prefix ? $prefix."_" : "").$filename.($nodateexport ? "" : $date_export).".".$format; $completefilename = ($code ? $code."_" : "").($prefix ? $prefix."_" : "").$filename.($nodateexport ? "" : $date_export).".".$format;
} }

View File

@ -150,7 +150,7 @@ print '<input type="hidden" name="token" value="'.newToken().'">';
print '<table class="noborder centpercent">'; print '<table class="noborder centpercent">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td class="titlefieldcreate">'.$langs->trans("Parameter").'</td>'; print '<td>'.$langs->trans("Parameter").'</td>';
print '<td>'.$langs->trans("Value").'</td>'; print '<td>'.$langs->trans("Value").'</td>';
print "</tr>"; print "</tr>";

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005-2016 Laurent Destailleur <eldy@uers.sourceforge.net> * Copyright (C) 2005-2021 Laurent Destailleur <eldy@uers.sourceforge.net>
* Copyright (C) 2005-2010 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2005-2010 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
* *
@ -337,6 +337,7 @@ if ($object->fetch($id) >= 0) {
if (is_resource($handle)) { if (is_resource($handle)) {
while (($file = readdir($handle)) !== false) { while (($file = readdir($handle)) !== false) {
if (substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS') { if (substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS') {
$reg = array();
if (preg_match("/(.*)\.modules\.php$/i", $file, $reg)) { if (preg_match("/(.*)\.modules\.php$/i", $file, $reg)) {
if ($reg[1] == 'example') { if ($reg[1] == 'example') {
continue; continue;
@ -534,9 +535,9 @@ if ($object->fetch($id) >= 0) {
$morehtmlcenter = ''; $morehtmlcenter = '';
if ($allowaddtarget) { if ($allowaddtarget) {
$morehtmlcenter = '<span class="opacitymedium">'.$langs->trans("ToClearAllRecipientsClickHere").'</span> <a href="'.$_SERVER["PHP_SELF"].'?clearlist=1&id='.$object->id.'" class="button reposition">'.$langs->trans("TargetsReset").'</a>'; $morehtmlcenter = '<span class="opacitymedium">'.$langs->trans("ToClearAllRecipientsClickHere").'</span> <a href="'.$_SERVER["PHP_SELF"].'?clearlist=1&id='.$object->id.'" class="button reposition smallpaddingimp">'.$langs->trans("TargetsReset").'</a>';
} }
$morehtmlcenter .= ' <a class="reposition" href="'.$_SERVER["PHP_SELF"].'?exportcsv=1&id='.$object->id.'">'.$langs->trans("Download").'</a>'; $morehtmlcenter .= ' &nbsp; <a class="reposition" href="'.$_SERVER["PHP_SELF"].'?exportcsv=1&id='.$object->id.'">'.$langs->trans("Download").'</a>';
print_barre_liste($langs->trans("MailSelectedRecipients"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $morehtmlcenter, $num, $nbtotalofrecords, 'generic', 0, '', '', $limit); print_barre_liste($langs->trans("MailSelectedRecipients"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $morehtmlcenter, $num, $nbtotalofrecords, 'generic', 0, '', '', $limit);

View File

@ -5274,7 +5274,8 @@ if ($action == 'create') {
// Reopen a standard paid invoice // Reopen a standard paid invoice
if ((($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT) if ((($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT)
|| ($object->type == Facture::TYPE_CREDIT_NOTE && empty($discount->id)) || ($object->type == Facture::TYPE_CREDIT_NOTE && empty($discount->id))
|| ($object->type == Facture::TYPE_DEPOSIT && empty($discount->id))) || ($object->type == Facture::TYPE_DEPOSIT && empty($discount->id))
|| ($object->type == Facture::TYPE_SITUATION && empty($discount->id)))
&& ($object->statut == Facture::STATUS_CLOSED || $object->statut == Facture::STATUS_ABANDONED || ($object->statut == 1 && $object->paye == 1)) // Condition ($object->statut == 1 && $object->paye == 1) should not happened but can be found due to corrupted data && ($object->statut == Facture::STATUS_CLOSED || $object->statut == Facture::STATUS_ABANDONED || ($object->statut == 1 && $object->paye == 1)) // Condition ($object->statut == 1 && $object->paye == 1) should not happened but can be found due to corrupted data
&& ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $usercancreate) || $usercanreopen)) { // A paid invoice (partially or completely) && ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $usercancreate) || $usercanreopen)) { // A paid invoice (partially or completely)
if ($object->close_code != 'replaced' || (!$objectidnext)) { // Not replaced by another invoice or replaced but the replacement invoice has been deleted if ($object->close_code != 'replaced' || (!$objectidnext)) { // Not replaced by another invoice or replaced but the replacement invoice has been deleted

View File

@ -148,12 +148,6 @@ if ($type == 'bank-transfer') {
llxHeader('', $title, $helpurl); llxHeader('', $title, $helpurl);
/* *************************************************************************** */
/* */
/* Mode fiche */
/* */
/* *************************************************************************** */
if ($object->id > 0) { if ($object->id > 0) {
$selleruserevenustamp = $mysoc->useRevenueStamp(); $selleruserevenustamp = $mysoc->useRevenueStamp();
@ -471,6 +465,7 @@ if ($object->id > 0) {
print "</td>"; print "</td>";
print '</tr>'; print '</tr>';
// IBAN of seller or supplier
$title = 'CustomerIBAN'; $title = 'CustomerIBAN';
if ($type == 'bank-transfer') { if ($type == 'bank-transfer') {
$title = 'SupplierIBAN'; $title = 'SupplierIBAN';

View File

@ -206,7 +206,7 @@ print $nb;
print '</td></tr>'; print '</td></tr>';
print '<tr><td>'.$langs->trans("AmountTotal").'</td>'; print '<tr><td>'.$langs->trans("AmountTotal").'</td>';
print '<td>'; print '<td class="amount">';
print price($pricetowithdraw); print price($pricetowithdraw);
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
@ -225,7 +225,11 @@ print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="type" value="'.$type.'">'; print '<input type="hidden" name="type" value="'.$type.'">';
if ($nb) { if ($nb) {
if ($pricetowithdraw) { if ($pricetowithdraw) {
print $langs->trans('BankToReceiveWithdraw').': '; $title = print $langs->trans('BankToReceiveWithdraw').': ';
if ($type == 'bank-transfer') {
$title .= $langs->trans('BankToPayCreditTransfer').': ';
}
print $title;
$form->select_comptes($conf->global->PRELEVEMENT_ID_BANKACCOUNT, 'id_bankaccount', 0, "courant=1"); $form->select_comptes($conf->global->PRELEVEMENT_ID_BANKACCOUNT, 'id_bankaccount', 0, "courant=1");
print ' - '; print ' - ';

View File

@ -1267,16 +1267,17 @@ class Form
// mode 1 // mode 1
$urloption = 'htmlname='.urlencode($htmlname).'&outjson=1&filter='.urlencode($filter).(empty($excludeids) ? '' : '&excludeids='.join(',', $excludeids)).($showtype ? '&showtype='.urlencode($showtype) : ''); $urloption = 'htmlname='.urlencode($htmlname).'&outjson=1&filter='.urlencode($filter).(empty($excludeids) ? '' : '&excludeids='.join(',', $excludeids)).($showtype ? '&showtype='.urlencode($showtype) : '');
$out .= ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/societe/ajax/company.php', $urloption, $conf->global->COMPANY_USE_SEARCH_TO_SELECT, 0, $ajaxoptions); $out .= ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/societe/ajax/company.php', $urloption, $conf->global->COMPANY_USE_SEARCH_TO_SELECT, 0, $ajaxoptions);
$out .= '<style type="text/css">.ui-autocomplete { z-index: 250; }</style>';
$out .= '<style type="text/css">.ui-autocomplete { z-index: 1003; }</style>';
if (empty($hidelabel)) { if (empty($hidelabel)) {
print $langs->trans("RefOrLabel").' : '; print $langs->trans("RefOrLabel").' : ';
} elseif ($hidelabel > 1) { } elseif ($hidelabel > 1) {
$placeholder = ' placeholder="'.$langs->trans("RefOrLabel").'"'; $placeholder = $langs->trans("RefOrLabel");
if ($hidelabel == 2) { if ($hidelabel == 2) {
$out .= img_picto($langs->trans("Search"), 'search'); $out .= img_picto($langs->trans("Search"), 'search');
} }
} }
$out .= '<input type="text" class="'.$morecss.'" name="search_'.$htmlname.'" id="search_'.$htmlname.'" value="'.$selected_input_value.'"'.$placeholder.' '.(!empty($conf->global->THIRDPARTY_SEARCH_AUTOFOCUS) ? 'autofocus' : '').' />'; $out .= '<input type="text" class="'.$morecss.'" name="search_'.$htmlname.'" id="search_'.$htmlname.'" value="'.$selected_input_value.'"'.($placeholder ? ' placeholder="'.dol_escape_htmltag($placeholder).'"' : '').' '.(!empty($conf->global->THIRDPARTY_SEARCH_AUTOFOCUS) ? 'autofocus' : '').' />';
if ($hidelabel == 3) { if ($hidelabel == 3) {
$out .= img_picto($langs->trans("Search"), 'search'); $out .= img_picto($langs->trans("Search"), 'search');
} }
@ -6868,11 +6869,8 @@ class Form
$urloption = 'htmlname='.$htmlname.'&outjson=1&objectdesc='.$objectdesc.'&filter='.urlencode($objecttmp->filter); $urloption = 'htmlname='.$htmlname.'&outjson=1&objectdesc='.$objectdesc.'&filter='.urlencode($objecttmp->filter);
// Activate the auto complete using ajax call. // Activate the auto complete using ajax call.
$out .= ajax_autocompleter($preselectedvalue, $htmlname, $urlforajaxcall, $urloption, $conf->global->$confkeyforautocompletemode, 0, array()); $out .= ajax_autocompleter($preselectedvalue, $htmlname, $urlforajaxcall, $urloption, $conf->global->$confkeyforautocompletemode, 0, array());
$out .= '<style type="text/css">.ui-autocomplete { z-index: 250; }</style>'; $out .= '<style type="text/css">.ui-autocomplete { z-index: 1003; }</style>';
if ($placeholder) { $out .= '<input type="text" class="'.$morecss.'"'.($disabled ? ' disabled="disabled"' : '').' name="search_'.$htmlname.'" id="search_'.$htmlname.'" value="'.$selected_input_value.'"'.($placeholder ? ' placeholder="'.dol_escape_htmltag($placeholder).'"' : '') .' />';
$placeholder = ' placeholder="'.$placeholder.'"';
}
$out .= '<input type="text" class="'.$morecss.'"'.($disabled ? ' disabled="disabled"' : '').' name="search_'.$htmlname.'" id="search_'.$htmlname.'" value="'.$selected_input_value.'"'.$placeholder.' />';
} else { } else {
// Immediate load of table record. Note: filter is inside $objecttmp->filter // Immediate load of table record. Note: filter is inside $objecttmp->filter
$out .= $this->selectForFormsList($objecttmp, $htmlname, $preselectedvalue, $showempty, $searchkey, $placeholder, $morecss, $moreparams, $forcecombo, 0, $disabled); $out .= $this->selectForFormsList($objecttmp, $htmlname, $preselectedvalue, $showempty, $searchkey, $placeholder, $morecss, $moreparams, $forcecombo, 0, $disabled);

View File

@ -140,17 +140,21 @@ class mailing_contacts1 extends MailingTargets
$sql .= " ORDER BY sp.poste"; $sql .= " ORDER BY sp.poste";
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
$s .= $langs->trans("PostOrFunction").': '; $s .= $langs->trans("PostOrFunction").' ';
$s .= '<select name="filter_jobposition" class="flat">'; $s .= '<select name="filter_jobposition" class="flat marginrightonly" placeholder="'.dol_escape_htmltag($langs->trans("PostOrFunction")).'">';
$s .= '<option value="all">&nbsp;</option>'; $s .= '<option value="all">&nbsp;</option>';
if ($resql) { if ($resql) {
$num = $this->db->num_rows($resql); $num = $this->db->num_rows($resql);
$i = 0; $i = 0;
if ($num > 0) {
while ($i < $num) { while ($i < $num) {
$obj = $this->db->fetch_object($resql); $obj = $this->db->fetch_object($resql);
$s .= '<option value="'.dol_escape_htmltag($obj->poste).'">'.dol_escape_htmltag($obj->poste).' ('.$obj->nb.')</option>'; $s .= '<option value="'.dol_escape_htmltag($obj->poste).'">'.dol_escape_htmltag($obj->poste).' ('.$obj->nb.')</option>';
$i++; $i++;
} }
} else {
$s .= '<option disabled="disabled" value="">'.$langs->trans("None").'</option>';
}
} else { } else {
dol_print_error($this->db); dol_print_error($this->db);
} }
@ -159,7 +163,7 @@ class mailing_contacts1 extends MailingTargets
$s .= ' '; $s .= ' ';
// Filter on contact category // Filter on contact category
$s .= $langs->trans("ContactCategoriesShort").': '; $s .= $langs->trans("ContactCategoriesShort").' ';
$sql = "SELECT c.label, count(distinct(sp.email)) AS nb"; $sql = "SELECT c.label, count(distinct(sp.email)) AS nb";
$sql .= " FROM "; $sql .= " FROM ";
$sql .= " ".MAIN_DB_PREFIX."socpeople as sp,"; $sql .= " ".MAIN_DB_PREFIX."socpeople as sp,";
@ -175,7 +179,7 @@ class mailing_contacts1 extends MailingTargets
$sql .= " ORDER BY c.label"; $sql .= " ORDER BY c.label";
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
$s .= '<select name="filter_category" class="flat">'; $s .= '<select name="filter_category" class="flat marginrightonly">';
$s .= '<option value="all">&nbsp;</option>'; $s .= '<option value="all">&nbsp;</option>';
if ($resql) { if ($resql) {
$num = $this->db->num_rows($resql); $num = $this->db->num_rows($resql);
@ -197,8 +201,8 @@ class mailing_contacts1 extends MailingTargets
$s .= '<br>'; $s .= '<br>';
// Add prospect of a particular level // Add prospect of a particular level
$s .= $langs->trans("NatureOfThirdParty").': '; $s .= $langs->trans("NatureOfThirdParty").' ';
$s .= '<select name="filter" class="flat">'; $s .= '<select name="filter" class="flat marginrightonly">';
$sql = "SELECT code, label"; $sql = "SELECT code, label";
$sql .= " FROM ".MAIN_DB_PREFIX."c_prospectlevel"; $sql .= " FROM ".MAIN_DB_PREFIX."c_prospectlevel";
$sql .= " WHERE active > 0"; $sql .= " WHERE active > 0";
@ -234,7 +238,7 @@ class mailing_contacts1 extends MailingTargets
$s .= ' '; $s .= ' ';
// Filter on thirdparty category // Filter on thirdparty category
$s .= $langs->trans("CustomersProspectsCategoriesShort").': '; $s .= $langs->trans("CustomersProspectsCategoriesShort").' ';
$sql = "SELECT c.label, count(distinct(sp.email)) AS nb"; $sql = "SELECT c.label, count(distinct(sp.email)) AS nb";
$sql .= " FROM "; $sql .= " FROM ";
$sql .= " ".MAIN_DB_PREFIX."socpeople as sp,"; $sql .= " ".MAIN_DB_PREFIX."socpeople as sp,";
@ -250,7 +254,7 @@ class mailing_contacts1 extends MailingTargets
$sql .= " ORDER BY c.label"; $sql .= " ORDER BY c.label";
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
$s .= '<select name="filter_category_customer" class="flat">'; $s .= '<select name="filter_category_customer" class="flat marginrightonly maxwidth200">';
$s .= '<option value="all">&nbsp;</option>'; $s .= '<option value="all">&nbsp;</option>';
if ($resql) { if ($resql) {
$num = $this->db->num_rows($resql); $num = $this->db->num_rows($resql);
@ -272,7 +276,7 @@ class mailing_contacts1 extends MailingTargets
$s .= ' '; $s .= ' ';
// Filter on thirdparty category // Filter on thirdparty category
$s .= $langs->trans("SuppliersCategoriesShort").': '; $s .= $langs->trans("SuppliersCategoriesShort").' ';
$sql = "SELECT c.label, count(distinct(sp.email)) AS nb"; $sql = "SELECT c.label, count(distinct(sp.email)) AS nb";
$sql .= " FROM "; $sql .= " FROM ";
$sql .= " ".MAIN_DB_PREFIX."socpeople as sp,"; $sql .= " ".MAIN_DB_PREFIX."socpeople as sp,";
@ -288,7 +292,7 @@ class mailing_contacts1 extends MailingTargets
$sql .= " ORDER BY c.label"; $sql .= " ORDER BY c.label";
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
$s .= '<select name="filter_category_supplier" class="flat">'; $s .= '<select name="filter_category_supplier" class="flat marginrightonly maxwidth200">';
$s .= '<option value="all">&nbsp;</option>'; $s .= '<option value="all">&nbsp;</option>';
if ($resql) { if ($resql) {
$num = $this->db->num_rows($resql); $num = $this->db->num_rows($resql);

View File

@ -20,13 +20,13 @@
/** /**
* \file htdocs/core/modules/mailings/pomme.modules.php * \file htdocs/core/modules/mailings/pomme.modules.php
* \ingroup mailing * \ingroup mailing
* \brief File of class to offer a selector of emailing targets with Rule 'Pomme'. * \brief File of class to offer a selector of emailing targets of users.
*/ */
include_once DOL_DOCUMENT_ROOT.'/core/modules/mailings/modules_mailings.php'; include_once DOL_DOCUMENT_ROOT.'/core/modules/mailings/modules_mailings.php';
/** /**
* Class to offer a selector of emailing targets with Rule 'Peche'. * Class to offer a selector of emailing targets with Rule 'Pomme'.
*/ */
class mailing_pomme extends MailingTargets class mailing_pomme extends MailingTargets
{ {
@ -119,16 +119,16 @@ class mailing_pomme extends MailingTargets
$langs->load("users"); $langs->load("users");
$s = ''; $s = '';
$s .= $langs->trans("Status").': '; $s .= $langs->trans("Status").' ';
$s .= '<select name="filter" class="flat">'; $s .= '<select name="filter" class="flat marginrightonly">';
$s .= '<option value="-1">&nbsp;</option>'; $s .= '<option value="-1">&nbsp;</option>';
$s .= '<option value="1">'.$langs->trans("Enabled").'</option>'; $s .= '<option value="1">'.$langs->trans("Enabled").'</option>';
$s .= '<option value="0">'.$langs->trans("Disabled").'</option>'; $s .= '<option value="0">'.$langs->trans("Disabled").'</option>';
$s .= '</select>'; $s .= '</select>';
$s .= ' '; $s .= ' ';
$s .= $langs->trans("Employee").': '; $s .= $langs->trans("Employee").' ';
$s .= '<select name="filteremployee" class="flat">'; $s .= '<select name="filteremployee" class="flat marginrightonly">';
$s .= '<option value="-1">&nbsp;</option>'; $s .= '<option value="-1">&nbsp;</option>';
$s .= '<option value="1">'.$langs->trans("Yes").'</option>'; $s .= '<option value="1">'.$langs->trans("Yes").'</option>';
$s .= '<option value="0">'.$langs->trans("No").'</option>'; $s .= '<option value="0">'.$langs->trans("No").'</option>';

View File

@ -226,8 +226,8 @@ class mailing_thirdparties extends MailingTargets
$langs->load("companies"); $langs->load("companies");
$s = $langs->trans("Categories").': '; $s = $langs->trans("Categories").' ';
$s .= '<select name="filter" class="flat">'; $s .= '<select name="filter" class="flat marginrightonly">';
// Show categories // Show categories
$sql = "SELECT rowid, label, type, visible"; $sql = "SELECT rowid, label, type, visible";
@ -276,7 +276,7 @@ class mailing_thirdparties extends MailingTargets
$s .= '</select> '; $s .= '</select> ';
$s .= $langs->trans('ProspectCustomer'); $s .= $langs->trans('ProspectCustomer');
$s .= ': <select name="filter_client" class="flat">'; $s .= ' <select name="filter_client" class="flat marginrightonly">';
$s .= '<option value="-1">&nbsp;</option>'; $s .= '<option value="-1">&nbsp;</option>';
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) { if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) {
$s .= '<option value="2">'.$langs->trans('Prospect').'</option>'; $s .= '<option value="2">'.$langs->trans('Prospect').'</option>';
@ -292,7 +292,7 @@ class mailing_thirdparties extends MailingTargets
$s .= '</select> '; $s .= '</select> ';
$s .= $langs->trans("Status"); $s .= $langs->trans("Status");
$s .= ': <select name="filter_status" class="flat">'; $s .= ' <select name="filter_status" class="flat marginrightonly">';
$s .= '<option value="-1">&nbsp;</option>'; $s .= '<option value="-1">&nbsp;</option>';
$s .= '<option value="1" selected>'.$langs->trans("Enabled").'</option>'; $s .= '<option value="1" selected>'.$langs->trans("Enabled").'</option>';
$s .= '<option value="0">'.$langs->trans("Disabled").'</option>'; $s .= '<option value="0">'.$langs->trans("Disabled").'</option>';

View File

@ -339,7 +339,7 @@ Modelcsv_normal=Classic export
Modelcsv_CEGID=Export for CEGID Expert Comptabilité Modelcsv_CEGID=Export for CEGID Expert Comptabilité
Modelcsv_COALA=Export for Sage Coala Modelcsv_COALA=Export for Sage Coala
Modelcsv_bob50=Export for Sage BOB 50 Modelcsv_bob50=Export for Sage BOB 50
Modelcsv_ciel=Export for Sage Ciel Compta or Compta Evolution Modelcsv_ciel=Export for Sage50, Ciel Compta or Compta Evo. (Format XIMPORT)
Modelcsv_quadratus=Export for Quadratus QuadraCompta Modelcsv_quadratus=Export for Quadratus QuadraCompta
Modelcsv_ebp=Export for EBP Modelcsv_ebp=Export for EBP
Modelcsv_cogilog=Export for Cogilog Modelcsv_cogilog=Export for Cogilog

View File

@ -162,8 +162,8 @@ AdvTgtDeleteFilter=Delete filter
AdvTgtSaveFilter=Save filter AdvTgtSaveFilter=Save filter
AdvTgtCreateFilter=Create filter AdvTgtCreateFilter=Create filter
AdvTgtOrCreateNewFilter=Name of new filter AdvTgtOrCreateNewFilter=Name of new filter
NoContactWithCategoryFound=No contact/address with a category found NoContactWithCategoryFound=No category found linked to some contacts/addresses
NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No category found linked to some thirdparties
OutGoingEmailSetup=Outgoing emails OutGoingEmailSetup=Outgoing emails
InGoingEmailSetup=Incoming emails InGoingEmailSetup=Incoming emails
OutGoingEmailSetupForEmailing=Outgoing emails (for module %s) OutGoingEmailSetupForEmailing=Outgoing emails (for module %s)

View File

@ -1,61 +1,61 @@
# Dolibarr language file - Source file is en_US - opensurvey # Dolibarr language file - Source file is en_US - opensurvey
Survey=Poll Survey=調查
Surveys=Polls Surveys=調查
OrganizeYourMeetingEasily=Organize your meetings and polls easily. First select the type of poll... OrganizeYourMeetingEasily=輕鬆組織會議和調查。首先選擇調查的類型...
NewSurvey=New poll NewSurvey=新調查
OpenSurveyArea=Polls area OpenSurveyArea=調查區
AddACommentForPoll=You can add a comment into poll... AddACommentForPoll=您可以在調查中加入評論...
AddComment=Add comment AddComment=增加評論
CreatePoll=Create poll CreatePoll=建立調查
PollTitle=Poll title PollTitle=調查標題
ToReceiveEMailForEachVote=Receive an email for each vote ToReceiveEMailForEachVote=每次投票都會收到一封電子郵件
TypeDate=Type date TypeDate=日期類型
TypeClassic=Type standard TypeClassic=標準類型
OpenSurveyStep2=Select your dates among the free days (grey). The selected days are green. You can unselect a day previously selected by clicking again on it OpenSurveyStep2=在空閒日中選擇日期(灰色)。所選的日期為綠色。您可以通過再次點擊來取消先前選擇的日期
RemoveAllDays=Remove all days RemoveAllDays=全部刪除
CopyHoursOfFirstDay=Copy hours of first day CopyHoursOfFirstDay=複制第一天的時間
RemoveAllHours=Remove all hours RemoveAllHours=刪除所有時間
SelectedDays=Selected days SelectedDays=已選擇的日子
TheBestChoice=The best choice currently is TheBestChoice=目前最好的選擇是
TheBestChoices=The best choices currently are TheBestChoices=目前最好的選擇是
with=with with=與
OpenSurveyHowTo=If you agree to vote in this poll, you have to give your name, choose the values that fit best for you and validate with the plus button at the end of the line. OpenSurveyHowTo=如果您同意在此次調查中投票,則必須給出自己的名字,選擇最適合您的值,並使用該行末尾的加號按鈕進行驗證。
CommentsOfVoters=Comments of voters CommentsOfVoters=投票人的評論
ConfirmRemovalOfPoll=Are you sure you want to remove this poll (and all votes) ConfirmRemovalOfPoll=您確定要刪除此調查(以及所有投票)嗎?
RemovePoll=Remove poll RemovePoll=刪除調查
UrlForSurvey=URL to communicate to get a direct access to poll UrlForSurvey=調查的直接網址
PollOnChoice=You are creating a poll to make a multi-choice for a poll. First enter all possible choices for your poll: PollOnChoice=您正在建立多項選擇的調查。首先為您的調查輸入所有可能的選擇:
CreateSurveyDate=Create a date poll CreateSurveyDate=建立日期調查
CreateSurveyStandard=Create a standard poll CreateSurveyStandard=建立標準調查
CheckBox=Simple checkbox CheckBox=簡易勾選框
YesNoList=List (empty/yes/no) YesNoList=清單(空/是/否)
PourContreList=List (empty/for/against) PourContreList=清單(空/支持/反對)
AddNewColumn=Add new column AddNewColumn=增加新欄位
TitleChoice=Choice label TitleChoice=選擇標籤
ExportSpreadsheet=Export result spreadsheet ExportSpreadsheet=匯出結果表格
ExpireDate=極限日期 ExpireDate=調查截止日
NbOfSurveys=Number of polls NbOfSurveys=投票次數
NbOfVoters=No. of voters NbOfVoters=投票人數
SurveyResults=Results SurveyResults=結果
PollAdminDesc=You are allowed to change all vote lines of this poll with button "Edit". You can, as well, remove a column or a line with %s. You can also add a new column with %s. PollAdminDesc=您可以使用“編輯”按鈕更改此民意調查的所有投票行。您也可以使用%s刪除列或行。您也可以使用%s增加新列。
5MoreChoices=5 more choices 5MoreChoices=再多5個選項
Against=Against Against=反對
YouAreInivitedToVote=You are invited to vote for this poll YouAreInivitedToVote=您被邀請參加此項調查
VoteNameAlreadyExists=This name was already used for this poll VoteNameAlreadyExists=此名稱已用於此調查
AddADate=Add a date AddADate=增加日期
AddStartHour=Add start hour AddStartHour=增加開始時間
AddEndHour=Add end hour AddEndHour=增加結束時間
votes=vote(s) votes=投票
NoCommentYet=No comments have been posted for this poll yet NoCommentYet=尚未有此調查的評論
CanComment=Voters can comment in the poll CanComment=投票者可以在調查中發表評論
CanSeeOthersVote=Voters can see other people's vote CanSeeOthersVote=投票者可以看到其他人的投票
SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format:<br>- empty,<br>- "8h", "8H" or "8:00" to give a meeting's start hour,<br>- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,<br>- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes. SelectDayDesc=對於每個選定的日期,您可以依照以下格式選擇是否選擇開會時間: <br> -空的<br> -“ 8h”,“ 8H”或“ 8:00”指定會議的開始時間, <br> -“ 8-11”,“ 8h-11h”,“ 8H-11H”或“ 8:00-11:00”給出會議的開始和結束時間, <br> -同樣的用“ 8h15-11h15”,“ 8H15-11H15”或“ 8:15-11:15”表示,但要加上分鐘。
BackToCurrentMonth=Back to current month BackToCurrentMonth=回到目前月份
ErrorOpenSurveyFillFirstSection=You haven't filled the first section of the poll creation ErrorOpenSurveyFillFirstSection=您尚未填寫建立調查的第一部分
ErrorOpenSurveyOneChoice=Enter at least one choice ErrorOpenSurveyOneChoice=輸入至少一個選項
ErrorInsertingComment=There was an error while inserting your comment ErrorInsertingComment=插入您的評論時出錯
MoreChoices=Enter more choices for the voters MoreChoices=為投票者輸入更多選項
SurveyExpiredInfo=The poll has been closed or voting delay has expired. SurveyExpiredInfo=投票已關閉或投票已到期。
EmailSomeoneVoted=%s has filled a line.\nYou can find your poll at the link: \n%s EmailSomeoneVoted=%s已填滿一行。\n您可以在以下連結找到您的調查:\n%s
ShowSurvey=Show survey ShowSurvey=顯示調查
UserMustBeSameThanUserUsedToVote=You must have voted and use the same user name that the one used to vote, to post a comment UserMustBeSameThanUserUsedToVote=您必須已投票並使用與投票時相同的用戶名來發表評論

View File

@ -82,7 +82,7 @@ if (empty($mode) || $mode != 'gettasks') {
// Mode to get list of tasks // Mode to get list of tasks
if ($mode == 'gettasks') { if ($mode == 'gettasks') {
$formproject = new FormProjets($db); $formproject = new FormProjets($db);
$formproject->selectTasks((!empty($$socid) ? $socid : -1), 0, 'taskid', 24, 1, '1', 1, 0, 0, 'maxwidth500', GETPOST('projectid', 'int'), ''); $formproject->selectTasks((!empty($socid) ? $socid : -1), 0, 'taskid', 24, 1, '1', 1, 0, 0, 'maxwidth500', GETPOST('projectid', 'int'), '');
return; return;
} }

View File

@ -1535,7 +1535,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) {
$totalarray['nbfield']++; $totalarray['nbfield']++;
} }
} }
} else { } elseif ($action !== 'createtime') {
print '<input type="hidden" name="taskid" value="'.$id.'">'; print '<input type="hidden" name="taskid" value="'.$id.'">';
} }

View File

@ -83,7 +83,7 @@ class CompanyBankAccount extends Account
$now = dol_now(); $now = dol_now();
$error = 0; $error = 0;
// Correct default_rib to be sure to have always one default // Correct default_rib to be sure to have always one default
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe_rib where fk_soc = ".$this->socid." AND default_rib = 1 AND type = 'ban'"; $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe_rib where fk_soc = ".((int) $this->socid)." AND default_rib = 1 AND type = 'ban'";
$result = $this->db->query($sql); $result = $this->db->query($sql);
if ($result) { if ($result) {
$numrows = $this->db->num_rows($result); $numrows = $this->db->num_rows($result);
@ -96,7 +96,7 @@ class CompanyBankAccount extends Account
} }
$sql = "INSERT INTO ".MAIN_DB_PREFIX."societe_rib (fk_soc, type, datec)"; $sql = "INSERT INTO ".MAIN_DB_PREFIX."societe_rib (fk_soc, type, datec)";
$sql .= " VALUES (".$this->socid.", 'ban', '".$this->db->idate($now)."')"; $sql .= " VALUES (".((int) $this->socid).", 'ban', '".$this->db->idate($now)."')";
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
if ($resql) { if ($resql) {
if ($this->db->affected_rows($resql)) { if ($this->db->affected_rows($resql)) {
@ -135,6 +135,7 @@ class CompanyBankAccount extends Account
public function update(User $user = null, $notrigger = 0) public function update(User $user = null, $notrigger = 0)
{ {
global $conf; global $conf;
$error = 0; $error = 0;
if (!$this->id) { if (!$this->id) {
@ -160,7 +161,7 @@ class CompanyBankAccount extends Account
$sql .= ",proprio = '".$this->db->escape($this->proprio)."'"; $sql .= ",proprio = '".$this->db->escape($this->proprio)."'";
$sql .= ",owner_address = '".$this->db->escape($this->owner_address)."'"; $sql .= ",owner_address = '".$this->db->escape($this->owner_address)."'";
$sql .= ",default_rib = ".((int) $this->default_rib); $sql .= ",default_rib = ".((int) $this->default_rib);
if ($conf->prelevement->enabled) { if (!empty($conf->prelevement->enabled)) {
$sql .= ",frstrecur = '".$this->db->escape($this->frstrecur)."'"; $sql .= ",frstrecur = '".$this->db->escape($this->frstrecur)."'";
$sql .= ",rum = '".$this->db->escape($this->rum)."'"; $sql .= ",rum = '".$this->db->escape($this->rum)."'";
$sql .= ",date_rum = ".($this->date_rum ? "'".$this->db->idate($this->date_rum)."'" : "null"); $sql .= ",date_rum = ".($this->date_rum ? "'".$this->db->idate($this->date_rum)."'" : "null");

View File

@ -161,9 +161,6 @@ if (empty($reshook)) {
if (empty($companybankaccount->rum)) { if (empty($companybankaccount->rum)) {
$companybankaccount->rum = $prelevement->buildRumNumber($object->code_client, $companybankaccount->datec, $companybankaccount->id); $companybankaccount->rum = $prelevement->buildRumNumber($object->code_client, $companybankaccount->datec, $companybankaccount->id);
} }
if (empty($companybankaccount->date_rum)) {
$companybankaccount->date_rum = dol_now();
}
$result = $companybankaccount->update($user); $result = $companybankaccount->update($user);
if (!$result) { if (!$result) {
@ -268,9 +265,9 @@ if (empty($reshook)) {
$companybankaccount->domiciliation = GETPOST('domiciliation', 'alpha'); $companybankaccount->domiciliation = GETPOST('domiciliation', 'alpha');
$companybankaccount->proprio = GETPOST('proprio', 'alpha'); $companybankaccount->proprio = GETPOST('proprio', 'alpha');
$companybankaccount->owner_address = GETPOST('owner_address', 'alpha'); $companybankaccount->owner_address = GETPOST('owner_address', 'alpha');
$companybankaccount->frstrecur = GETPOST('frstrecur'); $companybankaccount->frstrecur = GETPOST('frstrecur', 'alpha');
$companybankaccount->rum = GETPOST('rum', 'alpha'); $companybankaccount->rum = GETPOST('rum', 'alpha');
$companybankaccount->date_rum = dol_mktime(0, 0, 0, GETPOST('date_rummonth'), GETPOST('date_rumday'), GETPOST('date_rumyear')); $companybankaccount->date_rum = dol_mktime(0, 0, 0, GETPOST('date_rummonth', 'int'), GETPOST('date_rumday', 'int'), GETPOST('date_rumyear', 'int'));
$companybankaccount->datec = dol_now(); $companybankaccount->datec = dol_now();
$companybankaccount->status = 1; $companybankaccount->status = 1;
@ -300,7 +297,6 @@ if (empty($reshook)) {
if (empty($companybankaccount->rum)) { if (empty($companybankaccount->rum)) {
$companybankaccount->rum = $prelevement->buildRumNumber($object->code_client, $companybankaccount->datec, $companybankaccount->id); $companybankaccount->rum = $prelevement->buildRumNumber($object->code_client, $companybankaccount->datec, $companybankaccount->id);
$companybankaccount->date_rum = dol_now();
} }
} }
@ -1638,8 +1634,10 @@ if ($socid && $action == 'edit' && $user->rights->societe->creer) {
print '<tr><td class="titlefield">'.$langs->trans("RUM").'</td>'; print '<tr><td class="titlefield">'.$langs->trans("RUM").'</td>';
print '<td><input class="minwidth300" type="text" name="rum" value="'.dol_escape_htmltag($companybankaccount->rum).'"></td></tr>'; print '<td><input class="minwidth300" type="text" name="rum" value="'.dol_escape_htmltag($companybankaccount->rum).'"></td></tr>';
$date_rum = dol_mktime(0, 0, 0, GETPOST('date_rummonth'), GETPOST('date_rumday'), GETPOST('date_rumyear'));
print '<tr><td class="titlefield">'.$langs->trans("DateRUM").'</td>'; print '<tr><td class="titlefield">'.$langs->trans("DateRUM").'</td>';
print '<td>'.$form->selectDate(GETPOST('date_rum') ?GETPOST('date_rum') : $companybankaccount->date_rum, 'date_rum', 0, 0, 1, 'date_rum').'</td></tr>'; print '<td>'.$form->selectDate($date_rum ? $date_rum : $companybankaccount->date_rum, 'date_rum', 0, 0, 1, 'date_rum', 1, 1).'</td></tr>';
print '<tr><td>'.$langs->trans("WithdrawMode").'</td><td>'; print '<tr><td>'.$langs->trans("WithdrawMode").'</td><td>';
$tblArraychoice = array("FRST" => $langs->trans("FRST"), "RECUR" => $langs->trans("RECUR")); $tblArraychoice = array("FRST" => $langs->trans("FRST"), "RECUR" => $langs->trans("RECUR"));
@ -1800,8 +1798,10 @@ if ($socid && $action == 'create' && $user->rights->societe->creer) {
print '<tr><td class="titlefieldcreate">'.$langs->trans("RUM").'</td>'; print '<tr><td class="titlefieldcreate">'.$langs->trans("RUM").'</td>';
print '<td colspan="4"><input type="text" class="minwidth300" name="rum" value="'.GETPOST('rum', 'alpha').'"> <div class="opacitymedium">'.$langs->trans("RUMWillBeGenerated").'</div></td></tr>'; print '<td colspan="4"><input type="text" class="minwidth300" name="rum" value="'.GETPOST('rum', 'alpha').'"> <div class="opacitymedium">'.$langs->trans("RUMWillBeGenerated").'</div></td></tr>';
$date_rum = dol_mktime(0, 0, 0, GETPOST('date_rummonth'), GETPOST('date_rumday'), GETPOST('date_rumyear'));
print '<tr><td class="titlefieldcreate">'.$langs->trans("DateRUM").'</td>'; print '<tr><td class="titlefieldcreate">'.$langs->trans("DateRUM").'</td>';
print '<td colspan="4">'.$form->selectDate(GETPOST('date_rum'), 'date_rum', 0, 0, 1, 'date_rum').'</td></tr>'; print '<td colspan="4">'.$form->selectDate($date_rum, 'date_rum', 0, 0, 1, 'date_rum', 1, 1).'</td></tr>';
print '<tr><td>'.$langs->trans("WithdrawMode").'</td><td>'; print '<tr><td>'.$langs->trans("WithdrawMode").'</td><td>';
$tblArraychoice = array("FRST" => $langs->trans("FRST"), "RECUR" => $langs->trans("RECUR")); $tblArraychoice = array("FRST" => $langs->trans("FRST"), "RECUR" => $langs->trans("RECUR"));

View File

@ -482,7 +482,7 @@ if (empty($reshook)) {
} }
// Set parent company // Set parent company
if ($action == 'set_thirdparty' && $user->rights->societe->creer) { if ($action == 'set_thirdparty' && $user->rights->ticket->write) {
if ($object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')) >= 0) { if ($object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')) >= 0) {
$result = $object->setCustomer(GETPOST('editcustomer', 'int')); $result = $object->setCustomer(GETPOST('editcustomer', 'int'));
$url = 'card.php?action=view&track_id='.GETPOST('track_id', 'alpha'); $url = 'card.php?action=view&track_id='.GETPOST('track_id', 'alpha');