diff --git a/ChangeLog b/ChangeLog index d44e811c15c..bef57215417 100644 --- a/ChangeLog +++ b/ChangeLog @@ -33,6 +33,7 @@ NEW: add costprice in fields of products list NEW: added an import profile for CUSTOMER ORDER, PO, PROPOSAL MODULE, SUPPLIER INVOICE NEW: added incoterms data into the substitution array NEW: add employee link in expense report binding page +NEW: add EORI No. as ProfID5 NEW: add export for various payment NEW: add Extrafields labels and values in mail on create ticket NEW: add Extrafields support on ECM module @@ -80,9 +81,9 @@ NEW: add tracking number in list and search_all items NEW: add two hooks printFieldListFrom and printFieldSearchParam NEW: add __TYPE__ substitution key NEW: add validation of MX domain for emails -NEW: add vcard for aderent and user +NEW: add vcard for adherent and user NEW: add week number for month view in agenda -NEW: Algeria data (tva and forme_juridique) +NEW: Algeria data (TVA and forme_juridique) NEW: allow click on all header numbers on commerce area NEW: allow to reopen interventions (green button) NEW: allow zero quality on supplier/vendor order line @@ -97,7 +98,7 @@ NEW: can change VAT rate of all lines of a draft object in one step NEW: can define date range of validity of a login during creation NEW: can disable, from edit page, the whole web site NEW: can edit and set sales representatives directly on thirdparty card -NEW: Can edit the list of sending email profiles. +NEW: can edit the list of sending email profiles NEW: can enable/disable users in bulk actions NEW: can filter on accounting system ref in export of chart of account NEW: can filter on container type, language and tags in the list of pages diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 6d663edcf4e..299a9700364 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -627,22 +627,26 @@ print '' if (count($filter)) $buttonLabel = $langs->trans("ExportFilteredList"); else $buttonLabel = $langs->trans("ExportList"); +$parameters = array(); +$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook +if (empty($reshook)) { // Button re-export -if (!empty($conf->global->ACCOUNTING_REEXPORT)) { - $newcardbutton = ''.img_picto($langs->trans("Activated"), 'switch_on').' '; -} else { - $newcardbutton = ''.img_picto($langs->trans("Disabled"), 'switch_off').' '; + if (!empty($conf->global->ACCOUNTING_REEXPORT)) { + $newcardbutton = '' . img_picto($langs->trans("Activated"), 'switch_on') . ' '; + } else { + $newcardbutton = '' . img_picto($langs->trans("Disabled"), 'switch_off') . ' '; + } + $newcardbutton .= '' . $langs->trans("IncludeDocsAlreadyExported") . ''; + + $newcardbutton .= dolGetButtonTitle($buttonLabel, $langs->trans("ExportFilteredList") . ' (' . $listofformat[$formatexportset] . ')', 'fa fa-file-export paddingleft', $_SERVER["PHP_SELF"] . '?action=export_file' . ($param ? '&' . $param : ''), $user->rights->accounting->mouvements->export); + + $newcardbutton .= dolGetButtonTitle($langs->trans('ViewFlatList'), '', 'fa fa-list paddingleft imgforviewmode', DOL_URL_ROOT . '/accountancy/bookkeeping/list.php?' . $param, '', 1, array('morecss' => 'marginleftonly btnTitleSelected')); + $newcardbutton .= dolGetButtonTitle($langs->trans('GroupByAccountAccounting'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT . '/accountancy/bookkeeping/listbyaccount.php?' . $param, '', 1, array('morecss' => 'marginleftonly')); + + $url = './card.php?action=create'; + if (!empty($socid)) $url .= '&socid=' . $socid; + $newcardbutton .= dolGetButtonTitle($langs->trans('NewAccountingMvt'), '', 'fa fa-plus-circle paddingleft', $url, '', $user->rights->accounting->mouvements->creer); } -$newcardbutton .= ''.$langs->trans("IncludeDocsAlreadyExported").''; - -$newcardbutton .= dolGetButtonTitle($buttonLabel, $langs->trans("ExportFilteredList").' ('.$listofformat[$formatexportset].')', 'fa fa-file-export paddingleft', $_SERVER["PHP_SELF"].'?action=export_file'.($param ? '&'.$param : ''), $user->rights->accounting->mouvements->export); - -$newcardbutton .= dolGetButtonTitle($langs->trans('ViewFlatList'), '', 'fa fa-list paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?'.$param, '', 1, array('morecss'=>'marginleftonly btnTitleSelected')); -$newcardbutton .= dolGetButtonTitle($langs->trans('GroupByAccountAccounting'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?'.$param, '', 1, array('morecss'=>'marginleftonly')); - -$url = './card.php?action=create'; -if (!empty($socid)) $url .= '&socid='.$socid; -$newcardbutton .= dolGetButtonTitle($langs->trans('NewAccountingMvt'), '', 'fa fa-plus-circle paddingleft', $url, '', $user->rights->accounting->mouvements->creer); print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $newcardbutton, '', $limit, 0, 0, 1); diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index 45e8c6aee70..80d8b4961c8 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -376,12 +376,16 @@ print ''; print ''; -$newcardbutton .= dolGetButtonTitle($langs->trans('ViewFlatList'), '', 'fa fa-list paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?'.$param); -$newcardbutton .= dolGetButtonTitle($langs->trans('VueByAccountAccounting'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?'.$param, '', 1, array('morecss'=>'marginleftonly btnTitleSelected')); +$parameters = array(); +$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook +if (empty($reshook)) { + $newcardbutton = dolGetButtonTitle($langs->trans('ViewFlatList'), '', 'fa fa-list paddingleft imgforviewmode', DOL_URL_ROOT . '/accountancy/bookkeeping/list.php?' . $param); + $newcardbutton .= dolGetButtonTitle($langs->trans('VueByAccountAccounting'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT . '/accountancy/bookkeeping/listbyaccount.php?' . $param, '', 1, array('morecss' => 'marginleftonly btnTitleSelected')); -$newcardbutton .= '   '; + $newcardbutton .= '   '; -$newcardbutton .= dolGetButtonTitle($langs->trans('NewAccountingMvt'), '', 'fa fa-plus-circle paddingleft', DOL_URL_ROOT.'/accountancy/bookkeeping/card.php?action=create'); + $newcardbutton .= dolGetButtonTitle($langs->trans('NewAccountingMvt'), '', 'fa fa-plus-circle paddingleft', DOL_URL_ROOT . '/accountancy/bookkeeping/card.php?action=create'); +} if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); diff --git a/htdocs/accountancy/bookkeeping/listbysubaccount.php b/htdocs/accountancy/bookkeeping/listbysubaccount.php index c286780e572..0a70034aaa6 100644 --- a/htdocs/accountancy/bookkeeping/listbysubaccount.php +++ b/htdocs/accountancy/bookkeeping/listbysubaccount.php @@ -377,8 +377,12 @@ print ''; print ''; -$newcardbutton = dolGetButtonTitle($langs->trans('ViewAccountList'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php', '', 1, array('morecss'=>'marginleftonly btnTitleSelected')); -$newcardbutton .= dolGetButtonTitle($langs->trans('NewAccountingMvt'), '', 'fa fa-plus-circle paddingleft', DOL_URL_ROOT.'/accountancy/bookkeeping/card.php?action=create'); +$parameters = array(); +$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook +if (empty($reshook)) { + $newcardbutton = dolGetButtonTitle($langs->trans('ViewAccountList'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT . '/accountancy/bookkeeping/listbyaccount.php', '', 1, array('morecss' => 'marginleftonly btnTitleSelected')); + $newcardbutton .= dolGetButtonTitle($langs->trans('NewAccountingMvt'), '', 'fa fa-plus-circle paddingleft', DOL_URL_ROOT . '/accountancy/bookkeeping/card.php?action=create'); +} if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index aa5711a69ce..b7b25e28d3c 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -2054,6 +2054,7 @@ class ActionComm extends CommonObject } $now = dol_now(); + $actionCommReminder = new ActionCommReminder($this->db); dol_syslog(__METHOD__, LOG_DEBUG); @@ -2068,7 +2069,6 @@ class ActionComm extends CommonObject if ($resql) { $formmail = new FormMail($this->db); - $actionCommReminder = new ActionCommReminder($this->db); while ($obj = $this->db->fetch_object($resql)) { $res = $actionCommReminder->fetch($obj->id); @@ -2077,15 +2077,13 @@ class ActionComm extends CommonObject $errorsMsg[] = "Failed to load invoice ActionComm Reminder"; } - if (!$error) - { + if (!$error) { //Select email template $arraymessage = $formmail->getEMailTemplate($this->db, 'actioncomm_send', $user, $langs, (!empty($actionCommReminder->fk_email_template)) ? $actionCommReminder->fk_email_template : -1, 1); // Load event $res = $this->fetch($actionCommReminder->fk_actioncomm); - if ($res > 0) - { + if ($res > 0) { // PREPARE EMAIL $errormesg = ''; @@ -2170,8 +2168,7 @@ class ActionComm extends CommonObject $error++; } - if (!$error) - { + if (!$error) { // Delete also very old past events (we do not keep more than 1 month record in past) $sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm_reminder"; $sql .= " WHERE dateremind < '".$this->db->idate($now - (3600 * 24 * 32))."'"; @@ -2188,8 +2185,7 @@ class ActionComm extends CommonObject $this->output = 'Nb of emails sent : '.$nbMailSend; $this->db->commit(); return 0; - } - else { + } else { $this->db->commit(); // We commit also on error, to have the error message recorded. $this->error = 'Nb of emails sent : '.$nbMailSend.', '.(!empty($errorsMsg)) ? join(', ', $errorsMsg) : $error; return $error; diff --git a/htdocs/takepos/floors.php b/htdocs/takepos/floors.php index 2179e9141bc..9e6f9d2a448 100644 --- a/htdocs/takepos/floors.php +++ b/htdocs/takepos/floors.php @@ -32,6 +32,7 @@ if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); require '../main.inc.php'; // Load $user and permissions +require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; $langs->loadLangs(array("bills", "orders", "commercial", "cashdesk")); @@ -62,6 +63,9 @@ if ($action == "getTables") $resql = $db->query($sql); $rows = array(); while ($row = $db->fetch_array($resql)) { + $invoice = new Facture($db); + $result=$invoice->fetch('', '(PROV-POS'.$_SESSION['takeposterminal'].'-'.$row['rowid'].')'); + if ($result>0) $row['occupied']="red"; $rows[] = $row; } echo json_encode($rows); @@ -113,6 +117,9 @@ text-align: center; font-size:300%; color:white; } +div.red{ +color:red; +} html, body { height: 100%; @@ -172,7 +179,7 @@ $( document ).ready(function() { $(this).focus(); }) - $('body').append('
'+val.label+'
'); + $('body').append('
'+val.label+'
'); }); });