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 MySQL or MariaDB, you need at least version 5.1
* 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.
* 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 *****

View File

@ -576,7 +576,7 @@ if (!empty($sortfield)) {
// Export into a file with format defined into setup (FEC, CSV, ...)
// Must be after definition of $sql
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));
if ($result < 0) {
@ -822,7 +822,7 @@ if (!empty($arrayfields['t.piece_num']['checked'])) {
// Code journal
if (!empty($arrayfields['t.code_journal']['checked'])) {
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>';
}
// 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 '</div>';
} 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>';
}

View File

@ -2,7 +2,7 @@
/* Copyright (C) 2016 Neil Orley <neil.orley@oeris.fr>
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* 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>
*
* 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_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_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_start = GETPOST('search_accountancy_code_start', 'alpha');
@ -81,7 +89,7 @@ if (GETPOST("button_delmvt_x") || GETPOST("button_delmvt.x") || GETPOST("button_
}
// Load variable for pagination
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : (empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION) ? $conf->liste_limit : $conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : (empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION) ? $conf->liste_limit : $conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
$sortfield = GETPOST('sortfield', 'aZ09comma');
$sortorder = GETPOST('sortorder', 'aZ09comma');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
@ -144,6 +152,7 @@ $arrayfields = array(
't.credit'=>array('label'=>$langs->trans("Credit"), 'checked'=>1),
't.lettering_code'=>array('label'=>$langs->trans("LetteringCode"), '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)) {
@ -221,6 +230,14 @@ if (empty($reshook)) {
$search_date_export_endyear = '';
$search_date_export_endmonth = '';
$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_credit = '';
$search_lettering_code = '';
@ -301,6 +318,14 @@ if (empty($reshook)) {
$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;
}
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) {
@ -564,6 +589,17 @@ if (!empty($arrayfields['t.date_export']['checked'])) {
print '</div>';
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
$parameters = array('arrayfields'=>$arrayfields);
@ -605,6 +641,9 @@ if (!empty($arrayfields['t.lettering_code']['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 ');
}
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
$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
@ -635,7 +674,7 @@ while ($i < min($num, $limit)) {
// Is it a break ?
if ($accountg != $displayed_account_number || !isset($displayed_account_number)) {
$colnumber = 5;
$colnumberend = 7;
$colnumberend = 8;
if (empty($conf->global->ACCOUNTING_ENABLE_LETTERING) || empty($arrayfields['t.lettering_code']['checked'])) {
$colnumber--;
@ -643,6 +682,9 @@ while ($i < min($num, $limit)) {
if (empty($arrayfields['t.date_export']['checked'])) {
$colnumber--;
}
if (empty($arrayfields['t.date_validated']['checked'])) {
$colnumber--;
}
$colspan = $totalarray['nbfield'] - $colnumber;
$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
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook

View File

@ -2,8 +2,8 @@
/* Copyright (C) 2016 Neil Orley <neil.orley@oeris.fr>
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2020 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2020 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2018-2020 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2013-2021 Alexandre Spangaro <aspangaro@open-dsi.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
* it under the terms of the GNU General Public License as published by
@ -46,7 +46,7 @@ $search_date_endyear = GETPOST('search_date_endyear', 'int');
$search_date_endmonth = GETPOST('search_date_endmonth', '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_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_date_export_startyear = GETPOST('search_date_export_startyear', '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_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_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_start = GETPOST('search_accountancy_code_start', 'alpha');
@ -144,6 +152,7 @@ $arrayfields = array(
't.credit'=>array('label'=>$langs->trans("Credit"), 'checked'=>1),
't.lettering_code'=>array('label'=>$langs->trans("LetteringCode"), '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)) {
@ -221,6 +230,14 @@ if (empty($reshook)) {
$search_date_export_endyear = '';
$search_date_export_endmonth = '';
$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_credit = '';
$search_lettering_code = '';
@ -301,6 +318,14 @@ if (empty($reshook)) {
$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;
}
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) {
@ -373,7 +398,6 @@ $title_page = $langs->trans("Operations").' - '.$langs->trans("VueByAccountAccou
llxHeader('', $title_page);
// List
$nbtotalofrecords = '';
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="sortorder" value="'.$sortorder.'">';
$parameters = array();
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
if (empty($reshook)) {
@ -568,6 +591,17 @@ if (!empty($arrayfields['t.date_export']['checked'])) {
print '</div>';
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
$parameters = array('arrayfields'=>$arrayfields);
@ -609,6 +643,9 @@ if (!empty($arrayfields['t.lettering_code']['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 ');
}
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
$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
@ -639,7 +676,7 @@ while ($i < min($num, $limit)) {
// Is it a break ?
if ($accountg != $displayed_account_number || !isset($displayed_account_number)) {
$colnumber = 5;
$colnumberend = 7;
$colnumberend = 8;
if (empty($conf->global->ACCOUNTING_ENABLE_LETTERING) || empty($arrayfields['t.lettering_code']['checked'])) {
$colnumber--;
@ -647,10 +684,12 @@ while ($i < min($num, $limit)) {
if (empty($arrayfields['t.date_export']['checked'])) {
$colnumber--;
}
if (empty($arrayfields['t.date_validated']['checked'])) {
$colnumber--;
}
$colspan = $totalarray['nbfield'] - $colnumber;
$colspanend = $totalarray['nbfield'] - $colnumberend;
// Show a subtotal by accounting account
if (isset($displayed_account_number)) {
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
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
$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 Raphaël Doursenaud <rdoursenaud@gpcsolutions.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) 2017 Elarifr. Ari Elbaz <github@accedinfo.com>
* 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
* @return void
*/
public function exportCiel(&$TData)
{
global $conf;
$end_line = "\r\n";
$i = 1;
$date_ecriture = dol_print_date(dol_now(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be yyyymmdd
foreach ($TData as $data) {
$code_compta = $data->numero_compte;
$code_compta = length_accountg($data->numero_compte);
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['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['date_ecriture'] = $date_ecriture;
$Tab['date_ope'] = dol_print_date($data->doc_date, $conf->global->ACCOUNTING_EXPORT_DATE);
$Tab['num_piece'] = str_pad(self::trunc($data->piece_num, 12), 12);
$Tab['date_ecriture'] = str_pad($date_document, 8, ' ', STR_PAD_LEFT);
$Tab['date_echeance'] = str_pad($date_echeance, 8, ' ', STR_PAD_LEFT);
$Tab['num_piece'] = str_pad(self::trunc($data->doc_ref, 12), 12);
$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['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['vide'] = str_repeat(' ', 18);
$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/>.
*/
// $formatexportset ùust be defined
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
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');
$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 {
$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 '<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 "</tr>";

View File

@ -1,6 +1,6 @@
<?php
/* 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) 2014 Florian Henry <florian.henry@open-concept.pro>
*
@ -337,6 +337,7 @@ if ($object->fetch($id) >= 0) {
if (is_resource($handle)) {
while (($file = readdir($handle)) !== false) {
if (substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS') {
$reg = array();
if (preg_match("/(.*)\.modules\.php$/i", $file, $reg)) {
if ($reg[1] == 'example') {
continue;
@ -534,9 +535,9 @@ if ($object->fetch($id) >= 0) {
$morehtmlcenter = '';
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);

View File

@ -5274,7 +5274,8 @@ if ($action == 'create') {
// Reopen a standard paid invoice
if ((($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT)
|| ($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
&& ((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

View File

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

View File

@ -206,7 +206,7 @@ print $nb;
print '</td></tr>';
print '<tr><td>'.$langs->trans("AmountTotal").'</td>';
print '<td>';
print '<td class="amount">';
print price($pricetowithdraw);
print '</td>';
print '</tr>';
@ -225,7 +225,11 @@ print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="type" value="'.$type.'">';
if ($nb) {
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");
print ' - ';

View File

@ -1267,16 +1267,17 @@ class Form
// mode 1
$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 .= '<style type="text/css">.ui-autocomplete { z-index: 250; }</style>';
$out .= '<style type="text/css">.ui-autocomplete { z-index: 1003; }</style>';
if (empty($hidelabel)) {
print $langs->trans("RefOrLabel").' : ';
} elseif ($hidelabel > 1) {
$placeholder = ' placeholder="'.$langs->trans("RefOrLabel").'"';
$placeholder = $langs->trans("RefOrLabel");
if ($hidelabel == 2) {
$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) {
$out .= img_picto($langs->trans("Search"), 'search');
}
@ -6868,11 +6869,8 @@ class Form
$urloption = 'htmlname='.$htmlname.'&outjson=1&objectdesc='.$objectdesc.'&filter='.urlencode($objecttmp->filter);
// Activate the auto complete using ajax call.
$out .= ajax_autocompleter($preselectedvalue, $htmlname, $urlforajaxcall, $urloption, $conf->global->$confkeyforautocompletemode, 0, array());
$out .= '<style type="text/css">.ui-autocomplete { z-index: 250; }</style>';
if ($placeholder) {
$placeholder = ' placeholder="'.$placeholder.'"';
}
$out .= '<input type="text" class="'.$morecss.'"'.($disabled ? ' disabled="disabled"' : '').' name="search_'.$htmlname.'" id="search_'.$htmlname.'" value="'.$selected_input_value.'"'.$placeholder.' />';
$out .= '<style type="text/css">.ui-autocomplete { z-index: 1003; }</style>';
$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).'"' : '') .' />';
} else {
// 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);

View File

@ -2700,7 +2700,7 @@ function convertBackOfficeMediasLinksToPublicLinks($notetoshow)
* Function to format a value into a defined format for French administration (no thousand separator & decimal separator force to ',' with two decimals)
* Function used into accountancy FEC export
*
* @param float $amount Amount to format
* @param float $amount Amount to format
* @return string Chain with formatted upright
* @see price2num() Format a numeric into a price for FEC files
*/

View File

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

View File

@ -20,13 +20,13 @@
/**
* \file htdocs/core/modules/mailings/pomme.modules.php
* \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';
/**
* 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
{
@ -119,16 +119,16 @@ class mailing_pomme extends MailingTargets
$langs->load("users");
$s = '';
$s .= $langs->trans("Status").': ';
$s .= '<select name="filter" class="flat">';
$s .= $langs->trans("Status").' ';
$s .= '<select name="filter" class="flat marginrightonly">';
$s .= '<option value="-1">&nbsp;</option>';
$s .= '<option value="1">'.$langs->trans("Enabled").'</option>';
$s .= '<option value="0">'.$langs->trans("Disabled").'</option>';
$s .= '</select>';
$s .= ' ';
$s .= $langs->trans("Employee").': ';
$s .= '<select name="filteremployee" class="flat">';
$s .= $langs->trans("Employee").' ';
$s .= '<select name="filteremployee" class="flat marginrightonly">';
$s .= '<option value="-1">&nbsp;</option>';
$s .= '<option value="1">'.$langs->trans("Yes").'</option>';
$s .= '<option value="0">'.$langs->trans("No").'</option>';

View File

@ -226,8 +226,8 @@ class mailing_thirdparties extends MailingTargets
$langs->load("companies");
$s = $langs->trans("Categories").': ';
$s .= '<select name="filter" class="flat">';
$s = $langs->trans("Categories").' ';
$s .= '<select name="filter" class="flat marginrightonly">';
// Show categories
$sql = "SELECT rowid, label, type, visible";
@ -276,7 +276,7 @@ class mailing_thirdparties extends MailingTargets
$s .= '</select> ';
$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>';
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) {
$s .= '<option value="2">'.$langs->trans('Prospect').'</option>';
@ -292,7 +292,7 @@ class mailing_thirdparties extends MailingTargets
$s .= '</select> ';
$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" selected>'.$langs->trans("Enabled").'</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_COALA=Export for Sage Coala
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_ebp=Export for EBP
Modelcsv_cogilog=Export for Cogilog

View File

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

View File

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

View File

@ -82,7 +82,7 @@ if (empty($mode) || $mode != 'gettasks') {
// Mode to get list of tasks
if ($mode == 'gettasks') {
$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;
}

View File

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

View File

@ -83,7 +83,7 @@ class CompanyBankAccount extends Account
$now = dol_now();
$error = 0;
// 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);
if ($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 .= " VALUES (".$this->socid.", 'ban', '".$this->db->idate($now)."')";
$sql .= " VALUES (".((int) $this->socid).", 'ban', '".$this->db->idate($now)."')";
$resql = $this->db->query($sql);
if ($resql) {
if ($this->db->affected_rows($resql)) {
@ -135,6 +135,7 @@ class CompanyBankAccount extends Account
public function update(User $user = null, $notrigger = 0)
{
global $conf;
$error = 0;
if (!$this->id) {
@ -160,7 +161,7 @@ class CompanyBankAccount extends Account
$sql .= ",proprio = '".$this->db->escape($this->proprio)."'";
$sql .= ",owner_address = '".$this->db->escape($this->owner_address)."'";
$sql .= ",default_rib = ".((int) $this->default_rib);
if ($conf->prelevement->enabled) {
if (!empty($conf->prelevement->enabled)) {
$sql .= ",frstrecur = '".$this->db->escape($this->frstrecur)."'";
$sql .= ",rum = '".$this->db->escape($this->rum)."'";
$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)) {
$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);
if (!$result) {
@ -268,9 +265,9 @@ if (empty($reshook)) {
$companybankaccount->domiciliation = GETPOST('domiciliation', 'alpha');
$companybankaccount->proprio = GETPOST('proprio', 'alpha');
$companybankaccount->owner_address = GETPOST('owner_address', 'alpha');
$companybankaccount->frstrecur = GETPOST('frstrecur');
$companybankaccount->frstrecur = GETPOST('frstrecur', '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->status = 1;
@ -300,7 +297,6 @@ if (empty($reshook)) {
if (empty($companybankaccount->rum)) {
$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 '<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 '<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>';
$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 '<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 '<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>';
$tblArraychoice = array("FRST" => $langs->trans("FRST"), "RECUR" => $langs->trans("RECUR"));

View File

@ -482,7 +482,7 @@ if (empty($reshook)) {
}
// 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) {
$result = $object->setCustomer(GETPOST('editcustomer', 'int'));
$url = 'card.php?action=view&track_id='.GETPOST('track_id', 'alpha');