diff --git a/build/generate_filelist_xml.php b/build/generate_filelist_xml.php index ff580fad58c..1eeac5410b2 100755 --- a/build/generate_filelist_xml.php +++ b/build/generate_filelist_xml.php @@ -40,6 +40,7 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); * Main */ +$includecustom=0; $includeconstants=array(); if (empty($argv[1])) @@ -67,8 +68,6 @@ while ($i < $argc) if (empty($includecustom)) { - $includecustom=0; - if (DOL_VERSION != $release) { print 'Error: When parameter "includecustom" is not set, version declared into filefunc.in.php ('.DOL_VERSION.') must be exact same value than "release" parameter ('.$release.')'."\n"; @@ -80,7 +79,7 @@ else { if (! preg_match('/'.preg_quote(DOL_VERSION,'/').'-/',$release)) { - print 'Error: When parameter "includecustom" is not set, version declared into ('.DOL_VERSION.') must be used with a suffix into "release" parmater (ex: '.DOL_VERSION.'-mydistrib).'."\n"; + print 'Error: When parameter "includecustom" is set, version declared into filefunc.inc.php ('.DOL_VERSION.') must be used with a suffix into "release" parmater (ex: '.DOL_VERSION.'-mydistrib).'."\n"; print "Usage: ".$script_file." release=x.y.z[-...] [includecustom=1]\n"; exit -1; } diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php index 74479a9d39f..e6bae2f73d8 100644 --- a/htdocs/accountancy/admin/index.php +++ b/htdocs/accountancy/admin/index.php @@ -142,18 +142,17 @@ 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'); - } + $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 */ @@ -243,20 +242,20 @@ if (! empty($user->admin)) } print ''; - $var = ! $var; - print ""; - print '' . $langs->trans("BANK_DISABLE_DIRECT_INPUT") . ''; - if (! empty($conf->global->BANK_DISABLE_DIRECT_INPUT)) { - print ''; - print img_picto($langs->trans("Activated"), 'switch_on'); - print ''; - } else { - print ''; - print img_picto($langs->trans("Disabled"), 'switch_off'); - print ''; - } - print ''; - + $var = ! $var; + print ""; + print '' . $langs->trans("BANK_DISABLE_DIRECT_INPUT") . ''; + if (! empty($conf->global->BANK_DISABLE_DIRECT_INPUT)) { + print ''; + print img_picto($langs->trans("Activated"), 'switch_on'); + print ''; + } else { + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print ''; + } + print ''; + $var = ! $var; print ""; print '' . $langs->trans("ACCOUNTING_MANAGE_ZERO") . ''; diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index aee7d7172c6..4174ee7809f 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -369,22 +369,23 @@ class AccountingAccount extends CommonObject */ function getNomUrl($withpicto = 0) { global $langs; - + $result = ''; - + $link = ''; $linkend = ''; - + $picto = 'billr'; - + $label = $langs->trans("Show") . ': ' . $this->account_number . ' - ' . $this->label; - + if ($withpicto) $result .= ($link . img_object($label, $picto) . $linkend); if ($withpicto && $withpicto != 2) $result .= ' '; if ($withpicto != 2) - $result .= $link . $this->account_number . $linkend; + require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; + $result .= $link . length_accountg($this->account_number) . ' - ' . $this->label . $linkend; return $result; } diff --git a/htdocs/compta/bank/bankentries.php b/htdocs/compta/bank/bankentries.php index de0e6d70b4c..9af9b6f4707 100644 --- a/htdocs/compta/bank/bankentries.php +++ b/htdocs/compta/bank/bankentries.php @@ -4,8 +4,9 @@ * Copyright (C) 2005-2010 Regis Houssin * Copyright (C) 2012 Vinícius Nogueira * Copyright (C) 2014 Florian Henry - * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2016 Juanjo Menent + * Copyright (C) 2017 Alexandre Spangaro * * 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 @@ -396,40 +397,37 @@ if ($id > 0 || ! empty($ref)) foreach ($bankcateg->fetchAll() as $bankcategory) { $options[$bankcategory->id] = $bankcategory->label; } - + // Bank card - $head=bank_prepare_head($object); dol_fiche_head($head,'journal',$langs->trans("FinancialAccount"),0,'account'); - + $linkback = ''.$langs->trans("BackToList").''; - + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, '', 0, '', '', 1); - + dol_fiche_end(); - - /* * Buttons actions */ - if ($action != 'addline' && $action != 'reconcile') + if ($action != 'reconcile') { print '
'; - - if ($action != 'addline') - { - if (empty($conf->global->BANK_DISABLE_DIRECT_INPUT)) - { - if ($user->rights->banque->modifier) { - print ''.$langs->trans("AddBankRecord").''; - } else { - print ''.$langs->trans("AddBankRecord").''; - } - } else { - print ''.$langs->trans("AddBankRecord").''; - } - } + + if (empty($conf->global->BANK_DISABLE_DIRECT_INPUT)) + { + if ($user->rights->banque->modifier) { + print ''.$langs->trans("AddBankRecord").''; + } else { + print ''.$langs->trans("AddBankRecord").''; + } + } + else + { + print ''.$langs->trans("AddBankRecord").''; + } + if ($object->canBeConciliated() > 0) { // If not cash account and can be reconciliate if ($user->rights->banque->consolidate) { @@ -640,49 +638,6 @@ if ($resql) // print ''; } - // Form to add a transaction with no invoice - if ($user->rights->banque->modifier && $action == 'addline') - { - print load_fiche_titre($langs->trans("AddBankRecordLong"),'',''); - - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print '
'.$langs->trans("Date").' '.$langs->trans("Type").''.$langs->trans("Numero").''.$langs->trans("Description").''.$langs->trans("Debit").''.$langs->trans("Credit").' 
'; - $form->select_date(empty($dateop)?-1:$dateop,'op',0,0,0,'transaction'); - print ''; - $form->select_types_paiements((GETPOST('operation')?GETPOST('operation'):($object->courant == Account::TYPE_CASH ? 'LIQ' : '')),'operation','1,2',2,1); - print ''; - print ''; - print ''; - if ($options) { - print '
'.$langs->trans("Rubrique").': '; - print Form::selectarray('cat1', $options, GETPOST('cat1'), 1); - } - print '
'; - print '
'; - print ''; - print '
'; - print '
'; - } - - /// ajax to adjust value date with plus and less picto print ' ' . "\n"; } + // Wrapper to manage document_preview + if (! empty($conf->use_javascript_ajax)) + { + print "\n\n"; + print '' . "\n"; + } + // Wrapper to manage dropdown if ($conf->use_javascript_ajax) { diff --git a/htdocs/product/document.php b/htdocs/product/document.php index ae2782cc4de..cedfec4abdc 100644 --- a/htdocs/product/document.php +++ b/htdocs/product/document.php @@ -210,8 +210,8 @@ if ($object->id) $linkback = ''.$langs->trans("BackToList").''; - - dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); + $object->next_prev_filter=" fk_product_type = ".$object->type; + dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); print '
'; diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index ab74bc29485..ab959f479fd 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -308,7 +308,7 @@ if ($id > 0 || $ref) dol_fiche_head($head, 'suppliers', $titre, 0, $picto); $linkback = ''.$langs->trans("BackToList").''; - + $object->next_prev_filter=" fk_product_type = ".$object->type; dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); print '
'; diff --git a/htdocs/product/info.php b/htdocs/product/info.php index e29d1a168cb..af626cce5dd 100644 --- a/htdocs/product/info.php +++ b/htdocs/product/info.php @@ -94,7 +94,7 @@ if ($id > 0 || $ref) dol_fiche_head($head, 'info', $titre, 0, $picto); $linkback = ''.$langs->trans("BackToList").''; - + $object->next_prev_filter=" fk_product_type = ".$object->type; dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); $object->info($object->id); diff --git a/htdocs/product/note.php b/htdocs/product/note.php index 9a914527a83..c63d60229fb 100644 --- a/htdocs/product/note.php +++ b/htdocs/product/note.php @@ -94,7 +94,7 @@ if ($id > 0 || ! empty($ref)) dol_fiche_head($head, 'note', $titre, 0, $picto); $linkback = ''.$langs->trans("BackToList").''; - + $object->next_prev_filter=" fk_product_type = ".$object->type; dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); $cssclass='titlefield'; diff --git a/htdocs/product/price.php b/htdocs/product/price.php index e6bde28d27e..8601ce9c05d 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -657,7 +657,7 @@ $picto = ($object->type == Product::TYPE_SERVICE ? 'service' : 'product'); dol_fiche_head($head, 'price', $titre, 0, $picto); $linkback = ''.$langs->trans("BackToList").''; - +$object->next_prev_filter=" fk_product_type = ".$object->type; dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); diff --git a/htdocs/societe/rib.php b/htdocs/societe/rib.php index f1db2d21835..42860abb98a 100644 --- a/htdocs/societe/rib.php +++ b/htdocs/societe/rib.php @@ -802,7 +802,7 @@ if ($socid && $action == 'create' && $user->rights->societe->creer) dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom'); - print '
'; + print '
'; print '
'; print ''; @@ -845,7 +845,7 @@ if ($socid && $action == 'create' && $user->rights->societe->creer) } print '"; @@ -854,7 +854,7 @@ if ($socid && $action == 'create' && $user->rights->societe->creer) print "\n"; print '";
'.$langs->trans("BankAccountDomiciliation").''; - print '
'.$langs->trans("BankAccountOwnerAddress").''; - print '