Skip to content

Commit

Permalink
Merge branch 'Upstream/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
aspangaro committed Aug 20, 2014
2 parents af92eb3 + 86d91ff commit 0f7e09d
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 19 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Expand Up @@ -5,6 +5,7 @@ English Dolibarr ChangeLog

***** ChangeLog for 3.7 compared to 3.6.* *****
For users:
- New: On contact list can set filter on both active and not active (no more exclusive select).
- New: Each user can include its own external ics calendar into dolibarr agenda view.
- New: Intervention documents are now available in ECM module.
- New: Can attach supplier order to a customer order.
Expand Down Expand Up @@ -89,6 +90,8 @@ Dolibarr better:
- Changed the way parameters are provided to scripts sync_xxx_ldap2dolibarr.php
- Some field into database wwere renamed from "libelle" to "label".
- Table llx_c_pays were renamed into llx_c_country.
- Trigger PROJECT_BUILDDOC is removed. Building a doc is not a business event. For action after
creation of a pdf, hook "afterPDFCreation" must be used instead.


***** ChangeLog for 3.6 compared to 3.5.* *****
Expand Down
20 changes: 10 additions & 10 deletions htdocs/compta/facture/class/facture.class.php
Expand Up @@ -1763,16 +1763,6 @@ function validate($user, $force_number='', $idwarehouse=0)
}
}

// Set new ref and define current statut
if (! $error)
{
$this->ref = $num;
$this->facnumber=$num;
$this->statut=1;
$this->brouillon=0;
$this->date_validation=$now;
}

// Trigger calls
if (! $error)
{
Expand All @@ -1782,6 +1772,16 @@ function validate($user, $force_number='', $idwarehouse=0)
//TODO: Restoring ref, facnumber, statut, brouillon to previous value if trigger fail
// End call triggers
}

// Set new ref and define current statut
if (! $error)
{
$this->ref = $num;
$this->facnumber=$num;
$this->statut=1;
$this->brouillon=0;
$this->date_validation=$now;
}
}
else
{
Expand Down
4 changes: 2 additions & 2 deletions htdocs/core/lib/company.lib.php
Expand Up @@ -634,7 +634,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')

// Status
print '<td class="liste_titre maxwidthonsmartphone">';
print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status);
print $form->selectarray('search_status', array('-1'=>'','0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status);
print '</td>';

// Copy to clipboard
Expand All @@ -659,7 +659,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
$sql .= ", p.civility as civility_id, p.address, p.zip, p.town";
$sql .= " FROM ".MAIN_DB_PREFIX."socpeople as p";
$sql .= " WHERE p.fk_soc = ".$object->id;
if ($search_status!='') $sql .= " AND p.statut = ".$db->escape($search_status);
if ($search_status!='' && $search_status != '-1') $sql .= " AND p.statut = ".$db->escape($search_status);
if ($search_name) $sql .= " AND (p.lastname LIKE '%".$db->escape($search_name)."%' OR p.firstname LIKE '%".$db->escape($search_name)."%')";
$sql.= " ORDER BY $sortfield $sortorder";

Expand Down
7 changes: 0 additions & 7 deletions htdocs/core/modules/project/modules_project.php
Expand Up @@ -225,13 +225,6 @@ function project_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0,
// Success in building document. We build meta file.
dol_meta_create($object);

// Appel des triggers
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
$interface=new Interfaces($db);
$result=$interface->run_triggers('PROJECT_BUILDDOC',$object,$user,$langs,$conf);
if ($result < 0) { $error++; $this->errors=$interface->errors; }
// Fin appel triggers

return 1;
}
else
Expand Down
12 changes: 12 additions & 0 deletions htdocs/core/modules/project/pdf/pdf_baleine.modules.php
Expand Up @@ -295,6 +295,18 @@ function write_file($object,$outputlangs)
$pdf->Close();

$pdf->Output($file,'F');

// Add pdfgeneration hook
if (! is_object($hookmanager))
{
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
$hookmanager=new HookManager($this->db);
}
$hookmanager->initHooks(array('pdfgeneration'));
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks

if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));

Expand Down

0 comments on commit 0f7e09d

Please sign in to comment.