Merge branch 'PSdevelop' of https://github.com/pstructures/dolibarr-core into PSdevelop
This commit is contained in:
commit
50e3822465
36
ChangeLog
36
ChangeLog
@ -14,6 +14,42 @@ Following changes may create regressions for some external modules, but were nec
|
||||
|
||||
|
||||
|
||||
***** ChangeLog for 12.0.1 compared to 12.0.0 *****
|
||||
FIX: reposition was broken if url end with #anchor
|
||||
FIX: $_POST must be GETPOST
|
||||
FIX: 10.0 - fatal with postgreSQL
|
||||
FIX: #14109
|
||||
FIX: #14112
|
||||
FIX: #14142
|
||||
FIX: all extrafields cleared after update of one of them
|
||||
FIX: Avoid warning when creating a module with already existing files
|
||||
FIX: change selected fields on company card
|
||||
FIX: Correct ModuleBuilder left menu
|
||||
FIX: create a deposit with amount using comma didn't work
|
||||
FIX: CSS
|
||||
FIX: Entry from stripe intent were reported into SEPA payments
|
||||
FIX: Filter on status, closing opening status
|
||||
FIX: html lost on html extrafield
|
||||
FIX: Label of popup on thirdparty
|
||||
FIX: missing possibility to change entity when propal cloning
|
||||
FIX: missing setup of extrafields for MO
|
||||
FIX: Missing the tooltip when creating bank account
|
||||
FIX: Missing token
|
||||
FIX: non numeric value on comm/card.php
|
||||
FIX: SQL Problem in customer invoice list
|
||||
FIX: SQL Problem in social contribution list
|
||||
FIX: SQL Problem in supplier invoice list
|
||||
FIX: SQL syntax error when editing extrafields
|
||||
FIX: Sql type
|
||||
FIX: takepos 12 hook
|
||||
FIX: Update form erased extrafields that were hidden
|
||||
FIX: Update of extrafields date
|
||||
FIX: Update of extrafiels on draft object
|
||||
FIX: upload documents into manual ECM was reported a permission error
|
||||
FIX: Use of office365 TLS with SMTPs method.
|
||||
FIX: wrong origin
|
||||
FIX: Permission error during import
|
||||
|
||||
***** ChangeLog for 12.0.0 compared to 11.0.0 *****
|
||||
For users:
|
||||
|
||||
|
||||
@ -254,6 +254,8 @@ if ($result) {
|
||||
} else {
|
||||
$tabpay[$obj->rowid]["lib"] = dol_trunc($obj->label, 60);
|
||||
}
|
||||
|
||||
// Load of url links to the line into llx_bank
|
||||
$links = $object->get_url($obj->rowid); // Get an array('url'=>, 'url_id'=>, 'label'=>, 'type'=> 'fk_bank'=> )
|
||||
|
||||
//var_dump($i);
|
||||
@ -319,6 +321,7 @@ if ($result) {
|
||||
$chargestatic->ref = $links[$key]['url_id'];
|
||||
|
||||
$tabpay[$obj->rowid]["lib"] .= ' '.$chargestatic->getNomUrl(2);
|
||||
$reg = array();
|
||||
if (preg_match('/^\((.*)\)$/i', $links[$key]['label'], $reg)) {
|
||||
if ($reg[1] == 'socialcontribution')
|
||||
$reg[1] = 'SocialContribution';
|
||||
@ -330,11 +333,13 @@ if ($result) {
|
||||
$tabpay[$obj->rowid]["soclib"] = $chargestatic->getNomUrl(1, 30);
|
||||
$tabpay[$obj->rowid]["paymentscid"] = $chargestatic->id;
|
||||
|
||||
// Retreive the accounting code of the social contribution of the payment from link of payment.
|
||||
// Note: We have the social contribution id, it can be faster to get accounting code from social contribution id.
|
||||
$sqlmid = 'SELECT cchgsoc.accountancy_code';
|
||||
$sqlmid .= " FROM ".MAIN_DB_PREFIX."c_chargesociales cchgsoc ";
|
||||
$sqlmid .= " FROM ".MAIN_DB_PREFIX."c_chargesociales cchgsoc";
|
||||
$sqlmid .= " INNER JOIN ".MAIN_DB_PREFIX."chargesociales as chgsoc ON chgsoc.fk_type=cchgsoc.id";
|
||||
$sqlmid .= " INNER JOIN ".MAIN_DB_PREFIX."paiementcharge as paycharg ON paycharg.fk_charge=chgsoc.rowid";
|
||||
$sqlmid .= " INNER JOIN ".MAIN_DB_PREFIX."bank_url as bkurl ON bkurl.url_id=paycharg.rowid";
|
||||
$sqlmid .= " INNER JOIN ".MAIN_DB_PREFIX."bank_url as bkurl ON bkurl.url_id=paycharg.rowid AND bkurl.type = 'payment_sc'";
|
||||
$sqlmid .= " WHERE bkurl.fk_bank=".$obj->rowid;
|
||||
|
||||
dol_syslog("accountancy/journal/bankjournal.php:: sqlmid=".$sqlmid, LOG_DEBUG);
|
||||
|
||||
@ -401,8 +401,8 @@ if ($result) {
|
||||
|
||||
// Ref product
|
||||
print '<td class="tdoverflowmax100">';
|
||||
if ($product_static->id > 0) print $product_static->getNomUrl(1);
|
||||
if ($product_static->id > 0 && $objp->product_label) print '<br>';
|
||||
if ($productstatic->id > 0) print $productstatic->getNomUrl(1);
|
||||
if ($productstatic->id > 0 && $objp->product_label) print '<br>';
|
||||
if ($objp->product_label) print '<span class="opacitymedium">'.$objp->product_label.'</span>';
|
||||
print '</td>';
|
||||
|
||||
|
||||
@ -460,8 +460,9 @@ asort($orders);
|
||||
//var_dump($modules);
|
||||
|
||||
$nbofactivatedmodules = count($conf->modules);
|
||||
$moreinfo = $langs->trans("TotalNumberOfActivatedModules", ($nbofactivatedmodules - 1), count($modules));
|
||||
if ($nbofactivatedmodules <= 1) $moreinfo .= ' '.img_warning($langs->trans("YouMustEnableOneModule"));
|
||||
$moreinfo = $langs->trans("TitleNumberOfActivatedModules");
|
||||
$moreinfo2 = ($nbofactivatedmodules - 1)." / ".count($modules);
|
||||
if ($nbofactivatedmodules <= 1) $moreinfo2 .= ' '.img_warning($langs->trans("YouMustEnableOneModule"));
|
||||
|
||||
print load_fiche_titre($langs->trans("ModulesSetup"), '', 'title_setup');
|
||||
|
||||
@ -524,12 +525,12 @@ if ($mode == 'common' || $mode == 'commonkanban')
|
||||
$moreforfilter .= '</div>';
|
||||
$moreforfilter .= '</div>';
|
||||
|
||||
$moreforfilter .= '<div class="floatright right">';
|
||||
$moreforfilter .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list paddingleft imgforviewmode', $_SERVER["PHP_SELF"].'?mode=commonkanban'.$param, '', 1, array('morecss'=>'reposition'.($mode == 'common' ? '' : ' btnTitleSelected')));
|
||||
$moreforfilter .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-list-alt paddingleft imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.$param, '', 1, array('morecss'=>'reposition'.($mode == 'commonkanban' ? '' : ' btnTitleSelected')));
|
||||
$moreforfilter .= '</div>';
|
||||
$moreforfilter .= '<div class="floatright right pagination"><ul><li>';
|
||||
$moreforfilter .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=commonkanban'.$param, '', 1, array('morecss'=>'reposition'.($mode == 'common' ? '' : ' btnTitleSelected')));
|
||||
$moreforfilter .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-list-alt imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.$param, '', 1, array('morecss'=>'reposition'.($mode == 'commonkanban' ? '' : ' btnTitleSelected')));
|
||||
$moreforfilter .= '</li></ul></div>';
|
||||
|
||||
$moreforfilter .= '<div class="floatright right margintoponly marginrightonly" style="padding-top: 3px">'.$moreinfo.'</div>';
|
||||
$moreforfilter .= '<div class="floatright center marginrightonly hideonsmartphone" style="padding-top: 3px"><span class="">'.$moreinfo.'</span><br><b class="largenumber">'.$moreinfo2.'</b></div>';
|
||||
|
||||
$moreforfilter .= '</div>';
|
||||
|
||||
|
||||
@ -69,7 +69,7 @@ print '<td class="linecoldisablestockchange right">'.$form->textwithpicto($langs
|
||||
print '<td class="linecolefficiency right">'.$form->textwithpicto($langs->trans('ManufacturingEfficiency'), $langs->trans('ValueOfMeansLoss')).'</td>';
|
||||
|
||||
// Cost
|
||||
print '<td class="linecolcost right">'.$langs->trans('CostPrice').'</td>';
|
||||
print '<td class="linecolcost right">'.$form->textwithpicto($langs->trans("TotalCost"), $langs->trans("BOMTotalCost")).'</td>';
|
||||
|
||||
print '<td class="linecoledit"></td>'; // No width to allow autodim
|
||||
|
||||
|
||||
@ -113,7 +113,7 @@ if ($this->status == 0 && ($object_rights->write) && $action != 'selectlines') {
|
||||
$coldisplay++;
|
||||
if (($line->info_bits & 2) == 2 || !empty($disableedit)) {
|
||||
} else {
|
||||
print '<a class="editfielda reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$this->id.'&action=editline&lineid='.$line->id.'#line_'.$line->id.'">'.img_edit().'</a>';
|
||||
print '<a class="editfielda reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$this->id.'&action=editline&lineid='.$line->id.'">'.img_edit().'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@ -111,6 +111,7 @@ $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');
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
@ -310,7 +311,7 @@ if (empty($reshook) && $action == 'add')
|
||||
if (GETPOST("doneby") > 0) $object->userdoneid = GETPOST("doneby", "int");
|
||||
}
|
||||
|
||||
$object->note_private = trim(GETPOST("note"));
|
||||
$object->note_private = trim(GETPOST("note", "none"));
|
||||
|
||||
if (isset($_POST["contactid"])) $object->contact = $contact;
|
||||
|
||||
@ -451,7 +452,7 @@ if (empty($reshook) && $action == 'update')
|
||||
$object->contact_id = key($object->socpeopleassigned);
|
||||
}
|
||||
$object->fk_project = GETPOST("projectid", 'int');
|
||||
$object->note_private = GETPOST("note", "none");
|
||||
$object->note_private = trim(GETPOST("note", "none"));
|
||||
$object->fk_element = GETPOST("fk_element", "int");
|
||||
$object->elementtype = GETPOST("elementtype", "alphanohtml");
|
||||
|
||||
@ -1028,14 +1029,13 @@ if ($action == 'create')
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled))
|
||||
{
|
||||
// Projet associe
|
||||
$langs->load("projects");
|
||||
|
||||
$projectid = GETPOST('projectid', 'int');
|
||||
|
||||
print '<tr><td class="titlefieldcreate">'.$langs->trans("Project").'</td><td id="project-input-container" >';
|
||||
|
||||
$numproject = $formproject->select_projects((!empty($societe->id) ? $societe->id : -1), $projectid, 'projectid', 0, 0, 1, 1);
|
||||
$numproject = $formproject->select_projects((!empty($societe->id) ? $societe->id : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 0, 0, 'maxwidth500');
|
||||
|
||||
print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$societe->id.'&action=create"><span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddProject").'"></span></a>';
|
||||
$urloption = '?action=create&donotclearsession=1';
|
||||
@ -1090,7 +1090,7 @@ if ($action == 'create')
|
||||
// Description
|
||||
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td><td>';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor = new DolEditor('note', (GETPOST('note', 'none') ?GETPOST('note', 'none') : $object->note_private), '', 180, 'dolibarr_notes', 'In', true, true, $conf->fckeditor->enabled, ROWS_4, '90%');
|
||||
$doleditor = new DolEditor('note', (GETPOST('note', 'none') ? GETPOST('note', 'none') : $object->note_private), '', 180, 'dolibarr_notes', 'In', true, true, $conf->fckeditor->enabled, ROWS_4, '90%');
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
|
||||
@ -1541,7 +1541,7 @@ if ($id > 0)
|
||||
$linkback = '';
|
||||
// Link to other agenda views
|
||||
$linkback .= img_picto($langs->trans("BackToList"), 'object_list-alt', 'class="hideonsmartphone pictoactionview"');
|
||||
$linkback .= '<a href="'.DOL_URL_ROOT.'/comm/action/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||
$linkback .= '<a href="'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||
$linkback .= '</li>';
|
||||
$linkback .= '<li class="noborder litext">';
|
||||
$linkback .= img_picto($langs->trans("ViewCal"), 'object_calendar', 'class="hideonsmartphone pictoactionview"');
|
||||
|
||||
@ -1207,8 +1207,8 @@ class ActionComm extends CommonObject
|
||||
$response->warning_delay = $conf->agenda->warning_delay / 60 / 60 / 24;
|
||||
$response->label = $langs->trans("ActionsToDo");
|
||||
$response->labelShort = $langs->trans("ActionsToDoShort");
|
||||
$response->url = DOL_URL_ROOT.'/comm/action/list.php?actioncode=0&status=todo&mainmenu=agenda';
|
||||
if ($user->rights->agenda->allactions->read) $response->url .= '&filtert=-1';
|
||||
$response->url = DOL_URL_ROOT.'/comm/action/list.php?action=show_list&actioncode=0&status=todo&mainmenu=agenda';
|
||||
if ($user->rights->agenda->allactions->read) $response->url .= '&filtert=-1';
|
||||
$response->img = img_object('', "action", 'class="inline-block valigntextmiddle"');
|
||||
}
|
||||
// This assignment in condition is not a bug. It allows walking the results.
|
||||
|
||||
@ -123,7 +123,7 @@ if ($object->id > 0)
|
||||
dol_fiche_head($head, 'documents', $langs->trans("Action"), -1, 'action');
|
||||
|
||||
$linkback = img_picto($langs->trans("BackToList"), 'object_list', 'class="hideonsmartphone pictoactionview"');
|
||||
$linkback .= '<a href="'.DOL_URL_ROOT.'/comm/action/list.php">'.$langs->trans("BackToList").'</a>';
|
||||
$linkback .= '<a href="'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
// Link to other agenda views
|
||||
$out = '';
|
||||
|
||||
@ -150,6 +150,7 @@ if (GETPOST("viewlist", 'alpha') || $action == 'show_list')
|
||||
$param .= '&'.$key.'='.urlencode($val);
|
||||
}
|
||||
}
|
||||
if (! preg_match('/action=/', $param)) $param .= ($param ? '&' : '').'action=show_list';
|
||||
//print $param;
|
||||
header("Location: ".DOL_URL_ROOT.'/comm/action/list.php?'.$param);
|
||||
exit;
|
||||
@ -329,9 +330,10 @@ if ($action == 'show_day')
|
||||
//print dol_print_date($firstdaytoshow,'day');
|
||||
//print dol_print_date($lastdaytoshow,'day');
|
||||
|
||||
$title = $langs->trans("DoneAndToDoActions");
|
||||
/*$title = $langs->trans("DoneAndToDoActions");
|
||||
if ($status == 'done') $title = $langs->trans("DoneActions");
|
||||
if ($status == 'todo') $title = $langs->trans("ToDoActions");
|
||||
*/
|
||||
|
||||
$param = '';
|
||||
if ($actioncode || isset($_GET['search_actioncode']) || isset($_POST['search_actioncode'])) {
|
||||
@ -340,7 +342,7 @@ if ($actioncode || isset($_GET['search_actioncode']) || isset($_POST['search_act
|
||||
} else $param .= "&search_actioncode=".urlencode($actioncode);
|
||||
}
|
||||
if ($resourceid > 0) $param .= "&search_resourceid=".urlencode($resourceid);
|
||||
if ($status || isset($_GET['status']) || isset($_POST['status'])) $param .= "&search_status=".urlencode($status);
|
||||
if ($status || GETPOSTISSET('status')) $param .= "&search_status=".urlencode($status);
|
||||
if ($filter) $param .= "&search_filter=".urlencode($filter);
|
||||
if ($filtert) $param .= "&search_filtert=".urlencode($filtert);
|
||||
if ($usergroup) $param .= "&search_usergroup=".urlencode($usergroup);
|
||||
@ -358,7 +360,7 @@ if (empty($action) || $action == 'show_month')
|
||||
$nav .= " <span id=\"month_name\">".dol_print_date(dol_mktime(0, 0, 0, $month, 1, $year), "%b %Y");
|
||||
$nav .= " </span>\n";
|
||||
$nav .= " <a href=\"?year=".$next_year."&month=".$next_month.$param."\"><i class=\"fa fa-chevron-right\"></i></a>\n";
|
||||
$nav .= " (<a href=\"?year=".$nowyear."&month=".$nowmonth.$param."\">".$langs->trans("Today")."</a>)";
|
||||
$nav .= " <a href=\"?year=".$nowyear."&month=".$nowmonth.$param."\">".$langs->trans("Today")."</a> ";
|
||||
$picto = 'calendar';
|
||||
}
|
||||
if ($action == 'show_week')
|
||||
@ -367,7 +369,7 @@ if ($action == 'show_week')
|
||||
$nav .= " <span id=\"month_name\">".dol_print_date(dol_mktime(0, 0, 0, $first_month, $first_day, $first_year), "%Y").", ".$langs->trans("Week")." ".$week;
|
||||
$nav .= " </span>\n";
|
||||
$nav .= " <a href=\"?year=".$next_year."&month=".$next_month."&day=".$next_day.$param."\"><i class=\"fa fa-chevron-right\" title=\"".dol_escape_htmltag($langs->trans("Next"))."\"></i></a>\n";
|
||||
$nav .= " (<a href=\"?year=".$nowyear."&month=".$nowmonth."&day=".$nowday.$param."\">".$langs->trans("Today")."</a>)";
|
||||
$nav .= " <a href=\"?year=".$nowyear."&month=".$nowmonth."&day=".$nowday.$param."\">".$langs->trans("Today")."</a> ";
|
||||
$picto = 'calendarweek';
|
||||
}
|
||||
if ($action == 'show_day')
|
||||
@ -376,12 +378,13 @@ if ($action == 'show_day')
|
||||
$nav .= " <span id=\"month_name\">".dol_print_date(dol_mktime(0, 0, 0, $month, $day, $year), "daytextshort");
|
||||
$nav .= " </span>\n";
|
||||
$nav .= " <a href=\"?year=".$next_year."&month=".$next_month."&day=".$next_day.$param."\"><i class=\"fa fa-chevron-right\"></i></a>\n";
|
||||
$nav .= " (<a href=\"?year=".$nowyear."&month=".$nowmonth."&day=".$nowday.$param."\">".$langs->trans("Today")."</a>)";
|
||||
$nav .= " <a href=\"?year=".$nowyear."&month=".$nowmonth."&day=".$nowday.$param."\">".$langs->trans("Today")."</a> ";
|
||||
$picto = 'calendarday';
|
||||
}
|
||||
|
||||
$nav .= $form->selectDate($dateselect, 'dateselect', 0, 0, 1, '', 1, 0);
|
||||
$nav .= ' <input type="submit" name="submitdateselect" class="button" value="'.$langs->trans("Refresh").'">';
|
||||
//$nav .= ' <input type="submit" name="submitdateselect" class="button" value="'.$langs->trans("Refresh").'">';
|
||||
$nav .= '<button type="submit" class="liste_titre button_search" name="button_search_x" value="x"><span class="fa fa-search"></span></button>';
|
||||
|
||||
// Must be after the nav definition
|
||||
$param .= '&year='.$year.'&month='.$month.($day ? '&day='.$day : '');
|
||||
@ -404,10 +407,55 @@ print '<form method="POST" id="searchFormList" class="listactionsfilter" action=
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
|
||||
dol_fiche_head($head, $tabactive, $langs->trans('Agenda'), 0, 'action');
|
||||
print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, 0, $filtert, 0, $pid, $socid, $action, $listofextcals, $actioncode, $usergroup, '', $resourceid);
|
||||
dol_fiche_end();
|
||||
//dol_fiche_head($head, $tabactive, $langs->trans('Agenda'), 0, 'action');
|
||||
//print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, 0, $filtert, 0, $pid, $socid, $action, $listofextcals, $actioncode, $usergroup, '', $resourceid);
|
||||
//dol_fiche_end();
|
||||
|
||||
$viewmode = '';
|
||||
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&restore_lastsearch_values=1">';
|
||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||
$viewmode .= img_picto($langs->trans("List"), 'object_list-alt', 'class="pictoactionview block"');
|
||||
//$viewmode .= '</span>';
|
||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewList").'</span></a>';
|
||||
|
||||
$viewmode .= '<a class="btnTitle'.($action == 'show_month' ? ' btnTitleSelected' : '').' reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_month&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').'">';
|
||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||
$viewmode .= img_picto($langs->trans("ViewCal"), 'object_calendar', 'class="pictoactionview block"');
|
||||
//$viewmode .= '</span>';
|
||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewCal").'</span></a>';
|
||||
|
||||
$viewmode .= '<a class="btnTitle'.($action == 'show_week' ? ' btnTitleSelected' : '').' reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_week&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').'">';
|
||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||
$viewmode .= img_picto($langs->trans("ViewWeek"), 'object_calendarweek', 'class="pictoactionview block"');
|
||||
//$viewmode .= '</span>';
|
||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewWeek").'</span></a>';
|
||||
|
||||
$viewmode .= '<a class="btnTitle'.($action == 'show_day' ? ' btnTitleSelected' : '').' reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_day&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').'">';
|
||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||
$viewmode .= img_picto($langs->trans("ViewDay"), 'object_calendarday', 'class="pictoactionview block"');
|
||||
//$viewmode .= '</span>';
|
||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewDay").'</span></a>';
|
||||
|
||||
$viewmode .= '<a class="btnTitle reposition marginrightonly" href="'.DOL_URL_ROOT.'/comm/action/peruser.php?action=show_peruser&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').'">';
|
||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||
$viewmode .= img_picto($langs->trans("ViewPerUser"), 'object_calendarperuser', 'class="pictoactionview block"');
|
||||
//$viewmode .= '</span>';
|
||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewPerUser").'</span></a>';
|
||||
|
||||
$viewmode .= '<span class="marginrightonly"></span>';
|
||||
|
||||
|
||||
$newcardbutton = '';
|
||||
if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create)
|
||||
{
|
||||
$tmpforcreatebutton = dol_getdate(dol_now(), true);
|
||||
|
||||
$newparam .= '&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$tmpforcreatebutton['year'];
|
||||
|
||||
//$param='month='.$monthshown.'&year='.$year;
|
||||
$hourminsec = '100000';
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans("AddAction"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.sprintf("%04d%02d%02d", $tmpforcreatebutton['year'], $tmpforcreatebutton['mon'], $tmpforcreatebutton['mday']).$hourminsec.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($newparam ? '?'.$newparam : '')));
|
||||
}
|
||||
|
||||
// Define the legend/list of calendard to show
|
||||
$s = ''; $link = '';
|
||||
@ -440,7 +488,7 @@ if (!empty($conf->use_javascript_ajax)) // If javascript on
|
||||
$s .= '</script>'."\n";
|
||||
|
||||
// Local calendar
|
||||
$s .= '<div class="nowrap inline-block minheight20"><input type="checkbox" id="check_mytasks" name="check_mytasks" checked disabled> '.$langs->trans("LocalAgenda").' </div>';
|
||||
$s .= '<div class="nowrap inline-block minheight30"><input type="checkbox" id="check_mytasks" name="check_mytasks" checked disabled> '.$langs->trans("LocalAgenda").' </div>';
|
||||
|
||||
// External calendars
|
||||
if (is_array($showextcals) && count($showextcals) > 0)
|
||||
@ -487,9 +535,6 @@ if (!empty($conf->use_javascript_ajax)) // If javascript on
|
||||
$link .= '</a>';
|
||||
}
|
||||
|
||||
print load_fiche_titre($s, $link.' '.$nav, '', 0, 0, 'tablelistofcalendars');
|
||||
|
||||
|
||||
// Load events from database into $eventarray
|
||||
$eventarray = array();
|
||||
|
||||
@ -1109,6 +1154,11 @@ if (is_readable($color_file))
|
||||
if (!is_array($theme_datacolor)) $theme_datacolor = array(array(120, 130, 150), array(200, 160, 180), array(190, 190, 220));
|
||||
|
||||
|
||||
print_barre_liste($langs->trans("Agenda"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, -1, 'object_action', 0, $nav.'<span class="marginleftonly"></span>'.$newcardbutton, '', $limit, 1, 0, 1, $viewmode);
|
||||
|
||||
print $s;
|
||||
|
||||
|
||||
if (empty($action) || $action == 'show_month') // View by month
|
||||
{
|
||||
$newparam = $param; // newparam is for birthday links
|
||||
@ -1122,6 +1172,9 @@ if (empty($action) || $action == 'show_month') // View by month
|
||||
$newparam = preg_replace('/showbirthday_=/i', 'showbirthday=', $newparam); // Restore correct parameter
|
||||
$newparam .= '&viewcal=1';
|
||||
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, 0, $filtert, 0, $pid, $socid, $action, -1, $actioncode, $usergroup, '', $resourceid);
|
||||
print '</div>';
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table width="100%" class="noborder nocellnopadd cal_pannel cal_month">';
|
||||
@ -1200,6 +1253,10 @@ if (empty($action) || $action == 'show_month') // View by month
|
||||
$newparam = preg_replace('/showbirthday_=/i', 'showbirthday=', $newparam); // Restore correct parameter
|
||||
$newparam .= '&viewweek=1';
|
||||
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent"><div class="divsearchfield">';
|
||||
print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, 0, $filtert, 0, $pid, $socid, $action, -1, $actioncode, $usergroup, '', $resourceid);
|
||||
print '</div></div>';
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table width="100%" class="noborder nocellnopadd cal_pannel cal_month">';
|
||||
print ' <tr class="liste_titre">';
|
||||
@ -1256,7 +1313,11 @@ if (empty($action) || $action == 'show_month') // View by month
|
||||
$timestamp = dol_mktime(12, 0, 0, $month, $day, $year);
|
||||
$arraytimestamp = dol_getdate($timestamp);
|
||||
|
||||
//echo '<table class="tagtable centpercent noborder nocellnopadd cal_pannel cal_month">';
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent"><div class="divsearchfield">';
|
||||
print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, 0, $filtert, 0, $pid, $socid, $action, -1, $actioncode, $usergroup, '', $resourceid);
|
||||
print '</div></div>';
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
echo '<table class="tagtable centpercent noborder nocellnopadd cal_pannel cal_month noborderbottom" style="margin-bottom: 5px !important;">';
|
||||
|
||||
echo ' <tr class="tagtr liste_titre">';
|
||||
@ -1274,6 +1335,7 @@ if (empty($action) || $action == 'show_month') // View by month
|
||||
*/
|
||||
|
||||
echo '</table>';
|
||||
print '</div>';
|
||||
|
||||
/* WIP View per hour */
|
||||
$useviewhour = 0;
|
||||
@ -1301,9 +1363,8 @@ if (empty($action) || $action == 'show_month') // View by month
|
||||
{
|
||||
echo ' <div class="tagtr calendarviewcontainertr">'."\n";
|
||||
echo ' <div class="tagtd width100 tdtop">'.dol_print_date($i * 3600, 'hour', 'gmt').'</div>';
|
||||
echo ' <div class="tagtd '.$style.' tdtop">';
|
||||
echo " </div>\n";
|
||||
echo " </div>\n";
|
||||
echo ' <div class="tagtd '.$style.' tdtop"></div>'."\n";
|
||||
echo ' </div>'."\n";
|
||||
$i++;
|
||||
$j++;
|
||||
}
|
||||
|
||||
@ -152,6 +152,7 @@ if (is_array($extrafields->attributes[$object->table_element]['label']) && count
|
||||
$object->fields = dol_sort_array($object->fields, 'position');
|
||||
$arrayfields = dol_sort_array($arrayfields, 'position');
|
||||
|
||||
//var_dump($_POST);exit;
|
||||
|
||||
/*
|
||||
* Actions
|
||||
@ -301,7 +302,7 @@ if ($user->rights->agenda->allactions->delete)
|
||||
{
|
||||
$arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete");
|
||||
}
|
||||
|
||||
if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array();
|
||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$sql = "SELECT";
|
||||
@ -428,7 +429,9 @@ if ($resql)
|
||||
$arrayofselected = is_array($toselect) ? $toselect : array();
|
||||
|
||||
// Local calendar
|
||||
$newtitle = '<div class="nowrap clear inline-block minheight20"><input type="checkbox" id="check_mytasks" name="check_mytasks" checked disabled> '.$langs->trans("LocalAgenda").' </div>';
|
||||
$newtitle = '<div class="nowrap clear inline-block minheight30">';
|
||||
$newtitle .= '<input type="checkbox" id="check_mytasks" name="check_mytasks" checked disabled> '.$langs->trans("LocalAgenda").' ';
|
||||
$newtitle .= '</div>';
|
||||
//$newtitle=$langs->trans($title);
|
||||
|
||||
$tabactive = 'cardlist';
|
||||
@ -439,7 +442,6 @@ if ($resql)
|
||||
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="list">';
|
||||
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
@ -450,9 +452,9 @@ if ($resql)
|
||||
if ($showbirthday) $nav .= '<input type="hidden" name="search_showbirthday" value="1">';
|
||||
print $nav;
|
||||
|
||||
dol_fiche_head($head, $tabactive, $langs->trans('Agenda'), 0, 'action');
|
||||
print_actions_filter($form, $canedit, $search_status, $year, $month, $day, $showbirthday, 0, $filtert, 0, $pid, $socid, $action, -1, $actioncode, $usergroup, '', $resourceid);
|
||||
dol_fiche_end();
|
||||
//dol_fiche_head($head, $tabactive, $langs->trans('Agenda'), 0, 'action');
|
||||
//print_actions_filter($form, $canedit, $search_status, $year, $month, $day, $showbirthday, 0, $filtert, 0, $pid, $socid, $action, -1, $actioncode, $usergroup, '', $resourceid);
|
||||
//dol_fiche_end();
|
||||
|
||||
// Add link to show birthdays
|
||||
$link = '';
|
||||
@ -484,6 +486,39 @@ if ($resql)
|
||||
$s = $hookmanager->resPrint;
|
||||
}
|
||||
|
||||
$viewmode = '';
|
||||
$viewmode .= '<a class="btnTitle btnTitleSelected reposition" href="'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&restore_lastsearch_values=1">';
|
||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||
$viewmode .= img_picto($langs->trans("List"), 'object_list-alt', 'class="pictoactionview block"');
|
||||
//$viewmode .= '</span>';
|
||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewList").'</span></a>';
|
||||
|
||||
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_month&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').'">';
|
||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||
$viewmode .= img_picto($langs->trans("ViewCal"), 'object_calendar', 'class="pictoactionview block"');
|
||||
//$viewmode .= '</span>';
|
||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewCal").'</span></a>';
|
||||
|
||||
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_week&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').'">';
|
||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||
$viewmode .= img_picto($langs->trans("ViewWeek"), 'object_calendarweek', 'class="pictoactionview block"');
|
||||
//$viewmode .= '</span>';
|
||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewWeek").'</span></a>';
|
||||
|
||||
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_day&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').'">';
|
||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||
$viewmode .= img_picto($langs->trans("ViewDay"), 'object_calendarday', 'class="pictoactionview block"');
|
||||
//$viewmode .= '</span>';
|
||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewDay").'</span></a>';
|
||||
|
||||
$viewmode .= '<a class="btnTitle reposition marginrightonly" href="'.DOL_URL_ROOT.'/comm/action/peruser.php?action=show_peruser&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').'">';
|
||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||
$viewmode .= img_picto($langs->trans("ViewPerUser"), 'object_calendarperuser', 'class="pictoactionview block"');
|
||||
//$viewmode .= '</span>';
|
||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewPerUser").'</span></a>';
|
||||
|
||||
$viewmode .= '<span class="marginrightonly"></span>';
|
||||
|
||||
$newcardbutton = '';
|
||||
if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create)
|
||||
{
|
||||
@ -495,8 +530,12 @@ if ($resql)
|
||||
$hourminsec = '100000';
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.sprintf("%04d%02d%02d", $tmpforcreatebutton['year'], $tmpforcreatebutton['mon'], $tmpforcreatebutton['mday']).$hourminsec.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($newparam ? '?'.$newparam : '')));
|
||||
}
|
||||
$param .= '&action='.$action;
|
||||
|
||||
print_barre_liste($s, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, -1 * $nbtotalofrecords, '', 0, $nav.$newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
||||
print_barre_liste($langs->trans("Agenda"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, -1 * $nbtotalofrecords, 'object_action', 0, $nav.$newcardbutton, '', $limit, 0, 0, 1, $viewmode);
|
||||
|
||||
print $s;
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
|
||||
|
||||
@ -506,6 +545,11 @@ if ($resql)
|
||||
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
||||
if ($massactionbutton) $selectedfields .= $form->showCheckAddButtons('checkforselect', 1);
|
||||
$i = 0;
|
||||
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print_actions_filter($form, $canedit, $search_status, $year, $month, $day, $showbirthday, 0, $filtert, 0, $pid, $socid, $action, -1, $actioncode, $usergroup, '', $resourceid);
|
||||
print '</div>';
|
||||
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||
|
||||
|
||||
@ -700,7 +700,7 @@ jQuery(document).ready(function() {
|
||||
else if (ids.indexOf(",") > -1) /* There is several events */
|
||||
{
|
||||
/* alert(\'several events\'); */
|
||||
url = "'.DOL_URL_ROOT.'/comm/action/list.php?filtert="+userid+"&dateselectyear="+year+"&dateselectmonth="+month+"&dateselectday="+day;
|
||||
url = "'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&filtert="+userid+"&dateselectyear="+year+"&dateselectmonth="+month+"&dateselectday="+day;
|
||||
window.location.href = url;
|
||||
}
|
||||
else /* One event */
|
||||
|
||||
@ -284,7 +284,7 @@ $nav = "<a href=\"?year=".$prev_year."&month=".$prev_month."&day=".$prev
|
||||
$nav .= " <span id=\"month_name\">".dol_print_date(dol_mktime(0, 0, 0, $first_month, $first_day, $first_year), "%Y").", ".$langs->trans("Week")." ".$week;
|
||||
$nav .= " </span>\n";
|
||||
$nav .= " <a href=\"?year=".$next_year."&month=".$next_month."&day=".$next_day.$param."\"><i class=\"fa fa-chevron-right\" title=\"".dol_escape_htmltag($langs->trans("Next"))."\"></i></a>\n";
|
||||
$nav .= " (<a href=\"?year=".$nowyear."&month=".$nowmonth."&day=".$nowday.$param."\">".$langs->trans("Today")."</a>)";
|
||||
$nav .= " <a href=\"?year=".$nowyear."&month=".$nowmonth."&day=".$nowday.$param."\">".$langs->trans("Today")."</a> ";
|
||||
|
||||
/*$nav.=' <form name="dateselect" action="'.$_SERVER["PHP_SELF"].'?action=show_peruser'.$param.'">';
|
||||
$nav.='<input type="hidden" name="token" value="' . newToken() . '">';
|
||||
@ -303,7 +303,8 @@ $nav.='<input type="hidden" name="end_d" value="' . $end_d . '">';
|
||||
$nav.='<input type="hidden" name="showbirthday" value="' . $showbirthday . '">';
|
||||
*/
|
||||
$nav .= $form->selectDate($dateselect, 'dateselect', 0, 0, 1, '', 1, 0);
|
||||
$nav .= ' <input type="submit" name="submitdateselect" class="button" value="'.$langs->trans("Refresh").'">';
|
||||
//$nav .= ' <input type="submit" name="submitdateselect" class="button" value="'.$langs->trans("Refresh").'">';
|
||||
$nav .= ' <button type="submit" class="liste_titre button_search" name="button_search_x" value="x"><span class="fa fa-search"></span></button>';
|
||||
//$nav.='</form>';
|
||||
|
||||
// Must be after the nav definition
|
||||
@ -325,10 +326,6 @@ $head = calendars_prepare_head($paramnoaction);
|
||||
|
||||
print '<form method="POST" id="searchFormList" class="listactionsfilter" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||
|
||||
dol_fiche_head($head, $tabactive, $langs->trans('Agenda'), 0, 'action');
|
||||
print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, 0, $filtert, 0, $pid, $socid, $action, $listofextcals, $actioncode, $usergroup, '', $resourceid);
|
||||
dol_fiche_end();
|
||||
|
||||
$showextcals = $listofextcals;
|
||||
// Legend
|
||||
if ($conf->use_javascript_ajax)
|
||||
@ -381,6 +378,41 @@ if ($conf->use_javascript_ajax)
|
||||
}
|
||||
}
|
||||
|
||||
$massactionbutton = '';
|
||||
|
||||
$viewmode = '';
|
||||
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&restore_lastsearch_values=1">';
|
||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||
$viewmode .= img_picto($langs->trans("List"), 'object_list-alt', 'class="pictoactionview block"');
|
||||
//$viewmode .= '</span>';
|
||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewList").'</span></a>';
|
||||
|
||||
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_month&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').'">';
|
||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||
$viewmode .= img_picto($langs->trans("ViewCal"), 'object_calendar', 'class="pictoactionview block"');
|
||||
//$viewmode .= '</span>';
|
||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewCal").'</span></a>';
|
||||
|
||||
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_week&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').'">';
|
||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||
$viewmode .= img_picto($langs->trans("ViewWeek"), 'object_calendarweek', 'class="pictoactionview block"');
|
||||
//$viewmode .= '</span>';
|
||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewWeek").'</span></a>';
|
||||
|
||||
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_day&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').'">';
|
||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||
$viewmode .= img_picto($langs->trans("ViewDay"), 'object_calendarday', 'class="pictoactionview block"');
|
||||
//$viewmode .= '</span>';
|
||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewDay").'</span></a>';
|
||||
|
||||
$viewmode .= '<a class="btnTitle btnTitleSelected reposition marginrightonly" href="'.DOL_URL_ROOT.'/comm/action/peruser.php?action=show_peruser&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').'">';
|
||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||
$viewmode .= img_picto($langs->trans("ViewPerUser"), 'object_calendarperuser', 'class="pictoactionview block"');
|
||||
//$viewmode .= '</span>';
|
||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewPerUser").'</span></a>';
|
||||
|
||||
$viewmode .= '<span class="marginrightonly"></span>';
|
||||
|
||||
|
||||
$newcardbutton = '';
|
||||
if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create)
|
||||
@ -394,8 +426,24 @@ if ($user->rights->agenda->myactions->create || $user->rights->agenda->allaction
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans("AddAction"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.sprintf("%04d%02d%02d", $tmpforcreatebutton['year'], $tmpforcreatebutton['mon'], $tmpforcreatebutton['mday']).$hourminsec.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($newparam ? '?'.$newparam : '')));
|
||||
}
|
||||
|
||||
print_barre_liste($langs->trans("Agenda"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, -1, 'object_action', 0, $nav.'<span class="marginleftonly"></span>'.$newcardbutton, '', $limit, 1, 0, 1, $viewmode);
|
||||
|
||||
$link = '';
|
||||
print load_fiche_titre($s, $link.' '.$nav.' '.$newcardbutton, '');
|
||||
//print load_fiche_titre('', $link.' '.$nav.' '.$newcardbutton, '');
|
||||
|
||||
// Local calendar
|
||||
$newtitle = '<div class="nowrap clear inline-block minheight30">';
|
||||
$newtitle .= '<input type="checkbox" id="check_mytasks" name="check_mytasks" checked disabled> '.$langs->trans("LocalAgenda").' ';
|
||||
$newtitle .= '</div>';
|
||||
//$newtitle=$langs->trans($title);
|
||||
|
||||
$s = $newtitle;
|
||||
|
||||
print $s;
|
||||
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print_actions_filter($form, $canedit, $search_status, $year, $month, $day, $showbirthday, 0, $filtert, 0, $pid, $socid, $action, -1, $actioncode, $usergroup, '', $resourceid);
|
||||
print '</div>';
|
||||
|
||||
|
||||
|
||||
@ -650,7 +698,7 @@ while ($currentdaytoshow < $lastdaytoshow) {
|
||||
continue;
|
||||
}
|
||||
echo '<td align="center" colspan="'.($end_h - $begin_h).'">';
|
||||
echo $langs->trans("Day".(($i + (isset($conf->global->MAIN_START_WEEK) ? $conf->global->MAIN_START_WEEK : 1)) % 7));
|
||||
echo '<span class="opacitymedium spandayofweek">'.$langs->trans("Day".(($i + (isset($conf->global->MAIN_START_WEEK) ? $conf->global->MAIN_START_WEEK : 1)) % 7)).'</span>';
|
||||
print "<br>";
|
||||
if ($i) print dol_print_date(dol_time_plus_duree($currentdaytoshow, $i, 'd'), 'day');
|
||||
else print dol_print_date($currentdaytoshow, 'day');
|
||||
@ -864,7 +912,7 @@ jQuery(document).ready(function() {
|
||||
else if (ids.indexOf(",") > -1) /* There is several events */
|
||||
{
|
||||
/* alert(\'several events\'); */
|
||||
url = "'.DOL_URL_ROOT.'/comm/action/list.php?filtert="+userid+"&dateselectyear="+year+"&dateselectmonth="+month+"&dateselectday="+day;
|
||||
url = "'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&filtert="+userid+"&dateselectyear="+year+"&dateselectmonth="+month+"&dateselectday="+day;
|
||||
window.location.href = url;
|
||||
}
|
||||
else /* One event */
|
||||
|
||||
@ -35,8 +35,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/action/rapport.pdf.php';
|
||||
$langs->loadLangs(array("agenda", "commercial"));
|
||||
|
||||
$action = GETPOST('action', 'alpha');
|
||||
$month = GETPOST('month');
|
||||
$year = GETPOST('year');
|
||||
$month = GETPOST('month', 'int');
|
||||
$year = GETPOST('year', 'int');
|
||||
|
||||
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
$sortfield = GETPOST("sortfield", 'alpha');
|
||||
@ -119,9 +119,8 @@ if ($resql)
|
||||
print '<input type="hidden" name="action" value="list">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
|
||||
print_barre_liste($langs->trans("EventReports"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_agenda', 0, '', '', $limit);
|
||||
print_barre_liste($langs->trans("EventReports"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_agenda', 0, '', '', $limit, 0, 0, 1);
|
||||
|
||||
$moreforfilter = '';
|
||||
|
||||
@ -154,7 +153,7 @@ if ($resql)
|
||||
|
||||
// Button to build doc
|
||||
print '<td class="center">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=builddoc&page='.$page.'&month='.$obj->month.'&year='.$obj->year.'">'.img_picto($langs->trans('BuildDoc'), 'filenew').'</a>';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=builddoc&page='.$page.'&month='.$obj->month.'&year='.$obj->year.'">'.img_picto($langs->trans('BuildDoc'), 'filenew').'</a>';
|
||||
print '</td>';
|
||||
|
||||
$name = "actions-".$obj->month."-".$obj->year.".pdf";
|
||||
|
||||
@ -253,6 +253,9 @@ if (empty($reshook))
|
||||
}
|
||||
$model = $object->modelpdf;
|
||||
$ret = $object->fetch($id); // Reload to get new records
|
||||
if ($ret > 0) {
|
||||
$object->fetch_thirdparty();
|
||||
}
|
||||
|
||||
$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
}
|
||||
|
||||
@ -59,9 +59,9 @@ if (GETPOST('action', 'aZ09') == 'setremise')
|
||||
$discount_type = GETPOST('discount_type', 'int');
|
||||
|
||||
if (!empty($discount_type)) {
|
||||
$result = $object->set_remise_supplier(price2num(GETPOST("remise")), GETPOST("note"), $user);
|
||||
$result = $object->set_remise_supplier(price2num(GETPOST("remise")), GETPOST("note", "alphanohtml"), $user);
|
||||
} else {
|
||||
$result = $object->set_remise_client(price2num(GETPOST("remise")), GETPOST("note"), $user);
|
||||
$result = $object->set_remise_client(price2num(GETPOST("remise")), GETPOST("note", "alphanohtml"), $user);
|
||||
}
|
||||
|
||||
if ($result > 0)
|
||||
@ -183,7 +183,7 @@ if ($socid > 0)
|
||||
|
||||
// Motif/Note
|
||||
print '<tr><td class="fieldrequired">';
|
||||
print $langs->trans("NoteReason").'</td><td><input type="text" size="60" name="note" value="'.dol_escape_htmltag(GETPOST("note")).'"></td></tr>';
|
||||
print $langs->trans("NoteReason").'</td><td><input type="text" size="60" name="note" value="'.dol_escape_htmltag(GETPOST("note", "alphanohtml")).'"></td></tr>';
|
||||
|
||||
print "</table>";
|
||||
|
||||
|
||||
@ -40,13 +40,7 @@ $id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('account', 'int'));
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
$action = GETPOST('action', 'alpha');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$num = (GETPOST('num', 'alpha') ? GETPOST('num', 'alpha') : GETPOST('sectionid', 'alpha'));
|
||||
|
||||
$mesg = '';
|
||||
if (isset($_SESSION['DolMessage'])) {
|
||||
$mesg = $_SESSION['DolMessage'];
|
||||
unset($_SESSION['DolMessage']);
|
||||
}
|
||||
$numref = (GETPOST('num', 'alpha') ? GETPOST('num', 'alpha') : GETPOST('sectionid', 'alpha'));
|
||||
|
||||
// Security check
|
||||
if ($user->socid) {
|
||||
@ -71,21 +65,74 @@ if (!$sortfield)
|
||||
$sortfield = "name";
|
||||
|
||||
$object = new Account($db);
|
||||
if ($id > 0 || !empty($ref)) $object->fetch($id, $ref);
|
||||
if ($id > 0 || !empty($ref))
|
||||
{
|
||||
$result = $object->fetch($id, $ref);
|
||||
$account = $object->id; // Force the search field on id of account
|
||||
}
|
||||
|
||||
$result = restrictedArea($user, 'banque', $object->id, 'bank_account', '', '');
|
||||
|
||||
// Define number of receipt to show (current, previous or next one ?)
|
||||
$found = false;
|
||||
if ($_GET["rel"] == 'prev')
|
||||
{
|
||||
// Recherche valeur pour num = numero releve precedent
|
||||
$sql = "SELECT DISTINCT(b.num_releve) as num";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."bank as b";
|
||||
$sql .= " WHERE b.num_releve < '".$db->escape($numref)."'";
|
||||
$sql .= " AND b.fk_account = ".$id;
|
||||
$sql .= " ORDER BY b.num_releve DESC";
|
||||
|
||||
dol_syslog("htdocs/compta/bank/releve.php", LOG_DEBUG);
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$numrows = $db->num_rows($resql);
|
||||
if ($numrows > 0)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
$numref = $obj->num;
|
||||
$found = true;
|
||||
}
|
||||
}
|
||||
} elseif ($_GET["rel"] == 'next')
|
||||
{
|
||||
// Recherche valeur pour num = numero releve precedent
|
||||
$sql = "SELECT DISTINCT(b.num_releve) as num";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."bank as b";
|
||||
$sql .= " WHERE b.num_releve > '".$db->escape($numref)."'";
|
||||
$sql .= " AND b.fk_account = ".$id;
|
||||
$sql .= " ORDER BY b.num_releve ASC";
|
||||
|
||||
dol_syslog("htdocs/compta/bank/releve.php", LOG_DEBUG);
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$numrows = $db->num_rows($resql);
|
||||
if ($numrows > 0)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
$numref = $obj->num;
|
||||
$found = true;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// On veut le releve num
|
||||
$found = true;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (!empty($num))
|
||||
if (!empty($numref))
|
||||
{
|
||||
$object->fetch_thirdparty();
|
||||
$upload_dir = $conf->bank->dir_output."/".$id."/statement/".dol_sanitizeFileName($num);
|
||||
$upload_dir = $conf->bank->dir_output."/".$id."/statement/".dol_sanitizeFileName($numref);
|
||||
}
|
||||
$backtopage = $_SERVER['PHP_SELF']."?account=".$id."&num=".$num;
|
||||
$backtopage = $_SERVER['PHP_SELF']."?account=".$id."&num=".$numref;
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
|
||||
|
||||
|
||||
@ -101,10 +148,10 @@ llxHeader('', $title, $helpurl);
|
||||
|
||||
if ($id > 0 || !empty($ref)) {
|
||||
if ($object->fetch($id, $ref)) {
|
||||
$upload_dir = $conf->bank->dir_output."/".$id."/statement/".dol_sanitizeFileName($num);
|
||||
$upload_dir = $conf->bank->dir_output."/".$id."/statement/".dol_sanitizeFileName($numref);
|
||||
|
||||
// Onglets
|
||||
$head = account_statement_prepare_head($object, $num);
|
||||
$head = account_statement_prepare_head($object, $numref);
|
||||
dol_fiche_head($head, 'document', $langs->trans("AccountStatement"), -1, 'account');
|
||||
|
||||
|
||||
@ -115,8 +162,15 @@ if ($id > 0 || !empty($ref)) {
|
||||
$totalsize += $file['size'];
|
||||
}
|
||||
|
||||
$title = $langs->trans("AccountStatement").' '.$num.' - '.$langs->trans("BankAccount").' '.$object->getNomUrl(1, 'receipts');
|
||||
print load_fiche_titre($title, '', '');
|
||||
$morehtmlright = '';
|
||||
$morehtmlright .= '<div class="pagination"><ul>';
|
||||
$morehtmlright .= '<li class="pagination"><a class="paginationnext" href="'.$_SERVER["PHP_SELF"].'?rel=prev&num='.$numref.'&ve='.$ve.'&account='.$object->id.'"><i class="fa fa-chevron-left" title="'.dol_escape_htmltag($langs->trans("Previous")).'"></i></a></li>';
|
||||
$morehtmlright .= '<li class="pagination"><span class="active">'.$langs->trans("AccountStatement")." ".$numref.'</span></li>';
|
||||
$morehtmlright .= '<li class="pagination"><a class="paginationnext" href="'.$_SERVER["PHP_SELF"].'?rel=next&num='.$numref.'&ve='.$ve.'&account='.$object->id.'"><i class="fa fa-chevron-right" title="'.dol_escape_htmltag($langs->trans("Next")).'"></i></a></li>';
|
||||
$morehtmlright .= '</ul></div>';
|
||||
|
||||
$title = $langs->trans("AccountStatement").' '.$numref.' - '.$langs->trans("BankAccount").' '.$object->getNomUrl(1, 'receipts');
|
||||
print load_fiche_titre($title, $morehtmlright, '');
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
@ -134,9 +188,9 @@ if ($id > 0 || !empty($ref)) {
|
||||
$modulepart = 'bank';
|
||||
$permission = $user->rights->banque->modifier;
|
||||
$permtoedit = $user->rights->banque->modifier;
|
||||
$param = '&id='.$object->id.'&num='.urlencode($num);
|
||||
$moreparam = '&num='.urlencode($num); ;
|
||||
$relativepathwithnofile = $id."/statement/".dol_sanitizeFileName($num)."/";
|
||||
$param = '&id='.$object->id.'&num='.urlencode($numref);
|
||||
$moreparam = '&num='.urlencode($numref); ;
|
||||
$relativepathwithnofile = $id."/statement/".dol_sanitizeFileName($numref)."/";
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
|
||||
@ -39,12 +39,6 @@ $ref = GETPOST('ref', 'alpha');
|
||||
$action = GETPOST('action', 'alpha');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
|
||||
$mesg = '';
|
||||
if (isset($_SESSION['DolMessage'])) {
|
||||
$mesg = $_SESSION['DolMessage'];
|
||||
unset($_SESSION['DolMessage']);
|
||||
}
|
||||
|
||||
// Security check
|
||||
if ($user->socid) {
|
||||
$action = '';
|
||||
|
||||
@ -247,6 +247,8 @@ if (empty($numref))
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/bank/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
$morehtmlref = '';
|
||||
|
||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, '', 0, '', '', 1);
|
||||
|
||||
dol_fiche_end();
|
||||
@ -362,17 +364,15 @@ if (empty($numref))
|
||||
dol_fiche_head($head, 'statement', $langs->trans("AccountStatement"), -1, 'account');
|
||||
|
||||
|
||||
$mesprevnext = '';
|
||||
$mesprevnext .= '<div class="pagination"><ul>';
|
||||
$mesprevnext .= '<li class="pagination"><a class="paginationnext" href="'.$_SERVER["PHP_SELF"].'?rel=prev&num='.$numref.'&ve='.$ve.'&account='.$object->id.'"><i class="fa fa-chevron-left" title="'.dol_escape_htmltag($langs->trans("Previous")).'"></i></a></li>';
|
||||
//$mesprevnext.=' ';
|
||||
$mesprevnext .= '<li class="pagination"><span class="active">'.$langs->trans("AccountStatement")." ".$numref.'</span></li>';
|
||||
//$mesprevnext.=' ';
|
||||
$mesprevnext .= '<li class="pagination"><a class="paginationnext" href="'.$_SERVER["PHP_SELF"].'?rel=next&num='.$numref.'&ve='.$ve.'&account='.$object->id.'"><i class="fa fa-chevron-right" title="'.dol_escape_htmltag($langs->trans("Next")).'"></i></a></li>';
|
||||
$mesprevnext .= '</ul></div>';
|
||||
$morehtmlright = '';
|
||||
$morehtmlright .= '<div class="pagination"><ul>';
|
||||
$morehtmlright .= '<li class="pagination"><a class="paginationnext" href="'.$_SERVER["PHP_SELF"].'?rel=prev&num='.$numref.'&ve='.$ve.'&account='.$object->id.'"><i class="fa fa-chevron-left" title="'.dol_escape_htmltag($langs->trans("Previous")).'"></i></a></li>';
|
||||
$morehtmlright .= '<li class="pagination"><span class="active">'.$langs->trans("AccountStatement")." ".$numref.'</span></li>';
|
||||
$morehtmlright .= '<li class="pagination"><a class="paginationnext" href="'.$_SERVER["PHP_SELF"].'?rel=next&num='.$numref.'&ve='.$ve.'&account='.$object->id.'"><i class="fa fa-chevron-right" title="'.dol_escape_htmltag($langs->trans("Next")).'"></i></a></li>';
|
||||
$morehtmlright .= '</ul></div>';
|
||||
|
||||
$title = $langs->trans("AccountStatement").' '.$numref.' - '.$langs->trans("BankAccount").' '.$object->getNomUrl(1, 'receipts');
|
||||
print load_fiche_titre($title, $mesprevnext, '');
|
||||
print load_fiche_titre($title, $morehtmlright, '');
|
||||
//print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, 0, $nbtotalofrecords, 'bank_account', 0, '', '', 0, 1);
|
||||
|
||||
print "<form method=\"post\" action=\"releve.php\">";
|
||||
@ -620,7 +620,7 @@ if (empty($numref))
|
||||
|
||||
if ($user->rights->banque->modifier || $user->rights->banque->consolidate)
|
||||
{
|
||||
print '<td class="center"><a href="'.DOL_URL_ROOT.'/compta/bank/line.php?rowid='.$objp->rowid.'&account='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?account='.$object->id.'&num='.$numref).'">';
|
||||
print '<td class="center"><a class="editfielda reposition" href="'.DOL_URL_ROOT.'/compta/bank/line.php?rowid='.$objp->rowid.'&account='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?account='.$object->id.'&num='.$numref).'">';
|
||||
print img_edit();
|
||||
print "</a></td>";
|
||||
} else {
|
||||
|
||||
@ -178,7 +178,7 @@ if ($result)
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
|
||||
print_barre_liste($langs->trans("VariousPayments"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'object_payment', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
print_barre_liste($langs->trans("MenuVariousPayment"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'object_payment', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||
|
||||
@ -451,6 +451,7 @@ while ($j < $numlt)
|
||||
|
||||
|
||||
// Payment Salary
|
||||
/*
|
||||
if (!empty($conf->salaries->enabled) && !empty($user->rights->salaries->read))
|
||||
{
|
||||
if (!$mode || $mode != 'sconly')
|
||||
@ -558,6 +559,7 @@ if (!empty($conf->salaries->enabled) && !empty($user->rights->salaries->read))
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
||||
@ -1333,7 +1333,7 @@ class FactureRec extends CommonInvoice
|
||||
|
||||
$result = '';
|
||||
|
||||
$label = '<u>'.$langs->trans("ShowInvoice").'</u>';
|
||||
$label = '<u>'.$langs->trans("RepeatableInvoice").'</u>';
|
||||
if (!empty($this->ref)) {
|
||||
$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
||||
}
|
||||
|
||||
@ -41,6 +41,8 @@ if ($user->socid > 0)
|
||||
$socid = $user->socid;
|
||||
}
|
||||
|
||||
$charge = new ChargeSociales($db);
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
@ -161,7 +163,6 @@ $form = new Form($db);
|
||||
// Formulaire de creation d'un paiement de charge
|
||||
if ($action == 'create')
|
||||
{
|
||||
$charge = new ChargeSociales($db);
|
||||
$charge->fetch($chid);
|
||||
$charge->accountid = $charge->fk_account ? $charge->fk_account : $charge->accountid;
|
||||
$charge->paiementtype = $charge->mode_reglement_id ? $charge->mode_reglement_id : $charge->paiementtype;
|
||||
@ -223,7 +224,7 @@ if ($action == 'create')
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Date").'</td><td>';
|
||||
$datepaye = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]);
|
||||
$datepayment = empty($conf->global->MAIN_AUTOFILL_DATE) ? (empty($_POST["remonth"]) ?-1 : $datepaye) : 0;
|
||||
print $form->selectDate($datepayment, '', '', '', '', "add_payment", 1, 1);
|
||||
print $form->selectDate($datepayment, '', '', '', 0, "add_payment", 1, 1, 0, '', '', $charge->date_ech, '', 1, $langs->trans("DateOfSocialContribution"));
|
||||
print "</td>";
|
||||
print '</tr>';
|
||||
|
||||
|
||||
@ -486,7 +486,7 @@ if (!empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecom
|
||||
}
|
||||
|
||||
/*
|
||||
* Charges sociales non deductibles
|
||||
* Social contributions
|
||||
*/
|
||||
|
||||
$subtotal_ht = 0;
|
||||
@ -499,7 +499,6 @@ if (!empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecom
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c";
|
||||
$sql .= ", ".MAIN_DB_PREFIX."chargesociales as cs";
|
||||
$sql .= " WHERE cs.fk_type = c.id";
|
||||
$sql .= " AND c.deductible = 0";
|
||||
if (!empty($date_start) && !empty($date_end))
|
||||
$sql .= " AND cs.date_ech >= '".$db->idate($date_start)."' AND cs.date_ech <= '".$db->idate($date_end)."'";
|
||||
} elseif ($modecompta == "RECETTES-DEPENSES")
|
||||
@ -510,7 +509,6 @@ if (!empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecom
|
||||
$sql .= ", ".MAIN_DB_PREFIX."paiementcharge as p";
|
||||
$sql .= " WHERE p.fk_charge = cs.rowid";
|
||||
$sql .= " AND cs.fk_type = c.id";
|
||||
$sql .= " AND c.deductible = 0";
|
||||
if (!empty($date_start) && !empty($date_end))
|
||||
$sql .= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'";
|
||||
}
|
||||
@ -518,67 +516,7 @@ if (!empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecom
|
||||
$sql .= " AND cs.entity = ".$conf->entity;
|
||||
$sql .= " GROUP BY c.libelle, dm";
|
||||
|
||||
dol_syslog("get social contributions deductible=0 ", LOG_DEBUG);
|
||||
$result = $db->query($sql);
|
||||
if ($result) {
|
||||
$num = $db->num_rows($result);
|
||||
$i = 0;
|
||||
if ($num) {
|
||||
while ($i < $num) {
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
if (!isset($decaiss[$obj->dm])) $decaiss[$obj->dm] = 0;
|
||||
$decaiss[$obj->dm] += $obj->amount;
|
||||
|
||||
if (!isset($decaiss_ttc[$obj->dm])) $decaiss_ttc[$obj->dm] = 0;
|
||||
$decaiss_ttc[$obj->dm] += $obj->amount;
|
||||
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
} elseif ($modecompta == "BOOKKEEPING")
|
||||
{
|
||||
// Nothing from this table
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Charges sociales deductibles
|
||||
*/
|
||||
|
||||
$subtotal_ht = 0;
|
||||
$subtotal_ttc = 0;
|
||||
if (!empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES"))
|
||||
{
|
||||
if ($modecompta == 'CREANCES-DETTES')
|
||||
{
|
||||
$sql = "SELECT c.libelle as nom, date_format(cs.date_ech,'%Y-%m') as dm, sum(cs.amount) as amount";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c";
|
||||
$sql .= ", ".MAIN_DB_PREFIX."chargesociales as cs";
|
||||
$sql .= " WHERE cs.fk_type = c.id";
|
||||
$sql .= " AND c.deductible = 1";
|
||||
if (!empty($date_start) && !empty($date_end))
|
||||
$sql .= " AND cs.date_ech >= '".$db->idate($date_start)."' AND cs.date_ech <= '".$db->idate($date_end)."'";
|
||||
} elseif ($modecompta == "RECETTES-DEPENSES")
|
||||
{
|
||||
$sql = "SELECT c.libelle as nom, date_format(p.datep,'%Y-%m') as dm, sum(p.amount) as amount";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c";
|
||||
$sql .= ", ".MAIN_DB_PREFIX."chargesociales as cs";
|
||||
$sql .= ", ".MAIN_DB_PREFIX."paiementcharge as p";
|
||||
$sql .= " WHERE p.fk_charge = cs.rowid";
|
||||
$sql .= " AND cs.fk_type = c.id";
|
||||
$sql .= " AND c.deductible = 1";
|
||||
if (!empty($date_start) && !empty($date_end))
|
||||
$sql .= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'";
|
||||
}
|
||||
|
||||
$sql .= " AND cs.entity = ".$conf->entity;
|
||||
$sql .= " GROUP BY c.libelle, dm";
|
||||
|
||||
dol_syslog("get social contributions paid deductible=1", LOG_DEBUG);
|
||||
dol_syslog("get social contributions", LOG_DEBUG);
|
||||
$result = $db->query($sql);
|
||||
if ($result) {
|
||||
$num = $db->num_rows($result);
|
||||
@ -713,7 +651,7 @@ if (!empty($conf->expensereport->enabled) && ($modecompta == 'CREANCES-DETTES' |
|
||||
|
||||
|
||||
/*
|
||||
* Donation get dunning paiement
|
||||
* Donation get dunning payments
|
||||
*/
|
||||
|
||||
if (!empty($conf->don->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES"))
|
||||
|
||||
@ -481,6 +481,8 @@ if ($id > 0)
|
||||
}
|
||||
$morehtmlref .= '</div>';
|
||||
|
||||
$morehtmlright = '';
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/sociales/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
$object->totalpaye = $totalpaye; // To give a chance to dol_banner_tab to use already paid amount to show correct status
|
||||
|
||||
@ -576,7 +576,7 @@ while ($i < min($num, $limit))
|
||||
// Ref
|
||||
if (!empty($arrayfields['c.ref']['checked']))
|
||||
{
|
||||
print '<td>';
|
||||
print '<td class="nowraponall">';
|
||||
print $contractstatic->getNomUrl(1, 16);
|
||||
print '</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
|
||||
@ -1173,6 +1173,7 @@ if (!$error && $massaction == 'closed' && $objectclass == "Propal" && $permissio
|
||||
}
|
||||
}
|
||||
|
||||
//var_dump($_POST);var_dump($massaction);exit;
|
||||
|
||||
// Delete record from mass action (massaction = 'delete' for direct delete, action/confirm='delete'/'yes' with a confirmation step before)
|
||||
if (!$error && ($massaction == 'delete' || ($action == 'delete' && $confirm == 'yes')) && $permissiontodelete)
|
||||
|
||||
@ -47,8 +47,8 @@ top_httphead();
|
||||
print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n";
|
||||
|
||||
// Registering the location of boxes
|
||||
if ((!empty($_POST['roworder'])) && (!empty($_POST['table_element_line']))
|
||||
&& (!empty($_POST['fk_element'])) && (!empty($_POST['element_id'])))
|
||||
if (GETPOST('roworder', 'alpha') && GETPOST('table_element_line', 'alpha', 2)
|
||||
&& GETPOST('fk_element', 'alpha', 2) && GETPOST('element_id', 'int', 2))
|
||||
{
|
||||
$roworder = GETPOST('roworder', 'alpha', 2);
|
||||
$table_element_line = GETPOST('table_element_line', 'alpha', 2);
|
||||
|
||||
@ -143,7 +143,7 @@ class box_services_contracts extends ModeleBoxes
|
||||
$thirdpartytmp->code_compta_fournisseur = $objp->code_compta_fournisseur;
|
||||
|
||||
$dateline = $this->db->jdate($objp->date_line);
|
||||
if ($contractstatic->statut == Contrat::STATUS_VALIDATED && $objp->statut == ContratLigne::STATUS_OPEN && ($dateline + $conf->contrat->services->expires->warning_delay) < $now) $late = img_warning($langs->trans("Late"));
|
||||
if ($contractstatic->statut == Contrat::STATUS_VALIDATED && $objp->statut == ContratLigne::STATUS_OPEN && !empty($dateline) && ($dateline + $conf->contrat->services->expires->warning_delay) < $now) $late = img_warning($langs->trans("Late"));
|
||||
|
||||
// Multilangs
|
||||
if (!empty($conf->global->MAIN_MULTILANGS) && $objp->product_id > 0) // if option multilang is on
|
||||
|
||||
@ -6715,12 +6715,12 @@ abstract class CommonObject
|
||||
|
||||
if (!is_object($form)) $form = new Form($db);
|
||||
|
||||
$out = '';
|
||||
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('showOptionals',$parameters,$this,$action); // Note that $action and $object may have been modified by hook
|
||||
$reshook=$hookmanager->executeHooks('showOptionals', $parameters, $this, $action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook))
|
||||
{
|
||||
$out = '';
|
||||
|
||||
if (is_array($extrafields->attributes[$this->table_element]['label']) && count($extrafields->attributes[$this->table_element]['label']) > 0)
|
||||
{
|
||||
$out .= "\n";
|
||||
@ -6942,11 +6942,15 @@ abstract class CommonObject
|
||||
setListDependencies();
|
||||
});
|
||||
</script>'."\n";
|
||||
$out .= '<!-- /showOptionalsInput --> '."\n";
|
||||
}
|
||||
|
||||
$out .= '<!-- /showOptionalsInput --> '."\n";
|
||||
}
|
||||
return $out;
|
||||
} // end of hook manager
|
||||
}
|
||||
|
||||
$out .= $hookmanager->resPrint;
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
|
||||
@ -7797,6 +7801,9 @@ abstract class CommonObject
|
||||
$sql .= ' FROM '.MAIN_DB_PREFIX.$objectline->table_element;
|
||||
$sql .= ' WHERE fk_'.$this->element.' = '.$this->id;
|
||||
if ($morewhere) $sql .= $morewhere;
|
||||
if (isset($objectline->fields['position'])) {
|
||||
$sql .= $this->db->order('position', 'ASC');
|
||||
}
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
|
||||
@ -207,6 +207,7 @@ class HookManager
|
||||
'restrictedArea',
|
||||
'sendMail',
|
||||
'sendMailAfter',
|
||||
'showOptionals',
|
||||
'showLinkToObjectBlock',
|
||||
'setContentSecurityPolicy',
|
||||
'setHtmlTitle',
|
||||
|
||||
@ -926,12 +926,12 @@ class FormCompany extends Form
|
||||
$out .= '<option value="0"'.((string) $selected == '0' ? ' selected' : '').'>'.$langs->trans('NorProspectNorCustomer').'</option>';
|
||||
} elseif ($typeinput == 'list') {
|
||||
$out .= '<option value="-1"'.(($selected == '' || $selected == '-1') ? ' selected' : '').'> </option>';
|
||||
if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) {
|
||||
$out .= '<option value="1,3"'.($selected == '1,3' ? ' selected' : '').'>'.$langs->trans('Customer').'</option>';
|
||||
}
|
||||
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) {
|
||||
$out .= '<option value="2,3"'.($selected == '2,3' ? ' selected' : '').'>'.$langs->trans('Prospect').'</option>';
|
||||
}
|
||||
if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) {
|
||||
$out .= '<option value="1,3"'.($selected == '1,3' ? ' selected' : '').'>'.$langs->trans('Customer').'</option>';
|
||||
}
|
||||
$out .= '<option value="4"'.($selected == '4' ? ' selected' : '').'>'.$langs->trans('Supplier').'</option>';
|
||||
$out .= '<option value="0"'.($selected == '0' ? ' selected' : '').'>'.$langs->trans('Other').'</option>';
|
||||
} elseif ($typeinput == 'admin') {
|
||||
|
||||
@ -51,6 +51,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
|
||||
{
|
||||
global $conf, $user, $langs, $db, $hookmanager;
|
||||
global $begin_h, $end_h, $begin_d, $end_d;
|
||||
global $massaction;
|
||||
|
||||
$langs->load("companies");
|
||||
|
||||
@ -63,44 +64,36 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
|
||||
print '<input type="hidden" name="year" value="'.$year.'">';
|
||||
print '<input type="hidden" name="month" value="'.$month.'">';
|
||||
print '<input type="hidden" name="day" value="'.$day.'">';
|
||||
print '<input type="hidden" name="action" value="'.$action.'">';
|
||||
if ($massaction != 'predelete') { // When $massaction == 'predelete', action may be already output to 'delete' by the mass action system.
|
||||
print '<input type="hidden" name="action" value="'.$action.'">';
|
||||
}
|
||||
print '<input type="hidden" name="search_showbirthday" value="'.$showbirthday.'">';
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
if ($conf->browser->layout == 'phone') print '<div class="fichehalfleft">';
|
||||
else print '<table class="nobordernopadding centpercent"><tr><td class="borderright">';
|
||||
|
||||
print '<table class="nobordernopadding centpercent tableforfield">';
|
||||
|
||||
if ($canedit)
|
||||
{
|
||||
print '<div class="divsearchfield">';
|
||||
// Type
|
||||
print '<tr>';
|
||||
print '<td class="nowrap">';
|
||||
print $langs->trans("Type");
|
||||
print '</td><td class="nowraponall">';
|
||||
print '<span class="fas fa-square inline-block fawidth30" style=" color: #ddd;"></span>';
|
||||
print '<span class="hideonsmartphone">'.$langs->trans("Type").'</span>';
|
||||
$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 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>';
|
||||
print '</div>';
|
||||
|
||||
// Assigned to
|
||||
print '<tr>';
|
||||
print '<td class="nowrap">';
|
||||
print $langs->trans("ActionsToDoBy").' ';
|
||||
print '</td><td>';
|
||||
print '<div class="divsearchfield">';
|
||||
print img_picto('', 'user', 'class="fawidth30 inline-block"');
|
||||
print '<span class="hideonsmartphone">'.$langs->trans("ActionsToDoBy").'</span>';
|
||||
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").' ';
|
||||
else print '<br>';
|
||||
print '</div>';
|
||||
print '<div class="divsearchfield">';
|
||||
print img_picto('', 'object_group', 'class="fawidth30 inline-block"');
|
||||
print '<span class="hideonsmartphone">'.$langs->trans("ToUserOfGroup").'</span>';
|
||||
print $form->select_dolgroups($usergroupid, 'usergroup', 1, '', !$canedit, '', '', '0', false, 'maxwidth500');
|
||||
print '</td></tr>';
|
||||
print '</div>';
|
||||
|
||||
if ($conf->resource->enabled)
|
||||
{
|
||||
@ -108,25 +101,21 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
|
||||
$formresource = new FormResource($db);
|
||||
|
||||
// Resource
|
||||
print '<tr>';
|
||||
print '<td class="nowrap">';
|
||||
print $langs->trans("Resource");
|
||||
print '</td><td class="nowraponall">';
|
||||
print img_picto('', 'object_resource', 'class="fawidth30 inline-block"');
|
||||
print '<div class="divsearchfield">';
|
||||
print img_picto('', 'object_resource', 'class="fawidth30 inline-block"');
|
||||
print '<span class="hideonsmartphone">'.$langs->trans("Resource").'</span>';
|
||||
print $formresource->select_resource_list($resourceid, "search_resourceid", '', 1, 0, 0, null, '', 2, 0, 'maxwidth500');
|
||||
print '</td></tr>';
|
||||
print '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($conf->societe->enabled) && $user->rights->societe->lire)
|
||||
{
|
||||
print '<tr>';
|
||||
print '<td class="nowrap">';
|
||||
print $langs->trans("ThirdParty").' ';
|
||||
print '</td><td class="nowraponall">';
|
||||
print '<div class="divsearchfield">';
|
||||
print img_picto('', 'company', 'class="fawidth30 inline-block"');
|
||||
print '<span class="hideonsmartphone">'.$langs->trans("ThirdParty").'</span>';
|
||||
print $form->select_company($socid, 'search_socid', '', ' ', 0, 0, null, 0, 'minwidth100 maxwidth500');
|
||||
print '</td></tr>';
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
if (!empty($conf->projet->enabled) && $user->rights->projet->lire)
|
||||
@ -134,80 +123,57 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
||||
$formproject = new FormProjets($db);
|
||||
|
||||
print '<tr>';
|
||||
print '<td class="nowrap">';
|
||||
print $langs->trans("Project").' ';
|
||||
print '</td><td class="nowraponall">';
|
||||
print '<div class="divsearchfield">';
|
||||
print img_picto('', 'project', 'class="fawidth30 inline-block"');
|
||||
print '<span class="hideonsmartphone">'.$langs->trans("Project").'</span>';
|
||||
print $formproject->select_projects($socid ? $socid : -1, $pid, 'search_projectid', 0, 0, 1, 0, 0, 0, 0, '', 1, 0, 'maxwidth500');
|
||||
print '</td></tr>';
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
if ($canedit && !preg_match('/list/', $_SERVER["PHP_SELF"]))
|
||||
{
|
||||
// Status
|
||||
print '<tr>';
|
||||
print '<td class="nowrap">';
|
||||
print $langs->trans("Status");
|
||||
print ' </td><td class="nowraponall">';
|
||||
print '<div class="divsearchfield">';
|
||||
print img_picto('', 'setup', 'class="fawidth30 inline-block"');
|
||||
print '<span class="hideonsmartphone">'.$langs->trans("Status").'</span>';
|
||||
$formactions->form_select_status_action('formaction', $status, 1, 'search_status', 1, 2, 'minwidth100');
|
||||
print '</td></tr>';
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
if ($canedit && $action == 'show_peruser')
|
||||
{
|
||||
print '<div class="divsearchfield">';
|
||||
// Filter on hours
|
||||
print '<tr>';
|
||||
print '<td class="nowrap">'.$langs->trans("VisibleTimeRange").'</td>';
|
||||
print "<td class='nowrap'>";
|
||||
print '<div class="ui-grid-a"><div class="ui-block-a">';
|
||||
print img_picto('', 'clock', 'class="fawidth30 inline-block"');
|
||||
print '<span class="hideonsmartphone">'.$langs->trans("VisibleTimeRange").'</span>';
|
||||
print "\n".'<div class="ui-grid-a inline-block"><div class="ui-block-a">';
|
||||
print '<input type="number" class="short" name="begin_h" value="'.$begin_h.'" min="0" max="23">';
|
||||
if (empty($conf->dol_use_jmobile)) print ' - ';
|
||||
else print '</div><div class="ui-block-b">';
|
||||
print '<input type="number" class="short" name="end_h" value="'.$end_h.'" min="1" max="24">';
|
||||
if (empty($conf->dol_use_jmobile)) print ' '.$langs->trans("H");
|
||||
print '</div></div>';
|
||||
print '</td></tr>';
|
||||
print '</div>';
|
||||
|
||||
// Filter on days
|
||||
print '<tr>';
|
||||
print '<td class="nowrap">'.$langs->trans("VisibleDaysRange").'</td>';
|
||||
print "<td class='nowrap'>";
|
||||
print '<div class="ui-grid-a"><div class="ui-block-a">';
|
||||
print '<div class="divsearchfield">';
|
||||
print img_picto('', 'clock', 'class="fawidth30 inline-block"');
|
||||
print '<span class="hideonsmartphone">'.$langs->trans("VisibleDaysRange").'</span>';
|
||||
print "\n".'<div class="ui-grid-a inline-block"><div class="ui-block-a">';
|
||||
print '<input type="number" class="short" name="begin_d" value="'.$begin_d.'" min="1" max="7">';
|
||||
if (empty($conf->dol_use_jmobile)) print ' - ';
|
||||
else print '</div><div class="ui-block-b">';
|
||||
print '<input type="number" class="short" name="end_d" value="'.$end_d.'" min="1" max="7">';
|
||||
print '</div></div>';
|
||||
print '</td></tr>';
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
// Hooks
|
||||
$parameters = array('canedit'=>$canedit, 'pid'=>$pid, 'socid'=>$socid);
|
||||
$object = null;
|
||||
$reshook = $hookmanager->executeHooks('searchAgendaFrom', $parameters, $object, $action); // Note that $action and $object may have been
|
||||
|
||||
print '</table>';
|
||||
|
||||
if ($conf->browser->layout == 'phone') print '</div>';
|
||||
else print '</td>';
|
||||
|
||||
if ($conf->browser->layout == 'phone') print '<div class="fichehalfright">';
|
||||
else print '<td class="center nowrap" valign="middle">';
|
||||
|
||||
print '<table class="centpercent"><tr><td align="center">';
|
||||
print '<div class="formleftzone">';
|
||||
print '<input type="submit" class="button" style="min-width:120px" name="refresh" value="'.$langs->trans("Refresh").'">';
|
||||
print '</div>';
|
||||
print '</td></tr>';
|
||||
print '</table>';
|
||||
|
||||
if ($conf->browser->layout == 'phone') print '</div>';
|
||||
else print '</td></tr></table>';
|
||||
|
||||
print '</div>'; // Close fichecenter
|
||||
print '<div style="clear:both"></div>';
|
||||
|
||||
//print '</form>';
|
||||
}
|
||||
|
||||
|
||||
@ -248,7 +214,7 @@ function show_array_actions_to_do($max = 5)
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("LastActionsToDo", $max).'</th>';
|
||||
print '<th colspan="2" class="right"><a class="commonlink" href="'.DOL_URL_ROOT.'/comm/action/list.php?status=todo">'.$langs->trans("FullList").'</a></th>';
|
||||
print '<th colspan="2" class="right"><a class="commonlink" href="'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&status=todo">'.$langs->trans("FullList").'</a></th>';
|
||||
print '</tr>';
|
||||
|
||||
$var = true;
|
||||
@ -344,7 +310,7 @@ function show_array_last_actions_done($max = 5)
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("LastDoneTasks", $max).'</th>';
|
||||
print '<th colspan="2" class="right"><a class="commonlink" href="'.DOL_URL_ROOT.'/comm/action/list.php?status=done">'.$langs->trans("FullList").'</a></th>';
|
||||
print '<th colspan="2" class="right"><a class="commonlink" href="'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&status=done">'.$langs->trans("FullList").'</a></th>';
|
||||
print '</tr>';
|
||||
$var = true;
|
||||
$i = 0;
|
||||
@ -520,7 +486,7 @@ function calendars_prepare_head($param)
|
||||
$h = 0;
|
||||
$head = array();
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/comm/action/list.php'.($param ? '?'.$param : '');
|
||||
$head[$h][0] = DOL_URL_ROOT.'/comm/action/list.php?action=show_list'.($param ? '&'.$param : '');
|
||||
$head[$h][1] = $langs->trans("ViewList");
|
||||
$head[$h][2] = 'cardlist';
|
||||
$h++;
|
||||
|
||||
@ -61,7 +61,7 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption = '', $minLen
|
||||
$script .= '<script>'."\n";
|
||||
$script .= '$(document).ready(function() {
|
||||
var autoselect = '.$autoselect.';
|
||||
var options = '.json_encode($ajaxoptions).';
|
||||
var options = '.json_encode($ajaxoptions).'; /* Option of actions to do after keyup, or after select */
|
||||
|
||||
/* Remove selected id as soon as we type or delete a char (it means old selection is wrong). Use keyup/down instead of change to avoid loosing the product id. This is needed only for select of predefined product */
|
||||
$("input#search_'.$htmlname.'").keydown(function(e) {
|
||||
@ -131,7 +131,9 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption = '', $minLen
|
||||
textarea[key] = item[value];
|
||||
});
|
||||
}
|
||||
return { label: label, value: item.value, id: item.key, update: update, textarea: textarea, disabled: item.disabled }
|
||||
return { label: label, value: item.value, id: item.key, disabled: item.disabled,
|
||||
update: update, textarea: textarea,
|
||||
pbq: item.pbq, type: item.type, qty: item.qty, discount: item.discount, pricebasetype: item.pricebasetype, price_ht: item.price_ht, price_ttc: item.price_ttc }
|
||||
}));
|
||||
}
|
||||
else console.error("Error: Ajax url '.$url.($urloption ? '?'.$urloption : '').' has returned an empty page. Should be an empty json array.");
|
||||
@ -142,6 +144,14 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption = '', $minLen
|
||||
select: function( event, ui ) { // Function ran once new value has been selected into javascript combo
|
||||
console.log("Call change on input '.$htmlname.' because of select definition of autocomplete select call on input#search_'.$htmlname.'");
|
||||
console.log("Selected id = "+ui.item.id+" - If this value is null, it means you select a record with key that is null so selection is not effective");
|
||||
|
||||
//console.log(ui.item);
|
||||
$("#'.$htmlname.'").attr("data-pbq", ui.item.pbq);
|
||||
$("#'.$htmlname.'").attr("data-pbqup", ui.item.price_ht);
|
||||
$("#'.$htmlname.'").attr("data-pbqbase", ui.item.pricebasetype);
|
||||
$("#'.$htmlname.'").attr("data-pbqqty", ui.item.qty);
|
||||
$("#'.$htmlname.'").attr("data-pbqpercent", ui.item.discount);
|
||||
|
||||
$("#'.$htmlname.'").val(ui.item.id).trigger("change"); // Select new value
|
||||
// Disable an element
|
||||
if (options.option_disabled) {
|
||||
|
||||
@ -1580,7 +1580,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
|
||||
if ($donetodo)
|
||||
{
|
||||
$tmp = '';
|
||||
if (get_class($filterobj) == 'Societe') $tmp .= '<a href="'.DOL_URL_ROOT.'/comm/action/list.php?socid='.$filterobj->id.'&status=done">';
|
||||
if (get_class($filterobj) == 'Societe') $tmp .= '<a href="'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&socid='.$filterobj->id.'&status=done">';
|
||||
$tmp .= ($donetodo != 'done' ? $langs->trans("ActionsToDoShort") : '');
|
||||
$tmp .= ($donetodo != 'done' && $donetodo != 'todo' ? ' / ' : '');
|
||||
$tmp .= ($donetodo != 'todo' ? $langs->trans("ActionsDoneShort") : '');
|
||||
|
||||
@ -3009,7 +3009,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
if (empty($srconly) && in_array($pictowithouttext, array(
|
||||
'1downarrow', '1uparrow', '1leftarrow', '1rightarrow', '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected',
|
||||
'accountancy', 'address', 'bank_account', 'barcode', 'bank', 'bill', 'bookmark', 'bom', 'building',
|
||||
'cash-register', 'category', 'check', 'close_title', 'company', 'contact', 'contract', 'cubes',
|
||||
'cash-register', 'category', 'check', 'clock', 'close_title', 'company', 'contact', 'contract', 'cubes',
|
||||
'delete', 'dolly', 'dollyrevert', 'edit', 'ellipsis-h', 'external-link-alt', 'external-link-square-alt',
|
||||
'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'folder', 'folder-open', 'globe', 'globe-americas', 'grip', 'grip_title', 'help',
|
||||
'intervention', 'label', 'language', 'list', 'listlight', 'lot',
|
||||
@ -3038,7 +3038,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
$fakey = $pictowithouttext;
|
||||
$facolor = ''; $fasize = '';
|
||||
$fa = 'fas';
|
||||
if (in_array($pictowithouttext, array('object_generic', 'note', 'off', 'on', 'object_bookmark', 'bookmark', 'vcard'))) {
|
||||
if (in_array($pictowithouttext, array('clock', 'object_generic', 'note', 'off', 'on', 'object_bookmark', 'bookmark', 'vcard'))) {
|
||||
$fa = 'far';
|
||||
}
|
||||
if (in_array($pictowithouttext, array('skype', 'twitter', 'facebook', 'linkedin', 'instagram', 'snapchat', 'stripe-s', 'youtube', 'google-plus-g', 'whatsapp'))) {
|
||||
@ -4189,15 +4189,16 @@ function load_fiche_titre($titre, $morehtmlright = '', $picto = 'generic', $pict
|
||||
* @param int|string $totalnboflines Total number of records/lines for all pages (if known). Use a negative value of number to not show number. Use '' if unknown.
|
||||
* @param string $picto Icon to use before title (should be a 32x32 transparent png file)
|
||||
* @param int $pictoisfullpath 1=Icon name is a full absolute url of image
|
||||
* @param string $morehtmlright More html to show
|
||||
* @param string $morehtmlright More html to show (after arrows)
|
||||
* @param string $morecss More css to the table
|
||||
* @param int $limit Max number of lines (-1 = use default, 0 = no limit, > 0 = limit).
|
||||
* @param int $hideselectlimit Force to hide select limit
|
||||
* @param int $hidenavigation Force to hide all navigation tools
|
||||
* @param int $pagenavastextinput 1=Do not suggest list of pages to navigate but suggest the page number into an input field.
|
||||
* @param string $morehtmlrightbeforearrow More html to show (before arrows)
|
||||
* @return void
|
||||
*/
|
||||
function print_barre_liste($titre, $page, $file, $options = '', $sortfield = '', $sortorder = '', $morehtmlcenter = '', $num = -1, $totalnboflines = '', $picto = 'generic', $pictoisfullpath = 0, $morehtmlright = '', $morecss = '', $limit = -1, $hideselectlimit = 0, $hidenavigation = 0, $pagenavastextinput = 0)
|
||||
function print_barre_liste($titre, $page, $file, $options = '', $sortfield = '', $sortorder = '', $morehtmlcenter = '', $num = -1, $totalnboflines = '', $picto = 'generic', $pictoisfullpath = 0, $morehtmlright = '', $morecss = '', $limit = -1, $hideselectlimit = 0, $hidenavigation = 0, $pagenavastextinput = 0, $morehtmlrightbeforearrow = '')
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
@ -4298,8 +4299,8 @@ function print_barre_liste($titre, $page, $file, $options = '', $sortfield = '',
|
||||
}
|
||||
}
|
||||
|
||||
if ($savlimit || $morehtmlright) {
|
||||
print_fleche_navigation($page, $file, $options, $nextpage, $pagelist, $morehtmlright, $savlimit, $totalnboflines, $hideselectlimit); // output the div and ul for previous/last completed with page numbers into $pagelist
|
||||
if ($savlimit || $morehtmlright || $morehtmlrightbeforearrow) {
|
||||
print_fleche_navigation($page, $file, $options, $nextpage, $pagelist, $morehtmlright, $savlimit, $totalnboflines, $hideselectlimit, $morehtmlrightbeforearrow); // output the div and ul for previous/last completed with page numbers into $pagelist
|
||||
}
|
||||
|
||||
// js to autoselect page field on focus
|
||||
@ -4325,13 +4326,20 @@ function print_barre_liste($titre, $page, $file, $options = '', $sortfield = '',
|
||||
* @param int $limit Max nb of record to show (-1 = no combo with limit, 0 = no limit, > 0 = limit)
|
||||
* @param int $totalnboflines Total number of records/lines for all pages (if known)
|
||||
* @param int $hideselectlimit Force to hide select limit
|
||||
* @param string $beforearrows HTML content to show before arrows. Must NOT contains '<li> </li>' tags.
|
||||
* @return void
|
||||
*/
|
||||
function print_fleche_navigation($page, $file, $options = '', $nextpage = 0, $betweenarrows = '', $afterarrows = '', $limit = -1, $totalnboflines = 0, $hideselectlimit = 0)
|
||||
function print_fleche_navigation($page, $file, $options = '', $nextpage = 0, $betweenarrows = '', $afterarrows = '', $limit = -1, $totalnboflines = 0, $hideselectlimit = 0, $beforearrows = '')
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
print '<div class="pagination"><ul>';
|
||||
if ($beforearrows)
|
||||
{
|
||||
print '<li class="paginationbeforearrows">';
|
||||
print $beforearrows;
|
||||
print '</li>';
|
||||
}
|
||||
if ((int) $limit > 0 && empty($hideselectlimit))
|
||||
{
|
||||
$pagesizechoices = '10:10,15:15,20:20,30:30,40:40,50:50,100:100,250:250,500:500,1000:1000,5000:5000';
|
||||
@ -4380,7 +4388,7 @@ function print_fleche_navigation($page, $file, $options = '', $nextpage = 0, $be
|
||||
}
|
||||
if ($page > 0)
|
||||
{
|
||||
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>';
|
||||
print '<li class="pagination paginationpage paginationpageleft"><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)
|
||||
{
|
||||
@ -4390,7 +4398,7 @@ function print_fleche_navigation($page, $file, $options = '', $nextpage = 0, $be
|
||||
}
|
||||
if ($nextpage > 0)
|
||||
{
|
||||
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>';
|
||||
print '<li class="pagination paginationpage paginationpageright"><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)
|
||||
{
|
||||
|
||||
@ -42,7 +42,7 @@ function tax_prepare_head(ChargeSociales $object)
|
||||
$head = array();
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/sociales/card.php?id='.$object->id;
|
||||
$head[$h][1] = $langs->trans('Card');
|
||||
$head[$h][1] = $langs->trans('SocialContribution');
|
||||
$head[$h][2] = 'card';
|
||||
$h++;
|
||||
|
||||
|
||||
@ -583,7 +583,7 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no
|
||||
if ($donetodo)
|
||||
{
|
||||
$tmp = '';
|
||||
if (get_class($filterobj) == 'Societe') $tmp .= '<a href="'.DOL_URL_ROOT.'/comm/action/list.php?socid='.$filterobj->id.'&status=done">';
|
||||
if (get_class($filterobj) == 'Societe') $tmp .= '<a href="'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&socid='.$filterobj->id.'&status=done">';
|
||||
$tmp .= ($donetodo != 'done' ? $langs->trans("ActionsToDoShort") : '');
|
||||
$tmp .= ($donetodo != 'done' && $donetodo != 'todo' ? ' / ' : '');
|
||||
$tmp .= ($donetodo != 'todo' ? $langs->trans("ActionsDoneShort") : '');
|
||||
|
||||
@ -809,9 +809,10 @@ function getSocialNetworkSharingLinks()
|
||||
* @param string $sortorder Sort order ('DESC' or 'ASC')
|
||||
* @param string $langcode Language code ('' or 'en', 'fr', 'es', ...)
|
||||
* @param array $otherfilters Other filters
|
||||
* @param int $status 0 or 1, or -1 for both
|
||||
* @return string HTML content
|
||||
*/
|
||||
function getPagesFromSearchCriterias($type, $algo, $searchstring, $max = 25, $sortfield = 'date_creation', $sortorder = 'DESC', $langcode = '', $otherfilters = 'null')
|
||||
function getPagesFromSearchCriterias($type, $algo, $searchstring, $max = 25, $sortfield = 'date_creation', $sortorder = 'DESC', $langcode = '', $otherfilters = 'null', $status = 1)
|
||||
{
|
||||
global $conf, $db, $hookmanager, $langs, $mysoc, $user, $website, $websitepage, $weblangs; // Very important. Required to have var available when running inluded containers.
|
||||
|
||||
@ -852,7 +853,9 @@ function getPagesFromSearchCriterias($type, $algo, $searchstring, $max = 25, $so
|
||||
$sql .= ', '.MAIN_DB_PREFIX.'categorie_website_page as cwp';
|
||||
}
|
||||
$sql .= " WHERE wp.fk_website = ".$website->id;
|
||||
$sql .= " AND wp.status = 1";
|
||||
if ($status >= 0) {
|
||||
$sql .= " AND wp.status = ".$status;
|
||||
}
|
||||
if ($langcode) {
|
||||
$sql .= " AND wp.lang ='".$db->escape($langcode)."'";
|
||||
}
|
||||
|
||||
@ -222,27 +222,32 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->don->enabled && $leftmenu=="donations"', __HANDLER__, 'left', 2002__+MAX_llx_menu__, 'billing', '', 2000__+MAX_llx_menu__, '/don/list.php?mainmenu=billing&leftmenu=donations', 'List', 1, 'donations', '$user->rights->don->lire', '', 2, 1, __ENTITY__);
|
||||
-- insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->don->enabled && $leftmenu=="donations"', __HANDLER__, 'left', 2003__+MAX_llx_menu__, 'billing', '', 2000__+MAX_llx_menu__, '/don/stats/index.php?mainmenu=billing&leftmenu=donations', 'Statistics', 1, 'donations', '$user->rights->don->lire', '', 2, 2, __ENTITY__);
|
||||
-- Special expenses
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled || $conf->salaries->enabled || $conf->loan->enabled || $conf->banque->enabled', __HANDLER__, 'left', 2200__+MAX_llx_menu__, 'billing', 'tax', 6__+MAX_llx_menu__, '/compta/charges/index.php?mainmenu=billing&leftmenu=tax', 'MenuSpecialExpenses', 0, 'compta', '(! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) || (! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->read)) || (! empty($conf->loan->enabled) && $user->rights->loan->read) || (! empty($conf->banque->enabled) && $user->rights->banque->lire)', '', 0, 6, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->salaries->enabled', __HANDLER__, 'left', 2210__+MAX_llx_menu__, 'billing', 'tax_sal', 2200__+MAX_llx_menu__, '/salaries/list.php?mainmenu=billing&leftmenu=tax_salary', 'Salaries', 1, 'salaries', '$user->rights->salaries->read', '', 0, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->salaries->enabled && $leftmenu=="tax_salary"', __HANDLER__, 'left', 2211__+MAX_llx_menu__, 'billing', '', 2210__+MAX_llx_menu__, '/salaries/card.php?mainmenu=billing&leftmenu=tax_salary&action=create', 'NewPayment', 2, 'companies', '$user->rights->salaries->write', '', 0, 2, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->salaries->enabled && $leftmenu=="tax_salary"', __HANDLER__, 'left', 2212__+MAX_llx_menu__, 'billing', '', 2210__+MAX_llx_menu__, '/salaries/list.php?mainmenu=billing&leftmenu=tax_salary', 'Payments', 2, 'companies', '$user->rights->salaries->read', '', 0, 3, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->salaries->enabled && $leftmenu=="tax_salary"', __HANDLER__, 'left', 2213__+MAX_llx_menu__, 'billing', '', 2210__+MAX_llx_menu__, '/salaries/stats/index.php?mainmenu=billing&leftmenu=tax_salary', 'Statistics', 2, 'companies', '$user->rights->salaries->read', '', 0, 4, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->loan->enabled', __HANDLER__, 'left', 2220__+MAX_llx_menu__, 'billing', 'tax_loan', 2200__+MAX_llx_menu__, '/loan/list.php?mainmenu=billing&leftmenu=tax_loan', 'Loans', 1, 'loan', '$user->rights->loan->read', '', 0, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->loan->enabled && $leftmenu=="tax_loan"', __HANDLER__, 'left', 2221__+MAX_llx_menu__, 'billing', '', 2220__+MAX_llx_menu__, '/loan/card.php?mainmenu=billing&leftmenu=tax_loan&action=create', 'NewLoan', 2, 'loan', '$user->rights->loan->write', '', 0, 2, __ENTITY__);
|
||||
--insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->loan->enabled && $leftmenu=="tax_loan"', __HANDLER__, 'left', 2222__+MAX_llx_menu__, 'billing', '', 2220__+MAX_llx_menu__, '/loan/payment/list.php?mainmenu=billing&leftmenu=tax_loan', 'Payments', 2, 'companies', '$user->rights->loan->read', '', 0, 3, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->loan->enabled && $leftmenu=="tax_loan" && ! empty($conf->global->LOAN_SHOW_CALCULATOR)', __HANDLER__, 'left', 2223__+MAX_llx_menu__, 'billing', '', 2220__+MAX_llx_menu__, '/loan/calc.php?mainmenu=billing&leftmenu=tax_loan', 'Calculator', 2, 'companies', '$user->rights->loan->calc', '', 0, 4, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled || $conf->salaries->enabled || $conf->loan->enabled || $conf->banque->enabled', __HANDLER__, 'left', 2200__+MAX_llx_menu__, 'billing', 'tax', 6__+MAX_llx_menu__, '/compta/charges/index.php?mainmenu=billing&leftmenu=tax', 'MenuTaxesAndSpecialExpenses', 0, 'compta', '(! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) || (! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->read)) || (! empty($conf->loan->enabled) && $user->rights->loan->read) || (! empty($conf->banque->enabled) && $user->rights->banque->lire)', '', 0, 6, __ENTITY__);
|
||||
-- Social contributions
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled', __HANDLER__, 'left', 2250__+MAX_llx_menu__, 'billing', 'tax_social', 2200__+MAX_llx_menu__, '/compta/sociales/list.php?mainmenu=billing&leftmenu=tax_social', 'SocialContributions', 1, '', '$user->rights->tax->charges->lire', '', 0, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && $leftmenu=="tax_social"', __HANDLER__, 'left', 2251__+MAX_llx_menu__, 'billing', '', 2250__+MAX_llx_menu__, '/compta/sociales/card.php?mainmenu=billing&leftmenu=tax_social&action=create', 'MenuNewSocialContribution', 2, '', '$user->rights->tax->charges->creer', '', 0, 2, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && $leftmenu=="tax_social"', __HANDLER__, 'left', 2252__+MAX_llx_menu__, 'billing', '', 2250__+MAX_llx_menu__, '/compta/sociales/payments.php?mainmenu=billing&leftmenu=tax_social&mode=sconly', 'Payments', 2, '', '$user->rights->tax->charges->lire', '', 0, 3, __ENTITY__);
|
||||
-- VAT
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS)', __HANDLER__, 'left', 2300__+MAX_llx_menu__, 'billing', 'tax_vat', 2200__+MAX_llx_menu__, '/compta/tva/list.php?mainmenu=billing&leftmenu=tax_vat', 'VAT', 1, 'companies', '$user->rights->tax->charges->lire', '', 0, 7, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2301__+MAX_llx_menu__, 'billing', '', 2300__+MAX_llx_menu__, '/compta/tva/card.php?mainmenu=billing&leftmenu=tax_vat&action=create', 'New', 2, 'companies', '$user->rights->tax->charges->creer', '', 0, 0, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2302__+MAX_llx_menu__, 'billing', '', 2300__+MAX_llx_menu__, '/compta/tva/list.php?mainmenu=billing&leftmenu=tax_vat', 'List', 2, 'companies', '$user->rights->tax->charges->lire', '', 0, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2303__+MAX_llx_menu__, 'billing', '', 2300__+MAX_llx_menu__, '/compta/tva/index.php?mainmenu=billing&leftmenu=tax_vat', 'ReportByMonth', 2, 'companies', '$user->rights->tax->charges->lire', '', 0, 2, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2304__+MAX_llx_menu__, 'billing', '', 2300__+MAX_llx_menu__, '/compta/tva/clients.php?mainmenu=billing&leftmenu=tax_vat', 'ReportByCustomers', 2, 'companies', '$user->rights->tax->charges->lire', '', 0, 3, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2305__+MAX_llx_menu__, 'billing', '', 2300__+MAX_llx_menu__, '/compta/tva/quadri_detail.php?mainmenu=billing&leftmenu=tax_vat', 'ReportByQuarter', 2, 'companies', '$user->rights->tax->charges->lire', '', 0, 4, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->banque->enabled && empty($conf->global->BANK_USE_OLD_VARIOUS_PAYMENT)', __HANDLER__, 'left', 2350__+MAX_llx_menu__, 'billing', 'tax_various', 2200__+MAX_llx_menu__, '/compta/bank/various_payment/list.php?mainmenu=billing&leftmenu=tax_various', 'MenuVariousPayment', 1, 'banks', '$user->rights->banque->lire', '', 0, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->banque->enabled && $leftmenu=="tax_various"', __HANDLER__, 'left', 2351__+MAX_llx_menu__, 'billing', '', 2350__+MAX_llx_menu__, '/compta/bank/various_payment/card.php?mainmenu=billing&leftmenu=tax_various&action=create', 'New', 2, 'various_payment', '$user->rights->banque->modifier', '', 0, 2, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->banque->enabled && $leftmenu=="tax_various"', __HANDLER__, 'left', 2352__+MAX_llx_menu__, 'billing', '', 2350__+MAX_llx_menu__, '/compta/bank/various_payment/list.php?mainmenu=billing&leftmenu=tax_various', 'List', 2, 'various_payment', '$user->rights->banque->lire', '', 0, 3, __ENTITY__);
|
||||
-- Salary
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->salaries->enabled', __HANDLER__, 'left', 2210__+MAX_llx_menu__, 'billing', 'tax_sal', 6__+MAX_llx_menu__, '/salaries/list.php?mainmenu=billing&leftmenu=tax_salary', 'Salaries', 0, 'salaries', '$user->rights->salaries->read', '', 0, 10, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->salaries->enabled && $leftmenu=="tax_salary"', __HANDLER__, 'left', 2211__+MAX_llx_menu__, 'billing', '', 2210__+MAX_llx_menu__, '/salaries/card.php?mainmenu=billing&leftmenu=tax_salary&action=create', 'NewPayment', 1, 'companies', '$user->rights->salaries->write', '', 0, 2, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->salaries->enabled && $leftmenu=="tax_salary"', __HANDLER__, 'left', 2212__+MAX_llx_menu__, 'billing', '', 2210__+MAX_llx_menu__, '/salaries/list.php?mainmenu=billing&leftmenu=tax_salary', 'Payments', 1, 'companies', '$user->rights->salaries->read', '', 0, 3, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->salaries->enabled && $leftmenu=="tax_salary"', __HANDLER__, 'left', 2213__+MAX_llx_menu__, 'billing', '', 2210__+MAX_llx_menu__, '/salaries/stats/index.php?mainmenu=billing&leftmenu=tax_salary', 'Statistics', 1, 'companies', '$user->rights->salaries->read', '', 0, 4, __ENTITY__);
|
||||
-- Loan
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->loan->enabled', __HANDLER__, 'left', 2220__+MAX_llx_menu__, 'billing', 'tax_loan', 6__+MAX_llx_menu__, '/loan/list.php?mainmenu=billing&leftmenu=tax_loan', 'Loans', 0, 'loan', '$user->rights->loan->read', '', 0, 20, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->loan->enabled && $leftmenu=="tax_loan"', __HANDLER__, 'left', 2221__+MAX_llx_menu__, 'billing', '', 2220__+MAX_llx_menu__, '/loan/card.php?mainmenu=billing&leftmenu=tax_loan&action=create', 'NewLoan', 1, 'loan', '$user->rights->loan->write', '', 0, 2, __ENTITY__);
|
||||
--insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->loan->enabled && $leftmenu=="tax_loan"', __HANDLER__, 'left', 2222__+MAX_llx_menu__, 'billing', '', 2220__+MAX_llx_menu__, '/loan/payment/list.php?mainmenu=billing&leftmenu=tax_loan', 'Payments', 1, 'companies', '$user->rights->loan->read', '', 0, 3, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->loan->enabled && $leftmenu=="tax_loan" && ! empty($conf->global->LOAN_SHOW_CALCULATOR)', __HANDLER__, 'left', 2223__+MAX_llx_menu__, 'billing', '', 2220__+MAX_llx_menu__, '/loan/calc.php?mainmenu=billing&leftmenu=tax_loan', 'Calculator', 1, 'companies', '$user->rights->loan->calc', '', 0, 4, __ENTITY__);
|
||||
-- Various payments
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->banque->enabled && empty($conf->global->BANK_USE_OLD_VARIOUS_PAYMENT)', __HANDLER__, 'left', 2350__+MAX_llx_menu__, 'billing', 'tax_various', 6__+MAX_llx_menu__, '/compta/bank/various_payment/list.php?mainmenu=billing&leftmenu=tax_various', 'MenuVariousPayment', 0, 'banks', '$user->rights->banque->lire', '', 0, 30, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->banque->enabled && $leftmenu=="tax_various"', __HANDLER__, 'left', 2351__+MAX_llx_menu__, 'billing', '', 2350__+MAX_llx_menu__, '/compta/bank/various_payment/card.php?mainmenu=billing&leftmenu=tax_various&action=create', 'New', 1, 'various_payment', '$user->rights->banque->modifier', '', 0, 2, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->banque->enabled && $leftmenu=="tax_various"', __HANDLER__, 'left', 2352__+MAX_llx_menu__, 'billing', '', 2350__+MAX_llx_menu__, '/compta/bank/various_payment/list.php?mainmenu=billing&leftmenu=tax_various', 'List', 1, 'various_payment', '$user->rights->banque->lire', '', 0, 3, __ENTITY__);
|
||||
-- Accounting (Double entries)
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2400__+MAX_llx_menu__, 'accountancy', 'accountancy', 9__+MAX_llx_menu__, '/accountancy/index.php?mainmenu=accountancy&leftmenu=accountancy', 'MenuAccountancy', 0, 'main', '! empty($conf->accounting->enabled) || $user->rights->accounting->bind->write || $user->rights->accounting->bind->write || $user->rights->compta->resultat->lire', '', 0, 7, __ENTITY__);
|
||||
-- Setup
|
||||
|
||||
@ -1092,7 +1092,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
||||
global $mysoc;
|
||||
|
||||
$permtoshowmenu = ((!empty($conf->tax->enabled) && $user->rights->tax->charges->lire) || (!empty($conf->salaries->enabled) && !empty($user->rights->salaries->read)) || (!empty($conf->loan->enabled) && $user->rights->loan->read) || (!empty($conf->banque->enabled) && $user->rights->banque->lire));
|
||||
$newmenu->add("/compta/charges/index.php?leftmenu=tax&mainmenu=billing", $langs->trans("MenuSpecialExpenses"), 0, $permtoshowmenu, '', $mainmenu, 'tax');
|
||||
$newmenu->add("/compta/charges/index.php?leftmenu=tax&mainmenu=billing", $langs->trans("MenuTaxesAndSpecialExpenses"), 0, $permtoshowmenu, '', $mainmenu, 'tax');
|
||||
|
||||
// Social contributions
|
||||
if (!empty($conf->tax->enabled))
|
||||
@ -1147,11 +1147,11 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
||||
if (!empty($conf->salaries->enabled))
|
||||
{
|
||||
$langs->load("salaries");
|
||||
$newmenu->add("/salaries/list.php?leftmenu=tax_salary&mainmenu=billing", $langs->trans("Salaries"), 1, $user->rights->salaries->read, '', $mainmenu, 'tax_salary');
|
||||
$newmenu->add("/salaries/list.php?leftmenu=tax_salary&mainmenu=billing", $langs->trans("Salaries"), 0, $user->rights->salaries->read, '', $mainmenu, 'tax_salary');
|
||||
if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_salary/i', $leftmenu)) {
|
||||
$newmenu->add("/salaries/card.php?leftmenu=tax_salary&action=create", $langs->trans("NewPayment"), 2, $user->rights->salaries->write);
|
||||
$newmenu->add("/salaries/list.php?leftmenu=tax_salary", $langs->trans("Payments"), 2, $user->rights->salaries->read);
|
||||
$newmenu->add("/salaries/stats/index.php?leftmenu=tax_salary", $langs->trans("Statistics"), 2, $user->rights->salaries->read);
|
||||
$newmenu->add("/salaries/card.php?leftmenu=tax_salary&action=create", $langs->trans("NewPayment"), 1, $user->rights->salaries->write);
|
||||
$newmenu->add("/salaries/list.php?leftmenu=tax_salary", $langs->trans("Payments"), 1, $user->rights->salaries->read);
|
||||
$newmenu->add("/salaries/stats/index.php?leftmenu=tax_salary", $langs->trans("Statistics"), 1, $user->rights->salaries->read);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1159,9 +1159,9 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
||||
if (!empty($conf->loan->enabled))
|
||||
{
|
||||
$langs->load("loan");
|
||||
$newmenu->add("/loan/list.php?leftmenu=tax_loan&mainmenu=billing", $langs->trans("Loans"), 1, $user->rights->loan->read, '', $mainmenu, 'tax_loan');
|
||||
$newmenu->add("/loan/list.php?leftmenu=tax_loan&mainmenu=billing", $langs->trans("Loans"), 0, $user->rights->loan->read, '', $mainmenu, 'tax_loan');
|
||||
if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_loan/i', $leftmenu)) {
|
||||
$newmenu->add("/loan/card.php?leftmenu=tax_loan&action=create", $langs->trans("NewLoan"), 2, $user->rights->loan->write);
|
||||
$newmenu->add("/loan/card.php?leftmenu=tax_loan&action=create", $langs->trans("NewLoan"), 1, $user->rights->loan->write);
|
||||
//$newmenu->add("/loan/payment/list.php?leftmenu=tax_loan",$langs->trans("Payments"),2,$user->rights->loan->read);
|
||||
}
|
||||
}
|
||||
@ -1170,10 +1170,10 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
||||
if (!empty($conf->banque->enabled) && empty($conf->global->BANK_USE_OLD_VARIOUS_PAYMENT))
|
||||
{
|
||||
$langs->load("banks");
|
||||
$newmenu->add("/compta/bank/various_payment/list.php?leftmenu=tax_various&mainmenu=billing", $langs->trans("MenuVariousPayment"), 1, $user->rights->banque->lire, '', $mainmenu, 'tax_various');
|
||||
$newmenu->add("/compta/bank/various_payment/list.php?leftmenu=tax_various&mainmenu=billing", $langs->trans("MenuVariousPayment"), 0, $user->rights->banque->lire, '', $mainmenu, 'tax_various');
|
||||
if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_various/i', $leftmenu)) {
|
||||
$newmenu->add("/compta/bank/various_payment/card.php?leftmenu=tax_various&action=create", $langs->trans("New"), 2, $user->rights->banque->modifier);
|
||||
$newmenu->add("/compta/bank/various_payment/list.php?leftmenu=tax_various", $langs->trans("List"), 2, $user->rights->banque->lire);
|
||||
$newmenu->add("/compta/bank/various_payment/card.php?leftmenu=tax_various&action=create", $langs->trans("New"), 1, $user->rights->banque->modifier);
|
||||
$newmenu->add("/compta/bank/various_payment/list.php?leftmenu=tax_various", $langs->trans("List"), 1, $user->rights->banque->lire);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -323,7 +323,7 @@ class modAgenda extends DolibarrModules
|
||||
'type'=>'left',
|
||||
'titre'=>'List',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda',
|
||||
'url'=>'/comm/action/list.php?action=show_list&mainmenu=agenda&leftmenu=agenda',
|
||||
'langs'=>'agenda',
|
||||
'position'=>110,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
@ -337,7 +337,7 @@ class modAgenda extends DolibarrModules
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuToDoMyActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine',
|
||||
'url'=>'/comm/action/list.php?action=show_list&mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine',
|
||||
'langs'=>'agenda',
|
||||
'position'=>111,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
@ -351,7 +351,7 @@ class modAgenda extends DolibarrModules
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuDoneMyActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine',
|
||||
'url'=>'/comm/action/list.php?action=show_list&mainmenu=agenda&leftmenu=agenda&status=done&filter=mine',
|
||||
'langs'=>'agenda',
|
||||
'position'=>112,
|
||||
'perms'=>'$user->rights->agenda->myactions->read',
|
||||
@ -365,7 +365,7 @@ class modAgenda extends DolibarrModules
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuToDoActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1',
|
||||
'url'=>'/comm/action/list.php?action=show_list&mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1',
|
||||
'langs'=>'agenda',
|
||||
'position'=>113,
|
||||
'perms'=>'$user->rights->agenda->allactions->read',
|
||||
@ -379,7 +379,7 @@ class modAgenda extends DolibarrModules
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuDoneActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1',
|
||||
'url'=>'/comm/action/list.php?action=show_list&mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1',
|
||||
'langs'=>'agenda',
|
||||
'position'=>114,
|
||||
'perms'=>'$user->rights->agenda->allactions->read',
|
||||
|
||||
@ -610,13 +610,16 @@ if (!empty($usemargins) && $user->rights->margins->creer)
|
||||
if (empty($conf->global->MAIN_DISABLE_EDIT_PREDEF_PRICEHT) && empty($senderissupplier))
|
||||
{
|
||||
?>
|
||||
var pbq = parseInt($('option:selected', this).attr('data-pbq'));
|
||||
var pbq = parseInt($('option:selected', this).attr('data-pbq')); /* If product was selected with a HTML select */
|
||||
if (isNaN(pbq)) { pbq = jQuery('#idprod').attr('data-pbq'); } /* If product was selected with a HTML input with autocomplete */
|
||||
//console.log(pbq);
|
||||
|
||||
if ((jQuery('#idprod').val() > 0 || jQuery('#idprodfournprice').val()) && ! isNaN(pbq) && pbq > 0)
|
||||
{
|
||||
console.log("We are in a price per qty context, we do not call ajax/product");
|
||||
console.log("We are in a price per qty context, we do not call ajax/product, init of fields is done few lines later");
|
||||
} else {
|
||||
<?php if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) { ?>
|
||||
if (isNaN(pbq)) { console.log("We use experimental option PRODUIT_CUSTOMER_PRICES_BY_QTY or PRODUIT_CUSTOMER_PRICES_BY_QTY but we are not yet able to get the id of pbq from product combo list, so load of price may be 0 if product has differet prices"); }
|
||||
if (isNaN(pbq)) { console.log("We use experimental option PRODUIT_CUSTOMER_PRICES_BY_QTY or PRODUIT_CUSTOMER_PRICES_BY_QTY but we could not get the id of pbq from product combo list, so load of price may be 0 if product has differet prices"); }
|
||||
<?php } ?>
|
||||
// Get the HT price for the product and display it
|
||||
console.log("Load unit price without tax and set it into #price_ht for product id="+$(this).val()+" socid=<?php print $object->socid; ?>");
|
||||
@ -739,11 +742,16 @@ if (!empty($usemargins) && $user->rights->margins->creer)
|
||||
?>
|
||||
|
||||
/* To process customer price per quantity (CUSTOMER_PRICE_PER_QTY works only if combo product is not an ajax after x key pressed) */
|
||||
var pbq = parseInt($('option:selected', this).attr('data-pbq'));
|
||||
var pbq = parseInt($('option:selected', this).attr('data-pbq')); // When select is done from HTML select
|
||||
if (isNaN(pbq)) { pbq = jQuery('#idprod').attr('data-pbq'); } // When select is done from HTML input with autocomplete
|
||||
var pbqup = parseFloat($('option:selected', this).attr('data-pbqup'));
|
||||
if (isNaN(pbqup)) { pbqup = jQuery('#idprod').attr('data-pbqup'); }
|
||||
var pbqbase = $('option:selected', this).attr('data-pbqbase');
|
||||
if (isNaN(pbqbase)) { pbqbase = jQuery('#idprod').attr('data-pbqbase'); }
|
||||
var pbqqty = parseFloat($('option:selected', this).attr('data-pbqqty'));
|
||||
if (isNaN(pbqqty)) { pbqqty = jQuery('#idprod').attr('data-pbqqty'); }
|
||||
var pbqpercent = parseFloat($('option:selected', this).attr('data-pbqpercent'));
|
||||
if (isNaN(pbqpercent)) { pbqpercent = jQuery('#idprod').attr('data-pbqpercent'); }
|
||||
|
||||
if ((jQuery('#idprod').val() > 0 || jQuery('#idprodfournprice').val()) && ! isNaN(pbq) && pbq > 0)
|
||||
{
|
||||
|
||||
@ -332,7 +332,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as p ON c.fk_mode_reglement = p.id";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_input_method as cm ON cm.rowid = c.fk_input_method";
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_incoterms as i ON c.fk_incoterms = i.rowid';
|
||||
$sql .= " WHERE c.entity = ".$conf->entity;
|
||||
$sql .= " WHERE c.entity IN (".getEntity('supplier_order').")";
|
||||
if ($ref) $sql .= " AND c.ref='".$this->db->escape($ref)."'";
|
||||
else $sql .= " AND c.rowid=".$id;
|
||||
|
||||
@ -891,6 +891,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'commande_fournisseur SET billed = 1';
|
||||
$sql .= ' WHERE rowid = '.$this->id.' AND fk_statut > '.self::STATUS_DRAFT;
|
||||
|
||||
if ($this->db->query($sql))
|
||||
{
|
||||
if (!$error)
|
||||
|
||||
@ -1240,6 +1240,7 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo
|
||||
NewTranslationStringToShow=New translation string to show
|
||||
OriginalValueWas=The original translation is overwritten. Original value was:<br><br>%s
|
||||
TransKeyWithoutOriginalValue=You forced a new translation for the translation key '<strong>%s</strong>' that does not exist in any language files
|
||||
TitleNumberOfActivatedModules=Activated application|modules
|
||||
TotalNumberOfActivatedModules=Activated application/modules: <b>%s</b> / <b>%s</b>
|
||||
YouMustEnableOneModule=You must at least enable 1 module
|
||||
ClassNotFoundIntoPathWarning=Class %s not found in PHP path
|
||||
|
||||
@ -14,7 +14,7 @@ EventsNb=Number of events
|
||||
ListOfActions=List of events
|
||||
EventReports=Event reports
|
||||
Location=Location
|
||||
ToUserOfGroup=To any user in group
|
||||
ToUserOfGroup=Event assigned to any user in group
|
||||
EventOnFullDay=Event on all day(s)
|
||||
MenuToDoActions=All incomplete events
|
||||
MenuDoneActions=All terminated events
|
||||
|
||||
@ -69,6 +69,7 @@ SocialContribution=Social or fiscal tax
|
||||
SocialContributions=Social or fiscal taxes
|
||||
SocialContributionsDeductibles=Deductible social or fiscal taxes
|
||||
SocialContributionsNondeductibles=Nondeductible social or fiscal taxes
|
||||
DateOfSocialContribution=Date of social or fiscal tax
|
||||
LabelContrib=Label contribution
|
||||
TypeContrib=Type contribution
|
||||
MenuSpecialExpenses=Special expenses
|
||||
|
||||
@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=New value can't be equal to old one
|
||||
ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process.
|
||||
ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start').
|
||||
ErrorFailedToAddContact=Failed to add contact
|
||||
ErrorDateMustBeBeforeToday=The date cannot be greater than today
|
||||
ErrorDateMustBeBeforeToday=The date must be lower than today
|
||||
ErrorDateMustBeInFuture=The date must be greater than today
|
||||
ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode.
|
||||
ErrorPHPNeedModule=Error, your PHP must have module <b>%s</b> installed to use this feature.
|
||||
ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s
|
||||
|
||||
@ -1,8 +1,11 @@
|
||||
# Dolibarr language file - Source file is en_US - languages
|
||||
Language_am_ET=Ethiopian
|
||||
Language_ar_AR=Arabic
|
||||
Language_ar_EG=Arabic (Egypt)
|
||||
Language_ar_SA=Arabic
|
||||
Language_az_AZ=Azerbaijani
|
||||
Language_bn_BD=Bengali
|
||||
Language_bn_IN=Bengali (India)
|
||||
Language_bg_BG=Bulgarian
|
||||
Language_bs_BA=Bosnian
|
||||
Language_ca_ES=Catalan
|
||||
@ -20,6 +23,7 @@ Language_en_GB=English (United Kingdom)
|
||||
Language_en_IN=English (India)
|
||||
Language_en_NZ=English (New Zealand)
|
||||
Language_en_SA=English (Saudi Arabia)
|
||||
Language_en_SG=English (Singapore)
|
||||
Language_en_US=English (United States)
|
||||
Language_en_ZA=English (South Africa)
|
||||
Language_es_ES=Spanish
|
||||
@ -29,6 +33,7 @@ Language_es_CL=Spanish (Chile)
|
||||
Language_es_CO=Spanish (Colombia)
|
||||
Language_es_DO=Spanish (Dominican Republic)
|
||||
Language_es_EC=Spanish (Ecuador)
|
||||
Language_es_GT=Spanish (Guatemala)
|
||||
Language_es_HN=Spanish (Honduras)
|
||||
Language_es_MX=Spanish (Mexico)
|
||||
Language_es_PA=Spanish (Panama)
|
||||
@ -36,6 +41,7 @@ Language_es_PY=Spanish (Paraguay)
|
||||
Language_es_PE=Spanish (Peru)
|
||||
Language_es_PR=Spanish (Puerto Rico)
|
||||
Language_es_UY=Spanish (Uruguay)
|
||||
Language_es_GT=Spanish (USA)
|
||||
Language_es_VE=Spanish (Venezuela)
|
||||
Language_et_EE=Estonian
|
||||
Language_eu_ES=Basque
|
||||
@ -44,15 +50,21 @@ Language_fi_FI=Finnish
|
||||
Language_fr_BE=French (Belgium)
|
||||
Language_fr_CA=French (Canada)
|
||||
Language_fr_CH=French (Switzerland)
|
||||
Language_fr_CI=French (Cost Ivory)
|
||||
Language_fr_CM=French (Cameroun)
|
||||
Language_fr_FR=French
|
||||
Language_fr_GA=French (Gabon)
|
||||
Language_fr_NC=French (New Caledonia)
|
||||
Language_fy_NL=Frisian
|
||||
Language_gl_ES=Galician
|
||||
Language_he_IL=Hebrew
|
||||
Language_hi_IN=Hindi (India)
|
||||
Language_hr_HR=Croatian
|
||||
Language_hu_HU=Hungarian
|
||||
Language_id_ID=Indonesian
|
||||
Language_is_IS=Icelandic
|
||||
Language_it_IT=Italian
|
||||
Language_it_CH=Italian (Switzerland)
|
||||
Language_ja_JP=Japanese
|
||||
Language_ka_GE=Georgian
|
||||
Language_km_KH=Khmer
|
||||
@ -64,6 +76,7 @@ Language_lv_LV=Latvian
|
||||
Language_mk_MK=Macedonian
|
||||
Language_mn_MN=Mongolian
|
||||
Language_nb_NO=Norwegian (Bokmål)
|
||||
Language_ne_NP=Nepali
|
||||
Language_nl_BE=Dutch (Belgium)
|
||||
Language_nl_NL=Dutch
|
||||
Language_pl_PL=Polish
|
||||
@ -86,4 +99,5 @@ Language_uz_UZ=Uzbek
|
||||
Language_vi_VN=Vietnamese
|
||||
Language_zh_CN=Chinese
|
||||
Language_zh_TW=Chinese (Traditional)
|
||||
Language_zh_HK=Chinese (Hong Kong)
|
||||
Language_bh_MY=Malay
|
||||
|
||||
@ -485,6 +485,7 @@ Categories=Tags/categories
|
||||
Category=Tag/category
|
||||
By=By
|
||||
From=From
|
||||
FromDate=From
|
||||
FromLocation=From
|
||||
to=to
|
||||
To=to
|
||||
@ -703,6 +704,7 @@ MenuECM=Documents
|
||||
MenuAWStats=AWStats
|
||||
MenuMembers=Members
|
||||
MenuAgendaGoogle=Google agenda
|
||||
MenuTaxesAndSpecialExpenses=Taxes | Special expenses
|
||||
ThisLimitIsDefinedInSetup=Dolibarr limit (Menu home-setup-security): %s Kb, PHP limit: %s Kb
|
||||
NoFileFound=No documents saved in this directory
|
||||
CurrentUserLanguage=Current language
|
||||
|
||||
@ -169,6 +169,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services)
|
||||
CustomCode=Customs / Commodity / HS code
|
||||
CountryOrigin=Origin country
|
||||
Nature=Nature of product (material/finished)
|
||||
NatureOfProductShort=Nature of product
|
||||
NatureOfProductDesc=Raw material or finished product
|
||||
ShortLabel=Short label
|
||||
Unit=Unit
|
||||
p=u.
|
||||
|
||||
@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Contributor
|
||||
TypeContact_project_task_external_TASKCONTRIBUTOR=Contributor
|
||||
SelectElement=Select element
|
||||
AddElement=Link to element
|
||||
LinkToElementShort=Link to
|
||||
# Documents models
|
||||
DocumentModelBeluga=Project document template for linked objects overview
|
||||
DocumentModelBaleine=Project document template for tasks
|
||||
|
||||
@ -18,7 +18,7 @@ DeleteSending=Delete sending
|
||||
Stock=Stock
|
||||
Stocks=Stocks
|
||||
MissingStocks=Missing stocks
|
||||
StockAtDate=Stock at date
|
||||
StockAtDate=Stocks at date
|
||||
StockAtDateInPast=Date in past
|
||||
StockAtDateInFuture=Date in future
|
||||
StocksByLotSerial=Stocks by lot/serial
|
||||
@ -95,14 +95,16 @@ RealStock=Real Stock
|
||||
RealStockDesc=Physical/real stock is the stock currently in the warehouses.
|
||||
RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module):
|
||||
VirtualStock=Virtual stock
|
||||
VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.)
|
||||
VirtualStockAtDate=Virtual stock at date
|
||||
VirtualStockAtDateDesc=Virtual stock atonce all pending orders that are planned to be done before the date will be finished
|
||||
VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc)
|
||||
IdWarehouse=Id warehouse
|
||||
DescWareHouse=Description warehouse
|
||||
LieuWareHouse=Localisation warehouse
|
||||
WarehousesAndProducts=Warehouses and products
|
||||
WarehousesAndProductsBatchDetail=Warehouses and products (with detail per lot/serial)
|
||||
AverageUnitPricePMPShort=Weighted average input price
|
||||
AverageUnitPricePMP=Weighted average input price
|
||||
AverageUnitPricePMPShort=Weighted average price
|
||||
AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock.
|
||||
SellPriceMin=Selling Unit Price
|
||||
EstimatedStockValueSellShort=Value for sell
|
||||
EstimatedStockValueSell=Value for sell
|
||||
|
||||
@ -43,5 +43,5 @@ NotTheGoodQualitySupplier=Low quality
|
||||
ReputationForThisProduct=Reputation
|
||||
BuyerName=Buyer name
|
||||
AllProductServicePrices=All product / service prices
|
||||
AllProductReferencesOfSupplier=All product / service references of vendor
|
||||
AllProductReferencesOfSupplier=All references of vendor
|
||||
BuyingPriceNumShort=Vendor prices
|
||||
|
||||
@ -108,6 +108,7 @@ DisabledInMonoUserMode=Disabled in maintenance mode
|
||||
UserAccountancyCode=User accounting code
|
||||
UserLogoff=User logout
|
||||
UserLogged=User logged
|
||||
DateOfEmployment=Employment date
|
||||
DateEmployment=Employment Start Date
|
||||
DateEmploymentEnd=Employment End Date
|
||||
CantDisableYourself=You can't disable your own user record
|
||||
|
||||
@ -124,10 +124,10 @@ DateActionEnd=Date de fin
|
||||
AgendaUrlOptions1=Vous pouvez aussi ajouter les paramètres suivants pour filtrer les réponses :
|
||||
AgendaUrlOptions3=<b>logina=%s</b> pour limiter l'export aux actions dont l'utilisateur <b>%s</b> est propriétaire.
|
||||
AgendaUrlOptionsNotAdmin=<b>logina=!%s</b> pour limiter l'export aux actions non assignées à l'utilisateur <b>%s</b>.
|
||||
AgendaUrlOptions4=<b>logint=%s</b>pour limiter l'export aux actions assignées à l'utilisateur <b>%s</b> (propriétaire et autres).
|
||||
AgendaUrlOptions4=<b>logint=%s</b> pour limiter l'export aux actions assignées à l'utilisateur <b>%s</b> (propriétaire et autres).
|
||||
AgendaUrlOptionsProject=<b>project=__PROJECT_ID__</b> pour restreindre aux événements associés au projet <b>__PROJECT_ID__</b>.
|
||||
AgendaUrlOptionsNotAutoEvent=<b> notactiontype=systemauto </b> pour exclure les événements automatiques.
|
||||
AgendaUrlOptionsIncludeHolidays= <b> includeholidays = 1 </b> pour inclure les événements de type congé.
|
||||
AgendaUrlOptionsNotAutoEvent=<b>notactiontype=systemauto</b> pour exclure les événements automatiques.
|
||||
AgendaUrlOptionsIncludeHolidays=<b>includeholidays=1</b> pour inclure les événements de type congé.
|
||||
AgendaShowBirthdayEvents=Afficher les anniversaires de contacts
|
||||
AgendaHideBirthdayEvents=Masquer les anniversaires de contacts
|
||||
Busy=Occupé
|
||||
|
||||
@ -43,5 +43,5 @@ NotTheGoodQualitySupplier=Mauvaise qualité
|
||||
ReputationForThisProduct=Réputation
|
||||
BuyerName=Nom de l'acheteur
|
||||
AllProductServicePrices=Tous les prix du produits / service
|
||||
AllProductReferencesOfSupplier=Toutes les références des produits/services du fournisseur
|
||||
AllProductReferencesOfSupplier=Toutes les références du fournisseur
|
||||
BuyingPriceNumShort=Prix fournisseurs
|
||||
|
||||
@ -380,7 +380,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
print '<div class="fichecenter">';
|
||||
print '<div class="fichehalfleft">';
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border centpercent">'."\n";
|
||||
print '<table class="border centpercent tableforfield">'."\n";
|
||||
|
||||
// Common attributes
|
||||
//$keyforbreak='fieldkeytoswitchonsecondcolumn'; // We change column just before this field
|
||||
|
||||
@ -755,7 +755,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
|
||||
print '<tr>';
|
||||
print '<td>'.$tmpproduct->getNomUrl(1).'</td>';
|
||||
print '<td class="right">';
|
||||
print '<td class="right nowraponall">';
|
||||
$help = '';
|
||||
if ($line->qty_frozen) $help .= ($help ? '<br>' : '').'<strong>'.$langs->trans("QuantityFrozen").'</strong>: '.yn(1).' ('.$langs->trans("QuantityConsumedInvariable").')';
|
||||
if ($line->disable_stock_change) $help .= ($help ? '<br>' : '').'<strong>'.$langs->trans("DisableStockChange").'</strong>: '.yn(1).' ('.(($tmpproduct->type == Product::TYPE_SERVICE && empty($conf->global->STOCK_SUPPORTS_SERVICES)) ? $langs->trans("NoStockChangeOnServices") : $langs->trans("DisableStockChangeHelp")).')';
|
||||
@ -804,7 +804,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
print '</td>';
|
||||
print '<td></td>';
|
||||
print '<td class="right">'.$line2['qty'].'</td>';
|
||||
print '<td>';
|
||||
print '<td class="tdoverflowmax150">';
|
||||
if ($line2['fk_warehouse'] > 0) {
|
||||
$result = $tmpwarehouse->fetch($line2['fk_warehouse']);
|
||||
if ($result > 0) print $tmpwarehouse->getNomUrl(1);
|
||||
@ -917,7 +917,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
print '<tr>';
|
||||
print '<td>'.$tmpproduct->getNomUrl(1).'</td>';
|
||||
print '<td class="right">'.$line->qty.'</td>';
|
||||
print '<td class="right">';
|
||||
print '<td class="right nowraponall">';
|
||||
if ($alreadyproduced) {
|
||||
print '<script>';
|
||||
print 'jQuery(document).ready(function() {
|
||||
@ -953,7 +953,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
print '</td>';
|
||||
print '<td></td>';
|
||||
print '<td class="right">'.$line2['qty'].'</td>';
|
||||
print '<td>';
|
||||
print '<td class="tdoverflowmax150">';
|
||||
if ($line2['fk_warehouse'] > 0) {
|
||||
$result = $tmpwarehouse->fetch($line2['fk_warehouse']);
|
||||
if ($result > 0) print $tmpwarehouse->getNomUrl(1);
|
||||
|
||||
@ -528,6 +528,7 @@ print load_fiche_titre($langs->trans("ProductOtherConf"), '', '');
|
||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="other">';
|
||||
print '<input type="hidden" name="page_y" value="">';
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
@ -742,7 +743,9 @@ if (!empty($conf->global->PRODUCT_CANVAS_ABILITY))
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></div>';
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" class="button reposition" value="'.$langs->trans("Modify").'">';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
||||
@ -1054,7 +1054,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
||||
if ($type != 1) // Nature, Weight and volume only applies to products and not to services
|
||||
{
|
||||
// Nature
|
||||
print '<tr><td>'.$langs->trans("Nature").'</td><td colspan="3">';
|
||||
print '<tr><td>'.$form->textwithpicto($langs->trans("NatureOfProductShort"), $langs->trans("NatureOfProductDesc")).'</td><td colspan="3">';
|
||||
$statutarray = array('1' => $langs->trans("Finished"), '0' => $langs->trans("RowMaterial"));
|
||||
print $form->selectarray('finished', $statutarray, GETPOST('finished', 'alpha'), 1);
|
||||
print '</td></tr>';
|
||||
@ -1470,7 +1470,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
||||
print '</td></tr>';
|
||||
} else {
|
||||
// Nature
|
||||
print '<tr><td>'.$langs->trans("Nature").'</td><td colspan="3">';
|
||||
print '<tr><td>'.$form->textwithpicto($langs->trans("NatureOfProductShort"), $langs->trans("NatureOfProductDesc")).'</td><td colspan="3">';
|
||||
$statutarray = array('-1'=>' ', '1' => $langs->trans("Finished"), '0' => $langs->trans("RowMaterial"));
|
||||
print $form->selectarray('finished', $statutarray, $object->finished);
|
||||
print '</td></tr>';
|
||||
@ -1946,7 +1946,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
||||
print '</td></tr>';
|
||||
} else {
|
||||
// Nature
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Nature").'</td><td colspan="2">';
|
||||
print '<tr><td class="titlefield">'.$form->textwithpicto($langs->trans("NatureOfProductShort"), $langs->trans("NatureOfProductDesc")).'</td><td colspan="2">';
|
||||
print $object->getLibFinished();
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -402,19 +402,7 @@ if ($id > 0 || $ref)
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border tableforfield" width="100%">';
|
||||
|
||||
// Minimum Price
|
||||
print '<tr><td class="titlefield">'.$langs->trans("BuyingPriceMin").'</td>';
|
||||
print '<td colspan="2">';
|
||||
$product_fourn = new ProductFournisseur($db);
|
||||
if ($product_fourn->find_min_price_product_fournisseur($object->id) > 0)
|
||||
{
|
||||
if ($product_fourn->product_fourn_price_id > 0) print $product_fourn->display_price_product_fournisseur();
|
||||
else print $langs->trans("NotDefined");
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Cost price. Can be used for margin module for option "calculate margin on explicit cost price
|
||||
// Accountancy sell code
|
||||
print '<tr><td>';
|
||||
$textdesc = $langs->trans("CostPriceDescription");
|
||||
$textdesc .= "<br>".$langs->trans("CostPriceUsage");
|
||||
@ -424,7 +412,25 @@ if ($id > 0 || $ref)
|
||||
print $form->editfieldval($text, 'cost_price', $object->cost_price, $object, $usercancreate, 'amount:6');
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
// PMP
|
||||
print '<tr><td class="titlefield">'.$form->textwithpicto($langs->trans("AverageUnitPricePMPShort"), $langs->trans("AverageUnitPricePMPDesc")).'</td>';
|
||||
print '<td>';
|
||||
if ($object->pmp > 0) print price($object->pmp).' '.$langs->trans("HT");
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Best buying Price
|
||||
print '<tr><td class="titlefield">'.$langs->trans("BuyingPriceMin").'</td>';
|
||||
print '<td colspan="2">';
|
||||
$product_fourn = new ProductFournisseur($db);
|
||||
if ($product_fourn->find_min_price_product_fournisseur($object->id) > 0)
|
||||
{
|
||||
if ($product_fourn->product_fourn_price_id > 0) print $product_fourn->display_price_product_fournisseur();
|
||||
else print $langs->trans("NotDefined");
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
print '<div style="clear:both"></div>';
|
||||
|
||||
@ -450,7 +450,13 @@ if (empty($reshook))
|
||||
$sql .= $priceid.','.$price.','.$unitPrice.','.$quantity.','.$remise_percent.','.$remise.')';
|
||||
|
||||
$result = $db->query($sql);
|
||||
if (!$result) dol_print_error($db);
|
||||
if (!$result) {
|
||||
if ($db->lasterrno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') {
|
||||
setEventMessages($langs->trans("DuplicateRecord"), null, 'errors');
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -886,13 +892,14 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_
|
||||
{
|
||||
if ($action == 'edit_price_by_qty' && $rowid == $prices['rowid'] && ($user->rights->produit->creer || $user->rights->service->creer)) {
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="update_price_by_qty">';
|
||||
print '<input type="hidden" name="priceid" value="'.$object->prices_by_qty_id[$i].'">';
|
||||
print '<input type="hidden" value="'.$prices['rowid'].'" name="rowid">';
|
||||
print '<tr class="'.($ii % 2 == 0 ? 'pair' : 'impair').'">';
|
||||
print '<td><input size="5" type="text" value="'.$prices['quantity'].'" name="quantity"></td>';
|
||||
print '<td class="right" colspan="2"><input size="10" type="text" value="'.price2num($prices['price'], 'MU').'" name="price"> '.$object->price_base_type.'</td>';
|
||||
print '<td class="right"><input size="5" type="text" value="'.$prices['remise_percent'].'" name="remise_percent"> %</td>';
|
||||
print '<td class="right nowraponall"><input size="5" type="text" value="'.$prices['remise_percent'].'" name="remise_percent"> %</td>';
|
||||
print '<td class="center"><input type="submit" value="'.$langs->trans("Modify").'" class="button"></td>';
|
||||
print '</tr>';
|
||||
print '</form>';
|
||||
@ -904,9 +911,9 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_
|
||||
print '<td class="right">'.price($prices['remise_percent']).' %</td>';
|
||||
print '<td class="center">';
|
||||
if (($user->rights->produit->creer || $user->rights->service->creer)) {
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit_price_by_qty&rowid='.$prices["rowid"].'">';
|
||||
print '<a class="editfielda marginleftonly marginrightonly" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit_price_by_qty&rowid='.$prices["rowid"].'">';
|
||||
print img_edit().'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete_price_by_qty&rowid='.$prices["rowid"].'">';
|
||||
print '<a class="marginleftonly marginrightonly" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete_price_by_qty&rowid='.$prices["rowid"].'">';
|
||||
print img_delete().'</a>';
|
||||
} else {
|
||||
print ' ';
|
||||
@ -917,6 +924,7 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_
|
||||
}
|
||||
if ($action != 'edit_price_by_qty' && ($user->rights->produit->creer || $user->rights->service->creer)) {
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="update_price_by_qty">';
|
||||
print '<input type="hidden" name="priceid" value="'.$object->prices_by_qty_id[$i].'">'; // id in product_price
|
||||
print '<input type="hidden" value="0" name="rowid">'; // id in product_price
|
||||
@ -924,17 +932,17 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_
|
||||
print '<td><input size="5" type="text" value="1" name="quantity"></td>';
|
||||
print '<td class="right" class="nowrap"><input size="10" type="text" value="0" name="price"> '.$object->price_base_type.'</td>';
|
||||
print '<td class="right"> </td>';
|
||||
print '<td class="right" class="nowrap"><input size="5" type="text" value="0" name="remise_percent"> %</td>';
|
||||
print '<td class="right" class="nowraponall"><input size="5" type="text" value="0" name="remise_percent"> %</td>';
|
||||
print '<td class="center"><input type="submit" value="'.$langs->trans("Add").'" class="button"></td>';
|
||||
print '</tr>';
|
||||
print '</form>';
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=disable_price_by_qty&level='.$i.'">('.$langs->trans("DisablePriceByQty").')</a>';
|
||||
print '<a class="editfielda marginleftonly marginrightonly" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=disable_price_by_qty&level='.$i.'">('.$langs->trans("DisablePriceByQty").')</a>';
|
||||
} else {
|
||||
print $langs->trans("No");
|
||||
print ' <a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=activate_price_by_qty&level='.$i.'">('.$langs->trans("Activate").')</a>';
|
||||
print ' <a class="marginleftonly marginrightonly" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=activate_price_by_qty&level='.$i.'">('.$langs->trans("Activate").')</a>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
@ -1002,6 +1010,7 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_
|
||||
if ($action != 'edit_price_by_qty')
|
||||
{
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="POST">'; // FIXME a form into a table is not allowed
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="update_price_by_qty">';
|
||||
print '<input type="hidden" name="priceid" value="'.$object->prices_by_qty_id[0].'">'; // id in product_price
|
||||
print '<input type="hidden" value="0" name="rowid">'; // id in product_price_by_qty
|
||||
@ -1013,7 +1022,7 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_
|
||||
//print $object->price_base_type;
|
||||
print '</td>';
|
||||
print '<td class="right"> </td>';
|
||||
print '<td class="right"><input type="text" class="width50 right" value="0" name="remise_percent"> %</td>';
|
||||
print '<td class="right nowraponall"><input type="text" class="width50 right" value="0" name="remise_percent"> %</td>';
|
||||
print '<td class="center"><input type="submit" value="'.$langs->trans("Add").'" class="button"></td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -1024,6 +1033,7 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_
|
||||
if ($action == 'edit_price_by_qty' && $rowid == $prices['rowid'] && ($user->rights->produit->creer || $user->rights->service->creer))
|
||||
{
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="update_price_by_qty">';
|
||||
print '<input type="hidden" name="priceid" value="'.$object->prices_by_qty_id[0].'">'; // id in product_price
|
||||
print '<input type="hidden" value="'.$prices['rowid'].'" name="rowid">'; // id in product_price_by_qty
|
||||
@ -1035,7 +1045,7 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_
|
||||
print $prices['price_base_type'];
|
||||
print '</td>';
|
||||
print '<td class="right"> </td>';
|
||||
print '<td class="right"><input class="width50 right" type="text" value="'.$prices['remise_percent'].'" name="remise_percent"> %</td>';
|
||||
print '<td class="right nowraponall"><input class="width50 right" type="text" value="'.$prices['remise_percent'].'" name="remise_percent"> %</td>';
|
||||
print '<td class="center"><input type="submit" value="'.$langs->trans("Modify").'" class="button"></td>';
|
||||
print '</tr>';
|
||||
print '</form>';
|
||||
@ -1052,9 +1062,9 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_
|
||||
print '<td class="center">';
|
||||
if (($user->rights->produit->creer || $user->rights->service->creer))
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit_price_by_qty&rowid='.$prices["rowid"].'">';
|
||||
print '<a class="editfielda marginleftonly marginrightonly" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit_price_by_qty&rowid='.$prices["rowid"].'">';
|
||||
print img_edit().'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete_price_by_qty&rowid='.$prices["rowid"].'">';
|
||||
print '<a class="marginleftonly marginrightonly" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete_price_by_qty&rowid='.$prices["rowid"].'">';
|
||||
print img_delete().'</a>';
|
||||
} else {
|
||||
print ' ';
|
||||
@ -1837,6 +1847,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES))
|
||||
if (count($prodcustprice->lines) > 0)
|
||||
{
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
@ -1951,6 +1962,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES))
|
||||
print_barre_liste($langs->trans('PriceByCustomer'), $page, $_SERVER ['PHP_SELF'], $option, $sortfield, $sortorder, '', count($prodcustprice->lines), $nbtotalofrecords, 'title_accountancy.png');
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
@ -323,7 +323,7 @@ if ($resql)
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($virtualdiffersfromphysical) print_liste_field_titre("VirtualStock", $_SERVER["PHP_SELF"], "", $param, "", '', $sortfield, $sortorder, 'right ');
|
||||
if ($virtualdiffersfromphysical) print_liste_field_titre("VirtualStock", $_SERVER["PHP_SELF"], "", $param, "", '', $sortfield, $sortorder, 'right ', 'VirtualStockDesc');
|
||||
// Units
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
print_liste_field_titre("Unit", $_SERVER["PHP_SELF"], "unit_short", $param, "", 'align="right"', $sortfield, $sortorder);
|
||||
|
||||
@ -220,7 +220,7 @@ if ($id > 0 || !empty($ref))
|
||||
print_liste_field_titre("CustomerCode", $_SERVER["PHP_SELF"], "s.code_client", "", $option, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("DateInvoice", $_SERVER["PHP_SELF"], "f.datef", "", $option, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Qty", $_SERVER["PHP_SELF"], "d.qty", "", $option, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("AmountHT", $_SERVER["PHP_SELF"], "f.total", "", $option, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("AmountHT", $_SERVER["PHP_SELF"], "d.total_ht", "", $option, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "f.paye,f.fk_statut", "", $option, 'align="right"', $sortfield, $sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
@ -54,7 +54,7 @@ if (!empty($conf->variants->enabled)) {
|
||||
}
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadlangs(array('products', 'orders', 'bills', 'stocks', 'sendings'));
|
||||
$langs->loadlangs(array('products', 'suppliers', 'orders', 'bills', 'stocks', 'sendings', 'margins'));
|
||||
if (!empty($conf->productbatch->enabled)) $langs->load("productbatch");
|
||||
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
@ -542,8 +542,18 @@ if ($id > 0 || $ref)
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Cost price. Can be used for margin module for option "calculate margin on explicit cost price
|
||||
print '<tr><td>';
|
||||
$textdesc = $langs->trans("CostPriceDescription");
|
||||
$textdesc .= "<br>".$langs->trans("CostPriceUsage");
|
||||
$text = $form->textwithpicto($langs->trans("CostPrice"), $textdesc, 1, 'help', '');
|
||||
print $form->editfieldkey($text, 'cost_price', $object->cost_price, $object, $usercancreate, 'amount:6');
|
||||
print '</td><td colspan="2">';
|
||||
print $form->editfieldval($text, 'cost_price', $object->cost_price, $object, $usercancreate, 'amount:6');
|
||||
print '</td></tr>';
|
||||
|
||||
// PMP
|
||||
print '<tr><td class="titlefield">'.$langs->trans("AverageUnitPricePMP").'</td>';
|
||||
print '<tr><td class="titlefield">'.$form->textwithpicto($langs->trans("AverageUnitPricePMPShort"), $langs->trans("AverageUnitPricePMPDesc")).'</td>';
|
||||
print '<td>';
|
||||
if ($object->pmp > 0) print price($object->pmp).' '.$langs->trans("HT");
|
||||
print '</td>';
|
||||
@ -621,6 +631,8 @@ if ($id > 0 || $ref)
|
||||
print '</td>';
|
||||
print '<td>'.price2num($object->stock_reel, 'MS');
|
||||
if ($object->seuil_stock_alerte != '' && ($object->stock_reel < $object->seuil_stock_alerte)) print ' '.img_warning($langs->trans("StockLowerThanLimit", $object->seuil_stock_alerte));
|
||||
|
||||
print ' <a href="'.DOL_URL_ROOT.'/product/stock/stockatdate.php?productid='.$object->id.'">'.$langs->trans("StockAtDate").'</a>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -684,6 +696,7 @@ if ($id > 0 || $ref)
|
||||
//print (empty($stocktheo)?0:$stocktheo);
|
||||
print $form->textwithpicto((empty($stocktheo) ? 0 : $stocktheo), $helpondiff);
|
||||
if ($object->seuil_stock_alerte != '' && ($object->stock_theorique < $object->seuil_stock_alerte)) print ' '.img_warning($langs->trans("StockLowerThanLimit", $object->seuil_stock_alerte));
|
||||
print ' <a href="'.DOL_URL_ROOT.'/product/stock/stockatdate.php?mode=future&productid='.$object->id.'">'.$langs->trans("VirtualStockAtDate").'</a>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -703,7 +716,7 @@ if ($id > 0 || $ref)
|
||||
print '<tr><td class="tdtop">'.$langs->trans("LastMovement").'</td><td>';
|
||||
if ($lastmovementdate) {
|
||||
print dol_print_date($lastmovementdate, 'dayhour').' ';
|
||||
print '(<a href="'.DOL_URL_ROOT.'/product/stock/movement_list.php?idproduct='.$object->id.'">'.$langs->trans("FullList").'</a>)';
|
||||
print ' <a href="'.DOL_URL_ROOT.'/product/stock/movement_list.php?idproduct='.$object->id.'">'.$langs->trans("FullList").'</a>';
|
||||
} else {
|
||||
print '<a href="'.DOL_URL_ROOT.'/product/stock/movement_list.php?idproduct='.$object->id.'">'.$langs->trans("None").'</a>';
|
||||
}
|
||||
@ -790,7 +803,7 @@ if (!$variants) {
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="4">'.$langs->trans("Warehouse").'</td>';
|
||||
print '<td class="right">'.$langs->trans("NumberOfUnit").'</td>';
|
||||
print '<td class="right">'.$langs->trans("AverageUnitPricePMPShort").'</td>';
|
||||
print '<td class="right">'.$form->textwithpicto($langs->trans("AverageUnitPricePMPShort"), $langs->trans("AverageUnitPricePMPDesc")).'</td>';
|
||||
print '<td class="right">'.$langs->trans("EstimatedStockValueShort").'</td>';
|
||||
print '<td class="right">'.$langs->trans("SellPriceMin").'</td>';
|
||||
print '<td class="right">'.$langs->trans("EstimatedStockValueSellShort").'</td>';
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2013-2018 Laurent Destaileur <ely@users.sourceforge.net>
|
||||
* Copyright (C) 2013-2020 Laurent Destaileur <ely@users.sourceforge.net>
|
||||
* Copyright (C) 2014 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2016 ATM Consulting <support@atm-consulting.fr>
|
||||
@ -59,9 +59,10 @@ if (GETPOSTISSET('dateday') && GETPOSTISSET('datemonth') && GETPOSTISSET('dateye
|
||||
$dateendofday = dol_mktime(23, 59, 59, GETPOST('datemonth', 'int'), GETPOST('dateday', 'int'), GETPOST('dateyear', 'int'));
|
||||
}
|
||||
|
||||
$now = dol_now();
|
||||
|
||||
$productid = GETPOST('productid', 'int');
|
||||
$fk_warehouse = GETPOST('fk_warehouse', 'int');
|
||||
$texte = '';
|
||||
|
||||
$sortfield = GETPOST('sortfield', 'alpha');
|
||||
$sortorder = GETPOST('sortorder', 'alpha');
|
||||
@ -80,6 +81,19 @@ $parameters = array();
|
||||
$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');
|
||||
|
||||
$dateIsValid= true;
|
||||
if ($mode == 'future') {
|
||||
if ($date && $date < $now) {
|
||||
setEventMessages($langs->trans("ErrorDateMustBeInFuture"), null, 'errors');
|
||||
$dateIsValid= false;
|
||||
}
|
||||
} else {
|
||||
if ($date && $date > $now) {
|
||||
setEventMessages($langs->trans("ErrorDateMustBeBeforeToday"), null, 'errors');
|
||||
$dateIsValid= false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
@ -99,11 +113,10 @@ if ($conf->global->ENTREPOT_EXTRA_STATUS) {
|
||||
$warehouseStatus[] = Entrepot::STATUS_OPEN_INTERNAL;
|
||||
}
|
||||
|
||||
|
||||
// Get array with current stock per product, warehouse
|
||||
$stock_prod_warehouse = array();
|
||||
$stock_prod = array();
|
||||
if ($date) { // Avoid heavy sql if mandatory date is not defined
|
||||
if ($date && $dateIsValid) { // Avoid heavy sql if mandatory date is not defined
|
||||
$sql = "SELECT ps.fk_product, ps.fk_entrepot as fk_warehouse,";
|
||||
$sql .= " SUM(ps.reel) AS stock";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."product_stock as ps";
|
||||
@ -146,13 +159,17 @@ if ($date) { // Avoid heavy sql if mandatory date is not defined
|
||||
dol_print_error($db);
|
||||
}
|
||||
//var_dump($stock_prod_warehouse);
|
||||
} elseif ($action == 'filter') {
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors');
|
||||
}
|
||||
|
||||
// Get array with list of stock movements between date and now (for product/warehouse=
|
||||
$movements_prod_warehouse = array();
|
||||
$movements_prod = array();
|
||||
if ($date) {
|
||||
$sql = "SELECT sm.fk_product, sm.fk_entrepot, SUM(sm.value) AS stock";
|
||||
$movements_prod_warehouse_nb = array();
|
||||
$movements_prod_nb = array();
|
||||
if ($date && $dateIsValid) {
|
||||
$sql = "SELECT sm.fk_product, sm.fk_entrepot, SUM(sm.value) AS stock, COUNT(sm.rowid) AS nbofmovement";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."stock_mouvement as sm";
|
||||
$sql .= ", ".MAIN_DB_PREFIX."entrepot as w";
|
||||
$sql .= " WHERE w.entity IN (".getEntity('stock').")";
|
||||
@ -184,12 +201,15 @@ if ($date) {
|
||||
$fk_product = $obj->fk_product;
|
||||
$fk_entrepot = $obj->fk_entrepot;
|
||||
$stock = $obj->stock;
|
||||
$nbofmovement = $obj->nbofmovement;
|
||||
|
||||
// Pour llx_product_stock.reel
|
||||
$movements_prod_warehouse[$fk_product][$fk_entrepot] = $stock;
|
||||
$movements_prod_warehouse_nb[$fk_product][$fk_entrepot] = $nbofmovement;
|
||||
|
||||
// Pour llx_product.stock
|
||||
$movements_prod[$fk_product] += $stock;
|
||||
$movements_prod_nb[$fk_product] += $nbofmovement;
|
||||
|
||||
$i++;
|
||||
}
|
||||
@ -259,7 +279,7 @@ if ($sortfield == 'stock' && $fk_warehouse > 0) {
|
||||
}
|
||||
$sql .= $db->order($sortfield, $sortorder);
|
||||
|
||||
if ($date) { // We avoid a heavy sql if mandatory parameter date not yet defined
|
||||
if ($date && $dateIsValid) { // We avoid a heavy sql if mandatory parameter date not yet defined
|
||||
$nbtotalofrecords = '';
|
||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||
{
|
||||
@ -355,7 +375,7 @@ print '<div class="div-table-responsive">'; // You can use div-table-responsive-
|
||||
print '<table class="liste centpercent">';
|
||||
|
||||
$stocklabel = $langs->trans('StockAtDate');
|
||||
if ($mode == 'future') $stocklabel = $langs->trans("VirtualStock");
|
||||
if ($mode == 'future') $stocklabel = $langs->trans("VirtualStockAtDate");
|
||||
|
||||
//print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST" name="formulaire">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
@ -371,6 +391,9 @@ print '<td class="liste_titre"><input class="flat" type="text" name="search_nom"
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
if ($mode == 'future') {
|
||||
print '<td class="liste_titre"></td>';
|
||||
}
|
||||
// Fields from hook
|
||||
$parameters = array('param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook
|
||||
@ -394,7 +417,8 @@ print_liste_field_titre('Label', $_SERVER["PHP_SELF"], 'p.label', $param, '', ''
|
||||
if ($mode == 'future') {
|
||||
print_liste_field_titre('CurrentStock', $_SERVER["PHP_SELF"], $fieldtosortcurrentstock, $param, '', '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre('', $_SERVER["PHP_SELF"]);
|
||||
print_liste_field_titre($stocklabel, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre($stocklabel, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'right ', 'VirtualStockAtDateDesc');
|
||||
print_liste_field_titre('VirtualStock', $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'right ', 'VirtualStockDesc');
|
||||
} else {
|
||||
print_liste_field_titre($stocklabel, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre('', $_SERVER["PHP_SELF"]);
|
||||
@ -453,18 +477,21 @@ while ($i < ($limit ? min($num, $limit) : $num))
|
||||
}
|
||||
|
||||
if ($mode == 'future') {
|
||||
$prod->load_stock('warehouseopen, warehouseinternal', 0);
|
||||
$prod->load_stock('warehouseopen, warehouseinternal', 0); // This call also ->load_virtual_stock()
|
||||
|
||||
//$result = $prod->load_stats_reception(0, '4');
|
||||
//print $prod->stats_commande_fournisseur['qty'].'<br>'."\n";
|
||||
//print $prod->stats_reception['qty'];
|
||||
|
||||
$stock = 123;
|
||||
$stock = '<span class="opacitymedium">'.$langs->trans("FeatureNotYetAvailable").'</span>';
|
||||
$virtualstock = $prod->stock_theorique;
|
||||
} else {
|
||||
if ($fk_warehouse > 0) {
|
||||
$stock = $currentstock - $movements_prod_warehouse[$objp->rowid][$fk_warehouse];
|
||||
$nbofmovement = $movements_prod_warehouse_nb[$objp->rowid][$fk_warehouse];
|
||||
} else {
|
||||
$stock = $currentstock - $movements_prod[$objp->rowid];
|
||||
$nbofmovement = $movements_prod_nb[$objp->rowid];
|
||||
}
|
||||
}
|
||||
|
||||
@ -485,16 +512,24 @@ while ($i < ($limit ? min($num, $limit) : $num))
|
||||
|
||||
print '<td class="right"></td>';
|
||||
|
||||
// Stock at date
|
||||
// Virtual stock at date
|
||||
print '<td class="right">'.$stock.'</td>';
|
||||
|
||||
// Final virtual stock
|
||||
print '<td class="right">'.$virtualstock.'</td>';
|
||||
} else {
|
||||
// Stock at date
|
||||
print '<td class="right">'.$stock.'</td>';
|
||||
print '<td class="right">'.($stock ? $stock : '<span class="opacitymedium">'.$stock.'</span>').'</td>';
|
||||
|
||||
print '<td class="right"><a href="'.DOL_URL_ROOT.'/product/stock/movement_list.php?idproduct='.$objp->rowid.($fk_warehouse > 0 ? '&search_warehouse='.$fk_warehouse : '').'">'.$langs->trans("Movements").'</a></td>';
|
||||
print '<td class="right">';
|
||||
if ($nbofmovement > 0) {
|
||||
print '<a href="'.DOL_URL_ROOT.'/product/stock/movement_list.php?idproduct='.$objp->rowid.($fk_warehouse > 0 ? '&search_warehouse='.$fk_warehouse : '').'">'.$langs->trans("Movements").'</a>';
|
||||
print ' <span class="tabs"><span class="badge">'.$nbofmovement.'</span></span>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
// Current stock
|
||||
print '<td class="right">'.$currentstock.'</td>';
|
||||
print '<td class="right">'.($currentstock ? $currentstock : '<span class="opacitymedium">0</span>').'</td>';
|
||||
}
|
||||
|
||||
// Action
|
||||
|
||||
@ -1088,7 +1088,7 @@ if ($action == 'create' && $user->rights->projet->creer)
|
||||
|
||||
// Description
|
||||
print '<td class="titlefield tdtop">'.$langs->trans("Description").'</td><td>';
|
||||
print nl2br($object->description);
|
||||
print dol_htmlentitiesbr($object->description);
|
||||
print '</td></tr>';
|
||||
|
||||
// Categories
|
||||
|
||||
@ -591,7 +591,7 @@ if (!$showdatefilter)
|
||||
{
|
||||
print '<div class="center centpercent">';
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION["newtoken"].'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="tablename" value="'.$tablename.'">';
|
||||
print '<input type="hidden" name="action" value="view">';
|
||||
print '<table class="center"><tr>';
|
||||
@ -876,7 +876,7 @@ foreach ($listofreferent as $key => $value)
|
||||
|
||||
if (empty($conf->global->PROJECT_LINK_ON_OVERWIEW_DISABLED) && $idtofilterthirdparty && !in_array($tablename, $exclude_select_element))
|
||||
{
|
||||
$selectList = $formproject->select_element($tablename, $idtofilterthirdparty, 'minwidth300', -2, !empty($project_field) ? $project_field : 'fk_projet');
|
||||
$selectList = $formproject->select_element($tablename, $idtofilterthirdparty, 'minwidth300 minwidth75imp', -2, !empty($project_field) ? $project_field : 'fk_projet');
|
||||
if ($selectList < 0)
|
||||
{
|
||||
setEventMessages($formproject->error, $formproject->errors, 'errors');
|
||||
@ -885,14 +885,14 @@ foreach ($listofreferent as $key => $value)
|
||||
// Define form with the combo list of elements to link
|
||||
$addform .= '<div class="inline-block valignmiddle">';
|
||||
$addform .= '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
|
||||
$addform .= '<input type="hidden" name="token" value="'.$_SESSION["newtoken"].'">';
|
||||
$addform .= '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
$addform .= '<input type="hidden" name="tablename" value="'.$tablename.'">';
|
||||
$addform .= '<input type="hidden" name="action" value="addelement">';
|
||||
$addform .= '<input type="hidden" name="datesrfc" value="'.dol_print_date($dates, 'dayhourrfc').'">';
|
||||
$addform .= '<input type="hidden" name="dateerfc" value="'.dol_print_date($datee, 'dayhourrfc').'">';
|
||||
$addform .= '<table><tr><td>'.$langs->trans("SelectElement").'</td>';
|
||||
$addform .= '<table><tr><td><span class="hideonsmartphone opacitymedium">'.$langs->trans("SelectElement").'</span></td>';
|
||||
$addform .= '<td>'.$selectList.'</td>';
|
||||
$addform .= '<td><input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("AddElement")).'"></td>';
|
||||
$addform .= '<td><input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("LinkToElementShort")).'"></td>';
|
||||
$addform .= '</tr></table>';
|
||||
$addform .= '</form>';
|
||||
$addform .= '</div>';
|
||||
@ -901,9 +901,9 @@ foreach ($listofreferent as $key => $value)
|
||||
if (empty($conf->global->PROJECT_CREATE_ON_OVERVIEW_DISABLED) && $urlnew)
|
||||
{
|
||||
$addform .= '<div class="inline-block valignmiddle">';
|
||||
if ($testnew) $addform .= '<a class="buttonxxx" href="'.$urlnew.'"><span class="valignmiddle text-plus-circle">'.($buttonnew ? $langs->trans($buttonnew) : $langs->trans("Create")).'</span><span class="fa fa-plus-circle valignmiddle paddingleft"></span></a>';
|
||||
if ($testnew) $addform .= '<a class="buttonxxx" href="'.$urlnew.'"><span class="valignmiddle text-plus-circle hideonsmartphone">'.($buttonnew ? $langs->trans($buttonnew) : $langs->trans("Create")).'</span><span class="fa fa-plus-circle valignmiddle paddingleft"></span></a>';
|
||||
elseif (empty($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)) {
|
||||
$addform .= '<a class="buttonxxx buttonRefused" disabled="disabled" href="#"><span class="valignmiddle text-plus-circle">'.($buttonnew ? $langs->trans($buttonnew) : $langs->trans("Create")).'</span><span class="fa fa-plus-circle valignmiddle paddingleft"></span></a>';
|
||||
$addform .= '<a class="buttonxxx buttonRefused" disabled="disabled" href="#"><span class="valignmiddle text-plus-circle hideonsmartphone">'.($buttonnew ? $langs->trans($buttonnew) : $langs->trans("Create")).'</span><span class="fa fa-plus-circle valignmiddle paddingleft"></span></a>';
|
||||
}
|
||||
$addform .= '<div>';
|
||||
}
|
||||
@ -911,6 +911,7 @@ foreach ($listofreferent as $key => $value)
|
||||
print load_fiche_titre($langs->trans($title), $addform, '');
|
||||
|
||||
print "\n".'<!-- Table for tablename = '.$tablename.' -->'."\n";
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
@ -1027,7 +1028,7 @@ foreach ($listofreferent as $key => $value)
|
||||
print "</td>\n";
|
||||
|
||||
// Ref
|
||||
print '<td class="left nowrap">';
|
||||
print '<td class="left nowraponall">';
|
||||
if ($tablename == 'expensereport_det')
|
||||
{
|
||||
print $expensereport->getNomUrl(1);
|
||||
@ -1334,6 +1335,7 @@ foreach ($listofreferent as $key => $value)
|
||||
}
|
||||
}
|
||||
print "</table>";
|
||||
print '</div>';
|
||||
print "<br>\n";
|
||||
}
|
||||
}
|
||||
|
||||
@ -62,6 +62,7 @@ $search_task_ref_parent = GETPOST('search_task_ref_parent');
|
||||
$search_project_user = GETPOST('search_project_user');
|
||||
$search_task_user = GETPOST('search_task_user');
|
||||
$search_task_progress = GETPOST('search_task_progress');
|
||||
$search_societe = GETPOST('search_societe');
|
||||
|
||||
$mine = $_REQUEST['mode'] == 'mine' ? 1 : 0;
|
||||
if ($mine) { $search_task_user = $user->id; $mine = 0; }
|
||||
|
||||
@ -2077,9 +2077,11 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment
|
||||
<?php if (is_object($object) && is_object($object->thirdparty) && !empty($object->thirdparty->phone)) { ?>, phone: '<?php echo dol_escape_js($object->thirdparty->phone); ?>'<?php } ?>
|
||||
<?php if (is_object($object) && is_object($object->thirdparty)) { ?>, address: {
|
||||
city: '<?php echo dol_escape_js($object->thirdparty->town); ?>',
|
||||
country: '<?php echo dol_escape_js($object->thirdparty->country_code); ?>',
|
||||
<?php if ($object->thirdparty->country_code) { ?>country: '<?php echo dol_escape_js($object->thirdparty->country_code); ?>',<?php } ?>
|
||||
line1: '<?php echo dol_escape_js(preg_replace('/\s\s+/', ' ', $object->thirdparty->address)); ?>',
|
||||
postal_code: '<?php echo dol_escape_js($object->thirdparty->zip); ?>'}<?php } ?>
|
||||
postal_code: '<?php echo dol_escape_js($object->thirdparty->zip); ?>'
|
||||
}
|
||||
<?php } ?>
|
||||
}
|
||||
},
|
||||
save_payment_method: <?php if ($stripecu) { print 'true'; } else { print 'false'; } ?> /* true when a customer was provided when creating payment intent. true ask to save the card */
|
||||
@ -2208,7 +2210,7 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment
|
||||
var hiddenInput2 = document.createElement('input');
|
||||
hiddenInput2.setAttribute('type', 'hidden');
|
||||
hiddenInput2.setAttribute('name', 'token');
|
||||
hiddenInput2.setAttribute('value', '<?php echo $_SESSION["newtoken"]; ?>');
|
||||
hiddenInput2.setAttribute('value', '<?php echo newToken(); ?>');
|
||||
form.appendChild(hiddenInput2);
|
||||
|
||||
// Submit the form
|
||||
@ -2232,7 +2234,7 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment
|
||||
var hiddenInput2 = document.createElement('input');
|
||||
hiddenInput2.setAttribute('type', 'hidden');
|
||||
hiddenInput2.setAttribute('name', 'token');
|
||||
hiddenInput2.setAttribute('value', '<?php echo $_SESSION["newtoken"]; ?>');
|
||||
hiddenInput2.setAttribute('value', '<?php echo newToken(); ?>');
|
||||
form.appendChild(hiddenInput2);
|
||||
|
||||
// Submit the form
|
||||
|
||||
@ -313,7 +313,7 @@ if (!$ret) {
|
||||
dol_fiche_head($head, 'resources', $langs->trans("Action"), -1, 'action');
|
||||
|
||||
$linkback = img_picto($langs->trans("BackToList"), 'object_list', 'class="hideonsmartphone pictoactionview"');
|
||||
$linkback .= '<a href="'.DOL_URL_ROOT.'/comm/action/list.php">'.$langs->trans("BackToList").'</a>';
|
||||
$linkback .= '<a href="'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
// Link to other agenda views
|
||||
$out = '';
|
||||
|
||||
@ -58,7 +58,7 @@ class Client extends Societe
|
||||
// phpcs:enable
|
||||
global $user;
|
||||
|
||||
$this->nb = array("customers" => 0, "prospects" => 0);
|
||||
$this->nb = array("prospects" => 0, "customers" => 0);
|
||||
$clause = "WHERE";
|
||||
|
||||
$sql = "SELECT count(s.rowid) as nb, s.client";
|
||||
|
||||
@ -1119,7 +1119,7 @@ while ($i < min($num, $limit))
|
||||
// Country
|
||||
if (!empty($arrayfields['country.code_iso']['checked']))
|
||||
{
|
||||
print '<td class="center">';
|
||||
print '<td class="center tdoverflowmax100">';
|
||||
$labelcountry = ($obj->country_code && ($langs->trans("Country".$obj->country_code) != "Country".$obj->country_code)) ? $langs->trans("Country".$obj->country_code) : $obj->country_label;
|
||||
print $labelcountry;
|
||||
print '</td>';
|
||||
@ -1209,14 +1209,14 @@ while ($i < min($num, $limit))
|
||||
{
|
||||
print '<td class="center">';
|
||||
$s = '';
|
||||
if (($obj->client == 2 || $obj->client == 3) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS))
|
||||
{
|
||||
$s .= '<a class="customer-back opacitymedium" title="'.$langs->trans("Prospect").'" href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$companystatic->id.'">'.dol_substr($langs->trans("Prospect"), 0, 1).'</a>';
|
||||
}
|
||||
if (($obj->client == 1 || $obj->client == 3) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))
|
||||
{
|
||||
$s .= '<a class="customer-back" title="'.$langs->trans("Customer").'" href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$companystatic->id.'">'.dol_substr($langs->trans("Customer"), 0, 1).'</a>';
|
||||
}
|
||||
if (($obj->client == 2 || $obj->client == 3) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS))
|
||||
{
|
||||
$s .= '<a class="customer-back" title="'.$langs->trans("Prospect").'" href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$companystatic->id.'">'.dol_substr($langs->trans("Prospect"), 0, 1).'</a>';
|
||||
}
|
||||
if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && $obj->fournisseur)
|
||||
{
|
||||
$s .= '<a class="vendor-back" title="'.$langs->trans("Supplier").'" href="'.DOL_URL_ROOT.'/fourn/card.php?socid='.$companystatic->id.'">'.dol_substr($langs->trans("Supplier"), 0, 1).'</a>';
|
||||
|
||||
@ -7,8 +7,10 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?>
|
||||
--btncolorbg: #fbfbfb;
|
||||
--btncolorborderhover: none;
|
||||
--btncolorborder: #FFF;
|
||||
--butactionbg:rgb(218, 235, 225);
|
||||
--butactiondeletebg: rgb(234,228,225);
|
||||
/* tertiary color */
|
||||
--butactionbg:rgb(218, 235, 225);
|
||||
/* --butactionbg:rgb(228, 218, 235); */
|
||||
}
|
||||
|
||||
<?php
|
||||
@ -195,7 +197,7 @@ TITLE BUTTON
|
||||
|
||||
.btnTitle, a.btnTitle {
|
||||
display: inline-block;
|
||||
padding: 4px 12px 4px 12px;
|
||||
padding: 4px 4px 4px 4px;
|
||||
font-weight: 400;
|
||||
/* line-height: 1; */
|
||||
text-align: center;
|
||||
@ -211,8 +213,8 @@ TITLE BUTTON
|
||||
box-shadow: var(--btncolorbg);
|
||||
text-decoration: none;
|
||||
position: relative;
|
||||
margin: 0 0 0 10px;
|
||||
min-width: 80px;
|
||||
/* margin: 0 0 0 8px; */
|
||||
min-width: 72px;
|
||||
text-align: center;
|
||||
color: var(--btncolortext);
|
||||
border: none;
|
||||
@ -239,7 +241,6 @@ a.btnTitle.btnTitleSelected {
|
||||
border: 1px solid #bbb;
|
||||
border-radius: 3px;
|
||||
position: relative;
|
||||
margin: 0 0 0 10px;
|
||||
text-align: center;
|
||||
/* color: #ffffff;
|
||||
background-color: rgb(<?php print $colortextlink; ?>); */
|
||||
|
||||
@ -312,11 +312,6 @@ a.buttonticket {
|
||||
/* height: 40px; */
|
||||
}
|
||||
|
||||
/* Used by categories */
|
||||
span.categorysquarre {
|
||||
padding: 0 4px 0 4px;
|
||||
}
|
||||
|
||||
/* Used by timesheets */
|
||||
span.timesheetalreadyrecorded input {
|
||||
border: none;
|
||||
@ -499,10 +494,17 @@ div.floatright
|
||||
{
|
||||
float:<?php print $right; ?>;
|
||||
}
|
||||
.block
|
||||
{
|
||||
display:block;
|
||||
}
|
||||
.inline-block
|
||||
{
|
||||
display:inline-block;
|
||||
}
|
||||
.largenumber {
|
||||
font-size: 1.4em;
|
||||
}
|
||||
|
||||
th .button {
|
||||
-webkit-box-shadow: none !important;
|
||||
@ -696,7 +698,9 @@ body[class*="colorblind-"] .text-success{
|
||||
|
||||
.fa-toggle-on, .fa-toggle-off { font-size: 2em; }
|
||||
.websiteselectionsection .fa-toggle-on, .websiteselectionsection .fa-toggle-off,
|
||||
.asetresetmodule .fa-toggle-on, .asetresetmodule .fa-toggle-off {
|
||||
.asetresetmodule .fa-toggle-on, .asetresetmodule .fa-toggle-off,
|
||||
.tdwebsitesearchresult .fa-toggle-on, .tdwebsitesearchresult .fa-toggle-off
|
||||
{
|
||||
font-size: 1.5em; vertical-align: text-bottom;
|
||||
}
|
||||
|
||||
@ -1091,6 +1095,7 @@ table[summary="list_of_modules"] .fa-cog {
|
||||
.maxwidth50imp { max-width: 50px !important; }
|
||||
.maxwidth75imp { max-width: 75px !important; }
|
||||
.minheight20 { min-height: 20px; }
|
||||
.minheight30 { min-height: 30px; }
|
||||
.minheight40 { min-height: 40px; }
|
||||
.titlefieldcreate { width: 20%; }
|
||||
.titlefield { /* width: 25%; */ width: 250px; }
|
||||
@ -4057,6 +4062,9 @@ div.backgreypublicpayment { background-color: #f0f0f0; padding: 20px; border-bot
|
||||
#tablepublicpayment .CTableRow1 { background-color: #F0F0F0 !important; }
|
||||
#tablepublicpayment tr.liste_total { border-bottom: 1px solid #CCCCCC !important; }
|
||||
#tablepublicpayment tr.liste_total td { border-top: none; }
|
||||
input#cardholder-name {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.divmainbodylarge { margin-left: 40px; margin-right: 40px; }
|
||||
#divsubscribe { max-width: 900px; }
|
||||
@ -4404,6 +4412,7 @@ span.websitebuttonsitepreviewdisabled img, a.websitebuttonsitepreviewdisabled im
|
||||
table.cal_month { border-spacing: 0px; }
|
||||
table.cal_month td:first-child { border-left: 0px; }
|
||||
table.cal_month td:last-child { border-right: 0px; }
|
||||
table.cal_month td { padding-left: 1px !important; padding-right: 1px !important; }
|
||||
.cal_current_month { border-top: 0; border-left: solid 1px #E0E0E0; border-right: 0; border-bottom: solid 1px #E0E0E0; }
|
||||
.cal_current_month_peruserleft { border-top: 0; border-left: solid 2px #6C7C7B; border-right: 0; border-bottom: solid 1px #E0E0E0; }
|
||||
.cal_current_month_oneday { border-right: solid 1px #E0E0E0; }
|
||||
@ -4420,11 +4429,17 @@ table.cal_month td:last-child { border-right: 0px; }
|
||||
.cal_today_peruser_peruserleft { background: #FDFDF0; border-left: solid 2px #6C7C7B; border-right: solid 1px #E0E0E0; border-bottom: solid 1px #E0E0E0; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; }
|
||||
.cal_past { }
|
||||
.cal_peruser { padding-top: 0 !important; padding-bottom: 0 !important; padding-<?php print $left; ?>: 1px !important; padding-<?php print $right; ?>: 1px !important; }
|
||||
.cal_impair { background: #F8F8F8; }
|
||||
.cal_impair {
|
||||
background: linear-gradient(bottom, var(--colorbacklinepair1) 85%, var(--colorbacklinepair2) 100%);
|
||||
background: -o-linear-gradient(bottom, var(--colorbacklinepair1) 85%, var(--colorbacklinepair2) 100%);
|
||||
background: -moz-linear-gradient(bottom, var(--colorbacklinepair1) 85%, var(--colorbacklinepair2) 100%);
|
||||
background: -webkit-linear-gradient(bottom, var(--colorbacklinepair1) 85%, var(--colorbacklinepair2) 100%);
|
||||
/* background: -ms-linear-gradient(bottom, var(--colorbacklinepair1) 85%, var(--colorbacklinepair2) 100%); */
|
||||
}
|
||||
.cal_today_peruser_impair { background: #F8F8F0; }
|
||||
.peruser_busy { }
|
||||
.peruser_notbusy { opacity: 0.5; }
|
||||
table.cal_event { border: none; border-collapse: collapse; margin-bottom: 1px; min-height: 20px; }
|
||||
table.cal_event { border: none; border-collapse: collapse; margin-bottom: 1px; min-height: 20px; filter: saturate(0.8); border-radius: 3px; }
|
||||
table.cal_event td { border: none; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 2px; padding-top: 0px; padding-bottom: 0px; }
|
||||
table.cal_event td.cal_event { padding: 4px 4px !important; }
|
||||
table.cal_event td.cal_event_right { padding: 4px 4px !important; }
|
||||
@ -4435,6 +4450,7 @@ table.cal_event td.cal_event_right { padding: 4px 4px !important; }
|
||||
.cal_event_busy a:hover { color: #111111; font-weight: normal !important; color:rgba(255,255,255,.75); }
|
||||
.cal_event_busy { }
|
||||
.cal_peruserviewname { max-width: 140px; height: 22px; }
|
||||
table.cal_month tr td table.nobordernopadding tr td { padding: 0 2px 0 2px; }
|
||||
|
||||
.calendarviewcontainertr { height: 100px; }
|
||||
|
||||
|
||||
@ -59,8 +59,8 @@ $colorbacktabcard1 = '255,255,255'; // card
|
||||
$colorbacktabactive = '234,234,234';
|
||||
$colorbacklineimpair1 = '255,255,255'; // line impair
|
||||
$colorbacklineimpair2 = '255,255,255'; // line impair
|
||||
$colorbacklinepair1 = '251,251,251'; // line pair
|
||||
$colorbacklinepair2 = '251,251,251'; // line pair
|
||||
$colorbacklinepair1 = '250,250,250'; // line pair
|
||||
$colorbacklinepair2 = '250,250,250'; // line pair
|
||||
$colorbacklinepairhover = '230,237,244'; // line hover
|
||||
$colorbacklinepairchecked = '230,237,244'; // line checked
|
||||
$colorbacklinebreak = '248,247,244'; // line break
|
||||
|
||||
@ -633,10 +633,17 @@ div.floatright
|
||||
{
|
||||
float:<?php print $right; ?>;
|
||||
}
|
||||
.block
|
||||
{
|
||||
display:block;
|
||||
}
|
||||
.inline-block
|
||||
{
|
||||
display:inline-block;
|
||||
}
|
||||
.largenumber {
|
||||
font-size: 1.4em;
|
||||
}
|
||||
|
||||
th .button {
|
||||
-webkit-box-shadow: none !important;
|
||||
@ -1162,6 +1169,7 @@ table[summary="list_of_modules"] .fa-cog {
|
||||
.maxwidth50imp { max-width: 50px !important; }
|
||||
.maxwidth75imp { max-width: 75px !important; }
|
||||
.minheight20 { min-height: 20px; }
|
||||
.minheight30 { min-height: 30px; }
|
||||
.minheight40 { min-height: 40px; }
|
||||
.titlefieldcreate { width: 20%; }
|
||||
.titlefield { /* width: 25%; */ width: 250px; }
|
||||
|
||||
@ -185,8 +185,8 @@ class Ticket extends CommonObject
|
||||
'track_id' => array('type'=>'varchar(255)', 'label'=>'TicketTrackId', 'visible'=>-2, 'enabled'=>1, 'position'=>11, 'notnull'=>-1, 'searchall'=>1, 'help'=>"Help text"),
|
||||
'fk_user_create' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Author', 'visible'=>1, 'enabled'=>1, 'position'=>15, 'notnull'=>1, 'css'=>'tdoverflowmax150 maxwidth150onsmartphone'),
|
||||
'origin_email' => array('type'=>'mail', 'label'=>'OriginEmail', 'visible'=>-2, 'enabled'=>1, 'position'=>16, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object", 'css'=>'tdoverflowmax150'),
|
||||
'subject' => array('type'=>'varchar(255)', 'label'=>'Subject', 'visible'=>1, 'enabled'=>1, 'position'=>18, 'notnull'=>-1, 'searchall'=>1, 'help'=>"", 'css'=>'maxwidth75', 'autofocusoncreate'=>1),
|
||||
'type_code' => array('type'=>'varchar(32)', 'label'=>'Type', 'visible'=>1, 'enabled'=>1, 'position'=>20, 'notnull'=>-1, 'searchall'=>1, 'help'=>"", 'css'=>'maxwidth100'),
|
||||
'subject' => array('type'=>'varchar(255)', 'label'=>'Subject', 'visible'=>1, 'enabled'=>1, 'position'=>18, 'notnull'=>-1, 'searchall'=>1, 'help'=>"", 'css'=>'maxwidth200', 'autofocusoncreate'=>1),
|
||||
'type_code' => array('type'=>'varchar(32)', 'label'=>'Type', 'visible'=>1, 'enabled'=>1, 'position'=>20, 'notnull'=>-1, 'searchall'=>1, 'help'=>"", 'css'=>'maxwidth150'),
|
||||
'category_code' => array('type'=>'varchar(32)', 'label'=>'TicketGroup', 'visible'=>-1, 'enabled'=>1, 'position'=>21, 'notnull'=>-1, 'help'=>"", 'css'=>'maxwidth100'),
|
||||
'severity_code' => array('type'=>'varchar(32)', 'label'=>'Severity', 'visible'=>1, 'enabled'=>1, 'position'=>22, 'notnull'=>-1, 'help'=>"", 'css'=>'maxwidth100'),
|
||||
'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'visible'=>1, 'enabled'=>1, 'position'=>50, 'notnull'=>-1, 'index'=>1, 'searchall'=>1, 'help'=>"LinkToThirparty", 'css'=>'tdoverflowmax150 maxwidth150onsmartphone'),
|
||||
|
||||
@ -1085,73 +1085,6 @@ if ($action == 'create' || $action == 'adduserldap')
|
||||
}
|
||||
}
|
||||
}
|
||||
// // Skype
|
||||
// if (! empty($conf->socialnetworks->enabled))
|
||||
// {
|
||||
// print '<tr><td>'.$langs->trans("Skype").'</td>';
|
||||
// print '<td>';
|
||||
// if (! empty($ldap_skype))
|
||||
// {
|
||||
// print '<input type="hidden" name="skype" value="'.$ldap_skype.'">';
|
||||
// print $ldap_skype;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// print '<input class="maxwidth200" type="text" name="skype" value="'.GETPOST('skype', 'alpha').'">';
|
||||
// }
|
||||
// print '</td></tr>';
|
||||
// }
|
||||
|
||||
// // Twitter
|
||||
// if (! empty($conf->socialnetworks->enabled))
|
||||
// {
|
||||
// print '<tr><td>'.$langs->trans("Twitter").'</td>';
|
||||
// print '<td>';
|
||||
// if (! empty($ldap_twitter))
|
||||
// {
|
||||
// print '<input type="hidden" name="twitter" value="'.$ldap_twitter.'">';
|
||||
// print $ldap_twitter;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// print '<input class="maxwidth200" type="text" name="twitter" value="'.GETPOST('twitter', 'alpha').'">';
|
||||
// }
|
||||
// print '</td></tr>';
|
||||
// }
|
||||
|
||||
// // Facebook
|
||||
// if (! empty($conf->socialnetworks->enabled))
|
||||
// {
|
||||
// print '<tr><td>'.$langs->trans("Facebook").'</td>';
|
||||
// print '<td>';
|
||||
// if (! empty($ldap_facebook))
|
||||
// {
|
||||
// print '<input type="hidden" name="facebook" value="'.$ldap_facebook.'">';
|
||||
// print $ldap_facebook;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// print '<input class="maxwidth200" type="text" name="facebook" value="'.GETPOST('facebook', 'alpha').'">';
|
||||
// }
|
||||
// print '</td></tr>';
|
||||
// }
|
||||
|
||||
// // LinkedIn
|
||||
// if (! empty($conf->socialnetworks->enabled))
|
||||
// {
|
||||
// print '<tr><td>'.$langs->trans("LinkedIn").'</td>';
|
||||
// print '<td>';
|
||||
// if (! empty($ldap_linkedin))
|
||||
// {
|
||||
// print '<input type="hidden" name="linkedin" value="'.$ldap_linkedin.'">';
|
||||
// print $ldap_linkedin;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// print '<input class="maxwidth200" type="text" name="linkedin" value="'.GETPOST('linkedin', 'alpha').'">';
|
||||
// }
|
||||
// print '</td></tr>';
|
||||
// }
|
||||
|
||||
// Accountancy code
|
||||
if ($conf->accounting->enabled)
|
||||
@ -1661,16 +1594,22 @@ if ($action == 'create' || $action == 'adduserldap')
|
||||
print "</tr>\n";
|
||||
|
||||
// Date employment
|
||||
print '<tr><td>'.$langs->trans("DateEmployment").'</td>';
|
||||
print '<tr><td>'.$langs->trans("DateOfEmployment").'</td>';
|
||||
print '<td>';
|
||||
print dol_print_date($object->dateemployment, 'day');
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
if ($object->dateemployment) {
|
||||
print '<span class="opacitymedium">'.$langs->trans("FromDate ").'</span>';
|
||||
print dol_print_date($object->dateemployment, 'day');
|
||||
}
|
||||
//print '</td>';
|
||||
//print "</tr>\n";
|
||||
|
||||
// Date employment
|
||||
print '<tr><td>'.$langs->trans("DateEmploymentEnd").'</td>';
|
||||
print '<td>';
|
||||
print dol_print_date($object->dateemploymentend);
|
||||
//print '<tr><td>'.$langs->trans("DateEmploymentEnd").'</td>';
|
||||
//print '<td>';
|
||||
if ($object->dateemploymentend) {
|
||||
print '<span class="opacitymedium"> - '.$langs->trans("To ").'</span>';
|
||||
print dol_print_date($object->dateemploymentend, 'day');
|
||||
}
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
@ -102,7 +102,6 @@ $sql .= ", u.ldap_sid";
|
||||
$sql .= ", u.photo";
|
||||
$sql .= ", u.admin";
|
||||
$sql .= ", u.email";
|
||||
$sql .= ", u.skype";
|
||||
$sql .= ", s.nom as name";
|
||||
$sql .= ", s.code_client";
|
||||
$sql .= ", s.canvas";
|
||||
@ -144,7 +143,6 @@ if ($resql)
|
||||
$fuserstatic->photo = $obj->photo;
|
||||
$fuserstatic->admin = $obj->admin;
|
||||
$fuserstatic->email = $obj->email;
|
||||
$fuserstatic->skype = $obj->skype;
|
||||
$fuserstatic->socid = $obj->fk_soc;
|
||||
|
||||
$companystatic->id = $obj->fk_soc;
|
||||
|
||||
@ -288,7 +288,7 @@ if ($action == 'replacesiteconfirm') {
|
||||
$otherfilters['category'] = GETPOST('optioncategory', 'int');
|
||||
}
|
||||
|
||||
$listofpages = getPagesFromSearchCriterias($containertype, $algo, $searchkey, 1000, $sortfield, $sortorder, $langcode, $otherfilters);
|
||||
$listofpages = getPagesFromSearchCriterias($containertype, $algo, $searchkey, 1000, $sortfield, $sortorder, $langcode, $otherfilters, -1);
|
||||
}
|
||||
|
||||
$usercanedit = $user->rights->website->write;
|
||||
@ -424,7 +424,7 @@ if ($massaction == 'setcategory' && GETPOST('confirmmassaction', 'alpha') && $us
|
||||
$db->commit();
|
||||
}
|
||||
// Now we reload list
|
||||
$listofpages = getPagesFromSearchCriterias($containertype, $algo, $searchkey, 1000, $sortfield, $sortorder, $langcode, $otherfilters);
|
||||
$listofpages = getPagesFromSearchCriterias($containertype, $algo, $searchkey, 1000, $sortfield, $sortorder, $langcode, $otherfilters, -1);
|
||||
}
|
||||
|
||||
// Replacement of string into pages
|
||||
@ -3557,6 +3557,7 @@ if ($action == 'editmeta' || $action == 'createcontainer')
|
||||
|
||||
if ($action != 'createcontainer')
|
||||
{
|
||||
print '<!-- Status of page -->'."\n";
|
||||
print '<tr><td>';
|
||||
print $langs->trans('Status');
|
||||
print '</td><td>';
|
||||
@ -3829,7 +3830,6 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction =
|
||||
print getTitleFieldOfList("Type", 0, $_SERVER['PHP_SELF'], 'type_container', '', $param, '', $sortfield, $sortorder, '')."\n";
|
||||
print getTitleFieldOfList("Page", 0, $_SERVER['PHP_SELF'], 'pageurl', '', $param, '', $sortfield, $sortorder, '')."\n";
|
||||
print getTitleFieldOfList("Categories", 0, $_SERVER['PHP_SELF']);
|
||||
//print getTitleFieldOfList("Description", 0, $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, '')."\n";
|
||||
print getTitleFieldOfList("", 0, $_SERVER['PHP_SELF']);
|
||||
print getTitleFieldOfList("", 0, $_SERVER['PHP_SELF']);
|
||||
print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
|
||||
@ -3859,7 +3859,7 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction =
|
||||
print '<span class="opacitymedium">'.$answerrecord->description.'</span>';
|
||||
print '</td>';
|
||||
|
||||
// Categories
|
||||
// Categories - Tags
|
||||
print '<td>';
|
||||
if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire))
|
||||
{
|
||||
@ -3868,7 +3868,7 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction =
|
||||
if (is_array($existing)) {
|
||||
foreach ($existing as $tmpcategory) {
|
||||
//var_dump($tmpcategory);
|
||||
print '<span class="categorysquarre marginrightonly" style="background-color: #'.($tmpcategory->color != '' ? $tmpcategory->color : '888').'" title="'.dol_escape_htmltag($langs->trans("Category").' '.$tmpcategory->label).'"></span>';
|
||||
print img_object($langs->trans("Category").' : '.$tmpcategory->label, 'category', 'style="padding-left: 2px; padding-right: 2px; color: #'.($tmpcategory->color != '' ? $tmpcategory->color : '888').'"');
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3886,30 +3886,37 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction =
|
||||
$param .= '&optioncategory='.GETPOST('optioncategory', 'aZ09');
|
||||
$param .= '&searchstring='.urlencode($searchkey);
|
||||
|
||||
// Edit properties
|
||||
// Language
|
||||
print '<td>';
|
||||
print $answerrecord->lang;
|
||||
print '</td>';
|
||||
|
||||
// Edit properties, HTML sources, status
|
||||
print '<td class="tdwebsitesearchresult right nowraponall">';
|
||||
$disabled = '';
|
||||
$urltoedithtmlsource = $_SERVER["PHP_SELF"].'?action=editmeta&websiteid='.$website->id.'&pageid='.$answerrecord->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].$param);
|
||||
if (empty($user->rights->website->write)) {
|
||||
$disabled = ' disabled';
|
||||
$urltoedithtmlsource = '';
|
||||
}
|
||||
print '<a class="editfielda '.$disabled.'" href="'.$urltoedithtmlsource.'" title="'.$langs->trans("EditPageMeta").'">'.img_picto($langs->trans("EditPageMeta"), 'pencil-ruler').'</a>';
|
||||
print '</td>';
|
||||
print '<a class="editfielda marginleftonly marginrightonly '.$disabled.'" href="'.$urltoedithtmlsource.'" title="'.$langs->trans("EditPageMeta").'">'.img_picto($langs->trans("EditPageMeta"), 'pencil-ruler').'</a>';
|
||||
|
||||
// Edit HTML source
|
||||
print '<td>';
|
||||
$disabled = '';
|
||||
$urltoedithtmlsource = $_SERVER["PHP_SELF"].'?action=editsource&websiteid='.$website->id.'&pageid='.$answerrecord->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].$param);
|
||||
if (empty($user->rights->website->write)) {
|
||||
$disabled = ' disabled';
|
||||
$urltoedithtmlsource = '';
|
||||
}
|
||||
print '<a class="editfielda '.$disabled.'" href="'.$urltoedithtmlsource.'" title="'.$langs->trans("EditHTMLSource").'">'.img_picto($langs->trans("EditHTMLSource"), 'edit').'</a>';
|
||||
print '<a class="editfielda marginleftonly marginrightonly '.$disabled.'" href="'.$urltoedithtmlsource.'" title="'.$langs->trans("EditHTMLSource").'">'.img_picto($langs->trans("EditHTMLSource"), 'edit').'</a>';
|
||||
|
||||
print '<span class="marginleftonly marginrightonly"></span>'.ajax_object_onoff($answerrecord, 'status', 'status', 'Enabled', 'Disabled');
|
||||
|
||||
print '</td>';
|
||||
|
||||
// Action column
|
||||
print '<td class="nowrap center">';
|
||||
|
||||
print '<!-- Status of page -->'."\n";
|
||||
if ($massactionbutton || $massaction)
|
||||
{
|
||||
$selected = 0;
|
||||
@ -3956,10 +3963,11 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction =
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=editcss&website='.$website->ref.'&backtopage='.urlencode($backtopageurl).'">'.$langs->trans("EditCss").'</a>';
|
||||
print '</td>';
|
||||
|
||||
// Language
|
||||
print '<td>';
|
||||
print '</td>';
|
||||
|
||||
print '<td class="tdoverflow100">';
|
||||
print '<td>';
|
||||
print '</td>';
|
||||
|
||||
// Action column
|
||||
@ -3974,7 +3982,7 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction =
|
||||
print '<br>';
|
||||
}
|
||||
else {
|
||||
print $listofpages['message'];
|
||||
print '<div class="warning">'.$listofpages['message'].'</div>';
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user