Merge branch 'develop' into master
This commit is contained in:
commit
bc581ead3b
Binary file not shown.
@ -272,12 +272,7 @@
|
||||
|
||||
<rule ref="PEAR.Commenting.FunctionComment.ReturnNotRequired" />
|
||||
|
||||
<rule ref="PEAR.Commenting.FunctionComment.WrongStyle">
|
||||
</rule>
|
||||
|
||||
|
||||
|
||||
|
||||
<rule ref="PEAR.Commenting.FunctionComment.WrongStyle" />
|
||||
|
||||
<rule ref="PEAR.Commenting.FunctionComment.SpacingBeforeParamType">
|
||||
<severity>0</severity>
|
||||
@ -310,20 +305,21 @@
|
||||
<!-- Test if () are removed for includes -->
|
||||
<rule ref="PEAR.Files.IncludingFile" />
|
||||
|
||||
<!-- Disable some error messages that we do not want. -->
|
||||
|
||||
<!-- We disable this: We must be able to make require inside if -->
|
||||
<rule ref="PEAR.Files.IncludingFile.UseInclude">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<!-- TODO Enable this test. We should use require for include in prior of include when out of if -->
|
||||
<!-- We disable this. We must be allowed to use strict require instead of non strict include anywhere -->
|
||||
<rule ref="PEAR.Files.IncludingFile.UseIncludeOnce">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<rule ref="PEAR.Files.IncludingFile.UseRequire">
|
||||
<severity>0</severity>
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<!-- TODO Enable this test. We should use require for include in prior of include when out of if -->
|
||||
|
||||
<!-- We disable this: We want to allow include_once -->
|
||||
<rule ref="PEAR.Files.IncludingFile.UseRequireOnce">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
@ -332,27 +328,25 @@
|
||||
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature" />
|
||||
|
||||
<!-- TODO Enable this test. -->
|
||||
<!-- We disable this: It returns a lot of false positive -->
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.CloseBracketLine">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<!-- TODO Enable this test. -->
|
||||
|
||||
<!-- We disable this: We want to allow small function on 1 line -->
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.EmptyLine">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.EmptyLine" />
|
||||
|
||||
<!-- We disable this: Too many false positive -->
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.Indent">
|
||||
<severity>0</severity>
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.SpaceBeforeOpenBracket">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.SpaceAfterCloseBracket">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.SpaceBeforeOpenBracket" />
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.SpaceAfterCloseBracket" />
|
||||
|
||||
<rule ref="PEAR.Functions.ValidDefaultValue" />
|
||||
|
||||
@ -361,26 +355,26 @@
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<!-- We disable this: there is a lot of existing method not starting with a capital letter (class modXxxx, ...) -->
|
||||
<rule ref="PEAR.NamingConventions.ValidClassName.StartWithCapital">
|
||||
<severity>0</severity>
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<!-- some phpcs have a typo error in rule, so we add it too -->
|
||||
<!-- some phpcs have a typo error in rule, so we add it this rule too with term "Captial" instead of "Capital" -->
|
||||
<rule ref="PEAR.NamingConventions.ValidClassName.StartWithCaptial">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<rule ref="PEAR.NamingConventions.ValidFunctionName" />
|
||||
<rule ref="PEAR.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore" />
|
||||
|
||||
<rule ref="PEAR.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<!-- We disable this: there is a lot of existing function not starting with a capital letter (class modXxxx, ...) -->
|
||||
<rule ref="PEAR.NamingConventions.ValidFunctionName.FunctionNameInvalid">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.NamingConventions.ValidFunctionName.FunctionNoCapital">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<!-- some phpcs have a typo error in rule, so we add it too -->
|
||||
<!-- some phpcs have a typo error in rule, so we add it this rule too with term "Captial" instead of "Capital" -->
|
||||
<rule ref="PEAR.NamingConventions.ValidFunctionName.FunctionNoCaptial">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
@ -391,16 +385,16 @@
|
||||
<!--<rule ref="PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps">
|
||||
<severity>0</severity>
|
||||
</rule>-->
|
||||
|
||||
<!-- We disable this: We don't want to have private methods prefixed with an underscore -->
|
||||
<rule ref="PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<rule ref="PEAR.NamingConventions.ValidVariableName" />
|
||||
|
||||
<rule ref="PSR2.Classes.ClassDeclaration" />
|
||||
<rule ref="PSR2.Methods.FunctionClosingBrace" />
|
||||
<rule ref="PSR2.ControlStructures.ElseIfDeclaration.NotAllowed" />
|
||||
|
||||
<!-- This is not in PSR2 -->
|
||||
<!-- We disable this: We don't want to have private methods prefixed with an underscore -->
|
||||
<rule ref="PEAR.NamingConventions.ValidVariableName.PrivateNoUnderscore">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
@ -411,7 +405,6 @@
|
||||
<rule ref="PEAR.WhiteSpace.ScopeClosingBrace">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<rule ref="PEAR.WhiteSpace.ScopeClosingBrace.Line">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
@ -421,15 +414,17 @@
|
||||
<!-- <rule ref="PEAR.WhiteSpace.ScopeIndent" /> -->
|
||||
|
||||
|
||||
<!-- Rules from Zend Standard-->
|
||||
|
||||
<!-- The closing ?> tag MUST be omitted from files containing only PHP. -->
|
||||
<rule ref="Zend.Files.ClosingTag"/>
|
||||
|
||||
<!-- Rules PSR 2 -->
|
||||
<rule ref="PSR2.Classes.ClassDeclaration" />
|
||||
<rule ref="PSR2.Methods.FunctionClosingBrace" />
|
||||
<rule ref="PSR2.ControlStructures.ElseIfDeclaration.NotAllowed" />
|
||||
<rule ref="PSR2.Classes.ClassDeclaration" />
|
||||
<rule ref="PSR2.Methods.FunctionClosingBrace" />
|
||||
<rule ref="PSR2.Files.EndFileNewline.TooMany" />
|
||||
<rule ref="PSR2.Files.EndFileNewline.NoneFound" />
|
||||
<rule ref="PSR2.Methods.FunctionCallSignature.SpaceBeforeOpenBracket" />
|
||||
<rule ref="PSR2.Classes.PropertyDeclaration.VarUsed" />
|
||||
<!-- The closing ?> tag MUST be omitted from files containing only PHP. -->
|
||||
<rule ref="PSR2.Files.ClosingTag"/>
|
||||
|
||||
</ruleset>
|
||||
|
||||
@ -161,7 +161,7 @@ if (empty($reshook))
|
||||
if ($action == 'disable') {
|
||||
if ($accounting->fetch($id)) {
|
||||
$mode = GETPOST('mode', 'int');
|
||||
$result = $accounting->account_desactivate($id, $mode);
|
||||
$result = $accounting->accountDeactivate($id, $mode);
|
||||
}
|
||||
|
||||
$action = 'update';
|
||||
|
||||
@ -1039,7 +1039,7 @@ while ($i < min($num, $limit))
|
||||
}
|
||||
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
|
||||
@ -57,6 +57,12 @@ $search_direction = GETPOST('search_direction', 'alpha');
|
||||
$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');
|
||||
|
||||
if (GETPOST("button_delmvt_x") || GETPOST("button_delmvt.x") || GETPOST("button_delmvt")) {
|
||||
$action = 'delbookkeepingyear';
|
||||
}
|
||||
|
||||
// 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);
|
||||
@ -70,6 +76,13 @@ $pagenext = $page + 1;
|
||||
if ($sortorder == "") $sortorder = "ASC";
|
||||
if ($sortfield == "") $sortfield = "t.doc_date,t.rowid";
|
||||
|
||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||
$object = new BookKeeping($db);
|
||||
$hookmanager->initHooks(array('bookkeepingbyaccountlist'));
|
||||
|
||||
$formaccounting = new FormAccounting($db);
|
||||
$form = new Form($db);
|
||||
|
||||
if (empty($search_date_start) && empty($search_date_end) && GETPOSTISSET('search_date_startday') && GETPOSTISSET('search_date_startmonth') && GETPOSTISSET('search_date_starthour')) {
|
||||
$sql = "SELECT date_start, date_end from ".MAIN_DB_PREFIX."accounting_fiscalyear ";
|
||||
$sql .= " where date_start < '".$db->idate(dol_now())."' and date_end > '".$db->idate(dol_now())."'";
|
||||
@ -96,89 +109,167 @@ if (empty($search_date_start) && empty($search_date_end) && GETPOSTISSET('search
|
||||
}
|
||||
}
|
||||
|
||||
$object = new BookKeeping($db);
|
||||
$arrayfields = array(
|
||||
// 't.subledger_account'=>array('label'=>$langs->trans("SubledgerAccount"), 'checked'=>1),
|
||||
't.code_journal'=>array('label'=>$langs->trans("Codejournal"), 'checked'=>1),
|
||||
't.piece_num'=>array('label'=>$langs->trans("TransactionNumShort"), 'checked'=>1),
|
||||
't.doc_date'=>array('label'=>$langs->trans("Docdate"), 'checked'=>1),
|
||||
't.doc_ref'=>array('label'=>$langs->trans("Piece"), 'checked'=>1),
|
||||
't.label_operation'=>array('label'=>$langs->trans("Label"), 'checked'=>1),
|
||||
't.debit'=>array('label'=>$langs->trans("Debit"), 'checked'=>1),
|
||||
't.credit'=>array('label'=>$langs->trans("Credit"), 'checked'=>1),
|
||||
't.lettering_code'=>array('label'=>$langs->trans("LetteringCode"), 'checked'=>1),
|
||||
);
|
||||
|
||||
if (empty($conf->global->ACCOUNTING_ENABLE_LETTERING)) unset($arrayfields['t.lettering_code']);
|
||||
|
||||
/*
|
||||
* Action
|
||||
*/
|
||||
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers
|
||||
if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; }
|
||||
if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; }
|
||||
|
||||
$parameters = array('socid'=>$socid);
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
||||
if (empty($reshook))
|
||||
{
|
||||
$search_doc_date = '';
|
||||
$search_accountancy_code = '';
|
||||
$search_accountancy_code_start = '';
|
||||
$search_accountancy_code_end = '';
|
||||
$search_label_account = '';
|
||||
$search_doc_ref = '';
|
||||
$search_label_operation = '';
|
||||
$search_direction = '';
|
||||
$search_ledger_code = '';
|
||||
$search_date_start = '';
|
||||
$search_date_end = '';
|
||||
$search_date_startyear = '';
|
||||
$search_date_startmonth = '';
|
||||
$search_date_startday = '';
|
||||
$search_date_endyear = '';
|
||||
$search_date_endmonth = '';
|
||||
$search_date_endday = '';
|
||||
$search_debit = '';
|
||||
$search_credit = '';
|
||||
include DOL_DOCUMENT_ROOT . '/core/actions_changeselectedfields.inc.php';
|
||||
|
||||
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers
|
||||
{
|
||||
$search_doc_date = '';
|
||||
$search_accountancy_code = '';
|
||||
$search_accountancy_code_start = '';
|
||||
$search_accountancy_code_end = '';
|
||||
$search_label_account = '';
|
||||
$search_doc_ref = '';
|
||||
$search_label_operation = '';
|
||||
$search_direction = '';
|
||||
$search_ledger_code = '';
|
||||
$search_date_start = '';
|
||||
$search_date_end = '';
|
||||
$search_date_startyear = '';
|
||||
$search_date_startmonth = '';
|
||||
$search_date_startday = '';
|
||||
$search_date_endyear = '';
|
||||
$search_date_endmonth = '';
|
||||
$search_date_endday = '';
|
||||
$search_debit = '';
|
||||
$search_credit = '';
|
||||
$search_lettering_code = '';
|
||||
$search_not_reconciled = '';
|
||||
}
|
||||
|
||||
// Must be after the remove filter action, before the export.
|
||||
$param = '';
|
||||
$filter = array();
|
||||
|
||||
if (!empty($search_date_start)) {
|
||||
$filter['t.doc_date>='] = $search_date_start;
|
||||
$param .= '&search_date_startmonth=' . GETPOST('search_date_startmonth', 'int') . '&search_date_startday=' . GETPOST('search_date_startday', 'int') . '&search_date_startyear=' . GETPOST('search_date_startyear', 'int');
|
||||
}
|
||||
if (!empty($search_date_end)) {
|
||||
$filter['t.doc_date<='] = $search_date_end;
|
||||
$param .= '&search_date_endmonth=' . GETPOST('search_date_endmonth', 'int') . '&search_date_endday=' . GETPOST('search_date_endday', 'int') . '&search_date_endyear=' . GETPOST('search_date_endyear', 'int');
|
||||
}
|
||||
if (!empty($search_doc_date)) {
|
||||
$filter['t.doc_date'] = $search_doc_date;
|
||||
$param .= '&doc_datemonth=' . GETPOST('doc_datemonth', 'int') . '&doc_dateday=' . GETPOST('doc_dateday', 'int') . '&doc_dateyear=' . GETPOST('doc_dateyear', 'int');
|
||||
}
|
||||
if (!empty($search_accountancy_code_start)) {
|
||||
$filter['t.numero_compte>='] = $search_accountancy_code_start;
|
||||
$param .= '&search_accountancy_code_start=' . urlencode($search_accountancy_code_start);
|
||||
}
|
||||
if (!empty($search_accountancy_code_end)) {
|
||||
$filter['t.numero_compte<='] = $search_accountancy_code_end;
|
||||
$param .= '&search_accountancy_code_end=' . urlencode($search_accountancy_code_end);
|
||||
}
|
||||
if (!empty($search_label_account)) {
|
||||
$filter['t.label_compte'] = $search_label_account;
|
||||
$param .= '&search_label_compte=' . urlencode($search_label_account);
|
||||
}
|
||||
if (!empty($search_doc_ref)) {
|
||||
$filter['t.doc_ref'] = $search_doc_ref;
|
||||
$param .= '&search_doc_ref=' . urlencode($search_doc_ref);
|
||||
}
|
||||
if (!empty($search_label_operation)) {
|
||||
$filter['t.label_operation'] = $search_label_operation;
|
||||
$param .= '&search_label_operation=' . urlencode($search_label_operation);
|
||||
}
|
||||
if (!empty($search_direction)) {
|
||||
$filter['t.sens'] = $search_direction;
|
||||
$param .= '&search_direction=' . urlencode($search_direction);
|
||||
}
|
||||
if (!empty($search_ledger_code)) {
|
||||
$filter['t.code_journal'] = $search_ledger_code;
|
||||
$param .= '&search_ledger_code=' . urlencode($search_ledger_code);
|
||||
}
|
||||
if (!empty($search_debit)) {
|
||||
$filter['t.debit'] = $search_debit;
|
||||
$param .= '&search_debit=' . urlencode($search_debit);
|
||||
}
|
||||
if (!empty($search_credit)) {
|
||||
$filter['t.credit'] = $search_credit;
|
||||
$param .= '&search_credit=' . urlencode($search_credit);
|
||||
}
|
||||
if (!empty($search_lettering_code)) {
|
||||
$filter['t.lettering_code'] = $search_lettering_code;
|
||||
$param .= '&search_lettering_code='.urlencode($search_lettering_code);
|
||||
}
|
||||
if (!empty($search_not_reconciled)) {
|
||||
$filter['t.reconciled_option'] = $search_not_reconciled;
|
||||
$param .= '&search_not_reconciled='.urlencode($search_not_reconciled);
|
||||
}
|
||||
}
|
||||
|
||||
// Must be after the remove filter action, before the export.
|
||||
$param = '';
|
||||
$filter = array();
|
||||
if ($action == 'delbookkeeping' && $user->rights->accounting->mouvements->supprimer) {
|
||||
$import_key = GETPOST('importkey', 'alpha');
|
||||
|
||||
if (!empty($search_date_start)) {
|
||||
$filter['t.doc_date>='] = $search_date_start;
|
||||
$param .= '&search_date_startmonth='.GETPOST('search_date_startmonth', 'int').'&search_date_startday='.GETPOST('search_date_startday', 'int').'&search_date_startyear='.GETPOST('search_date_startyear', 'int');
|
||||
}
|
||||
if (!empty($search_date_end)) {
|
||||
$filter['t.doc_date<='] = $search_date_end;
|
||||
$param .= '&search_date_endmonth='.GETPOST('search_date_endmonth', 'int').'&search_date_endday='.GETPOST('search_date_endday', 'int').'&search_date_endyear='.GETPOST('search_date_endyear', 'int');
|
||||
}
|
||||
if (!empty($search_doc_date)) {
|
||||
$filter['t.doc_date'] = $search_doc_date;
|
||||
$param .= '&doc_datemonth='.GETPOST('doc_datemonth', 'int').'&doc_dateday='.GETPOST('doc_dateday', 'int').'&doc_dateyear='.GETPOST('doc_dateyear', 'int');
|
||||
}
|
||||
if (!empty($search_accountancy_code_start)) {
|
||||
$filter['t.numero_compte>='] = $search_accountancy_code_start;
|
||||
$param .= '&search_accountancy_code_start='.urlencode($search_accountancy_code_start);
|
||||
}
|
||||
if (!empty($search_accountancy_code_end)) {
|
||||
$filter['t.numero_compte<='] = $search_accountancy_code_end;
|
||||
$param .= '&search_accountancy_code_end='.urlencode($search_accountancy_code_end);
|
||||
}
|
||||
if (!empty($search_label_account)) {
|
||||
$filter['t.label_compte'] = $search_label_account;
|
||||
$param .= '&search_label_compte='.urlencode($search_label_account);
|
||||
}
|
||||
if (!empty($search_doc_ref)) {
|
||||
$filter['t.doc_ref'] = $search_doc_ref;
|
||||
$param .= '&search_doc_ref='.urlencode($search_doc_ref);
|
||||
}
|
||||
if (!empty($search_label_operation)) {
|
||||
$filter['t.label_operation'] = $search_label_operation;
|
||||
$param .= '&search_label_operation='.urlencode($search_label_operation);
|
||||
}
|
||||
if (!empty($search_direction)) {
|
||||
$filter['t.sens'] = $search_direction;
|
||||
$param .= '&search_direction='.urlencode($search_direction);
|
||||
}
|
||||
if (!empty($search_ledger_code)) {
|
||||
$filter['t.code_journal'] = $search_ledger_code;
|
||||
$param .= '&search_ledger_code='.urlencode($search_ledger_code);
|
||||
}
|
||||
if (!empty($search_debit)) {
|
||||
$filter['t.debit'] = $search_debit;
|
||||
$param .= '&search_debit='.urlencode($search_debit);
|
||||
}
|
||||
if (!empty($search_credit)) {
|
||||
$filter['t.credit'] = $search_credit;
|
||||
$param .= '&search_credit='.urlencode($search_credit);
|
||||
}
|
||||
if (!empty($import_key)) {
|
||||
$result = $object->deleteByImportkey($import_key);
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
|
||||
// Make a redirect to avoid to launch the delete later after a back button
|
||||
header("Location: listbyaccount.php".($param ? '?'.$param : ''));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
if ($action == 'delbookkeepingyearconfirm' && $user->rights->accounting->mouvements->supprimer_tous) {
|
||||
$delmonth = GETPOST('delmonth', 'int');
|
||||
$delyear = GETPOST('delyear', 'int');
|
||||
if ($delyear == -1) {
|
||||
$delyear = 0;
|
||||
}
|
||||
$deljournal = GETPOST('deljournal', 'alpha');
|
||||
if ($deljournal == -1) {
|
||||
$deljournal = 0;
|
||||
}
|
||||
|
||||
if ($action == 'delmouvconfirm') {
|
||||
if (!empty($delmonth) || !empty($delyear) || !empty($deljournal))
|
||||
{
|
||||
$result = $object->deleteByYearAndJournal($delyear, $deljournal, '', ($delmonth > 0 ? $delmonth : 0));
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessages("RecordDeleted", null, 'mesgs');
|
||||
}
|
||||
|
||||
// Make a redirect to avoid to launch the delete later after a back button
|
||||
header("Location: listbyaccount.php".($param ? '?'.$param : ''));
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessages("NoRecordDeleted", null, 'warnings');
|
||||
}
|
||||
}
|
||||
if ($action == 'delmouvconfirm' && $user->rights->accounting->mouvements->supprimer) {
|
||||
$mvt_num = GETPOST('mvt_num', 'int');
|
||||
|
||||
if (!empty($mvt_num)) {
|
||||
@ -186,8 +277,13 @@ if ($action == 'delmouvconfirm') {
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
Header("Location: listbyaccount.php");
|
||||
exit();
|
||||
else
|
||||
{
|
||||
setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs');
|
||||
}
|
||||
|
||||
header("Location: listbyaccount.php?noreset=1".($param ? '&'.$param : ''));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
@ -229,22 +325,42 @@ if ($action == 'delmouv') {
|
||||
}
|
||||
if ($action == 'delbookkeepingyear') {
|
||||
$form_question = array();
|
||||
$delyear = GETPOST('delyear');
|
||||
$delyear = GETPOST('delyear', 'int');
|
||||
$deljournal = GETPOST('deljournal', 'alpha');
|
||||
|
||||
if (empty($delyear)) {
|
||||
$delyear = dol_print_date(dol_now(), '%Y');
|
||||
}
|
||||
$month_array = array();
|
||||
for ($i = 1; $i <= 12; $i++) {
|
||||
$month_array[$i] = $langs->trans("Month".sprintf("%02d", $i));
|
||||
}
|
||||
$year_array = $formaccounting->selectyear_accountancy_bookkepping($delyear, 'delyear', 0, 'array');
|
||||
$journal_array = $formaccounting->select_journal($deljournal, 'deljournal', '', 1, 1, 1, '', 0, 1);
|
||||
|
||||
$form_question['delmonth'] = array(
|
||||
'name' => 'delmonth',
|
||||
'type' => 'select',
|
||||
'label' => $langs->trans('DelMonth'),
|
||||
'values' => $month_array,
|
||||
'default' => ''
|
||||
);
|
||||
$form_question['delyear'] = array(
|
||||
'name' => 'delyear',
|
||||
'type' => 'select',
|
||||
'label' => $langs->trans('DelYear'),
|
||||
'values' => $year_array,
|
||||
'default' => $delyear
|
||||
'name' => 'delyear',
|
||||
'type' => 'select',
|
||||
'label' => $langs->trans('DelYear'),
|
||||
'values' => $year_array,
|
||||
'default' => $delyear
|
||||
);
|
||||
$form_question['deljournal'] = array(
|
||||
'name' => 'deljournal',
|
||||
'type' => 'other', // We don't use select here, the journal_array is already a select html component
|
||||
'label' => $langs->trans('DelJournal'),
|
||||
'value' => $journal_array,
|
||||
'default' => $deljournal
|
||||
);
|
||||
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delbookkeepingyearconfirm', $form_question, 0, 1, 250);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?'.$param, $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delbookkeepingyearconfirm', $form_question, '', 1, 300);
|
||||
print $formconfirm;
|
||||
}
|
||||
|
||||
@ -267,53 +383,115 @@ if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($l
|
||||
|
||||
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $result, $nbtotalofrecords, 'title_accountancy', 0, $viewflat.$newcardbutton, '', $limit);
|
||||
|
||||
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
||||
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
||||
if ($massactionbutton) $selectedfields .= $form->showCheckAddButtons('checkforselect', 1);
|
||||
|
||||
// Reverse sort order
|
||||
if (preg_match('/^asc/i', $sortorder)) $sortorder = "asc";
|
||||
else $sortorder = "desc";
|
||||
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="noborder centpercent">';
|
||||
$moreforfilter = '';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre">';
|
||||
print '<div class="nowrap">';
|
||||
print $langs->trans('From').' ';
|
||||
print $formaccounting->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array(), 1, 1, 'maxwidth200');
|
||||
// Accountancy account
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$moreforfilter .= $langs->trans('AccountAccounting').': ';
|
||||
$moreforfilter .= '<div class="nowrap">';
|
||||
$moreforfilter .= $langs->trans('From').' ';
|
||||
$moreforfilter .= $formaccounting->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array(), 1, 1, 'maxwidth200');
|
||||
$moreforfilter .= $langs->trans('to').' ';
|
||||
$moreforfilter .= $formaccounting->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array(), 1, 1, 'maxwidth200');
|
||||
$moreforfilter .= '</div>';
|
||||
$moreforfilter .= '</div>';
|
||||
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook)) $moreforfilter .= $hookmanager->resPrint;
|
||||
else $moreforfilter = $hookmanager->resPrint;
|
||||
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print $moreforfilter;
|
||||
print '</div>';
|
||||
print '<div class="nowrap">';
|
||||
print $langs->trans('to').' ';
|
||||
print $formaccounting->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array(), 1, 1, 'maxwidth200');
|
||||
print '</div>';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste centpercent">';
|
||||
|
||||
// Filters lines
|
||||
print '<tr class="liste_titre_filter">';
|
||||
|
||||
// Code journal
|
||||
if (!empty($arrayfields['t.code_journal']['checked'])) {
|
||||
print '<td class="liste_titre center"><input type="text" name="search_ledger_code" size="3" value="' . dol_escape_htmltag($search_ledger_code) . '"></td>';
|
||||
}
|
||||
// Date document
|
||||
if (!empty($arrayfields['t.doc_date']['checked'])) {
|
||||
print '<td class="liste_titre center">';
|
||||
print '<div class="nowrap">';
|
||||
print $langs->trans('From') . ': ';
|
||||
print $form->selectDate($search_date_start, 'search_date_start', 0, 0, 1);
|
||||
print '</div>';
|
||||
print '<div class="nowrap">';
|
||||
print $langs->trans('to') . ': ';
|
||||
print $form->selectDate($search_date_end, 'search_date_end', 0, 0, 1);
|
||||
print '</div>';
|
||||
print '</td>';
|
||||
}
|
||||
// Movement number
|
||||
if (!empty($arrayfields['t.piece_num']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre"><input type="text" name="search_mvt_num" size="6" value="'.dol_escape_htmltag($search_mvt_num).'"></td>';
|
||||
}
|
||||
// Ref document
|
||||
if (!empty($arrayfields['t.doc_ref']['checked'])) {
|
||||
print '<td class="liste_titre"><input type="text" size="7" class="flat" name="search_doc_ref" value="' . dol_escape_htmltag($search_doc_ref) . '"/></td>';
|
||||
}
|
||||
// Label operation
|
||||
if (!empty($arrayfields['t.label_operation']['checked'])) {
|
||||
print '<td class="liste_titre"><input type="text" size="7" class="flat" name="search_label_operation" value="' . dol_escape_htmltag($search_label_operation) . '"/></td>';
|
||||
}
|
||||
// Debit
|
||||
if (!empty($arrayfields['t.debit']['checked'])) {
|
||||
print '<td class="liste_titre right"><input type="text" class="flat" name="search_debit" size="4" value="' . dol_escape_htmltag($search_debit) . '"></td>';
|
||||
}
|
||||
// Credit
|
||||
if (!empty($arrayfields['t.credit']['checked'])) {
|
||||
print '<td class="liste_titre right"><input type="text" class="flat" name="search_credit" size="4" value="' . dol_escape_htmltag($search_credit) . '"></td>';
|
||||
}
|
||||
// Lettering code
|
||||
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 '</td>';
|
||||
}
|
||||
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
// Action column
|
||||
print '<td class="liste_titre center">';
|
||||
print $langs->trans('From').': ';
|
||||
print $form->selectDate($search_date_start, 'search_date_start', 0, 0, 1);
|
||||
print '<br>';
|
||||
print $langs->trans('to').': ';
|
||||
print $form->selectDate($search_date_end, 'search_date_end', 0, 0, 1);
|
||||
print '</td>';
|
||||
print '<td class="liste_titre"><input type="text" size="7" class="flat" name="search_doc_ref" value="'.dol_escape_htmltag($search_doc_ref).'"/></td>';
|
||||
print '<td class="liste_titre"><input type="text" size="7" class="flat" name="search_label_operation" value="'.dol_escape_htmltag($search_label_operation).'"/></td>';
|
||||
print '<td class="liste_titre right"><input type="text" class="flat" name="search_debit" size="4" value="'.dol_escape_htmltag($search_debit).'"></td>';
|
||||
print '<td class="liste_titre right"><input type="text" class="flat" name="search_credit" size="4" value="'.dol_escape_htmltag($search_credit).'"></td>';
|
||||
print '<td class="liste_titre center"><input type="text" name="search_ledger_code" size="3" value="'.dol_escape_htmltag($search_ledger_code).'"></td>';
|
||||
print '<td class="liste_titre right" colspan="2">';
|
||||
$searchpicto = $form->showFilterAndCheckAddButtons(0);
|
||||
$searchpicto = $form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre("AccountAccountingShort", $_SERVER['PHP_SELF']);
|
||||
print_liste_field_titre("TransactionNumShort", $_SERVER['PHP_SELF'], "t.piece_num", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("Docdate", $_SERVER['PHP_SELF'], "t.doc_date", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre("Piece", $_SERVER['PHP_SELF'], "t.doc_ref", "", $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Label");
|
||||
print_liste_field_titre("Debit", $_SERVER['PHP_SELF'], "t.debit", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("Credit", $_SERVER['PHP_SELF'], "t.credit", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("Codejournal", $_SERVER['PHP_SELF'], "t.code_journal", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $param, "", 'width="60"', $sortfield, $sortorder, 'center ');
|
||||
if (!empty($arrayfields['t.code_journal']['checked'])) print_liste_field_titre($arrayfields['t.code_journal']['label'], $_SERVER['PHP_SELF'], "t.code_journal", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (!empty($arrayfields['t.doc_date']['checked'])) print_liste_field_titre($arrayfields['t.doc_date']['label'], $_SERVER['PHP_SELF'], "t.doc_date", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (!empty($arrayfields['t.piece_num']['checked'])) print_liste_field_titre($arrayfields['t.piece_num']['label'], $_SERVER['PHP_SELF'], "t.piece_num", "", $param, '', $sortfield, $sortorder);
|
||||
if (!empty($arrayfields['t.doc_ref']['checked'])) print_liste_field_titre($arrayfields['t.doc_ref']['label'], $_SERVER['PHP_SELF'], "t.doc_ref", "", $param, "", $sortfield, $sortorder);
|
||||
if (!empty($arrayfields['t.label_operation']['checked'])) print_liste_field_titre($arrayfields['t.label_operation']['label'], $_SERVER['PHP_SELF'], "t.label_operation", "", $param, "", $sortfield, $sortorder);
|
||||
if (!empty($arrayfields['t.debit']['checked'])) print_liste_field_titre($arrayfields['t.debit']['label'], $_SERVER['PHP_SELF'], "t.debit", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
if (!empty($arrayfields['t.credit']['checked'])) print_liste_field_titre($arrayfields['t.credit']['label'], $_SERVER['PHP_SELF'], "t.credit", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
if (!empty($arrayfields['t.lettering_code']['checked'])) print_liste_field_titre($arrayfields['t.lettering_code']['label'], $_SERVER['PHP_SELF'], "t.lettering_code", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
// Hook fields
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
@ -323,7 +501,10 @@ $sous_total_debit = 0;
|
||||
$sous_total_credit = 0;
|
||||
$displayed_account_number = null; // Start with undefined to be able to distinguish with empty
|
||||
|
||||
// Loop on record
|
||||
// --------------------------------------------------------------------
|
||||
$i = 0;
|
||||
$totalarray = array();
|
||||
while ($i < min($num, $limit))
|
||||
{
|
||||
$line = $object->lines[$i];
|
||||
@ -336,18 +517,41 @@ while ($i < min($num, $limit))
|
||||
|
||||
// Is it a break ?
|
||||
if ($accountg != $displayed_account_number || !isset($displayed_account_number)) {
|
||||
// Affiche un Sous-Total par compte comptable
|
||||
$colspan = $totalarray['nbfield'] - 3;
|
||||
$colspanend = $totalarray['nbfield'] - 7;
|
||||
// Show a subtotal by accounting account
|
||||
if (isset($displayed_account_number)) {
|
||||
print '<tr class="liste_total"><td class="right" colspan="5">'.$langs->trans("SubTotal").':</td><td class="nowrap right">'.price($sous_total_debit).'</td><td class="nowrap right">'.price($sous_total_credit).'</td>';
|
||||
print "<td> </td>\n";
|
||||
print "<td> </td>\n";
|
||||
print '<tr class="liste_total">';
|
||||
print '<td class="right" colspan="'.$colspan.'">'.$langs->trans("TotalForAccount").' '.length_accountg($displayed_account_number).':</td>';
|
||||
print '<td class="nowrap right">'.price($sous_total_debit).'</td>';
|
||||
print '<td class="nowrap right">'.price($sous_total_credit).'</td>';
|
||||
print '<td colspan="'.$colspanend.'"></td>';
|
||||
print '</tr>';
|
||||
// Show balance of last shown account
|
||||
$balance = $sous_total_debit - $sous_total_credit;
|
||||
print '<tr class="liste_total">';
|
||||
print '<td class="right" colspan="'.$colspan.'">'.$langs->trans("Balance").':</td>';
|
||||
if ($balance > 0 )
|
||||
{
|
||||
print '<td class="nowraponall right">';
|
||||
print price($sous_total_debit - $sous_total_credit);
|
||||
print '</td>';
|
||||
print '<td></td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td></td>';
|
||||
print '<td class="nowraponall right">';
|
||||
print price($sous_total_credit - $sous_total_debit);
|
||||
print '</td>';
|
||||
}
|
||||
print '<td colspan="'.$colspanend.'"></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// Show the break account
|
||||
$colspan = 9;
|
||||
print "<tr>";
|
||||
print '<td colspan="'.$colspan.'" style="font-weight:bold; border-bottom: 1pt solid black;">';
|
||||
print '<td colspan="'.$totalarray['nbfield'].'" style="font-weight:bold; border-bottom: 1pt solid black;">';
|
||||
if ($line->numero_compte != "" && $line->numero_compte != '-1') print length_accountg($line->numero_compte).' : '.$object->get_compte_desc($line->numero_compte);
|
||||
else print '<span class="error">'.$langs->trans("Unknown").'</span>';
|
||||
print '</td>';
|
||||
@ -357,72 +561,212 @@ while ($i < min($num, $limit))
|
||||
//if (empty($displayed_account_number)) $displayed_account_number='-';
|
||||
$sous_total_debit = 0;
|
||||
$sous_total_credit = 0;
|
||||
|
||||
$colspan = 0;
|
||||
}
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td> </td>';
|
||||
print '<td class="right"><a href="./card.php?piece_num='.$line->piece_num.'">'.$line->piece_num.'</a></td>';
|
||||
print '<td class="center">'.dol_print_date($line->doc_date, 'day').'</td>';
|
||||
|
||||
// TODO Add a link according to doc_type and fk_doc
|
||||
print '<td class="nowrap">';
|
||||
//if ($line->doc_type == 'supplier_invoice')
|
||||
//if ($line->doc_type == 'customer_invoice')
|
||||
print $line->doc_ref;
|
||||
// Journal code
|
||||
if (!empty($arrayfields['t.code_journal']['checked']))
|
||||
{
|
||||
$accountingjournal = new AccountingJournal($db);
|
||||
$result = $accountingjournal->fetch('', $line->code_journal);
|
||||
$journaltoshow = (($result > 0) ? $accountingjournal->getNomUrl(0, 0, 0, '', 0) : $line->code_journal);
|
||||
print '<td class="center">'.$journaltoshow.'</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Document date
|
||||
if (!empty($arrayfields['t.doc_date']['checked']))
|
||||
{
|
||||
print '<td class="center">'.dol_print_date($line->doc_date, 'day').'</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Piece number
|
||||
if (!empty($arrayfields['t.piece_num']['checked']))
|
||||
{
|
||||
print '<td>';
|
||||
$object->id = $line->id;
|
||||
$object->piece_num = $line->piece_num;
|
||||
print $object->getNomUrl(1, '', 0, '', 1);
|
||||
print '</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Document ref
|
||||
if (!empty($arrayfields['t.doc_ref']['checked']))
|
||||
{
|
||||
if ($line->doc_type == 'customer_invoice')
|
||||
{
|
||||
$langs->loadLangs(array('bills'));
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
$objectstatic = new Facture($db);
|
||||
$objectstatic->fetch($line->fk_doc);
|
||||
//$modulepart = 'facture';
|
||||
|
||||
$filename = dol_sanitizeFileName($line->doc_ref);
|
||||
$filedir = $conf->facture->dir_output.'/'.dol_sanitizeFileName($line->doc_ref);
|
||||
$urlsource = $_SERVER['PHP_SELF'].'?id='.$objectstatic->id;
|
||||
$documentlink = $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir);
|
||||
}
|
||||
elseif ($line->doc_type == 'supplier_invoice')
|
||||
{
|
||||
$langs->loadLangs(array('bills'));
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||
$objectstatic = new FactureFournisseur($db);
|
||||
$objectstatic->fetch($line->fk_doc);
|
||||
//$modulepart = 'invoice_supplier';
|
||||
|
||||
$filename = dol_sanitizeFileName($line->doc_ref);
|
||||
$filedir = $conf->fournisseur->facture->dir_output.'/'.get_exdir($line->fk_doc, 2, 0, 0, $objectstatic, $modulepart).dol_sanitizeFileName($line->doc_ref);
|
||||
$subdir = get_exdir($objectstatic->id, 2, 0, 0, $objectstatic, $modulepart).dol_sanitizeFileName($line->doc_ref);
|
||||
$documentlink = $formfile->getDocumentsLink($objectstatic->element, $subdir, $filedir);
|
||||
}
|
||||
elseif ($line->doc_type == 'expense_report')
|
||||
{
|
||||
$langs->loadLangs(array('trips'));
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
|
||||
$objectstatic = new ExpenseReport($db);
|
||||
$objectstatic->fetch($line->fk_doc);
|
||||
//$modulepart = 'expensereport';
|
||||
|
||||
$filename = dol_sanitizeFileName($line->doc_ref);
|
||||
$filedir = $conf->expensereport->dir_output.'/'.dol_sanitizeFileName($line->doc_ref);
|
||||
$urlsource = $_SERVER['PHP_SELF'].'?id='.$objectstatic->id;
|
||||
$documentlink = $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Other type
|
||||
}
|
||||
|
||||
print '<td class="nowrap">';
|
||||
|
||||
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
||||
// Picto + Ref
|
||||
print '<td class="nobordernopadding nowrap">';
|
||||
|
||||
if ($line->doc_type == 'customer_invoice' || $line->doc_type == 'supplier_invoice' || $line->doc_type == 'expense_report')
|
||||
{
|
||||
print $objectstatic->getNomUrl(1, '', 0, 0, '', 0, -1, 1);
|
||||
print $documentlink;
|
||||
} else {
|
||||
print $line->doc_ref;
|
||||
}
|
||||
print '</td></tr></table>';
|
||||
|
||||
print "</td>\n";
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Label operation
|
||||
if (!empty($arrayfields['t.label_operation']['checked'])) {
|
||||
// Affiche un lien vers la facture client/fournisseur
|
||||
$doc_ref = preg_replace('/\(.*\)/', '', $line->doc_ref);
|
||||
print strlen(length_accounta($line->subledger_account)) == 0 ? '<td>' . $line->label_operation . '</td>' : '<td>' . $line->label_operation . '<br><span style="font-size:0.8em">(' . length_accounta($line->subledger_account) . ')</span></td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Amount debit
|
||||
if (!empty($arrayfields['t.debit']['checked']))
|
||||
{
|
||||
print '<td class="nowrap right">'.($line->debit ? price($line->debit) : '').'</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'totaldebit';
|
||||
$totalarray['val']['totaldebit'] += $line->debit;
|
||||
}
|
||||
|
||||
// Amount credit
|
||||
if (!empty($arrayfields['t.credit']['checked'])) {
|
||||
print '<td class="nowrap right">' . ($line->credit ? price($line->credit) : '') . '</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'totalcredit';
|
||||
$totalarray['val']['totalcredit'] += $line->credit;
|
||||
}
|
||||
|
||||
// Lettering code
|
||||
if (!empty($arrayfields['t.lettering_code']['checked']))
|
||||
{
|
||||
print '<td class="center">'.$line->lettering_code.'</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
// Action column
|
||||
print '<td class="nowraponall center">';
|
||||
if (empty($line->date_export)) {
|
||||
if ($user->rights->accounting->mouvements->creer) {
|
||||
print '<a href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/card.php?piece_num='.$line->piece_num.$param.'&page='.$page.($sortfield ? '&sortfield='.$sortfield : '').($sortorder ? '&sortorder='.$sortorder : '').'">'.img_edit().'</a>';
|
||||
}
|
||||
if ($user->rights->accounting->mouvements->supprimer) {
|
||||
print ' <a href="'.$_SERVER['PHP_SELF'].'?action=delmouv&mvt_num='.$line->piece_num.$param.'&page='.$page.($sortfield ? '&sortfield='.$sortfield : '').($sortorder ? '&sortorder='.$sortorder : '').'">'.img_delete().'</a>';
|
||||
}
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
// Affiche un lien vers la facture client/fournisseur
|
||||
$doc_ref = preg_replace('/\(.*\)/', '', $line->doc_ref);
|
||||
print strlen(length_accounta($line->subledger_account)) == 0 ? '<td>'.$line->label_operation.'</td>' : '<td>'.$line->label_operation.'<br><span style="font-size:0.8em">('.length_accounta($line->subledger_account).')</span></td>';
|
||||
|
||||
|
||||
print '<td class="nowrap right">'.($line->debit ? price($line->debit) : '').'</td>';
|
||||
print '<td class="nowrap right">'.($line->credit ? price($line->credit) : '').'</td>';
|
||||
|
||||
$accountingjournal = new AccountingJournal($db);
|
||||
$result = $accountingjournal->fetch('', $line->code_journal);
|
||||
$journaltoshow = (($result > 0) ? $accountingjournal->getNomUrl(0, 0, 0, '', 0) : $line->code_journal);
|
||||
print '<td class="center">'.$journaltoshow.'</td>';
|
||||
|
||||
print '<td class="center">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/card.php?piece_num='.$line->piece_num.'">'.img_edit().'</a> ';
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=delmouv&mvt_num='.$line->piece_num.$param.'&page='.$page.'">'.img_delete().'</a>';
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
|
||||
// Comptabilise le sous-total
|
||||
$sous_total_debit += $line->debit;
|
||||
$sous_total_credit += $line->credit;
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
// Show sub-total of last shown account
|
||||
$colspan = $totalarray['nbfield'] - 3;
|
||||
$colspanend = $totalarray['nbfield'] - 8;
|
||||
print '<tr class="liste_total">';
|
||||
print '<td class="right" colspan="5">'.$langs->trans("SubTotal").':</td><td class="nowrap right">'.price($sous_total_debit).'</td><td class="nowrap right">'.price($sous_total_credit).'</td>';
|
||||
print '<td class="nowraponall center">';
|
||||
print price($sous_total_debit - $sous_total_credit);
|
||||
print '</td>';
|
||||
print '<td></td>';
|
||||
print '<td class="right" colspan="'.$colspan.'">'.$langs->trans("TotalForAccount").' '.$accountg.':</td>';
|
||||
print '<td class="nowrap right">'.price($sous_total_debit).'</td>';
|
||||
print '<td class="nowrap right">'.price($sous_total_credit).'</td>';
|
||||
print '<td colspan="'.$colspanend.'"></td>';
|
||||
print '</tr>';
|
||||
// Show balance of last shown account
|
||||
$balance = $sous_total_debit - $sous_total_credit;
|
||||
print '<tr class="liste_total">';
|
||||
print '<td class="right" colspan="'.$colspan.'">'.$langs->trans("Balance").':</td>';
|
||||
if ($balance > 0 )
|
||||
{
|
||||
print '<td class="nowraponall right">';
|
||||
print price($sous_total_debit - $sous_total_credit);
|
||||
print '</td>';
|
||||
print '<td></td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td></td>';
|
||||
print '<td class="nowraponall right">';
|
||||
print price($sous_total_credit - $sous_total_debit);
|
||||
print '</td>';
|
||||
}
|
||||
print '<td colspan="'.$colspanend.'"></td>';
|
||||
print '</tr>';
|
||||
|
||||
// Show total line
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
|
||||
|
||||
// Show total
|
||||
print '<tr class="liste_total">';
|
||||
print '<td class="right" colspan="5">'.$langs->trans("Total").':</td>';
|
||||
print '<td class="nowraponall right">';
|
||||
print price($total_debit);
|
||||
print '</td>';
|
||||
print '<td class="nowraponall right">';
|
||||
print price($total_credit);
|
||||
print '</td>';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '</tr>';
|
||||
|
||||
print "</table>";
|
||||
print '</div>';
|
||||
|
||||
// TODO Replace this with mass delete action
|
||||
if ($user->rights->accounting->mouvements->supprimer_tous) {
|
||||
print '<div class="tabsAction tabsActionNoBottom">'."\n";
|
||||
print '<a class="butActionDelete" name="button_delmvt" href="'.$_SERVER["PHP_SELF"].'?action=delbookkeepingyear'.($param ? '&'.$param : '').'">'.$langs->trans("DeleteMvt").'</a>';
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print '</form>';
|
||||
|
||||
// End of page
|
||||
|
||||
@ -5,11 +5,12 @@
|
||||
* Copyright (C) 2015 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2016 Pierre-Henry Favre <phf@atm-consulting.fr>
|
||||
* Copyright (C) 2016-2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2016-2020 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2013-2017 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2017 Elarifr. Ari Elbaz <github@accedinfo.com>
|
||||
* Copyright (C) 2017-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2017 André Schild <a.schild@aarboard.ch>
|
||||
* Copyright (C) 2020 Guillaume Alexandre <guillaume@tag-info.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -52,6 +53,7 @@ class AccountancyExport
|
||||
public static $EXPORT_TYPE_SAGE50_SWISS = 45;
|
||||
public static $EXPORT_TYPE_CHARLEMAGNE = 50;
|
||||
public static $EXPORT_TYPE_QUADRATUS = 60;
|
||||
public static $EXPORT_TYPE_WINFIC = 70;
|
||||
public static $EXPORT_TYPE_OPENCONCERTO = 100;
|
||||
public static $EXPORT_TYPE_LDCOMPTA = 110;
|
||||
public static $EXPORT_TYPE_LDCOMPTA10 = 120;
|
||||
@ -105,6 +107,7 @@ class AccountancyExport
|
||||
self::$EXPORT_TYPE_BOB50 => $langs->trans('Modelcsv_bob50'),
|
||||
self::$EXPORT_TYPE_CIEL => $langs->trans('Modelcsv_ciel'),
|
||||
self::$EXPORT_TYPE_QUADRATUS => $langs->trans('Modelcsv_quadratus'),
|
||||
self::$EXPORT_TYPE_WINFIC => $langs->trans('Modelcsv_winfic'),
|
||||
self::$EXPORT_TYPE_EBP => $langs->trans('Modelcsv_ebp'),
|
||||
self::$EXPORT_TYPE_COGILOG => $langs->trans('Modelcsv_cogilog'),
|
||||
self::$EXPORT_TYPE_AGIRIS => $langs->trans('Modelcsv_agiris'),
|
||||
@ -136,6 +139,7 @@ class AccountancyExport
|
||||
self::$EXPORT_TYPE_BOB50 => 'bob50',
|
||||
self::$EXPORT_TYPE_CIEL => 'ciel',
|
||||
self::$EXPORT_TYPE_QUADRATUS => 'quadratus',
|
||||
self::$EXPORT_TYPE_WINFIC => 'winfic',
|
||||
self::$EXPORT_TYPE_EBP => 'ebp',
|
||||
self::$EXPORT_TYPE_COGILOG => 'cogilog',
|
||||
self::$EXPORT_TYPE_AGIRIS => 'agiris',
|
||||
@ -184,6 +188,10 @@ class AccountancyExport
|
||||
'label' => $langs->trans('Modelcsv_quadratus'),
|
||||
'ACCOUNTING_EXPORT_FORMAT' => 'txt',
|
||||
),
|
||||
self::$EXPORT_TYPE_WINFIC => array(
|
||||
'label' => $langs->trans('Modelcsv_winfic'),
|
||||
'ACCOUNTING_EXPORT_FORMAT' => 'txt',
|
||||
),
|
||||
self::$EXPORT_TYPE_EBP => array(
|
||||
'label' => $langs->trans('Modelcsv_ebp'),
|
||||
),
|
||||
@ -246,7 +254,7 @@ class AccountancyExport
|
||||
$filename = 'general_ledger-'.$this->getFormatCode($formatexportset);
|
||||
$type_export = 'general_ledger';
|
||||
|
||||
global $db; // The tpl file use $db
|
||||
global $db; // The tpl file use $db
|
||||
include DOL_DOCUMENT_ROOT.'/accountancy/tpl/export_journal.tpl.php';
|
||||
|
||||
|
||||
@ -269,6 +277,9 @@ class AccountancyExport
|
||||
case self::$EXPORT_TYPE_QUADRATUS :
|
||||
$this->exportQuadratus($TData);
|
||||
break;
|
||||
case self::$EXPORT_TYPE_WINFIC :
|
||||
$this->exportWinfic($TData);
|
||||
break;
|
||||
case self::$EXPORT_TYPE_EBP :
|
||||
$this->exportEbp($TData);
|
||||
break;
|
||||
@ -548,6 +559,85 @@ class AccountancyExport
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Export format : WinFic - eWinfic - WinSis Compta
|
||||
*
|
||||
*
|
||||
* @param array $TData data
|
||||
* @return void
|
||||
*/
|
||||
public function exportWinfic(&$TData)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$end_line = "\r\n";
|
||||
|
||||
//We should use dol_now function not time however this is wrong date to transfert in accounting
|
||||
//$date_ecriture = dol_print_date(dol_now(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be ddmmyy
|
||||
//$date_ecriture = dol_print_date(time(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be ddmmyy
|
||||
foreach ($TData as $data) {
|
||||
$code_compta = $data->numero_compte;
|
||||
if (!empty($data->subledger_account))
|
||||
$code_compta = $data->subledger_account;
|
||||
|
||||
$Tab = array();
|
||||
//$Tab['type_ligne'] = 'M';
|
||||
$Tab['code_journal'] = str_pad(self::trunc($data->code_journal, 2), 2);
|
||||
|
||||
//We use invoice date $data->doc_date not $date_ecriture which is the transfert date
|
||||
//maybe we should set an option for customer who prefer to keep in accounting software the tranfert date instead of invoice date ?
|
||||
//$Tab['date_ecriture'] = $date_ecriture;
|
||||
$Tab['date_operation'] = dol_print_date($data->doc_date, '%d%m%Y');
|
||||
|
||||
$Tab['folio'] = ' 1';
|
||||
|
||||
$Tab['num_ecriture'] = str_pad(self::trunc($data->piece_num, 6), 6, ' ', STR_PAD_LEFT);
|
||||
|
||||
$Tab['jour_ecriture'] = dol_print_date($data->doc_date, '%d%m%y');
|
||||
|
||||
$Tab['num_compte'] = str_pad(self::trunc($code_compta, 6), 6, '0');
|
||||
|
||||
if($data->sens == 'D'){
|
||||
$Tab['montant_debit'] = str_pad(number_format(abs($data->montant), 2, ',', ''), 13, ' ', STR_PAD_LEFT);
|
||||
|
||||
$Tab['montant_crebit'] = str_pad(number_format(0, 2, ',', ''), 13, ' ', STR_PAD_LEFT);
|
||||
}
|
||||
else{
|
||||
$Tab['montant_debit'] = str_pad(number_format(0, 2, ',', ''), 13, ' ', STR_PAD_LEFT);
|
||||
|
||||
$Tab['montant_crebit'] = str_pad(number_format(abs($data->montant), 2, ',', ''), 13, ' ', STR_PAD_LEFT);
|
||||
}
|
||||
|
||||
$Tab['libelle_ecriture'] = str_pad(self::trunc(dol_string_unaccent($data->doc_ref).' '.dol_string_unaccent($data->label_operation), 30), 30);
|
||||
|
||||
$Tab['lettrage'] = str_repeat(' ', 2);
|
||||
|
||||
$Tab['code_piece'] = str_repeat(' ', 5);
|
||||
|
||||
$Tab['code_stat'] = str_repeat(' ', 4);
|
||||
|
||||
if (!empty($data->date_echeance))
|
||||
//$Tab['date_echeance'] = dol_print_date($data->date_echeance, $conf->global->ACCOUNTING_EXPORT_DATE);
|
||||
$Tab['date_echeance'] = dol_print_date($data->date_echeance, '%d%m%Y');
|
||||
else
|
||||
$Tab['date_echeance'] = dol_print_date($data->doc_date, '%d%m%Y');
|
||||
|
||||
$Tab['monnaie'] = '1';
|
||||
|
||||
$Tab['filler'] = ' ';
|
||||
|
||||
$Tab['ind_compteur'] = ' ';
|
||||
|
||||
$Tab['quantite'] = '0,000000000';
|
||||
|
||||
$Tab['code_pointage'] = str_repeat(' ', 2);
|
||||
|
||||
$Tab['end_line'] = $end_line;
|
||||
|
||||
print implode('|', $Tab);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Export format : EBP
|
||||
@ -930,7 +1020,7 @@ class AccountancyExport
|
||||
}
|
||||
|
||||
/**
|
||||
* Export format : LD Compta version 9 & higher
|
||||
* Export format : LD Compta version 9
|
||||
* http://www.ldsysteme.fr/fileadmin/telechargement/np/ldcompta/Documentation/IntCptW9.pdf
|
||||
*
|
||||
* @param array $objectLines data
|
||||
|
||||
@ -553,24 +553,19 @@ class AccountingAccount extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Account deactivated
|
||||
* Deactivate an account (for status active or status reconcilable)
|
||||
*
|
||||
* @param int $id Id
|
||||
* @param int $mode 0=field active, 1=field active_customer_list, 2=field_active_supplier_list
|
||||
* @param int $mode 0=field active, 1=field reconcilable
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function account_desactivate($id, $mode = 0)
|
||||
public function accountDeactivate($id, $mode = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
$result = $this->checkUsage();
|
||||
|
||||
if ($mode == 0)
|
||||
{
|
||||
$fieldtouse = 'active';
|
||||
}
|
||||
elseif ($mode == 1)
|
||||
$fieldtouse = 'active';
|
||||
if ($mode == 1)
|
||||
{
|
||||
$fieldtouse = 'reconcilable';
|
||||
}
|
||||
@ -582,7 +577,7 @@ class AccountingAccount extends CommonObject
|
||||
$sql .= "SET ".$fieldtouse." = '0'";
|
||||
$sql .= " WHERE rowid = ".$this->db->escape($id);
|
||||
|
||||
dol_syslog(get_class($this)."::account_desactivate ".$fieldtouse." sql=".$sql, LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."::accountDeactivate ".$fieldtouse." sql=".$sql, LOG_DEBUG);
|
||||
$result = $this->db->query($sql);
|
||||
|
||||
if ($result) {
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2020 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -22,7 +22,7 @@
|
||||
/**
|
||||
* \file htdocs/adherents/index.php
|
||||
* \ingroup member
|
||||
* \brief Page accueil module adherents
|
||||
* \brief Home page of membership module
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
@ -339,7 +339,7 @@ if ($resql)
|
||||
$staticmember->ref = $staticmember->getFullName($langs);
|
||||
$statictype->id = $obj->typeid;
|
||||
$statictype->label = $obj->label;
|
||||
print '<td>'.$staticmember->getNomUrl(1, 32).'</td>';
|
||||
print '<td class="nowraponall">'.$staticmember->getNomUrl(1, 32).'</td>';
|
||||
print '<td>'.$statictype->getNomUrl(1, 32).'</td>';
|
||||
print '<td>'.dol_print_date($db->jdate($obj->datem), 'dayhour').'</td>';
|
||||
print '<td class="right">'.$staticmember->LibStatut($obj->statut, ($obj->subscription == 'yes' ? 1 : 0), $db->jdate($obj->date_end_subscription), 3).'</td>';
|
||||
@ -399,12 +399,12 @@ if ($resql)
|
||||
$staticmember->name = $obj->company;
|
||||
}
|
||||
$staticmember->ref = $staticmember->getFullName($langs);
|
||||
print '<td>'.$subscriptionstatic->getNomUrl(1).'</td>';
|
||||
print '<td>'.$staticmember->getNomUrl(1, 32, 'subscription').'</td>';
|
||||
print '<td>'.get_date_range($db->jdate($obj->date_start), $db->jdate($obj->date_end)).'</td>';
|
||||
print '<td class="nowraponall">'.$subscriptionstatic->getNomUrl(1).'</td>';
|
||||
print '<td class="nowraponall">'.$staticmember->getNomUrl(1, 32, 'subscription').'</td>';
|
||||
print '<td class="nowraponall">'.get_date_range($db->jdate($obj->date_start), $db->jdate($obj->date_end)).'</td>';
|
||||
print '<td class="right">'.price($obj->subscription).'</td>';
|
||||
//print '<td class="right">'.$staticmember->LibStatut($obj->statut,($obj->subscription=='yes'?1:0),$db->jdate($obj->date_end_subscription),5).'</td>';
|
||||
print '<td class="right">'.dol_print_date($db->jdate($obj->datem ? $obj->datem : $obj->datec), 'dayhour').'</td>';
|
||||
print '<td class="right nowraponall">'.dol_print_date($db->jdate($obj->datem ? $obj->datem : $obj->datec), 'dayhour').'</td>';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
}
|
||||
|
||||
@ -877,7 +877,7 @@ while ($i < min($num, $limit))
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Date creation
|
||||
|
||||
@ -521,7 +521,7 @@ while ($i < min($num, $limit))
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Date creation
|
||||
|
||||
@ -81,8 +81,10 @@ if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg))
|
||||
}
|
||||
if ($action == 'set')
|
||||
{
|
||||
$getDefaultFilter = GETPOST('AGENDA_DEFAULT_FILTER_TYPE');
|
||||
$defaultfilter = (is_array($getDefaultFilter)) ? implode(',', $getDefaultFilter) : $getDefaultFilter;
|
||||
dolibarr_set_const($db, 'AGENDA_USE_EVENT_TYPE_DEFAULT', GETPOST('AGENDA_USE_EVENT_TYPE_DEFAULT'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, 'AGENDA_DEFAULT_FILTER_TYPE', GETPOST('AGENDA_DEFAULT_FILTER_TYPE'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, 'AGENDA_DEFAULT_FILTER_TYPE', $defaultfilter, 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, 'AGENDA_DEFAULT_FILTER_STATUS', GETPOST('AGENDA_DEFAULT_FILTER_STATUS'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, 'AGENDA_DEFAULT_VIEW', GETPOST('AGENDA_DEFAULT_VIEW'), 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
@ -377,7 +379,12 @@ print '<tr class="oddeven">'."\n";
|
||||
print '<td>'.$langs->trans("AGENDA_DEFAULT_FILTER_TYPE").'</td>'."\n";
|
||||
print '<td class="center"> </td>'."\n";
|
||||
print '<td class="right nowrap">'."\n";
|
||||
$formactions->select_type_actions($conf->global->AGENDA_DEFAULT_FILTER_TYPE, "AGENDA_DEFAULT_FILTER_TYPE", '', (empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1), 1);
|
||||
$multiselect = 0;
|
||||
if (!empty($conf->global->MAIN_ENABLE_MULTISELECT_TYPE)) {
|
||||
// We use an option here because it adds bugs when used on agenda page "peruser" and "list"
|
||||
$multiselect = (!empty($conf->global->AGENDA_USE_EVENT_TYPE));
|
||||
}
|
||||
$formactions->select_type_actions($conf->global->AGENDA_DEFAULT_FILTER_TYPE, "AGENDA_DEFAULT_FILTER_TYPE", '', (empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1), 1, $multiselect);
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
// AGENDA_DEFAULT_FILTER_STATUS
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2017 Oscss-Shop <support@oscss-shop.fr>.
|
||||
* Copyright (C) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2020 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modifyion 2.0 (the "License");
|
||||
* it under the terms of the GNU General Public License as published bypliance with the License.
|
||||
@ -17,6 +18,9 @@
|
||||
*/
|
||||
|
||||
if (!defined('REQUIRE_JQUERY_BLOCKUI')) define('REQUIRE_JQUERY_BLOCKUI', 1);
|
||||
if (!defined('NOTOKENRENEWAL')) {
|
||||
define('NOTOKENRENEWAL', 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -248,11 +248,8 @@ class Dolistore
|
||||
// phpcs:enable
|
||||
global $langs, $conf;
|
||||
$html = "";
|
||||
$parity = "pair";
|
||||
$last_month = time() - (30 * 24 * 60 * 60);
|
||||
foreach ($this->products as $product) {
|
||||
$parity = ($parity == "impair") ? 'pair' : 'impair';
|
||||
|
||||
// check new product ?
|
||||
$newapp = '';
|
||||
if ($last_month < strtotime($product->date_add)) {
|
||||
@ -267,7 +264,7 @@ class Dolistore
|
||||
// add image or default ?
|
||||
if ($product->id_default_image != '') {
|
||||
$image_url = DOL_URL_ROOT.'/admin/dolistore/ajax/image.php?id_product='.$product->id.'&id_image='.$product->id_default_image;
|
||||
$images = '<a href="'.$image_url.'" class="fancybox" rel="gallery'.$product->id.'" title="'.$product->name->language[$this->lang - 1].', '.$langs->trans('Version').' '.$product->module_version.'">';
|
||||
$images = '<a href="'.$image_url.'" class="documentpreview" target="_blank" mime="image/png" title="'.$product->name->language[$this->lang - 1].', '.$langs->trans('Version').' '.$product->module_version.'">';
|
||||
$images .= '<img src="'.$image_url.'&quality=home_default" style="max-height:250px;max-width: 210px;" alt="" /></a>';
|
||||
} else {
|
||||
$images = '<img src="'.DOL_URL_ROOT.'/admin/dolistore/img/NoImageAvailable.png" />';
|
||||
@ -306,16 +303,16 @@ class Dolistore
|
||||
//.'<br><a class="inline-block valignmiddle" target="_blank" href="'.$this->shop_url.$product->id.'"><span class="details button">'.$langs->trans("SeeInMarkerPlace").'</span></a>
|
||||
|
||||
//output template
|
||||
$html .= '<tr class="app '.$parity.' '.$compatible.'">
|
||||
$html .= '<tr class="app oddeven '.$compatible.'">
|
||||
<td class="center" width="210"><div class="newAppParent">'.$newapp.$images.'</div></td>
|
||||
<td class="margeCote"><h2 class="appTitle">'.$product->name->language[$this->lang - 1]
|
||||
.'<br/><small>'.$version.'</small></h2>
|
||||
<small> '.dol_print_date(dol_stringtotime($product->date_upd), 'dayhour').' - '.$langs->trans('Ref').': '.$product->reference.' - '.$langs->trans('Id').': '.$product->id.'</small><br><br>'.$product->description_short->language[$this->lang - 1].'</td>
|
||||
<td style="display:none;" class="long_description">'.$product->description->language[$this->lang - 1].'</td>
|
||||
<td class="margeCote center">'.$price.'
|
||||
</td>
|
||||
<td class="margeCote">'.$download_link.'</td>
|
||||
</tr>';
|
||||
<small> '.dol_print_date(dol_stringtotime($product->date_upd), 'dayhour').' - '.$langs->trans('Ref').': '.$product->reference.' - '.$langs->trans('Id').': '.$product->id.'</small><br><br>'.$product->description_short->language[$this->lang - 1].'</td>';
|
||||
// do not load if display none
|
||||
//$html .= '<td style="display:none;" class="long_description">'.$product->description->language[$this->lang - 1].'</td>';
|
||||
$html .= '<td class="margeCote center">'.$price.'</td>';
|
||||
$html .= '<td class="margeCote">'.$download_link.'</td>';
|
||||
$html .= '</tr>';
|
||||
}
|
||||
return $html;
|
||||
}
|
||||
|
||||
@ -592,7 +592,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
print '<input type="text" name="operationparam">';
|
||||
$htmltext = $langs->transnoentitiesnoconv("OperationParamDesc");
|
||||
//var_dump($htmltext);
|
||||
print $form->textwithpicto('', $htmltext);
|
||||
print $form->textwithpicto('', $htmltext, 1, 'help', '', 0, 2, 'operationparamtt');
|
||||
print '</td>';
|
||||
print '<td></td>';
|
||||
print '<td class="right"><input type="submit" name="addoperation" id="addoperation" class="flat button" value="'.$langs->trans("Add").'"></td>';
|
||||
@ -643,7 +643,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
print '</td>';
|
||||
// Delete
|
||||
print '<td class="right nowraponall">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=editoperation&operationid='.$ruleaction['id'].'">'.img_edit().'</a>';
|
||||
print '<a class="editfielda marginrightonly" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=editoperation&operationid='.$ruleaction['id'].'">'.img_edit().'</a>';
|
||||
print ' <a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=deleteoperation&operationid='.$ruleaction['id'].'">'.img_delete().'</a>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -476,7 +476,7 @@ while ($i < min($num, $limit))
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Action column
|
||||
|
||||
@ -67,12 +67,12 @@ if (!empty($conf->global->MAIN_MOTD_SETUPPAGE))
|
||||
}
|
||||
}
|
||||
|
||||
print '<span class="opacitymedium">';
|
||||
print $langs->trans("SetupDescription1");
|
||||
print '<span class="opacitymedium hideonsmartphone">';
|
||||
print $langs->trans("SetupDescription1").' ';
|
||||
print $langs->trans("AreaForAdminOnly").' ';
|
||||
print $langs->trans("SetupDescription2", $langs->transnoentities("MenuCompanySetup"), $langs->transnoentities("Modules"));
|
||||
print '</span>';
|
||||
print "<br><br>";
|
||||
print '</span>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
|
||||
@ -143,7 +143,7 @@ $loadedExtensions = array_map('strtolower', get_loaded_extensions(false));
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td width="200">'.$langs->trans("Extension").'</td>';
|
||||
print '<td align="center">'.$langs->trans("EnabledInSetup").'</td>';
|
||||
//print '<td align="center">'.$langs->trans("EnabledInSetup").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Loaded").'</td>';
|
||||
print '<td align="center">'.$langs->trans("FunctionTest").'</td>';
|
||||
print '<td>'.$langs->trans("Result").'</td>';
|
||||
@ -154,7 +154,7 @@ $name = "GD";
|
||||
|
||||
print "<tr>";
|
||||
print "<td>".$name."</td>";
|
||||
print getTableColumn($name, $activatedExtensions);
|
||||
//print getTableColumn($name, $activatedExtensions);
|
||||
print getTableColumn($name, $loadedExtensions);
|
||||
print getTableColumnFunction($functions);
|
||||
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
|
||||
@ -165,7 +165,7 @@ $name = "Curl";
|
||||
|
||||
print "<tr>";
|
||||
print "<td>".$name."</td>";
|
||||
print getTableColumn($name, $activatedExtensions);
|
||||
//print getTableColumn($name, $activatedExtensions);
|
||||
print getTableColumn($name, $loadedExtensions);
|
||||
print getTableColumnFunction($functions);
|
||||
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
|
||||
@ -178,7 +178,7 @@ if (empty($_SERVER["SERVER_ADMIN"]) || $_SERVER["SERVER_ADMIN"] != 'doliwamp@loc
|
||||
|
||||
print "<tr>";
|
||||
print "<td>".$name."</td>";
|
||||
print getTableColumn($name, $activatedExtensions);
|
||||
//print getTableColumn($name, $activatedExtensions);
|
||||
print getTableColumn($name, $loadedExtensions);
|
||||
print getTableColumnFunction($functions);
|
||||
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
|
||||
@ -191,7 +191,7 @@ $name = "xDebug";
|
||||
|
||||
print "<tr>";
|
||||
print "<td>".$name."</td>";
|
||||
print getTableColumn($name, $activatedExtensions);
|
||||
//print getTableColumn($name, $activatedExtensions);
|
||||
print getTableColumn($name, $loadedExtensions);
|
||||
print getTableColumnFunction($functions);
|
||||
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
|
||||
@ -208,7 +208,6 @@ foreach ($phparray as $key => $value)
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder">';
|
||||
print '<tr class="liste_titre">';
|
||||
//print '<td width="220px">'.$langs->trans("Parameter").'</td>';
|
||||
print '<td width="220px">'.$key.'</td>';
|
||||
print '<td colspan="2">'.$langs->trans("Value").'</td>';
|
||||
print "</tr>\n";
|
||||
@ -408,7 +407,7 @@ function getResultColumn($name, array $activated, array $loaded, array $function
|
||||
global $langs;
|
||||
|
||||
$result = true;
|
||||
$result = $result && in_array(strtolower($name), $activated);
|
||||
//$result = $result && in_array(strtolower($name), $activated);
|
||||
$result = $result && in_array(strtolower($name), $loaded);
|
||||
|
||||
foreach ($functions as $function)
|
||||
|
||||
@ -177,6 +177,30 @@ else
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// user hide inactive
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("UserHideInactive").'</td>';
|
||||
print '<td align="center" width="20"> </td>';
|
||||
|
||||
print '<td align="center" width="100">';
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
print ajax_constantonoff('USER_HIDE_INACTIVE_IN_COMBOBOX');
|
||||
}
|
||||
else
|
||||
{
|
||||
if (empty($conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX))
|
||||
{
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_USER_HIDE_INACTIVE_IN_COMBOBOX">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_USER_HIDE_INACTIVE_IN_COMBOBOX">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
|
||||
}
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
@ -722,7 +722,7 @@ if ($resql)
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
|
||||
@ -742,7 +742,7 @@ if ($action == 'create')
|
||||
|
||||
|
||||
// Print mail form
|
||||
print load_fiche_titre($langs->trans("NewMailing"), $availablelink, 'generic');
|
||||
print load_fiche_titre($langs->trans("NewMailing"), $availablelink, 'object_email');
|
||||
|
||||
dol_fiche_head();
|
||||
|
||||
|
||||
@ -188,7 +188,7 @@ if ($resql)
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'object_email', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
||||
$moreforfilter = '';
|
||||
|
||||
|
||||
@ -1204,7 +1204,7 @@ if ($resql)
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Date creation
|
||||
|
||||
@ -1226,7 +1226,7 @@ if ($resql)
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Date creation
|
||||
|
||||
@ -1672,8 +1672,7 @@ class Account extends CommonObject
|
||||
//Replace the old AccountNumber key with the new BankAccountNumber key
|
||||
$fieldlists = explode(
|
||||
' ',
|
||||
preg_replace('/ ?[^Bank]AccountNumber ?/', 'BankAccountNumber',
|
||||
$conf->global->BANK_SHOW_ORDER_OPTION)
|
||||
preg_replace('/ ?[^Bank]AccountNumber ?/', 'BankAccountNumber', $conf->global->BANK_SHOW_ORDER_OPTION)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -564,7 +564,7 @@ foreach ($accounts as $key=>$type)
|
||||
}
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $objecttmp); // Note that $action and $objecttmpect may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Date creation
|
||||
|
||||
@ -495,7 +495,7 @@ while ($i < min($num, $limit))
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Action column
|
||||
|
||||
@ -1539,7 +1539,7 @@ if ($resql)
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Date creation
|
||||
|
||||
@ -32,6 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facturestats.class.php';
|
||||
if(!empty($conf->category->enabled)) require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
|
||||
$WIDTH = DolGraph::getDefaultGraphSizeForStats('width');
|
||||
$HEIGHT = DolGraph::getDefaultGraphSizeForStats('height');
|
||||
@ -49,6 +50,7 @@ $categ_id = GETPOST('categ_id', 'categ_id');
|
||||
|
||||
$userid = GETPOST('userid', 'int');
|
||||
$socid = GETPOST('socid', 'int');
|
||||
$custcats = GETPOST('custcats', 'array');
|
||||
// Security check
|
||||
if ($user->socid > 0)
|
||||
{
|
||||
@ -58,15 +60,15 @@ if ($user->socid > 0)
|
||||
|
||||
$nowyear = strftime("%Y", dol_now());
|
||||
$year = GETPOST('year') > 0 ?GETPOST('year') : $nowyear;
|
||||
//$startyear=$year-2;
|
||||
$startyear = $year - 1;
|
||||
if(!empty($conf->global->INVOICE_STATS_GRAPHS_SHOW_2_YEARS)) $startyear=$year-2;
|
||||
else $startyear=$year-1;
|
||||
$endyear = $year;
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
if(!empty($conf->category->enabled)) $langs->load('categories');
|
||||
$form = new Form($db);
|
||||
$formcompany = new FormCompany($db);
|
||||
$formother = new FormOther($db);
|
||||
@ -93,6 +95,10 @@ $stats = new FactureStats($db, $socid, $mode, ($userid > 0 ? $userid : 0), ($typ
|
||||
if ($mode == 'customer')
|
||||
{
|
||||
if ($object_status != '' && $object_status >= 0) $stats->where .= ' AND f.fk_statut IN ('.$db->escape($object_status).')';
|
||||
if (is_array($custcats) && !empty($custcats)) {
|
||||
$stats->from .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_societe as cat ON (f.fk_soc = cat.fk_soc)';
|
||||
$stats->where .= ' AND cat.fk_categorie IN ('.implode(',', $custcats).')';
|
||||
}
|
||||
}
|
||||
if ($mode == 'supplier')
|
||||
{
|
||||
@ -256,26 +262,33 @@ if ($mode == 'customer') $filter = 's.client in (1,2,3)';
|
||||
if ($mode == 'supplier') $filter = 's.fournisseur = 1';
|
||||
print $form->selectarray('socid', $companies, $socid, 1, 0, 0, 'style="width: 95%"', 0, 0, 0, '', '', 1);
|
||||
print '</td></tr>';
|
||||
|
||||
// ThirdParty Type
|
||||
print '<tr><td>'.$langs->trans("ThirdPartyType").'</td><td>';
|
||||
$sortparam_typent = (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT); // NONE means we keep sort of original array, so we sort on position. ASC, means next function will sort on label.
|
||||
print $form->selectarray("typent_id", $formcompany->typent_array(0), $typent_id, 0, 0, 0, '', 0, 0, 0, $sortparam_typent);
|
||||
if ($user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Category
|
||||
if ($mode == 'customer')
|
||||
{
|
||||
$cat_type = Categorie::TYPE_CUSTOMER;
|
||||
$cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Customer"));
|
||||
if (! empty($conf->category->enabled)) {
|
||||
if ($mode == 'customer')
|
||||
{
|
||||
$cat_type = Categorie::TYPE_CUSTOMER;
|
||||
$cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Customer"));
|
||||
}
|
||||
if ($mode == 'supplier')
|
||||
{
|
||||
$cat_type = Categorie::TYPE_SUPPLIER;
|
||||
$cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Supplier"));
|
||||
}
|
||||
print '<tr><td>'.$cat_label.'</td><td>';
|
||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_CUSTOMER, null, 'parent', null, null, 1);
|
||||
print $form->multiselectarray('custcats', $cate_arbo, GETPOST('custcats', 'array'), null, null, null, null, "90%");
|
||||
//print $formother->select_categories($cat_type, $categ_id, 'categ_id', true);
|
||||
print '</td></tr>';
|
||||
}
|
||||
if ($mode == 'supplier')
|
||||
{
|
||||
$cat_type = Categorie::TYPE_SUPPLIER;
|
||||
$cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Supplier"));
|
||||
}
|
||||
print '<tr><td>'.$cat_label.'</td><td>';
|
||||
print $formother->select_categories($cat_type, $categ_id, 'categ_id', true);
|
||||
print '</td></tr>';
|
||||
|
||||
// User
|
||||
print '<tr><td>'.$langs->trans("CreatedBy").'</td><td>';
|
||||
print $form->select_dolusers($userid, 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
|
||||
|
||||
@ -939,7 +939,7 @@ while ($i < min($num, $limit))
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Date creation
|
||||
|
||||
@ -1452,7 +1452,7 @@ else
|
||||
|
||||
print '<table class="border tableforfield" width="100%">';
|
||||
|
||||
// Ligne info remises tiers
|
||||
// Line info of thirdparty discounts
|
||||
print '<tr><td class="titlefield">'.$langs->trans('Discount').'</td><td colspan="3">';
|
||||
if ($object->thirdparty->remise_percent) print $langs->trans("CompanyHasRelativeDiscount", $object->thirdparty->remise_percent);
|
||||
else print $langs->trans("CompanyHasNoRelativeDiscount");
|
||||
@ -1502,8 +1502,6 @@ else
|
||||
}
|
||||
|
||||
|
||||
$colorb = '666666';
|
||||
|
||||
$arrayothercontracts = $object->getListOfContracts('others');
|
||||
|
||||
/*
|
||||
@ -1775,8 +1773,8 @@ else
|
||||
print '<input id="buying_price" type="text" size="5" name="buying_price" value="'.price($objp->pa_ht, 0, '', 0).'"></td>';
|
||||
}
|
||||
print '<td class="center">';
|
||||
print '<input type="submit" class="button" name="save" value="'.$langs->trans("Modify").'">';
|
||||
print '<br><input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '<input type="submit" class="button margintoponly marginbottomonly" name="save" value="'.$langs->trans("Modify").'">';
|
||||
print '<br><input type="submit" class="button margintoponly marginbottomonly" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
@ -179,7 +179,6 @@ if ($object->id)
|
||||
print '<div class="fichecenter">';
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
|
||||
print '<table class="border tableforfield centpercent">';
|
||||
print '<tr><td class="titlefield">'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.dol_print_size($totalsize, 1, 1).'</td></tr>';
|
||||
|
||||
@ -746,7 +746,7 @@ while ($i < min($num, $limit))
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Date creation
|
||||
|
||||
@ -697,7 +697,7 @@ while ($i < min($num, $limit))
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Date creation
|
||||
|
||||
@ -428,11 +428,11 @@ function treeOutputForAbsoluteDir($sqltree, $selecteddir, $fullpathselecteddir,
|
||||
print (isset($val['cachenbofdoc']) && $val['cachenbofdoc'] >= 0) ? $val['cachenbofdoc'] : ' ';
|
||||
print '</td>';
|
||||
print '<td class="left">';
|
||||
if ($nbofsubdir > 0 && $nboffilesinsubdir > 0) print '<font color="#AAAAAA">+'.$nboffilesinsubdir.'</font> ';
|
||||
if ($nbofsubdir > 0 && $nboffilesinsubdir > 0) print '<font class="opacitymedium">+'.$nboffilesinsubdir.'</font> ';
|
||||
print '</td>';
|
||||
|
||||
// Edit link
|
||||
print '<td class="right" width="18"><a href="';
|
||||
print '<td class="right" width="18"><a class="editfielda" href="';
|
||||
print DOL_URL_ROOT.'/ecm/dir_card.php?module='.urlencode($modulepart).'§ion='.$val['id'].'&relativedir='.urlencode($val['fullrelativename']);
|
||||
print '&backtopage='.urlencode($_SERVER["PHP_SELF"].'?file_manager=1&website='.$websitekey.'&pageid='.$pageid);
|
||||
print '">'.img_edit($langs->trans("Edit").' - '.$langs->trans("View"), 0, 'class="valignmiddle opacitymedium"').'</a></td>';
|
||||
|
||||
@ -99,7 +99,7 @@ if (!empty($conf->commande->enabled) && empty($conf->global->MAIN_SEARCHFORM_CUS
|
||||
}
|
||||
if (!empty($conf->expedition->enabled) && empty($conf->global->MAIN_SEARCHFORM_CUSTOMER_SHIPMENT_DISABLED) && $user->rights->expedition->lire)
|
||||
{
|
||||
$arrayresult['searchintoshipment'] = array('position'=>80, 'img'=>'object_sending', 'label'=>$langs->trans("SearchIntoCustomerShipments", $search_boxvalue), 'text'=>img_picto('', 'object_sending').' '.$langs->trans("SearchIntoCustomerShipments", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/expedition/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : ''));
|
||||
$arrayresult['searchintoshipment'] = array('position'=>80, 'img'=>'object_shipment', 'label'=>$langs->trans("SearchIntoCustomerShipments", $search_boxvalue), 'text'=>img_picto('', 'object_shipment').' '.$langs->trans("SearchIntoCustomerShipments", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/expedition/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : ''));
|
||||
}
|
||||
if (!empty($conf->facture->enabled) && empty($conf->global->MAIN_SEARCHFORM_CUSTOMER_INVOICE_DISABLED) && $user->rights->facture->lire)
|
||||
{
|
||||
|
||||
@ -54,8 +54,8 @@ abstract class CommonObjectLine extends CommonObject
|
||||
* Returns the translation key from units dictionary.
|
||||
* A langs->trans() must be called on result to get translated value.
|
||||
*
|
||||
* @param string $type Label type (long or short)
|
||||
* @return string|int <0 if ko, label if ok
|
||||
* @param string $type Label type (long or short). This can be a translation key.
|
||||
* @return string|int <0 if ko, label if ok
|
||||
*/
|
||||
public function getLabelOfUnit($type = 'long')
|
||||
{
|
||||
|
||||
@ -690,8 +690,6 @@ class Conf
|
||||
$this->global->AGENDA_DEFAULT_FILTER_TYPE = '0'; // 'AC_NON_AUTO' does not exists when AGENDA_DEFAULT_FILTER_TYPE is not on.
|
||||
}
|
||||
|
||||
if (!isset($this->global->MAIN_USE_OLD_TITLE_BUTTON)) $this->global->MAIN_USE_OLD_TITLE_BUTTON = 0;
|
||||
|
||||
if (!isset($this->global->MAIN_JS_GRAPH)) $this->global->MAIN_JS_GRAPH = 'chart'; // Use chart.js library
|
||||
|
||||
if (empty($this->global->MAIN_MODULE_DOLISTORE_API_SRV)) $this->global->MAIN_MODULE_DOLISTORE_API_SRV = 'https://www.dolistore.com';
|
||||
|
||||
@ -894,7 +894,15 @@ class DolGraph
|
||||
if ($i > $firstlot) $this->stringtoshow .= ', '."\n";
|
||||
$color = sprintf("%02x%02x%02x", $this->datacolor[$i][0], $this->datacolor[$i][1], $this->datacolor[$i][2]);
|
||||
$this->stringtoshow .= '{ ';
|
||||
if (!isset($this->type[$i]) || $this->type[$i] == 'bars') $this->stringtoshow .= 'bars: { lineWidth: 1, show: true, align: "'.($i == $firstlot ? 'center' : 'left').'", barWidth: 0.5 }, ';
|
||||
if (! isset($this->type[$i]) || $this->type[$i] == 'bars') {
|
||||
if($nblot == 3) {
|
||||
if($i == $firstlot) $align = 'right';
|
||||
elseif($i == $firstlot + 1) $align = 'center';
|
||||
else $align = 'left';
|
||||
$this->stringtoshow .= 'bars: { lineWidth: 1, show: true, align: "'.$align.'", barWidth: 0.45 }, ';
|
||||
}
|
||||
else $this->stringtoshow.='bars: { lineWidth: 1, show: true, align: "'.($i==$firstlot?'center':'left').'", barWidth: 0.5 }, ';
|
||||
}
|
||||
if (isset($this->type[$i]) && ($this->type[$i] == 'lines' || $this->type[$i] == 'linesnopoint')) $this->stringtoshow .= 'lines: { show: true, fill: false }, points: { show: '.($this->type[$i] == 'linesnopoint' ? 'false' : 'true').' }, ';
|
||||
$this->stringtoshow .= 'color: "#'.$color.'", label: "'.(isset($this->Legend[$i]) ? dol_escape_js($this->Legend[$i]) : '').'", data: d'.$i.' }';
|
||||
$i++;
|
||||
|
||||
@ -7676,10 +7676,11 @@ class Form
|
||||
* @param int $enableonly Array list of groups id to be enabled. All other must be disabled
|
||||
* @param string $force_entity '0' or Ids of environment to force
|
||||
* @param bool $multiple add [] in the name of element and add 'multiple' attribut (not working with ajax_autocompleter)
|
||||
* @param string $morecss More css to add to html component
|
||||
* @return string
|
||||
* @see select_dolusers()
|
||||
*/
|
||||
public function select_dolgroups($selected = '', $htmlname = 'groupid', $show_empty = 0, $exclude = '', $disabled = 0, $include = '', $enableonly = '', $force_entity = '0', $multiple = false)
|
||||
public function select_dolgroups($selected = '', $htmlname = 'groupid', $show_empty = 0, $exclude = '', $disabled = 0, $include = '', $enableonly = '', $force_entity = '0', $multiple = false, $morecss = '')
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $user, $langs;
|
||||
@ -7722,7 +7723,7 @@ class Form
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php';
|
||||
$out .= ajax_combobox($htmlname);
|
||||
|
||||
$out .= '<select class="flat minwidth200" id="'.$htmlname.'" name="'.$htmlname.($multiple ? '[]' : '').'" '.($multiple ? 'multiple' : '').' '.($disabled ? ' disabled' : '').'>';
|
||||
$out .= '<select class="flat minwidth200'.($morecss ? ' '.$morecss : '').'" id="'.$htmlname.'" name="'.$htmlname.($multiple ? '[]' : '').'" '.($multiple ? 'multiple' : '').' '.($disabled ? ' disabled' : '').'>';
|
||||
|
||||
$num = $this->db->num_rows($resql);
|
||||
$i = 0;
|
||||
|
||||
@ -339,9 +339,10 @@ class FormActions
|
||||
* @param int $hideinfohelp 1=Do not show info help, 0=Show, -1=Show+Add info to tell how to set default value
|
||||
* @param int $multiselect 1=Allow multiselect of action type
|
||||
* @param int $nooutput 1=No output
|
||||
* @param string $morecss More css to add to SELECT component.
|
||||
* @return string
|
||||
*/
|
||||
public function select_type_actions($selected = '', $htmlname = 'actioncode', $excludetype = '', $onlyautoornot = 0, $hideinfohelp = 0, $multiselect = 0, $nooutput = 0)
|
||||
public function select_type_actions($selected = '', $htmlname = 'actioncode', $excludetype = '', $onlyautoornot = 0, $hideinfohelp = 0, $multiselect = 0, $nooutput = 0, $morecss = '')
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs, $user, $form, $conf;
|
||||
@ -352,10 +353,13 @@ class FormActions
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
|
||||
$caction = new CActionComm($this->db);
|
||||
|
||||
// Suggest a list with manual events or all auto events
|
||||
$arraylist = $caction->liste_array(1, 'code', $excludetype, $onlyautoornot);
|
||||
array_unshift($arraylist, ' '); // Add empty line at start
|
||||
//asort($arraylist);
|
||||
// Suggest a list with manual events or all auto events
|
||||
$arraylist = $caction->liste_array(1, 'code', $excludetype, $onlyautoornot);
|
||||
if (empty($multiselect)) {
|
||||
// Add empty line at start only if no multiselect
|
||||
array_unshift($arraylist, ' ');
|
||||
}
|
||||
//asort($arraylist);
|
||||
|
||||
if ($selected == 'manual') $selected = 'AC_OTH';
|
||||
if ($selected == 'auto') $selected = 'AC_OTH_AUTO';
|
||||
@ -371,7 +375,7 @@ class FormActions
|
||||
}
|
||||
else
|
||||
{
|
||||
$out .= $form->selectarray($htmlname, $arraylist, $selected, 0, 0, 0, '', 0, 0, 0, '', 'minwidth200', 1);
|
||||
$out .= $form->selectarray($htmlname, $arraylist, $selected, 0, 0, 0, '', 0, 0, 0, '', 'minwidth200'.($morecss ? ' '.$morecss : ''), 1);
|
||||
}
|
||||
|
||||
if ($user->admin && empty($onlyautoornot) && $hideinfohelp <= 0)
|
||||
|
||||
@ -78,9 +78,10 @@ class FormFile
|
||||
* @param string $accept Specifies the types of files accepted (This is not a security check but an user interface facility. eg '.pdf,image/*' or '.png,.jpg' or 'video/*')
|
||||
* @param string $sectiondir If upload must be done inside a particular directory (if sectiondir defined, sectionid must not be)
|
||||
* @param int $usewithoutform 0=Default, 1=Disable <form> and style to use in existing area
|
||||
* @param int $capture 1=Add tag capture="capture" to force use of micro or video recording to generate file. When setting this to 1, you must also provide a value for $accept.
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function form_attach_new_file($url, $title = '', $addcancel = 0, $sectionid = 0, $perm = 1, $size = 50, $object = '', $options = '', $useajax = 1, $savingdocmask = '', $linkfiles = 1, $htmlname = 'formuserfile', $accept = '', $sectiondir = '', $usewithoutform = 0)
|
||||
public function form_attach_new_file($url, $title = '', $addcancel = 0, $sectionid = 0, $perm = 1, $size = 50, $object = '', $options = '', $useajax = 1, $savingdocmask = '', $linkfiles = 1, $htmlname = 'formuserfile', $accept = '', $sectiondir = '', $usewithoutform = 0, $capture = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $langs, $hookmanager;
|
||||
@ -170,6 +171,7 @@ class FormFile
|
||||
$out .= ((!empty($conf->global->MAIN_DISABLE_MULTIPLE_FILEUPLOAD) || $conf->browser->layout != 'classic') ? ' name="userfile"' : ' name="userfile[]" multiple');
|
||||
$out .= (empty($conf->global->MAIN_UPLOAD_DOC) || empty($perm) ? ' disabled' : '');
|
||||
$out .= (!empty($accept) ? ' accept="'.$accept.'"' : ' accept=""');
|
||||
$out .= (!empty($capture) ? ' capture="capture"' : '');
|
||||
$out .= '>';
|
||||
$out .= ' ';
|
||||
if ($sectionid) { // Show overwrite if exists for ECM module only
|
||||
|
||||
@ -308,7 +308,7 @@ class Translate
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
// Convert some strings: Parse and render carriage returns. Also, change '\\s' int '\s' because transifex sync pull the string '\s' into string '\\s'
|
||||
// Convert some strings: Parse and render carriage returns. Also, change '\\s' into '\s' because transifex sync pull the string '\s' into string '\\s'
|
||||
$this->tab_translate[$key] = str_replace(array('\\n', '\\\\s'), array("\n", '\s'), $value);
|
||||
if ($usecachekey) {
|
||||
$tabtranslatedomain[$key] = $value;
|
||||
|
||||
@ -77,27 +77,29 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
|
||||
{
|
||||
// Type
|
||||
print '<tr>';
|
||||
print '<td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">';
|
||||
print '<td class="nowrap">';
|
||||
print $langs->trans("Type");
|
||||
print '</td><td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">';
|
||||
print '</td><td class="nowraponall">';
|
||||
$multiselect = 0;
|
||||
if (!empty($conf->global->MAIN_ENABLE_MULTISELECT_TYPE)) // We use an option here because it adds bugs when used on agenda page "peruser" and "list"
|
||||
{
|
||||
$multiselect = (!empty($conf->global->AGENDA_USE_EVENT_TYPE));
|
||||
}
|
||||
print '<span class="fas fa-square" style=" color: #ddd;"></span>';
|
||||
print $formactions->select_type_actions($actioncode, "search_actioncode", $excludetype, (empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1), 0, $multiselect);
|
||||
print '<span class="fas fa-square inline-block fawidth30" style=" color: #ddd;"></span>';
|
||||
print $formactions->select_type_actions($actioncode, "search_actioncode", $excludetype, (empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1), 0, $multiselect, 0, 'maxwidth500');
|
||||
print '</td></tr>';
|
||||
|
||||
// Assigned to
|
||||
print '<tr>';
|
||||
print '<td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">';
|
||||
print '<td class="nowrap">';
|
||||
print $langs->trans("ActionsToDoBy").' ';
|
||||
print '</td><td style="padding-bottom: 2px; padding-right: 4px;">';
|
||||
print img_picto('', 'user');
|
||||
print $form->select_dolusers($filtert, 'search_filtert', 1, '', !$canedit, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
|
||||
print '</td><td>';
|
||||
print img_picto('', 'user', 'class="fawidth30 inline-block"');
|
||||
print $form->select_dolusers($filtert, 'search_filtert', 1, '', !$canedit, '', '', 0, 0, 0, '', 0, '', 'maxwidth500');
|
||||
if (empty($conf->dol_optimize_smallscreen)) print ' '.$langs->trans("or").' '.$langs->trans("ToUserOfGroup").' ';
|
||||
print $form->select_dolgroups($usergroupid, 'usergroup', 1, '', !$canedit);
|
||||
else print '<br>';
|
||||
print img_picto('', 'object_group', 'class="fawidth30 inline-block"');
|
||||
print $form->select_dolgroups($usergroupid, 'usergroup', 1, '', !$canedit, '', '', '0', false, 'maxwidth500');
|
||||
print '</td></tr>';
|
||||
|
||||
if ($conf->resource->enabled)
|
||||
@ -107,11 +109,11 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
|
||||
|
||||
// Resource
|
||||
print '<tr>';
|
||||
print '<td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">';
|
||||
print '<td class="nowrap">';
|
||||
print $langs->trans("Resource");
|
||||
print '</td><td class="nowrap maxwidthonsmartphone" style="padding-bottom: 2px; padding-right: 4px;">';
|
||||
print img_picto('', 'object_resource');
|
||||
print $formresource->select_resource_list($resourceid, "search_resourceid", '', 1, 0, 0, null, '', 2);
|
||||
print '</td><td class="nowraponall">';
|
||||
print img_picto('', 'object_resource', 'class="fawidth30 inline-block"');
|
||||
print $formresource->select_resource_list($resourceid, "search_resourceid", '', 1, 0, 0, null, '', 2, 0, 'maxwidth500');
|
||||
print '</td></tr>';
|
||||
}
|
||||
}
|
||||
@ -119,11 +121,11 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
|
||||
if (!empty($conf->societe->enabled) && $user->rights->societe->lire)
|
||||
{
|
||||
print '<tr>';
|
||||
print '<td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">';
|
||||
print '<td class="nowrap">';
|
||||
print $langs->trans("ThirdParty").' ';
|
||||
print '</td><td class="nowrap" style="padding-bottom: 2px;">';
|
||||
print img_picto('', 'company');
|
||||
print $form->select_company($socid, 'search_socid', '', ' ', 0, 0, null, 0);
|
||||
print '</td><td class="nowraponall">';
|
||||
print img_picto('', 'company', 'class="fawidth30 inline-block"');
|
||||
print $form->select_company($socid, 'search_socid', '', ' ', 0, 0, null, 0, 'minwidth100 maxwidth500');
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -133,10 +135,10 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
|
||||
$formproject = new FormProjets($db);
|
||||
|
||||
print '<tr>';
|
||||
print '<td class="nowrap" style="padding-bottom: 2px;">';
|
||||
print '<td class="nowrap">';
|
||||
print $langs->trans("Project").' ';
|
||||
print '</td><td class="nowrap" style="padding-bottom: 2px;">';
|
||||
print img_picto('', 'project');
|
||||
print '</td><td class="nowraponall">';
|
||||
print img_picto('', 'project', 'class="fawidth30 inline-block"');
|
||||
print $formproject->select_projects($socid ? $socid : -1, $pid, 'search_projectid', 0, 0, 1, 0, 0, 0, 0, '', 1, 0, 'maxwidth500');
|
||||
print '</td></tr>';
|
||||
}
|
||||
@ -145,9 +147,9 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
|
||||
{
|
||||
// Status
|
||||
print '<tr>';
|
||||
print '<td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">';
|
||||
print '<td class="nowrap">';
|
||||
print $langs->trans("Status");
|
||||
print ' </td><td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">';
|
||||
print ' </td><td class="nowraponall">';
|
||||
$formactions->form_select_status_action('formaction', $status, 1, 'search_status', 1, 2, 'minwidth100');
|
||||
print '</td></tr>';
|
||||
}
|
||||
@ -156,7 +158,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
|
||||
{
|
||||
// Filter on hours
|
||||
print '<tr>';
|
||||
print '<td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">'.$langs->trans("VisibleTimeRange").'</td>';
|
||||
print '<td class="nowrap">'.$langs->trans("VisibleTimeRange").'</td>';
|
||||
print "<td class='nowrap'>";
|
||||
print '<div class="ui-grid-a"><div class="ui-block-a">';
|
||||
print '<input type="number" class="short" name="begin_h" value="'.$begin_h.'" min="0" max="23">';
|
||||
|
||||
@ -896,6 +896,7 @@ function num_open_day($timestampStart, $timestampEnd, $inhour = 0, $lastday = 0,
|
||||
if ($timestampStart < $timestampEnd)
|
||||
{
|
||||
$numdays = num_between_day($timestampStart, $timestampEnd, $lastday);
|
||||
|
||||
$numholidays = num_public_holiday($timestampStart, $timestampEnd, $country_code, $lastday);
|
||||
$nbOpenDay = ($numdays - $numholidays);
|
||||
if ($inhour == 1 && $nbOpenDay <= 3) $nbOpenDay = ($nbOpenDay * 24);
|
||||
@ -903,8 +904,15 @@ function num_open_day($timestampStart, $timestampEnd, $inhour = 0, $lastday = 0,
|
||||
}
|
||||
elseif ($timestampStart == $timestampEnd)
|
||||
{
|
||||
$nbOpenDay = $lastday;
|
||||
if ($inhour == 1) $nbOpenDay = ($nbOpenDay * 24);
|
||||
$numholidays = 0;
|
||||
if ($lastday) {
|
||||
$numholidays = num_public_holiday($timestampStart, $timestampEnd, $country_code, $lastday);
|
||||
if ($numholidays == 1) return 0;
|
||||
}
|
||||
|
||||
$nbOpenDay=$lastday;
|
||||
|
||||
if ($inhour == 1) $nbOpenDay = $nbOpenDay*24 . $langs->trans("HourShort");
|
||||
return $nbOpenDay - (($inhour == 1 ? 12 : 0.5) * abs($halfday));
|
||||
}
|
||||
else
|
||||
|
||||
@ -3158,13 +3158,13 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
'object_category', 'object_conversation', 'object_bookmark', 'object_bug', 'object_dolly', 'object_dollyrevert', 'object_generic', 'object_folder',
|
||||
'object_list-alt', 'object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser',
|
||||
'object_cash-register', 'object_company', 'object_contact', 'object_contract', 'object_donation', 'object_dynamicprice',
|
||||
'object_holiday', 'object_hrm', 'object_invoice', 'object_intervention', 'object_label',
|
||||
'object_globe', 'object_holiday', 'object_hrm', 'object_invoice', 'object_intervention', 'object_label',
|
||||
'object_margin', 'object_money-bill-alt', 'object_multicurrency', 'object_order', 'object_payment',
|
||||
'object_lot', 'object_mrp', 'object_payment', 'object_product', 'object_propal',
|
||||
'object_other', 'object_paragraph', 'object_poll', 'object_printer', 'object_project', 'object_projectpub', 'object_propal', 'object_resource', 'object_rss', 'object_projecttask',
|
||||
'object_supplier_invoice', 'object_supplier_order', 'object_supplier_proposal', 'object_service', 'object_stock',
|
||||
'object_shipment', 'object_supplier_invoice', 'object_supplier_order', 'object_supplier_proposal', 'object_service', 'object_stock',
|
||||
'object_technic', 'object_ticket', 'object_trip', 'object_user', 'object_group', 'object_member',
|
||||
'object_phoning', 'object_phoning_mobile', 'object_phoning_fax', 'object_email',
|
||||
'object_phoning', 'object_phoning_mobile', 'object_phoning_fax', 'object_email', 'object_website',
|
||||
'off', 'on', 'order',
|
||||
'paiment', 'play', 'playdisabled', 'poll', 'printer', 'product', 'propal', 'projecttask', 'stock', 'resize', 'service', 'stats', 'trip',
|
||||
'setup', 'sign-out', 'split', 'switch_off', 'switch_on', 'tools', 'unlink', 'uparrow', 'user', 'wrench',
|
||||
@ -3209,11 +3209,12 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
'resize'=>'crop', 'supplier_order'=>'dol-order_supplier', 'supplier_proposal'=>'file-signature',
|
||||
'payment'=>'money-check-alt', 'phoning'=>'phone', 'phoning_mobile'=>'mobile-alt', 'phoning_fax'=>'fax', 'printer'=>'print', 'product'=>'cube', 'service'=>'concierge-bell',
|
||||
'resource'=>'laptop-house',
|
||||
'stock'=>'box-open', 'stats' => 'chart-bar', 'split'=>'code-branch', 'supplier_invoice'=>'file-invoice-dollar', 'technic'=>'cogs', 'ticket'=>'ticket-alt',
|
||||
'shipment'=>'dolly', 'stock'=>'box-open', 'stats' => 'chart-bar', 'split'=>'code-branch', 'supplier_invoice'=>'file-invoice-dollar', 'technic'=>'cogs', 'ticket'=>'ticket-alt',
|
||||
'title_setup'=>'tools', 'title_accountancy'=>'money-check-alt', 'title_bank'=>'university', 'title_hrm'=>'umbrella-beach',
|
||||
'title_agenda'=>'calendar-alt',
|
||||
'uparrow'=>'mail-forward',
|
||||
'jabber'=>'comment-o'
|
||||
'jabber'=>'comment-o',
|
||||
'website'=>'globe-americas'
|
||||
);
|
||||
if ($pictowithouttext == 'off') {
|
||||
$fakey = 'fa-square';
|
||||
@ -3273,7 +3274,8 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
'error'=>'pictoerror', 'warning'=>'pictowarning', 'switch_on'=>'font-status4',
|
||||
'holiday'=>'bg-infobox-holiday', 'invoice'=>'bg-infobox-commande',
|
||||
'payment'=>'bg-infobox-bank_account', 'poll'=>'bg-infobox-adherent', 'project'=>'bg-infobox-project', 'projecttask'=>'bg-infobox-project', 'propal'=>'bg-infobox-propal',
|
||||
'resource'=>'bg-infobox-action', 'supplier_invoice'=>'bg-infobox-order_supplier', 'supplier_order'=>'bg-infobox-order_supplier', 'supplier_proposal'=>'bg-infobox-supplier_proposal',
|
||||
'resource'=>'bg-infobox-action',
|
||||
'supplier_invoice'=>'bg-infobox-order_supplier', 'supplier_order'=>'bg-infobox-order_supplier', 'supplier_proposal'=>'bg-infobox-supplier_proposal',
|
||||
'ticket'=>'bg-infobox-contrat', 'title_accountancy'=>'bg-infobox-bank_account', 'title_hrm'=>'bg-infobox-holiday', 'trip'=>'bg-infobox-expensereport', 'title_agenda'=>'bg-infobox-action',
|
||||
//'title_setup'=>'bg-infobox-action', 'tools'=>'bg-infobox-action',
|
||||
'list-alt'=>'imgforviewmode', 'calendar'=>'imgforviewmode', 'calendarweek'=>'imgforviewmode', 'calendarmonth'=>'imgforviewmode', 'calendarday'=>'imgforviewmode', 'calendarperuser'=>'imgforviewmode'
|
||||
@ -3291,7 +3293,8 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
'map-marker-alt'=>'#aaa', 'mrp'=>'#a69944', 'product'=>'#a69944', 'service'=>'#a69944', 'stock'=>'#a69944',
|
||||
'other'=>'#ddd',
|
||||
'playdisabled'=>'#ccc', 'printer'=>'#444', 'projectpub'=>'#986c6a', 'resize'=>'#444', 'rss'=>'#cba',
|
||||
'stats'=>'#444', 'switch_off'=>'#999', 'uparrow'=>'#555', 'globe-americas'=>'#aaa'
|
||||
'shipment'=>'#a69944', 'stats'=>'#444', 'switch_off'=>'#999', 'uparrow'=>'#555', 'globe-americas'=>'#aaa',
|
||||
'website'=>'#304'
|
||||
);
|
||||
if (isset($arrayconvpictotocolor[$pictowithouttext])) {
|
||||
$facolor = $arrayconvpictotocolor[$pictowithouttext];
|
||||
@ -4522,15 +4525,17 @@ function print_fleche_navigation($page, $file, $options = '', $nextpage = 0, $be
|
||||
}
|
||||
if ($page > 0)
|
||||
{
|
||||
print '<li class="pagination"><a class="paginationprevious" href="'.$file.'?page='.($page - 1).$options.'"><i class="fa fa-chevron-left" title="'.dol_escape_htmltag($langs->trans("Previous")).'"></i></a></li>';
|
||||
print '<li class="pagination paginationpage"><a class="paginationprevious" href="'.$file.'?page='.($page - 1).$options.'"><i class="fa fa-chevron-left" title="'.dol_escape_htmltag($langs->trans("Previous")).'"></i></a></li>';
|
||||
}
|
||||
if ($betweenarrows)
|
||||
{
|
||||
print '<!--<div class="betweenarrows nowraponall inline-block">-->';
|
||||
print $betweenarrows;
|
||||
print '<!--</div>-->';
|
||||
}
|
||||
if ($nextpage > 0)
|
||||
{
|
||||
print '<li class="pagination"><a class="paginationnext" href="'.$file.'?page='.($page + 1).$options.'"><i class="fa fa-chevron-right" title="'.dol_escape_htmltag($langs->trans("Next")).'"></i></a></li>';
|
||||
print '<li class="pagination paginationpage"><a class="paginationnext" href="'.$file.'?page='.($page + 1).$options.'"><i class="fa fa-chevron-right" title="'.dol_escape_htmltag($langs->trans("Next")).'"></i></a></li>';
|
||||
}
|
||||
if ($afterarrows)
|
||||
{
|
||||
@ -5789,7 +5794,8 @@ function dolGetFirstLineOfText($text, $nboflines = 1, $charset = 'UTF-8')
|
||||
|
||||
|
||||
/**
|
||||
* Replace CRLF in string with a HTML BR tag
|
||||
* Replace CRLF in string with a HTML BR tag.
|
||||
* WARNING: The content after operation contains some HTML tags (the <br>) so be sure to also have encode the special chars of stringtoencode into HTML before.
|
||||
*
|
||||
* @param string $stringtoencode String to encode
|
||||
* @param int $nl2brmode 0=Adding br before \n, 1=Replacing \n by br
|
||||
@ -6043,7 +6049,7 @@ function dol_textishtml($msg, $option = 0)
|
||||
*
|
||||
* @param string $text1 Text 1
|
||||
* @param string $text2 Text 2
|
||||
* @param bool $forxml false=Use <br>instead of \n if html content detected, true=Use <br /> instead of \n if html content detected
|
||||
* @param bool $forxml true=Use <br /> instead of <br> if we have to add a br tag
|
||||
* @param bool $invert invert order of description lines (we often use config MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION in this parameter)
|
||||
* @return string Text 1 + new line + Text2
|
||||
* @see dol_textishtml()
|
||||
@ -6058,9 +6064,9 @@ function dol_concatdesc($text1, $text2, $forxml = false, $invert = false)
|
||||
}
|
||||
|
||||
$ret = '';
|
||||
$ret .= (!dol_textishtml($text1) && dol_textishtml($text2)) ?dol_nl2br($text1, 0, $forxml) : $text1;
|
||||
$ret .= (!dol_textishtml($text1) && dol_textishtml($text2)) ? dol_nl2br(dol_escape_htmltag($text1, 0, 1, '', 1), 0, $forxml) : $text1;
|
||||
$ret .= (!empty($text1) && !empty($text2)) ? ((dol_textishtml($text1) || dol_textishtml($text2)) ? ($forxml ? "<br \>\n" : "<br>\n") : "\n") : "";
|
||||
$ret .= (dol_textishtml($text1) && !dol_textishtml($text2)) ?dol_nl2br($text2, 0, $forxml) : $text2;
|
||||
$ret .= (dol_textishtml($text1) && !dol_textishtml($text2)) ? dol_nl2br(dol_escape_htmltag($text2, 0, 1, '', 1), 0, $forxml) : $text2;
|
||||
return $ret;
|
||||
}
|
||||
|
||||
@ -8622,11 +8628,8 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u
|
||||
}
|
||||
|
||||
$class = 'btnTitle';
|
||||
if ($iconClass == 'fa fa-plus-circle') $class .= ' btnTitlePlus';
|
||||
|
||||
// hidden conf keep during button transition TODO: remove this block
|
||||
if (!empty($conf->global->MAIN_USE_OLD_TITLE_BUTTON)) {
|
||||
$class = 'butActionNew';
|
||||
}
|
||||
if (!empty($params['morecss'])) $class .= ' '.$params['morecss'];
|
||||
|
||||
$attr = array(
|
||||
@ -8641,11 +8644,6 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u
|
||||
if ($status <= 0) {
|
||||
$attr['class'] .= ' refused';
|
||||
|
||||
// hidden conf keep during button transition TODO: remove this block
|
||||
if (!empty($conf->global->MAIN_USE_OLD_TITLE_BUTTON)) {
|
||||
$attr['class'] = 'butActionNewRefused';
|
||||
}
|
||||
|
||||
$attr['href'] = '';
|
||||
|
||||
if ($status == -1) { // disable
|
||||
@ -8697,18 +8695,12 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u
|
||||
|
||||
$tag = (empty($attr['href']) ? 'span' : 'a');
|
||||
|
||||
$button = '<'.$tag.' '.$compiledAttributes.' >';
|
||||
$button = '';
|
||||
$button .= '<'.$tag.' '.$compiledAttributes.' >';
|
||||
$button .= '<span class="'.$iconClass.' valignmiddle btnTitle-icon"></span>';
|
||||
$button .= '<span class="valignmiddle text-plus-circle btnTitle-label'.(empty($params['forcenohideoftext']) ? ' hideonsmartphone' : '').'">'.$label.'</span>';
|
||||
$button .= '</'.$tag.'>';
|
||||
|
||||
// hidden conf keep during button transition TODO: remove this block
|
||||
if (!empty($conf->global->MAIN_USE_OLD_TITLE_BUTTON)) {
|
||||
$button = '<'.$tag.' '.$compiledAttributes.' ><span class="text-plus-circle">'.$label.'</span>';
|
||||
$button .= '<span class="'.$iconClass.' valignmiddle"></span>';
|
||||
$button .= '</'.$tag.'>';
|
||||
}
|
||||
|
||||
return $button;
|
||||
}
|
||||
|
||||
|
||||
@ -2314,7 +2314,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
print '</div>
|
||||
<div class="info-box-content info-box-text-module">
|
||||
<span class="info-box-title">'.$this->getName().'</span>
|
||||
<span class="info-box-desc twolinesmax" title="'.dol_escape_htmltag($this->getDesc()).'">'.nl2br($this->getDesc()).'</span>';
|
||||
<span class="info-box-desc twolinesmax opacitymedium" title="'.dol_escape_htmltag($this->getDesc()).'">'.nl2br($this->getDesc()).'</span>';
|
||||
|
||||
/*print '<span class="info-box-icon-version" title="'.$langs->trans("Version").' '.$this->getVersion(1).'">';
|
||||
print $this->getVersion(1);
|
||||
|
||||
@ -55,7 +55,7 @@ class modCollab extends DolibarrModules
|
||||
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
|
||||
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
||||
// Name of image file used for this module.
|
||||
$this->picto = 'globe';
|
||||
$this->picto = 'website';
|
||||
|
||||
// Data directories to create when module is enabled
|
||||
$this->dirs = array("/collab/temp");
|
||||
|
||||
@ -55,7 +55,7 @@ class modWebsite extends DolibarrModules
|
||||
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
|
||||
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
||||
// Name of image file used for this module.
|
||||
$this->picto = 'globe';
|
||||
$this->picto = 'website';
|
||||
|
||||
// Data directories to create when module is enabled
|
||||
$this->dirs = array("/website/temp");
|
||||
|
||||
@ -52,8 +52,12 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element]
|
||||
{
|
||||
$lastseparatorkeyfound = '';
|
||||
$extrafields_collapse_num = '';
|
||||
$extrafields_collapse_num_old = '';
|
||||
$i = 0;
|
||||
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $label)
|
||||
{
|
||||
$i++;
|
||||
|
||||
// Discard if extrafield is a hidden field on form
|
||||
|
||||
$enabled = 1;
|
||||
@ -65,6 +69,7 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element]
|
||||
{
|
||||
$enabled = dol_eval($extrafields->attributes[$object->table_element]['list'][$key], 1);
|
||||
}
|
||||
|
||||
$perms = 1;
|
||||
if ($perms && isset($extrafields->attributes[$object->table_element]['perms'][$key]))
|
||||
{
|
||||
@ -87,6 +92,8 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element]
|
||||
$value = $object->array_options["options_".$key];
|
||||
//var_dump($key.' - '.$value);
|
||||
}
|
||||
|
||||
// Print line tr of extra field
|
||||
if ($extrafields->attributes[$object->table_element]['type'][$key] == 'separate')
|
||||
{
|
||||
$extrafields_collapse_num = '';
|
||||
@ -109,13 +116,20 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element]
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr class="trextrafields_collapse'.$extrafields_collapse_num.'">';
|
||||
print '<tr class="trextrafields_collapse'.$extrafields_collapse_num;
|
||||
/*if ($extrafields_collapse_num && $extrafields_collapse_num_old && $extrafields_collapse_num != $extrafields_collapse_num_old) {
|
||||
print ' trextrafields_collapse_new';
|
||||
}*/
|
||||
if ($extrafields_collapse_num && $i == count($extrafields->attributes[$object->table_element]['label'])) {
|
||||
print ' trextrafields_collapse_last';
|
||||
}
|
||||
print '">';
|
||||
$extrafields_collapse_num_old = $extrafields_collapse_num;
|
||||
print '<td class="titlefield">';
|
||||
print '<table class="nobordernopadding centpercent">';
|
||||
print '<tr>';
|
||||
print '<td class="';
|
||||
//var_dump($action);exit;
|
||||
|
||||
print '<td class="';
|
||||
if ((!empty($action) && ($action == 'create' || $action == 'edit')) && !empty($extrafields->attributes[$object->table_element]['required'][$key])) print ' fieldrequired';
|
||||
print '">';
|
||||
if (!empty($extrafields->attributes[$object->table_element]['help'][$key])) print $form->textwithpicto($langs->trans($label), $langs->trans($extrafields->attributes[$object->table_element]['help'][$key]));
|
||||
@ -161,6 +175,7 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element]
|
||||
//print 'x'.$object->array_options['options_' . $key].'-'.$datenotinstring.' - '.dol_print_date($datenotinstring, 'dayhour');
|
||||
$value = isset($_POST["options_".$key]) ? dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]) : $datenotinstring;
|
||||
}
|
||||
|
||||
//TODO Improve element and rights detection
|
||||
if ($action == 'edit_extras' && $permok && GETPOST('attribute', 'none') == $key)
|
||||
{
|
||||
|
||||
@ -33,11 +33,6 @@ if (!is_object($website))
|
||||
$website = new Website($db);
|
||||
$website->fetch(0, $websitekey);
|
||||
}
|
||||
// Define $weblangs
|
||||
if (!is_object($weblangs))
|
||||
{
|
||||
$weblangs = dol_clone($langs); // TODO Use an object lang from a language set into $website object instead of backoffice
|
||||
}
|
||||
// Define $websitepage if we have $websitepagefile defined
|
||||
if (!$pageid && !empty($websitepagefile))
|
||||
{
|
||||
@ -48,10 +43,17 @@ if (!is_object($websitepage))
|
||||
{
|
||||
$websitepage = new WebsitePage($db);
|
||||
}
|
||||
// Define $weblangs
|
||||
if (!is_object($weblangs))
|
||||
{
|
||||
$weblangs = new Translate('', $conf);
|
||||
}
|
||||
if ($pageid > 0)
|
||||
{
|
||||
$websitepage->fetch($pageid);
|
||||
|
||||
$weblangs->setDefaultLang($websitepage->lang ? $websitepage->lang : 'auto');
|
||||
|
||||
if (!defined('USEDOLIBARREDITOR') && in_array($websitepage->type_container, array('menu', 'other')))
|
||||
{
|
||||
$weblangs->load("website");
|
||||
|
||||
@ -100,8 +100,9 @@ class EmailCollector extends CommonObject
|
||||
'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1, 'index'=>1, 'position'=>10, 'searchall'=>1, 'help'=>'Example: MyCollector1'),
|
||||
'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'visible'=>1, 'enabled'=>1, 'position'=>30, 'notnull'=>-1, 'searchall'=>1, 'help'=>'Example: My Email collector'),
|
||||
'description' => array('type'=>'text', 'label'=>'Description', 'visible'=>-1, 'enabled'=>1, 'position'=>60, 'notnull'=>-1),
|
||||
'host' => array('type'=>'varchar(255)', 'label'=>'EMailHost', 'visible'=>1, 'enabled'=>1, 'position'=>100, 'notnull'=>1, 'searchall'=>1, 'comment'=>"IMAP server", 'help'=>'Example: imap.gmail.com'),
|
||||
'login' => array('type'=>'varchar(128)', 'label'=>'Login', 'visible'=>1, 'enabled'=>1, 'position'=>101, 'notnull'=>-1, 'index'=>1, 'comment'=>"IMAP login", 'help'=>'Example: myaccount@gmail.com'),
|
||||
'host' => array('type'=>'varchar(255)', 'label'=>'EMailHost', 'visible'=>1, 'enabled'=>1, 'position'=>90, 'notnull'=>1, 'searchall'=>1, 'comment'=>"IMAP server", 'help'=>'Example: imap.gmail.com'),
|
||||
'hostcharset' => array('type'=>'varchar(16)', 'label'=>'HostCharset', 'visible'=>-1, 'enabled'=>1, 'position'=>91, 'notnull'=>0, 'searchall'=>0, 'comment'=>"IMAP server charset", 'help'=>'Example: "UTF-8" (May be "US-ASCII" with some Office365)'),
|
||||
'login' => array('type'=>'varchar(128)', 'label'=>'Login', 'visible'=>1, 'enabled'=>1, 'position'=>101, 'notnull'=>-1, 'index'=>1, 'comment'=>"IMAP login", 'help'=>'Example: myaccount@gmail.com'),
|
||||
'password' => array('type'=>'password', 'label'=>'Password', 'visible'=>-1, 'enabled'=>1, 'position'=>102, 'notnull'=>-1, 'comment'=>"IMAP password", 'help'=>'WithGMailYouCanCreateADedicatedPassword'),
|
||||
'source_directory' => array('type'=>'varchar(255)', 'label'=>'MailboxSourceDirectory', 'visible'=>-1, 'enabled'=>1, 'position'=>103, 'notnull'=>1, 'default' => 'Inbox', 'help'=>'Example: INBOX'),
|
||||
//'filter' => array('type'=>'text', 'label'=>'Filter', 'visible'=>1, 'enabled'=>1, 'position'=>105),
|
||||
@ -173,6 +174,7 @@ class EmailCollector extends CommonObject
|
||||
|
||||
|
||||
public $host;
|
||||
public $hostcharset;
|
||||
public $login;
|
||||
public $password;
|
||||
public $source_directory;
|
||||
@ -935,8 +937,8 @@ class EmailCollector extends CommonObject
|
||||
}
|
||||
imap_errors(); // Clear stack of errors.
|
||||
|
||||
// $conf->global->MAIL_PREFIX_FOR_EMAIL_ID must be defined
|
||||
$host = dol_getprefix('email');
|
||||
//$host = '123456';
|
||||
|
||||
// Define the IMAP search string
|
||||
// See https://tools.ietf.org/html/rfc3501#section-6.4.4 for IMAPv4 (PHP not yet compatible)
|
||||
@ -985,9 +987,10 @@ class EmailCollector extends CommonObject
|
||||
$nbemailprocessed = 0;
|
||||
$nbemailok = 0;
|
||||
$nbactiondone = 0;
|
||||
$charset = ($this->hostcharset ? $this->hostcharset : "UTF-8");
|
||||
|
||||
// Scan IMAP inbox
|
||||
$arrayofemail = imap_search($connection, $search, null, "UTF-8");
|
||||
$arrayofemail = imap_search($connection, $search, null, $charset);
|
||||
if ($arrayofemail === false)
|
||||
{
|
||||
// Nothing found or search string not understood
|
||||
@ -1078,6 +1081,7 @@ class EmailCollector extends CommonObject
|
||||
|
||||
dol_syslog("Start of loop on email", LOG_INFO, 1);
|
||||
|
||||
$i = 0;
|
||||
foreach ($arrayofemail as $imapemail)
|
||||
{
|
||||
if ($nbemailprocessed > 1000)
|
||||
@ -1085,12 +1089,17 @@ class EmailCollector extends CommonObject
|
||||
break; // Do not process more than 1000 email per launch (this is a different protection than maxnbcollectedpercollect
|
||||
}
|
||||
|
||||
$i++;
|
||||
|
||||
$header = imap_fetchheader($connection, $imapemail, 0);
|
||||
$header = preg_replace('/\r\n\s+/m', ' ', $header); // When a header line is on several lines, merge lines
|
||||
$matches = array();
|
||||
preg_match_all('/([^: ]+): (.+?(?:\r\n\s(?:.+?))*)\r\n/m', $header, $matches);
|
||||
$headers = array_combine($matches[1], $matches[2]);
|
||||
//var_dump($headers);
|
||||
|
||||
dol_syslog("** Process email ".$i." References: ".$headers['References']);
|
||||
|
||||
// If there is a filter on trackid
|
||||
if ($searchfilterdoltrackid > 0)
|
||||
{
|
||||
@ -1126,13 +1135,16 @@ class EmailCollector extends CommonObject
|
||||
// GET Email meta datas
|
||||
$overview = imap_fetch_overview($connection, $imapemail, 0);
|
||||
|
||||
dol_syslog("** Process email - msgid=".$overview[0]->message_id." date=".dol_print_date($overview[0]->udate, 'dayrfc', 'gmt')." subject=".$overview[0]->subject);
|
||||
dol_syslog("msgid=".$overview[0]->message_id." date=".dol_print_date($overview[0]->udate, 'dayrfc', 'gmt')." subject=".$overview[0]->subject);
|
||||
|
||||
// Decode $overview[0]->subject according to RFC2047
|
||||
// Can use also imap_mime_header_decode($str)
|
||||
// Can use also mb_decode_mimeheader($str)
|
||||
// Can use also iconv_mime_decode($str, ICONV_MIME_DECODE_CONTINUE_ON_ERROR, 'UTF-8')
|
||||
if (function_exists('imap_mime_header_decode')) {
|
||||
if (function_exists('iconv_mime_decode')) {
|
||||
$overview[0]->subject = iconv_mime_decode($overview[0]->subject, ICONV_MIME_DECODE_CONTINUE_ON_ERROR, 'UTF-8');
|
||||
}
|
||||
elseif (function_exists('imap_mime_header_decode')) {
|
||||
$elements = imap_mime_header_decode($overview[0]->subject);
|
||||
$newstring = '';
|
||||
if (!empty($elements)) {
|
||||
@ -1146,6 +1158,8 @@ class EmailCollector extends CommonObject
|
||||
elseif (function_exists('mb_decode_mimeheader')) {
|
||||
$overview[0]->subject = mb_decode_mimeheader($overview[0]->subject);
|
||||
}
|
||||
// Removed emojis
|
||||
$overview[0]->subject = preg_replace('/[\x{10000}-\x{10FFFF}]/u', "\xEF\xBF\xBD", $overview[0]->subject);
|
||||
|
||||
// Parse IMAP email structure
|
||||
global $htmlmsg, $plainmsg, $charset, $attachments;
|
||||
@ -1153,6 +1167,9 @@ class EmailCollector extends CommonObject
|
||||
|
||||
//$htmlmsg,$plainmsg,$charset,$attachments
|
||||
$messagetext = $plainmsg ? $plainmsg : dol_string_nohtmltag($htmlmsg, 0);
|
||||
// Removed emojis
|
||||
$messagetext = preg_replace('/[\x{10000}-\x{10FFFF}]/u', "\xEF\xBF\xBD", $messagetext);
|
||||
|
||||
/*var_dump($plainmsg);
|
||||
var_dump($htmlmsg);
|
||||
var_dump($messagetext);*/
|
||||
|
||||
@ -733,7 +733,7 @@ if ($resql)
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Date creation
|
||||
|
||||
@ -760,7 +760,7 @@ if ($resql)
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
|
||||
@ -566,7 +566,7 @@ if ($resql)
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Date creation
|
||||
|
||||
@ -1226,7 +1226,7 @@ if ($resql)
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Date creation
|
||||
|
||||
@ -1291,7 +1291,9 @@ else
|
||||
if ($includesunday) $htmlhelp .= '<br>'.$langs->trans("DayIsANonWorkingDay", $langs->trans("Sunday"));
|
||||
print $form->textwithpicto($langs->trans('NbUseDaysCP'), $htmlhelp);
|
||||
print '</td>';
|
||||
print '<td>'.num_open_day($object->date_debut_gmt, $object->date_fin_gmt, 0, 1, $object->halfday).'</td>';
|
||||
print '<td>';
|
||||
print num_open_day($object->date_debut_gmt, $object->date_fin_gmt, 0, 1, $object->halfday);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
if ($object->statut == Holiday::STATUS_REFUSED)
|
||||
|
||||
@ -743,7 +743,7 @@ if ($resql)
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
|
||||
@ -142,11 +142,11 @@ if (empty($user->socid) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS))
|
||||
'orders',
|
||||
'invoices',
|
||||
'donations',
|
||||
'contracts',
|
||||
'interventions',
|
||||
'supplier_proposals',
|
||||
'supplier_orders',
|
||||
'supplier_invoices',
|
||||
'contracts',
|
||||
'interventions',
|
||||
'ticket'
|
||||
);
|
||||
|
||||
|
||||
@ -582,3 +582,14 @@ create table llx_commande_fournisseur_dispatch_extrafields
|
||||
|
||||
ALTER TABLE llx_commande_fournisseur_dispatch_extrafields ADD INDEX idx_commande_fournisseur_dispatch_extrafields (fk_object);
|
||||
|
||||
|
||||
create table llx_facturedet_rec_extrafields
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
tms timestamp,
|
||||
fk_object integer NOT NULL, -- object id
|
||||
import_key varchar(14) -- import key
|
||||
)ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_facturedet_rec_extrafields ADD INDEX idx_facturedet_rec_extrafields (fk_object);
|
||||
|
||||
|
||||
@ -54,6 +54,15 @@ create table llx_c_shipment_package_type
|
||||
entity integer DEFAULT 1 NOT NULL -- Multi company id
|
||||
)ENGINE=innodb;
|
||||
|
||||
create table llx_facturedet_rec_extrafields
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
tms timestamp,
|
||||
fk_object integer NOT NULL, -- object id
|
||||
import_key varchar(14) -- import key
|
||||
)ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_facturedet_rec_extrafields ADD INDEX idx_facturedet_rec_extrafields (fk_object);
|
||||
|
||||
|
||||
-- For v12
|
||||
@ -275,4 +284,6 @@ ALTER TABLE llx_prelevement_facture ADD COLUMN fk_facture_fourn INTEGER NULL;
|
||||
|
||||
ALTER TABLE llx_menu MODIFY COLUMN module varchar(255);
|
||||
|
||||
ALTER TABLE llx_actioncomm SET fk_action = 50 where fk_action = 40 AND code = 'TICKET_MSG';
|
||||
UPDATE llx_actioncomm SET fk_action = 50 where fk_action = 40 AND code = 'TICKET_MSG';
|
||||
|
||||
ALTER TABLE llx_emailcollector_emailcollector ADD COLUMN hostcharset varchar(16) DEFAULT 'UTF-8';
|
||||
|
||||
@ -200,7 +200,7 @@ CREATE TABLE llx_emailcollector_emailcollectorfilter(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||
fk_emailcollector INTEGER NOT NULL,
|
||||
type varchar(128) NOT NULL,
|
||||
rulevalue varchar(255) NULL,
|
||||
rulevalue varchar(128) NULL,
|
||||
date_creation datetime NOT NULL,
|
||||
tms timestamp NOT NULL,
|
||||
fk_user_creat integer NOT NULL,
|
||||
|
||||
@ -21,7 +21,8 @@ CREATE TABLE llx_emailcollector_emailcollector(
|
||||
ref varchar(128) NOT NULL,
|
||||
label varchar(255),
|
||||
description text,
|
||||
host varchar(255),
|
||||
host varchar(255),
|
||||
hostcharset varchar(16) DEFAULT 'UTF-8',
|
||||
login varchar(128),
|
||||
password varchar(128),
|
||||
source_directory varchar(255) NOT NULL,
|
||||
|
||||
@ -121,6 +121,7 @@ InvoiceLinesDone=Bound lines of invoices
|
||||
ExpenseReportLines=Lines of expense reports to bind
|
||||
ExpenseReportLinesDone=Bound lines of expense reports
|
||||
IntoAccount=Bind line with the accounting account
|
||||
TotalForAccount=Total for accounting account
|
||||
|
||||
|
||||
Ventilate=Bind
|
||||
@ -314,12 +315,13 @@ Modelcsv_quadratus=Export for Quadratus QuadraCompta
|
||||
Modelcsv_ebp=Export for EBP
|
||||
Modelcsv_cogilog=Export for Cogilog
|
||||
Modelcsv_agiris=Export for Agiris
|
||||
Modelcsv_LDCompta=Export for LD Compta (v9 & higher) (Test)
|
||||
Modelcsv_LDCompta=Export for LD Compta (v9) (Test)
|
||||
Modelcsv_LDCompta10=Export for LD Compta (v10 & higher)
|
||||
Modelcsv_openconcerto=Export for OpenConcerto (Test)
|
||||
Modelcsv_configurable=Export CSV Configurable
|
||||
Modelcsv_FEC=Export FEC
|
||||
Modelcsv_Sage50_Swiss=Export for Sage 50 Switzerland
|
||||
Modelcsv_winfic=Export Winfic - eWinfic - WinSis Compta
|
||||
ChartofaccountsId=Chart of accounts Id
|
||||
|
||||
## Tools - Init accounting account on product / service
|
||||
|
||||
@ -40,6 +40,7 @@ WebUserGroup=Web server user/group
|
||||
NoSessionFound=Your PHP configuration seems to not allow listing of active sessions. The directory used to save sessions (<b>%s</b>) may be protected (for example by OS permissions or by PHP directive open_basedir).
|
||||
DBStoringCharset=Database charset to store data
|
||||
DBSortingCharset=Database charset to sort data
|
||||
HostCharset=Host charset
|
||||
ClientCharset=Client charset
|
||||
ClientSortingCharset=Client collation
|
||||
WarningModuleNotActive=Module <b>%s</b> must be enabled
|
||||
@ -1015,7 +1016,7 @@ LocalTax2IsUsedDescES=The IRPF rate by default when creating prospects, invoices
|
||||
LocalTax2IsNotUsedDescES=By default the proposed IRPF is 0. End of rule.
|
||||
LocalTax2IsUsedExampleES=In Spain, freelancers and independent professionals who provide services and companies who have chosen the tax system of modules.
|
||||
LocalTax2IsNotUsedExampleES=In Spain they are businesses not subject to tax system of modules.
|
||||
RevenueStampDesc=The "tax stamp" or "revenue stamp" is a fixed tax you per invoice (It does not depend on amount of invoice). It can also be a percent tax but using the second or third type of tax is better for percent taxes as tax stamps des not provide any reporting. Only few countries uses this type of tax.
|
||||
RevenueStampDesc=The "tax stamp" or "revenue stamp" is a fixed tax you per invoice (It does not depend on amount of invoice). It can also be a percent tax but using the second or third type of tax is better for percent taxes as tax stamps does not provide any reporting. Only few countries uses this type of tax.
|
||||
UseRevenueStamp=Use a tax stamp
|
||||
UseRevenueStampExample=The value of tax stamp is defined by default into the setup of dictionaries (%s - %s - %s)
|
||||
CalcLocaltax=Reports on local taxes
|
||||
@ -1272,6 +1273,7 @@ RuleForGeneratedPasswords=Rules to generate and validate passwords
|
||||
DisableForgetPasswordLinkOnLogonPage=Do not show the "Password Forgotten" link on the Login page
|
||||
UsersSetup=Users module setup
|
||||
UserMailRequired=Email required to create a new user
|
||||
UserHideInactive=Hide inactive users from all combo lists of users (Not recommended: this may means you won't be able to filter or search on old users on some pages)
|
||||
UsersDocModules=Document templates for documents generated from user record
|
||||
GroupsDocModules=Document templates for documents generated from a group record
|
||||
##### HRM setup #####
|
||||
@ -1937,7 +1939,7 @@ WithoutDolTrackingID=Dolibarr Reference not found in Message ID
|
||||
FormatZip=Zip
|
||||
MainMenuCode=Menu entry code (mainmenu)
|
||||
ECMAutoTree=Show automatic ECM tree
|
||||
OperationParamDesc=Define values to use for action, or how to extract values. For example:<br>objproperty1=SET:abc<br>objproperty1=SET:a value with replacement of __objproperty1__<br>objproperty3=SETIFEMPTY:abc<br>objproperty4=EXTRACT:HEADER:X-Myheaderkey.*[^\s]+(.*)<br>options_myextrafield=EXTRACT:SUBJECT:([^\s]*)<br>object.objproperty5=EXTRACT:BODY:My company name is\s([^\s]*)<br><br>Use a ; char as separator to extract or set several properties.
|
||||
OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:<br>objproperty1=SET:the value to set<br>objproperty2=SET:a value with replacement of __objproperty1__<br>objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined<br>objproperty4=EXTRACT:HEADER:X-Myheaderkey:\s*([^\s]*)<br>options_myextrafield1=EXTRACT:SUBJECT:([^\n]*)<br>object.objproperty5=EXTRACT:BODY:My company name is\s([^\s]*)<br><br>Use a ; char as separator to extract or set several properties.
|
||||
OpeningHours=Opening hours
|
||||
OpeningHoursDesc=Enter here the regular opening hours of your company.
|
||||
ResourceSetup=Configuration of Resource module
|
||||
|
||||
@ -83,7 +83,7 @@ ListOfDictionariesEntries=List of dictionaries entries
|
||||
ListOfPermissionsDefined=List of defined permissions
|
||||
SeeExamples=See examples here
|
||||
EnabledDesc=Condition to have this field active (Examples: 1 or $conf->global->MYMODULE_MYOPTION)
|
||||
VisibleDesc=Is the field visible ? (Examples: 0=Never visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create), 5=Visible on list end view form only (not create, not update). Using a negative value means field is not shown by default on list but can be selected for viewing). It can be an expression, for example:<br>preg_match('/public/', $_SERVER['PHP_SELF'])?0:1<br>($user->rights->holiday->define_holiday ? 1 : 0)
|
||||
VisibleDesc=Is the field visible ? (Examples: 0=Never visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create), 5=Visible on list end view form only (not create, not update).<br><br>Using a negative value means field is not shown by default on list but can be selected for viewing).<br><br>It can be an expression, for example:<br>preg_match('/public/', $_SERVER['PHP_SELF'])?0:1<br>($user->rights->holiday->define_holiday ? 1 : 0)
|
||||
DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.<br/>Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)<br/><br/><strong>For document :</strong><br/>0 = not displayed <br/>1 = display<br/>2 = display only if not empty<br/><br/><strong>For document lines :</strong><br/>0 = not displayed <br/>1 = displayed in a column<br/>3 = display in line description column after the description<br/>4 = display in description column after the description only if not empty
|
||||
DisplayOnPdf=Display on PDF
|
||||
IsAMeasureDesc=Can the value of field be cumulated to get a total into list? (Examples: 1 or 0)
|
||||
|
||||
@ -1272,6 +1272,7 @@ RuleForGeneratedPasswords=Règle pour la génération des mots de passe proposé
|
||||
DisableForgetPasswordLinkOnLogonPage=Cacher le lien "Mot de passe oublié" sur la page de connexion
|
||||
UsersSetup=Configuration du module utilisateurs
|
||||
UserMailRequired=Email requis pour créer un nouvel utilisateur
|
||||
UserHideInactive=Cacher les utilisateurs inactifs
|
||||
UsersDocModules=Modèles de documents pour les documents générés à partir de la fiche utilisateur
|
||||
GroupsDocModules=Modèles de documents pour les documents générés à partir de la fiche d'un groupe
|
||||
##### HRM setup #####
|
||||
|
||||
@ -2180,7 +2180,7 @@ function left_menu($menu_array_before, $helppagename = '', $notused = '', $menu_
|
||||
} else {
|
||||
if (is_array($arrayresult)) {
|
||||
foreach ($arrayresult as $key => $val) {
|
||||
$searchform .= printSearchForm($val['url'], $val['url'], $val['label'], 'maxwidth125', 'sall', $val['shortcut'], 'searchleft'.$key, img_picto('', $val['img'], '', false, 1, 1));
|
||||
$searchform .= printSearchForm($val['url'], $val['url'], $val['label'], 'maxwidth125', 'sall', $val['shortcut'], 'searchleft'.$key, $val['img']);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2453,14 +2453,14 @@ function printSearchForm($urlaction, $urlobject, $title, $htmlmorecss, $htmlinpu
|
||||
$ret .= '<input type="hidden" name="savelogin" value="'.dol_escape_htmltag($user->login).'">';
|
||||
if ($showtitlebefore) $ret .= '<div class="tagtd left">'.$title.'</div> ';
|
||||
$ret .= '<div class="tagtd">';
|
||||
$ret .= img_picto('', $img, '', false, 0, 0, '', 'paddingright width20');
|
||||
$ret .= '<input type="text" class="flat '.$htmlmorecss.'"';
|
||||
$ret .= ' style="text-indent: 22px; background-image: url(\''.$img.'\'); background-repeat: no-repeat; background-position: 3px;"';
|
||||
$ret .= ' style="background-repeat: no-repeat; background-position: 3px;"';
|
||||
$ret .= ($accesskey ? ' accesskey="'.$accesskey.'"' : '');
|
||||
$ret .= ' placeholder="'.strip_tags($title).'"';
|
||||
$ret .= ($autofocus ? ' autofocus' : '');
|
||||
$ret .= ' name="'.$htmlinputname.'" id="'.$prefhtmlinputname.$htmlinputname.'" />';
|
||||
//$ret.='<input type="submit" class="button" style="padding-top: 4px; padding-bottom: 4px; padding-left: 6px; padding-right: 6px" value="'.$langs->trans("Go").'">';
|
||||
$ret .= '<button type="submit" class="button" style="padding-top: 4px; padding-bottom: 4px; padding-left: 6px; padding-right: 6px">';
|
||||
$ret .= '<button type="submit" class="button bordertransp" style="padding-top: 4px; padding-bottom: 4px; padding-left: 6px; padding-right: 6px">';
|
||||
$ret .= '<span class="fa fa-search"></span>';
|
||||
$ret .= '</button>';
|
||||
$ret .= '</div>';
|
||||
|
||||
@ -5387,11 +5387,11 @@ class Product extends CommonObject
|
||||
$label_type = 'short_label';
|
||||
}
|
||||
|
||||
$sql = 'select '.$label_type.' from '.MAIN_DB_PREFIX.'c_units where rowid='.$this->fk_unit;
|
||||
$sql = 'select '.$label_type.', code from '.MAIN_DB_PREFIX.'c_units where rowid='.$this->fk_unit;
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql && $this->db->num_rows($resql) > 0) {
|
||||
$res = $this->db->fetch_array($resql);
|
||||
$label = $res[$label_type];
|
||||
$label = ($label_type == 'short' ? $res[$label_type] : 'unit'.$res['code']);
|
||||
$this->db->free($resql);
|
||||
return $label;
|
||||
}
|
||||
|
||||
@ -1345,7 +1345,7 @@ if ($resql)
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Date creation
|
||||
|
||||
@ -44,9 +44,7 @@ if (!empty($user->socid))
|
||||
$result = restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype);
|
||||
|
||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||
$hookmanager->initHooks(array(
|
||||
'productstatssupplyorder'
|
||||
));
|
||||
$hookmanager->initHooks(array('productstatssupplyorder'));
|
||||
|
||||
$mesg = '';
|
||||
|
||||
|
||||
@ -549,7 +549,15 @@ if ($num)
|
||||
{
|
||||
print '<td'.($cssforfield ? ' class="'.$cssforfield.'"' : '').'>';
|
||||
if ($key == 'statut') print $warehouse->getLibStatut(5);
|
||||
else print $warehouse->showOutputField($val, $key, $warehouse->$key, '');
|
||||
if ($key == 'phone') {
|
||||
print dol_print_phone($obj->phone, '', 0, $obj->rowid, 'AC_TEL');
|
||||
}
|
||||
elseif ($key == 'fax') {
|
||||
print dol_print_phone($obj->fax, '', 0, $obj->rowid, 'AC_FAX');
|
||||
}
|
||||
else {
|
||||
print $warehouse->showOutputField($val, $key, $warehouse->$key, '');
|
||||
}
|
||||
print '</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
if (!empty($val['isameasure']))
|
||||
@ -593,7 +601,7 @@ if ($num)
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
|
||||
@ -470,7 +470,7 @@ if ($resql)
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Date creation
|
||||
|
||||
@ -1044,6 +1044,9 @@ class Project extends CommonObject
|
||||
if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips
|
||||
|
||||
$result = '';
|
||||
if (! empty($conf->global->PROJECT_OPEN_ALWAYS_ON_TAB)) {
|
||||
$option = $conf->global->PROJECT_OPEN_ALWAYS_ON_TAB;
|
||||
}
|
||||
|
||||
$label = '';
|
||||
if ($option != 'nolink') $label = '<u>'.$langs->trans("Project").'</u>';
|
||||
@ -1073,6 +1076,10 @@ class Project extends CommonObject
|
||||
{
|
||||
$url = DOL_URL_ROOT.'/projet/tasks.php?id='.$this->id;
|
||||
}
|
||||
elseif ($option == 'preview')
|
||||
{
|
||||
$url = DOL_URL_ROOT.'/projet/element.php?id='.$this->id;
|
||||
}
|
||||
else
|
||||
{
|
||||
$url = DOL_URL_ROOT.'/projet/card.php?id='.$this->id;
|
||||
|
||||
@ -919,7 +919,7 @@ while ($i < min($num, $limit))
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Date creation
|
||||
|
||||
@ -888,7 +888,7 @@ while ($i < min($num, $limit))
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Date creation
|
||||
|
||||
@ -1501,7 +1501,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0)
|
||||
*/
|
||||
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$task_time);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$task_time, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
|
||||
@ -235,7 +235,7 @@ if ($action == "view_ticketlist")
|
||||
if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
|
||||
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
|
||||
if ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate') {
|
||||
$arrayfields["ef.".$key] = array('label' => $extrafields->attributes[$object->table_element]['label'][$key], 'checked' => $extrafields->attributes[$object->table_element]['list'][$key], 'position' => $extrafields->attributes[$object->table_element]['pos'][$key], 'enabled' => $extrafields->attributes[$object->table_element]['perms'][$key]);
|
||||
$arrayfields["ef.".$key] = array('label' => $extrafields->attributes[$object->table_element]['label'][$key], 'checked' => ($extrafields->attributes[$object->table_element]['list'][$key] < 0) ? 0 : 1, 'position' => $extrafields->attributes[$object->table_element]['pos'][$key], 'enabled' =>(abs($extrafields->attributes[$object->table_element]['list'][$key]) != 3) && $extrafields->attributes[$object->table_element]['perms'][$key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -884,7 +884,7 @@ if ($resql)
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Date creation
|
||||
|
||||
@ -74,9 +74,10 @@ class FormResource
|
||||
* @param string $filterkey Filter on key value
|
||||
* @param int $outputmode 0=HTML select string, 1=Array, 2=without form tag
|
||||
* @param int $limit Limit number of answers
|
||||
* @param string $morecss More css
|
||||
* @return string HTML string with
|
||||
*/
|
||||
public function select_resource_list($selected = '', $htmlname = 'fk_resource', $filter = '', $showempty = 0, $showtype = 0, $forcecombo = 0, $event = array(), $filterkey = '', $outputmode = 0, $limit = 20)
|
||||
public function select_resource_list($selected = '', $htmlname = 'fk_resource', $filter = '', $showempty = 0, $showtype = 0, $forcecombo = 0, $event = array(), $filterkey = '', $outputmode = 0, $limit = 20, $morecss = '')
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $user, $langs;
|
||||
@ -100,10 +101,12 @@ class FormResource
|
||||
{
|
||||
//$minLength = (is_numeric($conf->global->RESOURCE_USE_SEARCH_TO_SELECT)?$conf->global->RESOURCE_USE_SEARCH_TO_SELECT:2);
|
||||
$out .= ajax_combobox($htmlname, $event, $conf->global->RESOURCE_USE_SEARCH_TO_SELECT);
|
||||
} else {
|
||||
$out .= ajax_combobox($htmlname);
|
||||
}
|
||||
|
||||
// Construct $out and $outarray
|
||||
$out .= '<select id="'.$htmlname.'" class="flat minwidth200" name="'.$htmlname.'">'."\n";
|
||||
$out .= '<select id="'.$htmlname.'" class="flat minwidth100'.($morecss ? ' '.$morecss : '').'" name="'.$htmlname.'">'."\n";
|
||||
if ($showempty) $out .= '<option value="-1"> </option>'."\n";
|
||||
|
||||
$num = 0;
|
||||
@ -136,7 +139,6 @@ class FormResource
|
||||
}
|
||||
}
|
||||
$out .= '</select>'."\n";
|
||||
$out .= ajax_combobox($htmlname);
|
||||
|
||||
if ($outputmode != 2)
|
||||
{
|
||||
|
||||
@ -1276,7 +1276,7 @@ while ($i < min($num, $limit))
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Date creation
|
||||
|
||||
@ -483,7 +483,7 @@ while ($i < min($num, $limit))
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $objectwebsiteaccount); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Action column
|
||||
|
||||
@ -878,7 +878,7 @@ if ($resql)
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Date creation
|
||||
|
||||
@ -591,6 +591,9 @@ div#moreinfo, div#infowarehouse {
|
||||
height: calc(45% - 100px);
|
||||
}
|
||||
|
||||
div#moreinfo, div#infowarehouse {
|
||||
padding: 0 5px 0 5px;
|
||||
}
|
||||
|
||||
div.div1 {
|
||||
padding-bottom: 0;
|
||||
|
||||
@ -32,5 +32,5 @@ $key = GETPOST('key');
|
||||
$urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));
|
||||
$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
|
||||
|
||||
$module = new modTcpdfbarcode($db);
|
||||
$module = new modTcpdfbarcode();
|
||||
$result = $module->buildBarCode($urlwithroot."/takepos/public/auto_order.php?key=".dol_encode($key), 'QRCODE', 'Y');
|
||||
|
||||
@ -756,8 +756,13 @@ if (empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) {
|
||||
<div class="header">
|
||||
<div class="topnav">
|
||||
<div class="topnav-left">
|
||||
<div class="inline-block valignmiddle"><a class="topnav-terminalhour" onclick="TerminalsDialog();">
|
||||
<?php echo $langs->trans("Terminal")." ";
|
||||
<div class="inline-block valignmiddle">
|
||||
<a class="topnav-terminalhour" onclick="TerminalsDialog();">
|
||||
<span class="fa fa-cash-register"></span>
|
||||
<span class="hideonsmartphone">
|
||||
<?php echo $langs->trans("Terminal"); ?>
|
||||
</span>
|
||||
<?php echo " ";
|
||||
if ($_SESSION["takeposterminal"] == "") echo "1";
|
||||
else echo $_SESSION["takeposterminal"];
|
||||
echo '<span class="hideonsmartphone"> - '.dol_print_date(dol_now(), "day").'</span>';
|
||||
|
||||
@ -748,7 +748,7 @@ $( document ).ready(function() {
|
||||
|
||||
$("#customerandsales").html('');
|
||||
|
||||
$("#customerandsales").append('<a class="valignmiddle tdoverflowmax100 minwidth100" id="customer" onclick="Customer();" title="<?php print dol_escape_js($s); ?>"><span class="fas fa-building paddingrightonly"></span><?php print dol_escape_js($s); ?></a>');
|
||||
$("#customerandsales").append('<a class="valignmiddle tdoverflowmax100 minwidth75" id="customer" onclick="Customer();" title="<?php print dol_escape_js($s); ?>"><span class="fas fa-building paddingrightonly"></span><?php print dol_escape_js($s); ?></a>');
|
||||
|
||||
<?php
|
||||
$sql = "SELECT rowid, datec, ref FROM ".MAIN_DB_PREFIX."facture";
|
||||
|
||||
@ -670,7 +670,9 @@ body[class*="colorblind-"] .text-success{
|
||||
.editfielda span.fa-pencil-alt:hover, .editfielda span.fa-trash:hover, .editfieldlang:hover {
|
||||
color: var(--colortexttitle) !important;
|
||||
}
|
||||
|
||||
.fawidth30 {
|
||||
width: 20px;
|
||||
}
|
||||
.floatnone {
|
||||
float: none !important;
|
||||
}
|
||||
@ -878,7 +880,7 @@ select.flat.selectlimit {
|
||||
max-width: 0;
|
||||
overflow: auto;
|
||||
}
|
||||
.divintdwithtwolinesmax {
|
||||
.divintowithtwolinesmax {
|
||||
width: 75px;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
@ -1024,9 +1026,11 @@ table[summary="list_of_modules"] .fa-cog {
|
||||
.clearboth { clear:both; }
|
||||
.hideobject { display: none; }
|
||||
.minwidth50 { min-width: 50px; }
|
||||
.minwidth75 { min-width: 75px; }
|
||||
/* rule for not too small screen only */
|
||||
@media only screen and (min-width: <?php echo empty($conf->global->THEME_ELDY_WITDHOFFSET_FOR_REDUC3) ? round($nbtopmenuentries * 47, 0) + 130 : $conf->global->THEME_ELDY_WITDHOFFSET_FOR_REDUC3; ?>px)
|
||||
{
|
||||
.width20 { width: 20px; }
|
||||
.width25 { width: 25px; }
|
||||
.width50 { width: 50px; }
|
||||
.width75 { width: 75px; }
|
||||
@ -1048,6 +1052,7 @@ table[summary="list_of_modules"] .fa-cog {
|
||||
.minwidth500imp { min-width: 500px !important; }
|
||||
}
|
||||
.widthauto { width: auto; }
|
||||
.width20 { width: 20px; }
|
||||
.width25 { width: 25px; }
|
||||
.width50 { width: 50px; }
|
||||
.width75 { width: 75px; }
|
||||
@ -1135,6 +1140,19 @@ table[summary="list_of_modules"] .fa-cog {
|
||||
|
||||
.hideonsmartphone { display: none; }
|
||||
.hideonsmartphoneimp { display: none !important; }
|
||||
|
||||
span.pictotitle {
|
||||
margin-<?php echo $left; ?>: 0 !important;
|
||||
}
|
||||
div.fiche>table.table-fiche-title {
|
||||
margin-top: 7px !important;
|
||||
margin-bottom: 15px !important;
|
||||
}
|
||||
|
||||
select.minwidth100imp, select.minwidth100, select.minwidth200, .widthcentpercentminusx {
|
||||
width: calc(100% - 30px) !important;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
/* Force values for small screen 570 */
|
||||
@ -1143,6 +1161,10 @@ table[summary="list_of_modules"] .fa-cog {
|
||||
body {
|
||||
font-size: <?php print is_numeric($fontsize) ? ($fontsize + 3).'px' : $fontsize; ?>;
|
||||
}
|
||||
|
||||
.box-flex-item {
|
||||
margin: 3px 2px 3px 2px !important;
|
||||
}
|
||||
div.refidno {
|
||||
font-size: <?php print is_numeric($fontsize) ? ($fontsize + 3).'px' : $fontsize; ?> !important;
|
||||
}
|
||||
@ -1470,10 +1492,10 @@ body.onlinepaymentbody div.fiche { /* For online payment page */
|
||||
margin: 20px !important;
|
||||
}
|
||||
div.fiche>table:first-child {
|
||||
margin-bottom: 15px !important;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
div.fiche>table.table-fiche-title {
|
||||
margin-bottom: 7px !important;
|
||||
margin-bottom: 7px;
|
||||
}
|
||||
div.fichecenter {
|
||||
width: 100%;
|
||||
@ -1589,7 +1611,7 @@ div.nopadding {
|
||||
}
|
||||
|
||||
td.nobordernopadding.widthpictotitle.col-picto {
|
||||
color: var(--colortexttitlenotab);
|
||||
color: #bbb;
|
||||
opacity: 0.85;
|
||||
}
|
||||
.table-list-of-attached-files .col-picto, .table-list-of-links .col-picto {
|
||||
@ -1605,12 +1627,6 @@ td.nobordernopadding.widthpictotitle.col-picto {
|
||||
margin-<?php echo $right; ?>: 8px;
|
||||
/* margin-bottom: 4px; */
|
||||
}
|
||||
@media only screen and (max-width: 767px)
|
||||
{
|
||||
span.pictotitle {
|
||||
margin-<?php echo $left; ?>: 0 !important;
|
||||
}
|
||||
}
|
||||
.pictoobjectwidth {
|
||||
width: 14px;
|
||||
}
|
||||
@ -1691,6 +1707,7 @@ div.statusref {
|
||||
margin-top: 8px;
|
||||
margin-bottom: 10px;
|
||||
clear: both;
|
||||
text-align: right;
|
||||
}
|
||||
div.statusref img {
|
||||
padding-left: 8px;
|
||||
@ -1734,7 +1751,7 @@ img.photorefnoborder {
|
||||
border-bottom: <?php echo $borderwidth ?>px solid rgb(<?php echo $colortopbordertitle1 ?>);
|
||||
/* border-bottom: 2px solid var(--colorbackhmenu1); */
|
||||
}
|
||||
.trextrafieldseparator td {
|
||||
.trextrafieldseparator td, .trextrafields_collapse_last td {
|
||||
/* border-bottom: 2px solid var(--colorbackhmenu1) !important; */
|
||||
border-bottom: 2px solid rgb(<?php echo $colortopbordertitle1 ?>) !important;
|
||||
}
|
||||
@ -1884,8 +1901,8 @@ div.tmenuleft
|
||||
}
|
||||
div.tmenucenter
|
||||
{
|
||||
padding-left: 0px;
|
||||
padding-right: 3px;
|
||||
padding-left: 2px;
|
||||
padding-right: 2px;
|
||||
<?php if ($disableimages) { ?>
|
||||
padding-top: 8px;
|
||||
height: 26px;
|
||||
@ -3585,6 +3602,12 @@ ul.noborder li:nth-child(even):not(.liste_titre) {
|
||||
|
||||
@media only screen and (max-width: 767px)
|
||||
{
|
||||
a.tmenu:link, a.tmenu:visited, a.tmenu:hover, a.tmenu:active {
|
||||
padding: 0px 0px 0px 0px;
|
||||
}
|
||||
a.tmenusel:link, a.tmenusel:visited, a.tmenusel:hover, a.tmenusel:active {
|
||||
padding: 0px 0px 0px 0px;
|
||||
}
|
||||
.boxstats, .boxstats130 {
|
||||
margin: 3px;
|
||||
}
|
||||
@ -3620,7 +3643,7 @@ ul.noborder li:nth-child(even):not(.liste_titre) {
|
||||
box-shadow: 0px 0px 8px 0px rgba(0,0,0,0.20);
|
||||
}
|
||||
span.boxstatstext {
|
||||
opacity: 0.7;
|
||||
opacity: 0.5;
|
||||
line-height: 18px;
|
||||
color: var(--colortext);
|
||||
}
|
||||
@ -4867,7 +4890,7 @@ ul.ecmjqft li {
|
||||
ul.ecmjqft a {
|
||||
line-height: 24px;
|
||||
vertical-align: middle;
|
||||
color: #333;
|
||||
color: unset;
|
||||
padding: 0px 0px;
|
||||
font-weight:normal;
|
||||
display: inline-block !important;
|
||||
@ -6309,7 +6332,9 @@ div.tabsElem a.tab {
|
||||
div.login_block_user, div.login_block_other { clear: both; }
|
||||
.atoplogin, .atoplogin:hover
|
||||
{
|
||||
color: #000 !important;
|
||||
color:unset !important;
|
||||
padding-left: 4px;
|
||||
padding-right: 4px;
|
||||
}
|
||||
.login_block_elem {
|
||||
padding: 0 !important;
|
||||
|
||||
@ -15,10 +15,11 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?>
|
||||
display: block;
|
||||
position: relative;
|
||||
min-height: 90px;
|
||||
background: #fff;
|
||||
/* background: #fff; */
|
||||
width: 100%;
|
||||
box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.2), 0px 0px 2px rgba(0, 0, 0, 0.1);
|
||||
border-radius: 2px;
|
||||
box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
|
||||
border-radius: 2px;
|
||||
border: 1px solid #eee;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.info-box.info-box-sm{
|
||||
@ -67,7 +68,7 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?>
|
||||
text-align: center;
|
||||
font-size: 45px;
|
||||
line-height: 90px;
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
background: rgba(0, 0, 0, 0.08) !important
|
||||
}
|
||||
.info-box-sm .info-box-icon {
|
||||
height: 80px;
|
||||
@ -203,8 +204,6 @@ if (GETPOSTISSET('THEME_AGRESSIVENESS_RATIO')) $conf->global->THEME_AGRESSIVENES
|
||||
.info-box-icon {
|
||||
<?php if ($prefix) { ?>
|
||||
color: #fff !important;
|
||||
<?php } else { ?>
|
||||
background-color: #eee !important;
|
||||
<?php } ?>
|
||||
opacity: 0.95;
|
||||
}
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
font-style: normal;
|
||||
font-variant: normal;
|
||||
text-rendering: auto;
|
||||
line-height: 26px;
|
||||
line-height: 23px;
|
||||
font-size: <?php echo $topMenuFontSize; ?>;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
text-align:center;
|
||||
|
||||
57
htdocs/theme/md/manifest.json.php
Normal file
57
htdocs/theme/md/manifest.json.php
Normal file
@ -0,0 +1,57 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2007-2017 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FI8TNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/theme/md/manifest.json.php
|
||||
* \brief File for The Web App
|
||||
*/
|
||||
|
||||
if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1');
|
||||
if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1');
|
||||
if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1');
|
||||
if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1');
|
||||
if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1');
|
||||
if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1');
|
||||
if (! defined('NOLOGIN')) define('NOLOGIN', '1');
|
||||
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1');
|
||||
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1');
|
||||
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1');
|
||||
|
||||
require_once __DIR__.'/../../main.inc.php';
|
||||
|
||||
$appli=constant('DOL_APPLICATION_TITLE');
|
||||
if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $appli=$conf->global->MAIN_APPLICATION_TITLE;
|
||||
|
||||
?>
|
||||
{
|
||||
"name": "<?php echo $appli; ?>",
|
||||
"icons": [
|
||||
{
|
||||
"src": "<?php echo DOL_URL_ROOT.'/theme/dolibarr_logo_256x256.png'; ?>",
|
||||
"sizes": "256x256",
|
||||
"type": "image/png"
|
||||
}
|
||||
],
|
||||
"theme_color": "#ffffff",
|
||||
"background_color": "#ffffff",
|
||||
"display": "standalone"
|
||||
}
|
||||
@ -983,7 +983,7 @@ select.flat.selectlimit {
|
||||
max-width: 0;
|
||||
overflow: auto;
|
||||
}
|
||||
.divintdwithtwolinesmax {
|
||||
.divintodwithtwolinesmax {
|
||||
width: 75px;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
@ -1119,9 +1119,11 @@ table[summary="list_of_modules"] .fa-cog {
|
||||
.clearboth { clear:both; }
|
||||
.hideobject { display: none; }
|
||||
.minwidth50 { min-width: 50px; }
|
||||
.minwidth75 { min-width: 75px; }
|
||||
/* rule for not too small screen only */
|
||||
@media only screen and (min-width: <?php echo round($nbtopmenuentries * $fontsize * 3.4, 0) + 7; ?>px)
|
||||
{
|
||||
.width20 { width: 20px; }
|
||||
.width25 { width: 25px; }
|
||||
.width50 { width: 50px; }
|
||||
.width75 { width: 75px; }
|
||||
@ -1143,6 +1145,7 @@ table[summary="list_of_modules"] .fa-cog {
|
||||
.minwidth500imp { min-width: 500px !important; }
|
||||
}
|
||||
.widthauto { width: auto; }
|
||||
.width20 { width: 20px; }
|
||||
.width25 { width: 25px; }
|
||||
.width50 { width: 50px; }
|
||||
.width75 { width: 75px; }
|
||||
@ -1796,7 +1799,7 @@ img.photorefnoborder {
|
||||
border-bottom: <?php echo $borderwidth ?>px solid rgb(<?php echo $colortopbordertitle1 ?>);
|
||||
}
|
||||
|
||||
.trextrafieldseparator td {
|
||||
.trextrafieldseparator td, .trextrafields_collapse_last td {
|
||||
border-bottom: 1px solid rgb(<?php echo $colortopbordertitle1 ?>) !important;
|
||||
}
|
||||
.tdhrthin {
|
||||
|
||||
@ -679,7 +679,7 @@ while ($i < min($num, $limit))
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Action column
|
||||
|
||||
@ -653,7 +653,7 @@ while ($i < min($num, $limit))
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Date creation
|
||||
|
||||
@ -153,8 +153,8 @@ $server->wsdl->addComplexType(
|
||||
'sequence',
|
||||
'',
|
||||
array(
|
||||
'code' => array('name'=>'code', 'type'=>'xsd:string'),
|
||||
'libelle' => array('name'=>'libelle', 'type'=>'xsd:string')
|
||||
'code' => array('name'=>'code', 'type'=>'xsd:string'),
|
||||
'libelle' => array('name'=>'libelle', 'type'=>'xsd:string')
|
||||
)
|
||||
);
|
||||
|
||||
@ -164,7 +164,7 @@ $server->wsdl->addComplexType(
|
||||
'array',
|
||||
'sequence',
|
||||
'',
|
||||
array(
|
||||
array(
|
||||
'actioncommtype' => array(
|
||||
'name' => 'actioncommtype',
|
||||
'type' => 'tns:actioncommtype',
|
||||
|
||||
@ -519,7 +519,7 @@ while ($i < min($num, $limit)) {
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Action column
|
||||
|
||||
@ -227,11 +227,13 @@ if (is_array($qualifiedjobs) && (count($qualifiedjobs) > 0)) {
|
||||
echo "You can also enable module Log if not yet enabled, run again and take a look into dolibarr.log file\n";
|
||||
dol_syslog("cron_run_jobs.php::run_jobs Error ".$cronjob->error, LOG_ERR);
|
||||
$nbofjobslaunchedko++;
|
||||
$resultstring = 'KO';
|
||||
} else {
|
||||
$nbofjobslaunchedok++;
|
||||
$resultstring = 'OK';
|
||||
}
|
||||
|
||||
echo " - result of run_jobs = ".$result;
|
||||
echo " - run_jobs ".$resultstring." result = ".$result;
|
||||
|
||||
// We re-program the next execution and stores the last execution time for this job
|
||||
$result = $cronjob->reprogram_jobs($userlogin, $now);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user