forked from Wavyzz/dolibarr
Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
90854dc2bf | ||
|
|
b44ddaa696 | ||
|
|
4569cb82b2 | ||
|
|
04d33f4594 | ||
|
|
af6e95aa79 | ||
|
|
5d942c9d1a | ||
|
|
1541e20870 | ||
|
|
53709cf509 | ||
|
|
10e32c056e | ||
|
|
0a72aed3d7 | ||
|
|
5e1cd459b1 | ||
|
|
0f435f9901 | ||
|
|
a9117fe864 | ||
|
|
8ce929d509 | ||
|
|
c2ad40043f | ||
|
|
529dfb8dfb | ||
|
|
74eac1d06a | ||
|
|
03557b69c2 | ||
|
|
7a183ea026 | ||
|
|
b44d6744f9 | ||
|
|
7eb003c684 | ||
|
|
6e1702c1a5 |
@@ -120,6 +120,7 @@ install:
|
||||
composer self-update
|
||||
composer -n init
|
||||
composer -n config vendor-dir htdocs/includes
|
||||
composer -n config -g vendor-dir htdocs/includes
|
||||
echo
|
||||
|
||||
- |
|
||||
|
||||
@@ -347,17 +347,19 @@ class Utils
|
||||
{
|
||||
$handlein = popen($fullcommandclear, 'r');
|
||||
$i=0;
|
||||
while (!feof($handlein))
|
||||
{
|
||||
$i++; // output line number
|
||||
$read = fgets($handlein);
|
||||
// Exclude warning line we don't want
|
||||
if ($i == 1 && preg_match('/Warning.*Using a password/i', $read)) continue;
|
||||
fwrite($handle, $read);
|
||||
if (preg_match('/'.preg_quote('-- Dump completed').'/i', $read)) $ok=1;
|
||||
elseif (preg_match('/'.preg_quote('SET SQL_NOTES=@OLD_SQL_NOTES').'/i', $read)) $ok=1;
|
||||
if ($handlein) {
|
||||
while (!feof($handlein))
|
||||
{
|
||||
$i++; // output line number
|
||||
$read = fgets($handlein);
|
||||
// Exclude warning line we don't want
|
||||
if ($i == 1 && preg_match('/Warning.*Using a password/i', $read)) continue;
|
||||
fwrite($handle, $read);
|
||||
if (preg_match('/'.preg_quote('-- Dump completed').'/i', $read)) $ok=1;
|
||||
elseif (preg_match('/'.preg_quote('SET SQL_NOTES=@OLD_SQL_NOTES').'/i', $read)) $ok=1;
|
||||
}
|
||||
pclose($handlein);
|
||||
}
|
||||
pclose($handlein);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1872,6 +1872,12 @@ function dolGetElementUrl($objectid,$objecttype,$withpicto=0,$option='')
|
||||
$classpath = 'fourn/class';
|
||||
$module='fournisseur';
|
||||
}
|
||||
elseif ($objecttype == 'supplier_proposal') {
|
||||
$classfile = 'supplier_proposal';
|
||||
$classname = 'SupplierProposal';
|
||||
$classpath = 'supplier_proposal/class';
|
||||
$module = 'supplier_proposal';
|
||||
}
|
||||
elseif ($objecttype == 'stock') {
|
||||
$classpath = 'product/stock/class';
|
||||
$classfile='entrepot';
|
||||
|
||||
@@ -2071,7 +2071,7 @@ function pdf_getTotalQty($object,$type,$outputlangs)
|
||||
*/
|
||||
function pdf_getLinkedObjects($object,$outputlangs)
|
||||
{
|
||||
global $hookmanager;
|
||||
global $db, $hookmanager;
|
||||
|
||||
$linkedobjects=array();
|
||||
|
||||
@@ -2127,8 +2127,13 @@ function pdf_getLinkedObjects($object,$outputlangs)
|
||||
// We concat this record info into fields xxx_value. title is overwrote.
|
||||
if (empty($object->linkedObjects['commande']) && $object->element != 'commande') // There is not already a link to order and object is not the order, so we show also info with order
|
||||
{
|
||||
$elementobject->fetchObjectLinked();
|
||||
if (! empty($elementobject->linkedObjects['commande'])) $order = reset($elementobject->linkedObjects['commande']);
|
||||
$elementobject->fetchObjectLinked(null, '', null, '', 'OR', 1, 'sourcetype', 0);
|
||||
if (! empty($elementobject->linkedObjectsIds['commande'])){
|
||||
include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||
$order = new Commande($db);
|
||||
$ret = $order->fetch(reset($elementobject->linkedObjectsIds['commande']));
|
||||
if ($ret < 1) { $order=null; }
|
||||
}
|
||||
}
|
||||
if (! is_object($order))
|
||||
{
|
||||
|
||||
@@ -1251,9 +1251,17 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
// Logo
|
||||
if (empty($conf->global->PDF_DISABLE_MYCOMPANY_LOGO))
|
||||
{
|
||||
$logo=$conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo;
|
||||
if ($this->emetteur->logo)
|
||||
{
|
||||
$logodir = $conf->mycompany->dir_output;
|
||||
if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
|
||||
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO))
|
||||
{
|
||||
$logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small;
|
||||
}
|
||||
else {
|
||||
$logo = $logodir.'/logos/'.$this->emetteur->logo;
|
||||
}
|
||||
if (is_readable($logo))
|
||||
{
|
||||
$height=pdf_getHeightForLogo($logo);
|
||||
|
||||
@@ -1563,9 +1563,17 @@ class pdf_crabe extends ModelePDFFactures
|
||||
// Logo
|
||||
if (empty($conf->global->PDF_DISABLE_MYCOMPANY_LOGO))
|
||||
{
|
||||
$logo=$conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo;
|
||||
if ($this->emetteur->logo)
|
||||
{
|
||||
$logodir = $conf->mycompany->dir_output;
|
||||
if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
|
||||
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO))
|
||||
{
|
||||
$logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small;
|
||||
}
|
||||
else {
|
||||
$logo = $logodir.'/logos/'.$this->emetteur->logo;
|
||||
}
|
||||
if (is_readable($logo))
|
||||
{
|
||||
$height=pdf_getHeightForLogo($logo);
|
||||
|
||||
@@ -1453,9 +1453,17 @@ class pdf_azur extends ModelePDFPropales
|
||||
// Logo
|
||||
if (empty($conf->global->PDF_DISABLE_MYCOMPANY_LOGO))
|
||||
{
|
||||
$logo=$conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo;
|
||||
if ($this->emetteur->logo)
|
||||
{
|
||||
$logodir = $conf->mycompany->dir_output;
|
||||
if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
|
||||
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO))
|
||||
{
|
||||
$logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small;
|
||||
}
|
||||
else {
|
||||
$logo = $logodir.'/logos/'.$this->emetteur->logo;
|
||||
}
|
||||
if (is_readable($logo))
|
||||
{
|
||||
$height=pdf_getHeightForLogo($logo);
|
||||
|
||||
@@ -1449,9 +1449,17 @@ class pdf_cyan extends ModelePDFPropales
|
||||
// Logo
|
||||
if (empty($conf->global->PDF_DISABLE_MYCOMPANY_LOGO))
|
||||
{
|
||||
$logo=$conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo;
|
||||
if ($this->emetteur->logo)
|
||||
{
|
||||
$logodir = $conf->mycompany->dir_output;
|
||||
if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
|
||||
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO))
|
||||
{
|
||||
$logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small;
|
||||
}
|
||||
else {
|
||||
$logo = $logodir.'/logos/'.$this->emetteur->logo;
|
||||
}
|
||||
if (is_readable($logo))
|
||||
{
|
||||
$height=pdf_getHeightForLogo($logo);
|
||||
|
||||
@@ -299,6 +299,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers
|
||||
//Build array of quantity ordered by product
|
||||
if (is_array($order->lines) && count($order->lines)>0) {
|
||||
foreach($order->lines as $orderline) {
|
||||
if (empty($conf->global->STOCK_SUPPORTS_SERVICES) && $orderline->product_type > 0) continue;
|
||||
$qtyordred[$orderline->fk_product]+=$orderline->qty;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2146,7 +2146,7 @@ class ExpenseReport extends CommonObject
|
||||
$sql = "SELECT DISTINCT ur.fk_user";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."user_rights as ur, ".MAIN_DB_PREFIX."rights_def as rd";
|
||||
$sql.= " WHERE ur.fk_id = rd.id and rd.module = 'expensereport' AND rd.perms = 'approve'"; // Permission 'Approve';
|
||||
$sql.= "UNION";
|
||||
$sql.= " UNION";
|
||||
$sql.= " SELECT DISTINCT ugu.fk_user";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."usergroup_user as ugu, ".MAIN_DB_PREFIX."usergroup_rights as ur, ".MAIN_DB_PREFIX."rights_def as rd";
|
||||
$sql.= " WHERE ugu.fk_usergroup = ur.fk_usergroup AND ur.fk_id = rd.id and rd.module = 'expensereport' AND rd.perms = 'approve'"; // Permission 'Approve';
|
||||
|
||||
Reference in New Issue
Block a user