iVendNextDevelopers Request a sandbox

A minimum shelf life on a batch received

The customer asks: Refuse a batch whose remaining shelf life is below our minimum, unless a named role accepts it

What you build

From POS build 2.0.0.654: three Batch fields (days left, shelf days, shelf %), a settings record with the limit and a role, and five save rules, in order: two days_between (days left, shelf days), a percent, a limit shelf days > 0 judged at every save, and a limit shelf % ≥ limit judged on change, its limit and role read from the settings record (contracts/pages/save_rules.md §8, the worked example; recipes/save_rules.md).

Limits

Tell the customer

A batch with less shelf life left than your minimum is refused when it is saved, unless the person saving holds the role you name; a batch made by a receipt is judged at its first later save.

What next

  1. Tell the customer the 4 limits above, and write them into the proposal.
  2. Follow the recipe: Save rules: one tax id per customer group, and a submit kept for a role.
  3. Build and test it on your sandbox (request one if you have none; what is on it).
  4. Run the checks: your own tests, the kit's checks and the money kit's release gate (testing and release).
  5. Release through the customer's own release gate (14. Testing and release); an app other shops install goes through the App library.

Start a project shortlist with this need · Put it in your blueprint · Every need

This card in the kit