[
  {
    "version": "prd.6.2.0",
    "date": "August 2026",
    "notes": [
      "Joined the PG 7 ERP — sign in once and open Production from the central Launchpad.",
      "Unified profile menu: role badge, 'Back to Launchpad', and logout now match the rest of the suite.",
      "Production error logs now feed the central System Logs viewer for administrators."
    ]
  },
  {
    "version": "prd.6.2.1",
    "date": "2026-08-19",
    "notes": [
      "Production reports now export to PDF — Egg Production, Egg Size, and Input Production reports produce a clean PDF with a signatory block and no on-screen gridlines, instead of relying on the browser's print dialog.",
      "Each report and its PDF export are now built from a single source, so what you see on screen and what prints are always identical.",
      "Dashboard charts refreshed to match the Payroll look and feel — consistent chart cards and KPI tiles, and a sign-in check so charts no longer briefly show data before you're authenticated.",
      "Production styling unified with the rest of the suite — action buttons switched to the shared icon style, configuration tables adopted the standard table look, and the Egg Production report is now a clean card layout."
    ]
  },
  {
    "version": "prd.6.2.2",
    "date": "2026-08-21",
    "notes": [
      "Input Production sheets (Egg Production, Egg Size, Feed Delivery, Temperature) redesigned to match the report card layout — cleaner headers, consistent action buttons, a trash icon for deleting rows, and tables that scroll sideways within the card instead of overflowing on smaller screens.",
      "Input boxes across all Input Production sheets are now sized to their content, so the sheets are more compact and easier to read.",
      "All calculated values on the input sheets — size totals, weighted averages, variance, feed consumption, age in weeks, and beginning / ending inventory — are now computed on the server from the raw numbers you enter, so the stored figures stay consistent and can't be thrown off by out-of-date values in the browser.",
      "Each input sheet shows a 'LAST SAVED' stamp (date and who saved it); the stamp stays hidden until the sheet has actually been saved.",
      "Feed Delivery: beginning inventory now carries forward from the previous day's ending inventory, with a Recalculate button to rebuild the chain if a gap appears.",
      "Input Production PDF export now shades the read-only columns (such as H-TOTAL and Depletion) to match how they look on screen, and repeated batch names are hidden the same way they are in the sheet.",
      "Fixed: the sub-total on the Egg Production sheet now updates immediately as you type instead of lagging behind.",
      "Fixed: uploading an Egg Production sheet no longer fails with a server error.",
      "Fixed: Age in Weeks is now always recorded correctly when saving the Egg Size sheet.",
      "Fixed: reopening a sheet no longer triggers an accidental re-save of rows that were not changed.",
      "Fixed: an invalid saved date that previously displayed as '11/30/-0001' now shows cleanly.",
      "Controllers › Egg Standards modernized to match the reports — card layout, standard action buttons, a trash icon for deletes, a 'LAST UPDATED' stamp, and tighter columns.",
      "Controllers › Egg Standards: 'Add New' now opens a dialog to enter the new standard instead of adding a blank inline row.",
      "Production's Add User, Set Password, and Add Role dialogs updated to the current dialog style for a consistent look across the app."
    ]
  },
  {
    "version": "prd.6.3.0",
    "date": "2026-08-28",
    "notes": [
      "Transaction receipts (Delivery Receipt, Invoice, Official Receipt) now look on screen exactly like the exported PDF — matching fonts, sizing, logo, and the shaded EggTray Charge row — so the preview is a true reflection of what prints.",
      "Pending Delivery Receipts can now be edited without starting over — change the date, customer, or item figures and save in place; only Pending receipts are editable, and Invoiced or Paid receipts stay read-only.",
      "Changing the customer on a Delivery Receipt now correctly refreshes the price effectivity to match that customer.",
      "The customer on a receipt is now chosen from a dropdown of existing customers instead of being typed by hand, avoiding spelling mismatches.",
      "Input Production sheets (Egg Production, Egg Size, Feed Delivery, Temperature) now Print/Export to PDF the same way Reports and Transactions do, and each has its own row under System Config › Print/Export.",
      "Batch Details: building values can now be edited directly in the table, with a green checkmark confirming each save.",
      "Batch Details: the exclude-batch, building, and status switches now ask for confirmation before changing, since they affect what appears in the reports.",
      "Filters reordered for a more natural flow — Batch Details and Pricing now show the dropdown filter first and the search box after; Pricing also gained a customer filter.",
      "Help tooltips across the app refreshed to a single, subtle information-icon style.",
      "'Add New' buttons are now emphasized in a darker style so they're easier to spot.",
      "Send Test Email button restyled, category headings recoloured to match Payroll, and the browser tab titles for Print/Export and Email corrected.",
      "Fixed: the status badge on Batch Details and other tables now updates immediately after saving instead of only after a page refresh.",
      "Performance: added database indexes to the busiest tables (Input Production, Egg Weight, Feed Delivery, Delivery Receipts, Invoices, Temperature, and Pricing) so lookups by date, batch, and customer stay fast as records keep growing.",
      "Housekeeping: removed unused internal helper code and retired obsolete database tables left over from the move to the central ERP identity system, for a leaner and easier-to-maintain codebase.",
      "Prices and invoice totals are now stored as exact two-decimal currency values, removing the tiny rounding drift that the previous floating-point storage could introduce over time.",
      "Delivery Receipt storage streamlined — dropped 12 unused per-size 'crate' columns whose value is always derived on the fly from trays and trays-per-crate, so nothing on screen changes.",
      "Internal: the verbose per-save change log that wrote ever-growing text files is now off by default (can be re-enabled for debugging), and leftover debug write-outs during Input refresh were removed.",
      "Simplified session handling to match the rest of the suite: your selected date, batch, and view now reset to sensible defaults on each fresh sign-in rather than being carried over from a previous session.",
      "Batch Details: the building list is now a clean per-building ledger — each building shows as a bold tag with its hen count and an on/off toggle, active buildings stand out (solid dark tag, green toggle) while excluded ones are outlined and struck through, and a blue 'X of Y active' summary sits at the top of each batch."
    ]
  },
  {
    "version": "prd.6.3.1",
    "date": "2026-09-04",
    "notes": [
      "Production Dashboard charts now load in a fraction of the time — the six charts are fetched in a single request and their underlying queries were optimized, so the dashboard opens quickly even as records grow.",
      "System Config › User Management now saves without reloading the whole page — editing roles, users, or permissions refreshes just that table (with a brief loading animation) and keeps you on the tab you were working in, matching the rest of the suite.",
      "Batch Details redesigned: Batch Name now comes before Batch Code, a view button beside each batch opens its details dialog, and the Delete action moved into that dialog. Building-balance edits now show the green 'saved' check to the left of the value so it no longer overlaps the number.",
      "Input Production: clearer guidance when a sheet has no data yet — including a one-click 'Switch to PRE data' link — and the 'Add New' button now stays hidden until a table has been generated. Each input sheet also has its own paper-size and orientation control for PDF export.",
      "System Config › Print/Export rebuilt to match Payroll — a single per-document table for paper size and orientation, cleaner borderless dropdowns, and a 'Save Settings' button in the card header.",
      "New 'Who's online' indicator (bottom-right) shows who's currently active across the suite — now on the Production side and the Launchpad, not just Payroll.",
      "Consistent typography and tooltips across the app, matching Payroll and the Launchpad.",
      "Fixed: date fields and dropdowns no longer show an overlapping validation icon, and the Delivery Receipt customer field now defaults to 'SELECT'."
    ]
  },
  {
    "version": "prd.6.3.2",
    "date": "2026-09-09",
    "notes": [
      "System Config › User Management: the Users search box now shows its magnifier icon, matching the other tables in the app.",
      "Fixed: uploading a Feed Delivery sheet no longer creates duplicate building rows — a date is now published only once, and an accidental second upload is blocked instead of appending another copy of each building.",
      "Fixed: numbers typed on an Input Production sheet are now saved before the sheet is uploaded, so a figure entered right before pressing Upload can no longer be published blank or lost.",
      "Fixed: the Feed Delivery live preview no longer logs a 'No valid source' error when the PRE / POST toggle isn't available — it falls back to your current data source, and the lookup now requires sign-in like every other data request.",
      "Internal: renamed core database tables to clearer names — Input Production → production (PRE-data → predata_prod) and Input Temperature → temperature — with no change to anything on screen.",
      "Internal: consolidated Production's settings into one configuration table (production_sys_config, matching Payroll's naming) and folded the separate report PDF paper / orientation settings into it; Email and Print/Export work exactly as before.",
      "Internal: the dashboard address is now home.php?p=db to match the rest of the suite (old links still redirect), page routing now uses a fixed list of valid pages, and sign-in / idle-session handling was tidied to match Payroll.",
      "Internal: moved the last inline page scripts out of the home page into dedicated JavaScript files (Payroll-style), for a leaner page and easier maintenance — no change in behavior.",
      "Internal: minor housekeeping to align User Management with the suite-wide form-control styling and the shared session-identity naming cleanup — no change to how anything works.",
      "On a phone, the filter bars now stack one control per row (Reports, Input Production, Batch Details, Transactions, and System Config), and the 'Last Updated / Last Transaction / Last Fetched / Last Saved' stamp now sits on the same row as the Filter label instead of dropping below the controls.",
      "On a phone, the header actions on Transactions, Reports, and Input Production now collapse into a single 'Actions' menu instead of overflowing the card header, while staying as inline buttons on desktop.",
      "Internal: the show/hide-buttons helper now updates every copy of a button, so an action shown in both the desktop row and the mobile Actions menu stays consistent.",
      "System Config › User Management: each user row now has an Edit button that opens a dialog to change the user's name, username, and role in one place, matching Payroll (you can't change the role on your own account).",
      "Fixed: when editing an existing Delivery Receipt, the Date can now be changed again — every field is editable except Price Effectivity and DR No., and changing the Date refreshes the Price Effectivity just like changing the Customer does."
    ]
  },
  {
    "version": "prd.6.3.3",
    "date": "2026-09-11",
    "notes": [
      "System Config › User Management › UAC: Print/Export is now a permission you can grant per role, so administrators can let specific non-admin roles change the PDF paper size and orientation used for reports, receipts, and input sheets. It stays admin-only until granted — a role sees the Print/Export page and the per-report/print settings gear only once its Print/Export permission is set to Edit.",
      "Dashboard › Batch Performance by Age (Weeks) charts realigned with the client's reference workbook: the Bad Eggs chart's GRM/Bird line now reads grams per bird per day (previously seven times too high), and Livability % now nets the current week's depletion so it matches the reference figures.",
      "Dashboard: the Hen Housed and Hen Day charts now draw the standard as a shaded band with the actual value as a clean line on top, making the standard-vs-actual comparison easier to read.",
      "Security: access control is now enforced on the server for every data screen and for every save, update, and delete — not just hidden in the menus. You can only open the pages and perform the actions your role is granted in System Config › User Management; anything else is refused. Previously some data screens and actions could still be reached by a direct request even when the menu hid them.",
      "Security: every save, update, and delete is now protected against cross-site request forgery, so changes can only be submitted from within the signed-in app.",
      "New — System Config › Change Audit (administrators): every add, edit, and delete across Production is now recorded to a durable, searchable history showing who changed which field, from what value to what, and when. This replaces the old text-file change log and lays the groundwork for change-tracking reports.",
      "Fixed: the Dashboard's Bad Eggs figures now total the whole age-week's rejects instead of a single day's, so the bad-egg counts and percentages on the Batch Performance chart are no longer heavily undercounted.",
      "Failed actions now return a clear on-screen reason and the correct status instead of a silent empty response — common cases such as missing input, a record that no longer exists, or an action you're not permitted to perform now show a specific message."
    ]
  }
]
