Difference between revisions of "VbzCart/packages"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
(Created page with "See VbzCart/code/VBA/Form frmPackage and VbzCart/code/VBA/clsPackage for how this used to work in Access. ==Fetching Items== This is where items are added to the packa...")
 
(update/simplification)
Line 3: Line 3:
 
This is where items are added to the package.
 
This is where items are added to the package.
 
* The web form indicates the locations of stock that might be used to fill the order.
 
* The web form indicates the locations of stock that might be used to fill the order.
* User enters the quantity to use (remove) from each location, and presses one of the following buttons:
+
* User enters the quantity to use (remove) from each location, and presses "Fetch Stock" button.
* "add to package" if the package has already been created
+
** If "do it for real" box is not checked, subsequent data changes are displayed as hypothetical rather than actually being done.
* "create package" if the package has not yet been created
+
* If the current package is "new", then a package record is created.
* "simulate" to confirm what actions would be taken
+
* The code then creates or updates package line records as necessary to accommodate the stock being added to the package.
** it's not clear if this has any use besides debugging
+
* The code recalculates:
* The code then creates package line records as necessary to accommodate the stock being added to the package.
 
* After any modification of the package's contents, the code recalculates:
 
 
** item sale amount(s)
 
** item sale amount(s)
 
** per-item shipping (total)
 
** per-item shipping (total)

Revision as of 18:42, 13 May 2014

See VbzCart/code/VBA/Form frmPackage and VbzCart/code/VBA/clsPackage for how this used to work in Access.

Fetching Items

This is where items are added to the package.

  • The web form indicates the locations of stock that might be used to fill the order.
  • User enters the quantity to use (remove) from each location, and presses "Fetch Stock" button.
    • If "do it for real" box is not checked, subsequent data changes are displayed as hypothetical rather than actually being done.
  • If the current package is "new", then a package record is created.
  • The code then creates or updates package line records as necessary to accommodate the stock being added to the package.
  • The code recalculates:
    • item sale amount(s)
    • per-item shipping (total)
    • per-package shipping (max)

Finalizing

This is where we sort of make the package "official": statuses are updated, totals computed, etc.

  • (We used to increment a "QtyDone" field in ord_lines for each line in the package, but now we recalculate that dynamically (as needed) by summing up the package quantities.)
  • (We used to calculate totals at this stage, but that is now done whenever the package contents are modified.)
  • Add a transaction record to the order for the amount owed for this package.
  • Time-stamp package as "finished".