Merge branch '3.4' of https://github.com/Dolibarr/dolibarr.git into 3.4
This commit is contained in:
commit
6f5e78d27e
@ -8,6 +8,7 @@ Fix: Bad rounding on margin calculations and display.
|
|||||||
Fix: Option drop table into backup was broken.
|
Fix: Option drop table into backup was broken.
|
||||||
Fix: [ bug #1105 ] Searching Boxes other search option
|
Fix: [ bug #1105 ] Searching Boxes other search option
|
||||||
Fix: wrong buy price update
|
Fix: wrong buy price update
|
||||||
|
Fix :[ bug #1142 ] Set paiement on invoice (PGSql)
|
||||||
|
|
||||||
***** ChangeLog for 3.4.1 compared to 3.4.0 *****
|
***** ChangeLog for 3.4.1 compared to 3.4.0 *****
|
||||||
Fix: Display buying price on line edit when no supplier price is defined
|
Fix: Display buying price on line edit when no supplier price is defined
|
||||||
|
|||||||
@ -3674,16 +3674,16 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
// By default if $action=='presend'
|
// By default if $action=='presend'
|
||||||
$titreform='SendBillByMail';
|
$titreform='SendBillByMail';
|
||||||
$topicmail='SendBillRef';
|
$topicmail='SendBillRef';
|
||||||
$action='send';
|
|
||||||
$modelmail='facture_send';
|
$modelmail='facture_send';
|
||||||
|
|
||||||
if ($action == 'prerelance') // For backward compatibility
|
if ($action == 'prerelance') // For backward compatibility
|
||||||
{
|
{
|
||||||
$titrefrom='SendReminderBillByMail';
|
$titrefrom='SendReminderBillByMail';
|
||||||
$topicmail='SendReminderBillRef';
|
$topicmail='SendReminderBillRef';
|
||||||
$action='relance';
|
|
||||||
$modelmail='facture_relance';
|
$modelmail='facture_relance';
|
||||||
|
$action='relance';
|
||||||
}
|
}
|
||||||
|
else $action='send';
|
||||||
|
|
||||||
$ref = dol_sanitizeFileName($object->ref);
|
$ref = dol_sanitizeFileName($object->ref);
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
|
|||||||
@ -522,7 +522,6 @@ class doc_generic_project_odt extends ModelePDFProjects
|
|||||||
else // Text
|
else // Text
|
||||||
{
|
{
|
||||||
$odfHandler->setVars($key, $value, true, 'UTF-8');
|
$odfHandler->setVars($key, $value, true, 'UTF-8');
|
||||||
$odfHandler->setVarsHeadFooter($key, $value, true, 'UTF-8');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(OdfException $e)
|
catch(OdfException $e)
|
||||||
|
|||||||
@ -265,7 +265,7 @@ if ($action == 'create' || $action == 'add_paiement')
|
|||||||
$sql.= ' AND f.fk_soc = '.$object->socid;
|
$sql.= ' AND f.fk_soc = '.$object->socid;
|
||||||
$sql.= ' AND f.paye = 0';
|
$sql.= ' AND f.paye = 0';
|
||||||
$sql.= ' AND f.fk_statut = 1'; // Statut=0 => non validee, Statut=2 => annulee
|
$sql.= ' AND f.fk_statut = 1'; // Statut=0 => non validee, Statut=2 => annulee
|
||||||
$sql.= ' GROUP BY f.rowid, f.ref_supplier, f.total_ht, f.total_ttc, f.datef';
|
$sql.= ' GROUP BY f.rowid, f.ref, f.ref_supplier, f.total_ht, f.total_ttc, f.datef';
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -128,33 +128,6 @@ class Odf
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Assing a template variable
|
|
||||||
*
|
|
||||||
* @param string $key name of the variable within the template
|
|
||||||
* @param string $value replacement value
|
|
||||||
* @param bool $encode if true, special XML characters are encoded
|
|
||||||
* @throws OdfException
|
|
||||||
* @return odf
|
|
||||||
*/
|
|
||||||
public function setVarsHeadFooter($key, $value, $encode = true, $charset = 'ISO-8859')
|
|
||||||
{
|
|
||||||
$tag = $this->config['DELIMITER_LEFT'] . $key . $this->config['DELIMITER_RIGHT'];
|
|
||||||
// TODO Warning string may be:
|
|
||||||
// <text:span text:style-name="T13">{</text:span><text:span text:style-name="T12">aaa</text:span><text:span text:style-name="T13">}</text:span>
|
|
||||||
// instead of {aaa} so we should enhance this function.
|
|
||||||
//print $key.'-'.$value.'-'.strpos($this->contentXml, $this->config['DELIMITER_LEFT'] . $key . $this->config['DELIMITER_RIGHT']).'<br>';
|
|
||||||
if (strpos($this->stylesXml, $tag) === false && strpos($this->stylesXml , $tag) === false) {
|
|
||||||
//if (strpos($this->contentXml, '">'. $key . '</text;span>') === false) {
|
|
||||||
throw new OdfException("var $key not found in the document");
|
|
||||||
//}
|
|
||||||
}
|
|
||||||
$value = $encode ? htmlspecialchars($value) : $value;
|
|
||||||
$value = ($charset == 'ISO-8859') ? utf8_encode($value) : $value;
|
|
||||||
$this->vars[$tag] = str_replace("\n", "<text:line-break/>", $value);
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Evaluating php codes inside the ODT and output the buffer (print, echo) inplace of the code
|
* Evaluating php codes inside the ODT and output the buffer (print, echo) inplace of the code
|
||||||
*
|
*
|
||||||
|
|||||||
@ -1442,8 +1442,9 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
|
|||||||
// Link to print main content area
|
// Link to print main content area
|
||||||
if (empty($conf->global->MAIN_PRINT_DISABLELINK) && empty($conf->browser->phone))
|
if (empty($conf->global->MAIN_PRINT_DISABLELINK) && empty($conf->browser->phone))
|
||||||
{
|
{
|
||||||
$qs=$_SERVER["QUERY_STRING"].($_SERVER["QUERY_STRING"]?'&':'').$morequerystring;
|
$qs=$_SERVER["QUERY_STRING"];
|
||||||
$text ='<a href="'.$_SERVER["PHP_SELF"].'?'.$qs.($qs?'&':'').'optioncss=print" target="_blank">';
|
$qs.=(($qs && $morequerystring)?'&':'').$morequerystring;
|
||||||
|
$text ='<a href="'.$_SERVER["PHP_SELF"].'?'.$qs.($qs?'&':'').'optioncss=print" target="_blank">';
|
||||||
$text.= img_picto('', 'printer.png', 'class="printer"');
|
$text.= img_picto('', 'printer.png', 'class="printer"');
|
||||||
$text.='</a>';
|
$text.='</a>';
|
||||||
$toprightmenu.=$form->textwithtooltip('',$langs->trans("PrintContentArea"),2,1,$text,'',1);
|
$toprightmenu.=$form->textwithtooltip('',$langs->trans("PrintContentArea"),2,1,$text,'',1);
|
||||||
|
|||||||
@ -684,7 +684,7 @@ else
|
|||||||
$tmpcode='';
|
$tmpcode='';
|
||||||
if (! empty($modCodeProduct->code_auto))
|
if (! empty($modCodeProduct->code_auto))
|
||||||
$tmpcode=$modCodeProduct->getNextValue($object,$type);
|
$tmpcode=$modCodeProduct->getNextValue($object,$type);
|
||||||
print '<td class="fieldrequired" width="20%">'.$langs->trans("Ref").'</td><td><input name="ref" size="40" maxlength="32" value="'.dol_escape_htmltag(GETPOST('ref')?GETPOST('ref'):$tmpcode).'">';
|
print '<td class="fieldrequired" width="20%">'.$langs->trans("Ref").'</td><td><input name="ref" size="40" maxlength="128" value="'.dol_escape_htmltag(GETPOST('ref')?GETPOST('ref'):$tmpcode).'">';
|
||||||
if ($_error)
|
if ($_error)
|
||||||
{
|
{
|
||||||
print $langs->trans("RefAlreadyExists");
|
print $langs->trans("RefAlreadyExists");
|
||||||
@ -862,7 +862,7 @@ else
|
|||||||
print '<table class="border allwidth">';
|
print '<table class="border allwidth">';
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<tr><td width="15%" class="fieldrequired">'.$langs->trans("Ref").'</td><td colspan="2"><input name="ref" size="40" maxlength="32" value="'.$object->ref.'"></td></tr>';
|
print '<tr><td width="15%" class="fieldrequired">'.$langs->trans("Ref").'</td><td colspan="2"><input name="ref" size="40" maxlength="128" value="'.$object->ref.'"></td></tr>';
|
||||||
|
|
||||||
// Label
|
// Label
|
||||||
print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td colspan="2"><input name="libelle" size="40" maxlength="255" value="'.$object->libelle.'"></td></tr>';
|
print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td colspan="2"><input name="libelle" size="40" maxlength="255" value="'.$object->libelle.'"></td></tr>';
|
||||||
|
|||||||
@ -270,8 +270,11 @@ else
|
|||||||
|
|
||||||
// Country
|
// Country
|
||||||
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">';
|
||||||
$img=picto_from_langcode($object->country_code);
|
if (! empty($object->country_code))
|
||||||
print ($img?$img.' ':'');
|
{
|
||||||
|
$img=picto_from_langcode($object->country_code);
|
||||||
|
print ($img?$img.' ':'');
|
||||||
|
}
|
||||||
print $object->country;
|
print $object->country;
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user