diff --git a/ChangeLog b/ChangeLog index f1679bbdfab..0d3f04d314f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,33 @@ English Dolibarr ChangeLog -------------------------------------------------------------- +***** ChangeLog for 10.0.5 compared to 10.0.4 ***** +FIX: 10.0: add URL param "restore_last_search_values=1" to all backlinks pointing to lists +FIX: 10.0: do not display single-letter values (indicating duration unit without value) in product list +FIX: #12473 +FIX: #12481 : fix ticket creation from thirdparty, mission $socid var +FIX: #12482 +FIX: #12644 +FIX: #12665 Mass invoice validation with stock management +FIX: #12688 +FIX: #12745 +FIX: add and modify category translate form with posted values on errors +FIX: add URL param "restore_last_search_values=1" to all backlinks that point to a list +FIX: CommandeFournisseurLigne update function must not be able to return other value than 1 if success +FIX: contact card state address selected after filling address +FIX: dol_string_nohtmltag when there is html with windows EOL "
\r\n" +FIX: filter language is an array +FIX: first col at wrong position in Export 2007 (new) +FIX: getrights() request +FIX: Invoice Situation integration into Margin +FIX: missing nl2br conversion +FIX: not fee in payout list +FIX: product_fourn_price_id was assigned too late for logPrice() function +FIX: Reduce number of request for list of products +FIX: set due date in object in create invoice +FIX: units traductions for selectUnits() function +FIX: when we need to bill several orders, order lines unit is not on bill lines +NEW: 9.0: allow users to use the mysqldump '--quick' option ***** ChangeLog for 11.0.0 compared to 10.0.0 ***** For Users: diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index 023b1f4b21d..8288db9d90b 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -308,7 +308,7 @@ if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND (a.fk_soc IS if ($socid > 0) $sql .= " AND s.rowid = ".$socid; // We must filter on assignement table if ($filtert > 0 || $usergroup > 0) $sql .= " AND ar.fk_actioncomm = a.id AND ar.element_type='user'"; -if ($type) $sql .= " AND c.id = ".$type; +if ($type) $sql .= " AND c.id = ".(int) $type; if ($status == '0') { $sql .= " AND a.percent = 0"; } if ($status == '-1') { $sql .= " AND a.percent = -1"; } // Not applicable if ($status == '50') { $sql .= " AND (a.percent > 0 AND a.percent < 100)"; } // Running already started diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php index e299b999a0e..c236266ce96 100644 --- a/htdocs/compta/bank/releve.php +++ b/htdocs/compta/bank/releve.php @@ -38,12 +38,15 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; +require_once DOL_DOCUMENT_ROOT.'/don/class/paymentdonation.class.php'; +require_once DOL_DOCUMENT_ROOT.'/loan/class/paymentloan.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/paymentvarious.class.php'; //show files require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; // Load translation files required by the page -$langs->loadLangs(array("banks", "categories", "companies", "bills", "trips")); +$langs->loadLangs(array("banks", "categories", "companies", "bills", "trips", "donations", "loan")); $action = GETPOST('action', 'alpha'); $id = GETPOST('account', 'int'); @@ -202,6 +205,9 @@ $paymentvatstatic = new TVA($db); $bankstatic = new Account($db); $banklinestatic = new AccountLine($db); $remisestatic = new RemiseCheque($db); +$paymentdonationstatic=new PaymentDonation($db); +$paymentloanstatic=new PaymentLoan($db); +$paymentvariousstatic=new PaymentVarious($db); // Must be before button action $param = ''; @@ -512,7 +518,28 @@ else print ''; $newline = 0; } - elseif ($links[$key]['type'] == 'banktransfert') { + elseif ($links[$key]['type']=='payment_donation') + { + $paymentdonationstatic->id=$links[$key]['url_id']; + $paymentdonationstatic->ref=$langs->trans("Payment"); + print ' '.$paymentdonationstatic->getNomUrl(1); + $newline = 0; + } + elseif ($links[$key]['type']=='payment_loan') + { + $paymentloanstatic->id=$links[$key]['url_id']; + $paymentloanstatic->ref=$langs->trans("Payment"); + print ' '.$paymentloanstatic->getNomUrl(1); + $newline = 0; + } + elseif ($links[$key]['type']=='payment_various') + { + $paymentvariousstatic->id=$links[$key]['url_id']; + $paymentvariousstatic->ref=$langs->trans("Payment"); + print ' '.$paymentvariousstatic->getNomUrl(1); + $newline = 0; + } + elseif ($links[$key]['type']=='banktransfert') { // Do not show link to transfer since there is no transfer card (avoid confusion). Can already be accessed from transaction detail. if ($objp->amount > 0) { diff --git a/htdocs/core/actions_addupdatedelete.inc.php b/htdocs/core/actions_addupdatedelete.inc.php index f5f0f822108..b30cc1a411d 100644 --- a/htdocs/core/actions_addupdatedelete.inc.php +++ b/htdocs/core/actions_addupdatedelete.inc.php @@ -142,8 +142,8 @@ if ($action == 'update' && !empty($permissiontoadd)) } else { $value = ''; } - } elseif (in_array($object->fields[$key]['type'], array('price', 'real'))) { - $value = price2num(GETPOST($key)); + } elseif (preg_match('/^(integer|price|real|double)/', $object->fields[$key]['type'])) { + $value = price2num(GETPOST($key, 'none')); // To fix decimal separator according to lang setup } else { $value = GETPOST($key, 'alpha'); } diff --git a/htdocs/core/class/html.formmargin.class.php b/htdocs/core/class/html.formmargin.class.php index 345a94b3a62..6857eddf44a 100644 --- a/htdocs/core/class/html.formmargin.class.php +++ b/htdocs/core/class/html.formmargin.class.php @@ -1,5 +1,5 @@ +/* Copyright (c) 2015-2019 Laurent Destailleur * * 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 @@ -98,7 +98,7 @@ class FormMargin $pv = $line->total_ht; $pa_ht = ($pv < 0 ? - $line->pa_ht : $line->pa_ht); // We choosed to have line->pa_ht always positive in database, so we guess the correct sign - if ($object->type == Facture::TYPE_SITUATION) { + if ($object->element == 'facture' && $object->type == $object::TYPE_SITUATION) { $pa = $line->qty * $pa_ht * ($line->situation_percent / 100); } else { $pa = $line->qty * $pa_ht; diff --git a/htdocs/fourn/class/api_supplier_invoices.class.php b/htdocs/fourn/class/api_supplier_invoices.class.php index ca712c456f9..21e5e82c13b 100644 --- a/htdocs/fourn/class/api_supplier_invoices.class.php +++ b/htdocs/fourn/class/api_supplier_invoices.class.php @@ -208,7 +208,7 @@ class SupplierInvoices extends DolibarrApi foreach($request_data as $field => $value) { $this->invoice->$field = $value; } - if(! array_keys($request_data, 'date')) { + if(! array_key_exists('date', $request_data)) { $this->invoice->date = dol_now(); } diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index bc9abb9753d..ac411f56f3e 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -1012,3 +1012,4 @@ ContactDefault_propal=Proposal ContactDefault_supplier_proposal=Supplier Proposal ContactDefault_ticketsup=Ticket ContactAddedAutomatically=Contact added from contact thirdparty roles +More=More diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index 6e9b6d66f32..7ee672f089b 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -56,7 +56,7 @@ Notify_BILL_SUPPLIER_PAYED=Vendor invoice paid Notify_BILL_SUPPLIER_SENTBYMAIL=Vendor invoice sent by mail Notify_BILL_SUPPLIER_CANCELED=Vendor invoice cancelled Notify_CONTRACT_VALIDATE=Contract validated -Notify_FICHEINTER_VALIDATE=Intervention validated +Notify_FICHINTER_VALIDATE=Intervention validated Notify_FICHINTER_ADD_CONTACT=Added contact to Intervention Notify_FICHINTER_SENTBYMAIL=Intervention sent by mail Notify_SHIPPING_VALIDATE=Shipping validated @@ -272,4 +272,4 @@ WEBSITE_KEYWORDS=Keywords LinesToImport=Lines to import MemoryUsage=Memory usage -RequestDuration=Duration of request \ No newline at end of file +RequestDuration=Duration of request diff --git a/htdocs/loan/card.php b/htdocs/loan/card.php index aeb4f77550b..ac27da29628 100644 --- a/htdocs/loan/card.php +++ b/htdocs/loan/card.php @@ -624,7 +624,7 @@ if ($id > 0) else { print ''; - print $langs->trans("LoanAccountancyCapitalCode"); + print $langs->trans("LoanAccountancyInsuranceCode"); print ''; if (!empty($conf->accounting->enabled)) diff --git a/htdocs/product/admin/product_tools.php b/htdocs/product/admin/product_tools.php index a3813963cc5..6a3f8a898eb 100644 --- a/htdocs/product/admin/product_tools.php +++ b/htdocs/product/admin/product_tools.php @@ -135,7 +135,7 @@ if ($action == 'convert') $newlevel=$level; //print "$objectstatic->id $newprice, $price_base_type, $newvat, $newminprice, $newlevel, $newnpr
\n"; - $retm=$objectstatic->updatePrice($newprice, $price_base_type, $user, $newvatratclean, $newminprice, $newlevel, $newnpr, 0, 0, $localtaxes_type, $newdefaultvatcode); + $retm=$objectstatic->updatePrice($newprice, $price_base_type, $user, $newvatrateclean, $newminprice, $newlevel, $newnpr, 0, 0, $localtaxes_type, $newdefaultvatcode); if ($retm < 0) { $error++; diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index ca0f8112fc1..ba143057b59 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -1876,6 +1876,9 @@ class Product extends CommonObject if (empty($newminprice)) { $newminprice = 0; } + if (empty($newminprice)) { + $newminprice=0; + } // Check parameters if ($newvat == '') { @@ -2677,7 +2680,7 @@ class Product extends CommonObject * Charge tableau des stats expedition client pour le produit/service * * @param int $socid Id societe pour filtrer sur une societe - * @param string $filtrestatut Id statut pour filtrer sur un statut + * @param string $filtrestatut [=''] Ids order status separated by comma * @param int $forVirtualStock Ignore rights filter for virtual stock calculation. * @param string $filterShipmentStatus [=''] Ids shipment status separated by comma * @return int <0 if KO, >0 if OK (Tableau des stats) diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php index 48d336e8ace..c107693b8c6 100644 --- a/htdocs/product/reassort.php +++ b/htdocs/product/reassort.php @@ -122,7 +122,8 @@ $sql .= ' p.duration, p.tosell as statut, p.tobuy, p.seuil_stock_alerte, p.desir $sql .= ' SUM(s.reel) as stock_physique'; if (!empty($conf->global->PRODUCT_USE_UNITS)) $sql .= ', u.short_label as unit_short'; $sql .= ' FROM '.MAIN_DB_PREFIX.'product as p'; -$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_stock as s on p.rowid = s.fk_product'; +$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_stock as s ON p.rowid = s.fk_product'; +$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'entrepot as e ON s.fk_entrepot = e.rowid AND e.entity IN ('.getEntity('entrepot').')'; if (!empty($conf->global->PRODUCT_USE_UNITS)) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_units as u on p.fk_unit = u.rowid'; // We'll need this table joined to the select in order to filter by categ if ($search_categ) $sql .= ", ".MAIN_DB_PREFIX."categorie_product as cp"; diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 777c0dcb360..1cb88b47a28 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -463,7 +463,7 @@ $listofreferent = array( 'table'=>'projet_task', 'datefieldname'=>'task_date', 'disableamount'=>0, - 'urlnew'=>DOL_URL_ROOT.'/projet/tasks/time.php?id='.$id, + 'urlnew'=>DOL_URL_ROOT.'/projet/tasks/time.php?withproject=1&action=createtime&projectid='.$id, 'buttonnew'=>'AddTimeSpent', 'testnew'=>$user->rights->projet->creer, 'test'=>($conf->projet->enabled && $user->rights->projet->lire && empty($conf->global->PROJECT_HIDE_TASKS))), @@ -538,7 +538,7 @@ if ($action=="addelement") elseif ($action == "unlink") { $tablename = GETPOST("tablename", "aZ09"); - $projectField = GETPOST('projectfield', 'aZ09') ? GETPOST('projectfield', 'aZ09') : 'fk_projet'; + $projectField = GETPOSTISSET('projectfield') ? GETPOST('projectfield', 'aZ09') : 'fk_projet'; $elementselectid = GETPOST("elementselect", "int"); $result = $object->remove_element($tablename, $elementselectid, $projectField); diff --git a/htdocs/salaries/card.php b/htdocs/salaries/card.php index 798ef8dab4a..39f7fee3397 100644 --- a/htdocs/salaries/card.php +++ b/htdocs/salaries/card.php @@ -44,7 +44,7 @@ if (! empty($conf->projet->enabled)) $langs->load("projects"); $id = GETPOST("id", 'int'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); -$accountid = GETPOST("accountid", 'int'); +$accountid = GETPOST('accountid', 'int') > 0 ? GETPOST('accountid', 'int') : 0; $projectid = (GETPOST('projectid', 'int') ? GETPOST('projectid', 'int') : GETPOST('fk_project', 'int')); $datep = dol_mktime(12, 0, 0, GETPOST("datepmonth", 'int'), GETPOST("datepday", 'int'), GETPOST("datepyear", 'int'));