Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/ecm/file_card.php
This commit is contained in:
commit
4a8e72c997
@ -50,6 +50,13 @@ Replace call to serialize_val with no bugged value
|
||||
|
||||
* In all files, replace constructor names into __construct. Replace also parent::constructor_name with parent::__construct
|
||||
|
||||
* Line 4222 of file nusoap.php
|
||||
|
||||
$rev = array();
|
||||
preg_match('/\$Revision: ([^ ]+)/', $this->revision, $rev);
|
||||
$this->outgoing_headers[] = "X-SOAP-Server: $this->title/$this->version (".(isset($rev[1]) ? $rev[1] : '').")";
|
||||
|
||||
|
||||
|
||||
|
||||
TCPDF:
|
||||
|
||||
@ -314,7 +314,6 @@ if ($action != 'export_csv')
|
||||
if (empty($accountingaccountstatic->account_number)) {
|
||||
$link = '<a href="'.DOL_URL_ROOT.'/accountancy/admin/card.php?action=create&accountingaccount='.length_accountg($line->numero_compte).'">'.img_edit_add().'</a>';
|
||||
}
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
if (!empty($show_subgroup))
|
||||
{
|
||||
@ -343,6 +342,7 @@ if ($action != 'export_csv')
|
||||
}
|
||||
}
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$accounting_account.'</td>';
|
||||
print '<td class="nowraponall right">'.price($opening_balance).'</td>';
|
||||
print '<td class="nowraponall right">'.price($line->debit).'</td>';
|
||||
|
||||
@ -263,6 +263,7 @@ class modCommande extends DolibarrModules
|
||||
$this->export_sql_end[$r] .= ' WHERE c.fk_soc = s.rowid AND c.rowid = cd.fk_commande';
|
||||
$this->export_sql_end[$r] .= ' AND c.entity IN ('.getEntity('commande').')';
|
||||
if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' AND sc.fk_user = '.(empty($user) ? 0 : $user->id);
|
||||
|
||||
// Imports
|
||||
//--------
|
||||
$r = 0;
|
||||
|
||||
@ -306,7 +306,7 @@ class modExpedition extends DolibarrModules
|
||||
}
|
||||
$this->export_sql_end[$r] .= ' WHERE c.fk_soc = s.rowid AND c.rowid = ed.fk_expedition AND ed.fk_origin_line = cd.rowid';
|
||||
$this->export_sql_end[$r] .= ' AND c.entity IN ('.getEntity('expedition').')';
|
||||
if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' AND sc.fk_user = '.$user->id;
|
||||
if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' AND sc.fk_user = '.(empty($user) ? 0 : $user->id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -291,7 +291,7 @@ class modFacture extends DolibarrModules
|
||||
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extra3 on p.rowid = extra3.fk_object';
|
||||
$this->export_sql_end[$r] .= ' WHERE f.fk_soc = s.rowid AND f.rowid = fd.fk_facture';
|
||||
$this->export_sql_end[$r] .= ' AND f.entity IN ('.getEntity('invoice').')';
|
||||
if (isset($user) && empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' AND sc.fk_user = '.$user->id;
|
||||
if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' AND sc.fk_user = '.(empty($user) ? 0 : $user->id);
|
||||
$r++;
|
||||
|
||||
|
||||
@ -371,7 +371,7 @@ class modFacture extends DolibarrModules
|
||||
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank_account as ba ON ba.rowid = b.fk_account';
|
||||
$this->export_sql_end[$r] .= ' WHERE f.fk_soc = s.rowid';
|
||||
$this->export_sql_end[$r] .= ' AND f.entity IN ('.getEntity('invoice').')';
|
||||
if (isset($user) && empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' AND sc.fk_user = '.$user->id;
|
||||
if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' AND sc.fk_user = '.(empty($user) ? 0 : $user->id);
|
||||
$r++;
|
||||
}
|
||||
|
||||
|
||||
@ -254,7 +254,7 @@ class modPropale extends DolibarrModules
|
||||
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extra3 on p.rowid = extra3.fk_object';
|
||||
$this->export_sql_end[$r] .= ' WHERE c.fk_soc = s.rowid AND c.rowid = cd.fk_propal';
|
||||
$this->export_sql_end[$r] .= ' AND c.entity IN ('.getEntity('propal').')';
|
||||
if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' AND sc.fk_user = '.$user->id;
|
||||
if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' AND sc.fk_user = '.(empty($user) ? 0 : $user->id);
|
||||
|
||||
// Imports
|
||||
//--------
|
||||
|
||||
@ -231,7 +231,7 @@ class modReception extends DolibarrModules
|
||||
}
|
||||
$this->export_sql_end[$r] .= ' WHERE c.fk_soc = s.rowid AND c.rowid = ed.fk_reception AND ed.fk_commandefourndet = cd.rowid';
|
||||
$this->export_sql_end[$r] .= ' AND c.entity IN ('.getEntity('reception').')';
|
||||
if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' AND sc.fk_user = '.$user->id;
|
||||
if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' AND sc.fk_user = '.(empty($user) ? 0 : $user->id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -71,7 +71,7 @@ if (!$section) {
|
||||
dol_print_error('', 'Error, section parameter missing');
|
||||
exit;
|
||||
}
|
||||
$urlfile = GETPOST("urlfile");
|
||||
$urlfile = (string) dol_sanitizePathName(GETPOST("urlfile"));
|
||||
if (!$urlfile) {
|
||||
dol_print_error('', "ErrorParamNotDefined");
|
||||
exit;
|
||||
|
||||
@ -4219,8 +4219,10 @@ class nusoap_server extends nusoap_base {
|
||||
$payload .= $this->getDebugAsXMLComment();
|
||||
}
|
||||
$this->outgoing_headers[] = "Server: $this->title Server v$this->version";
|
||||
preg_match('/\$Revisio' . 'n: ([^ ]+)/', $this->revision, $rev);
|
||||
$this->outgoing_headers[] = "X-SOAP-Server: $this->title/$this->version (".$rev[1].")";
|
||||
// @CHANGE Fix for php8
|
||||
$rev = array();
|
||||
preg_match('/\$Revision: ([^ ]+)/', $this->revision, $rev);
|
||||
$this->outgoing_headers[] = "X-SOAP-Server: $this->title/$this->version (".(isset($rev[1]) ? $rev[1] : '').")";
|
||||
// Let the Web server decide about this
|
||||
//$this->outgoing_headers[] = "Connection: Close\r\n";
|
||||
$payload = $this->getHTTPBody($payload);
|
||||
|
||||
@ -4332,6 +4332,14 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo
|
||||
$mod->remove('noboxes');
|
||||
$mod->init($reloadmode);
|
||||
}
|
||||
} elseif ($moduletoreload == 'MAIN_MODULE_EXTERNALSITE') {
|
||||
dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate ExternalSite module");
|
||||
$res = @include_once DOL_DOCUMENT_ROOT.'/core/modules/modExternalSite.class.php';
|
||||
if ($res) {
|
||||
$mod = new modExternalSite($db);
|
||||
$mod->remove('noboxes');
|
||||
$mod->init($reloadmode);
|
||||
}
|
||||
} elseif ($moduletoreload == 'MAIN_MODULE_SOCIETE') {
|
||||
dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Societe module");
|
||||
$res = @include_once DOL_DOCUMENT_ROOT.'/core/modules/modSociete.class.php';
|
||||
|
||||
@ -2651,14 +2651,14 @@ class Product extends CommonObject
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."commandedet as cd";
|
||||
$sql .= ", ".MAIN_DB_PREFIX."commande as c";
|
||||
$sql .= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$socid && !$forVirtualStock) {
|
||||
if (empty($user->rights->societe->client->voir) && !$socid && !$forVirtualStock) {
|
||||
$sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
}
|
||||
$sql .= " WHERE c.rowid = cd.fk_commande";
|
||||
$sql .= " AND c.fk_soc = s.rowid";
|
||||
$sql .= " AND c.entity IN (".getEntity($forVirtualStock && !empty($conf->global->STOCK_CALCULATE_VIRTUAL_STOCK_TRANSVERSE_MODE) ? 'stock' : 'commande').")";
|
||||
$sql .= " AND cd.fk_product = ".$this->id;
|
||||
if (!$user->rights->societe->client->voir && !$socid && !$forVirtualStock) {
|
||||
if (empty($user->rights->societe->client->voir) && !$socid && !$forVirtualStock) {
|
||||
$sql .= " AND c.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id;
|
||||
}
|
||||
if ($socid > 0) {
|
||||
|
||||
@ -261,6 +261,9 @@ $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');
|
||||
|
||||
$rightskey = 'produit';
|
||||
if ($type == Product::TYPE_SERVICE) $rightskey = 'service';
|
||||
|
||||
if (empty($reshook))
|
||||
{
|
||||
// Selection of new fields
|
||||
@ -299,8 +302,8 @@ if (empty($reshook))
|
||||
if ((string) $search_type == '1') { $objectlabel = 'Services'; }
|
||||
if ((string) $search_type == '0') { $objectlabel = 'Products'; }
|
||||
|
||||
$permissiontoread = $user->rights->produit->lire;
|
||||
$permissiontodelete = $user->rights->produit->supprimer;
|
||||
$permissiontoread = $user->rights->{$rightskey}->lire;
|
||||
$permissiontodelete = $user->rights->{$rightskey}->supprimer;
|
||||
$uploaddir = $conf->product->dir_output;
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
||||
}
|
||||
@ -530,6 +533,7 @@ if ($resql)
|
||||
//'builddoc'=>$langs->trans("PDFMerge"),
|
||||
//'presend'=>$langs->trans("SendByMail"),
|
||||
);
|
||||
|
||||
$rightskey = 'produit';
|
||||
if ($type == Product::TYPE_SERVICE) $rightskey = 'service';
|
||||
if ($user->rights->{$rightskey}->supprimer) $arrayofmassactions['predelete'] = "<span class='fa fa-trash paddingrightonly'></span>".$langs->trans("Delete");
|
||||
|
||||
@ -454,7 +454,7 @@ $arrayofmassactions = array(
|
||||
);
|
||||
//if($user->rights->societe->creer) $arrayofmassactions['createbills']=$langs->trans("CreateInvoiceForThisCustomer");
|
||||
if ($user->rights->projet->creer) $arrayofmassactions['close'] = $langs->trans("Close");
|
||||
if ($user->rights->societe->supprimer) $arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete");
|
||||
if ($user->rights->projet->supprimer) $arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete");
|
||||
if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array();
|
||||
|
||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
@ -204,7 +204,7 @@ class WebservicesProductsTest extends PHPUnit\Framework\TestCase
|
||||
print $soapclient->response;
|
||||
print "\n";
|
||||
}
|
||||
|
||||
print var_export($result, true);
|
||||
print __METHOD__." count(result)=".(is_array($result) ? count($result) : '')."\n";
|
||||
$this->assertEquals('OK', $result['result']['result_code']);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user