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

Conflicts:
	htdocs/multicurrency/class/multicurrency.class.php
This commit is contained in:
Laurent Destailleur 2019-02-21 22:31:27 +01:00
commit ec5461a4d1
3 changed files with 13 additions and 7 deletions

View File

@ -3036,8 +3036,13 @@ else
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=edit">'.$langs->trans('Modify').'</a></div>';
}
$discount = new DiscountAbsolute($db);
$result = $discount->fetch(0, 0, $object->id);
// Reopen a standard paid invoice
if (($object->type == FactureFournisseur::TYPE_STANDARD || $object->type == FactureFournisseur::TYPE_REPLACEMENT) && ($object->statut == 2 || $object->statut == 3)) // A paid invoice (partially or completely)
if (($object->type == FactureFournisseur::TYPE_STANDARD || $object->type == FactureFournisseur::TYPE_REPLACEMENT
|| ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE && empty($discount->id)))
&& ($object->statut == 2 || $object->statut == 3)) // A paid invoice (partially or completely)
{
if (! $facidnext && $object->close_code != 'replaced' && $user->rights->fournisseur->facture->creer) // Not replaced by another invoice
{

View File

@ -624,14 +624,14 @@ class MultiCurrency extends CommonObject
}
/**
* Sync rates from api
* Sync rates from api
*
* @param array $response array of reponse from api to sync dolibarr rates
* @return void
* @param array $response array of reponse from api to sync dolibarr rates
* @return void
*/
public static function syncRates($response)
{
global $db,$conf;
global $conf, $db, $langs;
$ch = curl_init('http://apilayer.net/api/live?access_key='.$key.'');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
@ -639,8 +639,8 @@ class MultiCurrency extends CommonObject
curl_close($ch);
$response = json_decode($response);
if ($response->success) {
if ($response->success)
{
$TRate = $response->quotes;
$timestamp = $response->timestamp;

View File

@ -44,6 +44,7 @@ class Entrepot extends CommonObject
public $table_element='entrepot';
public $picto='stock';
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
/**
* Warehouse closed, inactive