Basic Assignments
 
Options & Settings
 
Main Time Information
Color Code: Yellow
Created By: Shannon Scoffield
Created Date/Time: 4/13/2015 4:28 pm
 
Action Status: Blank (new)
Show On The Web: Yes - (public)
 
Time Id: 3739
Template/Type: Other Documentation
Title/Caption: Tech - Flow & Java Script for Advanced Cart Edit
Start Date: 12/17/2014
Main Status: Active

click to enlarge - photo by: Shannon Scoffield -
click to enlarge - photo by: Shannon Scoffield -
 


Notes:
Flow & Java script for advanced cart edit:
Outside or global:
- Standalone tax rate = “21.12” outside
- Real discount tax category id = 2 or 5 tax category id for discounts
- Back calcs done “no”
- Temp hide cost “yes” or “no”
On function:
- 1 = unknown price per
- 2 = unknown quantity
- It looks up values and rolls accordingly
- It’s main job is backing out taxes otherwise it doesn’t do much

Functions:
- Check text length (main field result length, result remaining, limit chars)
- Format as decimal (number in)
- Format as decimal five (number in)
- Local tax calc (tax category id, amount to tax
- Local tax category reset (tax category id)
- Run back calc (1 or 2)
- Price helper calc (blank)
o Looks up all known values right from the form fields
- Resume auto calc (blank)
- Disable main submit (blank)

New Values:
- Main original list price
- Main default discount type =
o 0 = in-line
o 1 = standalone
o 2 = remove – use set price
o 3 = remove – use original
- Use original list extended
- Use in-line discount per line
- Use in-line discount extended
Values for the price helper calc ( ) function:
- Main price total (new) = total goal
- Main auto calc – checkbox – yes/no auto calc
- Main qty – qty
- Main cost – cost
- Main mark-up value – mark-up
- Main saleprice – discounted price per
- Main discount – discount or $’s off (simple decimal)
- Main discount type – drop down – (index) –
o 0 = % off
o 1 = $ off
- Main default discount type (new) – drop down
o 0 = in-line
o 1 = standalone
o 2 = remove – use set price
o 3 = remove – use original
- Main original list price untouched – unchanged original list
- Main original list price – original list (changeable)
- Main starting saleprice – starting saleprice before any changes
- Tax category index – drop down index
- Tax category value – tax category id
- Tax category name – tax category name
- Use discount tax category id – real discount category id
- Use price total one = check box for unknown price per
- Use price total two = checkbox for unknown quantity
- Use discount amount - $ amount to take off
- Use adjusted price – for standalone discounts… extended price – discount amount
- Use profit per item
- Use extended cost
- Use extended price
- Use extended profit
o Price or adjusted price minus cost
- Use profit percentage –
o (0 or extended profit, divided by price or adjusted price, then times by 100)
- Use markup value
- Use tax value
- Use total with tax
- Use discount tax value
o Calculated tax on a standalone discount
- use discount total with tax
o sum (discount amount & tax)
- Use original list extended (new)
- Use discounted price extended
o Extended discounted price
- Use in-line discount (new)
o (0 or 1)
- Use in-line discount per line (new)
- Use in-line discount extended (new)
- Use grand total value
o Normal total w/tax & discount total w/tax
o Stands alone discount only
- Use price verbage
- Use tax verbage
- Use discount verbage
- Use sale price verbage
- Use discounted price verbage

Flow for in-line discounts:
- Grab the values (old & existing)
- Validate the vales
- Check for show/hide
o Set price to $0 if hide
- Do simple math to get new extended
- Check for discount removals
o Reset and back out as needed
- Recalc extended based off of quantity
o Original list extended
o In-line discount extended
- If check for in-line discount
o Discount between 0-100 and other apply discount staff
o Convert the discount into a percentage
o Math original extended and percentage = in-line discount extended
o Math in-line discount extended / qty = in-line discount per line
o Math new saleprice = original list = in-line discount per
o Math new extended = new saleprice * qty
- Else
o Simple price change
o Reset discount stuff to 0’s
o Reset originals
- Recalc taxes
- Reset prices & extended & taxes
If with tax included (17):
If in-line discount:
- Math – in-line discount per line = original list – new saleprice
- Math – in-line discount extended = qty * in-line discount per line
- If original >= price & not $0 extended
o Math – temp decimal = in-line discount extended / original list price extended
o Math – reset percentage base on temp decimal
- Else:
o Reset to 0’s
o If original list < (less than) saleprice
o Reset originals
- Else not in-line discount
o Reset to 0’s
- Math & basic clean-up

Discount Message:
- Original price extended (original) = discount percentage % (discount) = extended price (price) = extended cost (cost) = profit (profit) ::profit% = profit percentage %:: tax = total tax :: total w/tax = total with tax