2
0
forked from Wavyzz/dolibarr

Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur
2019-01-16 13:57:33 +01:00
4 changed files with 18 additions and 9 deletions

View File

@@ -773,10 +773,11 @@ else
print '<tr class="oddeven"><td>'.$langs->trans("CompanyCurrency").'</td><td>';
print currency_name($conf->currency,1);
print currency_name($conf->currency,0);
print ' ('.$conf->currency;
print ($conf->currency != $langs->getCurrencySymbol($conf->currency) ? ' - '.$langs->getCurrencySymbol($conf->currency) : '');
print ')';
print ' - '.$langs->trans("PriceFormatInCurrentLanguage", $langs->defaultlang).' : '.price(price2num('99.333333333','MT'), 1, $langs, 1, -1, -1, $conf->currency);
print '</td></tr>';

View File

@@ -4312,7 +4312,7 @@ function vatrate($rate, $addpercent=false, $info_bits=0, $usestarfornpr=0)
* @param string $currency_code To add currency symbol (''=add nothing, 'auto'=Use default currency, 'XXX'=add currency symbols for XXX currency)
* @return string Chaine avec montant formate
*
* @see price2num Revert function of price
* @see price2num() Revert function of price
*/
function price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerounding=-1, $currency_code='')
{
@@ -4375,7 +4375,11 @@ function price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerou
if ($currency_code == 'auto') $currency_code=$conf->currency;
$listofcurrenciesbefore=array('USD','GBP','AUD','MXN','PEN','CNY');
if (in_array($currency_code,$listofcurrenciesbefore)) $cursymbolbefore.=$outlangs->getCurrencySymbol($currency_code);
$listoflanguagesbefore=array('nl_NL');
if (in_array($currency_code, $listofcurrenciesbefore) || in_array($outlangs->defaultlang, $listoflanguagesbefore))
{
$cursymbolbefore.=$outlangs->getCurrencySymbol($currency_code);
}
else
{
$tmpcur=$outlangs->getCurrencySymbol($currency_code);
@@ -5834,7 +5838,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey=0, $exclude=null, $ob
$substitutionarray['__THIRDPARTY_NAME_ALIAS__'] = '__THIRDPARTY_NAME_ALIAS__';
$substitutionarray['__THIRDPARTY_EMAIL__'] = '__THIRDPARTY_EMAIL__';
if (is_object($object) && $object->element == 'member')
if (! empty($conf->adherent->enabled))
{
$substitutionarray['__MEMBER_ID__'] = '__MEMBER_ID__';
$substitutionarray['__MEMBER_CIVILITY__'] = '__MEMBER_CIVILITY__';
@@ -5862,7 +5866,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey=0, $exclude=null, $ob
$substitutionarray['__DIRECTDOWNLOAD_URL_ORDER__'] = 'Direct download url of an order';
$substitutionarray['__DIRECTDOWNLOAD_URL_INVOICE__'] = 'Direct download url of an invoice';
if (is_object($object) && $object->element == 'shipping')
if (! empty($conf->expedition->enabled))
{
$substitutionarray['__SHIPPINGTRACKNUM__']='Shipping tacking number';
$substitutionarray['__SHIPPINGTRACKNUMURL__']='Shipping tracking url';

View File

@@ -119,8 +119,11 @@ if (empty($reshook))
$permissiontoadd = $user->rights->mymodule->write;
$permissiontodelete = $user->rights->mymodule->delete || ($permissiontoadd && $object->status == 0);
if (empty($backtopage)) $backtopage = dol_buildpath('/mymodule/myobject_card.php',1).'?id='.($id > 0 ? $id : '__ID__');
$backurlforlist = dol_buildpath('/mymodule/myobject_list.php',1);
if (empty($backtopage)) {
if (empty($id)) $backtopage = $backurlforlist;
else $backtopage = dol_buildpath('/mymodule/myobject_card.php',1).($id > 0 ? $id : '__ID__');
}
$triggermodname = 'MYMODULE_MYOBJECT_MODIFY'; // Name of trigger action code to execute when we modify record
// Actions cancel, add, update, delete or clone

View File

@@ -2517,6 +2517,7 @@ if ($action == 'editmeta' || $action == 'createcontainer')
$type_container = 'page';
$pagedatecreation=dol_now();
$pageauthorid=$user->id;
$pageusermodifid=0;
}
if (GETPOST('WEBSITE_TITLE','alpha')) $pagetitle=GETPOST('WEBSITE_TITLE','alpha');
if (GETPOST('WEBSITE_PAGENAME','alpha')) $pageurl=GETPOST('WEBSITE_PAGENAME','alpha');
@@ -2670,7 +2671,7 @@ if ($action == 'editmeta' || $action == 'createcontainer')
print '<tr><td>';
print $langs->trans('DateModification');
print '</td><td>';
print dol_print_date($pagedatemodification, 'dayhour');
print dol_print_date($pagedatemodification, 'dayhour', 'tzuser');
print '</td></tr>';
}