diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php
index 51829c004f1..f0cc48a4878 100644
--- a/htdocs/accountancy/bookkeeping/card.php
+++ b/htdocs/accountancy/bookkeeping/card.php
@@ -694,7 +694,7 @@ if ($action == 'create')
}
else
{
- print '';
+ print '';
}
print ' ';
diff --git a/htdocs/contrat/admin/contract_extrafields.php b/htdocs/contrat/admin/contract_extrafields.php
index 3fb55acc2ca..a33d020d74d 100644
--- a/htdocs/contrat/admin/contract_extrafields.php
+++ b/htdocs/contrat/admin/contract_extrafields.php
@@ -4,7 +4,7 @@
* Copyright (C) 2004-2011 Laurent Destailleur
* Copyright (C) 2012 Regis Houssin
* Copyright (C) 2013 Florian Henry
- * Copyright (C) 2013 Philippe Grand
+ * Copyright (C) 2013-2018 Philippe Grand
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -31,9 +31,8 @@ require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/contract.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
-$langs->load("companies");
-$langs->load("admin");
-$langs->load("contracts");
+// Load traductions files requiredby by page
+$langs->loadLangs(array("companies","admin","contracts"));
$extrafields = new ExtraFields($db);
$form = new Form($db);
diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php
index d66f916bb78..e3a2ca4515d 100644
--- a/htdocs/core/menus/standard/eldy.lib.php
+++ b/htdocs/core/menus/standard/eldy.lib.php
@@ -1059,12 +1059,13 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
if ($objp->nature == 4 && ! empty($conf->banque->enabled)) $nature="bank";
if ($objp->nature == 5 && ! empty($conf->expensereport->enabled)) $nature="expensereports";
if ($objp->nature == 1) $nature="various";
+ if ($objp->nature == 8) $nature="inventory";
if ($objp->nature == 9) $nature="hasnew";
// To enable when page exists
if ($conf->global->MAIN_FEATURES_LEVEL < 2)
{
- if ($nature == 'various' || $nature == 'hasnew') $nature='';
+ if ($nature == 'various' || $nature == 'hasnew' || $nature == 'inventory') $nature='';
}
if ($nature)
diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang
index 876e6b37837..83be8d8e423 100644
--- a/htdocs/langs/en_US/accountancy.lang
+++ b/htdocs/langs/en_US/accountancy.lang
@@ -216,7 +216,7 @@ ValidateHistory=Bind Automatically
AutomaticBindingDone=Automatic binding done
ErrorAccountancyCodeIsAlreadyUse=Error, you cannot delete this accounting account because it is used
-MvtNotCorrectlyBalanced=Movement not correctly balanced. Credit = %s. Debit = %s
+MvtNotCorrectlyBalanced=Movement not correctly balanced. Debit = %s | Credit = %s
FicheVentilation=Binding card
GeneralLedgerIsWritten=Transactions are written in the Ledger
GeneralLedgerSomeRecordWasNotRecorded=Some of the transactions could not be journalized. If there is no other error message, this is probably because they were already journalized.
diff --git a/htdocs/stripe/payment.php b/htdocs/stripe/payment.php
index edd853e6207..68a695e2f33 100644
--- a/htdocs/stripe/payment.php
+++ b/htdocs/stripe/payment.php
@@ -32,6 +32,7 @@
// Load Dolibarr environment
$res=@include("../main.inc.php"); // For root directory
if (! $res) $res=@include("../../main.inc.php");
+require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
@@ -303,9 +304,8 @@ if (empty($reshook))
}
elseif (preg_match('/src_/i',$source))
{
- $stripeacc = $stripe->getStripeAccount($entity);
- $customer2 = \Stripe\Customer::retrieve($customer->id, array("stripe_account" => $stripeacc));
- //$src = $customer2->sources->retrieve("$source", array("stripe_account" => $stripeacc)); // this API fails when array stripe_account is provided
+
+ $customer2 = $customerstripe=$stripe->customerStripe($facture->thirdparty, $stripeacc, $servicestatus);
$src = $customer2->sources->retrieve("$source");
if ($src->type=='card')
{
@@ -395,7 +395,7 @@ if (empty($reshook))
}
else
{
- $loc = dol_buildpath('/stripeconnect/payment.php?facid='.$facid.'&action=create&error='.$e->getMessage().'', 1);
+ $loc = DOL_URL_ROOT.'/stripeconnect/payment.php?facid='.$facid.'&action=create&error='.$e->getMessage();
$db->rollback();
header('Location: '.$loc);