{"v":"<p dir=\"auto\"><strong>Status: built and checked on dev. Not committed or deployed yet.<\/strong><\/p>\n<p dir=\"auto\"><strong>What it does<\/strong><\/p>\n<ul dir=\"auto\">\n<li>The visit compares how many days of the week the schedule works (all attendants together) with the schedule in VESTA when the visit started.<\/li>\n<li>If a day is added or dropped, a red note under the authorized hours says: <em>&#34;The schedule has hours on 4 days a week, and the schedule in VESTA has 5 days. Hours can move from one day to another, but the number of days can&#39;t change. Only a new authorization can change it.&#34;<\/em><\/li>\n<li>The same sentence is listed on <strong>Check the answers<\/strong>, under the weekly schedule, and the forms can&#39;t be generated until the number of days matches. It sits with the &#34;over the authorized hours&#34; problem as one entry for the week.<\/li>\n<li>If VESTA has no schedule for the client, there is nothing to compare, so the rule doesn&#39;t apply.<\/li>\n<\/ul>\n<p dir=\"auto\"><strong>One design call: it is a hard stop at the check, not a refusal at save.<\/strong> The schedule saves one day at a time. Moving Friday&#39;s hours to Saturday therefore passes through a week with one day more (or one fewer). If the save refused that, a day could never be moved. So the note shows while the hours are being moved and goes away once the count is back.<\/p>\n<p dir=\"auto\"><strong>Built as &#34;per week&#34;<\/strong>, the same period as the hours. <strong>Jane:<\/strong> please confirm that is what &#34;for a given period&#34; means.<\/p>\n<p dir=\"auto\"><strong>Where:<\/strong> <code>form_v2_schedule_record_days()<\/code>, <code>form_v2_schedule_days_status()<\/code>, <code>form_v2_schedule_week()<\/code> now returns <code>days<\/code>, and <code>form_v2_visit_issues()<\/code> takes <code>record_days<\/code> (<code>code\/form_v2_visit_rules.inc.php<\/code>). The payload&#39;s <code>record_days<\/code> (<code>code\/form_v2_visit.inc.php<\/code>) and the note in <code>pages\/visit-v2.php<\/code>. Tests in <code>scripts\/test-form-v2-visit-rules.php<\/code> (251 pass).<\/p>\n<p dir=\"auto\"><strong>Checked on dev<\/strong> (visit 75: VESTA schedule Mon\u2013Fri): clearing Friday on screen shows the note in red, and nothing was saved.<\/p>\n"}