diff --git a/ChangeLog b/ChangeLog
index 6556db79da2..e685669f01d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,53 @@ English Dolibarr ChangeLog
--------------------------------------------------------------
+***** ChangeLog for 13.0.2 compared to 13.0.1 *****
+
+FIX: 11.0 - $this->socid injected in query without checking for empty value
+FIX: #16096 #16085 Any call of ajax pages must provide the token
+FIX: #16296
+FIX: #16325
+FIX: #16341 : Fetch the Product ExtraFields in Shippment lines
+FIX: #16366
+FIX: #16393 Do not sanitize
+FIX: #16420 #16423 #16488 #16477
+FIX: #16431
+FIX: #16465
+FIX: #16480
+FIX: #16485
+FIX: #16487
+FIX: #16503
+FIX: #16530
+FIX: #16533
+FIX: #16629
+FIX: #16671 Can not generate zip file of documents in backup tool
+FIX: Add "Now" link on social charges creation card
+FIX: avoid undefined url and missing token
+FIX: Bad project filter in ticket list
+FIX: Buttons to disable bindings not working
+FIX: class not found when creating recuring invoice from invoice+discount
+FIX: File attachment on lots
+FIX: handling $heightforinfotot when he's superior to a page height on Supplier Invoice
+FIX: hourglass and hide button to pay
+FIX: massaction validate invoice do not regenerate pdf
+FIX: missing mp4 video mime
+FIX: picto on shipment to reset qty to 0. Some quantities were not reset.
+FIX: Protection to avoid #16504
+FIX: rounding amount on card updating
+FIX: Rounding amount on social charges card updating
+FIX: select list dependencies now work for ModuleBuilder sellist field
+FIX: Status in popup of member in widget
+FIX: status on tooltip on widgets
+FIX: Timezone management for datetime on list of events
+FIX: Timezone management for datetime with modulebuilder and extrafields
+FIX: Total_ht not show in contract link element
+FIX: use post instead get
+FIX: use var "saved_url" instead global var "$url"
+FIX: Various payment - Missing fields for check transmitter & bank name
+FIX: warning if setup of chart of account is not yet done.
+FIX: wrong extension
+
+
***** ChangeLog for 13.0.1 compared to 13.0.0 *****
FIX: 10.0 before crediting a withdrawal receipt, check whether it has been credited already.
diff --git a/htdocs/admin/tools/export_files.php b/htdocs/admin/tools/export_files.php
index 6e0b0508a07..5ec1d5d56f7 100644
--- a/htdocs/admin/tools/export_files.php
+++ b/htdocs/admin/tools/export_files.php
@@ -113,7 +113,8 @@ $utils = new Utils($db);
if ($compression == 'zip')
{
$file .= '.zip';
- $ret = dol_compress_dir(DOL_DATA_ROOT, $outputdir."/".$file, $compression, '/(\.back|\.old|\.log|[\\\/]temp[\\\/]|documents[\\\/]admin[\\\/]documents[\\\/])/i');
+ $excludefiles = '/(\.back|\.old|\.log|[\/\\\]temp[\/\\\]|documents[\/\\\]admin[\/\\\]documents[\/\\\])/i';
+ $ret = dol_compress_dir(DOL_DATA_ROOT, $outputdir."/".$file, $compression, $excludefiles);
if ($ret < 0)
{
if ($ret == -2) {
diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php
index 6779adc60c6..73ea01bc3f8 100644
--- a/htdocs/comm/propal/card.php
+++ b/htdocs/comm/propal/card.php
@@ -285,6 +285,7 @@ if (empty($reshook))
} elseif ($action == 'setecheance' && $usercancreate)
{
$result = $object->set_echeance($user, dol_mktime(12, 0, 0, $_POST['echmonth'], $_POST['echday'], $_POST['echyear']));
+ $result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
if ($result < 0)
dol_print_error($db, $object->error);
} elseif ($action == 'setdate_livraison' && $usercancreate)
diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php
index a47e46401bd..f23a1ff6715 100644
--- a/htdocs/commande/class/commande.class.php
+++ b/htdocs/commande/class/commande.class.php
@@ -2240,6 +2240,7 @@ class Commande extends CommonOrder
$sql .= ' FROM '.MAIN_DB_PREFIX.'expedition as e';
$sql .= ', '.MAIN_DB_PREFIX.'element_element as el';
$sql .= ' WHERE el.fk_source = '.$this->id;
+ $sql .= " AND el.sourcetype = 'commande'";
$sql .= " AND el.fk_target = e.rowid";
$sql .= " AND el.targettype = 'shipping'";
diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php
index 63021eb3b07..7abd2c6a2b7 100644
--- a/htdocs/compta/bank/bankentries_list.php
+++ b/htdocs/compta/bank/bankentries_list.php
@@ -515,13 +515,17 @@ if ($search_description)
}
$sql .= natural_search("b.label", $search_description_to_use); // Warning some text are just translation keys, not translated strings
}
-if ($search_bid > 0) $sql .= " AND b.rowid=l.lineid AND l.fk_categ=".$search_bid;
-if (!empty($search_type)) $sql .= " AND b.fk_type = '".$db->escape($search_type)."' ";
+if ($search_bid > 0) $sql .= " AND b.rowid=l.lineid AND l.fk_categ=".((int) $search_bid);
+if (!empty($search_type)) $sql .= " AND b.fk_type = '".$db->escape($search_type)."'";
// Search criteria amount
-$search_debit = price2num(str_replace('-', '', $search_debit));
-$search_credit = price2num(str_replace('-', '', $search_credit));
-if ($search_debit) $sql .= natural_search('- b.amount', $search_debit, 1);
-if ($search_credit) $sql .= natural_search('b.amount', $search_credit, 1);
+if ($search_debit) {
+ $sql .= natural_search('ABS(b.amount)', $search_debit, 1);
+ $sql .= ' AND b.amount <= 0';
+}
+if ($search_credit) {
+ $sql .= natural_search('b.amount', $search_credit, 1);
+ $sql .= ' AND b.amount >= 0';
+}
// Add where from extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
diff --git a/htdocs/compta/paiement_charge.php b/htdocs/compta/paiement_charge.php
index 247f66b5acf..45ad2114368 100644
--- a/htdocs/compta/paiement_charge.php
+++ b/htdocs/compta/paiement_charge.php
@@ -247,7 +247,7 @@ if ($action == 'create')
print '