diff --git a/htdocs/bom/class/api_boms.class.php b/htdocs/bom/class/api_boms.class.php index f9b1a7257de..a80f295e755 100644 --- a/htdocs/bom/class/api_boms.class.php +++ b/htdocs/bom/class/api_boms.class.php @@ -471,7 +471,7 @@ class Boms extends DolibarrApi throw new RestException(500, 'Line to delete (rowid: '.$lineid.') is not a line of BOM (id: '.$this->bom->id.')'); } - $updateRes = $this->bom->deleteline(DolibarrApiAccess::$user, $lineid); + $updateRes = $this->bom->deleteLine(DolibarrApiAccess::$user, $lineid); if ($updateRes > 0) { return $this->get($id); } else { diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index a0a2a5a4c5f..408d13837ab 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -258,7 +258,7 @@ if (empty($reshook)) { } } elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $usercancreate) { // Remove line - $result = $object->deleteline($lineid); + $result = $object->deleteLine($lineid); // reorder lines if ($result > 0) { $object->line_order(true); diff --git a/htdocs/comm/propal/class/api_proposals.class.php b/htdocs/comm/propal/class/api_proposals.class.php index f280a7657a3..762027e1475 100644 --- a/htdocs/comm/propal/class/api_proposals.class.php +++ b/htdocs/comm/propal/class/api_proposals.class.php @@ -567,7 +567,7 @@ class Proposals extends DolibarrApi throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } - $updateRes = $this->propal->deleteline($lineid, $id); + $updateRes = $this->propal->deleteLine($lineid, $id); if ($updateRes > 0) { return $this->get($id); } else { diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index a433e6b85e6..a016555e3a4 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -1016,7 +1016,7 @@ class Propal extends CommonObject * @param int $id Id of object (for a check) * @return int >0 if OK, <0 if KO */ - public function deleteline($lineid, $id = 0) + public function deleteLine($lineid, $id = 0) { global $user; diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index cae96460a93..f3881a10aff 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -233,7 +233,7 @@ if (empty($reshook)) { } } elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $usercancreate) { // Remove a product line - $result = $object->deleteline($user, $lineid); + $result = $object->deleteLine($user, $lineid); if ($result > 0) { // reorder lines $object->line_order(true); diff --git a/htdocs/commande/class/api_orders.class.php b/htdocs/commande/class/api_orders.class.php index 8fd80322c00..2e6ed740f7c 100644 --- a/htdocs/commande/class/api_orders.class.php +++ b/htdocs/commande/class/api_orders.class.php @@ -485,7 +485,7 @@ class Orders extends DolibarrApi throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } - $updateRes = $this->commande->deleteline(DolibarrApiAccess::$user, $lineid, $id); + $updateRes = $this->commande->deleteLine(DolibarrApiAccess::$user, $lineid, $id); if ($updateRes > 0) { return $this->get($id); } else { diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index f8226634cf0..dc4df918c7b 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -2392,7 +2392,7 @@ class Commande extends CommonOrder * @param int $id Id of object (for a check) * @return int >0 if OK, 0 if nothing to do, <0 if KO */ - public function deleteline($user = null, $lineid = 0, $id = 0) + public function deleteLine($user = null, $lineid = 0, $id = 0) { if ($this->statut == self::STATUS_DRAFT) { $this->db->begin(); diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 55f4876fee2..bdd079d5163 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -276,7 +276,7 @@ if (empty($reshook)) { $object->fetch($id); $object->fetch_thirdparty(); - $result = $object->deleteline(GETPOST('lineid', 'int')); + $result = $object->deleteLine(GETPOST('lineid', 'int')); if ($result > 0) { // reorder lines $object->line_order(true); diff --git a/htdocs/compta/facture/class/api_invoices.class.php b/htdocs/compta/facture/class/api_invoices.class.php index 602ea69f691..d118bdfcbb1 100644 --- a/htdocs/compta/facture/class/api_invoices.class.php +++ b/htdocs/compta/facture/class/api_invoices.class.php @@ -623,7 +623,7 @@ class Invoices extends DolibarrApi throw new RestException(404, 'Invoice not found'); } - $updateRes = $this->invoice->deleteline($lineid, $id); + $updateRes = $this->invoice->deleteLine($lineid, $id); if ($updateRes > 0) { return $this->get($id); } else { diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index ad43e7e250a..058b4441967 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -539,7 +539,7 @@ class Facture extends CommonInvoice } $this->entity = $_facrec->entity; // Invoice created in same entity than template - // Fields coming from GUI (priority on template). + // Fields coming from GUI. // @TODO Value of template should be used as default value on the form on the GUI, and we should here always use the value from GUI // set by posted page wth $object->xxx = ... and this section should be removed. $this->fk_project = GETPOST('projectid', 'int') > 0 ? GETPOSTINT('projectid') : $_facrec->fk_project; @@ -4353,7 +4353,7 @@ class Facture extends CommonInvoice * @param int $id Id of object (for a check) * @return int Return integer <0 if KO, >0 if OK */ - public function deleteline($rowid, $id = 0) + public function deleteLine($rowid, $id = 0) { global $user; diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 065a2bcf45f..b5440c221b5 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -822,7 +822,7 @@ if (empty($reshook)) { $db->rollback(); } } elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->hasRight('contrat', 'creer')) { - $result = $object->deleteline(GETPOST('lineid', 'int'), $user); + $result = $object->deleteLine(GETPOST('lineid', 'int'), $user); if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); diff --git a/htdocs/contrat/class/api_contracts.class.php b/htdocs/contrat/class/api_contracts.class.php index 64989ffb8a0..7fac4926b1a 100644 --- a/htdocs/contrat/class/api_contracts.class.php +++ b/htdocs/contrat/class/api_contracts.class.php @@ -469,7 +469,7 @@ class Contracts extends DolibarrApi // TODO Check the lineid $lineid is a line of object - $updateRes = $this->contract->deleteline($lineid, DolibarrApiAccess::$user); + $updateRes = $this->contract->deleteLine($lineid, DolibarrApiAccess::$user); if ($updateRes > 0) { return $this->get($id); } else { diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index e5a54c9b119..6c59e720d64 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -1886,10 +1886,8 @@ class Contrat extends CommonObject * @param User $user User that delete * @return int >0 if OK, <0 if KO */ - public function deleteline($idline, User $user) + public function deleteLine($idline, User $user) { - global $conf, $langs; - $error = 0; if ($this->statut >= 0) { diff --git a/htdocs/core/actions_addupdatedelete.inc.php b/htdocs/core/actions_addupdatedelete.inc.php index ccfe263026a..91e1b34dc5d 100644 --- a/htdocs/core/actions_addupdatedelete.inc.php +++ b/htdocs/core/actions_addupdatedelete.inc.php @@ -56,6 +56,7 @@ if ($cancel) { // Action to add record if ($action == 'add' && !empty($permissiontoadd)) { foreach ($object->fields as $key => $val) { + // Ignore special cases if ($object->fields[$key]['type'] == 'duration') { if (GETPOST($key.'hour') == '' && GETPOST($key.'min') == '') { continue; // The field was not submitted to be saved @@ -65,6 +66,7 @@ if ($action == 'add' && !empty($permissiontoadd)) { continue; // The field was not submitted to be saved } } + // Ignore special fields if (in_array($key, array('rowid', 'entity', 'import_key'))) { continue; @@ -149,6 +151,12 @@ if ($action == 'add' && !empty($permissiontoadd)) { } } + // Special field + $model_pdf = GETPOST('model'); + if (!empty($model_pdf) && property_exists($this, 'model_pdf')) { + $object->model_pdf = $model_pdf; + } + // Fill array 'array_options' with data from add form if (!$error) { $ret = $extrafields->setOptionalsFromPost(null, $object, '', 1); @@ -422,11 +430,13 @@ if ($action == 'confirm_delete' && !empty($permissiontodelete)) { // Remove a line if ($action == 'confirm_deleteline' && $confirm == 'yes' && !empty($permissiontoadd)) { - if (method_exists($object, 'deleteline')) { - $result = $object->deleteline($user, $lineid); // For backward compatibility + if (!empty($object->element) && $object->element == 'mo') { + $fk_movement = GETPOSTINT('fk_movement'); + $result = $object->deleteLine($user, $lineid, 0, $fk_movement); } else { $result = $object->deleteLine($user, $lineid); } + if ($result > 0) { // Define output language $outputlangs = $langs; diff --git a/htdocs/delivery/class/delivery.class.php b/htdocs/delivery/class/delivery.class.php index 37c5f3a0a17..edc90dfda22 100644 --- a/htdocs/delivery/class/delivery.class.php +++ b/htdocs/delivery/class/delivery.class.php @@ -657,7 +657,7 @@ class Delivery extends CommonObject * @param int $lineid Line id * @return integer Return integer <0 if KO, 0 if nothing done, >0 if OK */ - public function deleteline($lineid) + public function deleteLine($lineid) { if ($this->statut == 0) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."commandedet"; diff --git a/htdocs/expedition/class/api_shipments.class.php b/htdocs/expedition/class/api_shipments.class.php index e5cf55742c1..fe3c778153f 100644 --- a/htdocs/expedition/class/api_shipments.class.php +++ b/htdocs/expedition/class/api_shipments.class.php @@ -408,7 +408,7 @@ class Shipments extends DolibarrApi // TODO Check the lineid $lineid is a line of object - $updateRes = $this->shipment->deleteline(DolibarrApiAccess::$user, $lineid); + $updateRes = $this->shipment->deleteLine(DolibarrApiAccess::$user, $lineid); if ($updateRes > 0) { return $this->get($id); } else { diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 105cccb1af8..cb627539943 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -1769,7 +1769,7 @@ class Expedition extends CommonObject * @param int $lineid Id of line to delete * @return int >0 if OK, <0 if KO */ - public function deleteline($user, $lineid) + public function deleteLine($user, $lineid) { global $user; diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index 8ed2b44f37d..86a661d59c2 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -1247,7 +1247,7 @@ if (empty($reshook)) { $total_ht = $object_ligne->total_ht; $total_tva = $object_ligne->total_tva; - $result = $object->deleteline(GETPOST("rowid", 'int'), $user); + $result = $object->deleteLine(GETPOST("rowid", 'int'), $user); if ($result >= 0) { if ($result > 0) { // Define output language diff --git a/htdocs/expensereport/class/api_expensereports.class.php b/htdocs/expensereport/class/api_expensereports.class.php index 3fb000275bb..27f7601e9ef 100644 --- a/htdocs/expensereport/class/api_expensereports.class.php +++ b/htdocs/expensereport/class/api_expensereports.class.php @@ -386,7 +386,7 @@ class ExpenseReports extends DolibarrApi // TODO Check the lineid $lineid is a line of object - $updateRes = $this->expensereport->deleteline($lineid); + $updateRes = $this->expensereport->deleteLine($lineid); if ($updateRes == 1) { return $this->get($id); } diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index da62de7ecfc..020e888aab6 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -2291,7 +2291,7 @@ class ExpenseReport extends CommonObject * @param int $notrigger 1=No trigger * @return int Return integer <0 if KO, >0 if OK */ - public function deleteline($rowid, $fuser = '', $notrigger = 0) + public function deleteLine($rowid, $fuser = '', $notrigger = 0) { $error=0; diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index 2843ad4a794..971eea5a1eb 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -663,7 +663,7 @@ if (empty($reshook)) { dol_print_error($db); exit; } - $result = $objectline->deleteline($user); + $result = $objectline->deleteLine($user); if ($object->fetch($objectline->fk_fichinter) <= 0) { dol_print_error($db); diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index 6f335747756..e5c60461bae 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -1907,7 +1907,7 @@ class FichinterLigne extends CommonObjectLine * @param int $notrigger Disable all triggers * @return int >0 if ok, <0 if ko */ - public function deleteline($user, $notrigger = 0) + public function deleteLine($user, $notrigger = 0) { $error = 0; diff --git a/htdocs/fourn/class/api_supplier_invoices.class.php b/htdocs/fourn/class/api_supplier_invoices.class.php index 2c6251a1249..d205275b238 100644 --- a/htdocs/fourn/class/api_supplier_invoices.class.php +++ b/htdocs/fourn/class/api_supplier_invoices.class.php @@ -702,7 +702,7 @@ class SupplierInvoices extends DolibarrApi // TODO Check the lineid $lineid is a line of object - $updateRes = $this->invoice->deleteline($lineid); + $updateRes = $this->invoice->deleteLine($lineid); if ($updateRes > 0) { return $this->get($id); } else { diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 4f4a06dc512..14bd62e50f6 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -2315,7 +2315,7 @@ class CommandeFournisseur extends CommonOrder * @param int $notrigger 1=Disable call to triggers * @return int Return integer <0 if KO, >0 if OK */ - public function deleteline($idline, $notrigger = 0) + public function deleteLine($idline, $notrigger = 0) { if ($this->statut == 0) { $line = new CommandeFournisseurLigne($this->db); @@ -3568,7 +3568,7 @@ class CommandeFournisseur extends CommonOrder if (count($diff_array) == 0 && count($keysinwishednotindelivered) == 0 && count($keysindeliverednotinwished) == 0) { //No diff => mean everything is received if ($closeopenorder) { //$ret=$this->setStatus($user,5); - $ret = $this->Livraison($user, $date_liv, 'tot', $comment); // GETPOST("type") is 'tot', 'par', 'nev', 'can' + $ret = $this->Livraison($user, $date_liv, 'tot', $comment); // $type is 'tot', 'par', 'nev', 'can' if ($ret < 0) { return -1; } @@ -3576,7 +3576,7 @@ class CommandeFournisseur extends CommonOrder } else { //Diff => received partially //$ret=$this->setStatus($user,4); - $ret = $this->Livraison($user, $date_liv, 'par', $comment); // GETPOST("type") is 'tot', 'par', 'nev', 'can' + $ret = $this->Livraison($user, $date_liv, 'par', $comment); // $type is 'tot', 'par', 'nev', 'can' if ($ret < 0) { return -1; } @@ -3603,14 +3603,14 @@ class CommandeFournisseur extends CommonOrder if ($close == count($diff_array)) { //all the products are received equal or more than the wished quantity if ($closeopenorder) { - $ret = $this->Livraison($user, $date_liv, 'tot', $comment); // GETPOST("type") is 'tot', 'par', 'nev', 'can' + $ret = $this->Livraison($user, $date_liv, 'tot', $comment); // $type is 'tot', 'par', 'nev', 'can' if ($ret < 0) { return -1; } return 5; } else { //Diff => received partially - $ret = $this->Livraison($user, $date_liv, 'par', $comment); // GETPOST("type") is 'tot', 'par', 'nev', 'can' + $ret = $this->Livraison($user, $date_liv, 'par', $comment); // $type is 'tot', 'par', 'nev', 'can' if ($ret < 0) { return -1; } @@ -3618,7 +3618,7 @@ class CommandeFournisseur extends CommonOrder } } else { //all the products are not received - $ret = $this->Livraison($user, $date_liv, 'par', $comment); // GETPOST("type") is 'tot', 'par', 'nev', 'can' + $ret = $this->Livraison($user, $date_liv, 'par', $comment); // $type is 'tot', 'par', 'nev', 'can' if ($ret < 0) { return -1; } @@ -3626,7 +3626,7 @@ class CommandeFournisseur extends CommonOrder } } else { //Diff => received partially - $ret = $this->Livraison($user, $date_liv, 'par', $comment); // GETPOST("type") is 'tot', 'par', 'nev', 'can' + $ret = $this->Livraison($user, $date_liv, 'par', $comment); // $type is 'tot', 'par', 'nev', 'can' if ($ret < 0) { return -1; } diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 3f8e6d61705..4bbf1d5c79c 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -429,7 +429,9 @@ class FactureFournisseur extends CommonInvoice $this->entity = $_facrec->entity; // Invoice created in same entity than template - // Fields coming from GUI (priority on template). TODO Value of template should be used as default value on GUI so we can use here always value from GUI + // Fields coming from GUI + // @TODO Value of template should be used as default value on the form on the GUI, and we should here always use the value from GUI + // set by posted page wth $object->xxx = ... and this section should be removed. $this->fk_project = GETPOST('projectid', 'int') > 0 ? ((int) GETPOST('projectid', 'int')) : $_facrec->fk_project; $this->note_public = GETPOST('note_public', 'restricthtml') ? GETPOST('note_public', 'restricthtml') : $_facrec->note_public; $this->note_private = GETPOST('note_private', 'restricthtml') ? GETPOST('note_private', 'restricthtml') : $_facrec->note_private; @@ -2489,7 +2491,7 @@ class FactureFournisseur extends CommonInvoice * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int Return integer <0 if KO, >0 if OK */ - public function deleteline($rowid, $notrigger = 0) + public function deleteLine($rowid, $notrigger = 0) { if (!$rowid) { $rowid = $this->id; diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 5bd59060ce8..1134d10caaf 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -888,7 +888,7 @@ if (empty($reshook)) { if ($action == 'confirm_deleteline' && $confirm == 'yes' && $usercancreate) { $db->begin(); - $result = $object->deleteline($lineid); + $result = $object->deleteLine($lineid); if ($result > 0) { // reorder lines $object->line_order(true); diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 01ddb66dc6e..cb360b2749b 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -309,7 +309,7 @@ if (empty($reshook)) { } } elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $usercancreate) { // Remove a product line - $result = $object->deleteline($lineid); + $result = $object->deleteLine($lineid); if ($result > 0) { // reorder lines $object->line_order(true); diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php index a950f4f9f57..fe178496f87 100644 --- a/htdocs/mrp/class/mo.class.php +++ b/htdocs/mrp/class/mo.class.php @@ -18,7 +18,7 @@ */ /** - * \file class/mo.class.php + * \file mrp/class/mo.class.php * \ingroup mrp * \brief This file is a CRUD class file for Mo (Create/Read/Update/Delete) */ @@ -27,6 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/commonobjectline.class.php'; + /** * Class for Mo */ @@ -877,12 +878,13 @@ class Mo extends CommonObject /** * Delete a line of object in database * - * @param User $user User that delete - * @param int $idline Id of line to delete - * @param int $notrigger 0=launch triggers after, 1=disable triggers - * @return int >0 if OK, <0 if KO + * @param User $user User that delete + * @param int $idline Id of line to delete + * @param int $notrigger 0=launch triggers after, 1=disable triggers + * @param int $fk_movement Movement + * @return int Return >0 if OK, <0 if KO */ - public function deleteLine(User $user, $idline, $notrigger = 0) + public function deleteLine(User $user, $idline, $notrigger = 0, $fk_movement = 0) { global $langs; $langs->loadLangs(array('stocks', 'mrp')); @@ -892,7 +894,6 @@ class Mo extends CommonObject return -2; } $productstatic = new Product($this->db); - $fk_movement = GETPOST('fk_movement', 'int'); $arrayoflines = $this->fetchLinesLinked('consumed', $idline); if (!empty($arrayoflines)) { diff --git a/htdocs/mrp/mo_movements.php b/htdocs/mrp/mo_movements.php index 9cbea212d8e..fdb3a0a8366 100644 --- a/htdocs/mrp/mo_movements.php +++ b/htdocs/mrp/mo_movements.php @@ -599,13 +599,21 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; - $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')); // This also change content of $arrayfields + $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); print '
| '; + $searchpicto = $form->showFilterAndCheckAddButtons(0); + print $searchpicto; + print ' | '; + } if (!empty($arrayfields['m.rowid']['checked'])) { // Ref print ''; @@ -733,16 +741,23 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ' | '; } // Actions - print ''; - $searchpicto = $form->showFilterAndCheckAddButtons(0); - print $searchpicto; - print ' | '; + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + $searchpicto = $form->showFilterAndCheckAddButtons(0); + print $searchpicto; + print ' | '; + } print "
| '; + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined + $selected = 0; + if (in_array($objp->rowid, $arrayofselected)) { + $selected = 1; + } + print ''; + } + print ' | '; + if (!$i) { + $totalarray['nbfield']++; + } + } // Id movement if (!empty($arrayfields['m.rowid']['checked'])) { // This is primary not movement id @@ -992,17 +1025,19 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''; } // Action column - print ''; - if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - $selected = 0; - if (in_array($objp->rowid, $arrayofselected)) { - $selected = 1; + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ' | '; + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined + $selected = 0; + if (in_array($objp->rowid, $arrayofselected)) { + $selected = 1; + } + print ''; + } + print ' | '; + if (!$i) { + $totalarray['nbfield']++; } - print ''; - } - print ''; - if (!$i) { - $totalarray['nbfield']++; } print "