Merge pull request #4 from Dolibarr/13.0

13.0
This commit is contained in:
LAURIER Alexis 2021-01-26 15:11:04 +01:00 committed by GitHub
commit d1253d0f36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
806 changed files with 4164 additions and 1760 deletions

View File

@ -182,8 +182,7 @@ NEW: add option "If the feature to manage kits of module Stock is used, show det
For developers:
---------------
NEW: add __MEMBER_TYPE__ substitution key
NEW: add __TYPE__ substitution key
NEW: add __MEMBER_TYPE__ and __TYPE__ substitution key
NEW: add function dolButtonToOpenUrlInDialogPopup() to be able to open page into a popup
NEW: show line number on intervention card (via MAIN_VIEW_LINE_NUMBER)
NEW: Add some fields to link website page to an other object
@ -195,17 +194,10 @@ NEW: can add event to log into blockedlog module with a constant
NEW: add property cssview when declaring fields of an object
NEW: Can use dynamic code into the 'enabled' property of DAO fields
NEW: allow to edit "demand reason" field though API
NEW: fetch contact by email with REST API
NEW: field ref_ext in llx_commandedet
NEW: fields ref_ext for Attributes and Combinations
NEW: get state by REST API
NEW: get state dictionnary by REST API
NEW: improve Product API for variant products
NEW: OAuth SCOPE for Admin SDK
NEW: retrieve discount from invoice from API
NEW: standardizes API thirdparties by email like other object
NEW: Thirdparty REST API: endpoint to set price level
NEW: use new category API for project list view
NEW: Triggers Attributes and Attributes values
NEW: added incoterms data into the substitution array
NEW: add send context for ticket
@ -221,6 +213,12 @@ NEW: API can update a payment
NEW: API get member by thirdparty
NEW: API get thirdparty by barcode
NEW: API get users by email / login
NEW: fetch contact by email with REST API
NEW: get state dictionnary by REST API
NEW: improve Product API for variant products
NEW: retrieve discount from invoice from API
NEW: Thirdparty REST API: endpoint to set price level
NEW: use new category API for project list view
HOOKs
NEW: Hook on propal card
@ -238,7 +236,7 @@ Following changes may create regressions for some external modules, but were nec
* All properties ->titre have been renamed into ->title
* Property $paiementid in API 'api_supplier_invoices.php' has been renamed into into $payment_mode_id
* Property 'num_paiement' has been renamed 'num_payment' everywhere for better code consistency.
* The deprecated subsitution key __SIGNATURE__ has been removed. Use __USER_SIGNATURE__ if you used the old syntax in your email templates.
* The deprecated subsitution key __SIGNATURE__ has been removed. Replace it with __USER_SIGNATURE__ if you used the old syntax in your email templates.
* The hidden option HOLIDAY_MORE_PUBLIC_HOLIDAYS has been removed. Use instead the dictionary table if you need to define custom days of holiday.
* If you build a class that implement CommonObject to use the incoterm properties or methods (->fk_incoterm, ->label_incoterm, ->location_incoterm),
you must now also include declaration of the Trait 'CommonIncoterm' in your class. All incoterm functions were moved into this Trait.
@ -251,6 +249,7 @@ Following changes may create regressions for some external modules, but were nec
* Context for hook showSocinfoOnPrint has been moved from "showsocinfoonprint" to "main"
* Library htdocs/includes/phpoffice/phpexcel as been removed (replaced with htdocs/includes/phpoffice/PhpSpreadsheet)
* Databse transaction in your triggers must be correctly balanced (one close for one open). If not, an error will be returned by the trigger, even if trigger did return error code.
* Dolibarr v13 is still compatible with any PHP version between 5.6.0 and 7.4.*; Unit tests are OK with PHP 8.0 but some warnings or troubles may appears with PHP 8.0.
***** ChangeLog for 12.0.4 compared to 12.0.3 *****

View File

@ -444,9 +444,6 @@ if ($id)
// Form to add a new line
if ($tabname[$id])
{
$alabelisused = 0;
$var = false;
$fieldlist = explode(',', $tabfield[$id]);
// Line for title
@ -481,7 +478,6 @@ if ($id)
}
print '</td>';
}
if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') $alabelisused = 1;
}
print '<td>';
@ -612,7 +608,7 @@ if ($id)
print '&nbsp;<input type="submit" class="button button-cancel" name="actioncancel" value="'.$langs->trans("Cancel").'"></td>';
} else {
$tmpaction = 'view';
$parameters = array('var'=>$var, 'fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
$parameters = array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
$reshook = $hookmanager->executeHooks('viewDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
$error = $hookmanager->error; $errors = $hookmanager->errors;

View File

@ -76,7 +76,7 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount)
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Label")), null, 'errors');
$action = 'create';
} else {
$sql = 'SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid=' . $conf->global->CHARTOFACCOUNTS;
$sql = 'SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid='.((int) $conf->global->CHARTOFACCOUNTS);
dol_syslog('accountancy/admin/card.php:: $sql=' . $sql);
$result = $db->query($sql);

View File

@ -438,8 +438,6 @@ if ($id)
// Form to add a new line
if ($tabname[$id])
{
$alabelisused = 0;
$fieldlist = explode(',', $tabfield[$id]);
// Line for title
@ -496,7 +494,6 @@ if ($id)
else print $valuetoshow;
print '</td>';
}
if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') $alabelisused = 1;
}
print '<td>';

View File

@ -103,8 +103,9 @@ if ($action == 'update') {
if ($action == 'setlistsorttodo') {
$setlistsorttodo = GETPOST('value', 'int');
$res = dolibarr_set_const($db, "ACCOUNTING_LIST_SORT_VENTILATION_TODO", $setlistsorttodo, 'yesno', 0, '', $conf->entity);
if (!$res > 0)
if (!($res > 0)) {
$error++;
}
if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
@ -116,8 +117,10 @@ if ($action == 'setlistsorttodo') {
if ($action == 'setlistsortdone') {
$setlistsortdone = GETPOST('value', 'int');
$res = dolibarr_set_const($db, "ACCOUNTING_LIST_SORT_VENTILATION_DONE", $setlistsortdone, 'yesno', 0, '', $conf->entity);
if (!$res > 0)
if (!($res > 0)) {
$error++;
}
if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
@ -128,8 +131,10 @@ if ($action == 'setlistsortdone') {
if ($action == 'setmanagezero') {
$setmanagezero = GETPOST('value', 'int');
$res = dolibarr_set_const($db, "ACCOUNTING_MANAGE_ZERO", $setmanagezero, 'yesno', 0, '', $conf->entity);
if (!$res > 0)
if (!($res > 0)) {
$error++;
}
if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
@ -140,8 +145,10 @@ if ($action == 'setmanagezero') {
if ($action == 'setdisabledirectinput') {
$setdisabledirectinput = GETPOST('value', 'int');
$res = dolibarr_set_const($db, "BANK_DISABLE_DIRECT_INPUT", $setdisabledirectinput, 'yesno', 0, '', $conf->entity);
if (!$res > 0)
if (!($res > 0)) {
$error++;
}
if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
@ -152,8 +159,10 @@ if ($action == 'setdisabledirectinput') {
if ($action == 'setenabledraftexport') {
$setenabledraftexport = GETPOST('value', 'int');
$res = dolibarr_set_const($db, "ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL", $setenabledraftexport, 'yesno', 0, '', $conf->entity);
if (!$res > 0)
if (!($res > 0)) {
$error++;
}
if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
@ -164,8 +173,10 @@ if ($action == 'setenabledraftexport') {
if ($action == 'setenablesubsidiarylist') {
$setenablesubsidiarylist = GETPOST('value', 'int');
$res = dolibarr_set_const($db, "ACCOUNTANCY_COMBO_FOR_AUX", $setenablesubsidiarylist, 'yesno', 0, '', $conf->entity);
if (!$res > 0)
if (!($res > 0)) {
$error++;
}
if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
@ -176,8 +187,10 @@ if ($action == 'setenablesubsidiarylist') {
if ($action == 'setdisablebindingonsales') {
$setdisablebindingonsales = GETPOST('value', 'int');
$res = dolibarr_set_const($db, "ACCOUNTING_DISABLE_BINDING_ON_SALES", $setdisablebindingonsales, 'yesno', 0, '', $conf->entity);
if (!$res > 0)
if (!($res > 0)) {
$error++;
}
if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
@ -188,8 +201,10 @@ if ($action == 'setdisablebindingonsales') {
if ($action == 'setdisablebindingonpurchases') {
$setdisablebindingonpurchases = GETPOST('value', 'int');
$res = dolibarr_set_const($db, "ACCOUNTING_DISABLE_BINDING_ON_PURCHASES", $setdisablebindingonpurchases, 'yesno', 0, '', $conf->entity);
if (!$res > 0)
if (!($res > 0)) {
$error++;
}
if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
@ -200,8 +215,10 @@ if ($action == 'setdisablebindingonpurchases') {
if ($action == 'setdisablebindingonexpensereports') {
$setdisablebindingonexpensereports = GETPOST('value', 'int');
$res = dolibarr_set_const($db, "ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS", $setdisablebindingonexpensereports, 'yesno', 0, '', $conf->entity);
if (!$res > 0)
if (!($res > 0)) {
$error++;
}
if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
@ -209,9 +226,11 @@ if ($action == 'setdisablebindingonexpensereports') {
}
}
/*
* View
*/
$form = new Form($db);
$title = $langs->trans('ConfigAccountingExpert');

View File

@ -407,8 +407,6 @@ if ($id)
// Form to add a new line
if ($tabname[$id])
{
$alabelisused = 0;
$fieldlist = explode(',', $tabfield[$id]);
// Line for title
@ -437,7 +435,6 @@ if ($id)
else print $valuetoshow;
print '</td>';
}
if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') $alabelisused = 1;
}
print '<td>';

View File

@ -16,7 +16,6 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
@ -307,7 +306,7 @@ if ($action != 'export_csv')
$accountingaccountstatic->fetch(null, $line->numero_compte, true);
if (!empty($accountingaccountstatic->account_number)) {
$accounting_account = $accountingaccountstatic->getNomUrl(0, 1);
$accounting_account = $accountingaccountstatic->getNomUrl(0, 1, 0, '', 0, -1, 0, 'accountcard');
} else {
$accounting_account = length_accountg($line->numero_compte);
}
@ -322,10 +321,19 @@ if ($action != 'export_csv')
$root_account_description = $tmparrayforrootaccount['label'];
$root_account_number = $tmparrayforrootaccount['account_number'];
//var_dump($tmparrayforrootaccount);
//var_dump($accounting_account);
//var_dump($accountingaccountstatic);
if (empty($accountingaccountstatic->label) && $accountingaccountstatic->id > 0) {
$link = '<a class="editfielda reposition" href="' . DOL_URL_ROOT . '/accountancy/admin/card.php?action=update&token=' . newToken() . '&id=' . $accountingaccountstatic->id . '">' . img_edit() . '</a>';
} elseif (empty($tmparrayforrootaccount['label'])) {
} elseif ($accounting_account == 'NotDefined') {
$link = '<a href="' . DOL_URL_ROOT . '/accountancy/admin/card.php?action=create&token=' . newToken() . '&accountingaccount=' . length_accountg($line->numero_compte) . '">' . img_edit_add() . '</a>';
} elseif (empty($tmparrayforrootaccount['label'])) {
// $tmparrayforrootaccount['label'] not defined = the account has not parent with a parent.
// This is useless, we should not create a new account when an account has no parent, we must edit it to fix its parent.
// BUG 1: Accounts on level root or level 1 must not have a parent 2 level higher, so shoule not show a link to create another account.
// BUG 2: Adding a link to create a new accounting account here is useless because it is not add as parent of the orphelin.
//$link = '<a href="' . DOL_URL_ROOT . '/accountancy/admin/card.php?action=create&token=' . newToken() . '&accountingaccount=' . length_accountg($line->numero_compte) . '">' . img_edit_add() . '</a>';
}
if (!empty($show_subgroup))
@ -363,8 +371,22 @@ if ($action != 'export_csv')
print '<tr class="oddeven">';
print '<td>'.$accounting_account.'</td>';
if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) print '<td class="nowraponall right">'.price($opening_balance).'</td>';
print '<td class="nowraponall right">'.price($line->debit).'</td>';
print '<td class="nowraponall right">'.price($line->credit).'</td>';
$urlzoom = '';
if ($line->numero_compte) {
$urlzoom = DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?search_accountancy_code_start='.urlencode($line->numero_compte).'&search_accountancy_code_end='.urlencode($line->numero_compte);
if (GETPOSTISSET('date_startmonth')) {
$urlzoom .= '&search_date_startmonth='.GETPOST('date_startmonth', 'int').'&search_date_startday='.GETPOST('date_startday', 'int').'&search_date_startyear='.GETPOST('date_startyear', 'int');
}
if (GETPOSTISSET('date_endmonth')) {
$urlzoom .= '&search_date_endmonth='.GETPOST('date_endmonth', 'int').'&search_date_endday='.GETPOST('date_endday', 'int').'&search_date_endyear='.GETPOST('date_endyear', 'int');
}
}
// Debit
print '<td class="nowraponall right"><a href="'.$urlzoom.'">'.price($line->debit).'</a></td>';
// Credit
print '<td class="nowraponall right"><a href="'.$urlzoom.'">'.price($line->credit).'</a></td>';
if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) {
print '<td class="nowraponall right">'.price(price2num($opening_balance + $line->debit - $line->credit, 'MT')).'</td>';
} else {

View File

@ -63,9 +63,11 @@ $accountingjournal->fetch(null, $journal_code);
$journal_label = $accountingjournal->label;
$subledger_account = GETPOST('subledger_account', 'alphanohtml');
if ($subledger_account == - 1) {
if ($subledger_account == -1) {
$subledger_account = null;
}
$subledger_label = GETPOST('subledger_label', 'alphanohtml');
$label_operation = GETPOST('label_operation', 'alphanohtml');
$debit = price2num(GETPOST('debit', 'alpha'));
$credit = price2num(GETPOST('credit', 'alpha'));
@ -108,6 +110,7 @@ if ($action == "confirm_update") {
} else {
$object->numero_compte = $accountingaccount_number;
$object->subledger_account = $subledger_account;
$object->subledger_label = $subledger_label;
$object->label_compte = $accountingaccount_label;
$object->label_operation = $label_operation;
$object->debit = $debit;
@ -160,6 +163,7 @@ if ($action == "confirm_update") {
$object->numero_compte = $accountingaccount_number;
$object->subledger_account = $subledger_account;
$object->subledger_label = $subledger_label;
$object->label_compte = $accountingaccount_label;
$object->label_operation = $label_operation;
$object->debit = $debit;
@ -578,7 +582,7 @@ if ($action == 'create')
print '<br>';
$result = $object->fetchAllPerMvt($piece_num, $mode);
$result = $object->fetchAllPerMvt($piece_num, $mode); // This load $object->linesmvt
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
} else {
@ -630,9 +634,10 @@ if ($action == 'create')
if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) {
print $formaccounting->select_auxaccount((GETPOSTISSET("subledger_account") ? GETPOST("subledger_account", "alpha") : $line->subledger_account), 'subledger_account', 1);
} else {
print '<input type="text" class="maxwidth150" name="subledger_account" value="'.(GETPOSTISSET("subledger_account") ? GETPOST("subledger_account", "alpha") : $line->subledger_account).'">';
print '<input type="text" class="maxwidth150" name="subledger_account" value="'.(GETPOSTISSET("subledger_account") ? GETPOST("subledger_account", "alpha") : $line->subledger_account).'" placeholder="'.dol_escape_htmltag($langs->trans("SubledgerAccount")).'">';
}
// TODO Add also the label
// Add also input for subledger label
print '<br><input type="text" class="maxwidth150" name="subledger_label" value="'.(GETPOSTISSET("subledger_label") ? GETPOST("subledger_label", "alpha") : $line->subledger_label).'" placeholder="'.dol_escape_htmltag($langs->trans("SubledgerAccountLabel")).'">';
print '</td>';
print '<td><input type="text" class="minwidth200" name="label_operation" value="'.(GETPOSTISSET("label_operation") ? GETPOST("label_operation", "alpha") : $line->label_operation).'"></td>';
print '<td class="right"><input type="text" size="6" class="right" name="debit" value="'.(GETPOSTISSET("debit") ? GETPOST("debit", "alpha") : price($line->debit)).'"></td>';
@ -644,20 +649,24 @@ if ($action == 'create')
} else {
$accountingaccount->fetch(null, $line->numero_compte, true);
print '<td>'.$accountingaccount->getNomUrl(0, 1, 1, '', 0).'</td>';
print '<td>'.length_accounta($line->subledger_account).'</td>';
print '<td>'.length_accounta($line->subledger_account);
if ($line->subledger_label) {
print ' - <span class="opacitymedium">'.$line->subledger_label.'</span>';
}
print '</td>';
print '<td>'.$line->label_operation.'</td>';
print '<td class="nowrap right">'.price($line->debit).'</td>';
print '<td class="nowrap right">'.price($line->credit).'</td>';
print '<td class="center">';
print '<a class="editfielda reposition" href="'.$_SERVER["PHP_SELF"].'?action=update&id='.$line->id.'&piece_num='.$line->piece_num.'&mode='.$mode.'">';
print '<a class="editfielda reposition" href="'.$_SERVER["PHP_SELF"].'?action=update&id='.$line->id.'&piece_num='.urlencode($line->piece_num).'&mode='.urlencode($mode).'&token='.urlencode(newToken()).'">';
print img_edit('', 0, 'class="marginrightonly"');
print '</a> &nbsp;';
$actiontodelete = 'delete';
if ($mode == '_tmp' || $action != 'delmouv') $actiontodelete = 'confirm_delete';
print '<a href="'.$_SERVER["PHP_SELF"].'?action='.$actiontodelete.'&id='.$line->id.'&piece_num='.$line->piece_num.'&mode='.$mode.'">';
print '<a href="'.$_SERVER["PHP_SELF"].'?action='.$actiontodelete.'&id='.$line->id.'&piece_num='.urlencode($line->piece_num).'&mode='.urlencode($mode).'&token='.urlencode(newToken()).'">';
print img_delete();
print '</a>';
@ -688,9 +697,9 @@ if ($action == 'create')
if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) {
print $formaccounting->select_auxaccount('', 'subledger_account', 1);
} else {
print '<input type="text" class="maxwidth150" name="subledger_account" value="">';
print '<input type="text" class="maxwidth150" name="subledger_account" value="" placeholder="'.dol_escape_htmltag($langs->trans("SubledgerAccount")).'">';
}
// TODO Add also the label
print '<br><input type="text" class="maxwidth150" name="subledger_label" value="" placeholder="'.dol_escape_htmltag($langs->trans("SubledgerAccountLabel")).'">';
print '</td>';
print '<td><input type="text" class="minwidth200" name="label_operation" value="'.$label_operation.'"/></td>';
print '<td class="right"><input type="text" size="6" class="right" name="debit" value=""/></td>';

View File

@ -87,7 +87,7 @@ $search_debit = GETPOST('search_debit', 'alpha');
$search_credit = GETPOST('search_credit', 'alpha');
$search_ledger_code = GETPOST('search_ledger_code', 'alpha');
$search_lettering_code = GETPOST('search_lettering_code', 'alpha');
$search_not_reconciled = GETPOST('search_reconciled_option', 'alpha');
$search_not_reconciled = GETPOST('search_not_reconciled', 'alpha');
// 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);
@ -761,7 +761,7 @@ if (!empty($arrayfields['t.lettering_code']['checked']))
{
print '<td class="liste_titre center">';
print '<input type="text" size="3" class="flat" name="search_lettering_code" value="'.$search_lettering_code.'"/>';
print '<br><span class="nowrap"><input type="checkbox" name="search_reconciled_option" value="notreconciled"'.($search_not_reconciled == 'notreconciled' ? ' checked' : '').'>'.$langs->trans("NotReconciled").'</span>';
print '<br><span class="nowrap"><input type="checkbox" name="search_not_reconciled" value="notreconciled"'.($search_not_reconciled == 'notreconciled' ? ' checked' : '').'>'.$langs->trans("NotReconciled").'</span>';
print '</td>';
}

View File

@ -74,7 +74,7 @@ $search_ledger_code = GETPOST('search_ledger_code', 'alpha');
$search_debit = GETPOST('search_debit', 'alpha');
$search_credit = GETPOST('search_credit', 'alpha');
$search_lettering_code = GETPOST('search_lettering_code', 'alpha');
$search_not_reconciled = GETPOST('search_reconciled_option', 'alpha');
$search_not_reconciled = GETPOST('search_not_reconciled', 'alpha');
if (GETPOST("button_delmvt_x") || GETPOST("button_delmvt.x") || GETPOST("button_delmvt")) {
$action = 'delbookkeepingyear';
@ -512,7 +512,7 @@ if (!empty($arrayfields['t.lettering_code']['checked']))
{
print '<td class="liste_titre center">';
print '<input type="text" size="3" class="flat" name="search_lettering_code" value="'.$search_lettering_code.'"/>';
print '<br><span class="nowrap"><input type="checkbox" name="search_reconciled_option" value="notreconciled"'.($search_not_reconciled == 'notreconciled' ? ' checked' : '').'>'.$langs->trans("NotReconciled").'</span>';
print '<br><span class="nowrap"><input type="checkbox" name="search_not_reconciled" value="notreconciled"'.($search_not_reconciled == 'notreconciled' ? ' checked' : '').'>'.$langs->trans("NotReconciled").'</span>';
print '</td>';
}
// Date export

View File

@ -74,7 +74,7 @@ $search_ledger_code = GETPOST('search_ledger_code', 'alpha');
$search_debit = GETPOST('search_debit', 'alpha');
$search_credit = GETPOST('search_credit', 'alpha');
$search_lettering_code = GETPOST('search_lettering_code', 'alpha');
$search_not_reconciled = GETPOST('search_reconciled_option', 'alpha');
$search_not_reconciled = GETPOST('search_not_reconciled', 'alpha');
if (GETPOST("button_delmvt_x") || GETPOST("button_delmvt.x") || GETPOST("button_delmvt")) {
$action = 'delbookkeepingyear';
@ -516,7 +516,7 @@ if (!empty($arrayfields['t.lettering_code']['checked']))
{
print '<td class="liste_titre center">';
print '<input type="text" size="3" class="flat" name="search_lettering_code" value="'.$search_lettering_code.'"/>';
print '<br><span class="nowrap"><input type="checkbox" name="search_reconciled_option" value="notreconciled"'.($search_not_reconciled == 'notreconciled' ? ' checked' : '').'>'.$langs->trans("NotReconciled").'</span>';
print '<br><span class="nowrap"><input type="checkbox" name="search_not_reconciled" value="notreconciled"'.($search_not_reconciled == 'notreconciled' ? ' checked' : '').'>'.$langs->trans("NotReconciled").'</span>';
print '</td>';
}
// Date export

View File

@ -57,8 +57,8 @@ class AccountancyExport
public static $EXPORT_TYPE_OPENCONCERTO = 100;
public static $EXPORT_TYPE_LDCOMPTA = 110;
public static $EXPORT_TYPE_LDCOMPTA10 = 120;
public static $EXPORT_TYPE_GESTINUMV3 = 130;
public static $EXPORT_TYPE_GESTINUMV5 = 135;
public static $EXPORT_TYPE_GESTIMUMV3 = 130;
public static $EXPORT_TYPE_GESTIMUMV5 = 135;
public static $EXPORT_TYPE_FEC = 1000;
public static $EXPORT_TYPE_FEC2 = 1010;
@ -119,8 +119,8 @@ class AccountancyExport
self::$EXPORT_TYPE_CHARLEMAGNE => $langs->trans('Modelcsv_charlemagne'),
self::$EXPORT_TYPE_LDCOMPTA => $langs->trans('Modelcsv_LDCompta'),
self::$EXPORT_TYPE_LDCOMPTA10 => $langs->trans('Modelcsv_LDCompta10'),
self::$EXPORT_TYPE_GESTINUMV3 => $langs->trans('Modelcsv_Gestinum_v3'),
self::$EXPORT_TYPE_GESTINUMV5 => $langs->trans('Modelcsv_Gestinum_v5'),
self::$EXPORT_TYPE_GESTIMUMV3 => $langs->trans('Modelcsv_Gestinum_v3'),
self::$EXPORT_TYPE_GESTIMUMV5 => $langs->trans('Modelcsv_Gestinum_v5'),
self::$EXPORT_TYPE_FEC => $langs->trans('Modelcsv_FEC'),
self::$EXPORT_TYPE_FEC2 => $langs->trans('Modelcsv_FEC2'),
);
@ -154,8 +154,8 @@ class AccountancyExport
self::$EXPORT_TYPE_CHARLEMAGNE => 'charlemagne',
self::$EXPORT_TYPE_LDCOMPTA => 'ldcompta',
self::$EXPORT_TYPE_LDCOMPTA10 => 'ldcompta10',
self::$EXPORT_TYPE_GESTINUMV3 => 'gestinumv3',
self::$EXPORT_TYPE_GESTINUMV5 => 'gestinumv5',
self::$EXPORT_TYPE_GESTIMUMV3 => 'gestimumv3',
self::$EXPORT_TYPE_GESTIMUMV5 => 'gestimumv5',
self::$EXPORT_TYPE_FEC => 'fec',
self::$EXPORT_TYPE_FEC2 => 'fec2',
);
@ -227,11 +227,13 @@ class AccountancyExport
self::$EXPORT_TYPE_LDCOMPTA10 => array(
'label' => $langs->trans('Modelcsv_LDCompta10'),
),
self::$EXPORT_TYPE_GESTINUMV3 => array(
self::$EXPORT_TYPE_GESTIMUMV3 => array(
'label' => $langs->trans('Modelcsv_Gestinumv3'),
'ACCOUNTING_EXPORT_FORMAT' => 'txt',
),
self::$EXPORT_TYPE_GESTINUMV5 => array(
self::$EXPORT_TYPE_GESTIMUMV5 => array(
'label' => $langs->trans('Modelcsv_Gestinumv5'),
'ACCOUNTING_EXPORT_FORMAT' => 'txt',
),
self::$EXPORT_TYPE_FEC => array(
'label' => $langs->trans('Modelcsv_FEC'),
@ -320,10 +322,10 @@ class AccountancyExport
case self::$EXPORT_TYPE_LDCOMPTA10 :
$this->exportLDCompta10($TData);
break;
case self::$EXPORT_TYPE_GESTINUMV3 :
case self::$EXPORT_TYPE_GESTIMUMV3 :
$this->exportGestimumV3($TData);
break;
case self::$EXPORT_TYPE_GESTINUMV5 :
case self::$EXPORT_TYPE_GESTIMUMV5 :
$this->exportGestimumV5($TData);
break;
case self::$EXPORT_TYPE_FEC :
@ -1628,81 +1630,85 @@ class AccountancyExport
$invoices_infos = array();
$supplier_invoices_infos = array();
foreach ($objectLines as $line) {
$date = dol_print_date($line->doc_date, '%d/%m/%Y');
$invoice_ref = $line->doc_ref;
$company_name = "";
if (($line->doc_type == 'customer_invoice' || $line->doc_type == 'supplier_invoice') && $line->fk_doc > 0) {
if (($line->doc_type == 'customer_invoice' && !isset($invoices_infos[$line->fk_doc])) ||
($line->doc_type == 'supplier_invoice' && !isset($supplier_invoices_infos[$line->fk_doc]))) {
if ($line->doc_type == 'customer_invoice') {
// Get new customer invoice ref and company name
$sql = 'SELECT f.ref, s.nom FROM ' . MAIN_DB_PREFIX . 'facture as f';
$sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'societe AS s ON f.fk_soc = s.rowid';
$sql .= ' WHERE f.rowid = ' . $line->fk_doc;
$resql = $this->db->query($sql);
if ($resql) {
if ($obj = $this->db->fetch_object($resql)) {
// Save invoice infos
$invoices_infos[$line->fk_doc] = array('ref' => $obj->ref, 'company_name' => $obj->nom);
$invoice_ref = $obj->ref;
$company_name = $obj->nom;
}
}
} else {
// Get new supplier invoice ref and company name
$sql = 'SELECT ff.ref, s.nom FROM ' . MAIN_DB_PREFIX . 'facture_fourn as ff';
$sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'societe AS s ON ff.fk_soc = s.rowid';
$sql .= ' WHERE ff.rowid = ' . $line->fk_doc;
$resql = $this->db->query($sql);
if ($resql) {
if ($obj = $this->db->fetch_object($resql)) {
// Save invoice infos
$supplier_invoices_infos[$line->fk_doc] = array('ref' => $obj->ref, 'company_name' => $obj->nom);
$invoice_ref = $obj->ref;
$company_name = $obj->nom;
}
}
}
} elseif ($line->doc_type == 'customer_invoice') {
// Retrieve invoice infos
$invoice_ref = $invoices_infos[$line->fk_doc]['ref'];
$company_name = $invoices_infos[$line->fk_doc]['company_name'];
} else {
// Retrieve invoice infos
$invoice_ref = $supplier_invoices_infos[$line->fk_doc]['ref'];
$company_name = $supplier_invoices_infos[$line->fk_doc]['company_name'];
}
}
print $line->id . $this->separator;
print $date . $this->separator;
print substr($line->code_journal, 0, 4) . $this->separator;
if ((substr($line->numero_compte, 0, 3) == '411') || (substr($line->numero_compte, 0, 3) == '401')) {
print length_accountg($line->subledger_account) . $this->separator;
if ($line->debit == 0 && $line->credit == 0) {
unset($array[$line]);
} else {
print substr(length_accountg($line->numero_compte), 0, 15) . $this->separator;
$date = dol_print_date($line->doc_date, '%d/%m/%Y');
$invoice_ref = $line->doc_ref;
$company_name = "";
if (($line->doc_type == 'customer_invoice' || $line->doc_type == 'supplier_invoice') && $line->fk_doc > 0) {
if (($line->doc_type == 'customer_invoice' && !isset($invoices_infos[$line->fk_doc])) ||
($line->doc_type == 'supplier_invoice' && !isset($supplier_invoices_infos[$line->fk_doc]))) {
if ($line->doc_type == 'customer_invoice') {
// Get new customer invoice ref and company name
$sql = 'SELECT f.ref, s.nom FROM ' . MAIN_DB_PREFIX . 'facture as f';
$sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'societe AS s ON f.fk_soc = s.rowid';
$sql .= ' WHERE f.rowid = ' . $line->fk_doc;
$resql = $this->db->query($sql);
if ($resql) {
if ($obj = $this->db->fetch_object($resql)) {
// Save invoice infos
$invoices_infos[$line->fk_doc] = array('ref' => $obj->ref, 'company_name' => $obj->nom);
$invoice_ref = $obj->ref;
$company_name = $obj->nom;
}
}
} else {
// Get new supplier invoice ref and company name
$sql = 'SELECT ff.ref, s.nom FROM ' . MAIN_DB_PREFIX . 'facture_fourn as ff';
$sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'societe AS s ON ff.fk_soc = s.rowid';
$sql .= ' WHERE ff.rowid = ' . $line->fk_doc;
$resql = $this->db->query($sql);
if ($resql) {
if ($obj = $this->db->fetch_object($resql)) {
// Save invoice infos
$supplier_invoices_infos[$line->fk_doc] = array('ref' => $obj->ref, 'company_name' => $obj->nom);
$invoice_ref = $obj->ref;
$company_name = $obj->nom;
}
}
}
} elseif ($line->doc_type == 'customer_invoice') {
// Retrieve invoice infos
$invoice_ref = $invoices_infos[$line->fk_doc]['ref'];
$company_name = $invoices_infos[$line->fk_doc]['company_name'];
} else {
// Retrieve invoice infos
$invoice_ref = $supplier_invoices_infos[$line->fk_doc]['ref'];
$company_name = $supplier_invoices_infos[$line->fk_doc]['company_name'];
}
}
print $line->id . $this->separator;
print $date . $this->separator;
print substr($line->code_journal, 0, 4) . $this->separator;
if ((substr($line->numero_compte, 0, 3) == '411') || (substr($line->numero_compte, 0, 3) == '401')) {
print length_accountg($line->subledger_account) . $this->separator;
} else {
print substr(length_accountg($line->numero_compte), 0, 15) . $this->separator;
}
//Libellé Auto
print $this->separator;
//print '"'.dol_trunc(str_replace('"', '', $line->label_operation),40,'right','UTF-8',1).'"' . $this->separator;
//Libellé manuel
print dol_trunc(str_replace('"', '', $invoice_ref . (!empty($company_name) ? ' - ' : '') . $company_name), 40, 'right', 'UTF-8', 1) . $this->separator;
//Numéro de pièce
print dol_trunc(str_replace('"', '', $line->piece_num), 10, 'right', 'UTF-8', 1) . $this->separator;
//Devise
print 'EUR' . $this->separator;
//Montant
print price2num(abs($line->montant)) . $this->separator;
//Sens
print $line->sens . $this->separator;
//Code lettrage
print $this->separator;
//Date Echéance
print $date;
print $this->end_line;
}
//Libellé Auto
print $this->separator;
//print '"'.dol_trunc(str_replace('"', '', $line->label_operation),40,'right','UTF-8',1).'"' . $this->separator;
//Libellé manuel
print dol_trunc(str_replace('"', '', $invoice_ref . (!empty($company_name) ? ' - ' : '') . $company_name), 40, 'right', 'UTF-8', 1) . $this->separator;
//Numéro de pièce
print dol_trunc(str_replace('"', '', $line->piece_num), 10, 'right', 'UTF-8', 1) . $this->separator;
//Devise
print 'EUR' . $this->separator;
//Montant
print price2num(abs($line->montant)) . $this->separator;
//Sens
print $line->sens . $this->separator;
//Code lettrage
print $this->separator;
//Date Echéance
print $date;
print $this->end_line;
}
}
@ -1719,27 +1725,31 @@ class AccountancyExport
$this->separator = ',';
foreach ($objectLines as $line) {
$date = dol_print_date($line->doc_date, '%d%m%Y');
print $line->id . $this->separator;
print $date . $this->separator;
print substr($line->code_journal, 0, 4) . $this->separator;
if ((substr($line->numero_compte, 0, 3) == '411') || (substr($line->numero_compte, 0, 3) == '401')) {
print length_accountg($line->subledger_account) . $this->separator;
if ($line->debit == 0 && $line->credit == 0) {
unset($array[$line]);
} else {
print substr(length_accountg($line->numero_compte), 0, 15) . $this->separator;
$date = dol_print_date($line->doc_date, '%d%m%Y');
print $line->id . $this->separator;
print $date . $this->separator;
print substr($line->code_journal, 0, 4) . $this->separator;
if ((substr($line->numero_compte, 0, 3) == '411') || (substr($line->numero_compte, 0, 3) == '401')) {
print length_accountg($line->subledger_account) . $this->separator;
} else {
print substr(length_accountg($line->numero_compte), 0, 15) . $this->separator;
}
print $this->separator;
//print '"'.dol_trunc(str_replace('"', '', $line->label_operation),40,'right','UTF-8',1).'"' . $this->separator;
print '"' . dol_trunc(str_replace('"', '', $line->doc_ref), 40, 'right', 'UTF-8', 1) . '"' . $this->separator;
print '"' . dol_trunc(str_replace('"', '', $line->piece_num), 10, 'right', 'UTF-8', 1) . '"' . $this->separator;
print price2num($line->montant) . $this->separator;
print $line->sens . $this->separator;
print $date . $this->separator;
print $this->separator;
print $this->separator;
print 'EUR';
print $this->end_line;
}
print $this->separator;
//print '"'.dol_trunc(str_replace('"', '', $line->label_operation),40,'right','UTF-8',1).'"' . $this->separator;
print '"'.dol_trunc(str_replace('"', '', $line->doc_ref), 40, 'right', 'UTF-8', 1).'"' . $this->separator;
print '"'.dol_trunc(str_replace('"', '', $line->piece_num), 10, 'right', 'UTF-8', 1).'"'.$this->separator;
print price2num($line->montant).$this->separator;
print $line->sens.$this->separator;
print $date . $this->separator;
print $this->separator;
print $this->separator;
print 'EUR';
print $this->end_line;
}
}

View File

@ -1914,25 +1914,24 @@ class BookKeeping extends CommonObject
/**
* Return id and description of a root accounting account.
* This function takes the parent of parent to get the root account !
* FIXME: This function takes the parent of parent to get the root account !
*
* @param string $account Accounting account
* @return string Root account
* @return array Array with root account information (max 2 upper level)
*/
public function getRootAccount($account = null)
{
global $conf;
$pcgver = $conf->global->CHARTOFACCOUNTS;
$sql = "SELECT root.rowid, root.account_number, root.label as label";
$sql = "SELECT root.rowid, root.account_number, root.label as label,";
$sql .= " parent.rowid as parent_rowid, parent.account_number as parent_account_number, parent.label as parent_label";
$sql .= " FROM ".MAIN_DB_PREFIX."accounting_account as aa";
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
$sql .= " AND asy.rowid = ".((int) $pcgver);
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as parent ON aa.account_parent = parent.rowid";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as root ON parent.account_parent = root.rowid";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as parent ON aa.account_parent = parent.rowid AND parent.active = 1";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as root ON parent.account_parent = root.rowid AND root.active = 1";
$sql .= " WHERE aa.account_number = '".$this->db->escape($account)."'";
$sql .= " AND parent.active = 1";
$sql .= " AND root.active = 1";
$sql .= " AND aa.entity IN (".getEntity('accountancy').")";
dol_syslog(get_class($this)."::select_account sql=".$sql, LOG_DEBUG);
@ -1943,7 +1942,8 @@ class BookKeeping extends CommonObject
$obj = $this->db->fetch_object($resql);
}
return array('id'=>$obj->rowid, 'account_number'=>$obj->account_number, 'label'=>$obj->label);
$result = array('id'=>$obj->rowid, 'account_number'=>$obj->account_number, 'label'=>$obj->label);
return $result;
} else {
$this->error = "Error ".$this->db->lasterror();
dol_syslog(__METHOD__." ".$this->error, LOG_ERR);

View File

@ -136,7 +136,7 @@ if ($action == 'update' || $action == 'add') {
$constnote = GETPOST('constnote');
$res = dolibarr_set_const($db, $constname, $constvalue, $choices[$consttype], 0, $constnote, $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');

View File

@ -92,7 +92,7 @@ if ($action == 'update' || $action == 'add') {
$res = dolibarr_set_const($db, $constname, $constvalue, $typetouse, 0, $constnote, $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');

View File

@ -63,7 +63,7 @@ if ($action == 'update') {
$res = dolibarr_set_const($db, "MEMBER_NEWFORM_FORCETYPE", $forcetype, 'chaine', 0, '', $conf->entity);
}
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');

View File

@ -97,7 +97,7 @@ if ($action == "save" && empty($cancel))
if ($search_event === '' || preg_match('/'.preg_quote($search_event, '/').'/i', $keyparam))
{
$res = dolibarr_set_const($db, $keyparam, (GETPOST($keyparam, 'alpha') ?GETPOST($keyparam, 'alpha') : ''), 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
}
}

View File

@ -82,15 +82,15 @@ if ($actionsave)
//print '-name='.$name.'-color='.$color;
$res = dolibarr_set_const($db, 'AGENDA_EXT_NAME'.$i, $name, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
$res = dolibarr_set_const($db, 'AGENDA_EXT_SRC'.$i, $src, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
$res = dolibarr_set_const($db, 'AGENDA_EXT_OFFSETTZ'.$i, $offsettz, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
$res = dolibarr_set_const($db, 'AGENDA_EXT_COLOR'.$i, $color, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
$res = dolibarr_set_const($db, 'AGENDA_EXT_ENABLED'.$i, $enabled, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
$i++;
}
@ -98,7 +98,7 @@ if ($actionsave)
if (!$error)
{
$res = dolibarr_set_const($db, 'AGENDA_EXT_NB', trim(GETPOST('AGENDA_EXT_NB', 'int')), 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (empty($conf->global->AGENDA_EXT_NB)) $conf->global->AGENDA_EXT_NB = 5;
$MAXAGENDA = empty($conf->global->AGENDA_EXT_NB) ? 5 : $conf->global->AGENDA_EXT_NB;
}

View File

@ -51,6 +51,7 @@ $type = 'action';
include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
$reg = array();
if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg))
{
$code = $reg[1];

View File

@ -112,7 +112,7 @@ if ($actionsave)
if ($color == '-1') $color = '';
$res = dolibarr_set_const($db, 'BANK_COLORIZE_MOVEMENT_COLOR'.$i, $color, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
$i++;
}

View File

@ -52,7 +52,7 @@ if ($action == 'updateMask')
if ($maskconstbom) $res = dolibarr_set_const($db, $maskconstbom, $maskbom, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{
@ -141,7 +141,7 @@ elseif ($action == 'setdoc')
$draft = GETPOST("BOM_DRAFT_WATERMARK");
$res = dolibarr_set_const($db, "BOM_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{
@ -155,7 +155,7 @@ elseif ($action == 'setdoc')
$res = dolibarr_set_const($db, "BOM_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{

View File

@ -55,7 +55,7 @@ if ($action == 'updateMask')
$maskchequereceipts = GETPOST('maskchequereceipts', 'alpha');
if ($maskconstchequereceipts) $res = dolibarr_set_const($db, $maskconstchequereceipts, $maskchequereceipts, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{
@ -76,7 +76,7 @@ if ($action == 'set_BANK_CHEQUERECEIPT_FREE_TEXT')
$res = dolibarr_set_const($db, "BANK_CHEQUERECEIPT_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{

View File

@ -61,7 +61,7 @@ if ($action == 'updateMask')
if ($maskconstorder) $res = dolibarr_set_const($db, $maskconstorder, $maskorder, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{
@ -146,7 +146,7 @@ elseif ($action == 'setdoc') {
$draft = GETPOST("COMMANDE_DRAFT_WATERMARK");
$res = dolibarr_set_const($db, "COMMANDE_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{
@ -160,7 +160,7 @@ elseif ($action == 'setdoc') {
$res = dolibarr_set_const($db, "ORDER_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{
@ -172,7 +172,7 @@ elseif ($action == 'setdoc') {
// Activate Set Shippable Icon In List
$setshippableiconinlist = GETPOST('value', 'int');
$res = dolibarr_set_const($db, "SHIPPABLE_ORDER_ICON_IN_LIST", $setshippableiconinlist, 'yesno', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
@ -186,7 +186,7 @@ elseif ($action == 'setdoc') {
$res = dolibarr_set_const($db, "FACTURE_RIB_NUMBER", $rib, 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, "FACTURE_CHQ_NUMBER", $chq, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{
@ -201,7 +201,7 @@ elseif ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_ORDER')
{
$res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_ORDER", $value, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{
@ -216,7 +216,7 @@ elseif ($action == 'set_WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER')
{
$res = dolibarr_set_const($db, "WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER", $value, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{

View File

@ -57,7 +57,7 @@ if ($action == 'updateMask')
$maskvalue = GETPOST('maskcontract', 'alpha');
if ($maskconst) $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{

View File

@ -58,7 +58,7 @@ if ($action == 'updateMask')
$maskdelivery = GETPOST('maskdelivery', 'alpha');
if ($maskconstdelivery) $res = dolibarr_set_const($db, $maskconstdelivery, $maskdelivery, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{
@ -73,7 +73,7 @@ if ($action == 'set_DELIVERY_FREE_TEXT')
$free = GETPOST('DELIVERY_FREE_TEXT', 'restricthtml'); // No alpha here, we want exact string
$res = dolibarr_set_const($db, "DELIVERY_FREE_TEXT", $free, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{

View File

@ -236,7 +236,7 @@ $tabsqlsort[3] = "country ASC, code ASC";
$tabsqlsort[4] = "code ASC";
$tabsqlsort[5] = "label ASC";
$tabsqlsort[6] = "a.type ASC, a.module ASC, a.position ASC, a.code ASC";
$tabsqlsort[7] = "country ASC, code ASC, a.libelle ASC";
$tabsqlsort[7] = "c.label ASC, a.code ASC, a.libelle ASC";
$tabsqlsort[8] = "country DESC,".(!empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? ' t.position ASC,' : '')." libelle ASC";
$tabsqlsort[9] = "label ASC";
$tabsqlsort[10] = "country ASC, code ASC, taux ASC, recuperableonly ASC, localtax1 ASC, localtax2 ASC";
@ -1069,6 +1069,7 @@ if ($id)
elseif ($search_code != '' && $id == 28) $sql .= natural_search("h.code", $search_code);
elseif ($search_code != '' && $id == 32) $sql .= natural_search("a.code", $search_code);
elseif ($search_code != '' && $id == 3) $sql .= natural_search("r.code_region", $search_code);
elseif ($search_code != '' && $id == 7) $sql .= natural_search("a.code", $search_code);
elseif ($search_code != '' && $id != 9) $sql .= natural_search("code", $search_code);
if ($sortfield)
@ -1107,7 +1108,6 @@ if ($id)
// Form to add a new line
if ($tabname[$id])
{
$alabelisused = 0;
$withentity = null;
$fieldlist = explode(',', $tabfield[$id]);
@ -1214,7 +1214,6 @@ if ($id)
else $tdsoffields .= $valuetoshow;
$tdsoffields .= '</td>';
}
if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') $alabelisused = 1;
}
if ($id == 4) $tdsoffields .= '<td></td>';

View File

@ -58,7 +58,9 @@ if ($action == 'updateMask')
$maskvalue = GETPOST('maskvalue', 'alpha');
if ($maskconst) $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) {
$error++;
}
if (!$error)
{

View File

@ -66,7 +66,7 @@ if ($action == 'updateMask')
if ($maskconstcredit) $res = dolibarr_set_const($db, $maskconstcredit, $maskcredit, 'chaine', 0, '', $conf->entity);
if ($maskconstdeposit) $res = dolibarr_set_const($db, $maskconstdeposit, $maskdeposit, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{
@ -156,7 +156,7 @@ elseif ($action == 'setdoc')
$res = dolibarr_set_const($db, "FACTURE_RIB_NUMBER", $rib, 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, "FACTURE_CHQ_NUMBER", $chq, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{
@ -170,7 +170,7 @@ elseif ($action == 'setdoc')
$res = dolibarr_set_const($db, "FACTURE_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{
@ -184,7 +184,7 @@ elseif ($action == 'setdoc')
$res = dolibarr_set_const($db, "INVOICE_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{
@ -198,7 +198,7 @@ elseif ($action == 'setdoc')
$res = dolibarr_set_const($db, "FAC_FORCE_DATE_VALIDATION", $forcedate, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{
@ -217,7 +217,7 @@ elseif ($action == 'setdoc')
foreach ($invoicetypemodels as $type => $value)
{
$res = dolibarr_set_const($db, 'FACTURE_ADDON_PDF_'.intval($type), $value, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
}
if (!$error)

View File

@ -58,7 +58,7 @@ if ($action == 'updateMask')
$maskvalue = GETPOST('maskvalue', 'alpha');
if ($maskconst) $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{
@ -147,7 +147,7 @@ elseif ($action == 'setdoc')
$freetext = GETPOST('FICHINTER_FREE_TEXT', 'restricthtml'); // No alpha here, we want exact string
$res = dolibarr_set_const($db, "FICHINTER_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{
@ -160,7 +160,7 @@ elseif ($action == 'setdoc')
$draft = GETPOST('FICHINTER_DRAFT_WATERMARK', 'alpha');
$res = dolibarr_set_const($db, "FICHINTER_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{
@ -173,7 +173,7 @@ elseif ($action == 'setdoc')
$val = GETPOST('FICHINTER_PRINT_PRODUCTS', 'alpha');
$res = dolibarr_set_const($db, "FICHINTER_PRINT_PRODUCTS", ($val == 'on' ? 1 : 0), 'bool', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{
@ -185,7 +185,7 @@ elseif ($action == 'setdoc')
$val = GETPOST('FICHINTER_USE_SERVICE_DURATION', 'alpha');
$res = dolibarr_set_const($db, "FICHINTER_USE_SERVICE_DURATION", ($val == 'on' ? 1 : 0), 'bool', 0, '', $conf->entity);
if (!$res > 0) {
if (!($res > 0)) {
$error++;
}
@ -198,7 +198,7 @@ elseif ($action == 'setdoc')
$val = GETPOST('FICHINTER_WITHOUT_DURATION', 'alpha');
$res = dolibarr_set_const($db, "FICHINTER_WITHOUT_DURATION", ($val == 'on' ? 1 : 0), 'bool', 0, '', $conf->entity);
if (!$res > 0) {
if (!($res > 0)) {
$error++;
}
@ -211,7 +211,7 @@ elseif ($action == 'setdoc')
$val = GETPOST('FICHINTER_DATE_WITHOUT_HOUR', 'alpha');
$res = dolibarr_set_const($db, "FICHINTER_DATE_WITHOUT_HOUR", ($val == 'on' ? 1 : 0), 'bool', 0, '', $conf->entity);
if (!$res > 0) {
if (!($res > 0)) {
$error++;
}

View File

@ -59,7 +59,7 @@ if ($action == 'updateMask')
$maskvalue = GETPOST('maskholiday', 'alpha');
if ($maskconst) $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{

View File

@ -51,15 +51,17 @@ if ($action == 'setvalue')
$mailingdelay = GETPOST('MAILING_DELAY', 'int');
$res = dolibarr_set_const($db, "MAILING_EMAIL_FROM", $mailfrom, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
$res = dolibarr_set_const($db, "MAILING_EMAIL_ERRORSTO", $mailerror, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
$res = dolibarr_set_const($db, "MAILING_DELAY", $mailingdelay, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
$res = dolibarr_set_const($db, "MAILING_CONTACT_DEFAULT_BULK_STATUS", $contactbulkdefault, 'chaine', 0, '', $conf->entity);
if (!($res > 0)) $error++;
// Create temporary encryption key if nedded
$res = dolibarr_set_const($db, "MAILING_EMAIL_UNSUBSCRIBE_KEY", $checkread_key, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{

View File

@ -59,7 +59,7 @@ if ($action == 'update' || $action == 'add')
$constnote = $_POST["constnote"][$key];
$res = dolibarr_set_const($db, $constname, $constvalue, $type[$consttype], 0, $constnote, $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
}
if (!$error)

View File

@ -532,6 +532,7 @@ if ($action == 'edit')
print '<span class="opacitymedium">'.$langs->trans("EMailsDesc")."</span><br>\n";
print "<br>\n";
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
print '<table class="noborder centpercent">';
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
@ -552,10 +553,12 @@ if ($action == 'edit')
}
print '</table>';
print '</div>';
if (empty($conf->global->MAIN_DISABLE_ALL_MAILS)) {
print '<br>';
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
print '<table class="noborder centpercent">';
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("MAIN_MAIL_SENDMODE").'</td><td></td></tr>';
@ -663,6 +666,7 @@ if ($action == 'edit')
}
print '</table>';
print '</div>';
if ($conf->global->MAIN_MAIL_SENDMODE == 'mail' && empty($conf->global->MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP)) {
print info_admin($langs->trans("WarningPHPMail").'<br>'.$langs->trans("WarningPHPMailA").'<br>'.$langs->trans("WarningPHPMailB").'<br>'.$langs->trans("WarningPHPMailC").'<br><br>'.$langs->trans("WarningPHPMailD"), 0, 0, 'warning');
@ -670,13 +674,15 @@ if ($action == 'edit')
print '<br>';
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
print '<table class="noborder centpercent">';
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("OtherOptions").'</td><td></td></tr>';
// From
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_EMAIL_FROM", ini_get('sendmail_from') ?ini_get('sendmail_from') : $langs->transnoentities("Undefined")).'</td>';
print '<td>'.$conf->global->MAIN_MAIL_EMAIL_FROM;
if (!empty($conf->global->MAIN_MAIL_EMAIL_FROM) && !isValidEmail($conf->global->MAIN_MAIL_EMAIL_FROM)) print img_warning($langs->trans("ErrorBadEMail"));
if (empty($conf->global->MAIN_MAIL_EMAIL_FROM)) print img_warning($langs->trans("Mandatory"));
elseif (!isValidEmail($conf->global->MAIN_MAIL_EMAIL_FROM)) print img_warning($langs->trans("ErrorBadEMail"));
print '</td></tr>';
// Default from type
@ -746,6 +752,7 @@ if ($action == 'edit')
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_ENABLED_USER_DEST_SELECT").'</td><td>'.yn($conf->global->MAIN_MAIL_ENABLED_USER_DEST_SELECT).'</td></tr>';
print '</table>';
print '</div>';
}
print dol_get_fiche_end();

View File

@ -53,7 +53,7 @@ if ($action == 'updateMask')
if ($maskconstmrp) $res = dolibarr_set_const($db, $maskconstmrp, $maskmrp, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{
@ -142,7 +142,7 @@ elseif ($action == 'setdoc')
$draft = GETPOST("MRP_MO_DRAFT_WATERMARK");
$res = dolibarr_set_const($db, "MRP_MO_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{
@ -156,7 +156,7 @@ elseif ($action == 'setdoc')
$res = dolibarr_set_const($db, "MRP_MO_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{

View File

@ -51,7 +51,7 @@ if ($action == 'updateMask')
$maskpayment = GETPOST('maskpayment', 'alpha');
if ($maskconstpayment) $res = dolibarr_set_const($db, $maskconstpayment, $maskpayment, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{
@ -70,10 +70,10 @@ if ($action == 'setparams')
{
$freetext = GETPOST('FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS', 'restricthtml'); // No alpha here, we want exact string
$res = dolibarr_set_const($db, "FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS", $freetext, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
$res = dolibarr_set_const($db, "PAYMENTS_REPORT_GROUP_BY_MOD", GETPOST('PAYMENTS_REPORT_GROUP_BY_MOD', 'int'), 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if ($error)
{

View File

@ -53,7 +53,7 @@ if ($action == "set")
if ($account->fetch($id) > 0)
{
$res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT", $id, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
/*
$res = dolibarr_set_const($db, "PRELEVEMENT_CODE_BANQUE", $account->code_banque,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++;
@ -73,29 +73,29 @@ if ($action == "set")
} else $error++;
$res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_ICS", GETPOST("PAYMENTBYBANKTRANSFER_ICS"), 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (GETPOST("PAYMENTBYBANKTRANSFER_USER") > 0)
{
$res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_USER", GETPOST("PAYMENTBYBANKTRANSFER_USER"), 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
}
/*
if (GETPOST("PAYMENTBYBANKTRANSFER_END_TO_END") || GETPOST("PAYMENTBYBANKTRANSFER_END_TO_END") == "")
{
$res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_END_TO_END", GETPOST("PAYMENTBYBANKTRANSFER_END_TO_END"), 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
}
if (GETPOST("PAYMENTBYBANKTRANSFER_USTRD") || GETPOST("PAYMENTBYBANKTRANSFER_USTRD") == "")
{
$res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_USTRD", GETPOST("PAYMENTBYBANKTRANSFER_USTRD"), 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
}
*/
if (GETPOST("PAYMENTBYBANKTRANSFER_ADDDAYS") || GETPOST("PAYMENTBYBANKTRANSFER_ADDDAYS") == "")
{
$res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_ADDDAYS", GETPOST("PAYMENTBYBANKTRANSFER_ADDDAYS"), 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
} elseif (!$error)
{
$db->commit();

View File

@ -55,7 +55,7 @@ if ($action == "set")
if ($account->fetch($id) > 0)
{
$res = dolibarr_set_const($db, "PRELEVEMENT_ID_BANKACCOUNT", $id, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
/*
$res = dolibarr_set_const($db, "PRELEVEMENT_CODE_BANQUE", $account->code_banque,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++;
@ -75,7 +75,7 @@ if ($action == "set")
} else $error++;
$res = dolibarr_set_const($db, "PRELEVEMENT_ICS", GETPOST("PRELEVEMENT_ICS"), 'chaine', 0, '', $conf->entity);
if (! ($res > 0)) $error++;
if (!($res > 0)) $error++;
if (GETPOST("PRELEVEMENT_USER") > 0) {
$res = dolibarr_set_const($db, "PRELEVEMENT_USER", GETPOST("PRELEVEMENT_USER"), 'chaine', 0, '', $conf->entity);

View File

@ -57,7 +57,7 @@ if ($action == 'updateMask') {
$maskpropal = GETPOST('maskpropal', 'alpha');
if ($maskconstpropal) $res = dolibarr_set_const($db, $maskconstpropal, $maskpropal, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{
@ -109,7 +109,7 @@ if ($action == 'updateMask') {
$res = dolibarr_set_const($db, "FACTURE_RIB_NUMBER", $rib, 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, "FACTURE_CHQ_NUMBER", $chq, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{
@ -121,7 +121,7 @@ if ($action == 'updateMask') {
$draft = GETPOST('PROPALE_DRAFT_WATERMARK', 'alpha');
$res = dolibarr_set_const($db, "PROPALE_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{
@ -134,7 +134,7 @@ if ($action == 'updateMask') {
$res = dolibarr_set_const($db, "PROPOSAL_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{
@ -145,7 +145,7 @@ if ($action == 'updateMask') {
} elseif ($action == 'setdefaultduration') {
$res = dolibarr_set_const($db, "PROPALE_VALIDITY_DURATION", $value, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{
@ -156,7 +156,7 @@ if ($action == 'updateMask') {
} elseif ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL') {
$res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL", $value, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');

View File

@ -67,7 +67,7 @@ if ($action == 'update' || $action == 'add')
$res = dolibarr_set_const($db, $constname, $constvalue, $type[$consttype], 0, $constnote, $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
}
if (!$error)

View File

@ -96,7 +96,7 @@ if ($action == 'warehouse')
if ($value == -1 || empty($value) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) {
$res = dolibarr_del_const($db, "MAIN_DEFAULT_WAREHOUSE", $conf->entity);
}
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
}
if ($action == 'specimen')

View File

@ -65,7 +65,7 @@ if ($action == 'updateMask')
if ($maskconstinvoice) $res = dolibarr_set_const($db, $maskconstinvoice, $maskinvoice, 'chaine', 0, '', $conf->entity);
if ($maskconstcredit) $res = dolibarr_set_const($db, $maskconstcredit, $maskcredit, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{
@ -170,7 +170,7 @@ if ($action == 'set_SUPPLIER_INVOICE_FREE_TEXT')
$res = dolibarr_set_const($db, "SUPPLIER_INVOICE_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{

View File

@ -63,7 +63,7 @@ if ($action == 'updateMask')
if ($maskconstorder) $res = dolibarr_set_const($db, $maskconstorder, $maskvalue, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{
@ -194,7 +194,7 @@ elseif ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER')
{
$res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER", $value, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{

View File

@ -52,7 +52,7 @@ if ($action == 'updateMask')
$masksupplierpayment = GETPOST('masksupplierpayment', 'alpha');
if ($maskconstsupplierpayment) $res = dolibarr_set_const($db, $maskconstsupplierpayment, $masksupplierpayment, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{
@ -136,7 +136,7 @@ elseif ($action == 'setdoc')
} elseif ($action == 'setparams')
{
$res = dolibarr_set_const($db, "PAYMENTS_FOURN_REPORT_GROUP_BY_MOD", GETPOST('PAYMENTS_FOURN_REPORT_GROUP_BY_MOD', 'int'), 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if ($error)
{

View File

@ -55,7 +55,7 @@ if ($action == 'updateMask')
$masksupplier_proposal = GETPOST('masksupplier_proposal', 'alpha');
if ($maskconstsupplier_proposal) $res = dolibarr_set_const($db, $maskconstsupplier_proposal, $masksupplier_proposal, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{
@ -111,7 +111,7 @@ if ($action == 'set_SUPPLIER_PROPOSAL_DRAFT_WATERMARK')
$draft = GETPOST('SUPPLIER_PROPOSAL_DRAFT_WATERMARK', 'alpha');
$res = dolibarr_set_const($db, "SUPPLIER_PROPOSAL_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{
@ -127,7 +127,7 @@ if ($action == 'set_SUPPLIER_PROPOSAL_FREE_TEXT')
$res = dolibarr_set_const($db, "SUPPLIER_PROPOSAL_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{
@ -141,7 +141,7 @@ if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL')
{
$res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL", $value, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{

View File

@ -138,7 +138,7 @@ if ($action == 'setlevel')
$res = dolibarr_set_const($db, "SYSLOG_LEVEL", $level, 'chaine', 0, '', 0);
dol_syslog("admin/syslog: level ".$level);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{
@ -146,7 +146,7 @@ if ($action == 'setlevel')
$res = dolibarr_set_const($db, "SYSLOG_FILE_SAVES", $file_saves, 'chaine', 0, '', 0);
dol_syslog("admin/syslog: file saves ".$file_saves);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
}
if (!$error)

View File

@ -65,7 +65,7 @@ if ($action == 'update') {
$db->begin();
$res = dolibarr_set_const($db, 'TAX_MODE', $tax_mode, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
switch ($tax_mode)
{
@ -90,13 +90,13 @@ if ($action == 'update') {
}
$res = dolibarr_set_const($db, 'TAX_MODE_SELL_PRODUCT', $valuesellproduct, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
$res = dolibarr_set_const($db, 'TAX_MODE_BUY_PRODUCT', $valuebuyproduct, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
$res = dolibarr_set_const($db, 'TAX_MODE_SELL_SERVICE', $valuesellservice, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
$res = dolibarr_set_const($db, 'TAX_MODE_BUY_SERVICE', $valuebuyservice, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
dolibarr_set_const($db, "MAIN_INFO_TVAINTRA", GETPOST("tva", 'alpha'), 'chaine', 0, '', $conf->entity);

View File

@ -59,7 +59,7 @@ if ($action == 'updateMask') {
$res = dolibarr_set_const($db, $maskconstticket, $maskticket, 'chaine', 0, '', $conf->entity);
}
if (!$res > 0) {
if (!($res > 0)) {
$error++;
}
@ -113,7 +113,7 @@ elseif ($action == 'setmod') {
} else {
$res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_EMAIL_FROM', '', 'chaine', 0, '', $conf->entity);
}
if (!$res > 0) {
if (!($res > 0)) {
$error++;
}
@ -124,7 +124,7 @@ elseif ($action == 'setmod') {
} else {
$res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_EMAIL_TO', '', 'chaine', 0, '', $conf->entity);
}
if (!$res > 0) {
if (!($res > 0)) {
$error++;
}
@ -134,7 +134,7 @@ elseif ($action == 'setmod') {
} else {
$res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_INTRO', $langs->trans('TicketMessageMailIntroText'), 'chaine', 0, '', $conf->entity);
}
if (!$res > 0) {
if (!($res > 0)) {
$error++;
}
@ -144,7 +144,7 @@ elseif ($action == 'setmod') {
} else {
$res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_SIGNATURE', $langs->trans('TicketMessageMailSignatureText'), 'chaine', 0, '', $conf->entity);
}
if (!$res > 0) {
if (!($res > 0)) {
$error++;
}
}
@ -152,13 +152,13 @@ elseif ($action == 'setmod') {
if ($action == 'setvarother') {
$param_must_exists = GETPOST('TICKET_EMAIL_MUST_EXISTS', 'alpha');
$res = dolibarr_set_const($db, 'TICKET_EMAIL_MUST_EXISTS', $param_must_exists, 'chaine', 0, '', $conf->entity);
if (!$res > 0) {
if (!($res > 0)) {
$error++;
}
$param_disable_email = GETPOST('TICKET_DISABLE_NOTIFICATION_MAILS', 'alpha');
$res = dolibarr_set_const($db, 'TICKET_DISABLE_NOTIFICATION_MAILS', $param_disable_email, 'chaine', 0, '', $conf->entity);
if (!$res > 0) {
if (!($res > 0)) {
$error++;
}
@ -166,7 +166,7 @@ if ($action == 'setvarother') {
{
$param_show_module_logo = GETPOST('TICKET_SHOW_MODULE_LOGO', 'alpha');
$res = dolibarr_set_const($db, 'TICKET_SHOW_MODULE_LOGO', $param_show_module_logo, 'chaine', 0, '', $conf->entity);
if (!$res > 0) {
if (!($res > 0)) {
$error++;
}
}
@ -175,20 +175,20 @@ if ($action == 'setvarother') {
{
$param_notification_also_main_addressemail = GETPOST('TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS', 'alpha');
$res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS', $param_notification_also_main_addressemail, 'chaine', 0, '', $conf->entity);
if (!$res > 0) {
if (!($res > 0)) {
$error++;
}
}
$param_limit_view = GETPOST('TICKET_LIMIT_VIEW_ASSIGNED_ONLY', 'alpha');
$res = dolibarr_set_const($db, 'TICKET_LIMIT_VIEW_ASSIGNED_ONLY', $param_limit_view, 'chaine', 0, '', $conf->entity);
if (!$res > 0) {
if (!($res > 0)) {
$error++;
}
$param_auto_assign = GETPOST('TICKET_AUTO_ASSIGN_USER_CREATE', 'alpha');
$res = dolibarr_set_const($db, 'TICKET_AUTO_ASSIGN_USER_CREATE', $param_auto_assign, 'chaine', 0, '', $conf->entity);
if (!$res > 0) {
if (!($res > 0)) {
$error++;
}
}

View File

@ -63,7 +63,7 @@ if ($action == 'setvar') {
} else {
$res = dolibarr_set_const($db, 'TICKET_PUBLIC_INTERFACE_TOPIC', '', 'chaine', 0, '', $conf->entity);
}
if (!$res > 0) {
if (!($res > 0)) {
$error++;
}
@ -73,7 +73,7 @@ if ($action == 'setvar') {
} else {
$res = dolibarr_set_const($db, 'TICKET_PUBLIC_TEXT_HOME', $langs->trans('TicketPublicInterfaceTextHome'), 'chaine', 0, '', $conf->entity);
}
if (!$res > 0) {
if (!($res > 0)) {
$error++;
}
@ -83,7 +83,7 @@ if ($action == 'setvar') {
} else {
$res = dolibarr_set_const($db, 'TICKET_PUBLIC_TEXT_HELP_MESSAGE', $langs->trans('TicketPublicPleaseBeAccuratelyDescribe'), 'chaine', 0, '', $conf->entity);
}
if (!$res > 0) {
if (!($res > 0)) {
$error++;
}
@ -93,7 +93,7 @@ if ($action == 'setvar') {
} else {
$res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_NEW', $langs->trans('TicketMessageMailNewText'), 'chaine', 0, '', $conf->entity);
}
if (!$res > 0) {
if (!($res > 0)) {
$error++;
}
@ -103,13 +103,13 @@ if ($action == 'setvar') {
} else {
$res = dolibarr_set_const($db, 'TICKET_URL_PUBLIC_INTERFACE', '', 'chaine', 0, '', $conf->entity);
}
if (!$res > 0) {
if (!($res > 0)) {
$error++;
}
$param_public_notification_new_message_default_email = GETPOST('TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_DEFAULT_EMAIL', 'alpha');
$res = dolibarr_set_const($db, 'TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_DEFAULT_EMAIL', $param_public_notification_new_message_default_email, 'chaine', 0, '', $conf->entity);
if (!$res > 0) {
if (!($res > 0)) {
$error++;
}
}
@ -117,25 +117,25 @@ if ($action == 'setvar') {
if ($action == 'setvarother') {
$param_enable_public_interface = GETPOST('TICKET_ENABLE_PUBLIC_INTERFACE', 'alpha');
$res = dolibarr_set_const($db, 'TICKET_ENABLE_PUBLIC_INTERFACE', $param_enable_public_interface, 'chaine', 0, '', $conf->entity);
if (!$res > 0) {
if (!($res > 0)) {
$error++;
}
$param_must_exists = GETPOST('TICKET_EMAIL_MUST_EXISTS', 'alpha');
$res = dolibarr_set_const($db, 'TICKET_EMAIL_MUST_EXISTS', $param_must_exists, 'chaine', 0, '', $conf->entity);
if (!$res > 0) {
if (!($res > 0)) {
$error++;
}
$param_disable_email = GETPOST('TICKET_DISABLE_CUSTOMER_MAILS', 'alpha');
$res = dolibarr_set_const($db, 'TICKET_DISABLE_CUSTOMER_MAILS', $param_disable_email, 'chaine', 0, '', $conf->entity);
if (!$res > 0) {
if (!($res > 0)) {
$error++;
}
$param_show_module_logo = GETPOST('TICKET_SHOW_COMPANY_LOGO', 'alpha');
$res = dolibarr_set_const($db, 'TICKET_SHOW_COMPANY_LOGO', $param_show_module_logo, 'chaine', 0, '', $conf->entity);
if (!$res > 0) {
if (!($res > 0)) {
$error++;
}
@ -143,7 +143,7 @@ if ($action == 'setvarother') {
{
$param_notification_also_main_addressemail = GETPOST('TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS', 'alpha');
$res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS', $param_notification_also_main_addressemail, 'chaine', 0, '', $conf->entity);
if (!$res > 0) {
if (!($res > 0)) {
$error++;
}
}

View File

@ -435,9 +435,6 @@ if ($id)
// Form to add a new line
if ($tabname[$id])
{
$alabelisused = 0;
$var = false;
$fieldlist = explode(',', $tabfield[$id]);
// Line for title
@ -461,7 +458,6 @@ if ($id)
} else print $valuetoshow;
print '</td>';
}
if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') $alabelisused = 1;
}
print '<td colspan="4">';
@ -469,7 +465,7 @@ if ($id)
print '</tr>';
// Line to enter new values
print "<tr ".$bcnd[$var].">";
print '<tr class="oddeven">';
$obj = new stdClass();
// If data was already input, we define them in obj to populate input fields.
@ -570,7 +566,7 @@ if ($id)
print '&nbsp;<input type="submit" class="button button-cancel" name="actioncancel" value="'.$langs->trans("Cancel").'"></td>';
} else {
$tmpaction = 'view';
$parameters = array('var'=>$var, 'fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
$parameters = array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
$reshook = $hookmanager->executeHooks('viewWebsiteFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
$error = $hookmanager->error; $errors = $hookmanager->errors;

View File

@ -38,7 +38,7 @@ if ($action == 'setvalue') {
$showmenu = GETPOST('BOOKMARKS_SHOW_IN_MENU', 'alpha');
$res = dolibarr_set_const($db, "BOOKMARKS_SHOW_IN_MENU", $showmenu, 'chaine', 0, '', $conf->entity);
if (!$res > 0) {
if (!($res > 0)) {
$error++;
}

View File

@ -62,7 +62,7 @@ if (GETPOST('action', 'alpha') == 'set')
dol_syslog("admin/cashdesk: level ".GETPOST('level', 'alpha'));
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{

View File

@ -114,7 +114,7 @@ if ($action == 'delete')
if ($res > 0)
{
$res = $objectpage->delete($user);
if (!$res > 0)
if (!($res > 0))
{
$error++;
setEventMessages($objectpage->error, $objectpage->errors, 'errors');

View File

@ -70,7 +70,7 @@ if ($action == 'confirm_split' && GETPOST("confirm", "alpha") == 'yes')
$remid = (GETPOST("remid", 'int') ? GETPOST("remid", 'int') : 0);
$discount = new DiscountAbsolute($db);
$res = $discount->fetch($remid);
if (!$res > 0)
if (!($res > 0))
{
$error++;
setEventMessages($langs->trans("ErrorFailedToLoadDiscount"), null, 'errors');

View File

@ -265,10 +265,8 @@ print '</td></tr>';
// Bank account
if (!empty($conf->banque->enabled))
{
if ($object->fk_account > 0)
{
if ($object->type_code == 'CHQ' && $bankline->fk_bordereau > 0)
{
if ($object->fk_account > 0) {
if ($object->type_code == 'CHQ' && $bankline->fk_bordereau > 0) {
dol_include_once('/compta/paiement/cheque/class/remisecheque.class.php');
$bordereau = new RemiseCheque($db);
$bordereau->fetch($bankline->fk_bordereau);
@ -285,7 +283,12 @@ if (!empty($conf->banque->enabled))
print '<tr>';
print '<td>'.$langs->trans('BankTransactionLine').'</td>';
print '<td>';
print $bankline->getNomUrl(1, 0, 'showconciliatedandaccounted');
if ($object->fk_account > 0) {
print $bankline->getNomUrl(1, 0, 'showconciliatedandaccounted');
} else {
$langs->load("admin");
print '<span class="opacitymedium">'.$langs->trans("NoRecordFoundIBankcAccount", $langs->transnoentitiesnoconv("Module85Name")).'</span>';
}
print '</td>';
print '</tr>';
}

View File

@ -54,6 +54,8 @@ $mesg = ''; $error = 0; $errors = array();
$action = (GETPOST('action', 'alpha') ? GETPOST('action', 'alpha') : 'view');
$confirm = GETPOST('confirm', 'alpha');
$backtopage = GETPOST('backtopage', 'alpha');
$cancel = GETPOST('cancel', 'alpha');
$id = GETPOST('id', 'int');
$socid = GETPOST('socid', 'int');
@ -296,9 +298,9 @@ if (empty($reshook))
}
}
if ($action == 'update' && !$_POST["cancel"] && $user->rights->societe->contact->creer)
if ($action == 'update' && empty($cancel) && $user->rights->societe->contact->creer)
{
if (empty($_POST["lastname"]))
if (!GETPOST("lastname", 'alpha'))
{
$error++; $errors = array($langs->trans("ErrorFieldRequired", $langs->transnoentities("Name").' / '.$langs->transnoentities("Label")));
$action = 'edit';
@ -308,6 +310,7 @@ if (empty($reshook))
{
$contactid = GETPOST("contactid", 'int');
$object->fetch($contactid);
$object->fetchRoles($contactid);
// Photo save
$dir = $conf->societe->multidir_output[$object->entity]."/contact/".$object->id."/photos";
@ -396,7 +399,8 @@ if (empty($reshook))
$object->priv = (string) GETPOST("priv", 'int');
$object->note_public = (string) GETPOST("note_public", 'restricthtml');
$object->note_private = (string) GETPOST("note_private", 'restricthtml');
$object->roles = GETPOST("roles", 'array');
$object->roles = GETPOST("roles", 'array'); // Note GETPOSTISSET("role") is null when combo is empty
// Fill array 'array_options' with data from add form
$ret = $extrafields->setOptionalsFromPost(null, $object);

View File

@ -259,7 +259,7 @@ class Contact extends CommonObject
*/
public $oldcopy; // To contains a clone of this when we need to save old properties of object
public $roles = array();
public $roles = null;
public $cacheprospectstatus = array();
public $fk_prospectlevel;
@ -856,7 +856,7 @@ class Contact extends CommonObject
* @param User $user Load also alerts of this user (subscribing to alerts) that want alerts about this contact
* @param string $ref_ext External reference, not given by Dolibarr
* @param string $email Email
* @param int $loadalsoroles Load also roles
* @param int $loadalsoroles Load also roles. Try to always 0 here and load roles with a separate call of fetchRoles().
* @return int >0 if OK, <0 if KO or if two records found for same ref or idprof, 0 if not found.
*/
public function fetch($id, $user = null, $ref_ext = '', $email = '', $loadalsoroles = 0)
@ -1631,10 +1631,11 @@ class Contact extends CommonObject
}
/**
* Fetch Roles for a contact
* Fetch roles (default contact of some companies) for the current contact.
* This load the array ->roles.
*
* @return float|int
* @throws Exception
* @return int <0 if KO, Nb of roles found if OK
* @see updateRoles()
*/
public function fetchRoles()
{
@ -1642,25 +1643,23 @@ class Contact extends CommonObject
$error = 0;
$num = 0;
$sql = "SELECT tc.rowid, tc.element, tc.source, tc.code, tc.libelle, sc.rowid as contactroleid";
$sql .= " FROM ".MAIN_DB_PREFIX."societe_contacts as sc";
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."c_type_contact as tc";
$sql .= " ON tc.rowid = sc.fk_c_type_contact";
$sql .= " AND sc.fk_socpeople = ".$this->id;
$sql = "SELECT tc.rowid, tc.element, tc.source, tc.code, tc.libelle as label, sc.rowid as contactroleid, sc.fk_soc as socid";
$sql .= " FROM ".MAIN_DB_PREFIX."societe_contacts as sc, ".MAIN_DB_PREFIX."c_type_contact as tc";
$sql .= " WHERE tc.rowid = sc.fk_c_type_contact";
$sql .= " AND tc.source = 'external' AND tc.active=1";
$sql .= " AND sc.fk_socpeople = ".$this->id;
$sql .= " AND sc.entity IN (".getEntity('societe').')';
dol_syslog(__METHOD__, LOG_DEBUG);
$this->roles = array();
$resql = $this->db->query($sql);
if ($resql) {
$this->roles = array();
$num = $this->db->num_rows($resql);
if ($num > 0) {
while ($obj = $this->db->fetch_object($resql)) {
$transkey = "TypeContact_".$obj->element."_".$obj->source."_".$obj->code;
$libelle_element = $langs->trans('ContactDefault_'.$obj->element);
$this->roles[$obj->contactroleid] = array('id'=>$obj->rowid, 'element'=>$obj->element, 'source'=>$obj->source, 'code'=>$obj->code, 'label'=>$libelle_element.' - '.($langs->trans($transkey) != $transkey ? $langs->trans($transkey) : $obj->libelle));
$this->roles[$obj->contactroleid] = array('id'=>$obj->rowid, 'socid'=>$obj->socid, 'element'=>$obj->element, 'source'=>$obj->source, 'code'=>$obj->code, 'label'=>$libelle_element.' - '.($langs->trans($transkey) != $transkey ? $langs->trans($transkey) : $obj->label));
}
}
} else {
@ -1722,10 +1721,11 @@ class Contact extends CommonObject
}
/**
* Updates Roles
* Updates all roles (default contact for companies) according to values inside the ->roles array.
* This is called by update of contact.
*
* @return float|int
* @throws Exception
* @see fetchRoles()
*/
public function updateRoles()
{
@ -1733,11 +1733,12 @@ class Contact extends CommonObject
$error = 0;
if (!isset($this->roles)) return; // Avoid to loose roles when property not set
$this->db->begin();
$sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_contacts WHERE fk_soc=".$this->socid." AND fk_socpeople=".$this->id; ;
$sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_contacts WHERE fk_socpeople=".$this->id." AND entity IN (".getEntity("societe_contact").")";
dol_syslog(__METHOD__, LOG_DEBUG);
$result = $this->db->query($sql);
if (!$result) {
$this->errors[] = $this->db->lasterror().' sql='.$sql;
@ -1745,25 +1746,40 @@ class Contact extends CommonObject
} else {
if (count($this->roles) > 0) {
foreach ($this->roles as $keyRoles => $valRoles) {
$sql = "INSERT INTO ".MAIN_DB_PREFIX."societe_contacts";
$sql .= " (entity,";
$sql .= "date_creation,";
$sql .= "fk_soc,";
$sql .= "fk_c_type_contact,";
$sql .= "fk_socpeople) ";
$sql .= " VALUES (".$conf->entity.",";
$sql .= "'".$this->db->idate(dol_now())."',";
$sql .= $this->socid.", ";
$sql .= $valRoles." , ";
$sql .= $this->id;
$sql .= ")";
dol_syslog(__METHOD__, LOG_DEBUG);
$idrole = 0;
if (is_array($valRoles)) {
$idrole = $valRoles['id'];
} else {
$idrole = $valRoles;
}
$result = $this->db->query($sql);
if (!$result)
{
$this->errors[] = $this->db->lasterror().' sql='.$sql;
$error++;
$socid = 0;
if (is_array($valRoles)) {
$socid = $valRoles['socid'];
} else {
$socid = $this->socid;
}
if ($socid > 0) {
$sql = "INSERT INTO ".MAIN_DB_PREFIX."societe_contacts";
$sql .= " (entity,";
$sql .= "date_creation,";
$sql .= "fk_soc,";
$sql .= "fk_c_type_contact,";
$sql .= "fk_socpeople) ";
$sql .= " VALUES (".$conf->entity.",";
$sql .= "'".$this->db->idate(dol_now())."',";
$sql .= $socid.", ";
$sql .= $idrole." , ";
$sql .= $this->id;
$sql .= ")";
$result = $this->db->query($sql);
if (!$result)
{
$this->errors[] = $this->db->lasterror().' sql='.$sql;
$error++;
}
}
}
}

View File

@ -21,7 +21,7 @@
* \brief Code for actions on setting notes of object page
*/
// $error must have been initialized to 0
// $action must be defined
// $arrayofparameters must be set for action 'update'
// $nomessageinupdate can be set to 1
@ -31,7 +31,6 @@ if ($action == 'update' && is_array($arrayofparameters))
{
$db->begin();
$ok = true;
foreach ($arrayofparameters as $key => $val)
{
// Modify constant only if key was posted (avoid resetting key to the null value)
@ -40,7 +39,7 @@ if ($action == 'update' && is_array($arrayofparameters))
$result = dolibarr_set_const($db, $key, GETPOST($key, 'alpha'), 'chaine', 0, '', $conf->entity);
if ($result < 0)
{
$ok = false;
$error++;
break;
}
}
@ -74,7 +73,7 @@ if ($action == 'setModuleOptions')
if ($param)
{
$res = dolibarr_set_const($db, $param, $value, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
}
}
}
@ -93,7 +92,11 @@ if ($action == 'setModuleOptions')
if (!$tmpdir) {
unset($listofdir[$key]); continue;
}
if (!is_dir($tmpdir)) $texttitle .= img_warning($langs->trans("ErrorDirNotFound", $tmpdir), 0);
if (!is_dir($tmpdir)) {
if (empty($nomessageinsetmoduleoptions)) {
setEventMessages($langs->trans("ErrorDirNotFound", $tmpdir), null, 'warnings');
}
}
else {
$upload_dir = $tmpdir;
}

View File

@ -5912,8 +5912,7 @@ abstract class CommonObject
$objectid = $this->id;
if ($computed)
{
if ($computed) {
if (!preg_match('/^search_/', $keyprefix)) return '<span class="opacitymedium">'.$langs->trans("AutomaticallyCalculated").'</span>';
else return '';
}
@ -5922,26 +5921,20 @@ abstract class CommonObject
if (empty($morecss) && !empty($val['css'])) {
$morecss = $val['css'];
} elseif (empty($morecss)) {
if ($type == 'date')
{
if ($type == 'date') {
$morecss = 'minwidth100imp';
} elseif ($type == 'datetime' || $type == 'link') // link means an foreign key to another primary id
{
} elseif ($type == 'datetime' || $type == 'link') { // link means an foreign key to another primary id
$morecss = 'minwidth200imp';
} elseif (in_array($type, array('int', 'integer', 'price')) || preg_match('/^double(\([0-9],[0-9]\)){0,1}/', $type))
{
} elseif (in_array($type, array('int', 'integer', 'price')) || preg_match('/^double(\([0-9],[0-9]\)){0,1}/', $type)) {
$morecss = 'maxwidth75';
} elseif ($type == 'url') {
$morecss = 'minwidth400';
} elseif ($type == 'boolean')
{
} elseif ($type == 'boolean') {
$morecss = '';
} else {
if (round($size) < 12)
{
if (round($size) < 12) {
$morecss = 'minwidth100';
} elseif (round($size) <= 48)
{
} elseif (round($size) <= 48) {
$morecss = 'minwidth200';
} else {
$morecss = 'minwidth400';
@ -6338,13 +6331,13 @@ abstract class CommonObject
if (!preg_match('/search_/', $keyprefix)) {
if (!empty($param_list_array[2])) { // If the entry into $fields is set to add a create button
if ($this->fields[$key]['picto']) {
if (!empty($this->fields[$key]['picto'])) {
$morecss .= ' widthcentpercentminusxx';
} else {
$morecss .= ' widthcentpercentminusx';
}
} else {
if ($this->fields[$key]['picto']) {
if (!empty($this->fields[$key]['picto'])) {
$morecss .= ' widthcentpercentminusx';
}
}

View File

@ -1690,7 +1690,7 @@ class FormFile
$fulllink = $urlwithroot.'/document.php'.($paramlink ? '?'.$paramlink : '');
print img_picto($langs->trans("FileSharedViaALink"), 'globe').' ';
print '<input type="text" class="quatrevingtpercent width100" id="downloadlink" name="downloadexternallink" value="'.dol_escape_htmltag($fulllink).'">';
print '<input type="text" class="quatrevingtpercent width100 nopadding" id="downloadlink" name="downloadexternallink" value="'.dol_escape_htmltag($fulllink).'">';
}
//if (! empty($useinecm) && $useinecm != 6) print '<a data-ajax="false" href="'.DOL_URL_ROOT.'/document.php?modulepart='.$modulepart;
//if ($forcedownload) print '&attachment=1';

View File

@ -408,7 +408,7 @@ class FormTicket
{
$formproject = new FormProjets($this->db);
print '<tr><td><label for="project"><span class="">'.$langs->trans("Project").'</span></label></td><td>';
print $formproject->select_projects(-1, GETPOST('projectid', 'int'), 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 0, 0, 'maxwidth500');
print img_picto('', 'project').$formproject->select_projects(-1, GETPOST('projectid', 'int'), 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500');
print '</td></tr>';
}

View File

@ -1870,11 +1870,6 @@ function email_admin_prepare_head()
}
}
$head[$h][0] = DOL_URL_ROOT."/admin/mails_templates.php";
$head[$h][1] = $langs->trans("EMailTemplates");
$head[$h][2] = 'templates';
$h++;
if (!empty($user->admin) && (empty($_SESSION['leftmenu']) || $_SESSION['leftmenu'] != 'email_templates')) {
$head[$h][0] = DOL_URL_ROOT."/admin/mails_senderprofile_list.php";
$head[$h][1] = $langs->trans("EmailSenderProfiles");
@ -1882,6 +1877,11 @@ function email_admin_prepare_head()
$h++;
}
$head[$h][0] = DOL_URL_ROOT."/admin/mails_templates.php";
$head[$h][1] = $langs->trans("EMailTemplates");
$head[$h][2] = 'templates';
$h++;
complete_head_from_modules($conf, $langs, null, $head, $h, 'email_admin', 'remove');
return $head;

View File

@ -686,7 +686,7 @@ function checkVal($out = '', $check = 'alphanohtml', $filter = null, $options =
$out = dol_string_nohtmltag($out, 0);
}
break;
case 'alphawithlgt': // No " and no ../ but we keep < > tags. Can be used for email string like "Name <email>"
case 'alphawithlgt': // No " and no ../ but we keep balanced < > tags with no special chars inside. Can be used for email string like "Name <email>"
if (!is_array($out)) {
// '"' is dangerous because param in url can close the href= or src= and add javascript functions.
// '../' is dangerous because it allows dir transversals
@ -5762,7 +5762,7 @@ function picto_required()
* @param string $stringtoclean String to clean
* @param integer $removelinefeed 1=Replace all new lines by 1 space, 0=Only ending new lines are removed others are replaced with \n, 2=Ending new lines are removed but others are kept with a same number of \n than nb of <br> when there is both "...<br>\n..."
* @param string $pagecodeto Encoding of input/output string
* @param integer $strip_tags 0=Use internal strip, 1=Use strip_tags() php function (bugged when text contains a < char that is not for a html tag)
* @param integer $strip_tags 0=Use internal strip, 1=Use strip_tags() php function (bugged when text contains a < char that is not for a html tag or when tags is not closed like '<img onload=aaa')
* @param integer $removedoublespaces Replace double space into one space
* @return string String cleaned
*
@ -5783,10 +5783,10 @@ function dol_string_nohtmltag($stringtoclean, $removelinefeed = 1, $pagecodeto =
} else {
$pattern = "/<[^<>]+>/";
// Example of $temp: <a href="/myurl" title="<u>A title</u>">0000-021</a>
$temp = preg_replace($pattern, "", $temp); // pass 1
// $temp after pass 1: <a href="/myurl" title="A title">0000-021
$temp = preg_replace($pattern, "", $temp); // pass 2
// $temp after pass 2: 0000-021
$temp = preg_replace($pattern, "", $temp); // pass 1 - $temp after pass 1: <a href="/myurl" title="A title">0000-021
$temp = preg_replace($pattern, "", $temp); // pass 2 - $temp after pass 2: 0000-021
// removed '<' into non closing html tags like '<a'
$temp = preg_replace('/<(\w+)/', '\1', $temp);
}
$temp = dol_html_entity_decode($temp, ENT_COMPAT, $pagecodeto);

View File

@ -52,8 +52,8 @@ function dolSaveMasterFile($filemaster)
}
/**
* Save content of a page on disk.
* It can save file into root directory or into language subdirectory.
* Save an alias page on disk (A page that include the reference page).
* It saves file into the root directory but also into language subdirectory.
*
* @param string $filealias Full path of filename to generate
* @param Website $object Object website
@ -82,11 +82,11 @@ function dolSavePageAlias($filealias, $object, $objectpage)
@chmod($filealias, octdec($conf->global->MAIN_UMASK));
}
// Save also alias into language subdirectory if we have to
// Save also alias into language subdirectory if it is not a main language
if ($objectpage->lang && in_array($objectpage->lang, explode(',', $object->otherlang))) {
$dirname = dirname($filealias);
$filename = basename($filealias);
$filealias = $dirname.'/'.$objectpage->lang.'/'.$filename;
$filealiassub = $dirname.'/'.$objectpage->lang.'/'.$filename;
$aliascontent = '<?php'."\n";
$aliascontent .= "// File generated to wrap the alias page - DO NOT MODIFY - It is just a wrapper to real page\n";
@ -94,12 +94,36 @@ function dolSavePageAlias($filealias, $object, $objectpage)
$aliascontent .= 'if (empty($dolibarr_main_data_root)) require \'../page'.$objectpage->id.'.tpl.php\'; ';
$aliascontent .= 'else require $dolibarr_main_data_root.\'/website/\'.$website->ref.\'/page'.$objectpage->id.'.tpl.php\';'."\n";
$aliascontent .= '?>'."\n";
$result = file_put_contents($filealias, $aliascontent);
$result = file_put_contents($filealiassub, $aliascontent);
if ($result === false) {
dol_syslog("Failed to write file ".$filealias, LOG_WARNING);
dol_syslog("Failed to write file ".$filealiassub, LOG_WARNING);
}
if (!empty($conf->global->MAIN_UMASK)) {
@chmod($filealias, octdec($conf->global->MAIN_UMASK));
@chmod($filealiassub, octdec($conf->global->MAIN_UMASK));
}
}
// Save also alias into all language subdirectories if it is a main language
elseif (empty($objectpage->lang) || !in_array($objectpage->lang, explode(',', $object->otherlang))) {
if (empty($conf->global->WEBSITE_DISABLE_MAIN_LANGUAGE_INTO_LANGSUBDIR)) {
$dirname = dirname($filealias);
$filename = basename($filealias);
foreach (explode(',', $object->otherlang) as $sublang) {
$filealiassub = $dirname.'/'.$sublang.'/'.$filename;
$aliascontent = '<?php'."\n";
$aliascontent .= "// File generated to wrap the alias page - DO NOT MODIFY - It is just a wrapper to real page\n";
$aliascontent .= 'global $dolibarr_main_data_root;'."\n";
$aliascontent .= 'if (empty($dolibarr_main_data_root)) require \'../page'.$objectpage->id.'.tpl.php\'; ';
$aliascontent .= 'else require $dolibarr_main_data_root.\'/website/\'.$website->ref.\'/page'.$objectpage->id.'.tpl.php\';'."\n";
$aliascontent .= '?>'."\n";
$result = file_put_contents($filealiassub, $aliascontent);
if ($result === false) {
dol_syslog("Failed to write file ".$filealiassub, LOG_WARNING);
}
if (!empty($conf->global->MAIN_UMASK)) {
@chmod($filealiassub, octdec($conf->global->MAIN_UMASK));
}
}
}
}
@ -108,8 +132,8 @@ function dolSavePageAlias($filealias, $object, $objectpage)
/**
* Save content of a page on disk.
* Page contents are always saved into root directory.
* Save content of a page on disk (page name is generally ID_of_page.php).
* Page contents are always saved into "root" directory. Only aliases pages saved with dolSavePageAlias() can be in root or language subdir.
*
* @param string $filetpl Full path of filename to generate
* @param Website $object Object website
@ -230,10 +254,11 @@ function dolSavePageContent($filetpl, Website $object, WebsitePage $objectpage)
//var_dump($filetpl);exit;
$result = file_put_contents($filetpl, $tplcontent);
if (!empty($conf->global->MAIN_UMASK))
if (!empty($conf->global->MAIN_UMASK)) {
@chmod($filetpl, octdec($conf->global->MAIN_UMASK));
}
return $result;
return $result;
}

View File

@ -340,13 +340,12 @@ class pdf_strato extends ModelePDFContract
$datere = $langs->trans("Unknown");
}
$txtpredefinedservice = '';
$txtpredefinedservice = $objectligne->product_label;
if ($objectligne->product_label)
{
$txtpredefinedservice .= ' - ';
$txtpredefinedservice .= $objectligne->product_label;
}
$txtpredefinedservice = $objectligne->product_ref;
if ($objectligne->product_label)
{
$txtpredefinedservice .= ' - ';
$txtpredefinedservice .= $objectligne->product_label;
}
$desc = dol_htmlentitiesbr($objectligne->desc, 1); // Desc (not empty for free lines)
$txt = '';

View File

@ -118,7 +118,7 @@ if ($action == 'set_DONATION_ACCOUNTINGACCOUNT')
$res = dolibarr_set_const($db, "DONATION_ACCOUNTINGACCOUNT", $account, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{
@ -134,7 +134,7 @@ if ($action == 'set_DONATION_MESSAGE')
$res = dolibarr_set_const($db, "DONATION_MESSAGE", $freemessage, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!($res > 0)) $error++;
if (!$error)
{

View File

@ -16,6 +16,8 @@ ThisService=This service
ThisProduct=This product
DefaultForService=Default for service
DefaultForProduct=Default for product
ProductForThisThirdparty=Product for this thirdparty
ServiceForThisThirdparty=Service for this thirdparty
CantSuggest=Can't suggest
AccountancySetupDoneFromAccountancyMenu=Most setup of the accountancy is done from the menu %s
ConfigAccountingExpert=Configuration of the module accounting (double entry)

View File

@ -670,7 +670,7 @@ Module54000Desc=Direct print (without opening the documents) using Cups IPP inte
Module55000Name=Poll, Survey or Vote
Module55000Desc=Create online polls, surveys or votes (like Doodle, Studs, RDVz etc...)
Module59000Name=Margins
Module59000Desc=Module to manage margins
Module59000Desc=Module to follow margins
Module60000Name=Commissions
Module60000Desc=Module to manage commissions
Module62000Name=Incoterms
@ -1308,7 +1308,7 @@ YouUseBestDriver=You use driver %s which is the best driver currently available.
YouDoNotUseBestDriver=You use driver %s but driver %s is recommended.
NbOfObjectIsLowerThanNoPb=You have only %s %s in the database. This does not require any particular optimization.
SearchOptim=Search optimization
YouHaveXObjectUseSearchOptim=You have %s %s in the database. You should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response.
YouHaveXObjectUseSearchOptim=You have %s %s in the database. You can add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response.
YouHaveXObjectAndSearchOptimOn=You have %s %s in the database and constant %s is set to 1 in Home-Setup-Other.
BrowserIsOK=You are using the %s web browser. This browser is ok for security and performance.
BrowserIsKO=You are using the %s web browser. This browser is known to be a bad choice for security, performance and reliability. We recommend using Firefox, Chrome, Opera or Safari.

View File

@ -180,3 +180,4 @@ BankColorizeMovementDesc=If this function is enable, you can choose specific bac
BankColorizeMovementName1=Background color for debit movement
BankColorizeMovementName2=Background color for credit movement
IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning.
NoBankAccountDefined=No bank account defined

View File

@ -95,8 +95,8 @@ LastXMonthRolling=The latest %s month rolling
ChooseBoxToAdd=Add widget to your dashboard
BoxAdded=Widget was added in your dashboard
BoxTitleUserBirthdaysOfMonth=Birthdays of this month (users)
BoxLastManualEntries=Last manual entries in accountancy
BoxTitleLastManualEntries=%s latest manual entries
BoxLastManualEntries=Latest record in accountancy entered manually or without source document
BoxTitleLastManualEntries=%s latest record entered manually or without source document
NoRecordedManualEntries=No manual entries record in accountancy
BoxSuspenseAccount=Count accountancy operation with suspense account
BoxTitleSuspenseAccount=Number of unallocated lines

View File

@ -175,3 +175,5 @@ Answered=Answered
IsNotAnAnswer=Is not answer (initial email)
IsAnAnswer=Is an answer of an initial email
RecordCreatedByEmailCollector=Record created by the Email Collector %s from email %s
DefaultBlacklistMailingStatus=Default contact status for refuse bulk emailing
DefaultStatusEmptyMandatory=Empty but mandatory

View File

@ -224,6 +224,7 @@ Value=Value
PersonalValue=Personal value
NewObject=New %s
NewValue=New value
OldValue=Old value %s
CurrentValue=Current value
Code=Code
Type=Type
@ -655,6 +656,7 @@ SupplierPreview=Vendor preview
ShowCustomerPreview=Show customer preview
ShowSupplierPreview=Show vendor preview
RefCustomer=Ref. customer
InternalRef=Internal ref.
Currency=Currency
InfoAdmin=Information for administrators
Undo=Undo
@ -1113,6 +1115,7 @@ OutOfDate=Out-of-date
EventReminder=Event Reminder
UpdateForAllLines=Update for all lines
OnHold=On hold
Civility=Civility
AffectTag=Affect Tag
ConfirmAffectTag=Bulk Tag Affect
ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)?

View File

@ -78,3 +78,27 @@ TotalCost=Total cost
BOMTotalCost=The cost to produce this BOM based on cost of each quantity and product to consume (use Cost price if defined, else Average Weighted Price if defined, else the Best purchase price)
GoOnTabProductionToProduceFirst=You must first have started the production to close a Manufacturing Order (See tab '%s'). But you can Cancel it.
ErrorAVirtualProductCantBeUsedIntoABomOrMo=A kit can't be used into a BOM or a MO
Workstation=Workstation
Workstations=Workstations
WorkstationsDescription=Workstations management
WorkstationSetup = Workstations setup
WorkstationSetupPage = Workstations setup page
WorkstationAbout = About Workstation
WorkstationAboutPage = Workstations about page
WorkstationList=Workstation list
WorkstationCreate=Add new workstation
ConfirmEnableWorkstation=Are you sure you want to enable workstation <b>%s</b> ?
EnableAWorkstation=Enable a workstation
ConfirmDisableWorkstation=Are you sure you want to disable workstation <b>%s</b> ?
DisableAWorkstation=Disable a workstation
DeleteWorkstation=Supprimer
NbOperatorsRequired=Number of operators required
THMOperatorEstimated=Estimated operator THM
THMMachineEstimated=Estimated machine THM
WorkstationType=Workstation type
Human=Human
Machine=Machine
HumanMachine=Human / Machine
WorkstationArea=Workstation area
Machines=Machines
THMEstimatedHelp=This rate makes it possible to define a forecast cost of the item

View File

@ -62,6 +62,7 @@ EnhancedValueOfWarehouses=Warehouses value
UserWarehouseAutoCreate=Create a user warehouse automatically when creating a user
AllowAddLimitStockByWarehouse=Manage also value for minimum and desired stock per pairing (product-warehouse) in addition to the value for minimum and desired stock per product
RuleForWarehouse=Rule for warehouses
WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal
WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders
UserDefaultWarehouse=Set a warehouse on Users
MainDefaultWarehouse=Default warehouse

View File

@ -149,3 +149,4 @@ InfoRejectMessage=Hello,<br><br>the direct debit payment order of invoice %s rel
ModeWarning=Option for real mode was not set, we stop after this simulation
ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use.
ErrorICSmissing=Missing ICS in Bank account %s
TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Total amount of direct debit order differs from sum of lines

View File

@ -21,3 +21,5 @@ descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked sup
descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed
AutomaticCreation=Automatic creation
AutomaticClassification=Automatic classification
# Autoclassify shipment
descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Classify linked source shipment as closed when customer invoice is validated

View File

@ -16,6 +16,8 @@ ThisService=هذه الخدمة
ThisProduct=This product
DefaultForService=Default for service
DefaultForProduct=Default for product
ProductForThisThirdparty=Product for this thirdparty
ServiceForThisThirdparty=Service for this thirdparty
CantSuggest=Can't suggest
AccountancySetupDoneFromAccountancyMenu=Most setup of the accountancy is done from the menu %s
ConfigAccountingExpert=Configuration of the module accounting (double entry)

View File

@ -670,7 +670,7 @@ Module54000Desc=Direct print (without opening the documents) using Cups IPP inte
Module55000Name=استطلاع للرأي، أو مسح التصويت
Module55000Desc=Create online polls, surveys or votes (like Doodle, Studs, RDVz etc...)
Module59000Name=هوامش
Module59000Desc=وحدة لإدارة الهوامش
Module59000Desc=Module to follow margins
Module60000Name=العمولات
Module60000Desc=وحدة لإدارة اللجان
Module62000Name=شروط التجارة الدولية
@ -1308,7 +1308,7 @@ YouUseBestDriver=You use driver %s which is the best driver currently available.
YouDoNotUseBestDriver=You use driver %s but driver %s is recommended.
NbOfObjectIsLowerThanNoPb=You have only %s %s in the database. This does not require any particular optimization.
SearchOptim=البحث الأمثل
YouHaveXObjectUseSearchOptim=You have %s %s in the database. You should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response.
YouHaveXObjectUseSearchOptim=You have %s %s in the database. You can add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response.
YouHaveXObjectAndSearchOptimOn=You have %s %s in the database and constant %s is set to 1 in Home-Setup-Other.
BrowserIsOK=You are using the %s web browser. This browser is ok for security and performance.
BrowserIsKO=You are using the %s web browser. This browser is known to be a bad choice for security, performance and reliability. We recommend using Firefox, Chrome, Opera or Safari.

View File

@ -180,3 +180,4 @@ BankColorizeMovementDesc=If this function is enable, you can choose specific bac
BankColorizeMovementName1=Background color for debit movement
BankColorizeMovementName2=Background color for credit movement
IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning.
NoBankAccountDefined=No bank account defined

View File

@ -95,8 +95,8 @@ LastXMonthRolling=The latest %s month rolling
ChooseBoxToAdd=Add widget to your dashboard
BoxAdded=Widget was added in your dashboard
BoxTitleUserBirthdaysOfMonth=Birthdays of this month (users)
BoxLastManualEntries=Last manual entries in accountancy
BoxTitleLastManualEntries=%s latest manual entries
BoxLastManualEntries=Latest record in accountancy entered manually or without source document
BoxTitleLastManualEntries=%s latest record entered manually or without source document
NoRecordedManualEntries=No manual entries record in accountancy
BoxSuspenseAccount=Count accountancy operation with suspense account
BoxTitleSuspenseAccount=Number of unallocated lines

View File

@ -175,3 +175,5 @@ Answered=Answered
IsNotAnAnswer=Is not answer (initial email)
IsAnAnswer=Is an answer of an initial email
RecordCreatedByEmailCollector=Record created by the Email Collector %s from email %s
DefaultBlacklistMailingStatus=Default contact status for refuse bulk emailing
DefaultStatusEmptyMandatory=Empty but mandatory

View File

@ -224,6 +224,7 @@ Value=القيمة
PersonalValue=قيمة الشخصية
NewObject=New %s
NewValue=القيمة الجديدة
OldValue=Old value %s
CurrentValue=القيمة الحالية
Code=رمز
Type=اكتب
@ -655,6 +656,7 @@ SupplierPreview=Vendor preview
ShowCustomerPreview=وتبين للعملاء معاينة
ShowSupplierPreview=Show vendor preview
RefCustomer=المرجع. العميل
InternalRef=Internal ref.
Currency=العملة
InfoAdmin=معلومات للإداريين
Undo=تراجع
@ -1113,6 +1115,7 @@ OutOfDate=Out-of-date
EventReminder=Event Reminder
UpdateForAllLines=Update for all lines
OnHold=في الانتظار
Civility=Civility
AffectTag=Affect Tag
ConfirmAffectTag=Bulk Tag Affect
ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)?

View File

@ -78,3 +78,27 @@ TotalCost=Total cost
BOMTotalCost=The cost to produce this BOM based on cost of each quantity and product to consume (use Cost price if defined, else Average Weighted Price if defined, else the Best purchase price)
GoOnTabProductionToProduceFirst=You must first have started the production to close a Manufacturing Order (See tab '%s'). But you can Cancel it.
ErrorAVirtualProductCantBeUsedIntoABomOrMo=A kit can't be used into a BOM or a MO
Workstation=Workstation
Workstations=Workstations
WorkstationsDescription=Workstations management
WorkstationSetup = Workstations setup
WorkstationSetupPage = Workstations setup page
WorkstationAbout = About Workstation
WorkstationAboutPage = Workstations about page
WorkstationList=Workstation list
WorkstationCreate=Add new workstation
ConfirmEnableWorkstation=Are you sure you want to enable workstation <b>%s</b> ?
EnableAWorkstation=Enable a workstation
ConfirmDisableWorkstation=Are you sure you want to disable workstation <b>%s</b> ?
DisableAWorkstation=Disable a workstation
DeleteWorkstation=Supprimer
NbOperatorsRequired=Number of operators required
THMOperatorEstimated=Estimated operator THM
THMMachineEstimated=Estimated machine THM
WorkstationType=Workstation type
Human=Human
Machine=Machine
HumanMachine=Human / Machine
WorkstationArea=Workstation area
Machines=Machines
THMEstimatedHelp=This rate makes it possible to define a forecast cost of the item

View File

@ -62,6 +62,7 @@ EnhancedValueOfWarehouses=قيمة المستودعات
UserWarehouseAutoCreate=Create a user warehouse automatically when creating a user
AllowAddLimitStockByWarehouse=Manage also value for minimum and desired stock per pairing (product-warehouse) in addition to the value for minimum and desired stock per product
RuleForWarehouse=Rule for warehouses
WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal
WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders
UserDefaultWarehouse=Set a warehouse on Users
MainDefaultWarehouse=Default warehouse

View File

@ -149,3 +149,4 @@ InfoRejectMessage=Hello,<br><br>the direct debit payment order of invoice %s rel
ModeWarning=لم يتم تعيين خيار الوضع الحقيقي، ونحن بعد توقف هذه المحاكاة
ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use.
ErrorICSmissing=Missing ICS in Bank account %s
TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Total amount of direct debit order differs from sum of lines

View File

@ -21,3 +21,5 @@ descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked sup
descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed
AutomaticCreation=إنشاء تلقائي
AutomaticClassification=التصنيف التلقائي
# Autoclassify shipment
descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Classify linked source shipment as closed when customer invoice is validated

View File

@ -16,6 +16,8 @@ ThisService=This service
ThisProduct=This product
DefaultForService=Default for service
DefaultForProduct=Default for product
ProductForThisThirdparty=Product for this thirdparty
ServiceForThisThirdparty=Service for this thirdparty
CantSuggest=Can't suggest
AccountancySetupDoneFromAccountancyMenu=Most setup of the accountancy is done from the menu %s
ConfigAccountingExpert=Configuration of the module accounting (double entry)

View File

@ -670,7 +670,7 @@ Module54000Desc=Direct print (without opening the documents) using Cups IPP inte
Module55000Name=Poll, Survey or Vote
Module55000Desc=Create online polls, surveys or votes (like Doodle, Studs, RDVz etc...)
Module59000Name=Margins
Module59000Desc=Module to manage margins
Module59000Desc=Module to follow margins
Module60000Name=Commissions
Module60000Desc=Module to manage commissions
Module62000Name=Incoterms
@ -1308,7 +1308,7 @@ YouUseBestDriver=You use driver %s which is the best driver currently available.
YouDoNotUseBestDriver=You use driver %s but driver %s is recommended.
NbOfObjectIsLowerThanNoPb=You have only %s %s in the database. This does not require any particular optimization.
SearchOptim=Search optimization
YouHaveXObjectUseSearchOptim=You have %s %s in the database. You should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response.
YouHaveXObjectUseSearchOptim=You have %s %s in the database. You can add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response.
YouHaveXObjectAndSearchOptimOn=You have %s %s in the database and constant %s is set to 1 in Home-Setup-Other.
BrowserIsOK=You are using the %s web browser. This browser is ok for security and performance.
BrowserIsKO=You are using the %s web browser. This browser is known to be a bad choice for security, performance and reliability. We recommend using Firefox, Chrome, Opera or Safari.

View File

@ -180,3 +180,4 @@ BankColorizeMovementDesc=If this function is enable, you can choose specific bac
BankColorizeMovementName1=Background color for debit movement
BankColorizeMovementName2=Background color for credit movement
IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning.
NoBankAccountDefined=No bank account defined

View File

@ -95,8 +95,8 @@ LastXMonthRolling=The latest %s month rolling
ChooseBoxToAdd=Add widget to your dashboard
BoxAdded=Widget was added in your dashboard
BoxTitleUserBirthdaysOfMonth=Birthdays of this month (users)
BoxLastManualEntries=Last manual entries in accountancy
BoxTitleLastManualEntries=%s latest manual entries
BoxLastManualEntries=Latest record in accountancy entered manually or without source document
BoxTitleLastManualEntries=%s latest record entered manually or without source document
NoRecordedManualEntries=No manual entries record in accountancy
BoxSuspenseAccount=Count accountancy operation with suspense account
BoxTitleSuspenseAccount=Number of unallocated lines

View File

@ -175,3 +175,5 @@ Answered=Answered
IsNotAnAnswer=Is not answer (initial email)
IsAnAnswer=Is an answer of an initial email
RecordCreatedByEmailCollector=Record created by the Email Collector %s from email %s
DefaultBlacklistMailingStatus=Default contact status for refuse bulk emailing
DefaultStatusEmptyMandatory=Empty but mandatory

View File

@ -224,6 +224,7 @@ Value=Value
PersonalValue=Personal value
NewObject=New %s
NewValue=New value
OldValue=Old value %s
CurrentValue=Current value
Code=Code
Type=Type
@ -655,6 +656,7 @@ SupplierPreview=Vendor preview
ShowCustomerPreview=Show customer preview
ShowSupplierPreview=Show vendor preview
RefCustomer=Ref. customer
InternalRef=Internal ref.
Currency=Currency
InfoAdmin=Information for administrators
Undo=Undo
@ -1113,6 +1115,7 @@ OutOfDate=Out-of-date
EventReminder=Event Reminder
UpdateForAllLines=Update for all lines
OnHold=On hold
Civility=Civility
AffectTag=Affect Tag
ConfirmAffectTag=Bulk Tag Affect
ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)?

View File

@ -78,3 +78,27 @@ TotalCost=Total cost
BOMTotalCost=The cost to produce this BOM based on cost of each quantity and product to consume (use Cost price if defined, else Average Weighted Price if defined, else the Best purchase price)
GoOnTabProductionToProduceFirst=You must first have started the production to close a Manufacturing Order (See tab '%s'). But you can Cancel it.
ErrorAVirtualProductCantBeUsedIntoABomOrMo=A kit can't be used into a BOM or a MO
Workstation=Workstation
Workstations=Workstations
WorkstationsDescription=Workstations management
WorkstationSetup = Workstations setup
WorkstationSetupPage = Workstations setup page
WorkstationAbout = About Workstation
WorkstationAboutPage = Workstations about page
WorkstationList=Workstation list
WorkstationCreate=Add new workstation
ConfirmEnableWorkstation=Are you sure you want to enable workstation <b>%s</b> ?
EnableAWorkstation=Enable a workstation
ConfirmDisableWorkstation=Are you sure you want to disable workstation <b>%s</b> ?
DisableAWorkstation=Disable a workstation
DeleteWorkstation=Supprimer
NbOperatorsRequired=Number of operators required
THMOperatorEstimated=Estimated operator THM
THMMachineEstimated=Estimated machine THM
WorkstationType=Workstation type
Human=Human
Machine=Machine
HumanMachine=Human / Machine
WorkstationArea=Workstation area
Machines=Machines
THMEstimatedHelp=This rate makes it possible to define a forecast cost of the item

View File

@ -62,6 +62,7 @@ EnhancedValueOfWarehouses=Warehouses value
UserWarehouseAutoCreate=Create a user warehouse automatically when creating a user
AllowAddLimitStockByWarehouse=Manage also value for minimum and desired stock per pairing (product-warehouse) in addition to the value for minimum and desired stock per product
RuleForWarehouse=Rule for warehouses
WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal
WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders
UserDefaultWarehouse=Set a warehouse on Users
MainDefaultWarehouse=Default warehouse

View File

@ -149,3 +149,4 @@ InfoRejectMessage=Hello,<br><br>the direct debit payment order of invoice %s rel
ModeWarning=Option for real mode was not set, we stop after this simulation
ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use.
ErrorICSmissing=Missing ICS in Bank account %s
TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Total amount of direct debit order differs from sum of lines

View File

@ -21,3 +21,5 @@ descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked sup
descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed
AutomaticCreation=Automatic creation
AutomaticClassification=Automatic classification
# Autoclassify shipment
descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Classify linked source shipment as closed when customer invoice is validated

View File

@ -16,6 +16,8 @@ ThisService=Тази услуга
ThisProduct=Този продукт
DefaultForService=По подразбиране за услуга
DefaultForProduct=По подразбиране за продукт
ProductForThisThirdparty=Product for this thirdparty
ServiceForThisThirdparty=Service for this thirdparty
CantSuggest=Не може да се предложи
AccountancySetupDoneFromAccountancyMenu=Повечето настройки на счетоводството се извършват от менюто %s
ConfigAccountingExpert=Configuration of the module accounting (double entry)

View File

@ -670,7 +670,7 @@ Module54000Desc=Директен печат (без отваряне на док
Module55000Name=Анкети, проучвания и гласоподаване
Module55000Desc=Създаване на онлайн анкети, проучвания или гласувания (като Doodle, Studs, RDVz и др.)
Module59000Name=Маржове
Module59000Desc=Управление на маржове
Module59000Desc=Module to follow margins
Module60000Name=Комисионни
Module60000Desc=Управление на комисионни
Module62000Name=Условия на доставка
@ -1308,7 +1308,7 @@ YouUseBestDriver=Използвате драйвер %s, който е най-д
YouDoNotUseBestDriver=Използвате драйвер %s, но драйвер %s е препоръчителен.
NbOfObjectIsLowerThanNoPb=Имате само %s %s в базата данни. Това не изисква особена оптимизация.
SearchOptim=Оптимизация на търсене
YouHaveXObjectUseSearchOptim=Имате %s %s в базата данни. Трябва да добавите константата %s със стойност 1 в Начало -> Настройка -> Други настройки. Ограничете търсенето до началото на низове, което прави възможно базата данни да използва индекси и ще получите незабавен отговор.
YouHaveXObjectUseSearchOptim=You have %s %s in the database. You can add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response.
YouHaveXObjectAndSearchOptimOn=Имате %s %s в базата данни и константата %s е със стойност 1 в Начало -> Настройка -> Други настройки.
BrowserIsOK=Използвате уеб браузъра %s. Този браузър е добър от гледна точка на сигурност и производителност.
BrowserIsKO=Използвате уеб браузъра %s. Известно е, че този браузър е лош избор от гледна точка на сигурност, производителност и надеждност. Препоръчително е да използвате Firefox, Chrome, Opera или Safari.

View File

@ -180,3 +180,4 @@ BankColorizeMovementDesc=Ако тази функция е активирана
BankColorizeMovementName1=Цвят на фона за дебитно движение
BankColorizeMovementName2=Цвят на фона за кредитно движение
IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning.
NoBankAccountDefined=No bank account defined

View File

@ -95,8 +95,8 @@ LastXMonthRolling=Подвижни месеци: %s последно изтек
ChooseBoxToAdd=Добавяне на джаджа към таблото
BoxAdded=Джаджата е добавена към таблото
BoxTitleUserBirthdaysOfMonth=Рождени дни в този месец (потребители)
BoxLastManualEntries=Последни ръчни записи в счетоводството
BoxTitleLastManualEntries=Ръчни записи: %s последни
BoxLastManualEntries=Latest record in accountancy entered manually or without source document
BoxTitleLastManualEntries=%s latest record entered manually or without source document
NoRecordedManualEntries=Няма ръчни записи в счетоводството
BoxSuspenseAccount=Брой счетоводни операции във временна сметка
BoxTitleSuspenseAccount=Брой неразпределени редове

Some files were not shown because too many files have changed in this diff Show More