Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
ed9c401ca6
@ -331,25 +331,27 @@ if ($id > 0)
|
|||||||
print "</td>";
|
print "</td>";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Compte bancaire par défaut
|
if (! empty($conf->banque->enabled))
|
||||||
print '<tr><td class="nowrap">';
|
|
||||||
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
|
|
||||||
print $langs->trans('PaymentBankAccount');
|
|
||||||
print '<td>';
|
|
||||||
if (($action != 'editbankaccount') && $user->rights->societe->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbankaccount&socid='.$object->id.'">'.img_edit($langs->trans('SetBankAccount'),1).'</a></td>';
|
|
||||||
print '</tr></table>';
|
|
||||||
print '</td><td>';
|
|
||||||
if ($action == 'editbankaccount')
|
|
||||||
{
|
{
|
||||||
$form->formSelectAccount($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->fk_account,'fk_account',1);
|
// Compte bancaire par défaut
|
||||||
|
print '<tr><td class="nowrap">';
|
||||||
|
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
|
||||||
|
print $langs->trans('PaymentBankAccount');
|
||||||
|
print '<td>';
|
||||||
|
if (($action != 'editbankaccount') && $user->rights->societe->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbankaccount&socid='.$object->id.'">'.img_edit($langs->trans('SetBankAccount'),1).'</a></td>';
|
||||||
|
print '</tr></table>';
|
||||||
|
print '</td><td>';
|
||||||
|
if ($action == 'editbankaccount')
|
||||||
|
{
|
||||||
|
$form->formSelectAccount($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->fk_account,'fk_account',1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$form->formSelectAccount($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->fk_account,'none');
|
||||||
|
}
|
||||||
|
print "</td>";
|
||||||
|
print '</tr>';
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
$form->formSelectAccount($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->fk_account,'none');
|
|
||||||
}
|
|
||||||
print "</td>";
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
|
|
||||||
// Relative discounts (Discounts-Drawbacks-Rebates)
|
// Relative discounts (Discounts-Drawbacks-Rebates)
|
||||||
print '<tr><td class="nowrap">';
|
print '<tr><td class="nowrap">';
|
||||||
|
|||||||
@ -4297,7 +4297,7 @@ class Form
|
|||||||
*/
|
*/
|
||||||
function select_currency($selected='',$htmlname='currency_id')
|
function select_currency($selected='',$htmlname='currency_id')
|
||||||
{
|
{
|
||||||
print $this->selectcurrency($selected,$htmlname);
|
print $this->selectCurrency($selected,$htmlname);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -4307,35 +4307,40 @@ class Form
|
|||||||
* @param string $htmlname name of HTML select list
|
* @param string $htmlname name of HTML select list
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function selectCurrency($selected='',$htmlname='currency_id')
|
function selectCurrency($selected='',$htmlname='currency_id')
|
||||||
{
|
{
|
||||||
global $conf,$langs,$user;
|
global $conf,$langs,$user;
|
||||||
|
|
||||||
$langs->loadCacheCurrencies('');
|
$langs->loadCacheCurrencies('');
|
||||||
|
|
||||||
$out='';
|
$out='';
|
||||||
|
|
||||||
if ($selected=='euro' || $selected=='euros') $selected='EUR'; // Pour compatibilite
|
if ($selected=='euro' || $selected=='euros') $selected='EUR'; // Pour compatibilite
|
||||||
|
|
||||||
$out.= '<select class="flat" name="'.$htmlname.'" id="'.$htmlname.'">';
|
$out.= '<select class="flat maxwidth200onsmartphone minwidth300" name="'.$htmlname.'" id="'.$htmlname.'">';
|
||||||
foreach ($langs->cache_currencies as $code_iso => $currency)
|
foreach ($langs->cache_currencies as $code_iso => $currency)
|
||||||
{
|
{
|
||||||
if ($selected && $selected == $code_iso)
|
if ($selected && $selected == $code_iso)
|
||||||
{
|
{
|
||||||
$out.= '<option value="'.$code_iso.'" selected>';
|
$out.= '<option value="'.$code_iso.'" selected>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$out.= '<option value="'.$code_iso.'">';
|
$out.= '<option value="'.$code_iso.'">';
|
||||||
}
|
}
|
||||||
$out.= $currency['label'];
|
$out.= $currency['label'];
|
||||||
$out.= ' ('.$langs->getCurrencySymbol($code_iso).')';
|
$out.= ' ('.$langs->getCurrencySymbol($code_iso).')';
|
||||||
$out.= '</option>';
|
$out.= '</option>';
|
||||||
}
|
}
|
||||||
$out.= '</select>';
|
$out.= '</select>';
|
||||||
if ($user->admin) $out.= info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
if ($user->admin) $out.= info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
||||||
return $out;
|
|
||||||
}
|
// Make select dynamic
|
||||||
|
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
|
||||||
|
$out .= ajax_combobox($htmlname);
|
||||||
|
|
||||||
|
return $out;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return array of currencies in user language
|
* Return array of currencies in user language
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
# Dolibarr language file - Source file is en_US - admin
|
# Dolibarr language file - Source file is en_US - admin
|
||||||
Foundation=Foundation
|
Foundation=Foundation
|
||||||
Version=Version
|
Version=Version
|
||||||
|
Publisher=Publisher
|
||||||
VersionProgram=Version program
|
VersionProgram=Version program
|
||||||
VersionLastInstall=Initial install version
|
VersionLastInstall=Initial install version
|
||||||
VersionLastUpgrade=Latest version upgrade
|
VersionLastUpgrade=Latest version upgrade
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user