Merge HEAD, branch 'develop' of github.com:Dolibarr/dolibarr into develop
This commit is contained in:
commit
3438d080f5
@ -176,6 +176,7 @@ NEW: Weighing Scale compatibility with TakePOS connector
|
||||
NEW: when creating a user from a member linked to a thirdparty, you can choose to create it as external or internal user
|
||||
NEW: add clone button on miscellaneous payment
|
||||
NEW: #15065 Add option to put the product label in bold in the PDF templates if configured
|
||||
NEW: Add option "If the feature to manage kits of module Stock is used, show details of subproducts of a kit on PDF."
|
||||
|
||||
|
||||
For developers:
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -478,6 +478,14 @@ if (!empty($mysoc->logo_small)) {
|
||||
print '<div class="inline-block valignmiddle">';
|
||||
print '<img style="max-height: 80px" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_small).'">';
|
||||
print '</div>';
|
||||
} elseif (!empty($mysoc->logo)) {
|
||||
if (!file_exists($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) {
|
||||
$imgThumbMini = vignette($conf->mycompany->dir_output.'/logos/'.$mysoc->logo, $maxwidthmini, $maxheightmini, '_mini', $quality);
|
||||
}
|
||||
$imgThumbSmall = vignette($conf->mycompany->dir_output.'/logos/'.$mysoc->logo, $maxwidthmini, $maxheightmini, '_small', $quality);
|
||||
print '<div class="inline-block valignmiddle">';
|
||||
print '<img style="max-height: 80px" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&file='.urlencode('logos/thumbs/'.basename($imgThumbSmall)).'">';
|
||||
print '</div>';
|
||||
}
|
||||
print '<div class="inline-block valignmiddle marginrightonly"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=removelogo">'.img_delete($langs->trans("Delete"), '', 'marginleftonly').'</a></div>';
|
||||
} elseif (!empty($mysoc->logo)) {
|
||||
@ -505,6 +513,14 @@ if (!empty($mysoc->logo_squarred_small)) {
|
||||
print '<div class="inline-block valignmiddle marginrightonly">';
|
||||
print '<img style="max-height: 80px" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_squarred_small).'">';
|
||||
print '</div>';
|
||||
} elseif (!empty($mysoc->logo_squarred)) {
|
||||
if (!file_exists($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_squarred_mini)) {
|
||||
$imgThumbMini = vignette($conf->mycompany->dir_output.'/logos/'.$mysoc->logo_squarred, $maxwidthmini, $maxheightmini, '_mini', $quality);
|
||||
}
|
||||
$imgThumbSmall = vignette($conf->mycompany->dir_output.'/logos/'.$mysoc->logo_squarred, $maxwidthmini, $maxheightmini, '_small', $quality);
|
||||
print '<div class="inline-block valignmiddle">';
|
||||
print '<img style="max-height: 80px" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&file='.urlencode('logos/thumbs/'.basename($imgThumbSmall)).'">';
|
||||
print '</div>';
|
||||
}
|
||||
print '<div class="inline-block valignmiddle marginrightonly"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=removelogosquarred">'.img_delete($langs->trans("Delete"), '', 'marginleftonly').'</a></div>';
|
||||
} elseif (!empty($mysoc->logo_squarred)) {
|
||||
|
||||
@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members'));
|
||||
$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks'));
|
||||
|
||||
if (!$user->admin) accessforbidden();
|
||||
|
||||
@ -80,6 +80,7 @@ if ($action == 'update')
|
||||
dolibarr_set_const($db, "MAIN_PDF_MAIN_HIDE_THIRD_TAX", GETPOST("MAIN_PDF_MAIN_HIDE_THIRD_TAX"), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
dolibarr_set_const($db, "PDF_USE_ALSO_LANGUAGE_CODE", GETPOST('PDF_USE_ALSO_LANGUAGE_CODE', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "SHOW_SUBPRODUCT_REF_IN_PDF", GETPOST('SHOW_SUBPRODUCT_REF_IN_PDF', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
|
||||
@ -331,6 +332,10 @@ print $formadmin->select_language(GETPOSTISSET('PDF_USE_ALSO_LANGUAGE_CODE') ? G
|
||||
//}
|
||||
print '</td></tr>';
|
||||
|
||||
// SHOW_SUBPRODUCT_REF_IN_PDF - Option to show the detail of product ref for kits.
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("SHOW_SUBPRODUCT_REF_IN_PDF", $langs->transnoentitiesnoconv("AssociatedProductsAbility"), $langs->transnoentitiesnoconv("Products")).'</td><td>';
|
||||
print $form->selectyesno('SHOW_SUBPRODUCT_REF_IN_PDF', (!empty($conf->global->SHOW_SUBPRODUCT_REF_IN_PDF)) ? $conf->global->SHOW_SUBPRODUCT_REF_IN_PDF : 0, 1);
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
@ -120,7 +120,7 @@ class Documents extends DolibarrApi
|
||||
/**
|
||||
* Build a document.
|
||||
*
|
||||
* Test sample 1: { "module_part": "invoice", "original_file": "FA1701-001/FA1701-001.pdf", "doctemplate": "crabe", "langcode": "fr_FR" }.
|
||||
* Test sample 1: { "modulepart": "invoice", "original_file": "FA1701-001/FA1701-001.pdf", "doctemplate": "crabe", "langcode": "fr_FR" }.
|
||||
*
|
||||
* @param string $modulepart Name of module or area concerned by file download ('invoice', 'order', ...).
|
||||
* @param string $original_file Relative path with filename, relative to modulepart (for example: IN201701-999/IN201701-999.pdf).
|
||||
|
||||
@ -84,9 +84,9 @@ class Asset extends CommonObject
|
||||
'ref' => array('type'=>'varchar(10)', 'label'=>'Ref', 'visible'=>1, 'enabled'=>1, 'position'=>10, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object", 'showoncombobox'=>1),
|
||||
'entity' => array('type'=>'integer', 'label'=>'Entity', 'visible'=>0, 'enabled'=>1, 'position'=>20, 'notnull'=>1, 'index'=>1,),
|
||||
'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'visible'=>1, 'enabled'=>1, 'position'=>30, 'notnull'=>-1, 'searchall'=>1),
|
||||
'fk_asset_type' => array('type'=>'integer:AssetType:asset/class/asset_type.class.php', 'label'=>'AssetsType', 'visible'=>1, 'enabled'=>1, 'position'=>35, 'notnull'=>1, 'index'=>1, 'searchall'=>1),
|
||||
'amount_ht' => array('type'=>'double(24,8)', 'label'=>'AmountHTShort', 'visible'=>1, 'enabled'=>1, 'position'=>40, 'notnull'=>-1, 'isameasure'=>'1', 'help'=>"Help text",),
|
||||
'amount_vat' => array('type'=>'double(24,8)', 'label'=>'AmountVAT', 'visible'=>1, 'enabled'=>1, 'position'=>40, 'notnull'=>-1, 'isameasure'=>'1', 'help'=>"Help text",),
|
||||
'fk_asset_type' => array('type'=>'integer:AssetType:asset/class/asset_type.class.php', 'label'=>'AssetsType', 'visible'=>1, 'enabled'=>1, 'position'=>50, 'notnull'=>1, 'index'=>1, 'searchall'=>1),
|
||||
'amount_vat' => array('type'=>'double(24,8)', 'label'=>'AmountVAT', 'visible'=>1, 'enabled'=>1, 'position'=>41, 'notnull'=>-1, 'isameasure'=>'1', 'help'=>"Help text",),
|
||||
'description' => array('type'=>'text', 'label'=>'Description', 'visible'=>-1, 'enabled'=>1, 'position'=>90, 'notnull'=>-1,),
|
||||
'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'visible'=>-1, 'enabled'=>1, 'position'=>91, 'notnull'=>-1,),
|
||||
'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'visible'=>-1, 'enabled'=>1, 'position'=>92, 'notnull'=>-1,),
|
||||
|
||||
@ -35,7 +35,7 @@ $langs->load("categories");
|
||||
|
||||
$id = GETPOST('id', 'int');
|
||||
$ref = GETPOST('ref', 'alphanohtml');
|
||||
$type = (int) GETPOST('type', 'int');
|
||||
$type = GETPOST('type', 'aZ09'); // Can be int or string
|
||||
$action = (GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'edit');
|
||||
$confirm = GETPOST('confirm');
|
||||
$cancel = GETPOST('cancel', 'alpha');
|
||||
|
||||
@ -172,7 +172,7 @@ foreach ($fulltree as $key => $val)
|
||||
$counter = "<td class='left' width='40px;'>".(is_countable($elements) ? count($elements) : '0')."</td>";
|
||||
}
|
||||
|
||||
$color = $categstatic->color ? ' style="background: #'.$categstatic->color.';"' : ' style="background: #bbb"';
|
||||
$color = $categstatic->color ? ' style="background: #'.sprintf("%06s", $categstatic->color).';"' : ' style="background: #bbb"';
|
||||
|
||||
$data[] = array(
|
||||
'rowid'=>$val['rowid'],
|
||||
|
||||
@ -122,7 +122,7 @@ if (empty($reshook))
|
||||
$object->accountancy_code = GETPOST("accountancy_code") > 0 ? GETPOST("accountancy_code", "alpha") : "";
|
||||
$object->subledger_account = $subledger_account;
|
||||
|
||||
$object->sens = GETPOST('sens');
|
||||
$object->sens = GETPOST('sens', 'int');
|
||||
$object->fk_project = GETPOST('fk_project', 'int');
|
||||
|
||||
if (empty($datep) || empty($datev))
|
||||
@ -131,12 +131,6 @@ if (empty($reshook))
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
if (empty($object->type_payment) || $object->type_payment < 0)
|
||||
{
|
||||
$langs->load('errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("PaymentMode")), null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
if (empty($object->amount))
|
||||
{
|
||||
$langs->load('errors');
|
||||
@ -149,13 +143,24 @@ if (empty($reshook))
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("BankAccount")), null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
// TODO Remove this and allow instead to edit a various payment to enter accounting code
|
||||
if (empty($object->type_payment) || $object->type_payment < 0)
|
||||
{
|
||||
$langs->load('errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("PaymentMode")), null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
if (!empty($conf->accounting->enabled) && !$object->accountancy_code)
|
||||
{
|
||||
$langs->load('errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("AccountAccounting")), null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
if ($object->sens < 0)
|
||||
{
|
||||
$langs->load('errors');
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Sens")), null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
@ -358,13 +363,6 @@ if ($action == 'create')
|
||||
print '<input name="label" id="label" class="minwidth300 maxwidth150onsmartphone" value="'.($label ? $label : $langs->trans("VariousPayment")).'">';
|
||||
print '</td></tr>';
|
||||
|
||||
// Sens
|
||||
print '<tr><td>';
|
||||
print $form->editfieldkey('Sens', 'sens', '', $object, 0, 'string', '', 1).'</td><td>';
|
||||
$sensarray = array('0' => $langs->trans("Debit"), '1' => $langs->trans("Credit"));
|
||||
print $form->selectarray('sens', $sensarray, $sens);
|
||||
print '</td></tr>';
|
||||
|
||||
// Amount
|
||||
print '<tr><td>';
|
||||
print $form->editfieldkey('Amount', 'amount', '', $object, 0, 'string', '', 1).'</td><td>';
|
||||
@ -396,6 +394,43 @@ if ($action == 'create')
|
||||
print '<td><input name="num_payment" class="maxwidth150onsmartphone" id="num_payment" type="text" value="'.GETPOST("num_payment").'"></td></tr>'."\n";
|
||||
}
|
||||
|
||||
// Accountancy account
|
||||
if (!empty($conf->accounting->enabled)) {
|
||||
// TODO Remove the fieldrequired and allow instead to edit a various payment to enter accounting code
|
||||
print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans("AccountAccounting").'</td>';
|
||||
print '<td>';
|
||||
print $formaccounting->select_account($accountancy_code, 'accountancy_code', 1, null, 1, 1);
|
||||
print '</td></tr>';
|
||||
} else { // For external software
|
||||
print '<tr><td class="titlefieldcreate">'.$langs->trans("AccountAccounting").'</td>';
|
||||
print '<td><input class="minwidth100 maxwidthonsmartphone" name="accountancy_code" value="'.$accountancy_code.'">';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Subledger account
|
||||
if (!empty($conf->accounting->enabled)) {
|
||||
print '<tr><td>'.$langs->trans("SubledgerAccount").'aaaa</td>';
|
||||
print '<td>';
|
||||
if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) {
|
||||
print $formaccounting->select_auxaccount($subledger_account, 'subledger_account', 1, '');
|
||||
} else {
|
||||
print '<input type="text" class="maxwidth200 maxwidthonsmartphone" name="subledger_account" value="'.$subledger_account.'">';
|
||||
}
|
||||
print '</td></tr>';
|
||||
} else { // For external software
|
||||
print '<tr><td>'.$langs->trans("SubledgerAccount").'</td>';
|
||||
print '<td><input class="minwidth100 maxwidthonsmartphone" name="subledger_account" value="'.$subledger_account.'">';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Sens
|
||||
print '<tr><td>';
|
||||
$labelsens = $form->textwithpicto('Sens', $langs->trans("AccountingDirectionHelp"));
|
||||
print $form->editfieldkey($labelsens, 'sens', '', $object, 0, 'string', '', 1).'</td><td>';
|
||||
$sensarray = array('0' => $langs->trans("Debit"), '1' => $langs->trans("Credit"));
|
||||
print $form->selectarray('sens', $sensarray, $sens, 1, 0, 0, '', 0, 0, 0, '', 'minwidth100', 1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled))
|
||||
{
|
||||
@ -417,44 +452,9 @@ if ($action == 'create')
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
// Category
|
||||
if (is_array($options) && count($options) && $conf->categorie->enabled)
|
||||
{
|
||||
if (is_array($options) && count($options) && $conf->categorie->enabled) {
|
||||
print '<tr><td>'.$langs->trans("RubriquesTransactions").'</td><td>';
|
||||
print Form::selectarray('category_transaction', $options, GETPOST('category_transaction'), 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Accountancy account
|
||||
if (!empty($conf->accounting->enabled))
|
||||
{
|
||||
// TODO Remove the fieldrequired and allow instead to edit a various payment to enter accounting code
|
||||
print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans("AccountAccounting").'</td>';
|
||||
print '<td>';
|
||||
print $formaccounting->select_account($accountancy_code, 'accountancy_code', 1, null, 1, 1);
|
||||
print '</td></tr>';
|
||||
} else // For external software
|
||||
{
|
||||
print '<tr><td class="titlefieldcreate">'.$langs->trans("AccountAccounting").'</td>';
|
||||
print '<td><input class="minwidth100 maxwidthonsmartphone" name="accountancy_code" value="'.$accountancy_code.'">';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Subledger account
|
||||
if (!empty($conf->accounting->enabled))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("SubledgerAccount").'aaaa</td>';
|
||||
print '<td>';
|
||||
if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX))
|
||||
{
|
||||
print $formaccounting->select_auxaccount($subledger_account, 'subledger_account', 1, '');
|
||||
} else {
|
||||
print '<input type="text" class="maxwidth200 maxwidthonsmartphone" name="subledger_account" value="'.$subledger_account.'">';
|
||||
}
|
||||
print '</td></tr>';
|
||||
} else // For external software
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("SubledgerAccount").'</td>';
|
||||
print '<td><input class="minwidth100 maxwidthonsmartphone" name="subledger_account" value="'.$subledger_account.'">';
|
||||
print img_picto('', 'category').Form::selectarray('category_transaction', $options, GETPOST('category_transaction'), 1, 0, 0, '', 0, 0, 0, '', 'minwidth300', 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
@ -144,8 +144,12 @@ if ($modecompta == "CREANCES-DETTES")
|
||||
{
|
||||
$name = $langs->trans("ReportInOut").', '.$langs->trans("ByPredefinedAccountGroups");
|
||||
$calcmode = $langs->trans("CalcModeDebt");
|
||||
$calcmode .= '<br>('.$langs->trans("SeeReportInInputOutputMode", '<a href="'.$_SERVER["PHP_SELF"].'?date_startyear='.$tmps['year'].'&date_startmonth='.$tmps['mon'].'&date_startday='.$tmps['mday'].'&date_endyear='.$tmpe['year'].'&date_endmonth='.$tmpe['mon'].'&date_endday='.$tmpe['mday'].'&modecompta=RECETTES-DEPENSES">', '</a>').')';
|
||||
if (!empty($conf->accounting->enabled)) $calcmode .= '<br>('.$langs->trans("SeeReportInBookkeepingMode", '<a href="'.$_SERVER["PHP_SELF"].'?date_startyear='.$tmps['year'].'&date_startmonth='.$tmps['mon'].'&date_startday='.$tmps['mday'].'&date_endyear='.$tmpe['year'].'&date_endmonth='.$tmpe['mon'].'&date_endday='.$tmpe['mday'].'&modecompta=BOOKKEEPING">', '</a>').')';
|
||||
$calcmode .= '<br>('.$langs->trans("SeeReportInInputOutputMode", '{s1}', '{s2}').')';
|
||||
$calcmode = str_replace(array('{s1}', '{s2}'), array('<a href="'.$_SERVER["PHP_SELF"].'?date_startyear='.$tmps['year'].'&date_startmonth='.$tmps['mon'].'&date_startday='.$tmps['mday'].'&date_endyear='.$tmpe['year'].'&date_endmonth='.$tmpe['mon'].'&date_endday='.$tmpe['mday'].'&modecompta=RECETTES-DEPENSES">', '</a>'), $calcmode);
|
||||
if (!empty($conf->accounting->enabled)) {
|
||||
$calcmode .= '<br>('.$langs->trans("SeeReportInBookkeepingMode", '{s1}', '{s2}').')';
|
||||
$calcmode = str_replace(array('{s1}', '{s2}'), array('<a href="'.$_SERVER["PHP_SELF"].'?date_startyear='.$tmps['year'].'&date_startmonth='.$tmps['mon'].'&date_startday='.$tmps['mday'].'&date_endyear='.$tmpe['year'].'&date_endmonth='.$tmpe['mon'].'&date_endday='.$tmpe['mday'].'&modecompta=BOOKKEEPING">', '</a>'), $calcmode);
|
||||
}
|
||||
$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0);
|
||||
$periodlink = ($year_start ? "<a href='".$_SERVER["PHP_SELF"]."?year=".($tmps['year'] - 1)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($tmps['year'] + 1)."&modecompta=".$modecompta."'>".img_next()."</a>" : "");
|
||||
$description = $langs->trans("RulesResultDue");
|
||||
@ -157,8 +161,12 @@ if ($modecompta == "CREANCES-DETTES")
|
||||
{
|
||||
$name = $langs->trans("ReportInOut").', '.$langs->trans("ByPredefinedAccountGroups");
|
||||
$calcmode = $langs->trans("CalcModeEngagement");
|
||||
$calcmode .= '<br>('.$langs->trans("SeeReportInDueDebtMode", '<a href="'.$_SERVER["PHP_SELF"].'?date_startyear='.$tmps['year'].'&date_startmonth='.$tmps['mon'].'&date_startday='.$tmps['mday'].'&date_endyear='.$tmpe['year'].'&date_endmonth='.$tmpe['mon'].'&date_endday='.$tmpe['mday'].'&modecompta=CREANCES-DETTES">', '</a>').')';
|
||||
if (!empty($conf->accounting->enabled)) $calcmode .= '<br>('.$langs->trans("SeeReportInBookkeepingMode", '<a href="'.$_SERVER["PHP_SELF"].'?date_startyear='.$tmps['year'].'&date_startmonth='.$tmps['mon'].'&date_startday='.$tmps['mday'].'&date_endyear='.$tmpe['year'].'&date_endmonth='.$tmpe['mon'].'&date_endday='.$tmpe['mday'].'&modecompta=BOOKKEEPING">', '</a>').')';
|
||||
$calcmode .= '<br>('.$langs->trans("SeeReportInDueDebtMode", '{s1}', '{s2}').')';
|
||||
$calcmode = str_replace(array('{s1}', '{s2}'), array('<a href="'.$_SERVER["PHP_SELF"].'?date_startyear='.$tmps['year'].'&date_startmonth='.$tmps['mon'].'&date_startday='.$tmps['mday'].'&date_endyear='.$tmpe['year'].'&date_endmonth='.$tmpe['mon'].'&date_endday='.$tmpe['mday'].'&modecompta=CREANCES-DETTES">', '</a>'), $calcmode);
|
||||
if (!empty($conf->accounting->enabled)) {
|
||||
$calcmode .= '<br>('.$langs->trans("SeeReportInBookkeepingMode", '{s1}', '{s2}').')';
|
||||
$calcmode = str_replace(array('{s1}', '{s2}'), array('<a href="'.$_SERVER["PHP_SELF"].'?date_startyear='.$tmps['year'].'&date_startmonth='.$tmps['mon'].'&date_startday='.$tmps['mday'].'&date_endyear='.$tmpe['year'].'&date_endmonth='.$tmpe['mon'].'&date_endday='.$tmpe['mday'].'&modecompta=BOOKKEEPING">', '</a>'), $calcmode);
|
||||
}
|
||||
$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0);
|
||||
$periodlink = ($year_start ? "<a href='".$_SERVER["PHP_SELF"]."?year=".($tmps['year'] - 1)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($tmps['year'] + 1)."&modecompta=".$modecompta."'>".img_next()."</a>" : "");
|
||||
$description = $langs->trans("RulesResultInOut");
|
||||
@ -168,8 +176,10 @@ if ($modecompta == "CREANCES-DETTES")
|
||||
{
|
||||
$name = $langs->trans("ReportInOut").', '.$langs->trans("ByPredefinedAccountGroups");
|
||||
$calcmode = $langs->trans("CalcModeBookkeeping");
|
||||
$calcmode .= '<br>('.$langs->trans("SeeReportInInputOutputMode", '<a href="'.$_SERVER["PHP_SELF"].'?date_startyear='.$tmps['year'].'&date_startmonth='.$tmps['mon'].'&date_startday='.$tmps['mday'].'&date_endyear='.$tmpe['year'].'&date_endmonth='.$tmpe['mon'].'&date_endday='.$tmpe['mday'].'&modecompta=RECETTES-DEPENSES">', '</a>').')';
|
||||
$calcmode .= '<br>('.$langs->trans("SeeReportInDueDebtMode", '<a href="'.$_SERVER["PHP_SELF"].'?date_startyear='.$tmps['year'].'&date_startmonth='.$tmps['mon'].'&date_startday='.$tmps['mday'].'&date_endyear='.$tmpe['year'].'&date_endmonth='.$tmpe['mon'].'&date_endday='.$tmpe['mday'].'&modecompta=CREANCES-DETTES">', '</a>').')';
|
||||
$calcmode .= '<br>('.$langs->trans("SeeReportInInputOutputMode", '{s1}', '{s2}').')';
|
||||
$calcmode = str_replace(array('{s1}', '{s2}'), array('<a href="'.$_SERVER["PHP_SELF"].'?date_startyear='.$tmps['year'].'&date_startmonth='.$tmps['mon'].'&date_startday='.$tmps['mday'].'&date_endyear='.$tmpe['year'].'&date_endmonth='.$tmpe['mon'].'&date_endday='.$tmpe['mday'].'&modecompta=RECETTES-DEPENSES">', '</a>'), $calcmode);
|
||||
$calcmode .= '<br>('.$langs->trans("SeeReportInDueDebtMode", '{s1}', '{s2}').')';
|
||||
$calcmode = str_replace(array('{s1}', '{s2}'), array('<a href="'.$_SERVER["PHP_SELF"].'?date_startyear='.$tmps['year'].'&date_startmonth='.$tmps['mon'].'&date_startday='.$tmps['mday'].'&date_endyear='.$tmpe['year'].'&date_endmonth='.$tmpe['mon'].'&date_endday='.$tmpe['mday'].'&modecompta=CREANCES-DETTES">', '</a>'), $calcmode);
|
||||
$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0);
|
||||
$arraylist = array('no'=>$langs->trans("No"), 'yes'=>$langs->trans("AccountWithNonZeroValues"), 'all'=>$langs->trans("All"));
|
||||
$period .= ' '.$langs->trans("DetailByAccount").' '.$form->selectarray('showaccountdetail', $arraylist, $showaccountdetail, 0);
|
||||
|
||||
@ -123,8 +123,12 @@ if ($modecompta == 'CREANCES-DETTES')
|
||||
{
|
||||
$name = $langs->trans("ReportInOut").', '.$langs->trans("ByYear");
|
||||
$calcmode = $langs->trans("CalcModeDebt");
|
||||
$calcmode .= '<br>('.$langs->trans("SeeReportInInputOutputMode", '<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=RECETTES-DEPENSES">', '</a>').')';
|
||||
if (!empty($conf->accounting->enabled)) $calcmode .= '<br>('.$langs->trans("SeeReportInBookkeepingMode", '<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=BOOKKEEPING">', '</a>').')';
|
||||
$calcmode .= '<br>('.$langs->trans("SeeReportInInputOutputMode", '{s1}', '{s2}').')';
|
||||
$calcmode = str_replace(array('{s1}', '{s2}'), array('<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=RECETTES-DEPENSES">', '</a>'), $calcmode);
|
||||
if (!empty($conf->accounting->enabled)) {
|
||||
$calcmode .= '<br>('.$langs->trans("SeeReportInBookkeepingMode", '{s1}', '{s2}').')';
|
||||
$calcmode = str_replace(array('{s1}', '{s2}'), array('<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=BOOKKEEPING">', '</a>'), $calcmode);
|
||||
}
|
||||
$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0);
|
||||
$periodlink = ($year_start ? "<a href='".$_SERVER["PHP_SELF"]."?year=".($year_start + $nbofyear - 2)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year_start + $nbofyear)."&modecompta=".$modecompta."'>".img_next()."</a>" : "");
|
||||
$description = $langs->trans("RulesAmountWithTaxIncluded");
|
||||
@ -136,8 +140,12 @@ if ($modecompta == 'CREANCES-DETTES')
|
||||
} elseif ($modecompta == "RECETTES-DEPENSES") {
|
||||
$name = $langs->trans("ReportInOut").', '.$langs->trans("ByYear");
|
||||
$calcmode = $langs->trans("CalcModeEngagement");
|
||||
$calcmode .= '<br>('.$langs->trans("SeeReportInDueDebtMode", '<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=CREANCES-DETTES">', '</a>').')';
|
||||
if (!empty($conf->accounting->enabled)) $calcmode .= '<br>('.$langs->trans("SeeReportInBookkeepingMode", '<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=BOOKKEEPING">', '</a>').')';
|
||||
$calcmode .= '<br>('.$langs->trans("SeeReportInDueDebtMode", '{s1}', '{s2}').')';
|
||||
$calcmode = str_replace(array('{s1}', '{s2}'), array('<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=CREANCES-DETTES">', '</a>'), $calcmode);
|
||||
if (!empty($conf->accounting->enabled)) {
|
||||
$calcmode .= '<br>('.$langs->trans("SeeReportInBookkeepingMode", '{s1}', '{s2}').')';
|
||||
$calcmode = str_replace(array('{s1}', '{s2}'), array('<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=BOOKKEEPING">', '</a>'), $calcmode);
|
||||
}
|
||||
$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0);
|
||||
$periodlink = ($year_start ? "<a href='".$_SERVER["PHP_SELF"]."?year=".($year_start + $nbofyear - 2)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year_start + $nbofyear)."&modecompta=".$modecompta."'>".img_next()."</a>" : "");
|
||||
$description = $langs->trans("RulesAmountWithTaxIncluded");
|
||||
@ -148,8 +156,10 @@ if ($modecompta == 'CREANCES-DETTES')
|
||||
{
|
||||
$name = $langs->trans("ReportInOut").', '.$langs->trans("ByYear");
|
||||
$calcmode = $langs->trans("CalcModeBookkeeping");
|
||||
$calcmode .= '<br>('.$langs->trans("SeeReportInInputOutputMode", '<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=RECETTES-DEPENSES">', '</a>').')';
|
||||
$calcmode .= '<br>('.$langs->trans("SeeReportInDueDebtMode", '<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=CREANCES-DETTES">', '</a>').')';
|
||||
$calcmode .= '<br>('.$langs->trans("SeeReportInInputOutputMode", '{s1}', '{s2}').')';
|
||||
$calcmode = str_replace(array('{s1}', '{s2}'), array('<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=RECETTES-DEPENSES">', '</a>'), $calcmode);
|
||||
$calcmode .= '<br>('.$langs->trans("SeeReportInDueDebtMode", '{s1}', '{s2}').')';
|
||||
$calcmode = str_replace(array('{s1}', '{s2}'), array('<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=CREANCES-DETTES">', '</a>'), $calcmode);
|
||||
$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0);
|
||||
$periodlink = ($year_start ? "<a href='".$_SERVER["PHP_SELF"]."?year=".($year_start + $nbofyear - 2)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year_start + $nbofyear)."&modecompta=".$modecompta."'>".img_next()."</a>" : "");
|
||||
$description = $langs->trans("RulesAmountOnInOutBookkeepingRecord");
|
||||
@ -818,17 +828,15 @@ if (!empty($conf->global->ACCOUNTING_REPORTS_INCLUDE_LOAN) && !empty($conf->loan
|
||||
if (!empty($conf->accounting->enabled) && ($modecompta == 'BOOKKEEPING'))
|
||||
{
|
||||
$predefinedgroupwhere = "(";
|
||||
//$predefinedgroupwhere.= " (pcg_type = 'EXPENSE' and pcg_subtype in ('PRODUCT','SERVICE'))";
|
||||
$predefinedgroupwhere .= " (pcg_type = 'EXPENSE')";
|
||||
$predefinedgroupwhere .= " (aa.pcg_type = 'EXPENSE')";
|
||||
$predefinedgroupwhere .= " OR ";
|
||||
//$predefinedgroupwhere.= " (pcg_type = 'INCOME' and pcg_subtype in ('PRODUCT','SERVICE'))";
|
||||
$predefinedgroupwhere .= " (pcg_type = 'INCOME')";
|
||||
$predefinedgroupwhere .= " (aa.pcg_type = 'INCOME')";
|
||||
$predefinedgroupwhere .= ")";
|
||||
|
||||
$charofaccountstring = $conf->global->CHARTOFACCOUNTS;
|
||||
$charofaccountstring = dol_getIdFromCode($db, $conf->global->CHARTOFACCOUNTS, 'accounting_system', 'rowid', 'pcg_version');
|
||||
|
||||
$sql = "SELECT b.doc_ref, b.numero_compte, b.subledger_account, b.subledger_label, pcg_type, date_format(b.doc_date,'%Y-%m') as dm, sum(b.debit) as debit, sum(b.credit) as credit, sum(b.montant) as amount";
|
||||
$sql = "SELECT b.doc_ref, b.numero_compte, b.subledger_account, b.subledger_label, aa.pcg_type, date_format(b.doc_date,'%Y-%m') as dm, sum(b.debit) as debit, sum(b.credit) as credit, sum(b.montant) as amount";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as b, ".MAIN_DB_PREFIX."accounting_account as aa";
|
||||
$sql .= " WHERE b.entity = ".$conf->entity;
|
||||
$sql .= " AND aa.entity = ".$conf->entity;
|
||||
@ -855,10 +863,18 @@ if (!empty($conf->accounting->enabled) && ($modecompta == 'BOOKKEEPING'))
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
if (!isset($encaiss[$obj->dm])) $encaiss[$obj->dm] = 0;
|
||||
if (!isset($decaiss[$obj->dm])) $decaiss[$obj->dm] = 0;
|
||||
$encaiss[$obj->dm] += $obj->credit;
|
||||
$decaiss[$obj->dm] += $obj->debit;
|
||||
if ($obj->pcg_type == 'INCOME') {
|
||||
if (!isset($encaiss[$obj->dm])) $encaiss[$obj->dm] = 0; // To avoid warning of var not defined
|
||||
$encaiss[$obj->dm] += $obj->credit;
|
||||
$encaiss[$obj->dm] -= $obj->credit;
|
||||
}
|
||||
if ($obj->pcg_type == 'INCOME') {
|
||||
if (!isset($decaiss[$obj->dm])) $decaiss[$obj->dm] = 0; // To avoid warning of var not defined
|
||||
$decaiss[$obj->dm] += $obj->debit;
|
||||
$decaiss[$obj->dm] -= $obj->credit;
|
||||
}
|
||||
|
||||
// ???
|
||||
if (!isset($encaiss_ttc[$obj->dm])) $encaiss_ttc[$obj->dm] = 0;
|
||||
if (!isset($decaiss_ttc[$obj->dm])) $decaiss_ttc[$obj->dm] = 0;
|
||||
$encaiss_ttc[$obj->dm] += 0;
|
||||
|
||||
@ -122,7 +122,7 @@ if ($modecompta == "CREANCES-DETTES")
|
||||
$name = $langs->trans("Turnover");
|
||||
$calcmode = $langs->trans("CalcModeDebt");
|
||||
//$calcmode.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=RECETTES-DEPENSES">','</a>').')';
|
||||
$calcmode .= '<br>('.$langs->trans("SeeReportInBookkeepingMode", '{links1}', '{link2}').')';
|
||||
$calcmode .= '<br>('.$langs->trans("SeeReportInBookkeepingMode", '{link1}', '{link2}').')';
|
||||
$calcmode = str_replace('{link1}', '<a class="bold" href="'.$_SERVER["PHP_SELF"].'?'.($param ? $param : 'year_start='.$year_start).'&modecompta=BOOKKEEPING">', $calcmode);
|
||||
$calcmode = str_replace('{link2}', '</a>', $calcmode);
|
||||
$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0);
|
||||
|
||||
@ -59,7 +59,7 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end
|
||||
{
|
||||
// We define date_start and date_end
|
||||
$year_end = $year_start + ($nbofyear - 1);
|
||||
$month_start = GETPOST("month") ?GETPOST("month") : ($conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1);
|
||||
$month_start = GETPOST("month") ? GETPOST("month", 'int') : ($conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1);
|
||||
if (!GETPOST('month'))
|
||||
{
|
||||
if (!GETPOST("year") && $month_start > $month_current)
|
||||
@ -113,8 +113,9 @@ if ($modecompta == "CREANCES-DETTES")
|
||||
{
|
||||
$name = $langs->trans("PurchaseTurnover");
|
||||
$calcmode = $langs->trans("CalcModeDebt");
|
||||
//$calcmode.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=RECETTES-DEPENSES">','</a>').')';
|
||||
$calcmode .= '<br>('.$langs->trans("SeeReportInBookkeepingMode", '<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=BOOKKEEPING">', '</a>').')';
|
||||
$calcmode .= '<br>('.$langs->trans("SeeReportInBookkeepingMode", '{link1}', '{link2}').')';
|
||||
$calcmode = str_replace('{link1}', '<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=BOOKKEEPING">', $calcmode);
|
||||
$calcmode = str_replace('{link2}', '</a>', $calcmode);
|
||||
$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0);
|
||||
$periodlink = ($year_start ? "<a href='".$_SERVER["PHP_SELF"]."?year=".($year_start + $nbofyear - 2)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year_start + $nbofyear)."&modecompta=".$modecompta."'>".img_next()."</a>" : "");
|
||||
$description = $langs->trans("RulesPurchaseTurnoverDue");
|
||||
@ -124,8 +125,6 @@ if ($modecompta == "CREANCES-DETTES")
|
||||
{
|
||||
$name = $langs->trans("PurchaseTurnoverCollected");
|
||||
$calcmode = $langs->trans("CalcModeEngagement");
|
||||
//$calcmode.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=CREANCES-DETTES">','</a>').')';
|
||||
//$calcmode.='<br>('.$langs->trans("SeeReportInBookkeepingMode",'<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=BOOKKEEPINGCOLLECTED">','</a>').')';
|
||||
$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0);
|
||||
$periodlink = ($year_start ? "<a href='".$_SERVER["PHP_SELF"]."?year=".($year_start + $nbofyear - 2)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year_start + $nbofyear)."&modecompta=".$modecompta."'>".img_next()."</a>" : "");
|
||||
$description = $langs->trans("RulesPurchaseTurnoverIn");
|
||||
@ -135,8 +134,9 @@ if ($modecompta == "CREANCES-DETTES")
|
||||
{
|
||||
$name = $langs->trans("PurchaseTurnover");
|
||||
$calcmode = $langs->trans("CalcModeBookkeeping");
|
||||
$calcmode .= '<br>('.$langs->trans("SeeReportInDueDebtMode", '<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=CREANCES-DETTES">', '</a>').')';
|
||||
//$calcmode.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=RECETTES-DEPENSES">','</a>').')';
|
||||
$calcmode .= '<br>('.$langs->trans("SeeReportInDueDebtMode", '{link1}', '{link2}').')';
|
||||
$calcmode = str_replace('{link1}', '<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=CREANCES-DETTES">', $calcmode);
|
||||
$calcmode = str_replace('{link2}', '</a>', $calcmode);
|
||||
$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0);
|
||||
$periodlink = ($year_start ? "<a href='".$_SERVER["PHP_SELF"]."?year=".($year_start + $nbofyear - 2)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year_start + $nbofyear)."&modecompta=".$modecompta."'>".img_next()."</a>" : "");
|
||||
$description = $langs->trans("RulesPurchaseTurnoverTotalPurchaseJournal");
|
||||
|
||||
@ -114,17 +114,17 @@ $fieldstosearchall = array(
|
||||
if (empty($user->socid)) $fieldstosearchall["c.note_private"] = "NotePrivate";
|
||||
|
||||
$arrayfields = array(
|
||||
'c.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1),
|
||||
'c.ref_customer'=>array('label'=>$langs->trans("RefCustomer"), 'checked'=>1),
|
||||
'c.ref_supplier'=>array('label'=>$langs->trans("RefSupplier"), 'checked'=>1),
|
||||
's.nom'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>1),
|
||||
's.email'=>array('label'=>$langs->trans("ThirdPartyEmail"), 'checked'=>0),
|
||||
's.town'=>array('label'=>$langs->trans("Town"), 'checked'=>0),
|
||||
's.zip'=>array('label'=>$langs->trans("Zip"), 'checked'=>0),
|
||||
'state.nom'=>array('label'=>$langs->trans("StateShort"), 'checked'=>0),
|
||||
'country.code_iso'=>array('label'=>$langs->trans("Country"), 'checked'=>0),
|
||||
'sale_representative'=>array('label'=>$langs->trans("SaleRepresentativesOfThirdParty"), 'checked'=>1),
|
||||
'c.date_contrat'=>array('label'=>$langs->trans("DateContract"), 'checked'=>1),
|
||||
'c.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1, 'position'=>10),
|
||||
'c.ref_customer'=>array('label'=>$langs->trans("RefCustomer"), 'checked'=>1, 'position'=>12),
|
||||
'c.ref_supplier'=>array('label'=>$langs->trans("RefSupplier"), 'checked'=>1, 'position'=>14),
|
||||
's.nom'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>1, 'position'=>30),
|
||||
's.email'=>array('label'=>$langs->trans("ThirdPartyEmail"), 'checked'=>0, 'position'=>30),
|
||||
's.town'=>array('label'=>$langs->trans("Town"), 'checked'=>0, 'position'=>31),
|
||||
's.zip'=>array('label'=>$langs->trans("Zip"), 'checked'=>0, 'position'=>32),
|
||||
'state.nom'=>array('label'=>$langs->trans("StateShort"), 'checked'=>0, 'position'=>33),
|
||||
'country.code_iso'=>array('label'=>$langs->trans("Country"), 'checked'=>0, 'position'=>34),
|
||||
'sale_representative'=>array('label'=>$langs->trans("SaleRepresentativesOfThirdParty"), 'checked'=>1, 'position'=>80),
|
||||
'c.date_contrat'=>array('label'=>$langs->trans("DateContract"), 'checked'=>1, 'position'=>45),
|
||||
'c.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
|
||||
'c.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500),
|
||||
'lower_planned_end_date'=>array('label'=>$langs->trans("LowerDateEndPlannedShort"), 'checked'=>1, 'position'=>900, 'help'=>$langs->trans("LowerDateEndPlannedShort")),
|
||||
|
||||
@ -159,7 +159,7 @@ if ($action == 'add')
|
||||
$parameters = $param;
|
||||
$parameters_array = explode("\r\n", $parameters);
|
||||
//In sellist we have only one line and it can have come to do SQL expression
|
||||
if ($type == 'sellist') {
|
||||
if ($type == 'sellist' || $type == 'chkbxlst') {
|
||||
foreach ($parameters_array as $param_ligne)
|
||||
{
|
||||
$params['options'] = array($parameters=>null);
|
||||
@ -338,7 +338,7 @@ if ($action == 'update')
|
||||
$parameters = $param;
|
||||
$parameters_array = explode("\r\n", $parameters);
|
||||
//In sellist we have only one line and it can have come to do SQL expression
|
||||
if ($type == 'sellist') {
|
||||
if ($type == 'sellist' || $type == 'chkbxlst') {
|
||||
foreach ($parameters_array as $param_ligne)
|
||||
{
|
||||
$params['options'] = array($parameters=>null);
|
||||
|
||||
@ -73,7 +73,23 @@ class box_funnel_of_prospection extends ModeleBoxes
|
||||
public function loadBox($max = 5)
|
||||
{
|
||||
global $conf;
|
||||
include DOL_DOCUMENT_ROOT . '/theme/' . $conf->theme . '/theme_vars.inc.php';
|
||||
|
||||
// default values
|
||||
$badgeStatus0 = '#cbd3d3'; // draft
|
||||
$badgeStatus1 = '#bc9526'; // validated
|
||||
$badgeStatus1b = '#bc9526'; // validated
|
||||
$badgeStatus2 = '#9c9c26'; // approved
|
||||
$badgeStatus3 = '#bca52b';
|
||||
$badgeStatus4 = '#25a580'; // Color ok
|
||||
$badgeStatus4b = '#25a580'; // Color ok
|
||||
$badgeStatus5 = '#cad2d2';
|
||||
$badgeStatus6 = '#cad2d2';
|
||||
$badgeStatus7 = '#baa32b';
|
||||
$badgeStatus8 = '#993013';
|
||||
$badgeStatus9 = '#e7f0f0';
|
||||
if (file_exists(DOL_DOCUMENT_ROOT . '/theme/' . $conf->theme . '/theme_vars.inc.php')) {
|
||||
include DOL_DOCUMENT_ROOT . '/theme/' . $conf->theme . '/theme_vars.inc.php';
|
||||
}
|
||||
$listofoppstatus = array();
|
||||
$listofopplabel = array();
|
||||
$listofoppcode = array();
|
||||
@ -113,7 +129,9 @@ class box_funnel_of_prospection extends ModeleBoxes
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
} else dol_print_error($this->db);
|
||||
} else {
|
||||
dol_print_error($this->db);
|
||||
}
|
||||
|
||||
global $conf, $user, $langs;
|
||||
|
||||
@ -134,7 +152,7 @@ class box_funnel_of_prospection extends ModeleBoxes
|
||||
$sql .= " GROUP BY p.fk_opp_status, cls.code";
|
||||
$resql = $this->db->query($sql);
|
||||
|
||||
$form = new Form($ths->db);
|
||||
$form = new Form($this->db);
|
||||
if ($resql) {
|
||||
$num = $this->db->num_rows($resql);
|
||||
$i = 0;
|
||||
@ -153,7 +171,9 @@ class box_funnel_of_prospection extends ModeleBoxes
|
||||
$valsnb[$obj->opp_status] = $obj->nb;
|
||||
$valsamount[$obj->opp_status] = $obj->opp_amount;
|
||||
$totalnb += $obj->nb;
|
||||
if ($obj->opp_status) $totaloppnb += $obj->nb;
|
||||
if ($obj->opp_status) {
|
||||
$totaloppnb += $obj->nb;
|
||||
}
|
||||
if (!in_array($obj->code, array('WON', 'LOST'))) {
|
||||
$totalamount += $obj->opp_amount;
|
||||
$ponderated_opp_amount += $obj->ponderated_opp_amount;
|
||||
@ -171,8 +191,12 @@ class box_funnel_of_prospection extends ModeleBoxes
|
||||
$labelStatus = '';
|
||||
if ($status != 7) {
|
||||
$code = dol_getIdFromCode($this->db, $status, 'c_lead_status', 'rowid', 'code');
|
||||
if ($code) $labelStatus = $langs->transnoentitiesnoconv("OppStatus" . $code);
|
||||
if (empty($labelStatus)) $labelStatus = $listofopplabel[$status];
|
||||
if ($code) {
|
||||
$labelStatus = $langs->transnoentitiesnoconv("OppStatus" . $code);
|
||||
}
|
||||
if (empty($labelStatus)) {
|
||||
$labelStatus = $listofopplabel[$status];
|
||||
}
|
||||
|
||||
$dataseries[] = array($labelStatus,(isset($valsamount[$status]) ? (float) $valsamount[$status] : 0));
|
||||
if (!$conf->use_javascript_ajax) {
|
||||
|
||||
@ -4282,7 +4282,11 @@ function getTitleFieldOfList($name, $thead = 0, $file = "", $field = "", $begin
|
||||
$out .= '>';
|
||||
}
|
||||
|
||||
if ($tooltip) $out .= $form->textwithpicto($langs->trans($name), $langs->trans($tooltip));
|
||||
if ($tooltip) {
|
||||
// You can also use 'TranslationString:keyfortooltiponlick' for a tooltip on click.
|
||||
$tmptooltip = explode(':', $tooltip);
|
||||
$out .= $form->textwithpicto($langs->trans($name), $langs->trans($tmptooltip[0]), 1, 'help', '', 0, 3, (empty($tmptooltip[1]) ? '' : 'extra_'.str_replace('.', '_', $field).'_'.$tmptooltip[1]));
|
||||
}
|
||||
else $out .= $langs->trans($name);
|
||||
|
||||
if (empty($thead) && $field && empty($disablesortlink)) // If this is a sort field
|
||||
@ -6500,12 +6504,18 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
||||
}
|
||||
if (empty($exclude) || !in_array('objectamount', $exclude))
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/functionsnumtoword.lib.php';
|
||||
|
||||
$substitutionarray['__DATE_YMD__'] = is_object($object) ? (isset($object->date) ? dol_print_date($object->date, 'day', 0, $outputlangs) : null) : '';
|
||||
$substitutionarray['__DATE_DUE_YMD__'] = is_object($object) ? (isset($object->date_lim_reglement) ? dol_print_date($object->date_lim_reglement, 'day', 0, $outputlangs) : null) : '';
|
||||
|
||||
$substitutionarray['__AMOUNT__'] = is_object($object) ? $object->total_ttc : '';
|
||||
$substitutionarray['__AMOUNT_TEXT__'] = is_object($object) ? dol_convertToWord($object->total_ttc, $outputlangs, '', true) : '';
|
||||
$substitutionarray['__AMOUNT_TEXTCURRENCY__'] = is_object($object) ? dol_convertToWord($object->total_ttc, $outputlangs, $conf->currency, true) : '';
|
||||
$substitutionarray['__AMOUNT_EXCL_TAX__'] = is_object($object) ? $object->total_ht : '';
|
||||
$substitutionarray['__AMOUNT_VAT__'] = is_object($object) ? (isset($object->total_vat) ? $object->total_vat : $object->total_tva) : '';
|
||||
$substitutionarray['__AMOUNT_VAT_TEXT__'] = is_object($object) ? (isset($object->total_vat) ? dol_convertToWord($object->total_vat, $outputlangs, '', true) : dol_convertToWord($object->total_tva, $outputlangs, '', true)) : '';
|
||||
$substitutionarray['__AMOUNT_VAT_TEXTCURRENCY__'] = is_object($object) ? (isset($object->total_vat) ? dol_convertToWord($object->total_vat, $outputlangs, $conf->currency, true) : dol_convertToWord($object->total_tva, $outputlangs, $conf->currency, true)) : '';
|
||||
if ($onlykey != 2 || $mysoc->useLocalTax(1)) $substitutionarray['__AMOUNT_TAX2__'] = is_object($object) ? $object->total_localtax1 : '';
|
||||
if ($onlykey != 2 || $mysoc->useLocalTax(2)) $substitutionarray['__AMOUNT_TAX3__'] = is_object($object) ? $object->total_localtax2 : '';
|
||||
|
||||
@ -6515,7 +6525,10 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
||||
if ($onlykey != 2 || $mysoc->useLocalTax(1)) $substitutionarray['__AMOUNT_TAX2_FORMATED__'] = is_object($object) ? ($object->total_localtax1 ? price($object->total_localtax1, 0, $outputlangs, 0, 0, -1, $conf->currency) : null) : '';
|
||||
if ($onlykey != 2 || $mysoc->useLocalTax(2)) $substitutionarray['__AMOUNT_TAX3_FORMATED__'] = is_object($object) ? ($object->total_localtax2 ? price($object->total_localtax2, 0, $outputlangs, 0, 0, -1, $conf->currency) : null) : '';
|
||||
|
||||
// TODO Add keys for foreign multicurrency
|
||||
$substitutionarray['__AMOUNT_MULTICURRENCY__'] = is_object($object) ? $object->multicurrency_total_ttc : '';
|
||||
$substitutionarray['__AMOUNT_MULTICURRENCY_TEXT__'] = is_object($object) ? dol_convertToWord($object->multicurrency_total_ttc, $outputlangs, '', true) : '';
|
||||
$substitutionarray['__AMOUNT_MULTICURRENCY_TEXTCURRENCY__'] = is_object($object) ? dol_convertToWord($object->multicurrency_total_ttc, $outputlangs, $object->multicurrency_code, true) : '';
|
||||
// TODO Add other keys for foreign multicurrency
|
||||
|
||||
// For backward compatibility
|
||||
if ($onlykey != 2)
|
||||
|
||||
@ -29,11 +29,11 @@
|
||||
*
|
||||
* @param float $num Number to convert (must be a numeric value, like reported by price2num())
|
||||
* @param Translate $langs Language
|
||||
* @param boolean $currency 0=number to translate | 1=currency to translate
|
||||
* @param boolean $centimes 0=no cents/centimes | 1=there is cents/centimes to translate
|
||||
* @param string $currency ''=number to translate | 'XX'=currency code to use into text
|
||||
* @param boolean $centimes false=no cents/centimes | true=there is cents/centimes
|
||||
* @return string|false Text of the number
|
||||
*/
|
||||
function dol_convertToWord($num, $langs, $currency = false, $centimes = false)
|
||||
function dol_convertToWord($num, $langs, $currency = '', $centimes = false)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
@ -48,9 +48,9 @@ function dol_convertToWord($num, $langs, $currency = false, $centimes = false)
|
||||
|
||||
if (!empty($conf->global->MAIN_MODULE_NUMBERWORDS)) {
|
||||
if ($currency) {
|
||||
$type = 1;
|
||||
$type = '1';
|
||||
} else {
|
||||
$type = 0;
|
||||
$type = '0';
|
||||
}
|
||||
|
||||
$concatWords = $langs->getLabelFromNumber($num, $type);
|
||||
|
||||
@ -1288,7 +1288,7 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0,
|
||||
$prodser->get_sousproduits_arbo();
|
||||
if (!empty($prodser->sousprods) && is_array($prodser->sousprods) && count($prodser->sousprods)) {
|
||||
$tmparrayofsubproducts = reset($prodser->sousprods);
|
||||
foreach($tmparrayofsubproducts as $subprodval) {
|
||||
foreach ($tmparrayofsubproducts as $subprodval) {
|
||||
$libelleproduitservice .= "\n * ".$subprodval[5].(($subprodval[5] && $subprodval[3]) ? ' - ' : '').$subprodval[3].' ('.$subprodval[1].')';
|
||||
}
|
||||
}
|
||||
|
||||
@ -1245,14 +1245,14 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
||||
|
||||
// Journals
|
||||
if (!empty($conf->accounting->enabled) && !empty($user->rights->accounting->comptarapport->lire) && $mainmenu == 'accountancy') {
|
||||
$newmenu->add('', $langs->trans("RegistrationInAccounting"), 1, $user->rights->accounting->comptarapport->lire);
|
||||
$newmenu->add('', $langs->trans("RegistrationInAccounting"), 1, $user->rights->accounting->comptarapport->lire, '', '', '');
|
||||
|
||||
// Multi journal
|
||||
$sql = "SELECT rowid, code, label, nature";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."accounting_journal";
|
||||
$sql .= " WHERE entity = ".$conf->entity;
|
||||
$sql .= " AND active = 1";
|
||||
$sql .= " ORDER BY label DESC";
|
||||
$sql .= " ORDER BY nature ASC, label DESC";
|
||||
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
|
||||
@ -128,8 +128,13 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element]
|
||||
print '<td class="';
|
||||
if ((!empty($action) && ($action == 'create' || $action == 'edit')) && !empty($extrafields->attributes[$object->table_element]['required'][$tmpkeyextra])) print ' fieldrequired';
|
||||
print '">';
|
||||
if (!empty($extrafields->attributes[$object->table_element]['help'][$tmpkeyextra])) print $form->textwithpicto($langs->trans($tmplabelextra), $langs->trans($extrafields->attributes[$object->table_element]['help'][$tmpkeyextra]));
|
||||
else print $langs->trans($tmplabelextra);
|
||||
if (!empty($extrafields->attributes[$object->table_element]['help'][$tmpkeyextra])) {
|
||||
// You can also use 'TranslationString:keyfortooltiponlick' for a tooltip on click.
|
||||
$tmptooltip = explode(':', $extrafields->attributes[$object->table_element]['help'][$tmpkeyextra]);
|
||||
print $form->textwithpicto($langs->trans($tmplabelextra), $langs->trans($tmptooltip[0]), 1, 'help', '', 0, 3, (empty($tmptooltip[1]) ? '' : 'extra_'.$tmpkeyextra.'_'.$tmptooltip[1]));
|
||||
} else {
|
||||
print $langs->trans($tmplabelextra);
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
//TODO Improve element and rights detection
|
||||
|
||||
@ -1868,6 +1868,7 @@ class Expedition extends CommonObject
|
||||
$statusType = 'status'.$status;
|
||||
if ($status == self::STATUS_VALIDATED) $statusType = 'status4';
|
||||
if ($status == self::STATUS_CLOSED) $statusType = 'status6';
|
||||
if ($status == self::STATUS_CANCELED) $statusType = 'status9';
|
||||
|
||||
return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode);
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -198,7 +198,8 @@ Docdate=Date
|
||||
Docref=Reference
|
||||
LabelAccount=Label account
|
||||
LabelOperation=Label operation
|
||||
Sens=Sens
|
||||
Sens=Direction
|
||||
AccountingDirectionHelp=For an accounting account of a customer, use Credit to record a payment you received<br>For an accounting account of a supplier, use Debit to record a payment you make
|
||||
LetteringCode=Lettering code
|
||||
Lettering=Lettering
|
||||
Codejournal=Journal
|
||||
|
||||
@ -2084,4 +2084,5 @@ YouMayFindSecurityAdviceHere=You may find security advisory here
|
||||
ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it.
|
||||
ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment.
|
||||
CombinationsSeparator=Separator character for product combinations
|
||||
SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples
|
||||
SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples
|
||||
SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF.
|
||||
@ -30,6 +30,7 @@ OtherSendingsForSameOrder=Other shipments for this order
|
||||
SendingsAndReceivingForSameOrder=Shipments and receipts for this order
|
||||
SendingsToValidate=Shipments to validate
|
||||
StatusSendingCanceled=Canceled
|
||||
StatusSendingCanceledShort=Canceled
|
||||
StatusSendingDraft=Draft
|
||||
StatusSendingValidated=Validated (products to ship or already shipped)
|
||||
StatusSendingProcessed=Processed
|
||||
|
||||
@ -565,12 +565,15 @@ if (!defined('NOLOGIN'))
|
||||
// Hooks for security access
|
||||
$action = '';
|
||||
$hookmanager->initHooks(array('login'));
|
||||
$parameters = array('dol_authmode'=>$dol_authmode);
|
||||
$reshook = $hookmanager->executeHooks('loginCheckSecurityAccess', $parameters, $user, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) $error++;
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('beforeLoginAuthentication', $parameters, $user, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
$test = false;
|
||||
$error++;
|
||||
}
|
||||
|
||||
// Verification security graphic code
|
||||
if (GETPOST("username", "alpha", 2) && !empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA) && !isset($_SESSION['dol_bypass_antispam']))
|
||||
if ($test && GETPOST("username", "alpha", 2) && !empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA) && !isset($_SESSION['dol_bypass_antispam']))
|
||||
{
|
||||
$sessionkey = 'dol_antispam_value';
|
||||
$ok = (array_key_exists($sessionkey, $_SESSION) === true && (strtolower($_SESSION[$sessionkey]) == strtolower($_POST['code'])));
|
||||
|
||||
@ -85,7 +85,7 @@ class MyObject extends CommonObject
|
||||
* 'searchall' is 1 if we want to search in this field when making a search from the quick search button.
|
||||
* 'isameasure' must be set to 1 if you want to have a total on list for this field. Field type must be summable like integer or double(24,8).
|
||||
* 'css' and 'cssview' and 'csslist' is the CSS style to use on field. 'css' is used in creation and update. 'cssview' is used in view mode. 'csslist' is used for columns in lists. For example: 'maxwidth200', 'wordbreak', 'tdoverflowmax200'
|
||||
* 'help' is a string visible as a tooltip on field
|
||||
* 'help' is a 'TranslationString' to use to show a tooltip on field. You can also use 'TranslationString:keyfortooltiponlick' for a tooltip on click.
|
||||
* 'showoncombobox' if value of the field must be visible into the label of the combobox that list record
|
||||
* 'disabled' is 1 if we want to have the field locked by a 'disabled' attribute. In most cases, this is never set into the definition of $fields into class, but is set dynamically by some part of code.
|
||||
* 'arraykeyval' to set list of value if type is a list of predefined values. For example: array("0"=>"Draft","1"=>"Active","-1"=>"Cancel")
|
||||
|
||||
@ -535,7 +535,7 @@ while ($compteur < $num)
|
||||
// Button edit at end of line
|
||||
if ($compteur != $ligneamodifier && $mod_ok)
|
||||
{
|
||||
print '<td class="casevide"><input type="submit" class="button" name="modifierligne'.$compteur.'" value="'.dol_escape_htmltag($langs->trans("Edit")).'"></td>'."\n";
|
||||
print '<td class="casevide"><input type="submit" class="button smallpaddingimp" name="modifierligne'.$compteur.'" value="'.dol_escape_htmltag($langs->trans("Edit")).'"></td>'."\n";
|
||||
}
|
||||
|
||||
//demande de confirmation pour modification de ligne
|
||||
@ -729,7 +729,7 @@ if ($comments)
|
||||
|
||||
// Form to add comment
|
||||
if ($object->allow_comments) {
|
||||
print '<div class="addcomment"><span class="opacitymedium">'.$langs->trans("AddACommentForPoll")."</span><br>\n";
|
||||
print '<br><div class="addcomment"><span class="opacitymedium">'.$langs->trans("AddACommentForPoll")."</span><br>\n";
|
||||
|
||||
print '<textarea name="comment" rows="'.ROWS_2.'" class="quatrevingtpercent">'.dol_escape_htmltag(GETPOST('comment', 'restricthtml'), 0, 1).'</textarea><br>'."\n";
|
||||
print $langs->trans("Name").': ';
|
||||
|
||||
@ -615,13 +615,12 @@ if ($contextpage == 'poslist' && $type == 't' && (!empty($conf->global->PRODUIT_
|
||||
|
||||
// Show the new button only when this page is not opend from the Extended POS (pop-up window)
|
||||
// but allow it too, when a user has the rights to create a new customer
|
||||
if ($contextpage != 'poslist')
|
||||
{
|
||||
if ($contextpage != 'poslist') {
|
||||
$url = DOL_URL_ROOT.'/societe/card.php?action=create'.$typefilter;
|
||||
if (!empty($socid)) $url .= '&socid='.$socid;
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', $url, '', $user->rights->societe->creer);
|
||||
} elseif ($user->rights->societe->creer) {
|
||||
$url = DOL_URL_ROOT.'/societe/card.php?action=create&type=t&contextpage=poslist&optioncss=print&backtopage='.$_SERVER["PHP_SELF"].'?type=t&contextpage=poslist&nomassaction=1&optioncss=print&place='.urlencode($place);
|
||||
$url = DOL_URL_ROOT.'/societe/card.php?action=create&type=t&contextpage=poslist&optioncss=print&backtopage='.urlencode($_SERVER["PHP_SELF"].'?type=t&contextpage=poslist&nomassaction=1&optioncss=print&place='.$place);
|
||||
$label = 'MenuNewCustomer';
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', $url);
|
||||
}
|
||||
|
||||
@ -4613,7 +4613,7 @@ table.cal_event td.cal_event_right { padding: 4px 4px !important; }
|
||||
.cal_event a:link { color: #111111; font-weight: normal !important; }
|
||||
.cal_event a:visited { color: #111111; font-weight: normal !important; }
|
||||
.cal_event a:active { color: #111111; font-weight: normal !important; }
|
||||
.cal_event_notbusy a.cal_event_title:hover { color: #111111; font-weight: normal !important; color:rgba(255,255,255,.75); }
|
||||
.cal_event_notbusy a.cal_event_title:hover { color: #111111; font-weight: normal !important; }
|
||||
.cal_event_busy { }
|
||||
.cal_peruserviewname { max-width: 140px; height: 30px !important; }
|
||||
.cal_event span.badge.badge-status { border: 1px solid #aaa; }
|
||||
|
||||
@ -956,7 +956,7 @@ if ($action == 'create' || $action == 'adduserldap')
|
||||
// Hierarchy
|
||||
print '<tr><td class="titlefieldcreate">'.$langs->trans("HierarchicalResponsible").'</td>';
|
||||
print '<td>';
|
||||
print $form->select_dolusers($object->fk_user, 'fk_user', 1, array($object->id), 0, '', 0, $conf->entity, 0, 0, '', 0, '', 'maxwidth300');
|
||||
print img_picto('', 'user').$form->select_dolusers($object->fk_user, 'fk_user', 1, array($object->id), 0, '', 0, $conf->entity, 0, 0, '', 0, '', 'maxwidth300');
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
@ -968,7 +968,7 @@ if ($action == 'create' || $action == 'adduserldap')
|
||||
print $form->textwithpicto($text, $langs->trans("ValidatorIsSupervisorByDefault"), 1, 'help');
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
print $form->select_dolusers($object->fk_user_expense_validator, 'fk_user_expense_validator', 1, array($object->id), 0, '', 0, $conf->entity, 0, 0, '', 0, '', 'maxwidth300');
|
||||
print img_picto('', 'user').$form->select_dolusers($object->fk_user_expense_validator, 'fk_user_expense_validator', 1, array($object->id), 0, '', 0, $conf->entity, 0, 0, '', 0, '', 'maxwidth300');
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
@ -981,7 +981,7 @@ if ($action == 'create' || $action == 'adduserldap')
|
||||
print $form->textwithpicto($text, $langs->trans("ValidatorIsSupervisorByDefault"), 1, 'help');
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
print $form->select_dolusers($object->fk_user_holiday_validator, 'fk_user_holiday_validator', 1, array($object->id), 0, '', 0, $conf->entity, 0, 0, '', 0, '', 'maxwidth300');
|
||||
print img_picto('', 'user').$form->select_dolusers($object->fk_user_holiday_validator, 'fk_user_holiday_validator', 1, array($object->id), 0, '', 0, $conf->entity, 0, 0, '', 0, '', 'maxwidth300');
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
@ -119,7 +119,7 @@ $arrayfields = array(
|
||||
'u.accountancy_code'=>array('label'=>"AccountancyCode", 'checked'=>0, 'position'=>30),
|
||||
'u.email'=>array('label'=>"EMail", 'checked'=>1, 'position'=>35),
|
||||
'u.api_key'=>array('label'=>"ApiKey", 'checked'=>0, 'position'=>40, "enabled"=>($conf->api->enabled && $user->admin)),
|
||||
'u.fk_soc'=>array('label'=>"Company", 'checked'=>1, 'position'=>45),
|
||||
'u.fk_soc'=>array('label'=>"Company", 'checked'=>($contextpage == 'employeelist' ? 0 : 1), 'position'=>45),
|
||||
'u.salary'=>array('label'=>"Salary", 'checked'=>1, 'position'=>80, 'enabled'=>($conf->salaries->enabled && !empty($user->rights->salaries->readall))),
|
||||
'u.datelastlogin'=>array('label'=>"LastConnexion", 'checked'=>1, 'position'=>100),
|
||||
'u.datepreviouslogin'=>array('label'=>"PreviousConnexion", 'checked'=>0, 'position'=>110),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user