Merge branch '7.0' of https://github.com/Dolibarr/dolibarr.git into 7.0_fix9161
This commit is contained in:
commit
cba4676032
@ -59,11 +59,15 @@ $now = dol_now();
|
|||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
|
$hookmanager->initHooks(array('sellsjournal'));
|
||||||
|
$parameters=array();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$reshook=$hookmanager->executeHooks('doActions',$parameters,$user,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
|
||||||
// Get informations of journal
|
// Get informations of journal
|
||||||
$accountingjournalstatic = new AccountingJournal($db);
|
$accountingjournalstatic = new AccountingJournal($db);
|
||||||
$accountingjournalstatic->fetch($id_journal);
|
$accountingjournalstatic->fetch($id_journal);
|
||||||
|
|||||||
@ -1611,7 +1611,7 @@ if ($id > 0)
|
|||||||
|
|
||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
print $formfile->showdocuments('agenda',$object->id,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,0,0,'','','',$object->default_lang);
|
print $formfile->showdocuments('actions',$object->id,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,0,0,'','','',$object->default_lang);
|
||||||
|
|
||||||
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
|
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
|
||||||
|
|
||||||
|
|||||||
@ -1677,10 +1677,11 @@ class Commande extends CommonOrder
|
|||||||
|
|
||||||
// Retrieve all extrafields for invoice
|
// Retrieve all extrafields for invoice
|
||||||
// fetch optionals attributes and labels
|
// fetch optionals attributes and labels
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
// require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||||
$extrafields=new ExtraFields($this->db);
|
// $extrafields=new ExtraFields($this->db);
|
||||||
$extralabels=$extrafields->fetch_name_optionals_label($this->table_element,true);
|
// $extralabels=$extrafields->fetch_name_optionals_label($this->table_element,true);
|
||||||
$this->fetch_optionals($this->id,$extralabels);
|
// $this->fetch_optionals($this->id,$extralabels);
|
||||||
|
$this->fetch_optionals();
|
||||||
|
|
||||||
$this->db->free($result);
|
$this->db->free($result);
|
||||||
|
|
||||||
@ -1882,6 +1883,9 @@ class Commande extends CommonOrder
|
|||||||
$line->multicurrency_total_tva = $objp->multicurrency_total_tva;
|
$line->multicurrency_total_tva = $objp->multicurrency_total_tva;
|
||||||
$line->multicurrency_total_ttc = $objp->multicurrency_total_ttc;
|
$line->multicurrency_total_ttc = $objp->multicurrency_total_ttc;
|
||||||
|
|
||||||
|
$line->fetch_optionals();
|
||||||
|
|
||||||
|
|
||||||
$this->lines[$i] = $line;
|
$this->lines[$i] = $line;
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
|
|||||||
@ -1353,10 +1353,12 @@ class Facture extends CommonInvoice
|
|||||||
|
|
||||||
// Retrieve all extrafield for invoice
|
// Retrieve all extrafield for invoice
|
||||||
// fetch optionals attributes and labels
|
// fetch optionals attributes and labels
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
// require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||||
$extrafields=new ExtraFields($this->db);
|
// $extrafields=new ExtraFields($this->db);
|
||||||
$extralabels=$extrafields->fetch_name_optionals_label($this->table_element,true);
|
// $extralabels=$extrafields->fetch_name_optionals_label($this->table_element,true);
|
||||||
$this->fetch_optionals($this->id,$extralabels);
|
// $this->fetch_optionals($this->id,$extralabels);
|
||||||
|
$this->fetch_optionals();
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Lines
|
* Lines
|
||||||
@ -1477,7 +1479,7 @@ class Facture extends CommonInvoice
|
|||||||
$line->multicurrency_total_tva = $objp->multicurrency_total_tva;
|
$line->multicurrency_total_tva = $objp->multicurrency_total_tva;
|
||||||
$line->multicurrency_total_ttc = $objp->multicurrency_total_ttc;
|
$line->multicurrency_total_ttc = $objp->multicurrency_total_ttc;
|
||||||
|
|
||||||
// TODO Fetch optional like done in fetch line of facture_rec ?
|
$line->fetch_optionals();
|
||||||
|
|
||||||
$this->lines[$i] = $line;
|
$this->lines[$i] = $line;
|
||||||
|
|
||||||
|
|||||||
@ -451,7 +451,7 @@ if ($search_month > 0)
|
|||||||
if ($search_year > 0 && empty($search_day))
|
if ($search_year > 0 && empty($search_day))
|
||||||
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'";
|
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'";
|
||||||
else if ($search_year > 0 && ! empty($search_day))
|
else if ($search_year > 0 && ! empty($search_day))
|
||||||
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $serch_year))."'";
|
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'";
|
||||||
else
|
else
|
||||||
$sql.= " AND date_format(f.datef, '%m') = '".$month."'";
|
$sql.= " AND date_format(f.datef, '%m') = '".$month."'";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2806,7 +2806,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
|||||||
if ($picto == 'off') { $fakey = 'fa-square-o'; $fasize='1.3em'; }
|
if ($picto == 'off') { $fakey = 'fa-square-o'; $fasize='1.3em'; }
|
||||||
if ($picto == 'on') { $fakey = 'fa-check-square-o'; $fasize='1.3em'; }
|
if ($picto == 'on') { $fakey = 'fa-check-square-o'; $fasize='1.3em'; }
|
||||||
$enabledisablehtml='';
|
$enabledisablehtml='';
|
||||||
$enabledisablehtml.='<span class="fa '.$fakey.' valignmiddle'.($morecss?' '.$morecss:'').'" style="'.($fasize?('font-size: '.$fasize.';'):'').($facolor?(' color: '.$facolor.';'):'').'" alt="'.dol_escape_htmltag($titlealt).'" title="'.dol_escape_htmltag($titlealt).'"'.($moreatt?' '.$moreatt:'').'">';
|
$enabledisablehtml.='<span class="fa '.$fakey.' valignmiddle'.($morecss?' '.$morecss:'').'" style="'.($fasize?('font-size: '.$fasize.';'):'').($facolor?(' color: '.$facolor.';'):'').'" alt="'.dol_escape_htmltag($titlealt).'" title="'.dol_escape_htmltag($titlealt).'"'.($moreatt?' '.$moreatt:'').'>';
|
||||||
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $enabledisablehtml.=$titlealt;
|
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $enabledisablehtml.=$titlealt;
|
||||||
$enabledisablehtml.='</span>';
|
$enabledisablehtml.='</span>';
|
||||||
return $enabledisablehtml;
|
return $enabledisablehtml;
|
||||||
|
|||||||
@ -437,15 +437,15 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target
|
|||||||
} else {
|
} else {
|
||||||
$companytouseforaddress = $targetcompany;
|
$companytouseforaddress = $targetcompany;
|
||||||
|
|
||||||
// Contact on a thirdparty that is a different thirdparty than the thirdparty of object
|
// Contact on a thirdparty that is a different thirdparty than the thirdparty of object
|
||||||
if ($targetcontact->socid > 0 && $targetcontact->socid != $targetcompany->id)
|
if ($targetcontact->socid > 0 && $targetcontact->socid != $targetcompany->id)
|
||||||
{
|
{
|
||||||
$targetcontact->fetch_thirparty();
|
$targetcontact->fetch_thirdparty();
|
||||||
$companytouseforaddress = $targetcontact->thirdparty;
|
$companytouseforaddress = $targetcontact->thirdparty;
|
||||||
}
|
}
|
||||||
|
|
||||||
$stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset(dol_format_address($companytouseforaddress));
|
$stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset(dol_format_address($companytouseforaddress));
|
||||||
}
|
}
|
||||||
// Country
|
// Country
|
||||||
if (!empty($targetcontact->country_code) && $targetcontact->country_code != $sourcecompany->country_code) {
|
if (!empty($targetcontact->country_code) && $targetcontact->country_code != $sourcecompany->country_code) {
|
||||||
$stringaddress.= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$targetcontact->country_code));
|
$stringaddress.= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$targetcontact->country_code));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user