Skip to content

Commit

Permalink
Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jul 22, 2019
2 parents 891eaf5 + 45ea80a commit 4c4a0b7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion htdocs/compta/facture/invoicetemplate_list.php
Expand Up @@ -264,7 +264,7 @@
if ($search_year_date_when > 0 && empty($search_day_date_when))
$sql.= " AND f.date_when BETWEEN '".$db->idate(dol_get_first_day($search_year_date_when,$search_month_date_when,false))."' AND '".$db->idate(dol_get_last_day($search_year_date_when,$search_month_date_when,false))."'";
else if ($search_year_date_when > 0 && ! empty($search_day_date_when))
$sql.= " AND f.date_date_when_reglement BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month_date_when, $search_day_date_when, $search_year_date_when))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month_date_when, $search_day_date_when, $search_year_date_when))."'";
$sql.= " AND f.date_when BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month_date_when, $search_day_date_when, $search_year_date_when))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month_date_when, $search_day_date_when, $search_year_date_when))."'";
else
$sql.= " AND date_format(f.date_when, '%m') = '".$db->escape($search_month_date_when)."'";
}
Expand Down
2 changes: 1 addition & 1 deletion htdocs/compta/prelevement/factures.php
Expand Up @@ -160,7 +160,7 @@
$sql.= " AND f.fk_soc = s.rowid";
$sql.= " AND pf.fk_facture = f.rowid";
$sql.= " AND f.entity = ".$conf->entity;
if ($prev_id) $sql.= " AND p.rowid=".$prev_id;
if ($object->id) $sql.= " AND p.rowid=".$object->id;
if ($socid) $sql.= " AND s.rowid = ".$socid;
$sql.= $db->order($sortfield,$sortorder);

Expand Down
Expand Up @@ -393,7 +393,11 @@ function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidede
}
}
// Make substitutions into odt of thirdparty
$tmparray=$this->get_substitutionarray_thirdparty($socobject,$outputlangs);
if ($socobject->element == 'contact') {
$tmparray = $this->get_substitutionarray_contact($socobject, $outputlangs);
} else {
$tmparray = $this->get_substitutionarray_thirdparty($socobject, $outputlangs);
}
foreach($tmparray as $key=>$value)
{
try {
Expand Down

0 comments on commit 4c4a0b7

Please sign in to comment.