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

This commit is contained in:
Laurent Destailleur 2016-08-17 11:15:30 +02:00
commit 47489265b1
18 changed files with 302 additions and 253 deletions

View File

@ -69,10 +69,10 @@ if ($action == 'add') {
$account_number = clean_account(GETPOST('account_number')); $account_number = clean_account(GETPOST('account_number'));
} }
if (GETPOST('account_category') <= 0) { if (GETPOST('account_parent') <= 0) {
$account_parent = ''; $account_parent = 0;
} else { } else {
$account_parent = GETPOST('account_category','int'); $account_parent = GETPOST('account_parent','int');
} }
$object->fk_pcg_version = $obj->pcg_version; $object->fk_pcg_version = $obj->pcg_version;
@ -98,7 +98,7 @@ if ($action == 'add') {
header("Location: account.php"); header("Location: account.php");
exit; exit;
} else if ($action == 'edit') { } else if ($action == 'edit') {
if (! GETPOST('cancel', 'alpha')) { if (! $cancel) {
$result = $object->fetch($id); $result = $object->fetch($id);
$sql = 'SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid=' . $conf->global->CHARTOFACCOUNTS; $sql = 'SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid=' . $conf->global->CHARTOFACCOUNTS;
@ -119,10 +119,10 @@ if ($action == 'add') {
$account_number = clean_account(GETPOST('account_number')); $account_number = clean_account(GETPOST('account_number'));
} }
if (GETPOST('account_category') <= 0) { if (GETPOST('account_parent') <= 0) {
$account_parent = ''; $account_parent = 0;
} else { } else {
$account_parent = GETPOST('account_category','int'); $account_parent = GETPOST('account_parent','int');
} }
$object->fk_pcg_version = $obj->pcg_version; $object->fk_pcg_version = $obj->pcg_version;
@ -165,7 +165,9 @@ if ($action == 'add') {
/* /*
* View * View
*/ */
llxheader('', $langs->trans('AccountAccounting')); $title = $langs->trans('AccountAccounting') ." - ". $langs->trans('Card');
$helpurl = '';
llxheader('', $title, $helpurl);
$form = new Form($db); $form = new Form($db);
$htmlacc = new FormVentilation($db); $htmlacc = new FormVentilation($db);
@ -184,7 +186,7 @@ if ($action == 'create') {
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
// Account number // Account number
print '<tr><td width="25%"><span class="fieldrequired">' . $langs->trans("AccountNumber") . '</span></td>'; print '<tr><td class="titlefieldcreate"><span class="fieldrequired">' . $langs->trans("AccountNumber") . '</span></td>';
print '<td><input name="account_number" size="30" value="' . $object->account_number . '"</td></tr>'; print '<td><input name="account_number" size="30" value="' . $object->account_number . '"</td></tr>';
// Label // Label
@ -247,7 +249,7 @@ if ($action == 'create') {
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
// Account number // Account number
print '<tr><td width="25%"><span class="fieldrequired">' . $langs->trans("AccountNumber") . '</span></td>'; print '<tr><td class="titlefieldcreate"><span class="fieldrequired">' . $langs->trans("AccountNumber") . '</span></td>';
print '<td><input name="account_number" size="30" value="' . $object->account_number . '"</td></tr>'; print '<td><input name="account_number" size="30" value="' . $object->account_number . '"</td></tr>';
// Label // Label
@ -299,7 +301,7 @@ if ($action == 'create') {
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
// Account number // Account number
print '<tr><td width="25%">' . $langs->trans("AccountNumber") . '</td>'; print '<tr><td class="titlefield">' . $langs->trans("AccountNumber") . '</td>';
print '<td>' . $object->account_number . '</td>'; print '<td>' . $object->account_number . '</td>';
print '<td align="right" width="25%">' . $linkback . '</td></tr>'; print '<td align="right" width="25%">' . $linkback . '</td></tr>';

View File

@ -81,6 +81,9 @@ if ($action == 'update') {
if (! dolibarr_set_const($db, 'ACCOUNTING_EXPORT_MODELCSV', $modelcsv, 'chaine', 0, '', $conf->entity)) { if (! dolibarr_set_const($db, 'ACCOUNTING_EXPORT_MODELCSV', $modelcsv, 'chaine', 0, '', $conf->entity)) {
$error ++; $error ++;
} }
if ($modelcsv==AccountancyExport::$EXPORT_TYPE_QUADRATUS || $modelcsv==AccountancyExport::$EXPORT_TYPE_CIEL) {
dolibarr_set_const($db, 'ACCOUNTING_EXPORT_FORMAT', 'txt', 'chaine', 0, '', $conf->entity);
}
} else { } else {
$error ++; $error ++;
} }

View File

@ -168,6 +168,18 @@ if ($action == 'setmanagezero') {
} }
} }
if ($action == 'setdisabledirectinput') {
$setdisabledirectinput = GETPOST('value', 'int');
$res = dolibarr_set_const($db, "BANK_DISABLE_DIRECT_INPUT", $setdisabledirectinput, 'yesno', 0, '', $conf->entity);
if (! $res > 0)
$error ++;
if (! $error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'mesgs');
}
}
/* /*
* View * View
*/ */
@ -342,6 +354,20 @@ if (! empty($conf->global->ACCOUNTING_MANAGE_ZERO)) {
} }
print '</tr>'; print '</tr>';
$var = ! $var;
print "<tr " . $bc[$var] . ">";
print '<td width="80%">' . $langs->trans("BANK_DISABLE_DIRECT_INPUT") . '</td>';
if (! empty($conf->global->BANK_DISABLE_DIRECT_INPUT)) {
print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setdisabledirectinput&value=0">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a></td>';
} else {
print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setdisabledirectinput&value=1">';
print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a></td>';
}
print '</tr>';
print "</table>\n"; print "</table>\n";
dol_fiche_end(); dol_fiche_end();

View File

@ -295,6 +295,8 @@ class AccountancyExport
public function exportCiel(&$TData) { public function exportCiel(&$TData) {
global $conf; global $conf;
$this->end_line ="\r\n";
$i = 1; $i = 1;
$date_ecriture = dol_print_date(time(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be yyyymmdd $date_ecriture = dol_print_date(time(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be yyyymmdd
foreach ( $TData as $data ) { foreach ( $TData as $data ) {
@ -333,6 +335,8 @@ class AccountancyExport
public function exportQuadratus(&$TData) { public function exportQuadratus(&$TData) {
global $conf; global $conf;
$this->end_line ="\r\n";
$date_ecriture = dol_print_date(time(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be ddmmyy $date_ecriture = dol_print_date(time(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be ddmmyy
foreach ( $TData as $data ) { foreach ( $TData as $data ) {
$code_compta = $data->numero_compte; $code_compta = $data->numero_compte;

View File

@ -425,7 +425,7 @@ if ($action == 'export_csv') {
'action' => '' 'action' => ''
)); ));
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV != 1 || $conf->global->ACCOUNTING_EXPORT_MODELCSV != 2) { if ($conf->global->ACCOUNTING_EXPORT_MODELCSV != 1 && $conf->global->ACCOUNTING_EXPORT_MODELCSV != 2) {
print '<input type="button" class="butActionRefused" style="float: right;" value="' . $langs->trans("Export") . '" disabeld="disabled" title="' . $langs->trans('ExportNotSupported') . '"/>'; print '<input type="button" class="butActionRefused" style="float: right;" value="' . $langs->trans("Export") . '" disabeld="disabled" title="' . $langs->trans('ExportNotSupported') . '"/>';
} else { } else {
print '<input type="button" class="button" style="float: right;" value="' . $langs->trans("Export") . '" onclick="launch_export();" />'; print '<input type="button" class="button" style="float: right;" value="' . $langs->trans("Export") . '" onclick="launch_export();" />';

View File

@ -443,7 +443,7 @@ if ($action == 'export_csv') {
'action' => '' 'action' => ''
)); ));
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV != 1 || $conf->global->ACCOUNTING_EXPORT_MODELCSV != 2) { if ($conf->global->ACCOUNTING_EXPORT_MODELCSV != 1 && $conf->global->ACCOUNTING_EXPORT_MODELCSV != 2) {
print '<input type="button" class="butActionRefused" style="float: right;" value="' . $langs->trans("Export") . '" disabeld="disabled" title="' . $langs->trans('ExportNotSupported') . '"/>'; print '<input type="button" class="butActionRefused" style="float: right;" value="' . $langs->trans("Export") . '" disabeld="disabled" title="' . $langs->trans('ExportNotSupported') . '"/>';
} else { } else {
print '<input type="button" class="butAction" style="float: right;" value="' . $langs->trans("Export") . '" onclick="launch_export();" />'; print '<input type="button" class="butAction" style="float: right;" value="' . $langs->trans("Export") . '" onclick="launch_export();" />';

View File

@ -1082,7 +1082,7 @@ if (empty($reshook))
// Multicurrency rate // Multicurrency rate
else if ($action == 'setmulticurrencyrate' && $user->rights->propal->creer) { else if ($action == 'setmulticurrencyrate' && $user->rights->propal->creer) {
$result = $object->setMulticurrencyRate(GETPOST('multicurrency_tx', 'int')); $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')));
} }
// bank account // bank account
@ -1266,6 +1266,8 @@ if ($action == 'create')
if ($origin != 'project' && $originid) { if ($origin != 'project' && $originid) {
print '<input type="hidden" name="origin" value="' . $origin . '">'; print '<input type="hidden" name="origin" value="' . $origin . '">';
print '<input type="hidden" name="originid" value="' . $originid . '">'; print '<input type="hidden" name="originid" value="' . $originid . '">';
} elseif ($origin == 'project' && !empty($projectid)) {
print '<input type="hidden" name="projectid" value="' . $projectid . '">';
} }
dol_fiche_head(); dol_fiche_head();

View File

@ -533,7 +533,7 @@ if (empty($reshook))
// Multicurrency rate // Multicurrency rate
else if ($action == 'setmulticurrencyrate' && $user->rights->commande->creer) { else if ($action == 'setmulticurrencyrate' && $user->rights->commande->creer) {
$result = $object->setMulticurrencyRate(GETPOST('multicurrency_tx', 'int')); $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')));
} }
else if ($action == 'setavailability' && $user->rights->commande->creer) { else if ($action == 'setavailability' && $user->rights->commande->creer) {

View File

@ -366,16 +366,11 @@ if ($id > 0 || ! empty($ref))
{ {
if (empty($conf->global->BANK_DISABLE_DIRECT_INPUT)) if (empty($conf->global->BANK_DISABLE_DIRECT_INPUT))
{ {
if (empty($conf->accounting->enabled)) if ($user->rights->banque->modifier) {
{ print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=addline&amp;id='.$object->id.'&amp;page='.$page.($vline?'&amp;vline='.$vline:'').'">'.$langs->trans("AddBankRecord").'</a>';
if ($user->rights->banque->modifier) { } else {
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=addline&amp;id='.$object->id.'&amp;page='.$page.($vline?'&amp;vline='.$vline:'').'">'.$langs->trans("AddBankRecord").'</a>'; print '<a class="butActionRefused" title="'.$langs->trans("NotEnoughPermissions").'" href="#">'.$langs->trans("AddBankRecord").'</a>';
} else { }
print '<a class="butActionRefused" title="'.$langs->trans("NotEnoughPermissions").'" href="#">'.$langs->trans("AddBankRecord").'</a>';
}
} else {
print '<a class="butActionRefused" title="'.$langs->trans("FeatureDisabled").'" href="#">'.$langs->trans("AddBankRecord").'</a>';
}
} else { } else {
print '<a class="butActionRefused" title="'.$langs->trans("FeatureDisabled").'" href="#">'.$langs->trans("AddBankRecord").'</a>'; print '<a class="butActionRefused" title="'.$langs->trans("FeatureDisabled").'" href="#">'.$langs->trans("AddBankRecord").'</a>';
} }

View File

@ -290,7 +290,7 @@ if (empty($reshook))
// Multicurrency rate // Multicurrency rate
else if ($action == 'setmulticurrencyrate' && $user->rights->facture->creer) { else if ($action == 'setmulticurrencyrate' && $user->rights->facture->creer) {
$result = $object->setMulticurrencyRate(GETPOST('multicurrency_tx', 'int')); $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')));
} }
else if ($action == 'setinvoicedate' && $user->rights->facture->creer) else if ($action == 'setinvoicedate' && $user->rights->facture->creer)

View File

@ -207,6 +207,11 @@ class modAccounting extends DolibarrModules
"chaine", "chaine",
"csv" "csv"
); );
$this->const[24] = array(
"BANK_DISABLE_DIRECT_INPUT",
"yesno",
"1"
);
// Tabs // Tabs
$this->tabs = array(); $this->tabs = array();

View File

@ -955,7 +955,7 @@ if ($action == 'create')
else else
$numprojet=select_projects($societe->id,$_POST["projectid"],'projectid'); $numprojet=select_projects($societe->id,$_POST["projectid"],'projectid');
*/ */
$numprojet=$formproject->select_projects($soc->id,GETPOST('projectid','int'),'projectid'); $numprojet=$formproject->select_projects($soc->id,$projectid,'projectid');
if ($numprojet==0) if ($numprojet==0)
{ {
print ' &nbsp; <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$soc->id.'&action=create">'.$langs->trans("AddProject").'</a>'; print ' &nbsp; <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$soc->id.'&action=create">'.$langs->trans("AddProject").'</a>';
@ -1027,6 +1027,8 @@ if ($action == 'create')
{ {
print '<input type="hidden" name="origin" value="'.$objectsrc->element.'">'; print '<input type="hidden" name="origin" value="'.$objectsrc->element.'">';
print '<input type="hidden" name="originid" value="'.$objectsrc->id.'">'; print '<input type="hidden" name="originid" value="'.$objectsrc->id.'">';
} elseif ($origin == 'project' && !empty($projectid)) {
print '<input type="hidden" name="projectid" value="' . $projectid . '">';
} }
dol_fiche_end(); dol_fiche_end();
@ -1044,6 +1046,13 @@ if ($action == 'create')
dol_fiche_head(''); dol_fiche_head('');
print '<form name="fichinter" action="'.$_SERVER['PHP_SELF'].'" method="POST">'; print '<form name="fichinter" action="'.$_SERVER['PHP_SELF'].'" method="POST">';
if (is_object($objectsrc))
{
print '<input type="hidden" name="origin" value="'.$objectsrc->element.'">';
print '<input type="hidden" name="originid" value="'.$objectsrc->id.'">';
} elseif ($origin == 'project' && !empty($projectid)) {
print '<input type="hidden" name="projectid" value="' . $projectid . '">';
}
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
print '<tr><td class="fieldrequired">'.$langs->trans("ThirdParty").'</td><td>'; print '<tr><td class="fieldrequired">'.$langs->trans("ThirdParty").'</td><td>';
print $form->select_company('','socid','','SelectThirdParty',1); print $form->select_company('','socid','','SelectThirdParty',1);

View File

@ -173,7 +173,7 @@ if (empty($reshook))
// Multicurrency rate // Multicurrency rate
else if ($action == 'setmulticurrencyrate' && $user->rights->fournisseur->commande->creer) { else if ($action == 'setmulticurrencyrate' && $user->rights->fournisseur->commande->creer) {
$result = $object->setMulticurrencyRate(GETPOST('multicurrency_tx', 'int')); $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')));
} }
// bank account // bank account

View File

@ -273,7 +273,7 @@ if (empty($reshook))
// Multicurrency rate // Multicurrency rate
else if ($action == 'setmulticurrencyrate' && $user->rights->facture->creer) { else if ($action == 'setmulticurrencyrate' && $user->rights->facture->creer) {
$result = $object->setMulticurrencyRate(GETPOST('multicurrency_tx', 'int')); $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')));
} }
// bank account // bank account

View File

@ -56,7 +56,8 @@ ACCOUNTING_LENGTH_DESCRIPTION=Length for displaying product & services descripti
ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT=Length for displaying product & services account description form in listings (Best = 50) ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT=Length for displaying product & services account description form in listings (Best = 50)
ACCOUNTING_LENGTH_GACCOUNT=Length of the general accounts ACCOUNTING_LENGTH_GACCOUNT=Length of the general accounts
ACCOUNTING_LENGTH_AACCOUNT=Length of the third party accounts ACCOUNTING_LENGTH_AACCOUNT=Length of the third party accounts
ACCOUNTING_MANAGE_ZERO=Manage the zero at the end of an accounting account. Needed by some countries. Disable by default. Be careful with the function of length of the accounts. ACCOUNTING_MANAGE_ZERO=Manage the zero at the end of an accounting account. Needed by some countries. Disable by default. Be careful with the function "length of the accounts".
BANK_DISABLE_DIRECT_INPUT=Disable free input of bank transactions. Enable by default with this module.
ACCOUNTING_SELL_JOURNAL=Sell journal ACCOUNTING_SELL_JOURNAL=Sell journal
ACCOUNTING_PURCHASE_JOURNAL=Purchase journal ACCOUNTING_PURCHASE_JOURNAL=Purchase journal

View File

@ -47,6 +47,7 @@ DefaultModelSupplierProposalCreate=Default model creation
DefaultModelSupplierProposalToBill=Default template when closing a price request (accepted) DefaultModelSupplierProposalToBill=Default template when closing a price request (accepted)
DefaultModelSupplierProposalClosed=Default template when closing a price request (refused) DefaultModelSupplierProposalClosed=Default template when closing a price request (refused)
ListOfSupplierProposal=List of supplier proposal requests ListOfSupplierProposal=List of supplier proposal requests
ListSupplierProposalsAssociatedProject=List of supplier proposals associated with project
SupplierProposalsToClose=Supplier proposals to close SupplierProposalsToClose=Supplier proposals to close
SupplierProposalsToProcess=Supplier proposals to process SupplierProposalsToProcess=Supplier proposals to process
LastSupplierProposals=Last price requests LastSupplierProposals=Last price requests

View File

@ -37,6 +37,7 @@ if (! empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/
if (! empty($conf->facture->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; if (! empty($conf->facture->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
if (! empty($conf->facture->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture-rec.class.php'; if (! empty($conf->facture->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture-rec.class.php';
if (! empty($conf->commande->enabled)) require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; if (! empty($conf->commande->enabled)) require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
if (! empty($conf->supplier_proposal->enabled)) require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php';
if (! empty($conf->fournisseur->enabled)) require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; if (! empty($conf->fournisseur->enabled)) require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
if (! empty($conf->fournisseur->enabled)) require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; if (! empty($conf->fournisseur->enabled)) require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
if (! empty($conf->contrat->enabled)) require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; if (! empty($conf->contrat->enabled)) require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
@ -192,7 +193,7 @@ $listofreferent=array(
'class'=>'Propal', 'class'=>'Propal',
'table'=>'propal', 'table'=>'propal',
'datefieldname'=>'datep', 'datefieldname'=>'datep',
'urlnew'=>DOL_URL_ROOT.'/comm/propal/card.php?action=create&projectid='.$id.'&socid='.$socid, 'urlnew'=>DOL_URL_ROOT.'/comm/propal/card.php?action=create&origin=project&originid='.$id.'&socid='.$socid,
'lang'=>'propal', 'lang'=>'propal',
'buttonnew'=>'AddProp', 'buttonnew'=>'AddProp',
'testnew'=>$user->rights->propal->creer, 'testnew'=>$user->rights->propal->creer,
@ -232,11 +233,11 @@ $listofreferent=array(
'testnew'=>$user->rights->facture->creer, 'testnew'=>$user->rights->facture->creer,
'test'=>$conf->facture->enabled && $user->rights->facture->lire), 'test'=>$conf->facture->enabled && $user->rights->facture->lire),
'proposal_supplier'=>array( 'proposal_supplier'=>array(
'name'=>"SuppliersOrders", 'name'=>"SuppliersProposals",
'title'=>"ListSupplierOrdersAssociatedProject", 'title'=>"ListSupplierProposalsAssociatedProject",
'class'=>'CommandeFournisseur', 'class'=>'SupplierProposal',
'table'=>'commande_fournisseur', 'table'=>'supplier_proposal',
'datefieldname'=>'date_commande', 'datefieldname'=>'date',
'urlnew'=>DOL_URL_ROOT.'/supplier_proposal/card.php?action=create&projectid='.$id.'&socid='.$socid, 'urlnew'=>DOL_URL_ROOT.'/supplier_proposal/card.php?action=create&projectid='.$id.'&socid='.$socid,
'lang'=>'supplier_proposal', 'lang'=>'supplier_proposal',
'buttonnew'=>'AddSupplierProposal', 'buttonnew'=>'AddSupplierProposal',
@ -283,7 +284,7 @@ $listofreferent=array(
'table'=>'fichinter', 'table'=>'fichinter',
'datefieldname'=>'date_valid', 'datefieldname'=>'date_valid',
'disableamount'=>1, 'disableamount'=>1,
'urlnew'=>DOL_URL_ROOT.'/fichinter/card.php?action=create&projectid='.$id.'&socid='.$socid, 'urlnew'=>DOL_URL_ROOT.'/fichinter/card.php?action=create&origin=project&originid='.$id.'&socid='.$socid,
'lang'=>'interventions', 'lang'=>'interventions',
'buttonnew'=>'AddIntervention', 'buttonnew'=>'AddIntervention',
'testnew'=>$user->rights->ficheinter->creer, 'testnew'=>$user->rights->ficheinter->creer,

View File

@ -955,7 +955,7 @@ if (empty($reshook))
// Multicurrency rate // Multicurrency rate
else if ($action == 'setmulticurrencyrate' && $user->rights->supplier_proposal->creer) { else if ($action == 'setmulticurrencyrate' && $user->rights->supplier_proposal->creer) {
$result = $object->setMulticurrencyRate(GETPOST('multicurrency_tx', 'int')); $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')));
} }
else if ($action == 'update_extras') { else if ($action == 'update_extras') {