Merge branch 'develop' of git+ssh://git@github.com/Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
eea7127aa2
@ -38,6 +38,8 @@ For users:
|
|||||||
- New: [ task #494 ] Send an email to foundation when a new member has auto-subscribed
|
- New: [ task #494 ] Send an email to foundation when a new member has auto-subscribed
|
||||||
- New: [ task #326 ]: Add a numbering module to suggest automatically a product ref
|
- New: [ task #326 ]: Add a numbering module to suggest automatically a product ref
|
||||||
- New: Add conditional substitution IF/ELSEIF/ENDIF for ODT templates
|
- New: Add conditional substitution IF/ELSEIF/ENDIF for ODT templates
|
||||||
|
- New: Add unit foot2, inch2, foot3 and inch3 for surface and volumes.
|
||||||
|
- New: Can select thirdparties into emailing targets, even if module category is not enabled.
|
||||||
- Fix: [ bug #499 ]: Supplier order input method not translated
|
- Fix: [ bug #499 ]: Supplier order input method not translated
|
||||||
- Fix: No images into product description lines as PDF generation does
|
- Fix: No images into product description lines as PDF generation does
|
||||||
not work with this.
|
not work with this.
|
||||||
|
|||||||
@ -839,12 +839,11 @@ class FormOther
|
|||||||
var left_list = cleanSerialize(jQuery("#left").sortable("serialize"));
|
var left_list = cleanSerialize(jQuery("#left").sortable("serialize"));
|
||||||
var right_list = cleanSerialize(jQuery("#right").sortable("serialize"));
|
var right_list = cleanSerialize(jQuery("#right").sortable("serialize"));
|
||||||
var boxorder = \'A:\' + left_list + \'-B:\' + right_list;
|
var boxorder = \'A:\' + left_list + \'-B:\' + right_list;
|
||||||
jQuery.ajax({ url: \''.DOL_URL_ROOT.'/core/ajax/box.php?boxorder=\'+boxorder+\'&boxid=\'+boxid+\'&zone='.$areacode.'&userid='.$user->id.'\',
|
jQuery.ajax({
|
||||||
async: false
|
url: \''.DOL_URL_ROOT.'/core/ajax/box.php?boxorder=\'+boxorder+\'&boxid=\'+boxid+\'&zone='.$areacode.'&userid='.$user->id.'\',
|
||||||
|
async: false
|
||||||
});
|
});
|
||||||
//jQuery.get(\''.DOL_URL_ROOT.'/core/ajax/box.php?boxorder=\'+boxorder+\'&boxid=\'+boxid+\'&zone='.$areacode.'&userid='.$user->id.'\');
|
|
||||||
window.location.search=\'mainmenu='.GETPOST("mainmenu").'&leftmenu='.GETPOST('leftmenu').'&action=addbox&boxid=\'+boxid;
|
window.location.search=\'mainmenu='.GETPOST("mainmenu").'&leftmenu='.GETPOST('leftmenu').'&action=addbox&boxid=\'+boxid;
|
||||||
//window.location.href=\''.$_SERVER["PHP_SELF"].'\';
|
|
||||||
}
|
}
|
||||||
});';
|
});';
|
||||||
if (! count($arrayboxtoactivatelabel)) print 'jQuery("#boxcombo").hide();';
|
if (! count($arrayboxtoactivatelabel)) print 'jQuery("#boxcombo").hide();';
|
||||||
@ -940,16 +939,32 @@ class FormOther
|
|||||||
containment: \'.fiche\',
|
containment: \'.fiche\',
|
||||||
connectWith: \'.connectedSortable\',
|
connectWith: \'.connectedSortable\',
|
||||||
stop: function(event, ui) {
|
stop: function(event, ui) {
|
||||||
updateOrder(0);
|
updateBoxOrder(0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
'."\n";
|
'."\n";
|
||||||
print 'function updateOrder() {
|
// To update list of activated boxes
|
||||||
var left_list = cleanSerialize(jQuery("#left").sortable("serialize"));
|
print 'function updateBoxOrder(closing) {
|
||||||
var right_list = cleanSerialize(jQuery("#right").sortable("serialize"));
|
var left_list = cleanSerialize(jQuery("#left").sortable("serialize"));
|
||||||
var boxorder = \'A:\' + left_list + \'-B:\' + right_list;
|
var right_list = cleanSerialize(jQuery("#right").sortable("serialize"));
|
||||||
jQuery.get(\''.DOL_URL_ROOT.'/core/ajax/box.php?boxorder=\'+boxorder+\'&zone='.$areacode.'&userid=\'+'.$user->id.');
|
var boxorder = \'A:\' + left_list + \'-B:\' + right_list;
|
||||||
|
if (boxorder==\'A:A-B:B\' && closing == 1) // There is no more boxes on screen, and we are after a delete of a box so we must hide title
|
||||||
|
{
|
||||||
|
jQuery.ajax({
|
||||||
|
url: \''.DOL_URL_ROOT.'/core/ajax/box.php?boxorder=\'+boxorder+\'&zone='.$areacode.'&userid=\'+'.$user->id.',
|
||||||
|
async: false
|
||||||
|
});
|
||||||
|
// We force reload to be sure to get all boxes into list
|
||||||
|
window.location.search=\'mainmenu='.GETPOST("mainmenu").'&leftmenu='.GETPOST('leftmenu').'&action=delbox\';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
jQuery.ajax({
|
||||||
|
url: \''.DOL_URL_ROOT.'/core/ajax/box.php?boxorder=\'+boxorder+\'&zone='.$areacode.'&userid=\'+'.$user->id.',
|
||||||
|
async: true
|
||||||
|
});
|
||||||
|
}
|
||||||
}'."\n";
|
}'."\n";
|
||||||
// For closing
|
// For closing
|
||||||
print 'jQuery(document).ready(function() {
|
print 'jQuery(document).ready(function() {
|
||||||
@ -957,7 +972,7 @@ class FormOther
|
|||||||
var self = this; // because JQuery can modify this
|
var self = this; // because JQuery can modify this
|
||||||
var boxid=self.id.substring(8);
|
var boxid=self.id.substring(8);
|
||||||
jQuery(\'#boxto_\'+boxid).remove();
|
jQuery(\'#boxto_\'+boxid).remove();
|
||||||
updateOrder();
|
updateBoxOrder(1);
|
||||||
});
|
});
|
||||||
});'."\n";
|
});'."\n";
|
||||||
print '</script>'."\n";
|
print '</script>'."\n";
|
||||||
|
|||||||
@ -329,8 +329,8 @@ function measuring_units_string($unit,$measuring_style='')
|
|||||||
$measuring_units[-1] = $langs->trans("SizeUnitdm");
|
$measuring_units[-1] = $langs->trans("SizeUnitdm");
|
||||||
$measuring_units[-2] = $langs->trans("SizeUnitcm");
|
$measuring_units[-2] = $langs->trans("SizeUnitcm");
|
||||||
$measuring_units[-3] = $langs->trans("SizeUnitmm");
|
$measuring_units[-3] = $langs->trans("SizeUnitmm");
|
||||||
$measuring_units[99] = $langs->trans("SizeUnitinch");
|
|
||||||
$measuring_units[98] = $langs->trans("SizeUnitfoot");
|
$measuring_units[98] = $langs->trans("SizeUnitfoot");
|
||||||
|
$measuring_units[99] = $langs->trans("SizeUnitinch");
|
||||||
}
|
}
|
||||||
else if ($measuring_style == 'surface')
|
else if ($measuring_style == 'surface')
|
||||||
{
|
{
|
||||||
@ -338,6 +338,8 @@ function measuring_units_string($unit,$measuring_style='')
|
|||||||
$measuring_units[-2] = $langs->trans("SurfaceUnitdm2");
|
$measuring_units[-2] = $langs->trans("SurfaceUnitdm2");
|
||||||
$measuring_units[-4] = $langs->trans("SurfaceUnitcm2");
|
$measuring_units[-4] = $langs->trans("SurfaceUnitcm2");
|
||||||
$measuring_units[-6] = $langs->trans("SurfaceUnitmm2");
|
$measuring_units[-6] = $langs->trans("SurfaceUnitmm2");
|
||||||
|
$measuring_units[98] = $langs->trans("SurfaceUnitfoot2");
|
||||||
|
$measuring_units[99] = $langs->trans("SurfaceUnitinch2");
|
||||||
}
|
}
|
||||||
else if ($measuring_style == 'volume')
|
else if ($measuring_style == 'volume')
|
||||||
{
|
{
|
||||||
@ -345,7 +347,9 @@ function measuring_units_string($unit,$measuring_style='')
|
|||||||
$measuring_units[-3] = $langs->trans("VolumeUnitdm3");
|
$measuring_units[-3] = $langs->trans("VolumeUnitdm3");
|
||||||
$measuring_units[-6] = $langs->trans("VolumeUnitcm3");
|
$measuring_units[-6] = $langs->trans("VolumeUnitcm3");
|
||||||
$measuring_units[-9] = $langs->trans("VolumeUnitmm3");
|
$measuring_units[-9] = $langs->trans("VolumeUnitmm3");
|
||||||
$measuring_units[97] = $langs->trans("VolumeUnitounce");
|
$measuring_units[88] = $langs->trans("VolumeUnitfoot3");
|
||||||
|
$measuring_units[89] = $langs->trans("VolumeUnitinch3");
|
||||||
|
$measuring_units[97] = $langs->trans("VolumeUnitounce");
|
||||||
$measuring_units[98] = $langs->trans("VolumeUnitlitre");
|
$measuring_units[98] = $langs->trans("VolumeUnitlitre");
|
||||||
$measuring_units[99] = $langs->trans("VolumeUnitgallon");
|
$measuring_units[99] = $langs->trans("VolumeUnitgallon");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,20 +19,15 @@ include_once DOL_DOCUMENT_ROOT.'/core/modules/mailings/modules_mailings.php';
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \class mailing_thirdparties
|
* Class to manage a list of personalised recipients for mailing feature
|
||||||
* \brief Class to manage a list of personalised recipients for mailing feature
|
|
||||||
*/
|
*/
|
||||||
class mailing_thirdparties extends MailingTargets
|
class mailing_thirdparties extends MailingTargets
|
||||||
{
|
{
|
||||||
// CHANGE THIS: Put here a name not already used
|
|
||||||
var $name='ContactsCategories';
|
var $name='ContactsCategories';
|
||||||
// CHANGE THIS: Put here a description of your selector module.
|
|
||||||
// This label is used if no translation found for key MailingModuleDescXXX where XXX=name is found
|
|
||||||
var $desc="Third parties (by categories)";
|
var $desc="Third parties (by categories)";
|
||||||
// CHANGE THIS: Set to 1 if selector is available for admin users only
|
|
||||||
var $require_admin=0;
|
var $require_admin=0;
|
||||||
|
|
||||||
var $require_module=array("categorie","societe");
|
var $require_module=array("societe"); // This module allows to select by categories must be also enabled if category module is not activated
|
||||||
var $picto='company';
|
var $picto='company';
|
||||||
var $db;
|
var $db;
|
||||||
|
|
||||||
@ -44,6 +39,8 @@ class mailing_thirdparties extends MailingTargets
|
|||||||
*/
|
*/
|
||||||
function __construct($db)
|
function __construct($db)
|
||||||
{
|
{
|
||||||
|
global $conf;
|
||||||
|
|
||||||
$this->db=$db;
|
$this->db=$db;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,11 +148,12 @@ class mailing_thirdparties extends MailingTargets
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* \brief Return here number of distinct emails returned by your selector.
|
* Return here number of distinct emails returned by your selector.
|
||||||
* For example if this selector is used to extract 500 different
|
* For example if this selector is used to extract 500 different
|
||||||
* emails from a text file, this function must return 500.
|
* emails from a text file, this function must return 500.
|
||||||
* \return int
|
*
|
||||||
|
* @return int Nb of recipients
|
||||||
*/
|
*/
|
||||||
function getNbOfRecipients()
|
function getNbOfRecipients()
|
||||||
{
|
{
|
||||||
@ -200,6 +198,8 @@ class mailing_thirdparties extends MailingTargets
|
|||||||
{
|
{
|
||||||
$num = $this->db->num_rows($resql);
|
$num = $this->db->num_rows($resql);
|
||||||
|
|
||||||
|
if (empty($conf->categorie->enabled)) $num=0; // Force empty list if category module is not enabled
|
||||||
|
|
||||||
if ($num) $s.='<option value="0"> </option>';
|
if ($num) $s.='<option value="0"> </option>';
|
||||||
else $s.='<option value="0">'.$langs->trans("ContactsAllShort").'</option>';
|
else $s.='<option value="0">'.$langs->trans("ContactsAllShort").'</option>';
|
||||||
|
|
||||||
|
|||||||
@ -18,8 +18,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \class mailing_thirdparties_services_expired
|
* Class to offer a selector of emailing targets with Rule 'services expired'.
|
||||||
* \brief Class to offer a selector of emailing targets with Rule 'services expired'.
|
|
||||||
*/
|
*/
|
||||||
class mailing_thirdparties_services_expired extends MailingTargets
|
class mailing_thirdparties_services_expired extends MailingTargets
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,12 +6,12 @@
|
|||||||
|
|
||||||
-- Requests to clean corrupted database
|
-- Requests to clean corrupted database
|
||||||
|
|
||||||
delete from llx_facturedet where fk_facture in (select rowid from llx_facture where facnumber = '(PROV)');
|
delete from llx_facturedet where fk_facture in (select rowid from llx_facture where facnumber in ('(PROV)','ErrorBadMask'));
|
||||||
delete from llx_facture where facnumber = '(PROV)';
|
delete from llx_facture where facnumber in ('(PROV)','ErrorBadMask');
|
||||||
delete from llx_commandedet where fk_commande in (select rowid from llx_commande where ref = '(PROV)');
|
delete from llx_commandedet where fk_commande in (select rowid from llx_commande where ref in ('(PROV)','ErrorBadMask'));
|
||||||
delete from llx_commande where ref = '(PROV)';
|
delete from llx_commande where ref in ('(PROV)','ErrorBadMask');
|
||||||
delete from llx_propaldet where fk_propal in (select rowid from llx_propal where ref = '(PROV)');
|
delete from llx_propaldet where fk_propal in (select rowid from llx_propal where ref in ('(PROV)','ErrorBadMask'));
|
||||||
delete from llx_propal where ref = '(PROV)';
|
delete from llx_propal where ref in ('(PROV)','ErrorBadMask');
|
||||||
delete from llx_facturedet where fk_facture in (select rowid from llx_facture where facnumber = '');
|
delete from llx_facturedet where fk_facture in (select rowid from llx_facture where facnumber = '');
|
||||||
delete from llx_facture where facnumber = '';
|
delete from llx_facture where facnumber = '';
|
||||||
delete from llx_commandedet where fk_commande in (select rowid from llx_commande where ref = '');
|
delete from llx_commandedet where fk_commande in (select rowid from llx_commande where ref = '');
|
||||||
|
|||||||
@ -103,12 +103,16 @@ SurfaceUnitm2=m2
|
|||||||
SurfaceUnitdm2=dm2
|
SurfaceUnitdm2=dm2
|
||||||
SurfaceUnitcm2=cm2
|
SurfaceUnitcm2=cm2
|
||||||
SurfaceUnitmm2=mm2
|
SurfaceUnitmm2=mm2
|
||||||
|
SurfaceUnitfoot2=ft2
|
||||||
|
SurfaceUnitinch2=in2
|
||||||
Volume=Volume
|
Volume=Volume
|
||||||
TotalVolume=Total volume
|
TotalVolume=Total volume
|
||||||
VolumeUnitm3=m3
|
VolumeUnitm3=m3
|
||||||
VolumeUnitdm3=dm3
|
VolumeUnitdm3=dm3
|
||||||
VolumeUnitcm3=cm3
|
VolumeUnitcm3=cm3
|
||||||
VolumeUnitmm3=mm3
|
VolumeUnitmm3=mm3
|
||||||
|
VolumeUnitfoot3=ft3
|
||||||
|
VolumeUnitinch3=in3
|
||||||
VolumeUnitounce=ounce
|
VolumeUnitounce=ounce
|
||||||
VolumeUnitlitre=litre
|
VolumeUnitlitre=litre
|
||||||
VolumeUnitgallon=gallon
|
VolumeUnitgallon=gallon
|
||||||
|
|||||||
@ -102,12 +102,16 @@ SurfaceUnitm2=m2
|
|||||||
SurfaceUnitdm2=dm2
|
SurfaceUnitdm2=dm2
|
||||||
SurfaceUnitcm2=cm2
|
SurfaceUnitcm2=cm2
|
||||||
SurfaceUnitmm2=mm2
|
SurfaceUnitmm2=mm2
|
||||||
|
SurfaceUnitfoot2=pied2
|
||||||
|
SurfaceUnitinch2=pouce2
|
||||||
Volume=Volume
|
Volume=Volume
|
||||||
TotalVolume=Volume total
|
TotalVolume=Volume total
|
||||||
VolumeUnitm3=m3
|
VolumeUnitm3=m3
|
||||||
VolumeUnitdm3=dm3 (l)
|
VolumeUnitdm3=dm3 (l)
|
||||||
VolumeUnitcm3=cm3 (ml)
|
VolumeUnitcm3=cm3 (ml)
|
||||||
VolumeUnitmm3=mm3 (µl)
|
VolumeUnitmm3=mm3 (µl)
|
||||||
|
VolumeUnitfoot3=pied3
|
||||||
|
VolumeUnitinch3=pouce3
|
||||||
VolumeUnitounce=once
|
VolumeUnitounce=once
|
||||||
VolumeUnitlitre=litre
|
VolumeUnitlitre=litre
|
||||||
VolumeUnitgallon=gallon
|
VolumeUnitgallon=gallon
|
||||||
|
|||||||
@ -172,9 +172,9 @@ class FormProduct
|
|||||||
|
|
||||||
$measuring_units=array();
|
$measuring_units=array();
|
||||||
if ($measuring_style == 'weight') $measuring_units=array(-6=>1,-3=>1,0=>1,3=>1,99=>1);
|
if ($measuring_style == 'weight') $measuring_units=array(-6=>1,-3=>1,0=>1,3=>1,99=>1);
|
||||||
else if ($measuring_style == 'size') $measuring_units=array(-3=>1,-2=>1,-1=>1,0=>1,99=>1,98=>1);
|
else if ($measuring_style == 'size') $measuring_units=array(-3=>1,-2=>1,-1=>1,0=>1,98=>1,99=>1);
|
||||||
else if ($measuring_style == 'surface') $measuring_units=array(-6=>1,-4=>1,-2=>1,0=>1);
|
else if ($measuring_style == 'surface') $measuring_units=array(-6=>1,-4=>1,-2=>1,0=>1,98=>1,99=>1);
|
||||||
else if ($measuring_style == 'volume') $measuring_units=array(-9=>1,-6=>1,-3=>1,0=>1,97=>1,99=>1,/* 98=>1 */); // Liter is not used as already available with dm3
|
else if ($measuring_style == 'volume') $measuring_units=array(-9=>1,-6=>1,-3=>1,0=>1,88=>1,89=>1,97=>1,99=>1,/* 98=>1 */); // Liter is not used as already available with dm3
|
||||||
|
|
||||||
$return.= '<select class="flat" name="'.$name.'">';
|
$return.= '<select class="flat" name="'.$name.'">';
|
||||||
if ($adddefault) $return.= '<option value="0">'.$langs->trans("Default").'</option>';
|
if ($adddefault) $return.= '<option value="0">'.$langs->trans("Default").'</option>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user