diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 0c25f3a5bd8..b31a1972dd1 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -951,7 +951,6 @@ if (empty($id)) print $langs->trans("DictionaryDesc"); print " ".$langs->trans("OnlyActiveElementsAreShown")."
\n"; } -print "
\n"; $param = '&id='.urlencode($id); @@ -1016,6 +1015,13 @@ if ($id) print ''; print ''; + if ($id == 10 && empty($conf->global->FACTURE_TVAOPTION)) + { + print info_admin($langs->trans("VATIsUsedIsOff", $langs->transnoentities("Setup"), $langs->transnoentities("CompanyFoundation"))); + } + + print "
\n"; + // Form to add a new line if ($tabname[$id]) { diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 94dc94aee52..7082d6991a3 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -1583,7 +1583,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint= $out.=''; // Author of event - $out.=''; + $out.=''; //$userstatic->id=$histo[$key]['userid']; //$userstatic->login=$histo[$key]['login']; //$out.=$userstatic->getLoginUrl(1); diff --git a/htdocs/core/modules/modModuleBuilder.class.php b/htdocs/core/modules/modModuleBuilder.class.php index b27a03cc798..7f4132d7e44 100644 --- a/htdocs/core/modules/modModuleBuilder.class.php +++ b/htdocs/core/modules/modModuleBuilder.class.php @@ -60,7 +60,7 @@ class modModuleBuilder extends DolibarrModules // Config pages //------------- - $this->config_page_url = array('setup@modulebuilder'); + $this->config_page_url = array('setup.php@modulebuilder'); // Dependencies //------------- diff --git a/htdocs/core/modules/modSocialNetworks.class.php b/htdocs/core/modules/modSocialNetworks.class.php index 063cce438fe..6aceeff6a70 100644 --- a/htdocs/core/modules/modSocialNetworks.class.php +++ b/htdocs/core/modules/modSocialNetworks.class.php @@ -48,7 +48,7 @@ class modSocialNetworks extends DolibarrModules $this->family = "interface"; // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) $this->name = preg_replace('/^mod/i','',get_class($this)); - $this->description = "Enable Social Networks fields into contacts"; + $this->description = "Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...)"; // Possible values for version are: 'development', 'experimental', 'dolibarr' or version $this->version = 'dolibarr'; // Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase) diff --git a/htdocs/core/modules/modSyslog.class.php b/htdocs/core/modules/modSyslog.class.php index d401b2f1621..7166a787809 100644 --- a/htdocs/core/modules/modSyslog.class.php +++ b/htdocs/core/modules/modSyslog.class.php @@ -85,7 +85,20 @@ class modSyslog extends DolibarrModules // Cronjobs $this->cronjobs = array( - 0=>array('label'=>'CompressSyslogs', 'jobtype'=>'method', 'class'=>'core/class/utils.class.php', 'objectname'=>'Utils', 'method'=>'compressSyslogs', 'parameters'=>'', 'comment'=>'Compress and archive log files. Warning: batch must be run with same account than your web server to avoid to get log files with different owner than required by web server. Another solution is to set web server Operating System group as the group of directory documents and set GROUP permission "rws" on this directory so log files will always have the group and permissions of the web server Operating System group', 'frequency'=>1, 'unitfrequency'=> 3600 * 24, 'priority'=>50, 'status'=>0, 'test'=>true), + 0 => array( + 'label' => 'CompressSyslogs', + 'jobtype' => 'method', + 'class' => 'core/class/utils.class.php', + 'objectname' => 'Utils', + 'method' => 'compressSyslogs', + 'parameters' => '', + 'comment' => 'Compress and archive log files. Warning: batch must be run with same account than your web server to avoid to get log files with different owner than required by web server. Another solution is to set web server Operating System group as the group of directory documents and set GROUP permission "rws" on this directory so log files will always have the group and permissions of the web server Operating System group', + 'frequency' => 1, + 'unitfrequency' => 3600 * 24, + 'priority' => 50, + 'status' => 0, + 'test' => true, + ), ); } } diff --git a/htdocs/core/modules/ticket/mod_ticket_universal.php b/htdocs/core/modules/ticket/mod_ticket_universal.php index adca6897ac3..f8d8e213d14 100644 --- a/htdocs/core/modules/ticket/mod_ticket_universal.php +++ b/htdocs/core/modules/ticket/mod_ticket_universal.php @@ -35,9 +35,12 @@ class mod_ticket_universal extends ModeleNumRefTicket */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' +<<<<<<< HEAD /** * @var string Error code (or message) */ +======= +>>>>>>> upstream/develop public $error = ''; /** diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 01d73f6c04b..89af1ebbbc1 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1806,6 +1806,7 @@ YouCanDeleteFileOnServerWith=You can delete this file on server with Command Lin ChartLoaded=Chart of account loaded SocialNetworkSetup=Setup of module Social Networks EnableFeatureFor=Enable features for %s +VATIsUsedIsOff=Note: The option to use sales Tax or VAT has been set to Off in the menu %s - %s, so Sale tax or Vat used will always be 0 for sales. ##### Resource #### ResourceSetup=Configuration du module Resource UseSearchToSelectResource=Use a search form to choose a resource (rather than a drop-down list). diff --git a/htdocs/modulebuilder/admin/setup.php b/htdocs/modulebuilder/admin/setup.php index 26e64785524..6ca9bfe2a1e 100644 --- a/htdocs/modulebuilder/admin/setup.php +++ b/htdocs/modulebuilder/admin/setup.php @@ -73,7 +73,7 @@ if (preg_match('/del_(.*)/', $action, $reg)) { } } - + /* * View */ @@ -87,73 +87,78 @@ if (GETPOST('withtab', 'alpha')) { $linkback = '' . $langs->trans("BackToModuleList") . ''; } +print '
'; +print ''; +print ''; + print load_fiche_titre($langs->trans("ModuleSetup") . ' ' . $langs->trans('Modulebuilder'), $linkback); if (GETPOST('withtab', 'alpha')) { dol_fiche_head($head, 'modulebuilder', '', -1); } - print '' . $langs->trans("ModuleBuilderDesc") . "
\n"; print '
'; print ''; + print ''; print ''; print ''; print "\n"; -print ''; -print ''; -print ''; + print ''; + print ''; + + print ''; + print ''; + print ''; } -print ''; - - print ''; -print ''; -print ''; - -print ''; -print ''; -print ''; - -print ''; -print ''; -print ''; -print ''; -print ''; +print ''; +print ''; +print ''; print '
' . $langs->trans("Key") . '' . $langs->trans("Value") . '
' . $langs->trans("UseAboutPage") . ''; -if ($conf->use_javascript_ajax) { - print ajax_constantonoff('MODULEBUILDER_USE_ABOUT'); -} else { - if (empty($conf->global->MODULEBUILDER_USE_ABOUT)) { - print '' . img_picto($langs->trans("Disabled"), 'off') . ''; - } else { - print '' . img_picto($langs->trans("Enabled"), 'on') . ''; - } + +if ($conf->global->MAIN_FEATURES_LEVEL >= 2) +{ + // What is use cas of this 2 options ? + + print '
' . $langs->trans("UseAboutPage") . ''; + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('MODULEBUILDER_USE_ABOUT'); + } else { + if (empty($conf->global->MODULEBUILDER_USE_ABOUT)) { + print '' . img_picto($langs->trans("Disabled"), 'off') . ''; + } else { + print '' . img_picto($langs->trans("Enabled"), 'on') . ''; + } + } + print '
' . $langs->trans("UseDocFolder") . ''; + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('MODULEBUILDER_USE_DOCFOLDER'); + } else { + if (empty($conf->global->MODULEBUILDER_USE_DOCFOLDER)) { + print '' . img_picto($langs->trans("Disabled"), 'off') . ''; + } else { + print '' . img_picto($langs->trans("Enabled"), 'on') . ''; + } + } + print '
' . $langs->trans("UseDocFolder") . ''; -if ($conf->use_javascript_ajax) { - print ajax_constantonoff('MODULEBUILDER_USE_DOCFOLDER'); -} else { - if (empty($conf->global->MODULEBUILDER_USE_DOCFOLDER)) { - print '' . img_picto($langs->trans("Disabled"), 'off') . ''; - } else { - print '' . img_picto($langs->trans("Enabled"), 'on') . ''; - } -} -print '
' . $langs->trans("UseSpecificReadme") . ''; -print ''; -print '
'; -print ''; -print '
' . $langs->trans("UseSpecificReadme") . ''; +print ''; +print '
'; +print '
'; + if (GETPOST('withtab', 'alpha')) { dol_fiche_end(); } -print '

'; +print '
'; + +print '
'; // End of page llxFooter(); diff --git a/htdocs/stripe/charge.php b/htdocs/stripe/charge.php index d39cac84eca..0f26bf0e11a 100644 --- a/htdocs/stripe/charge.php +++ b/htdocs/stripe/charge.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2018 Thibault FOUCART * * 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 @@ -62,13 +62,13 @@ llxHeader('', $langs->trans("StripeChargeList")); if (! empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox','alpha'))) { $service = 'StripeTest'; - $servicestatus = '0'; + $servicestatus = '0'; dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning'); } else { - $service = 'StripeLive'; - $servicestatus = '1'; + $service = 'StripeLive'; + $servicestatus = '1'; } $stripeacc = $stripe->getStripeAccount($service); @@ -150,7 +150,7 @@ if (!$rowid) print ''; - if (! empty($conf->stripe->enabled) && !empty($stripeacc)) $connect=$stripeacc.'/'; + if (!empty($stripeacc)) $connect=$stripeacc.'/'; // Ref $url='https://dashboard.stripe.com/'.$connect.'test/payments/'.$charge->id; diff --git a/htdocs/stripe/transaction.php b/htdocs/stripe/transaction.php index 9d9a1c84597..595583a63f1 100644 --- a/htdocs/stripe/transaction.php +++ b/htdocs/stripe/transaction.php @@ -26,9 +26,7 @@ require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; -if (! empty($conf->accounting->enabled)) { - require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php'; -} +if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php'; // Load translation files required by the page $langs->loadLangs(array('compta', 'salaries', 'bills', 'hrm', 'stripe')); @@ -65,16 +63,16 @@ llxHeader('', $langs->trans("StripeTransactionList")); if (! empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox','alpha'))) { $service = 'StripeTest'; - $servicestatus = '0'; + $servicestatus = '0'; dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning'); } else { $service = 'StripeLive'; - $servicestatus = '1'; + $servicestatus = '1'; } -$stripeaccount = $stripe->getStripeAccount($service); +$stripeacc = $stripe->getStripeAccount($service); /*if (empty($stripeaccount)) { print $langs->trans('ErrorStripeAccountNotDefined'); @@ -83,9 +81,8 @@ $stripeaccount = $stripe->getStripeAccount($service); if (! $rowid) { print '
'; - if ($optioncss != '') { - print ''; - } + if ($optioncss != '') + print ''; print ''; print ''; print ''; @@ -94,7 +91,7 @@ if (! $rowid) { print ''; $title=$langs->trans("StripeTransactionList"); - $title.=($stripeaccount?' (Stripe connection with Stripe OAuth Connect account '.$stripeaccount.')':' (Stripe connection with keys from Stripe module setup)'); + $title.=($stripeaccount?' (Stripe connection with Stripe OAuth Connect account '.$stripeacc.')':' (Stripe connection with keys from Stripe module setup)'); print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'title_accountancy.png', 0, '', '', $limit); @@ -115,9 +112,9 @@ if (! $rowid) { print "\n"; - if ($stripeaccount) + if ($stripeacc) { - $txn = \Stripe\BalanceTransaction::all(array("limit" => $limit), array("stripe_account" => $stripeaccount)); + $txn = \Stripe\BalanceTransaction::all(array("limit" => $limit), array("stripe_account" => $stripeacc)); } else { @@ -162,10 +159,11 @@ if (! $rowid) { $societestatic->societe_id = $obj->fk_soc; print ''; - + + // Ref + if (!empty($stripeacc)) $connect=$stripeacc.'/'; + // Ref - if (! empty($conf->stripe->enabled) && !empty($stripeacc)) $connect=$stripeacc.'/'; - if (preg_match('/po_/i', $txn->source)){ $origin="payouts"; } elseif (preg_match('/fee_/i', $txn->source)) { @@ -175,15 +173,14 @@ if (! $rowid) { } $url='https://dashboard.stripe.com/'.$connect.'test/'.$origin.'/'.$txn->source; - - if ($servicestatus) - { - $url='https://dashboard.stripe.com/'.$connect.$origin.'/'.$txn->source; - } - + if ($servicestatus) + { + $url='https://dashboard.stripe.com/'.$connect.$origin.'/'.$txn->source; + } if ($txn->type == 'stripe_fee' || $txn->type == 'reserve_transaction') { - print "".$txn->type.""; - } else print "".img_picto($langs->trans('ShowInStripe'), 'object_globe')." " . $txn->source . "\n"; + print "".$txn->type.""; + } else print "".img_picto($langs->trans('ShowInStripe'), 'object_globe')." " . $txn->source . "\n"; + // Stripe customer //print "".$charge->customer."\n"; // Link @@ -198,16 +195,15 @@ if (! $rowid) { } print "\n";*/ // Origine - //print ""; ////if ($charge->metadata->dol_type=="order"){ // $object = new Commande($db); // $object->fetch($charge->metadata->dol_id); - // print "".img_picto('', 'object_order')." ".$object->ref.""; + // print "".img_picto('', 'object_order')." ".$object->ref.""; //} elseif ($charge->metadata->dol_type=="invoice"){ // $object = new Facture($db); // $object->fetch($charge->metadata->dol_id); - // print "".img_picto('', 'object_invoice')." ".$object->ref.""; + // print "".img_picto('', 'object_invoice')." ".$object->ref.""; //} //print "\n"; // Date payment @@ -219,13 +215,12 @@ if (! $rowid) { print "" . price(($txn->fee) / 100, 0, '', 1, - 1, - 1, strtoupper($txn->currency)) . ""; // Status print ""; - if ($txn->status=='available') { - print img_picto($langs->trans("".$txn->status.""),'statut4'); - } elseif ($txn->status=='pending') { - print img_picto($langs->trans("".$txn->status.""),'statut7'); - } elseif ($txn->status=='failed') { - print img_picto($langs->trans("".$txn->status.""),'statut8'); - } + if ($txn->status=='available') + {print img_picto($langs->trans("".$txn->status.""),'statut4');} + elseif ($txn->status=='pending') + {print img_picto($langs->trans("".$txn->status.""),'statut7');} + elseif ($txn->status=='failed') + {print img_picto($langs->trans("".$txn->status.""),'statut8');} print ''; print "\n"; } diff --git a/test/phpunit/LoanTest.php b/test/phpunit/LoanTest.php index 8341f788ede..d54c810049d 100644 --- a/test/phpunit/LoanTest.php +++ b/test/phpunit/LoanTest.php @@ -214,5 +214,4 @@ class LoanTest extends PHPUnit_Framework_TestCase $this->assertLessThan($result, 0); return $result; } - }