mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
default currency on propal create
This commit is contained in:
parent
6b0d060289
commit
b58df17545
|
|
@ -836,8 +836,9 @@ class Propal extends CommonObject
|
|||
if (empty($this->availability_id)) $this->availability_id=0;
|
||||
if (empty($this->demand_reason_id)) $this->demand_reason_id=0;
|
||||
|
||||
// Multicurrency
|
||||
if (!empty($this->multicurrency_code)) list($this->fk_multicurrency,$this->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $this->multicurrency_code, $this->date);
|
||||
// Multicurrency (test on $this->multicurrency_tx because we should take the default rate only if not using origin rate)
|
||||
if (!empty($this->multicurrency_code) && empty($this->multicurrency_tx)) list($this->fk_multicurrency,$this->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $this->multicurrency_code, $this->date);
|
||||
else $this->fk_multicurrency = MultiCurrency::getIdFromCode($this->db, $this->multicurrency_code);
|
||||
if (empty($this->fk_multicurrency))
|
||||
{
|
||||
$this->multicurrency_code = $conf->currency;
|
||||
|
|
|
|||
|
|
@ -709,7 +709,7 @@ class Commande extends CommonOrder
|
|||
// $date_commande is deprecated
|
||||
$date = ($this->date_commande ? $this->date_commande : $this->date);
|
||||
|
||||
// Multicurrency (test on $this->multicurrency_tx because we sould take the default rate only if not using origin rate)
|
||||
// Multicurrency (test on $this->multicurrency_tx because we should take the default rate only if not using origin rate)
|
||||
if (!empty($this->multicurrency_code) && empty($this->multicurrency_tx)) list($this->fk_multicurrency,$this->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $this->multicurrency_code, $date);
|
||||
else $this->fk_multicurrency = MultiCurrency::getIdFromCode($this->db, $this->multicurrency_code);
|
||||
if (empty($this->fk_multicurrency))
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ class Facture extends CommonInvoice
|
|||
$this->brouillon = 1;
|
||||
if (empty($this->entity)) $this->entity = $conf->entity;
|
||||
|
||||
// Multicurrency (test on $this->multicurrency_tx because we sould take the default rate only if not using origin rate)
|
||||
// Multicurrency (test on $this->multicurrency_tx because we should take the default rate only if not using origin rate)
|
||||
if (!empty($this->multicurrency_code) && empty($this->multicurrency_tx)) list($this->fk_multicurrency,$this->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $this->multicurrency_code);
|
||||
else $this->fk_multicurrency = MultiCurrency::getIdFromCode($this->db, $this->multicurrency_code);
|
||||
if (empty($this->fk_multicurrency))
|
||||
|
|
|
|||
|
|
@ -1090,7 +1090,7 @@ class CommandeFournisseur extends CommonOrder
|
|||
// Clean parameters
|
||||
if (empty($this->source)) $this->source = 0;
|
||||
|
||||
// Multicurrency (test on $this->multicurrency_tx because we sould take the default rate only if not using origin rate)
|
||||
// Multicurrency (test on $this->multicurrency_tx because we should take the default rate only if not using origin rate)
|
||||
if (!empty($this->multicurrency_code) && empty($this->multicurrency_tx)) list($this->fk_multicurrency,$this->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $this->multicurrency_code);
|
||||
else $this->fk_multicurrency = MultiCurrency::getIdFromCode($this->db, $this->multicurrency_code);
|
||||
if (empty($this->fk_multicurrency))
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ class FactureFournisseur extends CommonInvoice
|
|||
$amount = $this->amount;
|
||||
$remise = $this->remise;
|
||||
|
||||
// Multicurrency (test on $this->multicurrency_tx because we sould take the default rate only if not using origin rate)
|
||||
// Multicurrency (test on $this->multicurrency_tx because we should take the default rate only if not using origin rate)
|
||||
if (!empty($this->multicurrency_code) && empty($this->multicurrency_tx)) list($this->fk_multicurrency,$this->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $this->multicurrency_code);
|
||||
else $this->fk_multicurrency = MultiCurrency::getIdFromCode($this->db, $this->multicurrency_code);
|
||||
if (empty($this->fk_multicurrency))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user