+
+// Do we need to show checkboxes?
+if ($bean->getAttribute('chpaid') ||
+ ($client_id && $bean->getAttribute('chinvoice') && ('no_grouping' == $bean->getAttribute('group_by')) && !$user->isClient())) {
+ $smarty->assign('use_checkboxes', true);
+}
+
+// Controls for "Mark paid" block.
+if ($bean->getAttribute('chpaid')) {
+ $mark_paid_select_options = array('1'=>$i18n->getKey('dropdown.all'),'2'=>$i18n->getKey('dropdown.select'));
+ $form->addInput(array('type'=>'combobox',
+ 'name'=>'mark_paid_select_options',
+ 'data'=>$mark_paid_select_options,
+ 'value'=>$cl_mark_paid_select_option));
+ $mark_paid_action_options = array('1'=>$i18n->getKey('dropdown.paid'),'2'=>$i18n->getKey('dropdown.not_paid'));
+ $form->addInput(array('type'=>'combobox',
+ 'name'=>'mark_paid_action_options',
+ 'data'=>$mark_paid_action_options,
+ 'value'=>$cl_mark_paid_action_option));
+ $form->addInput(array('type'=>'submit','name'=>'btn_mark_paid','value'=>$i18n->getKey('button.submit')));
+ $smarty->assign('use_mark_paid', true);
+}
+
+// Controls for "Assign to invoice" block.