diff --git a/ChangeLog b/ChangeLog
index 8b3b3c97157..322372ab8a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,7 +16,7 @@ NEW: Accountancy - add options to disable binding on sales, purchases & expense
NEW: Accountancy balance - add a menu entry to show subtotal by group
NEW: Accountancy - change menu disposition
NEW: Accountancy - on transfers, select the periodicity by default
-NEW: Accountancy - Add export for Gestinum (v3 & v5)
+NEW: Accountancy - Add export for Gestinum (v3 & v5) #15180
NEW: new currency rate editor
NEW: Solve blocking feature. Can increase stock of a Kit without changing subproduct stock.
NEW: add a widget to show the customers with outstanding limits reached
@@ -163,7 +163,7 @@ NEW: Support for Samba4 AD
NEW: TakePOS connector compatibility with RECEIPT PRINTERS module
NEW: TakePOS Gift Receipt
NEW: TakePOS Multicurrency compatibility
-NEW: the global header of a website can also have dynamic content
+NEW: TakePOS Weighing Scale compatibility with TakePOS connector #14725
NEW: Third-Party Import new fields: mother company,outstanding debt limit,bank account,incoterms
NEW: Thirdparty module : box on customer/supplier tab for invoice outsantding amount late
NEW: ticket classification on create from email collector
@@ -173,11 +173,11 @@ NEW: VAT rate for Angola #15606
NEW: VAT and juridical status for Algeria
NEW: VAT report - Invert constant to show by default zero VAT in reports
NEW: website page fields selection
-NEW: Weighing Scale compatibility with TakePOS connector
+NEW: website - global header of a website can also have dynamic content
NEW: when creating a user from a member linked to a thirdparty, you can choose to create it as external or internal user
-NEW: add clone button on miscellaneous payment
-NEW: #15065 Add option to put the product label in bold in the PDF templates if configured
-NEW: Add option "If the feature to manage kits of module Stock is used, show details of subproducts of a kit on PDF."
+NEW: add clone button on miscellaneous payment
+NEW: add option to put the product label in bold in the PDF templates if configured #15065
+NEW: add option "If the feature to manage kits of module Stock is used, show details of subproducts of a kit on PDF."
For developers:
diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php
index d06f8a2ce31..05149030f9e 100644
--- a/htdocs/admin/dict.php
+++ b/htdocs/admin/dict.php
@@ -692,7 +692,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
if ($value == 'sortorder') continue; // For a column name 'sortorder', we use the field name 'position'
if ((!GETPOSTISSET($value) || GETPOST($value) == '')
&& (!in_array($listfield[$f], array('decalage', 'module', 'accountancy_code', 'accountancy_code_sell', 'accountancy_code_buy', 'tracking', 'picto')) // Fields that are not mandatory
- && (!($id == 10 && $listfield[$f] == 'code')) // Code is mandatory fir table 10
+ && ($id != 10 || ($listfield[$f] != 'code' && $listfield[$f] != 'note')) // Field code and note is not mandatory for dictionary table 10
)
) {
$ok = 0;
@@ -757,9 +757,9 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
if ($_POST["accountancy_code"] <= 0) $_POST["accountancy_code"] = ''; // If empty, we force to null
if ($_POST["accountancy_code_sell"] <= 0) $_POST["accountancy_code_sell"] = ''; // If empty, we force to null
if ($_POST["accountancy_code_buy"] <= 0) $_POST["accountancy_code_buy"] = ''; // If empty, we force to null
- if ($id == 10 && GETPOSTISSET("code")) // Spaces are not allowed into code
+ if ($id == 10 && GETPOSTISSET("code")) // Spaces are not allowed into code for tax dictionary
{
- $_POST["code"] = preg_replace('/\s/', '', $_POST["code"]);
+ $_POST["code"] = preg_replace('/[^a-zA-Z0-9\-\+]/', '', $_POST["code"]);
}
// If check ok and action add, add the line
@@ -826,8 +826,13 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
$result = $db->query($sql);
if ($result) // Add is ok
{
- setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs');
- $_POST = array('id'=>$id); // Clean $_POST array, we keep only
+ setEventMessages($langs->transnoentities("RecordCreatedSuccessfully"), null, 'mesgs');
+
+ // Clean $_POST array, we keep only id of dictionary
+ if ($id == 10 && GETPOST('country', 'int') > 0) {
+ $search_country_id = GETPOST('country', 'int');
+ }
+ $_POST = array('id'=>$id);
} else {
if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') {
setEventMessages($langs->transnoentities("ErrorRecordAlreadyExists"), null, 'errors');
diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php
index b37762a644a..dc0ada64eb3 100644
--- a/htdocs/comm/action/index.php
+++ b/htdocs/comm/action/index.php
@@ -214,6 +214,7 @@ llxHeader('', $langs->trans("Agenda"), $help_url);
$form = new Form($db);
$companystatic = new Societe($db);
$contactstatic = new Contact($db);
+$userstatic = new User($db);
$now = dol_now();
$nowarray = dol_getdate($now);
@@ -1071,7 +1072,6 @@ if (count($listofextcals))
{
$event->id = $icalevent['UID'];
$event->ref = $event->id;
-
$userId = $userstatic->findUserIdByEmail($namecal);
if (!empty($userId) && $userId > 0)
{
diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php
index 5fa4a3adfaa..885081e84a1 100644
--- a/htdocs/commande/list.php
+++ b/htdocs/commande/list.php
@@ -46,7 +46,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
// Load translation files required by the page
-$langs->loadLangs(array("orders", 'sendings', 'deliveries', 'companies', 'compta', 'bills', 'stocks'));
+$langs->loadLangs(array("orders", 'sendings', 'deliveries', 'companies', 'compta', 'bills', 'stocks', 'products'));
$action = GETPOST('action', 'aZ09');
$massaction = GETPOST('massaction', 'alpha');
diff --git a/htdocs/core/boxes/box_fournisseurs.php b/htdocs/core/boxes/box_fournisseurs.php
index 44e2682585e..7d1c72b3036 100644
--- a/htdocs/core/boxes/box_fournisseurs.php
+++ b/htdocs/core/boxes/box_fournisseurs.php
@@ -137,10 +137,13 @@ class box_fournisseurs extends ModeleBoxes
$line++;
}
- if ($num == 0) $this->info_box_contents[$line][0] = array(
- 'td' => 'class="center opacitymedium"',
- 'text'=>$langs->trans("NoRecordedSuppliers"),
- );
+ if ($num == 0) {
+ $langs->load("suppliers");
+ $this->info_box_contents[$line][0] = array(
+ 'td' => 'class="center opacitymedium"',
+ 'text'=>$langs->trans("NoRecordedSuppliers"),
+ );
+ }
$this->db->free($result);
} else {
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 47c025b0c0a..af0a625875f 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -6845,6 +6845,7 @@ abstract class CommonObject
break;
}
+ // Output value of the current field
if ($extrafields->attributes[$this->table_element]['type'][$key] == 'separate')
{
$extrafields_collapse_num = '';
diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php
index 74e624ca7cb..3c8a79a9249 100644
--- a/htdocs/core/lib/project.lib.php
+++ b/htdocs/core/lib/project.lib.php
@@ -2526,13 +2526,15 @@ function getTaskProgressBadge($task, $label = '', $tooltip = '')
if (doubleval($progressCalculated) > doubleval($task->progress * $warningRatio)) {
$badgeClass .= 'badge-danger';
- if (empty($tooltip)) $tooltip = $task->progress.'% < '.$langs->trans("Expected").' '.$progressCalculated.'%';
+ if (empty($tooltip)) {
+ $tooltip = $task->progress.'% < '.$langs->trans("TimeConsumed").' '.$progressCalculated.'%';
+ }
} elseif (doubleval($progressCalculated) > doubleval($task->progress)) { // warning if close at 10%
$badgeClass .= 'badge-warning';
- if (empty($tooltip)) $tooltip = $task->progress.'% < '.$langs->trans("Expected").' '.$progressCalculated.'%';
+ if (empty($tooltip)) $tooltip = $task->progress.'% < '.$langs->trans("TimeConsumed").' '.$progressCalculated.'%';
} else {
$badgeClass .= 'badge-success';
- if (empty($tooltip)) $tooltip = $task->progress.'% >= '.$langs->trans("Expected").' '.$progressCalculated.'%';
+ if (empty($tooltip)) $tooltip = $task->progress.'% >= '.$langs->trans("TimeConsumed").' '.$progressCalculated.'%';
}
}
}
diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php
index 4494db8c21d..28c0673ef17 100644
--- a/htdocs/expedition/list.php
+++ b/htdocs/expedition/list.php
@@ -36,7 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php';
// Load translation files required by the page
-$langs->loadLangs(array("sendings", "deliveries", 'companies', 'bills'));
+$langs->loadLangs(array("sendings", "deliveries", 'companies', 'bills', 'products'));
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'shipmentlist'; // To manage different context of search
diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php
index e680e55868a..2b77801fee3 100644
--- a/htdocs/fourn/commande/list.php
+++ b/htdocs/fourn/commande/list.php
@@ -43,7 +43,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
-$langs->loadLangs(array("orders", "sendings", 'deliveries', 'companies', 'compta', 'bills', 'projects', 'suppliers'));
+$langs->loadLangs(array("orders", "sendings", 'deliveries', 'companies', 'compta', 'bills', 'projects', 'suppliers', 'products'));
$action = GETPOST('action', 'aZ09');
$massaction = GETPOST('massaction', 'alpha');
diff --git a/htdocs/install/check.php b/htdocs/install/check.php
index 93b99680b92..06e9e5147e9 100644
--- a/htdocs/install/check.php
+++ b/htdocs/install/check.php
@@ -77,7 +77,7 @@ if (!empty($useragent))
// Check PHP version
$arrayphpminversionerror = array(5, 5, 0);
-$arrayphpminversionwarning = array(5, 5, 0);
+$arrayphpminversionwarning = array(5, 6, 0);
if (versioncompare(versionphparray(), $arrayphpminversionerror) < 0) // Minimum to use (error if lower)
{
print '
'.$langs->trans("ErrorPHPVersionTooLow", versiontostring($arrayphpminversionerror));
@@ -105,7 +105,7 @@ if (!isset($_GET["testget"]) && !isset($_POST["testpost"])) // We must keep $_GE
}
-// Check if sessions enabled
+// Check if session_id is enabled
if (!function_exists("session_id"))
{
print '
'.$langs->trans("ErrorPHPDoesNotSupportSessions")."
\n";
@@ -115,7 +115,7 @@ if (!function_exists("session_id"))
}
-// Check if GD supported (we need GD for image conversion)
+// Check if GD is supported (we need GD for image conversion)
if (!function_exists("imagecreate"))
{
$langs->load("errors");
@@ -126,7 +126,7 @@ if (!function_exists("imagecreate"))
}
-// Check if Curl supported
+// Check if Curl is supported
if (!function_exists("curl_init"))
{
$langs->load("errors");
@@ -145,7 +145,7 @@ if (!function_exists("easter_date"))
}
-// Check if UTF8 supported
+// Check if UTF8 is supported
if (!function_exists("utf8_encode"))
{
$langs->load("errors");
@@ -201,7 +201,7 @@ if ($memmaxorig != '')
}
-// If config file present and filled
+// If that config file is present and filled
clearstatcache();
if (is_readable($conffile) && filesize($conffile) > 8)
{
diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang
index f5f6bf3dd9d..2aedbd53377 100644
--- a/htdocs/langs/en_US/projects.lang
+++ b/htdocs/langs/en_US/projects.lang
@@ -85,6 +85,7 @@ ProgressCalculated=Progress on consumption
WhichIamLinkedTo=which I'm linked to
WhichIamLinkedToProject=which I'm linked to project
Time=Time
+TimeConsumed=Consumed
ListOfTasks=List of tasks
GoToListOfTimeConsumed=Go to list of time consumed
GanttView=Gantt View
diff --git a/htdocs/loan/class/paymentloan.class.php b/htdocs/loan/class/paymentloan.class.php
index dc6d72094b2..34acb06f9ce 100644
--- a/htdocs/loan/class/paymentloan.class.php
+++ b/htdocs/loan/class/paymentloan.class.php
@@ -475,7 +475,7 @@ class PaymentLoan extends CommonObject
// Insert payment into llx_bank
$bank_line_id = $acc->addline(
$this->datep,
- $this->fk_typepayment, // Payment mode ID or code ("CHQ or VIR for example")
+ $this->paymenttype, // Payment mode ID or code ("CHQ or VIR for example")
$label,
$total,
$this->num_payment,
diff --git a/htdocs/loan/payment/payment.php b/htdocs/loan/payment/payment.php
index 8a6e1e9c9ba..0c0574c15b4 100644
--- a/htdocs/loan/payment/payment.php
+++ b/htdocs/loan/payment/payment.php
@@ -152,7 +152,7 @@ if ($action == 'add_payment')
// Create a line of payments
$payment = new PaymentLoan($db);
- $payment->chid = $chid;
+ $payment->chid = $chid;
$payment->datep = $datepaid;
$payment->label = $loan->label;
$payment->amount_capital = $pay_amount_capital;
@@ -176,7 +176,7 @@ if ($action == 'add_payment')
if (!$error)
{
- $result = $payment->addPaymentToBank($user, $chid, 'payment_loan', '(LoanPayment)', GETPOST('accountid', 'int'), '', '');
+ $result = $payment->addPaymentToBank($user, $chid, 'payment_loan', '(LoanPayment)', $payment->fk_bank, '', '');
if (!$result > 0)
{
setEventMessages($payment->error, $payment->errors, 'errors');
diff --git a/htdocs/product/list.php b/htdocs/product/list.php
index a624daf8afb..26b0eca9ee5 100644
--- a/htdocs/product/list.php
+++ b/htdocs/product/list.php
@@ -202,9 +202,9 @@ $arrayfields = array(
'p.volume_units'=>array('label'=>$langs->trans('VolumeUnits'), 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && empty($conf->global->PRODUCT_DISABLE_VOLUME) && $type != '1'), 'position'=>31),
'cu.label'=>array('label'=>$langs->trans("DefaultUnitToShow"), 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && !empty($conf->global->PRODUCT_USE_UNITS)), 'position'=>32),
'p.sellprice'=>array('label'=>$langs->trans("SellingPrice"), 'checked'=>1, 'enabled'=>empty($conf->global->PRODUIT_MULTIPRICES), 'position'=>40),
- 'p.minbuyprice'=>array('label'=>$langs->trans("BuyingPriceMinShort"), 'checked'=>1, 'enabled'=>(!empty($user->rights->fournisseur->lire)), 'position'=>41),
- 'p.numbuyprice'=>array('label'=>$langs->trans("BuyingPriceNumShort"), 'checked'=>0, 'enabled'=>(!empty($user->rights->fournisseur->lire)), 'position'=>42),
- 'p.tva_tx'=>array('label'=>$langs->trans("VATRate"), 'checked'=>0, 'enabled'=>(!empty($user->rights->fournisseur->lire)), 'position'=>43),
+ 'p.tva_tx'=>array('label'=>$langs->trans("VATRate"), 'checked'=>0, 'enabled'=>empty($conf->global->PRODUIT_MULTIPRICES), 'position'=>41),
+ 'p.minbuyprice'=>array('label'=>$langs->trans("BuyingPriceMinShort"), 'checked'=>1, 'enabled'=>(!empty($user->rights->fournisseur->lire)), 'position'=>42),
+ 'p.numbuyprice'=>array('label'=>$langs->trans("BuyingPriceNumShort"), 'checked'=>0, 'enabled'=>(!empty($user->rights->fournisseur->lire)), 'position'=>43),
'p.pmp'=>array('label'=>$langs->trans("PMPValueShort"), 'checked'=>0, 'enabled'=>(!empty($user->rights->fournisseur->lire)), 'position'=>44),
'p.cost_price'=>array('label'=>$langs->trans("CostPrice"), 'checked'=>0, 'enabled'=>(!empty($user->rights->fournisseur->lire)), 'position'=>45),
'p.seuil_stock_alerte'=>array('label'=>$langs->trans("StockLimit"), 'checked'=>0, 'enabled'=>(!empty($conf->stock->enabled) && $user->rights->stock->lire && $contextpage != 'service'), 'position'=>50),
@@ -378,7 +378,7 @@ if ($search_barcode) $sql .= natural_search('p.barcode', $search_barcode);
if (isset($search_tosell) && dol_strlen($search_tosell) > 0 && $search_tosell != -1) $sql .= " AND p.tosell = ".((int) $search_tosell);
if (isset($search_tobuy) && dol_strlen($search_tobuy) > 0 && $search_tobuy != -1) $sql .= " AND p.tobuy = ".((int) $search_tobuy);
if (isset($search_tobatch) && dol_strlen($search_tobatch) > 0 && $search_tobatch != -1) $sql .= " AND p.tobatch = ".((int) $search_tobatch);
-if ($search_vatrate) $sql .= natural_search('p.tva_tx', $search_vatrate);
+if ($search_vatrate) $sql .= natural_search('p.tva_tx', $search_vatrate, 1);
if (dol_strlen($canvas) > 0) $sql .= " AND p.canvas = '".$db->escape($canvas)."'";
if ($catid > 0) $sql .= " AND cp.fk_categorie = ".$catid;
if ($catid == -2) $sql .= " AND cp.fk_categorie IS NULL";
@@ -934,7 +934,7 @@ if ($resql)
print_liste_field_titre($arrayfields['p.numbuyprice']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right ');
}
if (!empty($arrayfields['p.tva_tx']['checked'])) {
- print_liste_field_titre($arrayfields['p.tva_tx']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right ');
+ print_liste_field_titre($arrayfields['p.tva_tx']['label'], $_SERVER["PHP_SELF"], 'p.tva_tx', "", $param, '', $sortfield, $sortorder, 'right ');
}
if (!empty($arrayfields['p.pmp']['checked'])) {
print_liste_field_titre($arrayfields['p.pmp']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right ');
diff --git a/htdocs/user/list.php b/htdocs/user/list.php
index e7a8a31af4e..9a1a06f5a17 100644
--- a/htdocs/user/list.php
+++ b/htdocs/user/list.php
@@ -345,7 +345,7 @@ if ($catid > 0) $sql .= " AND cu.fk_categorie = ".((int) $catid);
if ($catid == -2) $sql .= " AND cu.fk_categorie IS NULL";
if ($search_categ > 0) $sql .= " AND cu.fk_categorie = ".$db->escape($search_categ);
if ($search_categ == -2) $sql .= " AND cu.fk_categorie IS NULL";
-if ($mode == 'employee' && empty($user->rights->salaries->readall)) $sql .= " AND s.fk_user IN (".join(',', $childids).")";
+if ($mode == 'employee' && empty($user->rights->salaries->readall)) $sql .= " AND u.fk_user IN (".join(',', $childids).")";
// Add where from extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
// Add where from hooks
diff --git a/scripts/invoices/email_unpaid_invoices_to_customers.php b/scripts/invoices/email_unpaid_invoices_to_customers.php
index a569a34d0fa..5d4d3ff3e64 100755
--- a/scripts/invoices/email_unpaid_invoices_to_customers.php
+++ b/scripts/invoices/email_unpaid_invoices_to_customers.php
@@ -153,7 +153,7 @@ if ($resql) {
if ($targettype == 'contacts') {
$oldcid = $obj->cid;
}
- $oldlang = $obj->lang;
+ $oldlang = $obj->default_lang;
$oldtarget = (empty($obj->cfirstname) && empty($obj->clastname)) ? $obj->name : ($obj->clastname." ".$obj->cfirstname);
$message = '';
$total = 0;