diff --git a/htdocs/accountancy/customer/index.php b/htdocs/accountancy/customer/index.php
index 7ce226f99d8..70e79e31063 100644
--- a/htdocs/accountancy/customer/index.php
+++ b/htdocs/accountancy/customer/index.php
@@ -500,6 +500,7 @@ if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
}
$sql .= " AND aa.account_number IS NOT NULL";
$sql .= " GROUP BY fd.fk_code_ventilation,aa.account_number,aa.label";
+$sql .= ' ORDER BY aa.account_number';
dol_syslog('htdocs/accountancy/customer/index.php');
$resql = $db->query($sql);
diff --git a/htdocs/accountancy/expensereport/index.php b/htdocs/accountancy/expensereport/index.php
index 93419ce3cc4..08657fe7a62 100644
--- a/htdocs/accountancy/expensereport/index.php
+++ b/htdocs/accountancy/expensereport/index.php
@@ -244,6 +244,7 @@ $sql .= " AND er.fk_statut IN (".ExpenseReport::STATUS_APPROVED.", ".ExpenseRepo
$sql .= " AND er.entity IN (".getEntity('expensereport', 0).")"; // We don't share object for accountancy
$sql .= " AND aa.account_number IS NULL";
$sql .= " GROUP BY erd.fk_code_ventilation,aa.account_number,aa.label";
+$sql .= ' ORDER BY aa.account_number';
dol_syslog('/accountancy/expensereport/index.php:: sql='.$sql);
$resql = $db->query($sql);
diff --git a/htdocs/accountancy/supplier/index.php b/htdocs/accountancy/supplier/index.php
index 70434a470f1..e46b508512d 100644
--- a/htdocs/accountancy/supplier/index.php
+++ b/htdocs/accountancy/supplier/index.php
@@ -374,6 +374,7 @@ $sql .= " AND ffd.product_type <= 2";
$sql .= " AND ff.entity IN (".getEntity('facture_fourn', 0).")"; // We don't share object for accountancy
$sql .= " AND aa.account_number IS NULL";
$sql .= " GROUP BY ffd.fk_code_ventilation,aa.account_number,aa.label";
+$sql .= ' ORDER BY aa.account_number';
dol_syslog('htdocs/accountancy/supplier/index.php');
$resql = $db->query($sql);
diff --git a/htdocs/admin/dolistore/class/dolistore.class.php b/htdocs/admin/dolistore/class/dolistore.class.php
index e823d6e2d37..f890262695f 100644
--- a/htdocs/admin/dolistore/class/dolistore.class.php
+++ b/htdocs/admin/dolistore/class/dolistore.class.php
@@ -267,9 +267,9 @@ class Dolistore
// add image or default ?
if ($product->id_default_image != '') {
- $image_url = DOL_URL_ROOT.'/admin/dolistore/ajax/image.php?id_product='.((int) $product->id).'&id_image='.((int) $product->id_default_image);
- $images = '';
- $images .= ' ';
+ $image_url = DOL_URL_ROOT.'/admin/dolistore/ajax/image.php?id_product='.urlencode(((int) $product->id)).'&id_image='.urlencode(((int) $product->id_default_image));
+ $images = '';
+ $images .= ' ';
} else {
$images = ' ';
}
@@ -277,11 +277,11 @@ class Dolistore
// free or pay ?
if ($product->price > 0) {
$price = '
';
-print load_fiche_titre($title ? $title : $langs->trans("BackupZipWizard"));
+print load_fiche_titre($title);
print '
'.$langs->trans("FileNameToGenerate").' ';
$prefix = 'documents';
diff --git a/htdocs/api/class/api_setup.class.php b/htdocs/api/class/api_setup.class.php
index 97039d599ef..2ab8c7837ac 100644
--- a/htdocs/api/class/api_setup.class.php
+++ b/htdocs/api/class/api_setup.class.php
@@ -1053,7 +1053,7 @@ class Setup extends DolibarrApi
* @param int $page Page number (starting from zero)
* @param string $zipcode To filter on zipcode
* @param string $town To filter on city name
- * @param int $active Payment term is active or not {@min 0} {@max 1}
+ * @param int $active Town is active or not {@min 0} {@max 1}
* @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)"
* @return array List of towns
*
@@ -1067,7 +1067,7 @@ class Setup extends DolibarrApi
$sql = "SELECT rowid AS id, zip, town, fk_county, fk_pays AS fk_country";
$sql .= " FROM ".MAIN_DB_PREFIX."c_ziptown as t";
- $sql .= " AND t.active = ".((int) $active);
+ $sql .= " WHERE t.active = ".((int) $active);
if ($zipcode) {
$sql .= " AND t.zip LIKE '%".$this->db->escape($zipcode)."%'";
}
diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php
index 78940872106..8430d9e7440 100644
--- a/htdocs/compta/bank/card.php
+++ b/htdocs/compta/bank/card.php
@@ -377,7 +377,7 @@ if ($action == 'create') {
// Type
print '
'.$langs->trans("AccountType").' ';
print '';
- $formbank->selectTypeOfBankAccount(GETPOSTISSET("type") ? GETPOST('type', 'alpha') : Account::TYPE_CURRENT, 'type');
+ $formbank->selectTypeOfBankAccount(GETPOSTISSET("type") ? GETPOST('type', 'int') : Account::TYPE_CURRENT, 'type');
print ' ';
// Currency
@@ -490,7 +490,7 @@ if ($action == 'create') {
print '';
print '
';
- $type = GETPOST('type');
+ $type = (GETPOSTISSET("type") ? GETPOST('type', 'int') : Account::TYPE_CURRENT); // add default value
if ($type == Account::TYPE_SAVINGS || $type == Account::TYPE_CURRENT) {
print '
';
@@ -870,7 +870,7 @@ if ($action == 'create') {
// Type
print ''.$langs->trans("AccountType").' ';
print '';
- $formbank->selectTypeOfBankAccount((GETPOSTISSET('type') ? GETPOST('type', 'alpha') : $object->type), 'type');
+ $formbank->selectTypeOfBankAccount((GETPOSTISSET('type') ? GETPOST('type', 'int') : $object->type), 'type');
print ' ';
// Currency
@@ -1015,7 +1015,8 @@ if ($action == 'create') {
print '
';
- if (GETPOST("type") == Account::TYPE_SAVINGS || GETPOST("type") == Account::TYPE_CURRENT) {
+ $type = (GETPOSTISSET('type') ? GETPOST('type', 'int') : $object->type); // add default current value
+ if ($type == Account::TYPE_SAVINGS || $type == Account::TYPE_CURRENT) {
print '
';
//print '
';
diff --git a/htdocs/public/ticket/create_ticket.php b/htdocs/public/ticket/create_ticket.php
index 6a3fd1aa688..f2b72693a13 100644
--- a/htdocs/public/ticket/create_ticket.php
+++ b/htdocs/public/ticket/create_ticket.php
@@ -259,7 +259,7 @@ if (empty($reshook) && $action == 'create_ticket' && GETPOST('save', 'alpha')) {
$message = ($conf->global->TICKET_MESSAGE_MAIL_NEW ? $conf->global->TICKET_MESSAGE_MAIL_NEW : $langs->transnoentities('TicketNewEmailBody')).'
';
$message .= $langs->transnoentities('TicketNewEmailBodyInfosTicket').'
';
- $url_public_ticket = ($conf->global->TICKET_URL_PUBLIC_INTERFACE ? $conf->global->TICKET_URL_PUBLIC_INTERFACE.'/' : dol_buildpath('/public/ticket/view.php', 2)).'?track_id='.$object->track_id;
+ $url_public_ticket = ($conf->global->TICKET_URL_PUBLIC_INTERFACE ? $conf->global->TICKET_URL_PUBLIC_INTERFACE.'/view.php' : dol_buildpath('/public/ticket/view.php', 2)).'?track_id='.$object->track_id;
$infos_new_ticket = $langs->transnoentities('TicketNewEmailBodyInfosTrackId', '
'.$object->track_id.' ').'
';
$infos_new_ticket .= $langs->transnoentities('TicketNewEmailBodyInfosTrackUrl').'
';
diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php
index a49bf478763..a0793e914e9 100644
--- a/htdocs/societe/class/societe.class.php
+++ b/htdocs/societe/class/societe.class.php
@@ -898,8 +898,8 @@ class Societe extends CommonObject
$sql .= ", name_alias";
$sql .= ", entity";
$sql .= ", datec";
- $sql .= ", fk_typent";
$sql .= ", fk_user_creat";
+ $sql .= ", fk_typent";
$sql .= ", canvas";
$sql .= ", status";
$sql .= ", ref_ext";