diff --git a/htdocs/admin/emailcollector_list.php b/htdocs/admin/emailcollector_list.php index d44f96e0877..98dcfd592a2 100644 --- a/htdocs/admin/emailcollector_list.php +++ b/htdocs/admin/emailcollector_list.php @@ -393,7 +393,7 @@ foreach ($object->fields as $key => $val) if (!empty($arrayfields['t.'.$key]['checked'])) { print ''; - if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth75'); + if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); elseif (strpos($val['type'], 'integer:') === 0) { print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth150', 1); } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) print ''; diff --git a/htdocs/admin/mails_senderprofile_list.php b/htdocs/admin/mails_senderprofile_list.php index 16ae12ffcc5..b9299a5c58b 100644 --- a/htdocs/admin/mails_senderprofile_list.php +++ b/htdocs/admin/mails_senderprofile_list.php @@ -474,7 +474,7 @@ foreach ($object->fields as $key => $val) if (!empty($arrayfields['t.'.$key]['checked'])) { print ''; - if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth75'); + if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); elseif (strpos($val['type'], 'integer:') === 0) { print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth150', 1); } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) print ''; diff --git a/htdocs/asset/list.php b/htdocs/asset/list.php index d9bfea71510..ef3ea4ce975 100644 --- a/htdocs/asset/list.php +++ b/htdocs/asset/list.php @@ -386,7 +386,7 @@ foreach ($object->fields as $key => $val) if (!empty($arrayfields['t.'.$key]['checked'])) { print ''; - if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth75'); + if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); elseif (strpos($val['type'], 'integer:') === 0) { print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth150', 1); } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) print ''; diff --git a/htdocs/bom/bom_list.php b/htdocs/bom/bom_list.php index 121517b2544..7687ab250ac 100644 --- a/htdocs/bom/bom_list.php +++ b/htdocs/bom/bom_list.php @@ -85,7 +85,7 @@ $search_all = GETPOST("search_all", 'alpha'); $search = array(); foreach ($object->fields as $key => $val) { - if (GETPOST('search_'.$key, 'alpha')) $search[$key] = GETPOST('search_'.$key, 'alpha'); + if (GETPOST('search_'.$key, 'alpha') !== '') $search[$key] = GETPOST('search_'.$key, 'alpha'); } // List of fields to search into when doing a "search in all" @@ -311,6 +311,7 @@ foreach ($search as $key => $val) } if ($search[$key] != '') $sql .= natural_search($key, $search[$key], (($key == 'status') ? 2 : $mode_search)); } + if ($search_all) $sql .= natural_search(array_keys($fieldstosearchall), $search_all); // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; @@ -485,7 +486,7 @@ foreach ($object->fields as $key => $val) if (!empty($arrayfields['t.'.$key]['checked'])) { print ''; - if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth75'); + if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); elseif (strpos($val['type'], 'integer:') === 0) { print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth150', 1); } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) print ''; diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index eaf944ff968..cb9e06a5549 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -844,14 +844,14 @@ if ($resql) -3=>$langs->trans("StatusOrderValidatedShort").'+'.$langs->trans("StatusOrderSentShort").'+'.$langs->trans("StatusOrderDelivered"), Commande::STATUS_CANCELED=>$langs->trans("StatusOrderCanceledShort") ); - print $form->selectarray('search_status', $liststatus, $search_status, -4, 0, 0, '', 0, 0, 0, '', 'maxwidth100'); + print $form->selectarray('search_status', $liststatus, $search_status, -4, 0, 0, '', 0, 0, 0, '', 'maxwidth100', 1); print ''; } // Status billed if (!empty($arrayfields['c.facture']['checked'])) { print ''; - print $form->selectyesno('search_billed', $search_billed, 1, 0, 1); + print $form->selectyesno('search_billed', $search_billed, 1, 0, 1, 1); print ''; } // Action column diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index e77f4386de9..0558f097121 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -839,7 +839,7 @@ if ($resql) $moreforfilter .= '
'; $moreforfilter .= $langs->trans('RubriquesTransactions').' : '; $cate_arbo = $form->select_all_categories(Categorie::TYPE_BANK_LINE, $search_bid, 'parent', null, null, 1); - $moreforfilter .= $form->selectarray('search_bid', $cate_arbo, $search_bid, 1); + $moreforfilter .= $form->selectarray('search_bid', $cate_arbo, $search_bid, 1, 0, 0, '', 0, 0, 0, '', '', 1); $moreforfilter .= '
'; } } @@ -940,7 +940,7 @@ if ($resql) if (!empty($arrayfields['b.conciliated']['checked'])) { print ''; - print $form->selectyesno('search_conciliated', $search_conciliated, 1, false, 1); + print $form->selectyesno('search_conciliated', $search_conciliated, 1, false, 1, 1); print ''; } print ''; diff --git a/htdocs/compta/bank/categ.php b/htdocs/compta/bank/categ.php index 18b75bdea9b..fd286266a21 100644 --- a/htdocs/compta/bank/categ.php +++ b/htdocs/compta/bank/categ.php @@ -43,9 +43,12 @@ $bankcateg = new BankCateg($db); $categid = GETPOST('categid'); $label = GETPOST("label"); + + /* - * Add category + * Actions */ + if (GETPOST('add')) { if ($label) { @@ -95,14 +98,17 @@ print ''; print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table print ''; print ''; -print ''; +print ''; +print ''; +print ''; print "\n"; // Line to add category if ($action != 'edit') { print ''; - print ''; + print ''; + print ''; print ''; print ''; } @@ -111,7 +117,7 @@ if ($action != 'edit') $sql = "SELECT rowid, label"; $sql .= " FROM ".MAIN_DB_PREFIX."bank_categ"; $sql .= " WHERE entity = ".$conf->entity; -$sql .= " ORDER BY label"; +$sql .= " ORDER BY rowid"; $result = $db->query($sql); if ($result) @@ -124,16 +130,19 @@ if ($result) $objp = $db->fetch_object($result); print ''; - print ''; + print ''; if (GETPOST('action', 'aZ09') == 'edit' && GETPOST("categid") == $objp->rowid) { - print ""; } else { - print ""; + print ""; + print ''; print ''; } // Balance @@ -419,7 +416,7 @@ print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $ print "\n"; -$total = array(); $found = 0; $i = 0; $lastcurrencycode = ''; +$totalarray = array(); $found = 0; $i = 0; $lastcurrencycode = ''; foreach ($accounts as $key=>$type) { diff --git a/htdocs/compta/cashcontrol/cashcontrol_list.php b/htdocs/compta/cashcontrol/cashcontrol_list.php index 2adf3a01a83..b41e46aff76 100644 --- a/htdocs/compta/cashcontrol/cashcontrol_list.php +++ b/htdocs/compta/cashcontrol/cashcontrol_list.php @@ -390,7 +390,7 @@ foreach ($object->fields as $key => $val) if (!empty($arrayfields['t.'.$key]['checked'])) { print ''; } diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index e12e21e70b4..9a871514215 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -1056,7 +1056,7 @@ if ($resql) { print ''; } // Action column diff --git a/htdocs/compta/sociales/list.php b/htdocs/compta/sociales/list.php index c4910e431e5..03c103769a3 100644 --- a/htdocs/compta/sociales/list.php +++ b/htdocs/compta/sociales/list.php @@ -322,7 +322,7 @@ if (!empty($arrayfields['cs.amount']['checked'])) { if (!empty($arrayfields['cs.paye']['checked'])) { print ''; } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 21557734328..f30e8e327ae 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3893,6 +3893,7 @@ class Form $i++; } print ""; + print ajax_combobox('select'.$htmlname); } else { if ($status == 0) print ''.$langs->trans("NoActiveBankAccountDefined").''; else print ''.$langs->trans("NoBankAccountFound").''; @@ -7109,9 +7110,10 @@ class Form * @param int $option 0 return yes/no, 1 return 1/0 * @param bool $disabled true or false * @param int $useempty 1=Add empty line + * @param int $addjscombo 1=Add js beautifier on combo box * @return string See option */ - public function selectyesno($htmlname, $value = '', $option = 0, $disabled = false, $useempty = 0) + public function selectyesno($htmlname, $value = '', $option = 0, $disabled = false, $useempty = 0, $addjscombo = 0) { global $langs; @@ -7136,6 +7138,11 @@ class Form $resultyesno .= ''."\n"; } $resultyesno .= ''."\n"; + + if ($addjscombo) { + $resultyesno .= ajax_combobox($htmlname); + } + return $resultyesno; } diff --git a/htdocs/core/class/html.formexpensereport.class.php b/htdocs/core/class/html.formexpensereport.class.php index e8079b77ed6..516c6e4b59c 100644 --- a/htdocs/core/class/html.formexpensereport.class.php +++ b/htdocs/core/class/html.formexpensereport.class.php @@ -65,7 +65,7 @@ class FormExpenseReport $tmpep = new ExpenseReport($this->db); - print ''; if ($useempty) print ''; $arrayoflabels = $tmpep->statuts; if ($useshortlabel) $arrayoflabels = $tmpep->statuts_short; @@ -81,6 +81,7 @@ class FormExpenseReport print ''; } print ''; + print ajax_combobox($htmlname); } /** diff --git a/htdocs/core/class/html.formorder.class.php b/htdocs/core/class/html.formorder.class.php index d3dbe27ceac..1dcac0023c4 100644 --- a/htdocs/core/class/html.formorder.class.php +++ b/htdocs/core/class/html.formorder.class.php @@ -62,7 +62,7 @@ class FormOrder extends Form $options[$value] = $tmpsupplierorder->getLibStatut($short); } - print Form::selectarray($hmlname, $options, $selected, 1); + print Form::selectarray($hmlname, $options, $selected, 1, 0, 0, '', 0, 0, 0, '', '', 1); } /** diff --git a/htdocs/core/class/html.formpropal.class.php b/htdocs/core/class/html.formpropal.class.php index e1653444960..730133eae27 100644 --- a/htdocs/core/class/html.formpropal.class.php +++ b/htdocs/core/class/html.formpropal.class.php @@ -102,7 +102,7 @@ class FormPropal } } - print ''; if ($showempty) print ''; foreach ($listofstatus as $key => $obj) @@ -135,5 +135,7 @@ class FormPropal $i++; } print ''; + + print ajax_combobox($htmlname); } } diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index fb2e18a0de2..830d391ad9c 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -977,7 +977,7 @@ if ($resql) if (!empty($arrayfields['cf.billed']['checked'])) { print ''; } // Action column diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 2a63e040434..ff2da87d716 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -859,7 +859,7 @@ if ($resql) { print ''; } // Action column diff --git a/htdocs/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php index b1ec021e774..8959fc7a788 100644 --- a/htdocs/modulebuilder/template/myobject_list.php +++ b/htdocs/modulebuilder/template/myobject_list.php @@ -444,7 +444,7 @@ foreach ($object->fields as $key => $val) if (!empty($arrayfields['t.'.$key]['checked'])) { print ''; } + // Lines to consume + if (!empty($object->lines)) { $nblinetoconsume = 0; @@ -745,7 +746,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } print ''; - print ''; + print ''; print '
'.$langs->trans("Ref").''.$langs->trans("Label").''.$langs->trans("Ref").''.$langs->trans("Label").'
  
'.$objp->rowid.''.$objp->rowid.'"; + print ''; print ''; print ''; print ''; print "".$objp->label."".$objp->label."'; + //print ''.$langs->trans("List").''; + print ''; print ''.img_edit().''; print ''.img_delete().''; diff --git a/htdocs/compta/bank/list.php b/htdocs/compta/bank/list.php index 9c67897e18d..4e3653d2ea4 100644 --- a/htdocs/compta/bank/list.php +++ b/htdocs/compta/bank/list.php @@ -217,24 +217,21 @@ if ($resql) $help_url = 'EN:Module_Banks_and_Cash|FR:Module_Banques_et_Caisses|ES:Módulo_Bancos_y_Cajas'; + llxHeader('', $title, $help_url); -$link = ''; - - -$num_rows = count($accounts); $arrayofselected = is_array($toselect) ? $toselect : array(); $param = ''; -if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.$contextpage; -if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.$limit; -if ($search_ref != '') $param .= '&search_ref='.$search_ref; -if ($search_label != '') $param .= '&search_label='.$search_label; -if ($search_number != '') $param .= '&search_number='.$search_number; -if ($search_status != '') $param .= '&search_status='.$search_status; -if ($show_files) $param .= '&show_files='.$show_files; -if ($optioncss != '') $param .= '&optioncss='.$optioncss; +if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); +if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); +if ($search_ref != '') $param .= '&search_ref='.urlencode($search_ref); +if ($search_label != '') $param .= '&search_label='.urlencode($search_label); +if ($search_number != '') $param .= '&search_number='.urlencode($search_number); +if ($search_status != '') $param .= '&search_status='.urlencode($search_status); +if ($show_files) $param .= '&show_files='.urlencode($show_files); +if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; @@ -380,7 +377,7 @@ if (!empty($arrayfields['b.clos']['checked'])) 'opened'=>$langs->trans("Opened"), 'closed'=>$langs->trans("Closed") ); - print $form->selectarray("search_status", $array, $search_status, 1); + print $form->selectarray("search_status", $array, $search_status, 1, 0, 0, '', 0, 0, 0, '', '', 1); print '
'; - if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth75'); + if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); else print ''; print ''; $liststatus = array('0'=>$langs->trans("BillShortStatusDraft"), '1'=>$langs->trans("BillShortStatusNotPaid"), '2'=>$langs->trans("BillShortStatusPaid"), '1,2'=>$langs->trans("BillShortStatusNotPaid").'+'.$langs->trans("BillShortStatusPaid"), '3'=>$langs->trans("BillShortStatusCanceled")); - print $form->selectarray('search_status', $liststatus, $search_status, 1); + print $form->selectarray('search_status', $liststatus, $search_status, 1, 0, 0, '', 0, 0, 0, '', '', 1); print ''; $liststatus = array('0'=>$langs->trans("Unpaid"), '1'=>$langs->trans("Paid")); - print $form->selectarray('search_status', $liststatus, $search_status, 1); + print $form->selectarray('search_status', $liststatus, $search_status, 1, 0, 0, '', 0, 0, 0, '', 'maxwidth100', 1); print ''; - print $form->selectyesno('search_billed', $search_billed, 1, 0, 1); + print $form->selectyesno('search_billed', $search_billed, 1, 0, 1, 1); print ''; $liststatus = array('0'=>$langs->trans("Draft"), '1'=>$langs->trans("Unpaid"), '2'=>$langs->trans("Paid")); - print $form->selectarray('search_status', $liststatus, $search_status, 1); + print $form->selectarray('search_status', $liststatus, $search_status, 1, 0, 0, '', 0, 0, 0, '', '', 1); print ''; - if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth75'); + if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); elseif (strpos($val['type'], 'integer:') === 0) { print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth150', 1); } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) print ''; diff --git a/htdocs/mrp/mo_list.php b/htdocs/mrp/mo_list.php index b9da34958d4..7734e992d48 100644 --- a/htdocs/mrp/mo_list.php +++ b/htdocs/mrp/mo_list.php @@ -92,7 +92,7 @@ $search_all = GETPOST('search_all', 'alphanohtml') ? GETPOST('search_all', 'alph $search = array(); foreach ($object->fields as $key => $val) { - if (GETPOST('search_'.$key, 'alpha')) $search[$key] = GETPOST('search_'.$key, 'alpha'); + if (GETPOST('search_'.$key, 'alpha') !== '') $search[$key] = GETPOST('search_'.$key, 'alpha'); } // List of fields to search into when doing a "search in all" @@ -392,7 +392,7 @@ foreach ($object->fields as $key => $val) if (!empty($arrayfields['t.'.$key]['checked'])) { print ''; - if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth75'); + if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); elseif (strpos($val['type'], 'integer:') === 0) { print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth150', 1); } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) print ''; diff --git a/htdocs/mrp/mo_movements.php b/htdocs/mrp/mo_movements.php index 754a83c4770..841e787361b 100644 --- a/htdocs/mrp/mo_movements.php +++ b/htdocs/mrp/mo_movements.php @@ -595,7 +595,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''; //print ''; print '
'.$tmpproduct->getNomUrl(1).''.$tmpproduct->getNomUrl(1); + print '
'.$tmpproduct->label.''; + print '
'; $help = ''; if ($line->qty_frozen) $help .= ($help ? '
' : '').''.$langs->trans("QuantityFrozen").': '.yn(1).' ('.$langs->trans("QuantityConsumedInvariable").')'; @@ -850,6 +853,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '
'; print '
'; + // Lines to produce + print ''; print '
'; print '
'; @@ -906,7 +911,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''; print ''; - print ''.$tmpproduct->getNomUrl(1).''; + print ''.$tmpproduct->getNomUrl(1); + print '
'.$tmpproduct->label.''; + print ''; print ''.$line->qty.''; print ''; if ($alreadyproduced) { diff --git a/htdocs/product/inventory/list.php b/htdocs/product/inventory/list.php index 09947e80ac7..5a19906d088 100644 --- a/htdocs/product/inventory/list.php +++ b/htdocs/product/inventory/list.php @@ -371,7 +371,7 @@ foreach ($object->fields as $key => $val) if (!empty($arrayfields['t.'.$key]['checked'])) { print ''; - if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth75'); + if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); elseif (strpos($val['type'], 'integer:') === 0) { print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth150', 1); } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) print ''; diff --git a/htdocs/product/stock/list.php b/htdocs/product/stock/list.php index f717e541229..57051393893 100644 --- a/htdocs/product/stock/list.php +++ b/htdocs/product/stock/list.php @@ -419,7 +419,7 @@ foreach ($object->fields as $key => $val) if (!empty($arrayfields['t.'.$key]['checked'])) { print ''; - if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth75'); + if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); elseif (strpos($val['type'], 'integer:') === 0 || strpos($val['type'], 'sellist:') === 0) { print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth150', 1); } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) print ''; diff --git a/htdocs/product/stock/productlot_list.php b/htdocs/product/stock/productlot_list.php index 8a02f3a2b41..95123b7c873 100644 --- a/htdocs/product/stock/productlot_list.php +++ b/htdocs/product/stock/productlot_list.php @@ -377,7 +377,7 @@ foreach ($object->fields as $key => $val) if (!empty($arrayfields['t.'.$key]['checked'])) { print ''; - if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth75'); + if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); elseif (strpos($val['type'], 'integer:') === 0) { print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth150', 1); } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) print ''; diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index 1f32494a72c..af5134ee521 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -109,7 +109,7 @@ if ($search_status == '') $search_status = -1; // -1 or 1 if (!empty($conf->categorie->enabled)) { - $search_category_array = GETPOST("search_category_".Categorie::TYPE_PROJECT."_array", "array"); + $search_category_array = GETPOST("search_category_".Categorie::TYPE_PROJECT."_list", "array"); } // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context diff --git a/htdocs/recruitment/recruitmentcandidature_list.php b/htdocs/recruitment/recruitmentcandidature_list.php index 1db036f6878..1354dd9611f 100644 --- a/htdocs/recruitment/recruitmentcandidature_list.php +++ b/htdocs/recruitment/recruitmentcandidature_list.php @@ -433,7 +433,7 @@ foreach ($object->fields as $key => $val) if (!empty($arrayfields['t.'.$key]['checked'])) { print ''; - if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth75'); + if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); elseif (strpos($val['type'], 'integer:') === 0) { print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth150', 1); } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) print ''; diff --git a/htdocs/recruitment/recruitmentjobposition_list.php b/htdocs/recruitment/recruitmentjobposition_list.php index 24c98a3fbb9..03f558b3d4a 100644 --- a/htdocs/recruitment/recruitmentjobposition_list.php +++ b/htdocs/recruitment/recruitmentjobposition_list.php @@ -433,7 +433,7 @@ foreach ($object->fields as $key => $val) if (!empty($arrayfields['t.'.$key]['checked'])) { print ''; - if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth75'); + if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); elseif (strpos($val['type'], 'integer:') === 0) { print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth150', 1); } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) print ''; diff --git a/htdocs/stripe/charge.php b/htdocs/stripe/charge.php index 8544417b2e4..beadfee1a89 100644 --- a/htdocs/stripe/charge.php +++ b/htdocs/stripe/charge.php @@ -76,8 +76,7 @@ $stripeacc = $stripe->getStripeAccount($service); print $langs->trans('ErrorStripeAccountNotDefined'); }*/ -if (!$rowid) -{ +if (!$rowid) { $option = array('limit' => $limit + 1); $num = 0; @@ -102,185 +101,185 @@ if (!$rowid) //$param.='&ending_before_'.($page+1).'='.$list->data[($limit-1)]->id; $moreforfilter = ''; - - print '
'; - if ($optioncss != '') print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - - $title = $langs->trans("StripeChargeList"); - $title .= ($stripeacc ? ' (Stripe connection with Stripe OAuth Connect account '.$stripeacc.')' : ' (Stripe connection with keys from Stripe module setup)'); - - print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'title_accountancy.png', 0, '', 'hidepaginationprevious', $limit); - - print '
'; - print ''."\n"; - - print ''; - print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder); - print_liste_field_titre("StripeCustomerId", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder); - print_liste_field_titre("Customer", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder); - print_liste_field_titre("Origin", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder); - print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "", "", "", '', $sortfield, $sortorder, 'center '); - print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "", "", "", '', $sortfield, $sortorder, 'left '); - print_liste_field_titre("Paid", $_SERVER["PHP_SELF"], "", "", "", '', $sortfield, $sortorder, 'right '); - print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "", "", "", '', '', '', 'right '); - print "\n"; - - //print $list; - $i = 0; - foreach ($list->data as $charge) - { - if ($i >= $limit) { - break; - } - - if ($charge->refunded == '1') { - $status = img_picto($langs->trans("refunded"), 'statut6'); - } elseif ($charge->paid == '1') { - $status = img_picto($langs->trans((string) $charge->status), 'statut4'); - } else { - $label = $langs->trans("Message").": ".$charge->failure_message."
"; - $label .= $langs->trans("Network").": ".$charge->outcome->network_status."
"; - $label .= $langs->trans("Status").": ".$langs->trans((string) $charge->outcome->seller_message); - $status = $form->textwithpicto(img_picto($langs->trans((string) $charge->status), 'statut8'), $label, -1); - } - - if ($charge->payment_method_details->type == 'card') { - $type = $langs->trans("card"); - } elseif ($charge->source->type == 'card') { - $type = $langs->trans("card"); - } elseif ($charge->payment_method_details->type == 'three_d_secure') { - $type = $langs->trans("card3DS"); - } elseif ($charge->payment_method_details->type == 'sepa_debit') { - $type = $langs->trans("sepadebit"); - } elseif ($charge->payment_method_details->type == 'ideal') { - $type = $langs->trans("iDEAL"); - } - - // Why this ? - /*if (! empty($charge->payment_intent)) { - if (empty($stripeacc)) { // If the Stripe connect account not set, we use common API usage - $charge = \Stripe\PaymentIntent::retrieve($charge->payment_intent); - } else { - $charge = \Stripe\PaymentIntent::retrieve($charge->payment_intent, array("stripe_account" => $stripeacc)); - } - }*/ - - // The metadata FULLTAG is defined by the online payment page - $FULLTAG = $charge->metadata->FULLTAG; - - // Save into $tmparray all metadata - $tmparray = dolExplodeIntoArray($FULLTAG, '.', '='); - // Load origin object according to metadata - if (!empty($tmparray['CUS']) && $tmparray['CUS'] > 0) - { - $societestatic->fetch($tmparray['CUS']); - } elseif (!empty($charge->metadata->dol_thirdparty_id) && $charge->metadata->dol_thirdparty_id > 0) - { - $societestatic->fetch($charge->metadata->dol_thirdparty_id); - } else { - $societestatic->id = 0; - } - if (!empty($tmparray['MEM']) && $tmparray['MEM'] > 0) - { - $memberstatic->fetch($tmparray['MEM']); - } else { - $memberstatic->id = 0; - } - - print ''; - - if (!empty($stripeacc)) $connect = $stripeacc.'/'; - - // Ref - $url = 'https://dashboard.stripe.com/'.$connect.'test/payments/'.$charge->id; - if ($servicestatus) - { - $url = 'https://dashboard.stripe.com/'.$connect.'payments/'.$charge->id; - } - print "\n"; - - // Stripe customer - print "\n"; - - // Link - print "\n"; - - // Origin - print "\n"; - - // Date payment - print '\n"; - // Type - print ''; - // Amount - print '"; - // Status - print '\n"; - - print "\n"; - - $i++; - } - - print '
"; - print "".img_picto($langs->trans('ShowInStripe'), 'globe')." ".$charge->id.""; - if ($charge->payment_intent) print '
'.$charge->payment_intent.''; - print "
"; - if (!empty($conf->stripe->enabled) && !empty($stripeacc)) $connect = $stripeacc.'/'; - $url = 'https://dashboard.stripe.com/'.$connect.'test/customers/'.$charge->customer; - if ($servicestatus) - { - $url = 'https://dashboard.stripe.com/'.$connect.'customers/'.$charge->customer; - } - if (!empty($charge->customer)) - { - print ''.img_picto($langs->trans('ShowInStripe'), 'globe').' '.$charge->customer.''; - } - print ""; - if ($societestatic->id > 0) - { - print $societestatic->getNomUrl(1); - } elseif ($memberstatic->id > 0) - { - print $memberstatic->getNomUrl(1); - } - print ""; - if ($charge->metadata->dol_type == "order" || $charge->metadata->dol_type == "commande") { - $object = new Commande($db); - $object->fetch($charge->metadata->dol_id); - if ($object->id > 0) { - print "".img_picto('', 'object_order')." ".$object->ref.""; - } else { - print $FULLTAG; - } - } elseif ($charge->metadata->dol_type == "invoice" || $charge->metadata->dol_type == "facture") { - print $charge->metadata->dol_type.' '.$charge->metadata->dol_id.' - '; - $object = new Facture($db); - $object->fetch($charge->metadata->dol_id); - if ($object->id > 0) { - print "".img_picto('', 'object_invoice')." ".$object->ref.""; - } else { - print $FULLTAG; - } - } else { - print $FULLTAG; - } - print "'.dol_print_date($charge->created, '%d/%m/%Y %H:%M')."'; - print $type; - print ''.price(($charge->amount - $charge->amount_refunded) / 100, 0, '', 1, - 1, - 1, strtoupper($charge->currency))."'; - print $status; - print "
'; - print '
'; - print '
'; } catch (Exception $e) { print $e->getMessage(); } + + print '
'; + if ($optioncss != '') print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + + $title = $langs->trans("StripeChargeList"); + $title .= ($stripeacc ? ' (Stripe connection with Stripe OAuth Connect account '.$stripeacc.')' : ' (Stripe connection with keys from Stripe module setup)'); + + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'title_accountancy.png', 0, '', 'hidepaginationprevious', $limit); + + print '
'; + print ''."\n"; + + print ''; + print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder); + print_liste_field_titre("StripeCustomerId", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder); + print_liste_field_titre("Customer", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder); + print_liste_field_titre("Origin", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder); + print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "", "", "", '', $sortfield, $sortorder, 'center '); + print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "", "", "", '', $sortfield, $sortorder, 'left '); + print_liste_field_titre("Paid", $_SERVER["PHP_SELF"], "", "", "", '', $sortfield, $sortorder, 'right '); + print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "", "", "", '', '', '', 'right '); + print "\n"; + + //print $list; + $i = 0; + foreach ($list->data as $charge) + { + if ($i >= $limit) { + break; + } + + if ($charge->refunded == '1') { + $status = img_picto($langs->trans("refunded"), 'statut6'); + } elseif ($charge->paid == '1') { + $status = img_picto($langs->trans((string) $charge->status), 'statut4'); + } else { + $label = $langs->trans("Message").": ".$charge->failure_message."
"; + $label .= $langs->trans("Network").": ".$charge->outcome->network_status."
"; + $label .= $langs->trans("Status").": ".$langs->trans((string) $charge->outcome->seller_message); + $status = $form->textwithpicto(img_picto($langs->trans((string) $charge->status), 'statut8'), $label, -1); + } + + if ($charge->payment_method_details->type == 'card') { + $type = $langs->trans("card"); + } elseif ($charge->source->type == 'card') { + $type = $langs->trans("card"); + } elseif ($charge->payment_method_details->type == 'three_d_secure') { + $type = $langs->trans("card3DS"); + } elseif ($charge->payment_method_details->type == 'sepa_debit') { + $type = $langs->trans("sepadebit"); + } elseif ($charge->payment_method_details->type == 'ideal') { + $type = $langs->trans("iDEAL"); + } + + // Why this ? + /*if (! empty($charge->payment_intent)) { + if (empty($stripeacc)) { // If the Stripe connect account not set, we use common API usage + $charge = \Stripe\PaymentIntent::retrieve($charge->payment_intent); + } else { + $charge = \Stripe\PaymentIntent::retrieve($charge->payment_intent, array("stripe_account" => $stripeacc)); + } + }*/ + + // The metadata FULLTAG is defined by the online payment page + $FULLTAG = $charge->metadata->FULLTAG; + + // Save into $tmparray all metadata + $tmparray = dolExplodeIntoArray($FULLTAG, '.', '='); + // Load origin object according to metadata + if (!empty($tmparray['CUS']) && $tmparray['CUS'] > 0) + { + $societestatic->fetch($tmparray['CUS']); + } elseif (!empty($charge->metadata->dol_thirdparty_id) && $charge->metadata->dol_thirdparty_id > 0) + { + $societestatic->fetch($charge->metadata->dol_thirdparty_id); + } else { + $societestatic->id = 0; + } + if (!empty($tmparray['MEM']) && $tmparray['MEM'] > 0) + { + $memberstatic->fetch($tmparray['MEM']); + } else { + $memberstatic->id = 0; + } + + print ''; + + if (!empty($stripeacc)) $connect = $stripeacc.'/'; + + // Ref + $url = 'https://dashboard.stripe.com/'.$connect.'test/payments/'.$charge->id; + if ($servicestatus) + { + $url = 'https://dashboard.stripe.com/'.$connect.'payments/'.$charge->id; + } + print "\n"; + + // Stripe customer + print "\n"; + + // Link + print "\n"; + + // Origin + print "\n"; + + // Date payment + print '\n"; + // Type + print ''; + // Amount + print '"; + // Status + print '\n"; + + print "\n"; + + $i++; + } + + print '
"; + print "".img_picto($langs->trans('ShowInStripe'), 'globe')." ".$charge->id.""; + if ($charge->payment_intent) print '
'.$charge->payment_intent.''; + print "
"; + if (!empty($conf->stripe->enabled) && !empty($stripeacc)) $connect = $stripeacc.'/'; + $url = 'https://dashboard.stripe.com/'.$connect.'test/customers/'.$charge->customer; + if ($servicestatus) + { + $url = 'https://dashboard.stripe.com/'.$connect.'customers/'.$charge->customer; + } + if (!empty($charge->customer)) + { + print ''.img_picto($langs->trans('ShowInStripe'), 'globe').' '.$charge->customer.''; + } + print ""; + if ($societestatic->id > 0) + { + print $societestatic->getNomUrl(1); + } elseif ($memberstatic->id > 0) + { + print $memberstatic->getNomUrl(1); + } + print ""; + if ($charge->metadata->dol_type == "order" || $charge->metadata->dol_type == "commande") { + $object = new Commande($db); + $object->fetch($charge->metadata->dol_id); + if ($object->id > 0) { + print "".img_picto('', 'object_order')." ".$object->ref.""; + } else { + print $FULLTAG; + } + } elseif ($charge->metadata->dol_type == "invoice" || $charge->metadata->dol_type == "facture") { + print $charge->metadata->dol_type.' '.$charge->metadata->dol_id.' - '; + $object = new Facture($db); + $object->fetch($charge->metadata->dol_id); + if ($object->id > 0) { + print "".img_picto('', 'object_invoice')." ".$object->ref.""; + } else { + print $FULLTAG; + } + } else { + print $FULLTAG; + } + print "'.dol_print_date($charge->created, '%d/%m/%Y %H:%M')."'; + print $type; + print ''.price(($charge->amount - $charge->amount_refunded) / 100, 0, '', 1, - 1, - 1, strtoupper($charge->currency))."'; + print $status; + print "
'; + print '
'; + print '
'; } // End of page diff --git a/htdocs/stripe/transaction.php b/htdocs/stripe/transaction.php index cd75fec476c..8ed8ed906a8 100644 --- a/htdocs/stripe/transaction.php +++ b/htdocs/stripe/transaction.php @@ -77,8 +77,7 @@ $stripeacc = $stripe->getStripeAccount($service); if (!$rowid) { print '
'; - if ($optioncss != '') - print ''; + if ($optioncss != '') print ''; print ''; print ''; print ''; @@ -106,8 +105,6 @@ if (!$rowid) { print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "", "", "", '', '', '', 'right '); print "\n"; - print "\n"; - try { if ($stripeacc) { diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index e1b65dac26d..26a0b77b01f 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -257,7 +257,7 @@ class Ticket extends CommonObject 'timing' => array('type'=>'varchar(20)', 'label'=>'Timing', 'visible'=>-1, 'enabled'=>1, 'position'=>42, 'notnull'=>-1, 'help'=>""), 'datec' => array('type'=>'datetime', 'label'=>'DateCreation', 'visible'=>1, 'enabled'=>1, 'position'=>500, 'notnull'=>1), 'date_read' => array('type'=>'datetime', 'label'=>'TicketReadOn', 'visible'=>1, 'enabled'=>1, 'position'=>501, 'notnull'=>1), - 'fk_user_assign' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'AssignedTo', 'visible'=>1, 'enabled'=>1, 'position'=>505, 'notnull'=>1), + 'fk_user_assign' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'AssignedTo', 'visible'=>1, 'enabled'=>1, 'position'=>505, 'notnull'=>1, 'css'=>'tdoverflowmax150'), 'date_close' => array('type'=>'datetime', 'label'=>'TicketCloseOn', 'visible'=>-1, 'enabled'=>1, 'position'=>510, 'notnull'=>1), 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'visible'=>-1, 'enabled'=>1, 'position'=>520, 'notnull'=>1), 'message' => array('type'=>'text', 'label'=>'Message', 'visible'=>-2, 'enabled'=>1, 'position'=>540, 'notnull'=>-1,), diff --git a/htdocs/ticket/list.php b/htdocs/ticket/list.php index d3521b6f5a0..7fae1848bf5 100644 --- a/htdocs/ticket/list.php +++ b/htdocs/ticket/list.php @@ -663,7 +663,7 @@ foreach ($object->fields as $key => $val) print ''; } else { print ''; - if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth75'); + if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); elseif (strpos($val['type'], 'integer:') === 0) { print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth150', 1); } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) print '';