diff --git a/htdocs/admin/taxes.php b/htdocs/admin/taxes.php index 684577a6d6d..bf89da8522a 100644 --- a/htdocs/admin/taxes.php +++ b/htdocs/admin/taxes.php @@ -141,7 +141,7 @@ else print ''; print ''; - print ''; + print ''; print '
'.$langs->trans("CompanyIds").''.$langs->trans("Value").'
'.$langs->trans("CompanyIds").''.$langs->trans("Value").'
'; print ''; @@ -169,28 +169,29 @@ else print '
'; - print "
\n"; + print '
'; print ''; // Cas des parametres TAX_MODE_SELL/BUY_SERVICE/PRODUCT print ''; - print ''; + print ''; print "\n"; print ''; - print '\n"; print ''; - print '\n"; + print '\n"; print "
'.$langs->trans('OptionVatMode').''.$langs->trans('Description').''.$langs->trans('OptionVatMode').''.$langs->trans('Description').'
'.$langs->trans('OptionVATDefault').''.nl2br($langs->trans('OptionVatDefaultDesc')); + print ''.nl2br($langs->trans('OptionVatDefaultDesc')); print "
'.$langs->trans('OptionVATDebitOption').''.nl2br($langs->trans('OptionVatDebitOptionDesc'))."
'.nl2br($langs->trans('OptionVatDebitOptionDesc'))."
\n"; print '
'; - print load_fiche_titre($langs->trans("SummaryOfVatExigibilityUsedByDefault"),'',''); + print ' -> '.$langs->trans("SummaryOfVatExigibilityUsedByDefault"); //print ' ('.$langs->trans("CanBeChangedWhenMakingInvoice").')'; + print ''; - print ''; + print ''; // Products print ''; @@ -235,12 +236,18 @@ else print "
\n"; + + /* * Others params */ + +print load_fiche_titre($langs->trans("OtherOptions"),'',''); + print '
 '.$langs->trans("Buy").''.$langs->trans("Sell").'
 '.$langs->trans("Buy").''.$langs->trans("Sell").'
'.$langs->trans("Product").'
'; print ''; -print ''; +print ''; +print '\n"; foreach ($list as $key) diff --git a/htdocs/comm/action/class/api_agendaevents.class.php b/htdocs/comm/action/class/api_agendaevents.class.php index 58deec46f5e..7fd76b5d1a9 100644 --- a/htdocs/comm/action/class/api_agendaevents.class.php +++ b/htdocs/comm/action/class/api_agendaevents.class.php @@ -80,6 +80,8 @@ class AgendaEvents extends DolibarrApi throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } + $result = $this->actioncomm->fetch_optionals(); + $this->actioncomm->fetchObjectLinked(); return $this->_cleanObjectDatas($this->actioncomm); } @@ -319,7 +321,6 @@ class AgendaEvents extends DolibarrApi unset($object->usermod); unset($object->libelle); - unset($object->array_options); unset($object->context); unset($object->canvas); unset($object->contact); diff --git a/htdocs/compta/bank/list.php b/htdocs/compta/bank/list.php index 817d6dc84e9..6a39416342e 100644 --- a/htdocs/compta/bank/list.php +++ b/htdocs/compta/bank/list.php @@ -89,8 +89,8 @@ $arrayfields=array( 'accountype'=>array('label'=>$langs->trans("Type"), 'checked'=>1), 'b.label'=>array('label'=>$langs->trans("Label"), 'checked'=>1), 'b.number'=>array('label'=>$langs->trans("AccountIdShort"), 'checked'=>1), - 'b.account_number'=>array('label'=>$langs->trans("AccountAccounting"), 'checked'=>$conf->accountancy->enabled), - 'b.fk_accountancy_journal'=>array('label'=>$langs->trans("AccountancyJournal"), 'checked'=>$conf->accountancy->enabled), + 'b.account_number'=>array('label'=>$langs->trans("AccountAccounting"), 'checked'=>(! empty($conf->accounting->enabled) || ! empty($conf->accounting->enabled))), + 'b.fk_accountancy_journal'=>array('label'=>$langs->trans("AccountancyJournal"), 'checked'=>(! empty($conf->accounting->enabled) || ! empty($conf->accounting->enabled))), 'toreconcile'=>array('label'=>$langs->trans("TransactionsToConciliate"), 'checked'=>1), 'b.currency_code'=>array('label'=>$langs->trans("Currency"), 'checked'=>0), 'b.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500), diff --git a/htdocs/compta/tva/quadri_detail.php b/htdocs/compta/tva/quadri_detail.php index c622881d273..d4ccbf98804 100644 --- a/htdocs/compta/tva/quadri_detail.php +++ b/htdocs/compta/tva/quadri_detail.php @@ -447,7 +447,7 @@ else $ratiopaymentinvoice=1; if ($modetax == 0) { - if (isset($fields['payment_amount']) && $fields['ftotal_ttc']) $ratiopaymentinvoice=($fields['payment_amount']/$fields['ftotal_ttc']); + if (isset($fields['payment_amount']) && price2num($fields['ftotal_ttc'])) $ratiopaymentinvoice=($fields['payment_amount']/$fields['ftotal_ttc']); print '
' . $langs->trans('OtherOptions') . '' . $langs->trans('Parameters') . ''; print "
'; //print $fields['totalht']."-".$fields['payment_amount']."-".$fields['ftotal_ttc']; if ($fields['payment_amount'] && $fields['ftotal_ttc']) diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index eca1174bb59..432515fbf1f 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -1078,9 +1078,10 @@ class Contact extends CommonObject * @param int $maxlen Max length of * @param string $moreparam Add more param into URL * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking + * @param int $notooltip 1=Disable tooltip * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $maxlen=0, $moreparam='', $save_lastsearch_value=-1) + function getNomUrl($withpicto=0, $option='', $maxlen=0, $moreparam='', $save_lastsearch_value=-1, $notooltip=0) { global $conf, $langs, $hookmanager; @@ -1112,13 +1113,16 @@ class Contact extends CommonObject $linkstart = 'global->MAIN_OPTIMIZEFORTEXTBROWSER)) - { - $label=$langs->trans("ShowContact"); - $linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"'; - } - $linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"'; - $linkclose.= ' class="classfortooltip">'; + if (empty($notooltip)) { + if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) + { + $label=$langs->trans("ShowContact"); + $linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"'; + } + $linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"'; + $linkclose.= ' class="classfortooltip"'; + } + $linkclose.='>'; if (! is_object($hookmanager)) { diff --git a/htdocs/core/modules/mailings/advthirdparties.modules.php b/htdocs/core/modules/mailings/advthirdparties.modules.php index 9252ae5ec3a..e6f0255b9d9 100644 --- a/htdocs/core/modules/mailings/advthirdparties.modules.php +++ b/htdocs/core/modules/mailings/advthirdparties.modules.php @@ -100,7 +100,7 @@ class mailing_advthirdparties extends MailingTargets 'source_url' => $this->url($obj->id,'thirdparty'), 'source_id' => $obj->id, 'source_type' => 'thirdparty' - ); + ); } } @@ -289,11 +289,11 @@ class mailing_advthirdparties extends MailingTargets if ($type=='thirdparty') { $companystatic=new Societe($this->db); $companystatic->fetch($id); - return $companystatic->getNomUrl(0); + return $companystatic->getNomUrl(0, '', 0, 1); } elseif ($type=='contact') { $contactstatic=new Contact($this->db); $contactstatic->fetch($id); - return $contactstatic->getNomUrl(0); + return $contactstatic->getNomUrl(0, '', 0, '', -1, 0); } } diff --git a/htdocs/core/modules/modAccounting.class.php b/htdocs/core/modules/modAccounting.class.php index ea7208cc5dd..d8365776d9c 100644 --- a/htdocs/core/modules/modAccounting.class.php +++ b/htdocs/core/modules/modAccounting.class.php @@ -71,73 +71,88 @@ class modAccounting extends DolibarrModules $this->langfiles = array("accountancy","compta"); // Constants + // List of particular constants to add when module is enabled (key, 'chaine', value, desc, visible, 'current' or 'allentities', deleteonunactive) + // Example: $this->const=array(0=>array('MYMODULE_MYNEWCONST1','chaine','myvalue','This is a constant to add',1), + // 1=>array('MYMODULE_MYNEWCONST2','chaine','myvalue','This is another constant to add',0, 'current', 1) + // ); $this->const = array(); $this->const[1] = array( "MAIN_COMPANY_CODE_ALWAYS_REQUIRED", "chaine", "1", - "With this constants on, third party code is always required whatever is numbering module behaviour" + "With this constants on, third party code is always required whatever is numbering module behaviour", 0, 'current', 0 ); $this->const[2] = array( "MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED", "chaine", "1", - "With this constants on, bank account number is always required" + "With this constants on, bank account number is always required", 0, 'current', 1 ); $this->const[3] = array( "ACCOUNTING_ACCOUNT_SUSPENSE", "chaine", - "471" + "471", + "", 0, 'current', 0 ); $this->const[4] = array( "ACCOUNTING_ACCOUNT_TRANSFER_CASH", "chaine", - "58" + "58", + "", 0, 'current', 0 ); $this->const[5] = array( "CHARTOFACCOUNTS", "chaine", - "2" + "2", + "", 0, 'current', 0 ); $this->const[6] = array( "ACCOUNTING_EXPORT_MODELCSV", "chaine", - "1" + "1", + "", 0, 'current', 0 ); $this->const[7] = array( "ACCOUNTING_LENGTH_GACCOUNT", "chaine", - "" + "", + "", 0, 'current', 0 ); $this->const[8] = array( "ACCOUNTING_LENGTH_AACCOUNT", "chaine", - "" + "", + "", 0, 'current', 0 ); $this->const[9] = array( "ACCOUNTING_LIST_SORT_VENTILATION_TODO", "yesno", - "1" + "1", + "", 0, 'current', 0 ); $this->const[10] = array( "ACCOUNTING_LIST_SORT_VENTILATION_DONE", "yesno", - "1" + "1", + "", 0, 'current', 0 ); $this->const[11] = array ( "ACCOUNTING_EXPORT_DATE", "chaine", - "%d%m%Y" + "%d%m%Y", + "", 0, 'current', 0 ); $this->const[12] = array( "ACCOUNTING_EXPORT_SEPARATORCSV", "string", - "," + ",", + "", 0, 'current', 0 ); $this->const[13] = array( "ACCOUNTING_EXPORT_FORMAT", "chaine", - "csv" + "csv", + "", 0, 'current', 0 ); // Tabs diff --git a/htdocs/langs/en_US/compta.lang b/htdocs/langs/en_US/compta.lang index d1413fb0454..e476c951123 100644 --- a/htdocs/langs/en_US/compta.lang +++ b/htdocs/langs/en_US/compta.lang @@ -31,7 +31,7 @@ Credit=Credit Piece=Accounting Doc. AmountHTVATRealReceived=Net collected AmountHTVATRealPaid=Net paid -VATToPay=VAT sells +VATToPay=Tax sales VATReceived=Tax received VATToCollect=Tax purchases VATSummary=Tax Balance diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index e51747fd78c..5a61e8b2a98 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -158,6 +158,8 @@ if ($action == 'order' && isset($_POST['valid'])) $line->total_ttc = $line->total_ht + $line->total_tva; $line->remise_percent = $obj->remise_percent; $line->ref_fourn = $obj->ref_fourn; + $line->type = $product->type; + $line->fk_unit = $product->fk_unit; $suppliers[$obj->fk_soc]['lines'][] = $line; } } @@ -202,7 +204,13 @@ if ($action == 'order' && isset($_POST['valid'])) $line->remise_percent, 'HT', 0, - $line->info_bits + $line->type, + 0, + false, + null, + null, + 0, + $line->fk_unit ); } if ($result < 0) { diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index aafea674bcf..beb351affe9 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -10,6 +10,7 @@ * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2015 Marcos García * Copyright (C) 2015 Raphaël Doursenaud + * Copyright (C) 2018 Nicolas ZABOURI * * 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