change date format to have correct order in sql request, next add validate form in php file for available equipment output
This commit is contained in:
parent
d58ae812b5
commit
b8a7d664c2
9 changed files with 40 additions and 19 deletions
|
|
@ -14,6 +14,20 @@ $eqmts_by_cat = $eqmt->GetAvailableListByCategory();
|
|||
|
||||
$csrf_key = 'add_output';
|
||||
|
||||
if (f('save') && $form->check($csrf_key) && !$form->hasErrors())
|
||||
{
|
||||
$output_date_format = date_create_from_format(
|
||||
"d/m/Y", f('entry_date'))->format("Y-m-d");
|
||||
$output->add([
|
||||
'kind' => f('kind'),
|
||||
'equipment_number' => (int) f('equipment_number'),
|
||||
'equipment_id' => f('equipment_id'),
|
||||
'output_date' => $output_date_format,
|
||||
'additional_comment' => f('additional_comment'),
|
||||
]);
|
||||
Utils::redirect(PLUGIN_URL . 'entrees/index.php');
|
||||
}
|
||||
|
||||
$kinds = $output->listKinds();
|
||||
$selected_kind = $kinds[0];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue