mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
85803c9dbf
|
|
@ -3,7 +3,7 @@ English Dolibarr ChangeLog
|
|||
--------------------------------------------------------------
|
||||
|
||||
|
||||
***** ChangeLog for 20.0.0 compared to 19.0.0 *****
|
||||
***** ChangeLog for 20.0.0 compared to 19.0 *****
|
||||
|
||||
For users:
|
||||
----------
|
||||
|
|
@ -26,7 +26,7 @@ The following changes may create regressions for some external modules, but were
|
|||
|
||||
|
||||
|
||||
***** ChangeLog for 19.0.0 compared to 18.0.0 *****
|
||||
***** ChangeLog for 19.0.0 compared to 18.0 *****
|
||||
|
||||
For users:
|
||||
----------
|
||||
|
|
@ -353,6 +353,7 @@ FIX: update price extrafield on propal card
|
|||
FIX: user filter in per user view of event list (#28049)
|
||||
FIX: use the currency for propal signature page
|
||||
|
||||
|
||||
***** ChangeLog for 18.0.4 compared to 18.0.3 *****
|
||||
FIX: $this->newref already exists and could have been modified by trigger but we still use a local variable for the filesystem-based renaming
|
||||
FIX: 16.0 only, backport fix for SQL error on global search product
|
||||
|
|
@ -541,7 +542,7 @@ FIX: url to check keyword not saved on partnership from public form
|
|||
FIX: when adding new times on a survey, all hours would be erased.
|
||||
|
||||
|
||||
***** ChangeLog for 18.0.0 compared to 17.0.0 *****
|
||||
***** ChangeLog for 18.0.0 compared to 17.0 *****
|
||||
|
||||
For users:
|
||||
----------
|
||||
|
|
|
|||
|
|
@ -2660,12 +2660,15 @@ class AccountLine extends CommonObjectLine
|
|||
*/
|
||||
public function getNomUrl($withpicto = 0, $maxlen = 0, $option = '', $notooltip = 0)
|
||||
{
|
||||
global $langs;
|
||||
global $conf, $langs;
|
||||
|
||||
$result = '';
|
||||
|
||||
$label = img_picto('', $this->picto).' <u>'.$langs->trans("BankTransactionLine").'</u>:<br>';
|
||||
$label .= '<b>'.$langs->trans("Ref").':</b> '.$this->ref;
|
||||
if ($this->amount) {
|
||||
$label .= '<br><strong>'.$langs->trans("Amount").':</strong> '.price($this->amount, 0, $langs, 1, -1, -1, $conf->currency);
|
||||
}
|
||||
|
||||
$linkstart = '<a href="'.DOL_URL_ROOT.'/compta/bank/line.php?rowid='.((int) $this->id).'&save_lastsearch_values=1" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$linkend = '</a>';
|
||||
|
|
@ -2677,6 +2680,7 @@ class AccountLine extends CommonObjectLine
|
|||
if ($withpicto != 2) {
|
||||
$result .= ($this->ref ? $this->ref : $this->id);
|
||||
}
|
||||
|
||||
$result .= $linkend;
|
||||
|
||||
if ($option == 'showall' || $option == 'showconciliated' || $option == 'showconciliatedandaccounted') {
|
||||
|
|
|
|||
|
|
@ -181,6 +181,8 @@ if (GETPOST("orphelins", "alpha")) {
|
|||
$sql = "SELECT p.rowid, p.ref, p.datep, p.amount, p.statut, p.num_paiement as num_payment,";
|
||||
$sql .= " c.code as paiement_code";
|
||||
|
||||
$sqlfields = $sql; // $sql fields to remove for count total
|
||||
|
||||
// Add fields from hooks
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook
|
||||
|
|
@ -195,10 +197,13 @@ if (GETPOST("orphelins", "alpha")) {
|
|||
$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook
|
||||
$sql .= $hookmanager->resPrint;
|
||||
} else {
|
||||
$sql = "SELECT p.rowid, p.ref, p.datep, p.fk_bank, p.amount, p.statut, p.num_paiement as num_payment";
|
||||
$sql = "SELECT p.rowid, p.ref, p.datep, p.fk_bank, p.statut, p.num_paiement as num_payment, p.amount";
|
||||
$sql .= ", c.code as paiement_code";
|
||||
$sql .= ", ba.rowid as bid, ba.ref as bref, ba.label as blabel, ba.number, ba.account_number as account_number, ba.fk_accountancy_journal as accountancy_journal";
|
||||
$sql .= ", s.rowid as socid, s.nom as name, s.email";
|
||||
// We need an aggregate because we added a left join to get the thirdparty. In real world, it should be the same thirdparty if payment is same (but not in database structure)
|
||||
// so SUM(pf.amount) should be equal to p.amount but if we filter on $socid, it may differ
|
||||
$sql .= ", SUM(pf.amount) as totalamount, COUNT(f.rowid) as nbinvoices";
|
||||
|
||||
// Add fields from hooks
|
||||
$parameters = array();
|
||||
|
|
@ -211,18 +216,21 @@ if (GETPOST("orphelins", "alpha")) {
|
|||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON p.fk_paiement = c.id";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON p.fk_bank = b.rowid";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON b.fk_account = ba.rowid";
|
||||
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf ON p.rowid = pf.fk_paiement";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON pf.fk_facture = f.rowid";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON f.fk_soc = s.rowid";
|
||||
|
||||
$sql .= " WHERE p.entity IN (".getEntity('invoice').")";
|
||||
if ($socid > 0) {
|
||||
$sql .= " AND f.fk_soc = ".((int) $socid);
|
||||
$sql .= " AND EXISTS (SELECT f.fk_soc FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."paiement_facture as pf";
|
||||
$sql .= " WHERE p.rowid = pf.fk_paiement AND pf.fk_facture = f.rowid AND f.fk_soc = ".((int) $socid).")";
|
||||
}
|
||||
if ($userid) {
|
||||
if ($userid == -1) {
|
||||
$sql .= " AND f.fk_user_author IS NULL";
|
||||
$sql .= " AND p.fk_user_creat IS NULL";
|
||||
} else {
|
||||
$sql .= " AND f.fk_user_author = ".((int) $userid);
|
||||
$sql .= " AND p.fk_user_creat = ".((int) $userid);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -246,7 +254,10 @@ if (GETPOST("orphelins", "alpha")) {
|
|||
$sql .= natural_search('p.num_paiement', $search_payment_num);
|
||||
}
|
||||
if ($search_amount) {
|
||||
$sql .= natural_search('p.amount', $search_amount, 1);
|
||||
$sql .= " AND (".natural_search('p.amount', $search_amount, 1, 1);
|
||||
$sql .= " OR ";
|
||||
$sql .= natural_search('pf.amount', $search_amount, 1, 1);
|
||||
$sql .= ")";
|
||||
}
|
||||
if ($search_company) {
|
||||
$sql .= natural_search('s.nom', $search_company);
|
||||
|
|
@ -268,13 +279,18 @@ if (GETPOST("orphelins", "alpha")) {
|
|||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook
|
||||
$sql .= $hookmanager->resPrint;
|
||||
|
||||
$sql .= " GROUP BY p.rowid, p.ref, p.datep, p.fk_bank, p.statut, p.num_paiement, p.amount";
|
||||
$sql .= ", c.code";
|
||||
$sql .= ", ba.rowid, ba.ref, ba.label, ba.number, ba.account_number, ba.fk_accountancy_journal";
|
||||
$sql .= ", s.rowid, s.nom, s.email";
|
||||
}
|
||||
|
||||
// Count total nb of records
|
||||
$nbtotalofrecords = '';
|
||||
if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) {
|
||||
/* The fast and low memory method to get and count full list converts the sql into a sql count */
|
||||
$sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql);
|
||||
$sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(DISTINCT p.rowid) as nbtotalofrecords', $sql);
|
||||
$sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount);
|
||||
$resql = $db->query($sqlforcount);
|
||||
if ($resql) {
|
||||
|
|
@ -296,6 +312,7 @@ $sql .= $db->order($sortfield, $sortorder);
|
|||
if ($limit) {
|
||||
$sql .= $db->plimit($limit + 1, $offset);
|
||||
}
|
||||
//print $sql;
|
||||
|
||||
$resql = $db->query($sql);
|
||||
if (!$resql) {
|
||||
|
|
@ -579,6 +596,8 @@ while ($i < $imaxinloop) {
|
|||
|
||||
$object->id = $objp->rowid;
|
||||
$object->ref = ($objp->ref ? $objp->ref : $objp->rowid);
|
||||
$object->date = $db->jdate($objp->datep);
|
||||
$object->amount = $objp->amount;
|
||||
|
||||
$companystatic->id = $objp->socid;
|
||||
$companystatic->name = $objp->name;
|
||||
|
|
@ -714,7 +733,12 @@ while ($i < $imaxinloop) {
|
|||
|
||||
// Amount
|
||||
if (!empty($arrayfields['p.amount']['checked'])) {
|
||||
print '<td class="right"><span class="amount">'.price($objp->amount).'</span></td>';
|
||||
print '<td class="right">';
|
||||
if ($objp->nbinvoices > 1 || ($objp->totalamount && $objp->amount != $objp->totalamount)) {
|
||||
print $form->textwithpicto('', $langs->trans("PaymentMadeForSeveralInvoices"));
|
||||
}
|
||||
print '<span class="amount">'.price($objp->amount).'</span>';
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
$totalarray['pos'][$totalarray['nbfield']] = 'amount';
|
||||
|
|
|
|||
|
|
@ -415,11 +415,6 @@ 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 ('', '(isModEnabled("takepos") || isModEnabled("cashdesk"))', __HANDLER__, 'left', 6100__+MAX_llx_menu__, 'bank', 'cashcontrol', 14__+MAX_llx_menu__, '/compta/cashcontrol/cashcontrol_list.php?mainmenu=bank&action=list', 'CashControl', 0, 'cashdesk', '$user->hasRight("cashdesk", "run")|| $user->hasRight("takepos", "run")', '', 2, 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 ('', '(isModEnabled("takepos") || isModEnabled("cashdesk") && $leftmenu=="cashcontrol")', __HANDLER__, 'left', 6101__+MAX_llx_menu__, 'bank', 'cashcontrol', 6100__+MAX_llx_menu__, '/compta/cashcontrol/cashcontrol_card.php?mainmenu=bank&action=create', 'NewCashFence', 1, 'cashdesk', '$user->hasRight("cashdesk", "run")|| $user->hasRight("takepos", "run")', '', 2, 6, __ENTITY__);
|
||||
|
||||
-- Bank - Cash control POS
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '(isModEnabled("takepos") || isModEnabled("cashdesk"))', __HANDLER__, 'left', 6100__+MAX_llx_menu__, 'bank', 'cashcontrol', 14__+MAX_llx_menu__, '/compta/cashcontrol/cashcontrol_list.php?mainmenu=bank&action=list', 'CashControl', 0, 'cashdesk', '$user->hasRight("cashdesk", "run")|| $user->hasRight("takepos", "run")', '', 2, 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 ('', '(isModEnabled("takepos") || isModEnabled("cashdesk") && $leftmenu=="cashcontrol")', __HANDLER__, 'left', 6101__+MAX_llx_menu__, 'bank', 'cashcontrol', 6100__+MAX_llx_menu__, '/compta/cashcontrol/cashcontrol_card.php?mainmenu=bank&action=create', 'NewCashFence', 1, 'cashdesk', '$user->hasRight("cashdesk", "run")|| $user->hasRight("takepos", "run")', '', 2, 6, __ENTITY__);
|
||||
|
||||
|
||||
-- Project
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("project")', __HANDLER__, 'left', 3600__+MAX_llx_menu__, 'project', 'projects', 7__+MAX_llx_menu__, '/projet/index.php?mainmenu=project&leftmenu=projects', 'LeadsOrProjects', 0, 'projects', '$user->hasRight("projet","lire")', '', 2, 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 ('', 'isModEnabled("project")', __HANDLER__, 'left', 3601__+MAX_llx_menu__, 'project', '', 3600__+MAX_llx_menu__, '/projet/card.php?mainmenu=project&leftmenu=projects&action=create', 'New', 1, 'projects', '$user->hasRight("projet","creer")', '', 2, 1, __ENTITY__);
|
||||
|
|
|
|||
|
|
@ -181,26 +181,32 @@ $accountstatic = new Account($db);
|
|||
$companystatic = new Societe($db);
|
||||
$paymentfournstatic = new PaiementFourn($db);
|
||||
|
||||
$sql = 'SELECT p.rowid, p.ref, p.datep, p.amount as pamount, p.num_paiement as num_payment,';
|
||||
$sql .= ' s.rowid as socid, s.nom as name, s.email,';
|
||||
$sql .= ' c.code as paiement_type, c.libelle as paiement_libelle,';
|
||||
$sql .= ' ba.rowid as bid, ba.ref as bref, ba.label as blabel, ba.number, ba.account_number as account_number, ba.iban_prefix, ba.bic, ba.currency_code, ba.fk_accountancy_journal as accountancy_journal,';
|
||||
$sql .= ' SUM(pf.amount)';
|
||||
$sql = 'SELECT p.rowid, p.ref, p.datep, p.fk_bank, p.statut, p.num_paiement as num_payment, p.amount';
|
||||
$sql .= ', c.code as paiement_type, c.libelle as paiement_libelle';
|
||||
$sql .= ', ba.rowid as bid, ba.ref as bref, ba.label as blabel, ba.number, ba.account_number as account_number, ba.iban_prefix, ba.bic, ba.currency_code, ba.fk_accountancy_journal as accountancy_journal';
|
||||
$sql .= ', s.rowid as socid, s.nom as name, s.email';
|
||||
// We need an aggregate because we added a left join to get the thirdparty. In real world, it should be the same thirdparty if payment is same (but not in database structure)
|
||||
// so SUM(pf.amount) should be equal to p.amount but if we filter on $socid, it may differ
|
||||
$sql .= ", SUM(pf.amount) as totalamount, COUNT(f.rowid) as nbinvoices";
|
||||
|
||||
$sqlfields = $sql; // $sql fields to remove for count total
|
||||
|
||||
$sql .= ' FROM '.MAIN_DB_PREFIX.'paiementfourn AS p';
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn_facturefourn AS pf ON p.rowid = pf.fk_paiementfourn';
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'facture_fourn AS f ON f.rowid = pf.fk_facturefourn';
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement AS c ON p.fk_paiement = c.id';
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe AS s ON s.rowid = f.fk_soc';
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank as b ON p.fk_bank = b.rowid';
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank_account as ba ON b.fk_account = ba.rowid';
|
||||
if (!$user->hasRight("societe", "client", "voir")) {
|
||||
$sql .= ', '.MAIN_DB_PREFIX.'societe_commerciaux as sc';
|
||||
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn_facturefourn AS pf ON p.rowid = pf.fk_paiementfourn';
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'facture_fourn AS f ON f.rowid = pf.fk_facturefourn';
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe AS s ON s.rowid = f.fk_soc';
|
||||
|
||||
$sql .= ' WHERE f.entity IN ('.getEntity('supplier_invoice').')'; // TODO We should use p.entity that does not exists yet in this table
|
||||
if ($socid > 0) {
|
||||
$sql .= " AND EXISTS (SELECT f.fk_soc FROM ".MAIN_DB_PREFIX."facture_fourn as f, ".MAIN_DB_PREFIX."paiementfourn_facturefourn as pf";
|
||||
$sql .= " WHERE p.rowid = pf.fk_paiementfourn AND pf.fk_facturefourn = f.rowid AND f.fk_soc = ".((int) $socid).")";
|
||||
}
|
||||
|
||||
$sql .= ' WHERE f.entity = '.((int) $conf->entity);
|
||||
if ($socid > 0) {
|
||||
$sql .= ' AND f.fk_soc = '.((int) $socid);
|
||||
}
|
||||
// Search criteria
|
||||
if ($search_ref) {
|
||||
$sql .= natural_search('p.ref', $search_ref);
|
||||
}
|
||||
|
|
@ -215,13 +221,16 @@ if ($search_company) {
|
|||
$sql .= natural_search('s.nom', $search_company);
|
||||
}
|
||||
if ($search_payment_type != '') {
|
||||
$sql .= " AND c.code='".$db->escape($search_payment_type)."'";
|
||||
$sql .= " AND c.code = '".$db->escape($search_payment_type)."'";
|
||||
}
|
||||
if ($search_cheque_num != '') {
|
||||
$sql .= natural_search('p.num_paiement', $search_cheque_num);
|
||||
}
|
||||
if ($search_amount) {
|
||||
$sql .= natural_search('p.amount', $search_amount, 1);
|
||||
$sql .= " AND (".natural_search('p.amount', $search_amount, 1, 1);
|
||||
$sql .= " OR ";
|
||||
$sql .= natural_search('pf.amount', $search_amount, 1, 1);
|
||||
$sql .= ")";
|
||||
}
|
||||
if ($search_bank_account > 0) {
|
||||
$sql .= ' AND b.fk_account = '.((int) $search_bank_account);
|
||||
|
|
@ -241,22 +250,36 @@ if ($search_sale && $search_sale != '-1') {
|
|||
// Add where from extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
|
||||
|
||||
$sql .= ' GROUP BY p.rowid, p.ref, p.datep, p.amount, p.num_paiement, s.rowid, s.nom, s.email, c.code, c.libelle,';
|
||||
$sql .= ' GROUP BY p.rowid, p.ref, p.datep, p.fk_bank, p.statut, p.num_paiement, p.amount, s.rowid, s.nom, s.email, c.code, c.libelle,';
|
||||
$sql .= ' ba.rowid, ba.ref, ba.label, ba.number, ba.account_number, ba.iban_prefix, ba.bic, ba.currency_code, ba.fk_accountancy_journal';
|
||||
|
||||
$sql .= $db->order($sortfield, $sortorder);
|
||||
|
||||
// Count total nb of records
|
||||
$nbtotalofrecords = '';
|
||||
if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) {
|
||||
$result = $db->query($sql);
|
||||
$nbtotalofrecords = $db->num_rows($result);
|
||||
if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
|
||||
/* The fast and low memory method to get and count full list converts the sql into a sql count */
|
||||
$sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(DISTINCT p.rowid) as nbtotalofrecords', $sql);
|
||||
$sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount);
|
||||
$resql = $db->query($sqlforcount);
|
||||
if ($resql) {
|
||||
$objforcount = $db->fetch_object($resql);
|
||||
$nbtotalofrecords = $objforcount->nbtotalofrecords;
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
|
||||
$page = 0;
|
||||
$offset = 0;
|
||||
}
|
||||
$db->free($resql);
|
||||
}
|
||||
|
||||
$sql .= $db->plimit($limit + 1, $offset);
|
||||
// Complete request and execute it with limit
|
||||
$sql .= $db->order($sortfield, $sortorder);
|
||||
if ($limit) {
|
||||
$sql .= $db->plimit($limit + 1, $offset);
|
||||
}
|
||||
//print $sql;
|
||||
|
||||
$resql = $db->query($sql);
|
||||
if (!$resql) {
|
||||
|
|
@ -534,6 +557,7 @@ while ($i < $imaxinloop) {
|
|||
$paymentfournstatic->id = $objp->rowid;
|
||||
$paymentfournstatic->ref = $objp->ref;
|
||||
$paymentfournstatic->datepaye = $db->jdate($objp->datep);
|
||||
$paymentfournstatic->amount = $objp->amount;
|
||||
|
||||
$companystatic->id = $objp->socid;
|
||||
$companystatic->name = $objp->name;
|
||||
|
|
@ -660,15 +684,20 @@ while ($i < $imaxinloop) {
|
|||
|
||||
// Amount
|
||||
if (!empty($arrayfields['p.amount']['checked'])) {
|
||||
print '<td class="right"><span class="amount">'.price($objp->pamount).'</span></td>';
|
||||
print '<td class="right">';
|
||||
if ($objp->nbinvoices > 1 || ($objp->totalamount && $objp->amount != $objp->totalamount)) {
|
||||
print $form->textwithpicto('', $langs->trans("PaymentMadeForSeveralInvoices"));
|
||||
}
|
||||
print '<span class="amount">'.price($objp->amount).'</span>';
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
$totalarray['pos'][$totalarray['nbfield']] = 'amount';
|
||||
}
|
||||
if (empty($totalarray['val']['amount'])) {
|
||||
$totalarray['val']['amount'] = $objp->pamount;
|
||||
$totalarray['val']['amount'] = $objp->amount;
|
||||
} else {
|
||||
$totalarray['val']['amount'] += $objp->pamount;
|
||||
$totalarray['val']['amount'] += $objp->amount;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -490,7 +490,7 @@ ALTER TABLE llx_partnership ADD COLUMN email_partnership varchar(64) after fk_me
|
|||
ALTER TABLE llx_contratdet ADD INDEX idx_contratdet_statut (statut);
|
||||
|
||||
ALTER TABLE fk_product_price_product DROP FOREIGN KEY fk_product_price_product;
|
||||
|
||||
|
||||
ALTER TABLE llx_societe_rib ADD COLUMN ext_payment_site varchar(128);
|
||||
|
||||
-- Drop the composite unique index that exists on llx_commande_fournisseur to rebuild a new one without the fk_soc.
|
||||
|
|
@ -569,3 +569,5 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value
|
|||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('HRM_EVALUATION_DELETE', 'HR Evaluation deleted', 'Executed when an evaluation is dleted', 'hrm', 4005);
|
||||
|
||||
UPDATE llx_menu SET url = '/fourn/paiement/list.php?mainmenu=billing&leftmenu=suppliers_bills_payment' WHERE leftmenu = 'suppliers_bills_payment';
|
||||
|
||||
UPDATE llx_paiement SET ref = rowid WHERE ref IS NULL OR ref = '';
|
||||
|
|
|
|||
|
|
@ -40,6 +40,8 @@ ALTER TABLE llx_product_perentity ADD COLUMN pmp double(24,8);
|
|||
|
||||
ALTER TABLE llx_projet_task ADD COLUMN fk_user_modif integer after fk_user_creat;
|
||||
|
||||
UPDATE llx_paiement SET ref = rowid WHERE ref IS NULL OR ref = '';
|
||||
|
||||
|
||||
-- v19
|
||||
|
||||
|
|
|
|||
|
|
@ -653,3 +653,4 @@ InvoiceSubtype=Invoice Subtype
|
|||
SalaryInvoice=Salary
|
||||
BillsAndSalaries=Bills & Salaries
|
||||
CreateCreditNoteWhenClientInvoiceExists=This option is enabled only when validated invoice(s) exist for a customer or when constant INVOICE_CREDIT_NOTE_STANDALONE is used(useful for some countries)
|
||||
PaymentMadeForSeveralInvoices=Payment made for several invoices
|
||||
|
|
|
|||
|
|
@ -1512,7 +1512,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
print '</td></tr>';
|
||||
}
|
||||
|
||||
if ($type != 1 && isModEnabled('stock')) {
|
||||
if (($type != 1 || getDolGlobalInt('STOCK_SUPPORTS_SERVICES')) && isModEnabled('stock')) {
|
||||
// Default warehouse
|
||||
print '<tr><td>'.$langs->trans("DefaultWarehouse").'</td><td>';
|
||||
print img_picto($langs->trans("DefaultWarehouse"), 'stock', 'class="pictofixedwidth"');
|
||||
|
|
@ -1520,6 +1520,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
print ' <a href="'.DOL_URL_ROOT.'/product/stock/card.php?action=create&token='.newToken().'&backtopage='.urlencode($_SERVER['PHP_SELF'].'?&action=create&type='.GETPOST('type', 'int')).'">';
|
||||
print '<span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddWarehouse").'"></span>';
|
||||
print '</a>';
|
||||
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
|
@ -1925,6 +1926,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
$parameters = array();
|
||||
// Note that $action and $object may be modified by hook
|
||||
$reshook = $hookmanager->executeHooks('tabContentEditProduct', $parameters, $object, $action);
|
||||
|
||||
if (empty($reshook)) {
|
||||
print '<table class="border allwidth">';
|
||||
|
||||
|
|
@ -2135,7 +2137,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
}
|
||||
|
||||
// Stock
|
||||
if ($object->isProduct() && isModEnabled('stock')) {
|
||||
if (($object->isProduct() || getDolGlobalInt('STOCK_SUPPORTS_SERVICES')) && isModEnabled('stock')) {
|
||||
// Default warehouse
|
||||
print '<tr><td>'.$langs->trans("DefaultWarehouse").'</td><td>';
|
||||
print img_picto($langs->trans("DefaultWarehouse"), 'stock', 'class="pictofixedwidth"');
|
||||
|
|
@ -2154,7 +2156,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
*/
|
||||
}
|
||||
|
||||
if ($object->isService() && $conf->workstation->enabled) {
|
||||
if ($object->isService() && isModEnabled('workstation')) {
|
||||
// Default workstation
|
||||
print '<tr><td>'.$langs->trans("DefaultWorkstation").'</td><td>';
|
||||
print img_picto($langs->trans("DefaultWorkstation"), 'workstation', 'class="pictofixedwidth"');
|
||||
|
|
@ -2648,7 +2650,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
}
|
||||
|
||||
// Default warehouse
|
||||
if ($object->isProduct() && isModEnabled('stock')) {
|
||||
if (($object->isProduct() || getDolGlobalInt('STOCK_SUPPORTS_SERVICES')) && isModEnabled('stock')) {
|
||||
$warehouse = new Entrepot($db);
|
||||
$warehouse->fetch($object->fk_default_warehouse);
|
||||
|
||||
|
|
|
|||
|
|
@ -4595,6 +4595,7 @@ class Societe extends CommonObject
|
|||
{
|
||||
// phpcs:enable
|
||||
global $langs;
|
||||
|
||||
$label = '';
|
||||
if ($fk_prospectlevel != '') {
|
||||
$label = $langs->trans("ProspectLevel".$fk_prospectlevel);
|
||||
|
|
@ -4603,6 +4604,7 @@ class Societe extends CommonObject
|
|||
$label = $langs->getLabelFromKey($this->db, $fk_prospectlevel, 'c_prospectlevel', 'code', 'label');
|
||||
}
|
||||
}
|
||||
|
||||
return $label;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2770,6 +2770,9 @@ a.tmenuimage:focus, .mainmenu.topmenuimage:focus {
|
|||
button.ui-button.ui-corner-all.ui-widget:focus {
|
||||
outline: none;
|
||||
}
|
||||
.tmenuimage {
|
||||
color: var(--colortextbackhmenu);
|
||||
}
|
||||
|
||||
/* For mainmenu, we always load the img */
|
||||
|
||||
|
|
|
|||
|
|
@ -591,18 +591,18 @@ if ($result) {
|
|||
|
||||
// Permission and tick (2 columns)
|
||||
if (!empty($object->admin) && !empty($objMod->rights_admin_allowed)) { // Permission granted because admin
|
||||
print '<!-- perm is a perm allowed to any admin -->';
|
||||
if ($caneditperms) {
|
||||
print '<td class="center">'.img_picto($langs->trans("AdministratorDesc"), 'star').'</td>';
|
||||
} else {
|
||||
print '<td> </td>';
|
||||
}
|
||||
print '<td class="center nowrap">';
|
||||
if (!$caneditperms) {
|
||||
print '<td class="center nowrap">';
|
||||
print img_picto($langs->trans("Active"), 'switch_on', '', false, 0, 0, '', 'opacitymedium');
|
||||
//print img_picto($langs->trans("Active"), 'tick');
|
||||
print '</td>';
|
||||
}
|
||||
print '<td>';
|
||||
print '</td>';
|
||||
} elseif (in_array($obj->id, $permsuser)) { // Permission granted by user
|
||||
print '<!-- user has perm -->';
|
||||
if ($caneditperms) {
|
||||
print '<td class="center">';
|
||||
print '<a class="reposition addexpandedmodulesinparamlist" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delrights&token='.newToken().'&entity='.$entity.'&rights='.$obj->id.'&confirm=yes&updatedmodulename='.$obj->module.'">';
|
||||
|
|
@ -610,44 +610,41 @@ if ($result) {
|
|||
print img_picto($langs->trans("Remove"), 'switch_on');
|
||||
print '</a></td>';
|
||||
} else {
|
||||
print '<td> </td>';
|
||||
}
|
||||
print '<td class="center nowrap">';
|
||||
if (!$caneditperms) {
|
||||
print '<td class="center nowrap">';
|
||||
print img_picto($langs->trans("Active"), 'switch_on', '', false, 0, 0, '', 'opacitymedium');
|
||||
//print img_picto($langs->trans("Active"), 'tick');
|
||||
print '</td>';
|
||||
}
|
||||
print '<td>';
|
||||
print '</td>';
|
||||
} elseif (isset($permsgroupbyentitypluszero) && is_array($permsgroupbyentitypluszero)) {
|
||||
print '<!-- permsgroupbyentitypluszero -->';
|
||||
if (in_array($obj->id, $permsgroupbyentitypluszero)) { // Permission granted by group
|
||||
print '<td class="center nowrap">';
|
||||
print img_picto($langs->trans("Active"), 'switch_on', '', false, 0, 0, '', 'opacitymedium');
|
||||
//print img_picto($langs->trans("Active"), 'tick');
|
||||
print '</td>';
|
||||
if ($caneditperms) {
|
||||
print '<td class="">';
|
||||
print $form->textwithtooltip($langs->trans("Inherited"), $langs->trans("PermissionInheritedFromAGroup"));
|
||||
print '</td>';
|
||||
} else {
|
||||
print '<td>c </td>';
|
||||
}
|
||||
print '<td>';
|
||||
print $form->textwithtooltip($langs->trans("Inherited"), $langs->trans("PermissionInheritedFromAGroup"));
|
||||
print '</td>';
|
||||
} else {
|
||||
// Do not own permission
|
||||
if ($caneditperms) {
|
||||
print '<td class="center">';
|
||||
print '<td class="center nowrap">';
|
||||
print '<a class="reposition addexpandedmodulesinparamlist" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=addrights&entity='.$entity.'&rights='.$obj->id.'&confirm=yes&token='.newToken().'&updatedmodulename='.$obj->module.'">';
|
||||
//print img_edit_add($langs->trans("Add"));
|
||||
print img_picto($langs->trans("Add"), 'switch_off');
|
||||
print '</a></td>';
|
||||
} else {
|
||||
print '<td>';
|
||||
print ' ';
|
||||
print '<td class="center nowrap">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off', '', false, 0, 0, '', 'opacitymedium');
|
||||
print '</td>';
|
||||
}
|
||||
print '<td> </td>';
|
||||
print '<td>';
|
||||
print '</td>';
|
||||
}
|
||||
} else {
|
||||
// Do not own permission
|
||||
print '<!-- do not own permission -->';
|
||||
if ($caneditperms) {
|
||||
print '<td class="center">';
|
||||
print '<a class="reposition addexpandedmodulesinparamlist" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=addrights&entity='.$entity.'&rights='.$obj->id.'&confirm=yes&token='.newToken().'&updatedmodulename='.$obj->module.'">';
|
||||
|
|
@ -655,7 +652,7 @@ if ($result) {
|
|||
print img_picto($langs->trans("Add"), 'switch_off');
|
||||
print '</a></td>';
|
||||
} else {
|
||||
print '<td>aa';
|
||||
print '<td>';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off', '', false, 0, 0, '', 'opacitymedium');
|
||||
print '</td>';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user