diff --git a/ChangeLog b/ChangeLog
index 031e740e008..41f9d05f752 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -28,6 +28,84 @@ Following changes may create regressions for some external modules, but were nec
* All functions fetch_all() are deprecated for naming consitency, use fetchAll() instead
+***** ChangeLog for 16.0.1 compared to 16.0.0 *****
+
+FIX: #16476 on massaction the pdf generation is not using the t…
+FIX: #21416 Filter tag no-categorie in members
+FIX: #21543
+FIX: #21799 inactive companies shall not be selectable for new proposals, orders and invoices
+FIX: #21859 Don't show html balise on list for private/public note
+FIX: #22164
+FIX: #22241
+FIX: #22263 Accountancy - Account number expected in place of a rowid on parent account on export
+FIX: #22264 Accountancy - Translation on chart of accounts export
+FIX: #22265 Accountancy - Account number expected in place of a rowid on export
+FIX: #22334
+FIX: #22360
+FIX: #22379 creating events on supplier order
+FIX: #22382 Error on length of supplier reference
+FIX: #22386 IBAN not mandatory for International Export Countries
+FIX: #22440 Lang Key "UserAccountNotDefined" is missing
+FIX: #22482
+FIX: #22507
+FIX: Accountancy - Some manuals operations are displayed in subledger
+FIX: API reception return error 500
+FIX: avoid override initial message ($this instead $object)
+FIX: avoid some warnings (php8+)
+FIX: Bad backtopage and CSRF on link for ticket message
+FIX: bad closing select
+FIX: broken feature, wrong fk_parent_line after cloning object
+FIX: Column label
+FIX: compatibility if javascript not actived
+FIX: compatibility with Mysql <= 5.7
+FIX: contact deletion: execute trigger before really deleting
+FIX: CronJob sendBackup
+FIX: CSRF + lost value of constant after use save button
+FIX: CSS
+FIX: data integrity for llx_delivery table
+FIX: default value for partnership status
+FIX: deletion of the MO_CHILD link
+FIX: Dictionary - Display error on cache_vatrates
+FIX: Dolibarr#16476 version 2a
+FIX: Duplicate creation of invoice when closing shipment linked to order
+FIX: Duplicate in list when filtering on categories
+FIX: extrafields with value '0' was ''
+FIX: filters lost when sorting on productMargin and customerMargins
+FIX: fk_expedition in $line can be usefull for triggers
+FIX: Import in upgrade when using a socialnetwork field.
+FIX: input hidden with fk_product of line on mo production can be usefull
+FIX: inventory code must be different at each transation
+FIX: inventory total columns
+FIX: Issue #16476 on massaction the pdf generation is not using the thirdparty language settings
+FIX: Linked object agenda card
+FIX: missing check if category module is enabled
+FIX: missing check if incoice as a payment (wrong status)
+FIX: missing class "societe" when create another object with workflow
+FIX: missing error message if image size too large
+FIX: Missing reposition
+FIX: missing the management of a constant in the Ticket config
+FIX: Missing token in different URLs links
+FIX: @ must be allowed into dol_eval to allow rules including external module string 'abc@def'
+FIX: - php V8 get number doc saphir
+FIX: - php V8 propal index last draft
+FIX: Preview button position on documents list (case when the file is too long)
+FIX: Project - on global view, missing display of ref customer
+FIX: Protection against bad value into accurancy setup
+FIX: reading of trackid in emailcollector (when on recipient suffix)
+FIX: recruitment linked files
+FIX: Remove use of code we should not have
+FIX: Restore the option MAIN_OPTIMIZEFORTEXTBROWSER
+FIX: Rich text is not diplayed
+FIX: same thing in deleteline
+FIX: Supplier Reference is lost when page breaks
+FIX: support of array parameters in "add to bookmark" feature.
+FIX: Test that web dir is correct in install
+FIX: the shipment PDF was using the full size logo instead of small
+FIX: Token Error : delete stock transfer
+FIX: ToOfferALinkForOnlinePayment not translated
+FIX: tooltip of technical tables added of a module
+FIX: wrong result check when update expensereport line
+
***** ChangeLog for 16.0.0 compared to 15.0.0 *****
@@ -236,6 +314,7 @@ Following changes may create regressions for some external modules, but were nec
* Method fetch_all of DolResource has been renamed into fetchAll() to match naming conventions.
* The hook 'upgrade' and 'doUpgrade2" has been renamed 'doUpgradeBefore' and 'doUpgradeAfterDB'. A new trigger 'doUpgradeAfterFiles' has been introduced.
* The context hook 'suppliercard' when on the supplier tab of a thirdparty has been renamed into 'thirdpartysupplier'
+* Because the module Resources highly linked to the Agenda module, the menu for Resources module has been moved into top menu Agenda.
***** ChangeLog for 15.0.3 compared to 15.0.2 *****
diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php
index 22d39dea7d0..8236b83eb3d 100644
--- a/htdocs/accountancy/admin/index.php
+++ b/htdocs/accountancy/admin/index.php
@@ -266,6 +266,9 @@ if (!$user->admin) {
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
print '
' . $langs->trans("ConstantIsOn", "FACTURE_DEPOSITS_ARE_JUST_PAYMENTS") . '
';
}
+ if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
+ print '' . $langs->trans("ConstantIsOn", "FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS") . '
';
+ }
if (!empty($conf->global->ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY)) {
print '' . $langs->trans("ConstantIsOn", "ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY") . '
';
}
diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php
index c278429ba97..0f721a67db7 100644
--- a/htdocs/accountancy/journal/purchasesjournal.php
+++ b/htdocs/accountancy/journal/purchasesjournal.php
@@ -133,7 +133,7 @@ if (!empty($conf->global->MAIN_COMPANY_PERENTITY_SHARED)) {
$sql .= " WHERE f.fk_statut > 0";
$sql .= " AND fd.fk_code_ventilation > 0";
$sql .= " AND f.entity IN (".getEntity('facture_fourn', 0).")"; // We don't share object for accountancy
-if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
+if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (".FactureFournisseur::TYPE_STANDARD.",".FactureFournisseur::TYPE_REPLACEMENT.",".FactureFournisseur::TYPE_CREDIT_NOTE.",".FactureFournisseur::TYPE_SITUATION.")";
} else {
$sql .= " AND f.type IN (".FactureFournisseur::TYPE_STANDARD.",".FactureFournisseur::TYPE_REPLACEMENT.",".FactureFournisseur::TYPE_CREDIT_NOTE.",".FactureFournisseur::TYPE_DEPOSIT.",".FactureFournisseur::TYPE_SITUATION.")";
@@ -764,7 +764,7 @@ if (empty($action) || $action == 'view') {
$exportlink = '';
$builddate = dol_now();
$description = $langs->trans("DescJournalOnlyBindedVisible").'';
if (!empty($discount_type)) {
- if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
+ if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
if (!$filter || $filter == "fk_invoice_supplier_source IS NULL") {
$translationKey = 'HasAbsoluteDiscountFromSupplier'; // If we want deposit to be substracted to payments only and not to total of final invoice
} else {
diff --git a/htdocs/core/lib/tax.lib.php b/htdocs/core/lib/tax.lib.php
index a0602dfd74e..29ced3591a1 100644
--- a/htdocs/core/lib/tax.lib.php
+++ b/htdocs/core/lib/tax.lib.php
@@ -174,10 +174,18 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p on d.fk_product = p.rowid";
$sql .= " WHERE f.entity IN (".getEntity($invoicetable).")";
$sql .= " AND f.fk_statut in (1,2)"; // Validated or paid (partially or completely)
- if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
- $sql .= " AND f.type IN (0,1,2,5)";
+ if ($direction == 'buy') {
+ if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
+ $sql .= " AND f.type IN (0,1,2,5)";
+ } else {
+ $sql .= " AND f.type IN (0,1,2,3,5)";
+ }
} else {
- $sql .= " AND f.type IN (0,1,2,3,5)";
+ if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
+ $sql .= " AND f.type IN (0,1,2,5)";
+ } else {
+ $sql .= " AND f.type IN (0,1,2,3,5)";
+ }
}
$sql .= " AND f.rowid = d.".$fk_facture;
$sql .= " AND s.rowid = f.fk_soc";
@@ -222,10 +230,18 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p on d.fk_product = p.rowid";
$sql .= " WHERE f.entity IN (".getEntity($invoicetable).")";
$sql .= " AND f.fk_statut in (1,2)"; // Paid (partially or completely)
- if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
- $sql .= " AND f.type IN (0,1,2,5)";
+ if ($direction == 'buy') {
+ if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
+ $sql .= " AND f.type IN (0,1,2,5)";
+ } else {
+ $sql .= " AND f.type IN (0,1,2,3,5)";
+ }
} else {
- $sql .= " AND f.type IN (0,1,2,3,5)";
+ if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
+ $sql .= " AND f.type IN (0,1,2,5)";
+ } else {
+ $sql .= " AND f.type IN (0,1,2,3,5)";
+ }
}
$sql .= " AND f.rowid = d.".$fk_facture;
$sql .= " AND s.rowid = f.fk_soc";
@@ -359,10 +375,18 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p on d.fk_product = p.rowid";
$sql .= " WHERE f.entity IN (".getEntity($invoicetable).")";
$sql .= " AND f.fk_statut in (1,2)"; // Validated or paid (partially or completely)
- if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
- $sql .= " AND f.type IN (0,1,2,5)";
+ if ($direction == 'buy') {
+ if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
+ $sql .= " AND f.type IN (0,1,2,5)";
+ } else {
+ $sql .= " AND f.type IN (0,1,2,3,5)";
+ }
} else {
- $sql .= " AND f.type IN (0,1,2,3,5)";
+ if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
+ $sql .= " AND f.type IN (0,1,2,5)";
+ } else {
+ $sql .= " AND f.type IN (0,1,2,3,5)";
+ }
}
$sql .= " AND f.rowid = d.".$fk_facture;
$sql .= " AND s.rowid = f.fk_soc";
@@ -407,10 +431,18 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p on d.fk_product = p.rowid";
$sql .= " WHERE f.entity IN (".getEntity($invoicetable).")";
$sql .= " AND f.fk_statut in (1,2)"; // Paid (partially or completely)
- if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
- $sql .= " AND f.type IN (0,1,2,5)";
+ if ($direction == 'buy') {
+ if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
+ $sql .= " AND f.type IN (0,1,2,5)";
+ } else {
+ $sql .= " AND f.type IN (0,1,2,3,5)";
+ }
} else {
- $sql .= " AND f.type IN (0,1,2,3,5)";
+ if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
+ $sql .= " AND f.type IN (0,1,2,5)";
+ } else {
+ $sql .= " AND f.type IN (0,1,2,3,5)";
+ }
}
$sql .= " AND f.rowid = d.".$fk_facture;
$sql .= " AND s.rowid = f.fk_soc";
@@ -730,10 +762,18 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p on d.fk_product = p.rowid";
$sql .= " WHERE f.entity IN (".getEntity($invoicetable).")";
$sql .= " AND f.fk_statut in (1,2)"; // Validated or paid (partially or completely)
- if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
- $sql .= " AND f.type IN (0,1,2,5)";
+ if ($direction == 'buy') {
+ if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
+ $sql .= " AND f.type IN (0,1,2,5)";
+ } else {
+ $sql .= " AND f.type IN (0,1,2,3,5)";
+ }
} else {
- $sql .= " AND f.type IN (0,1,2,3,5)";
+ if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
+ $sql .= " AND f.type IN (0,1,2,5)";
+ } else {
+ $sql .= " AND f.type IN (0,1,2,3,5)";
+ }
}
if ($y && $m) {
$sql .= " AND f.datef >= '".$db->idate(dol_get_first_day($y, $m, false))."'";
@@ -776,10 +816,18 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p on d.fk_product = p.rowid";
$sql .= " WHERE f.entity IN (".getEntity($invoicetable).")";
$sql .= " AND f.fk_statut in (1,2)"; // Paid (partially or completely)
- if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
- $sql .= " AND f.type IN (0,1,2,5)";
+ if ($direction == 'buy') {
+ if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
+ $sql .= " AND f.type IN (0,1,2,5)";
+ } else {
+ $sql .= " AND f.type IN (0,1,2,3,5)";
+ }
} else {
- $sql .= " AND f.type IN (0,1,2,3,5)";
+ if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
+ $sql .= " AND f.type IN (0,1,2,5)";
+ } else {
+ $sql .= " AND f.type IN (0,1,2,3,5)";
+ }
}
if ($y && $m) {
$sql .= " AND pa.datep >= '".$db->idate(dol_get_first_day($y, $m, false))."'";
@@ -915,10 +963,18 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p on d.fk_product = p.rowid";
$sql .= " WHERE f.entity IN (".getEntity($invoicetable).")";
$sql .= " AND f.fk_statut in (1,2)"; // Validated or paid (partially or completely)
- if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
- $sql .= " AND f.type IN (0,1,2,5)";
+ if ($direction == 'buy') {
+ if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
+ $sql .= " AND f.type IN (0,1,2,5)";
+ } else {
+ $sql .= " AND f.type IN (0,1,2,3,5)";
+ }
} else {
- $sql .= " AND f.type IN (0,1,2,3,5)";
+ if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
+ $sql .= " AND f.type IN (0,1,2,5)";
+ } else {
+ $sql .= " AND f.type IN (0,1,2,3,5)";
+ }
}
if ($y && $m) {
$sql .= " AND f.datef >= '".$db->idate(dol_get_first_day($y, $m, false))."'";
@@ -961,10 +1017,18 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p on d.fk_product = p.rowid";
$sql .= " WHERE f.entity IN (".getEntity($invoicetable).")";
$sql .= " AND f.fk_statut in (1,2)"; // Paid (partially or completely)
- if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
- $sql .= " AND f.type IN (0,1,2,5)";
+ if ($direction == 'buy') {
+ if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
+ $sql .= " AND f.type IN (0,1,2,5)";
+ } else {
+ $sql .= " AND f.type IN (0,1,2,3,5)";
+ }
} else {
- $sql .= " AND f.type IN (0,1,2,3,5)";
+ if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
+ $sql .= " AND f.type IN (0,1,2,5)";
+ } else {
+ $sql .= " AND f.type IN (0,1,2,3,5)";
+ }
}
if ($y && $m) {
$sql .= " AND pa.datep >= '".$db->idate(dol_get_first_day($y, $m, false))."'";
diff --git a/htdocs/core/modules/modFacture.class.php b/htdocs/core/modules/modFacture.class.php
index 339e02cf393..85072c90cee 100644
--- a/htdocs/core/modules/modFacture.class.php
+++ b/htdocs/core/modules/modFacture.class.php
@@ -5,6 +5,7 @@
* Copyright (C) 2004 Benoit Mortier
* Copyright (C) 2005-2012 Regis Houssin
* Copyright (C) 2021 Alexandre Spangaro
+ * Copyright (C) 2022 Frédéric France
*
* 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
@@ -238,7 +239,7 @@ class modFacture extends DolibarrModules
$this->import_fields_array[$r] = array(
'f.ref' => 'InvoiceRef*',
'f.ref_ext' => 'ExternalRef',
- 'f.ref_client' => 'CutomerRef',
+ 'f.ref_client' => 'CustomerRef',
'f.type' => 'Type*',
'f.fk_soc' => 'Customer*',
'f.datec' => 'InvoiceDateCreation',
@@ -350,7 +351,7 @@ class modFacture extends DolibarrModules
)
);
- //Import Supplier Invoice Lines
+ // Import Invoice Lines
$r++;
$this->import_code[$r] = $this->rights_class.'_'.$r;
$this->import_label[$r] = "InvoiceLine"; // Translation key
diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php
index 16bc43474d8..ec923f91118 100644
--- a/htdocs/fourn/class/fournisseur.product.class.php
+++ b/htdocs/fourn/class/fournisseur.product.class.php
@@ -419,7 +419,11 @@ class ProductFournisseur extends Product
$productfournisseurprice->array_options[$key] = $value;
}
$res = $productfournisseurprice->update($user);
- if ($res < 0) $error++;
+ if ($res < 0) {
+ $this->error = $productfournisseurprice->error;
+ $this->errors = $productfournisseurprice->errors;
+ $error++;
+ }
}
}
}
@@ -506,6 +510,7 @@ class ProductFournisseur extends Product
if ($resql) {
$this->product_fourn_price_id = $this->db->last_insert_id(MAIN_DB_PREFIX."product_fournisseur_price");
} else {
+ $this->error = $this->db->lasterror();
$error++;
}
@@ -518,7 +523,11 @@ class ProductFournisseur extends Product
$productfournisseurprice->array_options[$key] = $value;
}
$res = $productfournisseurprice->update($user);
- if ($res < 0) $error++;
+ if ($res < 0) {
+ $this->error = $productfournisseurprice->error;
+ $this->errors = $productfournisseurprice->errors;
+ $error++;
+ }
}
}
}
diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php
index 834ef4031c0..67cfffdeb7c 100644
--- a/htdocs/fourn/commande/card.php
+++ b/htdocs/fourn/commande/card.php
@@ -2121,7 +2121,7 @@ if ($action == 'create') {
print '';
// Relative and absolute discounts
- if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
+ if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
$filterabsolutediscount = "fk_invoice_supplier_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
$filtercreditnote = "fk_invoice_supplier_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
} else {
diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php
index 31cec906b0f..54ee8157e13 100644
--- a/htdocs/fourn/facture/card.php
+++ b/htdocs/fourn/facture/card.php
@@ -2641,7 +2641,7 @@ if ($action == 'create') {
}
$resteapayeraffiche = $resteapayer;
- if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { // Never use this
+ if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) { // Never use this
$filterabsolutediscount = "fk_invoice_supplier_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
$filtercreditnote = "fk_invoice_supplier_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
} else {
diff --git a/htdocs/install/mysql/migration/15.0.0-16.0.0.sql b/htdocs/install/mysql/migration/15.0.0-16.0.0.sql
index f7e7a7a1ba5..acbcbf7b0d3 100644
--- a/htdocs/install/mysql/migration/15.0.0-16.0.0.sql
+++ b/htdocs/install/mysql/migration/15.0.0-16.0.0.sql
@@ -365,7 +365,52 @@ ALTER TABLE llx_bank_account ADD COLUMN pti_in_ctti smallint DEFAULT 0 AFTER dom
-- Set default ticket type to OTHER if no default exists
UPDATE llx_c_ticket_type SET use_default=1 WHERE code='OTHER' AND NOT EXISTS(SELECT * FROM (SELECT * FROM llx_c_ticket_type) AS t WHERE use_default=1);
+
-- Assets - New module
+
+CREATE TABLE llx_asset(
+ rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
+ ref varchar(128) NOT NULL,
+ entity integer DEFAULT 1 NOT NULL,
+ label varchar(255),
+
+ fk_asset_model integer,
+
+ reversal_amount_ht double(24,8),
+ acquisition_value_ht double(24,8) DEFAULT NULL,
+ recovered_vat double(24,8),
+
+ reversal_date date,
+
+ date_acquisition date NOT NULL,
+ date_start date NOT NULL,
+
+ qty real DEFAULT 1 NOT NULL,
+
+ acquisition_type smallint DEFAULT 0 NOT NULL,
+ asset_type smallint DEFAULT 0 NOT NULL,
+
+ not_depreciated integer DEFAULT 0,
+
+ disposal_date date,
+ disposal_amount_ht double(24,8),
+ fk_disposal_type integer,
+ disposal_depreciated integer DEFAULT 0,
+ disposal_subject_to_vat integer DEFAULT 0,
+
+ note_public text,
+ note_private text,
+
+ date_creation datetime NOT NULL,
+ tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ fk_user_creat integer NOT NULL,
+ fk_user_modif integer,
+ last_main_doc varchar(255),
+ import_key varchar(14),
+ model_pdf varchar(255),
+ status integer NOT NULL
+) ENGINE=innodb;
+
ALTER TABLE llx_asset DROP FOREIGN KEY fk_asset_asset_type;
ALTER TABLE llx_asset DROP INDEX idx_asset_fk_asset_type;
diff --git a/htdocs/install/mysql/tables/llx_establishment.sql b/htdocs/install/mysql/tables/llx_establishment.sql
index a3542f6d9d6..1b1f38074ad 100644
--- a/htdocs/install/mysql/tables/llx_establishment.sql
+++ b/htdocs/install/mysql/tables/llx_establishment.sql
@@ -22,6 +22,7 @@
CREATE TABLE llx_establishment (
rowid integer NOT NULL auto_increment PRIMARY KEY,
entity integer NOT NULL DEFAULT 1,
+ label varchar(255),
ref varchar(30),
label varchar(255) NOT NULL,
name varchar(128),
diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang
index f732641fc79..6ff5a63196a 100644
--- a/htdocs/langs/en_US/errors.lang
+++ b/htdocs/langs/en_US/errors.lang
@@ -14,6 +14,7 @@ ErrorLoginAlreadyExists=Login %s already exists.
ErrorGroupAlreadyExists=Group %s already exists.
ErrorEmailAlreadyExists=Email %s already exists.
ErrorRecordNotFound=Record not found.
+ErrorRecordNotFoundShort=Not found
ErrorFailToCopyFile=Failed to copy file '%s' into '%s'.
ErrorFailToCopyDir=Failed to copy directory '%s' into '%s'.
ErrorFailToRenameFile=Failed to rename file '%s' into '%s'.
diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php
index 76c4784b013..37853d1488a 100644
--- a/htdocs/supplier_proposal/card.php
+++ b/htdocs/supplier_proposal/card.php
@@ -1613,7 +1613,7 @@ if ($action == 'create') {
print '';
// Relative and absolute discounts
- if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
+ if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
$filterabsolutediscount = "fk_invoice_supplier_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
$filtercreditnote = "fk_invoice_supplier_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
} else {
diff --git a/htdocs/takepos/admin/terminal.php b/htdocs/takepos/admin/terminal.php
index 9cd1a5fd5f0..c511d3e0529 100644
--- a/htdocs/takepos/admin/terminal.php
+++ b/htdocs/takepos/admin/terminal.php
@@ -414,7 +414,7 @@ $htmltext .= '';
print '
';
print load_fiche_titre($langs->trans('FreeLegalTextOnInvoices'), '', '');
-print '';
+print '
';
print '
';
print '';
print '| '.$langs->trans("Parameters").' | '.$langs->trans('Value').' | ';
diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php
index c43d0ec092f..faa843aec9a 100644
--- a/htdocs/takepos/index.php
+++ b/htdocs/takepos/index.php
@@ -587,7 +587,9 @@ function New() {
* return {void}
*/
function Search2(keyCodeForEnter, moreorless) {
- console.log("Search2 Call ajax search to replace products keyCodeForEnter="+keyCodeForEnter);
+ var eventKeyCode = window.event.keyCode;
+
+ console.log("Search2 Call ajax search to replace products keyCodeForEnter="+keyCodeForEnter+", eventKeyCode="+eventKeyCode);
var search_term = $('#search').val();
var search_start = 0;
@@ -610,20 +612,19 @@ function Search2(keyCodeForEnter, moreorless) {
}
var search = false;
- var eventKeyCode = window.event.keyCode;
- if (keyCodeForEnter == '' || eventKeyCode == keyCodeForEnter) {
+ if (keyCodeForEnter != '' || eventKeyCode == keyCodeForEnter) {
search = true;
}
if (search === true) {
-
- // temporization time to give time to type
+ // if a timer has been already started (search2_timer is a global js variable), we cancel it now
+ // we click onto another key, we will restart another timer just after
if (search2_timer) {
clearTimeout(search2_timer);
}
+ // temporization time to give time to type
search2_timer = setTimeout(function(){
-
pageproducts = 0;
jQuery(".wrapper2 .catwatermark").hide();
var nbsearchresults = 0;
@@ -695,8 +696,8 @@ function Search2(keyCodeForEnter, moreorless) {
if (data.length == 0) {
$('#search').val('load('errors');
- echo dol_escape_js($langs->trans("ErrorRecordNotFound"));
- ?>');
+ echo dol_escape_js($langs->transnoentitiesnoconv("ErrorRecordNotFoundShort"));
+ ?> ('+search_term+')');
$('#search').select();
}
else ClearSearch();