'.$langs->trans("Label").' ';
print '';
if (! empty($id))
{
diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php
index b7af461ff42..acc1d3ecfa3 100644
--- a/htdocs/compta/bank/card.php
+++ b/htdocs/compta/bank/card.php
@@ -1,7 +1,7 @@
* Copyright (C) 2003 Jean-Louis Bergamo
- * Copyright (C) 2004-2012 Laurent Destailleur
+ * Copyright (C) 2004-2015 Laurent Destailleur
* Copyright (C) 2005-2009 Regis Houssin
* Copyright (C) 2014-2015 Alexandre Spangaro
* Copyright (C) 2015 Jean-François Ferry
@@ -266,24 +266,26 @@ if ($action == 'create')
print ' ';
print ' ';
+ dol_fiche_head('');
+
print '';
// Ref
- print ''.$langs->trans("Ref").' ';
+ print ''.$langs->trans("Ref").' ';
print ' ref).'" maxlength="12"> ';
// Label
- print ''.$langs->trans("LabelBankCashAccount").' ';
+ print ''.$langs->trans("LabelBankCashAccount").' ';
print ' ';
// Type
- print ''.$langs->trans("AccountType").' ';
+ print ''.$langs->trans("AccountType").' ';
print '';
$formbank->select_type_comptes_financiers(isset($_POST["type"])?$_POST["type"]:1,"type");
print ' ';
// Currency
- print ''.$langs->trans("Currency").' ';
+ print ''.$langs->trans("Currency").' ';
print '';
$selectedcode=$account->account_currency_code;
if (! $selectedcode) $selectedcode=$conf->currency;
@@ -293,7 +295,7 @@ if ($action == 'create')
print ' ';
// Status
- print ''.$langs->trans("Status").' ';
+ print ''.$langs->trans("Status").' ';
print '';
print $form->selectarray("clos",array(0=>$account->status[0],1=>$account->status[1]),(isset($_POST["clos"])?$_POST["clos"]:$account->clos));
print ' ';
@@ -307,7 +309,7 @@ if ($action == 'create')
else if (empty($selectedcode)) $selectedcode=$mysoc->country_code;
$account->country_code = getCountry($selectedcode, 2); // Force country code on account to have following field on bank fields matching country rules
- print ''.$langs->trans("BankAccountCountry").' ';
+ print ''.$langs->trans("BankAccountCountry").' ';
print '';
print $form->select_country($selectedcode,'account_country_id');
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
@@ -326,11 +328,11 @@ if ($action == 'create')
print ' ';
// Web
- print ''.$langs->trans("Web").' ';
+ print ''.$langs->trans("Web").' ';
print ' ';
// Comment
- print ''.$langs->trans("Comment").' ';
+ print ''.$langs->trans("Comment").' ';
print '';
// Editor wysiwyg
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
@@ -353,18 +355,18 @@ if ($action == 'create')
print '';
@@ -375,7 +377,7 @@ if ($action == 'create')
print '';
- print '
';
+ dol_fiche_end();
+
+ print '
';
print '';
}
@@ -538,21 +542,21 @@ else
$linkback = ''.$langs->trans("BackToList").' ';
// Ref
- print ' '.$langs->trans("Ref").' ';
+ print ''.$langs->trans("Ref").' ';
print '';
print $form->showrefnav($account, 'ref', $linkback, 1, 'ref');
print ' ';
// Label
- print ''.$langs->trans("Label").' ';
+ print ''.$langs->trans("Label").' ';
print ''.$account->label.' ';
// Type
- print ''.$langs->trans("AccountType").' ';
+ print ''.$langs->trans("AccountType").' ';
print ''.$account->type_lib[$account->type].' ';
// Currency
- print ''.$langs->trans("Currency").' ';
+ print ''.$langs->trans("Currency").' ';
print '';
$selectedcode=$account->account_currency_code;
if (! $selectedcode) $selectedcode=$conf->currency;
@@ -560,7 +564,7 @@ else
print ' ';
// Status
- print ''.$langs->trans("Status").' ';
+ print ''.$langs->trans("Status").' ';
print ''.$account->getLibStatut(4).' ';
// Country
@@ -579,7 +583,7 @@ else
print '';
// Conciliate
- print ''.$langs->trans("Conciliable").' ';
+ print ''.$langs->trans("Conciliable").' ';
print '';
$conciliate=$account->canBeConciliated();
if ($conciliate == -2) print $langs->trans("No").' ('.$langs->trans("CashAccount").')';
@@ -587,19 +591,19 @@ else
else print ($account->rappro==1 ? $langs->trans("Yes") : ($langs->trans("No").' ('.$langs->trans("ConciliationDisabled").')'));
print ' ';
- print ''.$langs->trans("BalanceMinimalAllowed").' ';
+ print ''.$langs->trans("BalanceMinimalAllowed").' ';
print ''.$account->min_allowed.' ';
- print ''.$langs->trans("BalanceMinimalDesired").' ';
+ print ''.$langs->trans("BalanceMinimalDesired").' ';
print ''.$account->min_desired.' ';
- print ''.$langs->trans("Web").' ';
+ print ' '.$langs->trans("Web").' ';
if ($account->url) print '';
print $account->url;
if ($account->url) print ' ';
print " \n";
- print ''.$langs->trans("Comment").' ';
+ print ''.$langs->trans("Comment").' ';
print ''.dol_htmlentitiesbr($account->comment).' ';
// Other attributes
@@ -687,7 +691,7 @@ else
if ($account->getCountryCode() == 'IN') $ibankey="IFSC";
if ($account->getCountryCode() == 'IN') $bickey="SWIFT";
- print ''.$langs->trans($ibankey).' ';
+ print ''.$langs->trans($ibankey).' ';
print ''.$account->iban.' ';
if (! empty($account->iban)) {
if (! checkIbanForAccount($account)) {
@@ -698,7 +702,7 @@ else
}
print ' ';
- print ''.$langs->trans($bickey).' ';
+ print ''.$langs->trans($bickey).' ';
print ''.$account->bic.' ';
if (! empty($account->bic)) {
if (! checkSwiftForAccount($account)) {
@@ -709,15 +713,15 @@ else
}
print ' ';
- print ''.$langs->trans("BankAccountDomiciliation").' ';
+ print ' '.$langs->trans("BankAccountDomiciliation").' ';
print nl2br($account->domiciliation);
print " \n";
- print ''.$langs->trans("BankAccountOwner").' ';
+ print ' '.$langs->trans("BankAccountOwner").' ';
print $account->proprio;
print " \n";
- print ''.$langs->trans("BankAccountOwnerAddress").' ';
+ print ' '.$langs->trans("BankAccountOwnerAddress").' ';
print nl2br($account->owner_address);
print " \n";
@@ -727,13 +731,13 @@ else
print '';
// Accountancy code
- print ''.$langs->trans("AccountancyCode").' ';
+ print ''.$langs->trans("AccountancyCode").' ';
print ''.$account->account_number.' ';
// Accountancy journal
if (! empty($conf->accounting->enabled))
{
- print ''.$langs->trans("AccountancyJournal").' ';
+ print ''.$langs->trans("AccountancyJournal").' ';
print ''.$account->accountancy_journal.' ';
}
@@ -799,24 +803,26 @@ else
print ' ';
print ' '."\n\n";
+ dol_fiche_head('');
+
print '';
// Ref
- print ''.$langs->trans("Ref").' ';
+ print ''.$langs->trans("Ref").' ';
print ' ref).'"> ';
// Label
- print ''.$langs->trans("Label").' ';
+ print ''.$langs->trans("Label").' ';
print ' label).'"> ';
// Type
- print ''.$langs->trans("AccountType").' ';
+ print ''.$langs->trans("AccountType").' ';
print '';
$formbank->select_type_comptes_financiers((isset($_POST["type"])?$_POST["type"]:$account->type),"type");
print ' ';
// Currency
- print ''.$langs->trans("Currency");
+ print ' '.$langs->trans("Currency");
print ' ';
print ' ';
print '';
@@ -828,7 +834,7 @@ else
print ' ';
// Status
- print ''.$langs->trans("Status").' ';
+ print ''.$langs->trans("Status").' ';
print '';
print $form->selectarray("clos",array(0=>$account->status[0],1=>$account->status[1]),(isset($_POST["clos"])?$_POST["clos"]:$account->clos));
print ' ';
@@ -840,7 +846,7 @@ else
else if (empty($selectedcode)) $selectedcode=$mysoc->country_code;
$account->country_code = getCountry($selectedcode, 2); // Force country code on account to have following field on bank fields matching country rules
- print ''.$langs->trans("Country").' ';
+ print ''.$langs->trans("Country").' ';
print '';
print $form->select_country($selectedcode,'account_country_id');
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
@@ -859,7 +865,7 @@ else
print ' ';
// Conciliable
- print ''.$langs->trans("Conciliable").' ';
+ print ''.$langs->trans("Conciliable").' ';
print '';
$conciliate=$account->canBeConciliated();
if ($conciliate == -2) print $langs->trans("No").' ('.$langs->trans("CashAccount").')';
@@ -868,19 +874,19 @@ else
print ' ';
// Balance
- print ''.$langs->trans("BalanceMinimalAllowed").' ';
+ print ''.$langs->trans("BalanceMinimalAllowed").' ';
print ' min_allowed).'"> ';
- print ''.$langs->trans("BalanceMinimalDesired").' ';
+ print ''.$langs->trans("BalanceMinimalDesired").' ';
print ' min_desired).'"> ';
// Web
- print ''.$langs->trans("Web").' ';
+ print ''.$langs->trans("Web").' ';
print ' url).'">';
print ' ';
// Comment
- print ''.$langs->trans("Comment").' ';
+ print ''.$langs->trans("Comment").' ';
print '';
// Editor wysiwyg
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
@@ -903,7 +909,7 @@ else
print '';
- print '';
+ dol_fiche_end();
+
+ print '
';
print '
';
print ' ';
print '
';
diff --git a/htdocs/compta/bank/graph.php b/htdocs/compta/bank/graph.php
index d87d95f6026..d0afdee61bb 100644
--- a/htdocs/compta/bank/graph.php
+++ b/htdocs/compta/bank/graph.php
@@ -441,7 +441,7 @@ else
$datas = array();
$datamin = array();
$dataall = array();
-
+
$subtotal = 0;
$day = $min;
@@ -483,7 +483,7 @@ else
if ($acct->min_desired) array_push($graph_datas[$i],$datamin[$i]);
if ($acct->min_allowed) array_push($graph_datas[$i],$dataall[$i]);
}
-
+
$px3 = new DolGraph();
$px3->SetData($graph_datas);
$arraylegends=array($langs->transnoentities("Balance"));
@@ -760,7 +760,7 @@ print '
';
$linkback = ''.$langs->trans("BackToList").' ';
// Ref
-print ''.$langs->trans("Ref").' ';
+print ''.$langs->trans("Ref").' ';
print '';
if ($account)
{
@@ -799,7 +799,7 @@ else
print ' ';
// Label
-print ''.$langs->trans("Label").' ';
+print ''.$langs->trans("Label").' ';
print '';
if ($account && $_GET["option"]!='all')
{
diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php
index 5293f518738..f82139d1f3a 100644
--- a/htdocs/compta/bank/releve.php
+++ b/htdocs/compta/bank/releve.php
@@ -1,6 +1,6 @@
- * Copyright (C) 2004-2013 Laurent Destailleur
+ * Copyright (C) 2004-2015 Laurent Destailleur
* Copyright (C) 2005-2013 Regis Houssin
* Copyright (C) 2015 Jean-François Ferry
*
@@ -128,13 +128,13 @@ if (empty($num))
$linkback = ''.$langs->trans("BackToList").' ';
// Ref
- print ''.$langs->trans("Ref").' ';
+ print ''.$langs->trans("Ref").' ';
print '';
print $form->showrefnav($acct, 'ref', $linkback, 1, 'ref');
print ' ';
// Label
- print ''.$langs->trans("Label").' ';
+ print ''.$langs->trans("Label").' ';
print ''.$acct->label.' ';
print '
';
diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php
index e62c5203ea6..4643b367630 100644
--- a/htdocs/compta/bank/treso.php
+++ b/htdocs/compta/bank/treso.php
@@ -98,13 +98,13 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
$linkback = '
'.$langs->trans("BackToList").' ';
// Ref
- print '
'.$langs->trans("Ref").' ';
+ print ''.$langs->trans("Ref").' ';
print '';
print $form->showrefnav($acct, 'ref', $linkback, 1, 'ref');
print ' ';
// Label
- print '
'.$langs->trans("Label").' ';
+ print ''.$langs->trans("Label").' ';
print ''.$acct->label.' ';
print '
';
diff --git a/htdocs/core/actions_fetchobject.inc.php b/htdocs/core/actions_fetchobject.inc.php
index 463b3113c2a..3014e8652a6 100644
--- a/htdocs/core/actions_fetchobject.inc.php
+++ b/htdocs/core/actions_fetchobject.inc.php
@@ -25,15 +25,19 @@
// $action must be defined
// $object must be defined (object is loaded in this file with fetch)
+// $cancel must be defined
// $id or $ref must be defined (object is loaded in this file with fetch)
-if ($id > 0 || ! empty($ref))
+if (($id > 0 || ! empty($ref)) && empty($cancel))
{
$ret = $object->fetch($id,$ref);
- if ($ret > 0) {
+ if ($ret > 0)
+ {
$object->fetch_thirdparty();
- $id=$object->id;
- } else {
+ $id = $object->id;
+ }
+ else
+ {
setEventMessages($object->error, $object->errors, 'errors');
$action='';
}
diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php
index ca33fc34f0f..0974ce0f31c 100755
--- a/htdocs/expensereport/list.php
+++ b/htdocs/expensereport/list.php
@@ -177,7 +177,7 @@ if ($resql)
if ($search_amount_ht) $param.="&search_amount_ht=".$search_amount_ht;
if ($search_amount_ttc) $param.="&search_amount_ttc=".$search_amount_ttc;
if ($search_status >= 0) $param.="&search_status=".$search_status;
-
+
print_barre_liste($langs->trans("ListTripsAndExpenses"), $page, $_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords);
print '