Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a186e16568 | ||
|
|
a621032643 | ||
|
|
32646cb7f4 | ||
|
|
74b67eb6c6 | ||
|
|
667890247c | ||
|
|
c727bbb530 | ||
|
|
973a2ede97 | ||
|
|
e8fd551043 | ||
|
|
34b3113bb7 | ||
|
|
90854dc2bf | ||
|
|
b44ddaa696 | ||
|
|
03a9daa3e6 | ||
|
|
e5193f16cc | ||
|
|
9abde6c057 | ||
|
|
6aa8ba8935 | ||
|
|
f782ac6654 | ||
|
|
1e54e695b2 | ||
|
|
f2eb3c1a55 | ||
|
|
41a970c90f | ||
|
|
3d9b2a1676 | ||
|
|
7be0e0da1c |
@@ -495,6 +495,12 @@ $sql .= " ".MAIN_DB_PREFIX."bank as b";
|
|||||||
if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (b.rowid = ef.fk_object)";
|
if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (b.rowid = ef.fk_object)";
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank_url as bu ON bu.fk_bank = b.rowid AND type = 'company'";
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank_url as bu ON bu.fk_bank = b.rowid AND type = 'company'";
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON bu.url_id = s.rowid";
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON bu.url_id = s.rowid";
|
||||||
|
|
||||||
|
// Add fields from hooks
|
||||||
|
$parameters = array();
|
||||||
|
$reshook = $hookmanager->executeHooks('printFieldListJoin', $parameters); // Note that $action and $object may have been modified by hook
|
||||||
|
$sql .= $hookmanager->resPrint;
|
||||||
|
|
||||||
$sql .= " WHERE b.fk_account = ba.rowid";
|
$sql .= " WHERE b.fk_account = ba.rowid";
|
||||||
$sql .= " AND ba.entity IN (".getEntity('bank_account').")";
|
$sql .= " AND ba.entity IN (".getEntity('bank_account').")";
|
||||||
if ($search_account > 0) $sql .= " AND b.fk_account = ".$search_account;
|
if ($search_account > 0) $sql .= " AND b.fk_account = ".$search_account;
|
||||||
@@ -1507,6 +1513,11 @@ if ($resql)
|
|||||||
if (!$i) $totalarray['nbfield']++;
|
if (!$i) $totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Fields from hook
|
||||||
|
$parameters=array('arrayfields'=>$arrayfields, 'obj'=>$objp, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||||
|
$reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $objecttmp); // Note that $action and $objecttmpect may have been modified by hook
|
||||||
|
print $hookmanager->resPrint;
|
||||||
|
|
||||||
// Action edit/delete
|
// Action edit/delete
|
||||||
print '<td class="nowraponall" align="center">';
|
print '<td class="nowraponall" align="center">';
|
||||||
// Transaction reconciliated or edit link
|
// Transaction reconciliated or edit link
|
||||||
|
|||||||
@@ -418,7 +418,7 @@ if ($modecompta == 'CREANCES-DETTES')
|
|||||||
|
|
||||||
// Quantity
|
// Quantity
|
||||||
print '<td class="right">';
|
print '<td class="right">';
|
||||||
print $qty[$key];
|
print price($qty[$key], 1, $langs, 0, 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Percent;
|
// Percent;
|
||||||
|
|||||||
@@ -469,7 +469,7 @@ class Translate
|
|||||||
if (! $found && ! empty($conf->global->MAIN_ENABLE_OVERWRITE_TRANSLATION))
|
if (! $found && ! empty($conf->global->MAIN_ENABLE_OVERWRITE_TRANSLATION))
|
||||||
{
|
{
|
||||||
// Overwrite translation with database read
|
// Overwrite translation with database read
|
||||||
$sql ="SELECT transkey, transvalue FROM ".MAIN_DB_PREFIX."overwrite_trans where lang='".$db->escape($this->defaultlang)."' OR lang IS NULL";
|
$sql ="SELECT transkey, transvalue FROM ".MAIN_DB_PREFIX."overwrite_trans where (lang='".$db->escape($this->defaultlang)."' OR lang IS NULL)";
|
||||||
$sql.=" AND entity IN (0, ".getEntity('overwrite_trans').")";
|
$sql.=" AND entity IN (0, ".getEntity('overwrite_trans').")";
|
||||||
$sql.=$db->order("lang", "DESC");
|
$sql.=$db->order("lang", "DESC");
|
||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
|
|||||||
@@ -390,7 +390,7 @@ class Utils
|
|||||||
if ($compression == 'none') fclose($handle);
|
if ($compression == 'none') fclose($handle);
|
||||||
if ($compression == 'gz') gzclose($handle);
|
if ($compression == 'gz') gzclose($handle);
|
||||||
if ($compression == 'bz') bzclose($handle);
|
if ($compression == 'bz') bzclose($handle);
|
||||||
if ($ok && preg_match('/^-- (MySql|MariaDB)/i', $errormsg)) { // No error
|
if ($ok && preg_match('/^-- (MySql|MariaDB)/i', $errormsg) || preg_match('/^\/\*M?!999999/', $errormsg)) { // Start of file is ok, NOT an error
|
||||||
$errormsg = '';
|
$errormsg = '';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -367,7 +367,7 @@ function show_stats_for_company($product, $socid)
|
|||||||
print '</td><td class="right">';
|
print '</td><td class="right">';
|
||||||
print $product->stats_propale['nb'];
|
print $product->stats_propale['nb'];
|
||||||
print '</td><td class="right">';
|
print '</td><td class="right">';
|
||||||
print $product->stats_propale['qty'];
|
print price($product->stats_propale['qty'], 1, $langs, 0, 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
@@ -385,7 +385,7 @@ function show_stats_for_company($product, $socid)
|
|||||||
print '</td><td class="right">';
|
print '</td><td class="right">';
|
||||||
print $product->stats_proposal_supplier['nb'];
|
print $product->stats_proposal_supplier['nb'];
|
||||||
print '</td><td class="right">';
|
print '</td><td class="right">';
|
||||||
print $product->stats_proposal_supplier['qty'];
|
print price($product->stats_proposal_supplier['qty'], 1, $langs, 0, 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
@@ -403,7 +403,7 @@ function show_stats_for_company($product, $socid)
|
|||||||
print '</td><td class="right">';
|
print '</td><td class="right">';
|
||||||
print $product->stats_commande['nb'];
|
print $product->stats_commande['nb'];
|
||||||
print '</td><td class="right">';
|
print '</td><td class="right">';
|
||||||
print $product->stats_commande['qty'];
|
print price($product->stats_commande['qty'], 1, $langs, 0, 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
@@ -421,7 +421,7 @@ function show_stats_for_company($product, $socid)
|
|||||||
print '</td><td class="right">';
|
print '</td><td class="right">';
|
||||||
print $product->stats_commande_fournisseur['nb'];
|
print $product->stats_commande_fournisseur['nb'];
|
||||||
print '</td><td class="right">';
|
print '</td><td class="right">';
|
||||||
print $product->stats_commande_fournisseur['qty'];
|
print price($product->stats_commande_fournisseur['qty'], 1, $langs, 0, 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
@@ -439,7 +439,7 @@ function show_stats_for_company($product, $socid)
|
|||||||
print '</td><td class="right">';
|
print '</td><td class="right">';
|
||||||
print $product->stats_facture['nb'];
|
print $product->stats_facture['nb'];
|
||||||
print '</td><td class="right">';
|
print '</td><td class="right">';
|
||||||
print $product->stats_facture['qty'];
|
print price($product->stats_facture['qty'], 1, $langs, 0, 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
@@ -457,7 +457,7 @@ function show_stats_for_company($product, $socid)
|
|||||||
print '</td><td class="right">';
|
print '</td><td class="right">';
|
||||||
print $product->stats_facture_fournisseur['nb'];
|
print $product->stats_facture_fournisseur['nb'];
|
||||||
print '</td><td class="right">';
|
print '</td><td class="right">';
|
||||||
print $product->stats_facture_fournisseur['qty'];
|
print price($product->stats_facture_fournisseur['qty'], 1, $langs, 0, 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
@@ -476,7 +476,7 @@ function show_stats_for_company($product, $socid)
|
|||||||
print '</td><td class="right">';
|
print '</td><td class="right">';
|
||||||
print $product->stats_contrat['nb'];
|
print $product->stats_contrat['nb'];
|
||||||
print '</td><td class="right">';
|
print '</td><td class="right">';
|
||||||
print $product->stats_contrat['qty'];
|
print price($product->stats_contrat['qty'], 1, $langs, 0, 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1267,11 +1267,9 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
{
|
{
|
||||||
$logodir = $conf->mycompany->dir_output;
|
$logodir = $conf->mycompany->dir_output;
|
||||||
if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
|
if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
|
||||||
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO))
|
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO)) {
|
||||||
{
|
|
||||||
$logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small;
|
$logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$logo = $logodir.'/logos/'.$this->emetteur->logo;
|
$logo = $logodir.'/logos/'.$this->emetteur->logo;
|
||||||
}
|
}
|
||||||
if (is_readable($logo))
|
if (is_readable($logo))
|
||||||
|
|||||||
@@ -1632,11 +1632,9 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
{
|
{
|
||||||
$logodir = $conf->mycompany->dir_output;
|
$logodir = $conf->mycompany->dir_output;
|
||||||
if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
|
if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
|
||||||
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO))
|
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO)) {
|
||||||
{
|
|
||||||
$logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small;
|
$logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$logo = $logodir.'/logos/'.$this->emetteur->logo;
|
$logo = $logodir.'/logos/'.$this->emetteur->logo;
|
||||||
}
|
}
|
||||||
if (is_readable($logo))
|
if (is_readable($logo))
|
||||||
|
|||||||
@@ -1479,11 +1479,9 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
{
|
{
|
||||||
$logodir = $conf->mycompany->dir_output;
|
$logodir = $conf->mycompany->dir_output;
|
||||||
if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
|
if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
|
||||||
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO))
|
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO)) {
|
||||||
{
|
|
||||||
$logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small;
|
$logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$logo = $logodir.'/logos/'.$this->emetteur->logo;
|
$logo = $logodir.'/logos/'.$this->emetteur->logo;
|
||||||
}
|
}
|
||||||
if (is_readable($logo))
|
if (is_readable($logo))
|
||||||
|
|||||||
@@ -1515,11 +1515,9 @@ class pdf_cyan extends ModelePDFPropales
|
|||||||
{
|
{
|
||||||
$logodir = $conf->mycompany->dir_output;
|
$logodir = $conf->mycompany->dir_output;
|
||||||
if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
|
if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
|
||||||
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO))
|
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO)) {
|
||||||
{
|
|
||||||
$logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small;
|
$logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$logo = $logodir.'/logos/'.$this->emetteur->logo;
|
$logo = $logodir.'/logos/'.$this->emetteur->logo;
|
||||||
}
|
}
|
||||||
if (is_readable($logo))
|
if (is_readable($logo))
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
@@ -1048,7 +1048,7 @@ class Thirdparties extends DolibarrApi
|
|||||||
{
|
{
|
||||||
global $db, $conf;
|
global $db, $conf;
|
||||||
|
|
||||||
if (!DolibarrApiAccess::$user->rights->facture->lire) {
|
if (!DolibarrApiAccess::$user->rights->societe->lire) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
if (empty($id)) {
|
if (empty($id)) {
|
||||||
|
|||||||