From 8fd778ebd31fa292806a218ff05ae042fd9c7727 Mon Sep 17 00:00:00 2001 From: JBthePenguin Date: Thu, 10 Jun 2021 15:17:54 +0200 Subject: [PATCH] ok to validate form in php file for available equipment output at different date, next entry for rent --- materiels.tar.gz | Bin 21428 -> 21825 bytes src/lib/Equipment.php | 17 ++++++- src/lib/Output.php | 23 +++++++++ src/templates/sorties/index.tpl | 2 +- src/templates/sorties/stock_disponible.tpl | 12 ++--- src/www/admin/sorties/stock_disponible.php | 52 ++++++++++++++------- 6 files changed, 80 insertions(+), 26 deletions(-) diff --git a/materiels.tar.gz b/materiels.tar.gz index 1886c2b7c6a04289ab3a4eee151dc9b1ba2370b9..9b42823d982c7cecdf81900d9176616d9f133bd0 100644 GIT binary patch delta 18066 zcmV)rK$*X^rvbsL0e>Hh2mqW1!e9Uc?S1W5<4BfZ|FxbX+9zu;y9R87VJ8#lLxQu4 zZ4z>TteQOCeK^9BL0z`wl4M9WhZoqVn16d}_YwBr=8Nt9icsjo2C{(4scLgjfZaPCo6sU??n^`@aLZ%_iD9T8yj5(|F$=}Er0u8bE)=PtGnLmu5D~| zRIAfk>vaF5x{o}M%4?FOZVXfT=XrYRkNxms5`Qg*xOyY?z{gR zYpdPPT3fZ+-PT%rzW>j0rRMzmVH*37fB65z``^8L|JPgX4k7^TKTv_S`Tjr0h3CKb z(oLmw)3Y7z5z3zP2`P|6$WtW&hV&t+n-zqQ^l0TTd{T()9=5|INR^o;yzH zj{Ico_I>rO8^^8}gnxfGoLs;^Z-F>~P%unhInE@pp6|VWmA_GZ;qSXFQQW|r{h^yA z${?Ea$x&)NIUfdnHJF6`G>AgwdS2s&=ccaOQh)o$qJLAvMoPW#&f&)1>z6Mt{B%Er z?F##TWAT+!tHGnC?I2A2IBhJ9Y522|9{$YNqb)QQ^$YJ{hq0ed;!x4cFfHs8IyjE5 z_dV+N)~T4B?*(b&Mc_$S_ne|UT-u(D;Vu6@lWg(}*Oz__?E??*2j1e;iNT0CuSIzD z$zEP*H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ib/Equipment.php b/src/lib/Equipment.php index 1350e69..b3b671d 100644 --- a/src/lib/Equipment.php +++ b/src/lib/Equipment.php @@ -132,8 +132,23 @@ class Equipment array_push($eqmts_available, $eqmt); } } - $eqmts_available_by_cat[$cat] = $eqmts_available; + if ($eqmts_available) { + $eqmts_available_by_cat[$cat] = $eqmts_available; + } } return $eqmts_available_by_cat; } + + public function CalculateAvailableByDate($id, $date) + { + $entries = DB::getInstance()->firstColumn( + "SELECT sum(equipment_number) FROM plugin_materiels_entry WHERE kind IN ( + 'Achat', 'Don', 'Récupération', + 'Retour de location / prêt') AND equipment_id = '{$id}' AND entry_date <= '{$date}';"); + $outputs = DB::getInstance()->firstColumn( + "SELECT sum(equipment_number) FROM plugin_materiels_output WHERE kind IN ( + 'Vente', 'Don', 'Besoin', 'Autre (perte, vol, ...)', + 'Location / Prêt') AND equipment_id = '{$id}' AND output_date <= '{$date}';"); + return $entries - $outputs; + } } diff --git a/src/lib/Output.php b/src/lib/Output.php index de94cec..b8234e4 100644 --- a/src/lib/Output.php +++ b/src/lib/Output.php @@ -3,6 +3,7 @@ namespace Garradin\Plugin\Materiels; use Garradin\DB; +use Garradin\Plugin\Materiels\Equipment; class Output { @@ -32,4 +33,26 @@ class Output { return DB::getInstance()->get('SELECT * FROM plugin_materiels_output ORDER BY output_date DESC;'); } + + public function PossibilityOwnedEqmtOutput($id, $eqmt_number, $date) + { + $after_output_dates = DB::getInstance()->get( + "SELECT output_date FROM plugin_materiels_output WHERE kind IN ( + 'Vente', 'Don', 'Besoin', 'Autre (perte, vol, ...)', + 'Location / Prêt') AND equipment_id = '{$id}' AND output_date > '{$date}';"); + $output_dates = array($date); + foreach ($after_output_dates as $row) + { + array_push($output_dates, $row->output_date); + } + $eqmt = new Equipment; + foreach ($output_dates as $output_date) { + $available_eqmt = $eqmt->CalculateAvailableByDate($id, $output_date); + if ($available_eqmt - $eqmt_number < 0) + { + return false; + } + } + return true; + } } diff --git a/src/templates/sorties/index.tpl b/src/templates/sorties/index.tpl index b4f83fb..cecde2c 100644 --- a/src/templates/sorties/index.tpl +++ b/src/templates/sorties/index.tpl @@ -20,7 +20,7 @@ {foreach from=$outputs item="output"} - {$entry.output_date|date_format:'%d/%m/%y'} + {$output.output_date|date_format:'%d/%m/%y'} {$output.kind} {$output.equipment_number} {$output.equipment} diff --git a/src/templates/sorties/stock_disponible.tpl b/src/templates/sorties/stock_disponible.tpl index 1d6e4cc..c13c432 100644 --- a/src/templates/sorties/stock_disponible.tpl +++ b/src/templates/sorties/stock_disponible.tpl @@ -5,13 +5,11 @@
diff --git a/src/www/admin/sorties/stock_disponible.php b/src/www/admin/sorties/stock_disponible.php index 3013298..4e45c48 100644 --- a/src/www/admin/sorties/stock_disponible.php +++ b/src/www/admin/sorties/stock_disponible.php @@ -10,23 +10,9 @@ require_once __DIR__ . '/../_inc.php'; $output = new Output; $eqmt = new Equipment; + $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'); -} +$selected_eqmt = ""; $kinds = $output->listKinds(); $selected_kind = $kinds[0]; @@ -37,13 +23,45 @@ $default_date = $date; $default_comment = ""; +$csrf_key = 'add_output'; + +if (f('save') && $form->check($csrf_key) && !$form->hasErrors()) +{ + $eqmt_id = f('equipment_id'); + $eqmt_number = (int) f('equipment_number'); + $output_date_format = date_create_from_format( + "d/m/Y", f('output_date'))->format("Y-m-d"); + if ($output->PossibilityOwnedEqmtOutput($eqmt_id, $eqmt_number, $output_date_format)) + { + $output->add([ + 'kind' => f('kind'), + 'equipment_number' => $eqmt_number, + 'equipment_id' => $eqmt_id, + 'output_date' => $output_date_format, + 'additional_comment' => f('additional_comment'), + ]); + Utils::redirect(PLUGIN_URL . 'sorties/index.php'); + } else + { + $output_date = f('output_date'); + $selected_eqmt = $eqmt_id; + $selected_kind = f('kind'); + $default_date = $output_date; + $default_comment = f('additional_comment'); + + $equiment = $eqmt->get(f('equipment_id')); + $form->addError( + "Il est impossible de sortir " . (string) $eqmt_number . " " . $equiment->designation . " à la date du " . (string) $output_date . '.'); + } +} + $cancel_link = PLUGIN_URL . 'sorties/index.php'; $legend_part = "en stock disponible"; $tpl_materiel_name = "stock_disponible"; $tpl->assign(compact( 'csrf_key', 'cancel_link', 'legend_part', 'tpl_materiel_name', - 'kinds', 'selected_kind', 'default_date', 'default_comment', + 'kinds', 'selected_eqmt', 'selected_kind', 'default_date', 'default_comment', 'eqmts_by_cat')); $tpl->display(PLUGIN_ROOT . '/templates/sorties/ajouter_sortie.tpl');