Results 1 to 10 of 245

Hybrid View

  1. #1
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,511
    Plugin Contributions
    126

    Default Re: Monthly Sales and Tax Summary Report [support thread]

    Just hire her. I'm sure she'll be glad to take your paid professional engagement. Easy peasy!
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  2. #2
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,684
    Plugin Contributions
    11

    Default Re: Monthly Sales and Tax Summary Report [support thread]

    Okay, I'm going to bring this here as I've worn out the trifocals looking at this thing. I've attached the whole file but, I'll address two areas of YOUR_ADMIN/stats_monthly_sales.php here for brevity.

    As previously stated and verified, the code at lines 126 thru 138 incorrectly identify o.delivery_state in that this causes the code to look in the wrong table when accessing mysql.
    Code:
        //Zone Only SQL appendage    $zone_only_sql = '';
        $zone_selected = false;
        if ($_POST['zone_only'] != '' && !in_array('all', $_POST['zone_only'])) {
            $get_zone_only = $_POST['zone_only'];
            $zone_selected = true;
            $zoned_sql = '';
            foreach ($get_zone_only as $selectedZone) {
                $zoned_sql .= "o.delivery_state LIKE '" . $selectedZone . "' OR ";
            }
            $zoned_sql = rtrim($zoned_sql, "OR ");
            $zone_only_sql = " AND (" . $zoned_sql . ") ";
        }
    The $zone_only_sql is used on lines 164, 292, 476, 560, 572, 583, 593, 605, and 617 to formulate different presentations.
    Apparently, most of those occurrences work just fine. It's only when selecting a particular state, city, or country that the unfound delivery_state breaks the operation.

    I know what information I need (delivery_state) and I know which table it needs to come from (orders) but I can't figure out how to change "o.delivery_state LIKE '" to get the info from the correct table.

    Here's an opportunity to teach me to fish beyond just baiting the hook and throwing it in the water.

    THANX for any assistance.

    PS for anyone wanting to go the extra mile, it would be nice to sort by country as well
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

 

 

Similar Threads

  1. Local Sales Tax Mod - Support Thread
    By LadyHLG in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 658
    Last Post: 22 Dec 2025, 05:29 PM
  2. v151 codeTrio Sales Summary Graph v1.0 [Support Thread]
    By imranulh in forum All Other Contributions/Addons
    Replies: 15
    Last Post: 25 Jul 2020, 04:00 AM
  3. v151 Sales Report with Graphs support thread
    By JacobBushnell in forum Addon Admin Tools
    Replies: 17
    Last Post: 25 Jul 2019, 02:27 PM
  4. Monthly Sales Report
    By Bruce1952 in forum General Questions
    Replies: 3
    Last Post: 10 Aug 2010, 01:06 PM
  5. Sales Tax Summary Report
    By fred_artemis in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 25 Mar 2008, 02:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg