Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0
Conflicts: htdocs/core/modules/modPartnership.class.php htdocs/modulebuilder/template/core/modules/modMyModule.class.php
This commit is contained in:
commit
3761c920eb
@ -674,7 +674,7 @@ if ($id) {
|
||||
// Can an entry be erased or disabled ?
|
||||
$iserasable = 1; $canbedisabled = 1; $canbemodified = 1; // true by default
|
||||
|
||||
$url = $_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(!empty($obj->rowid) ? $obj->rowid : (!empty($obj->code) ? $obj->code : '')).'&code='.(!empty($obj->code) ?urlencode($obj->code) : '');
|
||||
$url = $_SERVER["PHP_SELF"].'?token='.newToken().($page ? '&page='.$page : '').'&sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(!empty($obj->rowid) ? $obj->rowid : (!empty($obj->code) ? $obj->code : '')).'&code='.(!empty($obj->code) ?urlencode($obj->code) : '');
|
||||
if ($param) {
|
||||
$url .= '&'.$param;
|
||||
}
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2010-2018 Juanjo Menent <jmenent@2byte.es>
|
||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2010-2018 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -108,7 +109,7 @@ llxHeader('', $langs->trans("WithdrawalsLines"));
|
||||
|
||||
$sql = "SELECT p.rowid, p.ref, p.statut as status, p.datec";
|
||||
$sql .= " , f.rowid as facid, f.ref as invoiceref, f.total_ttc";
|
||||
$sql .= " , s.rowid as socid, s.nom as name, s.code_client, s.email";
|
||||
$sql .= " , s.rowid as socid, s.nom as name, s.code_client, s.code_fournisseur, s.email";
|
||||
$sql .= " , pl.amount, pl.statut as statut_ligne, pl.rowid as rowid_ligne";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."prelevement_lignes as pl";
|
||||
@ -139,7 +140,7 @@ if ($search_bon) {
|
||||
}
|
||||
if ($type == 'bank-transfer') {
|
||||
if ($search_code) {
|
||||
$sql .= natural_search("s.code_fourn", $search_code);
|
||||
$sql .= natural_search("s.code_fournisseur", $search_code);
|
||||
}
|
||||
} else {
|
||||
if ($search_code) {
|
||||
@ -172,6 +173,9 @@ if ($result) {
|
||||
|
||||
$param = "&statut=".urlencode($statut);
|
||||
$param .= "&search_bon=".urlencode($search_bon);
|
||||
if ($type == 'bank-transfer') {
|
||||
$param .= '&type=bank-transfer';
|
||||
}
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) {
|
||||
$param .= '&limit='.urlencode($limit);
|
||||
}
|
||||
@ -204,7 +208,7 @@ if ($result) {
|
||||
print '<td class="liste_titre"><input type="text" class="flat" name="search_bon" value="'.dol_escape_htmltag($search_bon).'" size="6"></td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat" name="search_company" value="'.dol_escape_htmltag($search_company).'" size="6"></td>';
|
||||
print '<td class="liste_titre" align="center"><input type="text" class="flat" name="search_code" value="'.dol_escape_htmltag($search_code).'" size="6"></td>';
|
||||
print '<td class="liste_titre center"><input type="text" class="flat" name="search_code" value="'.dol_escape_htmltag($search_code).'" size="6"></td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre maxwidthsearch">';
|
||||
@ -214,8 +218,12 @@ if ($result) {
|
||||
print '</tr>';
|
||||
|
||||
$columntitle = "WithdrawalsReceipts";
|
||||
$columntitlethirdparty = "CustomerCode";
|
||||
$columncodethirdparty = "s.code_client";
|
||||
if ($type == 'bank-transfer') {
|
||||
$columntitle = "BankTransferReceipts";
|
||||
$columntitlethirdparty = "SupplierCode";
|
||||
$columncodethirdparty = "s.code_fournisseur";
|
||||
}
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
@ -223,7 +231,7 @@ if ($result) {
|
||||
print_liste_field_titre("Line", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Bill", $_SERVER["PHP_SELF"], "f.ref", '', $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "s.nom", '', $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("CustomerCode", $_SERVER["PHP_SELF"], "s.code_client", '', $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre($columntitlethirdparty, $_SERVER["PHP_SELF"], $columncodethirdparty, '', $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "p.datec", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "pl.amount", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre('');
|
||||
@ -256,9 +264,17 @@ if ($result) {
|
||||
print '</a></td>';
|
||||
|
||||
print '<td>';
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/facture/card.php?facid='.$obj->facid.'">';
|
||||
print img_object($langs->trans("ShowBill"), "bill");
|
||||
print ' <a href="'.DOL_URL_ROOT.'/compta/facture/card.php?facid='.$obj->facid.'">'.$obj->invoiceref."</a></td>\n";
|
||||
$link_to_bill = '/compta/facture/card.php?facid=';
|
||||
$link_title = 'Invoice';
|
||||
$link_picto = 'bill';
|
||||
if ($type == 'bank-transfer') {
|
||||
$link_to_bill = '/fourn/facture/card.php?facid=';
|
||||
$link_title = 'SupplierInvoice';
|
||||
$link_picto = 'supplier_invoice';
|
||||
}
|
||||
print '<a href="'.DOL_URL_ROOT.$link_to_bill.$obj->facid.'">';
|
||||
print img_object($langs->trans($link_title), $link_picto);
|
||||
print ' '.$obj->invoiceref."</td>\n";
|
||||
print '</a>';
|
||||
print '</td>';
|
||||
|
||||
@ -266,7 +282,15 @@ if ($result) {
|
||||
print $company->getNomUrl(1);
|
||||
print "</td>\n";
|
||||
|
||||
print '<td align="center"><a href="card.php?id='.$obj->rowid.'">'.$obj->code_client."</a></td>\n";
|
||||
|
||||
print '<td class="center">';
|
||||
$link_to_tab = '/comm/card.php?socid=';
|
||||
$link_code = $obj->code_client;
|
||||
if ($type == 'bank-transfer') {
|
||||
$link_to_tab = '/fourn/card.php?socid=';
|
||||
$link_code = $obj->code_fournisseur;
|
||||
}
|
||||
print '<a href="'.DOL_URL_ROOT.$link_to_tab.$company->id.'">'.$link_code."</a></td>\n";
|
||||
|
||||
print '<td class="center">'.dol_print_date($db->jdate($obj->datec), 'day')."</td>\n";
|
||||
|
||||
|
||||
@ -132,6 +132,9 @@ if ($result) {
|
||||
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
|
||||
$param .= '&contextpage='.urlencode($contextpage);
|
||||
}
|
||||
if ($type == 'bank-transfer') {
|
||||
$param .= '&type=bank-transfer';
|
||||
}
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) {
|
||||
$param .= '&limit='.urlencode($limit);
|
||||
}
|
||||
|
||||
@ -93,7 +93,8 @@ class modIncoterm extends DolibarrModules
|
||||
'tabfieldvalue'=>array("code,libelle"), // List of fields (list of fields to edit a record)
|
||||
'tabfieldinsert'=>array("code,libelle"), // List of fields (list of fields for insert)
|
||||
'tabrowid'=>array("rowid"), // Name of columns with primary key (try to always name it 'rowid')
|
||||
'tabcond'=>array($conf->incoterm->enabled)
|
||||
'tabcond'=>array($conf->incoterm->enabled),
|
||||
'tabhelp' => array(array())
|
||||
);
|
||||
|
||||
$this->boxes = array(); // List of boxes
|
||||
|
||||
@ -221,9 +221,9 @@ class modMyModule extends DolibarrModules
|
||||
// Name of columns with primary key (try to always name it 'rowid')
|
||||
'tabrowid'=>array("rowid", "rowid", "rowid"),
|
||||
// Condition to show each dictionary
|
||||
'tabcond'=>array($conf->mymodule->enabled, $conf->mymodule->enabled, $conf->mymodule->enabled)
|
||||
// Help tooltip for each fields of the dictionary
|
||||
'tabhelp'=>array(array('code'=>$langs->trans('CodeTooltipHelp')))
|
||||
'tabcond'=>array($conf->mymodule->enabled, $conf->mymodule->enabled, $conf->mymodule->enabled),
|
||||
// Tooltip for every fields of dictionaries: DO NOT PUT AN EMPTY ARRAY
|
||||
'tabhelp'=>array(array('code'=>$langs->trans('CodeTooltipHelp'), 'field2' => 'field2tooltip'), array('code'=>$langs->trans('CodeTooltipHelp'), 'field2' => 'field2tooltip'), ...),
|
||||
);
|
||||
*/
|
||||
|
||||
|
||||
@ -332,7 +332,7 @@ $sql .= " t.rowid as id, t.ref, t.label, t.planned_workload, t.duration_effectiv
|
||||
$sql .= " t.description, t.fk_task_parent";
|
||||
$sql .= " ,t.budget_amount";
|
||||
// We'll need these fields in order to filter by categ
|
||||
if ($search_categ) {
|
||||
if ($search_categ > 0) {
|
||||
$sql .= ", cs.fk_categorie, cs.fk_project";
|
||||
}
|
||||
// Add sum fields
|
||||
@ -352,7 +352,7 @@ $sql .= $hookmanager->resPrint;
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."projet as p";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid";
|
||||
// We'll need this table joined to the select in order to filter by categ
|
||||
if (!empty($search_categ)) {
|
||||
if ($search_categ > 0) {
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_project as cs ON p.rowid = cs.fk_project"; // We'll need this table joined to the select in order to filter by categ
|
||||
}
|
||||
$sql .= ", ".MAIN_DB_PREFIX."projet_task as t";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user