diff --git a/build/rpm/dolibarr_fedora.spec b/build/rpm/dolibarr_fedora.spec
index 65da8cabfd7..d5a9189229e 100755
--- a/build/rpm/dolibarr_fedora.spec
+++ b/build/rpm/dolibarr_fedora.spec
@@ -212,6 +212,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/supplier_proposal
%_datadir/dolibarr/htdocs/support
%_datadir/dolibarr/htdocs/theme
+%_datadir/dolibarr/htdocs/ticket
%_datadir/dolibarr/htdocs/user
%_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webservices
diff --git a/build/rpm/dolibarr_generic.spec b/build/rpm/dolibarr_generic.spec
index 2fed89c03f3..673d5919d1a 100755
--- a/build/rpm/dolibarr_generic.spec
+++ b/build/rpm/dolibarr_generic.spec
@@ -292,6 +292,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/supplier_proposal
%_datadir/dolibarr/htdocs/support
%_datadir/dolibarr/htdocs/theme
+%_datadir/dolibarr/htdocs/ticket
%_datadir/dolibarr/htdocs/user
%_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webservices
diff --git a/build/rpm/dolibarr_mandriva.spec b/build/rpm/dolibarr_mandriva.spec
index fb15a2d2d92..e3d2a849db2 100755
--- a/build/rpm/dolibarr_mandriva.spec
+++ b/build/rpm/dolibarr_mandriva.spec
@@ -209,6 +209,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/supplier_proposal
%_datadir/dolibarr/htdocs/support
%_datadir/dolibarr/htdocs/theme
+%_datadir/dolibarr/htdocs/ticket
%_datadir/dolibarr/htdocs/user
%_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webservices
diff --git a/build/rpm/dolibarr_opensuse.spec b/build/rpm/dolibarr_opensuse.spec
index 70eba841bd8..5a64bec2e78 100755
--- a/build/rpm/dolibarr_opensuse.spec
+++ b/build/rpm/dolibarr_opensuse.spec
@@ -220,6 +220,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/supplier_proposal
%_datadir/dolibarr/htdocs/support
%_datadir/dolibarr/htdocs/theme
+%_datadir/dolibarr/htdocs/ticket
%_datadir/dolibarr/htdocs/user
%_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webservices
diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php
index e411f8c5b1b..f2a137f0d8f 100644
--- a/htdocs/compta/facture/card.php
+++ b/htdocs/compta/facture/card.php
@@ -4030,8 +4030,6 @@ else if ($id > 0 || ! empty($ref))
print '';
- // List of previous situation invoices
-
$sign = 1;
if ($object->type == Facture::TYPE_CREDIT_NOTE) $sign = - 1;
$nbrows = 8;
@@ -4372,7 +4370,7 @@ else if ($id > 0 || ! empty($ref))
}
else // Credit note
{
- $cssforamountpaymentcomplete='';
+ $cssforamountpaymentcomplete='amountpaymentneutral';
// Total already paid back
print '
';
@@ -4387,7 +4385,7 @@ else if ($id > 0 || ! empty($ref))
if ($resteapayeraffiche <= 0)
print $langs->trans('RemainderToPayBack');
else
- print $langs->trans('ExcessPaydBack');
+ print $langs->trans('ExcessPaid');
print ' : ';
print '' . price($sign * $resteapayeraffiche) . ' ';
print ' ';
diff --git a/htdocs/core/ajax/ziptown.php b/htdocs/core/ajax/ziptown.php
index 9fa475039d9..2100d3d3600 100644
--- a/htdocs/core/ajax/ziptown.php
+++ b/htdocs/core/ajax/ziptown.php
@@ -120,6 +120,7 @@ if (! empty($_GET['zipcode']) || ! empty($_GET['town']))
$row_array['selectcountry_id'] = $row['fk_country'];
$row_array['state_id'] = $row['fk_county'];
+ // TODO Use a cache here to avoid to make select_state in each pass (this make a SQL and lot of logs)
$row_array['states'] = $formcompany->select_state('',$row['fk_country'],'');
array_push($return_arr,$row_array);
diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php
index 86105133c4c..f04cfad54bc 100644
--- a/htdocs/core/class/html.formcompany.class.php
+++ b/htdocs/core/class/html.formcompany.class.php
@@ -203,7 +203,7 @@ class FormCompany
*
* @param string $selected Code state preselected (mus be state id)
* @param integer $country_codeid Country code or id: 0=list for all countries, otherwise country code or country rowid to show
- * @param string $htmlname Id of department
+ * @param string $htmlname Id of department. If '', we want only the string with
* @return string String with HTML select
* @see select_country
*/
@@ -217,7 +217,7 @@ class FormCompany
$out='';
- // On recherche les departements/cantons/province active d'une region et pays actif
+ // Serch departements/cantons/province active d'une region et pays actif
$sql = "SELECT d.rowid, d.code_departement as code, d.nom as name, d.active, c.label as country, c.code as country_code, r.nom as region_name FROM";
$sql .= " ".MAIN_DB_PREFIX ."c_departements as d, ".MAIN_DB_PREFIX."c_regions as r,".MAIN_DB_PREFIX."c_country as c";
$sql .= " WHERE d.fk_region=r.code_region and r.fk_pays=c.rowid";
@@ -226,7 +226,6 @@ class FormCompany
if ($country_codeid && ! is_numeric($country_codeid)) $sql .= " AND c.code = '".$this->db->escape($country_codeid)."'";
$sql .= " ORDER BY c.code, d.code_departement";
- dol_syslog(get_class($this)."::select_departement", LOG_DEBUG);
$result=$this->db->query($sql);
if ($result)
{
@@ -298,9 +297,12 @@ class FormCompany
dol_print_error($this->db);
}
- // Make select dynamic
- include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
- $out .= ajax_combobox($htmlname);
+ // Make select dynamic
+ if (! empty($htmlname))
+ {
+ include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
+ $out .= ajax_combobox($htmlname);
+ }
return $out;
}
diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php
index 36a96cf56b8..fa1d9528ef5 100644
--- a/htdocs/core/lib/company.lib.php
+++ b/htdocs/core/lib/company.lib.php
@@ -89,7 +89,7 @@ function societe_prepare_head(Societe $object)
$head[$h][0] = DOL_URL_ROOT.'/comm/card.php?socid='.$object->id;
$head[$h][1] = '';
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && ($object->client==2 || $object->client==3)) $head[$h][1] .= $langs->trans("Prospect");
- if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && $object->client==3) $head[$h][1] .= '/';
+ if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && $object->client==3) $head[$h][1] .= ' | ';
if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && ($object->client==1 || $object->client==3)) $head[$h][1] .= $langs->trans("Customer");
$head[$h][2] = 'customer';
$h++;
diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php
index 7c4437116f3..0186b90cc16 100644
--- a/htdocs/core/menus/standard/eldy.lib.php
+++ b/htdocs/core/menus/standard/eldy.lib.php
@@ -150,11 +150,10 @@ function print_eldy_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0,$mode
if (! empty($conf->salaries->enabled)) $menuqualified++;
if (! empty($conf->supplier_invoice->enabled)) $menuqualified++;
if (! empty($conf->loan->enabled)) $menuqualified++;
- if (! empty($conf->banque->enabled)) $menuqualified++;
$tmpentry=array(
'enabled'=>$menuqualified,
- 'perms'=>(! empty($user->rights->facture->lire) || ! empty($user->rights->don->lire) || ! empty($user->rights->tax->charges->lire) || ! empty($user->rights->salaries->read) || ! empty($user->rights->fournisseur->facture->lire) || ! empty($user->rights->loan->read) || ! empty($user->rights->banque->lire)),
- 'module'=>'facture|supplier_invoice|don|tax|salaries|loan|banque');
+ 'perms'=>(! empty($user->rights->facture->lire) || ! empty($user->rights->don->lire) || ! empty($user->rights->tax->charges->lire) || ! empty($user->rights->salaries->read) || ! empty($user->rights->fournisseur->facture->lire) || ! empty($user->rights->loan->read)),
+ 'module'=>'facture|supplier_invoice|don|tax|salaries|loan');
$showmode=isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal);
if ($showmode)
{
diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php
index 3a8dbca7a70..11c40ff45a8 100644
--- a/htdocs/fourn/facture/card.php
+++ b/htdocs/fourn/facture/card.php
@@ -2904,7 +2904,7 @@ else
if ($resteapayeraffiche <= 0)
print $langs->trans('RemainderToPayBack');
else
- print $langs->trans('ExcessPaydBack');
+ print $langs->trans('ExcessPaid');
print ' :';
print '' . price($sign * $resteapayeraffiche) . ' ';
print ' ';
diff --git a/htdocs/install/mysql/migration/7.0.0-8.0.0.sql b/htdocs/install/mysql/migration/7.0.0-8.0.0.sql
index 530070c8252..3252a394c00 100644
--- a/htdocs/install/mysql/migration/7.0.0-8.0.0.sql
+++ b/htdocs/install/mysql/migration/7.0.0-8.0.0.sql
@@ -32,6 +32,10 @@
-- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup);
+-- Forgot in < 4.0
+
+ALTER TABLE llx_c_ziptown DROP FOREIGN KEY fk_c_ziptown_fk_pays;
+ALTER TABLE llx_c_ziptown ADD CONSTRAINT fk_c_ziptown_fk_pays FOREIGN KEY (fk_pays) REFERENCES llx_c_country(rowid);
-- Forgot in 7.0
@@ -49,6 +53,7 @@ ALTER TABLE llx_ecm_files ADD UNIQUE INDEX uk_ecm_files (filepath, filename, ent
UPDATE llx_const set name = __ENCRYPT('INVOICE_FREE_TEXT')__ where name = __ENCRYPT('FACTURE_FREE_TEXT')__;
+
-- drop very old table (bad name)
DROP TABLE llx_c_accountancy_category;
DROP TABLE llx_c_accountingaccount;
diff --git a/htdocs/langs/en_US/agenda.lang b/htdocs/langs/en_US/agenda.lang
index f1e17a43cfe..9c1a0a35837 100644
--- a/htdocs/langs/en_US/agenda.lang
+++ b/htdocs/langs/en_US/agenda.lang
@@ -35,7 +35,7 @@ AgendaAutoActionDesc= Define here events for which you want Dolibarr to create a
AgendaSetupOtherDesc= This page provides options to allow export of your Dolibarr events into an external calendar (thunderbird, google calendar, ...)
AgendaExtSitesDesc=This page allows to declare external sources of calendars to see their events into Dolibarr agenda.
ActionsEvents=Events for which Dolibarr will create an action in agenda automatically
-EventRemindersByEmailNotEnabled=Event reminders by email was not enabled into Agenda module setup.
+EventRemindersByEmailNotEnabled=Event reminders by email was not enabled into %s module setup.
##### Agenda event labels #####
NewCompanyToDolibarr=Third party %s created
ContractValidatedInDolibarr=Contract %s validated
diff --git a/htdocs/public/stripe/ipn.php b/htdocs/public/stripe/ipn.php
index d088476ccc2..a269fea0b80 100644
--- a/htdocs/public/stripe/ipn.php
+++ b/htdocs/public/stripe/ipn.php
@@ -1,5 +1,5 @@
*
* 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
@@ -24,6 +24,7 @@ if (is_numeric($entity)) define("DOLENTITY", $entity);
require '../../main.inc.php';
if (empty($conf->stripe->enabled)) accessforbidden('',0,0,1);
+require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
require_once DOL_DOCUMENT_ROOT.'/includes/stripe/init.php';
require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php';
@@ -121,7 +122,7 @@ $stripe=new Stripe($db);
if ($event->type == 'payout.created') {
$error=0;
- $result=dolibarr_set_const($db, $service."_NEXTPAYOUT", date('Y-m-d H:i:s',$event->data->object->arrival_date), 'chaine', 0, '', $conf->entity);
+ $result=dolibarr_set_const($db, $servicestatus."_NEXTPAYOUT", date('Y-m-d H:i:s',$event->data->object->arrival_date), 'chaine', 0, '', $conf->entity);
if ($result > 0)
{
@@ -141,7 +142,7 @@ if ($event->type == 'payout.created') {
elseif ($event->type == 'payout.paid') {
global $conf;
$error=0;
- $result=dolibarr_set_const($db, $service."_NEXTPAYOUT",null,'chaine',0,'',$conf->entity);
+ $result=dolibarr_set_const($db, $servicestatus."_NEXTPAYOUT",null,'chaine',0,'',$conf->entity);
if ($result)
{
$langs->load("errors");