Description
The mass action edit_extrafields (Modify extrafields on selected records) is not wired up on the customer invoice list page (compta/facture/list.php). Other list pages (e.g. orders) support this mass action, but invoices do not, even though the extrafield editing template supports it.
Steps to reproduce
- Go to Billing → Customer invoices → List
- Select one or more invoices using the checkboxes
- Open the Mass action dropdown
Expected: A "Modify value of extrafields" option is available.
Actual: The option is absent.
Root cause
htdocs/compta/facture/list.php is missing two lines:
1. The mass action is never added to the menu:
$arrayofmassactions = array(
'validate' => img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"),
// 'edit_extrafields' is absent here
'generate_doc' => ...
);
2. The "clear toolbar when action is active" guard doesn't include edit_extrafields:
if (in_array($massaction, array('presend', 'predelete', 'makepayment'))) {
$arrayofmassactions = array();
}
Fix
$arrayofmassactions = array(
'validate' => img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"),
+ 'edit_extrafields' => img_picto('', 'edit', 'class="pictofixedwidth"').$langs->trans("ModifyValueExtrafields"),
'generate_doc' => img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"),
);
-if (in_array($massaction, array('presend', 'predelete', 'makepayment'))) {
+if (in_array($massaction, array('presend', 'predelete', 'makepayment', 'edit_extrafields'))) {
$arrayofmassactions = array();
}
Description
The mass action
edit_extrafields(Modify extrafields on selected records) is not wired up on the customer invoice list page (compta/facture/list.php). Other list pages (e.g. orders) support this mass action, but invoices do not, even though the extrafield editing template supports it.Steps to reproduce
Expected: A "Modify value of extrafields" option is available.
Actual: The option is absent.
Root cause
htdocs/compta/facture/list.phpis missing two lines:1. The mass action is never added to the menu:
2. The "clear toolbar when action is active" guard doesn't include
edit_extrafields:Fix
$arrayofmassactions = array( 'validate' => img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"), + 'edit_extrafields' => img_picto('', 'edit', 'class="pictofixedwidth"').$langs->trans("ModifyValueExtrafields"), 'generate_doc' => img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), ); -if (in_array($massaction, array('presend', 'predelete', 'makepayment'))) { +if (in_array($massaction, array('presend', 'predelete', 'makepayment', 'edit_extrafields'))) { $arrayofmassactions = array(); }