// working on new fields for taxes... 6/20/17 state: store_state_tax :: amount (changed from 2 to 5 decimals) store_state_tax_title :: title (new) store_state_tax_license :: license (changed from varchar 25 to varchar 50 and changed name from store_state_tax_id to store_state_tax_license) store_state_usage :: usage (new) limit_store_state_category_list :: filter part category (new) limit_store_state_cust_type_list :: filter customer type (new) calc_store_state_after_discount :: calc taxes before or after discounts (new) store_state_expense_type_id :: expense type (new) store_state_owe_to_payee_id ::pay to vendor id (new) county: store_county_tax :: amount (changed from 2 to 5 decimals) store_county_tax_title :: title (new) store_county_tax_license :: license (changed from varchar 25 to varchar 50 and changed name from store_county_tax_id to store_county_tax_license) store_county_usage :: usage (new) limit_store_county_category_list :: filter part category (new) limit_store_county_cust_type_list :: filter customer type (new) calc_store_county_after_discount :: calc taxes before or after discounts (new) store_county_expense_type_id :: expense type (new) store_county_owe_to_payee_id ::pay to vendor id (new) city: store_city_tax :: amount (changed from 2 to 5 decimals) store_city_tax_title :: title (new) store_city_tax_license :: license (changed from varchar 25 to varchar 50 and changed name from store_city_tax_id to store_city_tax_license) store_city_usage :: usage (new) limit_store_city_category_list :: filter part category (new) limit_store_city_cust_type_list :: filter customer type (new) calc_store_city_after_discount :: calc taxes before or after discounts (new) store_city_expense_type_id :: expense type (new) store_city_owe_to_payee_id ::pay to vendor id (new) other [1-10] tax: other_tax_[1-10] :: amount (both new and changed old ones) other_tax_[1-10]_title :: title (both new and old ones) other_tax_[1-10]_license :: license (new) other_tax_[1-10]_usage :: usage (both new and old ones) limit_other_tax_[1-10]_category_list :: filter part category (both new and old ones) limit_other_tax_[1-10]_cust_type_list :: filter customer type (new) calc_other_tax_[1-10]_after_discount :: calc taxes before or after discounts (new) other_tax_[1-10]_expense_type_id :: expense type (new) other_tax_[1-10]_owe_to_payee_id ::pay to vendor id (new) start and end dates: store_start_date (already) store_end_date (new) use_store_end_date (new) //////////////////////////////////////////////////////////// remove these: store_state_tax_photo state_account_id store_county_tax_photo county_account_id store_city_tax_photo city_account_id other_[1-5]_account_id other[1-5]_tax_fee_id ////////////////////////////////////////////////////////// put back in... locally store_state_tax_id store_county_tax_id store_city_tax_id ///////////////////////////////////////////////////////// quote line items other_tax_[1-5] :: (old - need to be updated to handle 5 decimals) state, county, city, out of area :: (old - need to be updated to handle 5 decimals) other_tax_[6-10] :: (new with 5 decimals) tax_rounding_error taxes_auto_calculated :: 1 for auto and 0 for manual time_id :: default to 0 unless used - mini conversions mini_conversion_id :: (new and tied to the mini conversion details table. use 0 as the default) unit_of_measurement_id (new and we need to match it up with the parent item... default of 1) mini_conversion_uofm_id (new and match with parents... default of 1) mini_conversion_quantity (new with 5 decimals... allow for both positive and negative numbers) mini_conversion_price_per (new with 5 decimals... allow positive numbers) use_mini_converion (1=yes and 0=no - default to 0) - sub inventory sub_reference_id :: (need to change... it is currently called "sub") - discounts in_line_discount_dollar_off :: (check on this... it may already be added into the system - also check for other discount fields. Branch ADI-146) //////////////////////////////////////////////////////////// invoice line items --- by the way, this is corp specific other_tax_[1-5] :: (old - need to be updated to handle 5 decimals) state, county, city, out of area :: (old - need to be updated to handle 5 decimals) other_tax_[6-10] :: (new with 5 decimals) tax_rounding_error taxes_auto_calculated :: 1 for auto and 0 for manual time_id :: default to 0 unless used - Alan is going to add this. time_id_list :: default to blank - Alan is going to add this. - mini conversions mini_conversion_id :: (new and tied to the mini conversion details table. use 0 as the default) mini_conversion_uofm_id (new and match with parents... default of 1) mini_conversion_quantity (new with 5 decimals... allow for both positive and negative numbers) mini_conversion_price_per (new with 5 decimals... allow positive numbers) use_mini_converion (1=yes and 0=no - default to 0) - sub inventory sub_reference_id :: (new defaulted to 0) sub_reference_id_list :: (new default to blank) add a number of indexes for the invoices. they will be searched much more than quotes... - discounts in_line_discount_dollar_off :: (check on this... it may already be added into the system - also check for other discount fields.) //////////////////////////////////////////////////////// new cart pieces special_flag_1 - custom special_flag_2 - custom special_flag_3 - custom special_flag_4 - custom special_flag_5 - custom allow_price_recalc - 1 or a 0 based off of the item - proposed new setting per item item_to_cart_source - barcode value, QR code, button id other_tax_[6-10] - new tax fields tax_rounding_error - tax rounding error bucket taxes_auto_calculated - 1 or a 0 based off auto calc or manual override on tax calcs time_id - default of 0 time_id_list - default of blank mini_conversion_id - the mini converion id - `5001 or `255 - this comes from the conversion_details_[53] table - default 0 mini_conversion_uofm_id - u of m for the conversion mini_conversion_quantity - qty for the conversion mini_conversion_price_per - price for the conversion use_mini_converion - 1 or a 0 based off of the usage of the mini conversion sub_reference_id - tied to sub inventory and sub packages - default 0 sub_reference_id_list - default to blank - possible list of sub id's (mostly for PO's) in_line_discount_dollar_off - default to 0.00 ************** current mini project ********************************* - check the main add to cart and advanced add cart line // side note on use_in_line_discount values. it used to be just 1 (use) or 0 (don't use). // New options: 0=no, 1=% off, 2=$ off, or 3=both (% and $ off). // corp-wide setting - default_discount_type = 1=in-line and 2=standalone // we are seeing that we need the following settings to play through... standaloneTaxRate = total percentage that should be collected standaloneTaxRateBeforeDiscounts = total special percentage - this is the before discount stuff (special) standaloneTaxRateAfterDiscounts = total normal percentage - this is after dicsounts (normal) itemAllowDiscounts = 1=yes and 0=no itemAllowPriceRecalc = 1=yes and 0=no // we also have (other possible vars) customer type settings customer individual settings saved cart values for discounts and campaigns all of the form fields (user interactions) new settings such as: allow discounts, allow price changes, other 6-10 taxes, other rounding bucket, tax calcs before or after discount, in-line dollars off, etc. // we have some code sitting out in bit bucket on branch ADI-146 (pull request #166) that was done by // both Bryan and Brandon almost a year ago. cherry pick as needed... ************* keep listing out variables... let's see what we have to deal with... ************************ locked_original_quantity - original qty as it hits the cart - reference locked_original_price_per - original price per as it hits the cart - reference locked_original_price_total - original extended price as it hits the cart - reference locked_original_tax_category_id - original tax category id as it hits the cart - reference allow_discounts - 1 or a 0 based off of the item - proposed new setting per item - ways to add to the cart... also includes the item_to_cart_source value(s) simple search - "parent/sub basic parts search" advanced search - "parent/sub advanced parts search" page view - per item - "parent - view parts page" - "subs - view parts page" advanced add to cart - "advanced add to cart" add special line items - "special line item - add item to cart page" my cart favorite buttons - multiple options. - "button - advanced add cart multi page" - "button - advanced add cart smart page" - "button - basic add 1 parent to cart" - "button - basic add 1 sub to cart" - "button - custom add parent to cart" - "button - custom add sub to cart" barcodes - "barcode from parts home - single parent match" - "barcode from parts home - single sub match" qr codes - *********** need ************** sub inventory - multiple options. - "sub inventory view page" convert parent to child - "convert parent to child" - "scan - convert parent to child" mini conversions - new recipe/build - "build recipe page" cart quick search - mixed sources - "subs - mixed sources - cart quick search page" - "general parts - mixed sources - cart quick search page" - "barcode from cart quick search - basic part - [actual barcode]" - "barcode from cart quick search - parent barcode/rfid tag - open sub - [actual barcode]" - "barcode from cart quick search - sub inventory - [actual barcode]" start cart - "start cart page" - "start cart page - forced form scope" - "start cart page - forced url scope" add to cart - redirect to itself. - "add discount - end of add to cart page" update cart page(s) - multiple - "add discount - basic update cart page" - "add discount - discount logic - update cart 2 page" profit calculator - "discount - profit calculator page" restore to cart duplicate to cart review cart - "CC Comply" (custom) transfers internal tickets stock/unit sales process wholesale carts custom custom/pos_my_cart_favorites.cfm custom/view_cart_include_favorites.cfm custom/add_to_cart.cfm - "add discount - end of custom add to cart page" custom/my_favorite_cart_destination.cfm custom/pos_my_favorite_cart_destination.cfm custom/scan_qr_code_interface_action.cfm custom/steve's new campground reservation stuff (new - may need to ask) files from steve black box stuff ecommerce - ways to update cart update cart button - normal process basic line by line advanced line by line bulk edit bulk apply discounts new customer added or changed to the cart ///////////////////////////////////////////////////////////// new fields per part or item - this could be added later. allow_discounts tinyint(1) default to 1 allow_price_recalc tinyint(1) default to 1 allowDiscounts allowPriceRecalc /////////////////////////////////////////////////////////////// important notes about the database updates... this is just an idea - changing the use_mini_conversion = 0, on the po/invoice lines to use_mini_conversion = 2 (part of the script on the database updates) (we could then key off the value of 2. real values are 1's and 0's) this would allow us to have the users help us cycle through the id's and make the updates. use their clicks and page navigation as a way to help us out. (slowly bring things into play) //////////////////////////////////////////////////////// scratch... 2,3,4,5,7,8,9 indexes on the action page: j, k, p, h, r, q line 638 on advanced_add_cart_line.cfm - on the phone with calvin - if we drop columns and indexes, we have to be careful about when we want to do certain updates