mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 09:38:23 +01:00
Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/accountancy/bookkeeping/balance.php htdocs/accountancy/bookkeeping/list.php htdocs/accountancy/bookkeeping/listbyaccount.php htdocs/accountancy/bookkeeping/listbysubaccount.php
This commit is contained in:
3
build/debian/source/options
Normal file
3
build/debian/source/options
Normal file
@@ -0,0 +1,3 @@
|
||||
# Use bzip2 instead of gzip
|
||||
compression = "bzip2"
|
||||
compression-level = 9
|
||||
@@ -239,10 +239,17 @@ if ($action != 'export_csv') {
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
|
||||
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('addMoreActionsButtonsList', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
if ($reshook < 0) {
|
||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
}
|
||||
|
||||
$button = empty($hookmanager->resPrint) ? '' : $hookmanager->resPrint;
|
||||
|
||||
if (empty($reshook)) {
|
||||
$button = '<input type="button" id="exportcsvbutton" name="exportcsvbutton" class="butAction" value="'.$langs->trans("Export").' ('.$conf->global->ACCOUNTING_EXPORT_FORMAT.')" />';
|
||||
$button .= '<input type="button" id="exportcsvbutton" name="exportcsvbutton" class="butAction" value="'.$langs->trans("Export").' ('.$conf->global->ACCOUNTING_EXPORT_FORMAT.')" />';
|
||||
|
||||
print '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
|
||||
@@ -944,12 +944,18 @@ if (count($filter)) {
|
||||
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('addMoreActionsButtonsList', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
if ($reshook < 0) {
|
||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
}
|
||||
|
||||
$newcardbutton = empty($hookmanager->resPrint) ? '' : $hookmanager->resPrint;
|
||||
|
||||
if (empty($reshook)) {
|
||||
// Button re-export
|
||||
if (!empty($conf->global->ACCOUNTING_REEXPORT)) {
|
||||
$newcardbutton = '<a class="valignmiddle" href="'.$_SERVER['PHP_SELF'].'?action=setreexport&token='.newToken().'&value=0'.($param ? '&'.$param : '').'">'.img_picto($langs->trans("Activated"), 'switch_on').'</a> ';
|
||||
$newcardbutton .= '<a class="valignmiddle" href="'.$_SERVER['PHP_SELF'].'?action=setreexport&token='.newToken().'&value=0'.($param ? '&'.$param : '').'">'.img_picto($langs->trans("Activated"), 'switch_on').'</a> ';
|
||||
} else {
|
||||
$newcardbutton = '<a class="valignmiddle" href="'.$_SERVER['PHP_SELF'].'?action=setreexport&token='.newToken().'&value=1'.($param ? '&'.$param : '').'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a> ';
|
||||
$newcardbutton .= '<a class="valignmiddle" href="'.$_SERVER['PHP_SELF'].'?action=setreexport&token='.newToken().'&value=1'.($param ? '&'.$param : '').'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a> ';
|
||||
}
|
||||
$newcardbutton .= '<span class="valignmiddle marginrightonly">'.$langs->trans("IncludeDocsAlreadyExported").'</span>';
|
||||
|
||||
|
||||
@@ -644,6 +644,12 @@ print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('addMoreActionsButtonsList', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
if ($reshook < 0) {
|
||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
}
|
||||
|
||||
$newcardbutton = empty($hookmanager->resPrint) ? '' : $hookmanager->resPrint;
|
||||
|
||||
if (empty($reshook)) {
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('ViewFlatList'), '', 'fa fa-list paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?'.$param);
|
||||
if ($type == 'sub') {
|
||||
|
||||
@@ -2375,7 +2375,7 @@ class Adherent extends CommonObject
|
||||
$labelStatus = $langs->trans("MemberStatusDraft");
|
||||
$labelStatusShort = $langs->trans("MemberStatusDraftShort");
|
||||
} elseif ($status >= self::STATUS_VALIDATED) {
|
||||
if ($need_subscription == 0) {
|
||||
if ($need_subscription === 0) {
|
||||
$statusType = 'status4';
|
||||
$labelStatus = $langs->trans("MemberStatusNoSubscription");
|
||||
$labelStatusShort = $langs->trans("MemberStatusNoSubscriptionShort");
|
||||
@@ -3136,7 +3136,8 @@ class Adherent extends CommonObject
|
||||
if ($listofids) {
|
||||
$listofids .= ']';
|
||||
}
|
||||
$this->output .= ' ids='.$listofids;
|
||||
|
||||
$this->output .= ($listofids ? ' ids='.$listofids : '');
|
||||
}
|
||||
if ($nbko) {
|
||||
$this->output .= ' - Canceled for '.$nbko.' member (no email or email sending error)';
|
||||
@@ -3159,7 +3160,7 @@ class Adherent extends CommonObject
|
||||
if ($listofids) {
|
||||
$listofids .= ']';
|
||||
}
|
||||
$this->output .= $listofids;
|
||||
$this->output .= ($listofids ? ' ids='.$listofids : '');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ if ($sortfield == "") {
|
||||
$sortfield = "pl.fk_soc";
|
||||
}
|
||||
|
||||
$type = $object->type;
|
||||
|
||||
if ($type == 'bank-transfer') {
|
||||
$result = restrictedArea($user, 'paymentbybanktransfer', '', '', '');
|
||||
} else {
|
||||
|
||||
@@ -375,7 +375,7 @@ class FormProjets
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php';
|
||||
$comboenhancement = ajax_combobox($htmlname, '', 0, $forcefocus);
|
||||
$out .= $comboenhancement;
|
||||
$morecss = 'minwidth200 maxwidth500';
|
||||
$morecss .= ' minwidth200 maxwidth500';
|
||||
}
|
||||
|
||||
if (empty($option_only)) {
|
||||
|
||||
@@ -7610,7 +7610,11 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
||||
$substitutionarray['__REF_SUPPLIER__'] = (isset($object->ref_supplier) ? $object->ref_supplier : null);
|
||||
$substitutionarray['__NOTE_PUBLIC__'] = (isset($object->note_public) ? $object->note_public : null);
|
||||
$substitutionarray['__NOTE_PRIVATE__'] = (isset($object->note_private) ? $object->note_private : null);
|
||||
$substitutionarray['__DATE_DELIVERY__'] = (isset($object->date_livraison) ? dol_print_date($object->date_livraison, 'day', 0, $outputlangs) : '');
|
||||
if ($object->element == "shipping") {
|
||||
$substitutionarray['__DATE_DELIVERY__'] = (isset($object->date_delivery) ? dol_print_date($object->date_delivery, 'day', 0, $outputlangs) : '');
|
||||
} else {
|
||||
$substitutionarray['__DATE_DELIVERY__'] = (isset($object->date_livraison) ? dol_print_date($object->date_livraison, 'day', 0, $outputlangs) : '');
|
||||
}
|
||||
$substitutionarray['__DATE_DELIVERY_DAY__'] = (isset($object->date_livraison) ? dol_print_date($object->date_livraison, "%d") : '');
|
||||
$substitutionarray['__DATE_DELIVERY_DAY_TEXT__'] = (isset($object->date_livraison) ? dol_print_date($object->date_livraison, "%A") : '');
|
||||
$substitutionarray['__DATE_DELIVERY_MON__'] = (isset($object->date_livraison) ? dol_print_date($object->date_livraison, "%m") : '');
|
||||
|
||||
@@ -1215,7 +1215,7 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $
|
||||
} elseif ($yearlen == 2) {
|
||||
$yearcomp = sprintf("%02d", date("y", $date) + $yearoffset);
|
||||
} elseif ($yearlen == 1) {
|
||||
$yearcomp = substr(date("y", $date), 2, 1) + $yearoffset;
|
||||
$yearcomp = substr(date('y', $date), 1, 1) + $yearoffset;
|
||||
}
|
||||
if ($monthcomp > 1 && empty($resetEveryMonth)) { // Test with month is useless if monthcomp = 0 or 1 (0 is same as 1) (regis: $monthcomp can't equal 0)
|
||||
if ($yearlen == 4) {
|
||||
|
||||
@@ -142,26 +142,18 @@ if ($result < 0) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$qualifiedjobs = array();
|
||||
foreach ($object->lines as $val) {
|
||||
if (!verifCond($val->test)) {
|
||||
continue;
|
||||
}
|
||||
$qualifiedjobs[] = $val;
|
||||
}
|
||||
|
||||
// TODO Duplicate code. This sequence of code must be shared with code into cron_run_jobs.php script.
|
||||
|
||||
// current date
|
||||
$nbofjobs = count($qualifiedjobs);
|
||||
$nbofjobs = count($object->lines);
|
||||
$nbofjobslaunchedok = 0;
|
||||
$nbofjobslaunchedko = 0;
|
||||
|
||||
if (is_array($qualifiedjobs) && (count($qualifiedjobs) > 0)) {
|
||||
if (is_array($object->lines) && (count($object->lines) > 0)) {
|
||||
$savconf = dol_clone($conf);
|
||||
|
||||
// Loop over job
|
||||
foreach ($qualifiedjobs as $line) {
|
||||
foreach ($object->lines as $line) {
|
||||
dol_syslog("cron_run_jobs.php cronjobid: ".$line->id." priority=".$line->priority." entity=".$line->entity." label=".$line->label, LOG_DEBUG);
|
||||
echo "cron_run_jobs.php cronjobid: ".$line->id." priority=".$line->priority." entity=".$line->entity." label=".$line->label;
|
||||
|
||||
@@ -191,6 +183,10 @@ if (is_array($qualifiedjobs) && (count($qualifiedjobs) > 0)) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!verifCond($line->test)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//If date_next_jobs is less of current date, execute the program, and store the execution time of the next execution in database
|
||||
if (($line->datenextrun < $now) && (empty($line->datestart) || $line->datestart <= $now) && (empty($line->dateend) || $line->dateend >= $now)) {
|
||||
echo " - qualified";
|
||||
|
||||
@@ -243,7 +243,7 @@ class CompanyBankAccount extends Account
|
||||
if ($id) {
|
||||
$sql .= " WHERE rowid = ".((int) $id);
|
||||
}
|
||||
if ($socid) {
|
||||
elseif ($socid) {
|
||||
$sql .= " WHERE fk_soc = ".((int) $socid);
|
||||
if ($default > -1) {
|
||||
$sql .= " AND default_rib = ".((int) $default);
|
||||
|
||||
@@ -189,25 +189,17 @@ if ($result < 0) {
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
$qualifiedjobs = array();
|
||||
foreach ($object->lines as $val) {
|
||||
if (!verifCond($val->test)) {
|
||||
continue;
|
||||
}
|
||||
$qualifiedjobs[] = $val;
|
||||
}
|
||||
|
||||
// TODO Duplicate code. This sequence of code must be shared with code into public/cron/cron_run_jobs.php php page.
|
||||
|
||||
$nbofjobs = count($qualifiedjobs);
|
||||
$nbofjobs = count($object->lines);
|
||||
$nbofjobslaunchedok = 0;
|
||||
$nbofjobslaunchedko = 0;
|
||||
|
||||
if (is_array($qualifiedjobs) && (count($qualifiedjobs) > 0)) {
|
||||
if (is_array($object->lines) && (count($object->lines) > 0)) {
|
||||
$savconf = dol_clone($conf);
|
||||
|
||||
// Loop over job
|
||||
foreach ($qualifiedjobs as $line) {
|
||||
foreach ($object->lines as $line) {
|
||||
dol_syslog("cron_run_jobs.php cronjobid: ".$line->id." priority=".$line->priority." entity=".$line->entity." label=".$line->label, LOG_DEBUG);
|
||||
echo "cron_run_jobs.php cronjobid: ".$line->id." priority=".$line->priority." entity=".$line->entity." label=".$line->label;
|
||||
|
||||
@@ -249,6 +241,10 @@ if (is_array($qualifiedjobs) && (count($qualifiedjobs) > 0)) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!verifCond($line->test)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//If date_next_jobs is less of current date, execute the program, and store the execution time of the next execution in database
|
||||
if ($forcequalified || (($line->datenextrun < $now) && (empty($line->datestart) || $line->datestart <= $now) && (empty($line->dateend) || $line->dateend >= $now))) {
|
||||
echo " - qualified";
|
||||
|
||||
Reference in New Issue
Block a user