Edit.cshtml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353
  1. @using CD67.FicheCollege.MVC.Models
  2. @model RestaurationFormulaireViewModel
  3. @{
  4. ViewBag.Title = "Modification";
  5. Layout = "~/Views/Shared/_Layout.cshtml";
  6. RestaurationFormulaire form = Model.Obj;
  7. int anneePlus = ViewBag.AnneeEnCours + 1;
  8. int anneeMoins = ViewBag.AnneeEnCours - 1;
  9. RestaurationParametre param = ViewBag.Param;
  10. List<RestaurationFormulairesRepa> repas = Model.Obj.RestaurationFormulairesRepas.ToList();
  11. }
  12. <h2>
  13. La Restauration - @form.College.Libelle
  14. @if (form.College.RestaurationType_Id != null)
  15. {
  16. <text>(</text>@form.College.RestaurationType.Libelle<text>)</text>
  17. }
  18. </h2>
  19. <hr />
  20. @using (Html.BeginForm())
  21. {
  22. @Html.AntiForgeryToken()
  23. <div class="form-horizontal">
  24. <h4><b>PROPOSITIONS DE TARIFS DE RESTAURATION ET D'HEBERGEMENT POUR L'ANNEE @anneePlus</b></h4>
  25. <hr />
  26. @Html.ValidationSummary(true, "", new { @class = "text-danger" })
  27. @Html.HiddenFor(model => form.Id)
  28. @Html.HiddenFor(model => form.College_Id)
  29. @Html.HiddenFor(model => form.Statut)
  30. <b>I. Nombre de demi-pensionnaires</b><br /><br />
  31. <div class="form-group">
  32. @Html.LabelFor(model => form.NbDP_College, htmlAttributes: new { @class = "control-label col-md-2" })
  33. <div class="col-md-10">
  34. @Html.EditorFor(model => form.NbDP_College, new { htmlAttributes = new { @class = "form-control" } })
  35. @Html.ValidationMessageFor(model => form.NbDP_College, "", new { @class = "text-danger" })
  36. </div>
  37. </div>
  38. <div class="form-group">
  39. @Html.LabelFor(model => form.NbDP_Lycee, htmlAttributes: new { @class = "control-label col-md-2" })
  40. <div class="col-md-10">
  41. @Html.EditorFor(model => form.NbDP_Lycee, new { htmlAttributes = new { @class = "form-control" } })
  42. @Html.ValidationMessageFor(model => form.NbDP_Lycee, "", new { @class = "text-danger" })
  43. </div>
  44. </div>
  45. <div class="form-group">
  46. @Html.LabelFor(model => form.NbDP_MatPrimPeri, htmlAttributes: new { @class = "control-label col-md-2" })
  47. <div class="col-md-10">
  48. @Html.EditorFor(model => form.NbDP_MatPrimPeri, new { htmlAttributes = new { @class = "form-control" } })
  49. @Html.ValidationMessageFor(model => form.NbDP_MatPrimPeri, "", new { @class = "text-danger" })
  50. </div>
  51. </div>
  52. <div class="form-group">
  53. @Html.LabelFor(model => form.NbDP_Commensaux, htmlAttributes: new { @class = "control-label col-md-2" })
  54. <div class="col-md-10">
  55. @Html.EditorFor(model => form.NbDP_Commensaux, new { htmlAttributes = new { @class = "form-control" } })
  56. @Html.ValidationMessageFor(model => form.NbDP_Commensaux, "", new { @class = "text-danger" })
  57. </div>
  58. </div>
  59. <div class="form-group">
  60. @Html.LabelFor(model => form.NbDP_ATC, htmlAttributes: new { @class = "control-label col-md-2" })
  61. <div class="col-md-10">
  62. @Html.EditorFor(model => form.NbDP_ATC, new { htmlAttributes = new { @class = "form-control" } })
  63. @Html.ValidationMessageFor(model => form.NbDP_ATC, "", new { @class = "text-danger" })
  64. </div>
  65. </div>
  66. <div class="form-group">
  67. @Html.LabelFor(model => form.NbDP_AgentC, htmlAttributes: new { @class = "control-label col-md-2" })
  68. <div class="col-md-10">
  69. @Html.EditorFor(model => form.NbDP_AgentC, new { htmlAttributes = new { @class = "form-control" } })
  70. @Html.ValidationMessageFor(model => form.NbDP_AgentC, "", new { @class = "text-danger" })
  71. </div>
  72. </div>
  73. <hr />
  74. <b>II. Tarifs élèves @anneePlus</b><br /><br />
  75. <div class="form-group">
  76. <div class="col-md-12">
  77. <text>Prix des forfaits (prix unitaire <b>minimum</b> fixé à <b>@param.Prix_Mini €</b>)</text>
  78. </div>
  79. </div>
  80. <div class="form-group">
  81. <table id="table-actions" class="table">
  82. <thead>
  83. <tr>
  84. <th>
  85. Forfait
  86. </th>
  87. <th>
  88. Prix du forfait
  89. </th>
  90. <th>
  91. Nombre de jours d'ouverture prévu de la demi-pension
  92. </th>
  93. </tr>
  94. </thead>
  95. <tbody>
  96. <tr>
  97. <td>
  98. 5 j
  99. </td>
  100. <td>
  101. @Html.EditorFor(model => form.Prix_Forfait5j, new { htmlAttributes = new { @class = "form-control" } })
  102. @Html.ValidationMessageFor(model => form.Prix_Forfait5j, "", new { @class = "text-danger" })
  103. </td>
  104. <td>
  105. @Html.EditorFor(model => form.NbJours_Forfait5j, new { htmlAttributes = new { @class = "form-control" } })
  106. @Html.ValidationMessageFor(model => form.NbJours_Forfait5j, "", new { @class = "text-danger" })
  107. </td>
  108. </tr>
  109. <tr>
  110. <td>
  111. 4 j
  112. </td>
  113. <td>
  114. @Html.EditorFor(model => form.Prix_Forfait4j, new { htmlAttributes = new { @class = "form-control" } })
  115. @Html.ValidationMessageFor(model => form.Prix_Forfait4j, "", new { @class = "text-danger" })
  116. </td>
  117. <td>
  118. @Html.EditorFor(model => form.NbJours_Forfait4j, new { htmlAttributes = new { @class = "form-control" } })
  119. @Html.ValidationMessageFor(model => form.NbJours_Forfait4j, "", new { @class = "text-danger" })
  120. </td>
  121. </tr>
  122. <tr>
  123. <td>
  124. 3 j
  125. </td>
  126. <td>
  127. @Html.EditorFor(model => form.Prix_Forfait3j, new { htmlAttributes = new { @class = "form-control" } })
  128. @Html.ValidationMessageFor(model => form.Prix_Forfait3j, "", new { @class = "text-danger" })
  129. </td>
  130. <td>
  131. @Html.EditorFor(model => form.NbJours_Forfait3j, new { htmlAttributes = new { @class = "form-control" } })
  132. @Html.ValidationMessageFor(model => form.NbJours_Forfait3j, "", new { @class = "text-danger" })
  133. </td>
  134. </tr>
  135. <tr>
  136. <td>
  137. 2 j
  138. </td>
  139. <td>
  140. @Html.EditorFor(model => form.Prix_Forfait2j, new { htmlAttributes = new { @class = "form-control" } })
  141. @Html.ValidationMessageFor(model => form.Prix_Forfait2j, "", new { @class = "text-danger" })
  142. </td>
  143. <td>
  144. @Html.EditorFor(model => form.NbJours_Forfait2j, new { htmlAttributes = new { @class = "form-control" } })
  145. @Html.ValidationMessageFor(model => form.NbJours_Forfait2j, "", new { @class = "text-danger" })
  146. </td>
  147. </tr>
  148. <tr>
  149. <td>
  150. 1 j
  151. </td>
  152. <td>
  153. @Html.EditorFor(model => form.Prix_Forfait1j, new { htmlAttributes = new { @class = "form-control" } })
  154. @Html.ValidationMessageFor(model => form.Prix_Forfait1j, "", new { @class = "text-danger" })
  155. </td>
  156. <td>
  157. @Html.EditorFor(model => form.NbJours_Forfait1j, new { htmlAttributes = new { @class = "form-control" } })
  158. @Html.ValidationMessageFor(model => form.NbJours_Forfait1j, "", new { @class = "text-danger" })
  159. </td>
  160. </tr>
  161. </tbody>
  162. </table>
  163. </div>
  164. <div class="form-group">
  165. @Html.LabelFor(model => form.Prix_Ticket, htmlAttributes: new { @class = "control-label col-md-2" })
  166. <div class="col-md-10">
  167. @Html.EditorFor(model => form.Prix_Ticket, new { htmlAttributes = new { @class = "form-control" } })
  168. @Html.ValidationMessageFor(model => form.Prix_Ticket, "", new { @class = "text-danger" })
  169. </div>
  170. </div>
  171. <div class="form-group">
  172. @Html.LabelFor(model => form.Tarif_Pension, htmlAttributes: new { @class = "control-label col-md-2" })
  173. <div class="col-md-10">
  174. @Html.EditorFor(model => form.Tarif_Pension, new { htmlAttributes = new { @class = "form-control" } })
  175. @Html.ValidationMessageFor(model => form.Tarif_Pension, "", new { @class = "text-danger" })
  176. </div>
  177. </div>
  178. <hr />
  179. <b>III. Tarifs « commensaux » @anneePlus</b><br /><br />
  180. <div class="form-group">
  181. @Html.LabelFor(model => form.Prix_ATC, htmlAttributes: new { @class = "control-label col-md-2" })
  182. <div class="col-md-10">
  183. @Html.EditorFor(model => form.Prix_ATC, new { htmlAttributes = new { @class = "form-control" } })
  184. @Html.ValidationMessageFor(model => form.Prix_ATC, "", new { @class = "text-danger" })
  185. <text><b>(défaut @param.Prix_ATC €)</b></text>
  186. </div>
  187. </div>
  188. <div class="form-group">
  189. @Html.LabelFor(model => form.Prix_AgentC, htmlAttributes: new { @class = "control-label col-md-2" })
  190. <div class="col-md-10">
  191. @Html.EditorFor(model => form.Prix_AgentC, new { htmlAttributes = new { @class = "form-control" } })
  192. @Html.ValidationMessageFor(model => form.Prix_AgentC, "", new { @class = "text-danger" })
  193. <text><b>(défaut @param.Prix_AgentC €)</b></text>
  194. </div>
  195. </div>
  196. <div class="form-group">
  197. @Html.LabelFor(model => form.Prix_Commensaux, htmlAttributes: new { @class = "control-label col-md-2" })
  198. <div class="col-md-10">
  199. @Html.EditorFor(model => form.Prix_Commensaux, new { htmlAttributes = new { @class = "form-control" } })
  200. @Html.ValidationMessageFor(model => form.Prix_Commensaux, "", new { @class = "text-danger" })
  201. <text><b>(minimum @param.Prix_MiniAutres €)</b></text>
  202. </div>
  203. </div>
  204. <div class="form-group">
  205. @Html.LabelFor(model => form.Prix_EcolePeri, htmlAttributes: new { @class = "control-label col-md-2" })
  206. <div class="col-md-10">
  207. @Html.EditorFor(model => form.Prix_EcolePeri, new { htmlAttributes = new { @class = "form-control" } })
  208. @Html.ValidationMessageFor(model => form.Prix_EcolePeri, "", new { @class = "text-danger" })
  209. </div>
  210. </div>
  211. <hr />
  212. <b>IV. Nombre de repas encaissés en @anneeMoins</b> (données STAR, PRESTO, ALISE)<br /><br />
  213. <div class="form-group">
  214. <table id="table-actions" class="table">
  215. <thead>
  216. <tr>
  217. <th>
  218. Type de repas
  219. </th>
  220. <th>
  221. Nombre de repas
  222. </th>
  223. <th>
  224. Nombre de jours en @anneeMoins
  225. </th>
  226. <th>
  227. Nom de l'établissement
  228. </th>
  229. </tr>
  230. </thead>
  231. <tbody>
  232. @for (int i = 0; i < repas.Count(); i++)
  233. {
  234. <tr>
  235. <td>
  236. @repas[i].RestaurationTypesRepa.Libelle
  237. @Html.HiddenFor(model => repas[i].Id)
  238. @Html.HiddenFor(model => repas[i].RestaurationFormulaires_Id)
  239. @Html.HiddenFor(model => repas[i].RestaurationTypesRepas_Id)
  240. </td>
  241. <td>
  242. @Html.EditorFor(model => repas[i].NbRepas, new { htmlAttributes = new { @class = "form-control" } })
  243. @Html.ValidationMessageFor(model => repas[i].NbRepas, "", new { @class = "text-danger" })
  244. </td>
  245. <td>
  246. @Html.EditorFor(model => repas[i].NbJours, new { htmlAttributes = new { @class = "form-control" } })
  247. @Html.ValidationMessageFor(model => repas[i].NbJours, "", new { @class = "text-danger" })
  248. </td>
  249. <td>
  250. @Html.EditorFor(model => repas[i].NomEtablissement, new { htmlAttributes = new { @class = "form-control" } })
  251. @Html.ValidationMessageFor(model => repas[i].NomEtablissement, "", new { @class = "text-danger" })
  252. </td>
  253. </tr>
  254. }
  255. </tbody>
  256. </table>
  257. </div>
  258. <hr />
  259. <b>V. Participation au fond social ou impayés @anneeMoins</b><br /><br />
  260. <div class="form-group">
  261. <table id="table-actions" class="table">
  262. <thead>
  263. <tr>
  264. <th>
  265. </th>
  266. <th>
  267. Fond social
  268. </th>
  269. <th>
  270. Impayés
  271. </th>
  272. </tr>
  273. </thead>
  274. <tbody>
  275. <tr>
  276. <td>
  277. Nombre d'élèves concernés
  278. </td>
  279. <td>
  280. @Html.EditorFor(model => form.NbEleves_FondSocial, new { htmlAttributes = new { @class = "form-control" } })
  281. @Html.ValidationMessageFor(model => form.NbEleves_FondSocial, "", new { @class = "text-danger" })
  282. </td>
  283. <td>
  284. @Html.EditorFor(model => form.NbEleves_Impayes, new { htmlAttributes = new { @class = "form-control" } })
  285. @Html.ValidationMessageFor(model => form.NbEleves_Impayes, "", new { @class = "text-danger" })
  286. </td>
  287. </tr>
  288. <tr>
  289. <td>
  290. Montant
  291. </td>
  292. <td>
  293. @Html.EditorFor(model => form.Montant_FondSocial, new { htmlAttributes = new { @class = "form-control" } })
  294. @Html.ValidationMessageFor(model => form.Montant_FondSocial, "", new { @class = "text-danger" })
  295. </td>
  296. <td>
  297. @Html.EditorFor(model => form.Montant_Impayes, new { htmlAttributes = new { @class = "form-control" } })
  298. @Html.ValidationMessageFor(model => form.Montant_Impayes, "", new { @class = "text-danger" })
  299. </td>
  300. </tr>
  301. </tbody>
  302. </table>
  303. </div>
  304. <hr />
  305. <div class="form-group">
  306. @Html.Label("Avis du conseil d'administration du collège recueilli en date du", htmlAttributes: new { @class = "control-label col-md-5" })
  307. <div class="col-md-7">
  308. @Html.EditorFor(model => form.Date_AvisCA, new { htmlAttributes = new { @class = "form-control" } })
  309. @Html.ValidationMessageFor(model => form.Date_AvisCA, "", new { @class = "text-danger" })
  310. </div>
  311. </div>
  312. <b>Signature du chef d'établissement : </b> <br /><br />
  313. <div class="form-group">
  314. <div class="col-md-1">
  315. @Html.EditorFor(model => form.Ind_Signature, new { htmlAttributes = new { @class = "form-control" } })
  316. @Html.ValidationMessageFor(model => form.Ind_Signature, "", new { @class = "text-danger" })
  317. </div>
  318. @Html.LabelFor(model => form.Ind_Signature, htmlAttributes: new { @class = "control-label" })
  319. </div>
  320. <div class="form-group btn-bar">
  321. <a href=@Url.Action("Index", "Restauration", new { annee_id = form.College.Annee_Id }) class="btn btn-default">Annuler</a>
  322. <input type="submit" value="Enregistrer" class="btn btn-primary" />
  323. </div>
  324. </div>
  325. }