

===============================================================================
User: 17  |  Time: 12:19:47  |  URL: /customers/apple_clinic/InventoryAjax/monthly_sales_report_ajax

Array
(
    [0] => 23000
    [1] => 1052
    [2] => Column 'Logged_ID' in WHERE is ambiguous
)

SELECT d.Product_ID,             sum(d.Product_Total_Price*i.current_rate*p.default_view_rate) as price,             sum(d.Product_Quantity/p.default_view_rate) as qty,             DATE_FORMAT(i.Invoice_Date,"%Y") as year,             DATE_FORMAT(i.Invoice_Date,"%m") as month             FROM tbl_invoice_products_details d join tbl_invoices i              on i.Invoice_ID_Auto = d.Invoice_ID_Auto             join tbl_stock_products p on p.Product_ID = d.Product_ID             where d.Product_ID in (1873,1874,1875,1876,1877,1878,1879,1880,1881,1882)    AND Logged_ID in (17) and is_actual = 0              group by d.Product_ID,year(i.Invoice_Date),month(i.Invoice_Date)


===============================================================================
User: 17  |  Time: 12:20:10  |  URL: /customers/apple_clinic/InventoryAjax/monthly_sales_report_ajax

Array
(
    [0] => 23000
    [1] => 1052
    [2] => Column 'branch_id' in WHERE is ambiguous
)

SELECT d.Product_ID,             sum(d.Product_Total_Price*i.current_rate*p.default_view_rate) as price,             sum(d.Product_Quantity/p.default_view_rate) as qty,             DATE_FORMAT(i.Invoice_Date,"%Y") as year,             DATE_FORMAT(i.Invoice_Date,"%m") as month             FROM tbl_invoice_products_details d join tbl_invoices i              on i.Invoice_ID_Auto = d.Invoice_ID_Auto             join tbl_stock_products p on p.Product_ID = d.Product_ID             where d.Product_ID in (1873,1874,1875,1876,1877,1878,1879,1880,1881,1882)    AND branch_id = "1"  AND Logged_ID in (17) and is_actual = 0              group by d.Product_ID,year(i.Invoice_Date),month(i.Invoice_Date)


===============================================================================
User: 17  |  Time: 12:20:34  |  URL: /customers/apple_clinic/InventoryAjax/monthly_sales_report_ajax

Array
(
    [0] => 23000
    [1] => 1052
    [2] => Column 'branch_id' in WHERE is ambiguous
)

SELECT d.Product_ID,             sum(d.Product_Total_Price*i.current_rate*p.default_view_rate) as price,             sum(d.Product_Quantity/p.default_view_rate) as qty,             DATE_FORMAT(i.Invoice_Date,"%Y") as year,             DATE_FORMAT(i.Invoice_Date,"%m") as month             FROM tbl_invoice_products_details d join tbl_invoices i              on i.Invoice_ID_Auto = d.Invoice_ID_Auto             join tbl_stock_products p on p.Product_ID = d.Product_ID             where d.Product_ID in (1873,1874,1875,1876,1877,1878,1879,1880,1881,1882)    AND branch_id = "1"  AND Logged_ID in (17) and is_actual = 0              group by d.Product_ID,year(i.Invoice_Date),month(i.Invoice_Date)


===============================================================================
User: 17  |  Time: 12:20:39  |  URL: /customers/apple_clinic/InventoryAjax/monthly_sales_report_ajax

Array
(
    [0] => 23000
    [1] => 1052
    [2] => Column 'branch_id' in WHERE is ambiguous
)

SELECT d.Product_ID,             sum(d.Product_Total_Price*i.current_rate*p.default_view_rate) as price,             sum(d.Product_Quantity/p.default_view_rate) as qty,             DATE_FORMAT(i.Invoice_Date,"%Y") as year,             DATE_FORMAT(i.Invoice_Date,"%m") as month             FROM tbl_invoice_products_details d join tbl_invoices i              on i.Invoice_ID_Auto = d.Invoice_ID_Auto             join tbl_stock_products p on p.Product_ID = d.Product_ID             where d.Product_ID in (1873,1874,1875,1876,1877,1878,1879,1880,1881,1882,1883,1884,1885,1886,1887,1888,1889,1890,1891,1892,1893,1894,1895,1896,1897,1898,1899,1900,1901,1902,1903,1904,1905,1906,1907,1908,1909,1910,1911,1912,1913,1914,1915,1916,1917,1918,1919,1920,1921,1922,1923,1924,1925,1926,1927,1928,1929,1930,1931,1932,1933,1934,1935,1936,1937,1938,1939,1940,1941,1942,1943,1944,1945,1946,1947,1948,1949,1950,1951,1952,1953,1954,1955,1956,1957,1958,1959,1960,1961,1962,1963,1964,1965,1966,1967,1968,1969,1970,1971,1972,1973,1974,1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026,2027,2028,2029,2030,2031,2032,2033,2034,2035,2036,2037,2038,2039,2040,2041,2042,2043,2044,2045,2046,2047,2048,2049,2050,2051,2052,2053,2054,2055,2056,2057,2058,2059,2060,2061,2062,2063,2064,2065,2066,2067,2068,2069,2070,2071,2072,2073,2074,2075,2076,2077,2078,2079,2080,2081,2082,2083,2084,2085,2086,2087,2088,2089,2090,2091,2092,2093,2094,2095,2096,2097,2098,2099,2100,2101,2102,2103,2104,2105,2106,2107,2108,2109,2110,2111,2112,2113,2114,2115,2116,2117,2118,2119,2120,2121,2122,2123,2124,2125,2126,2127,2128,2129,2130,2131,2132,2133,2134,2135,2136,2137,2138,2139,2140,2141,2142,2143,2144,2145,2146,2147,2148,2149,2150,2151,2152,2153,2154,2155,2156,2157,2158,2159,2160,2161,2162,2163,2164,2165,2166,2167,2168,2169,2170,2171,2172,2173,2174,2175,2176,2177,2178,2179,2180,2181,2182,2183,2184,2185,2186,2187,2188,2189,2190,2191,2192,2193,2194,2195,2196,2197,2198,2199,2200,2201,2202,2203,2204,2205,2206,2207,2208,2209,2210,2211,2212,2213,2214,2215,2216,2217,2218,2219,2220,2221,2222,2223,2224,2225,2226,2227,2228,2229,2230,2384,2385,2386,2387,2388,2389,2390,2391,2392,2393,2394,2395,2396,2397,2398,2399,2400,2401,2402,2403,2404,2405,2406,2407,2408,2409,2410,2411,2412,2413,2414,2415,2416,2417,2418,2419,2420,2421,2422,2423,2424,2425,2426,2427,2428,2429,2430,2431,2432,2433,2434,2435,2436,2437,2438,2439,2440,2441,2442,2443,2444,2445,2446,2447,2448,2449,2450,2451,2452,2453,2454,2455,2456,2457,2458,2459,2460,2461,2462,2463,2464,2465,2466,2467,2468,2469,2470,2471,2472,2473,2474,2475,2476,2477,2478,2479,2480,2481,2482,2483,2484,2485,2486,2487,2488,2489,2490,2491,2492,2493,2494,2495,2496,2497,2498,2499,2500,2501,2502,2503,2504,2505,2506,2507,2508,2509,2510,2511,2512,2514,2517,2518,2519,2520,2521,2522,2523,2524,2525,2526,2527,2528,2529,2530,2531,2532,2533,2534,2535,2536,2537,2538,2539,2540,2541,2542,2543,2544,2545,2546,2547,2548,2549,2550,2551,2552,2553,2554,2555,2556,2557,2558,2559,2560,2561,2562,2563,2564,2565,2566,2567,2568,2569,2570,2571,2572,2573,2574,2575,2576,2577,2578,2579,2580,2581,2582,2583,2584,2585,2586,2587,2588,2589,2590,2591,2592,2593,2594,2595,2596,2597,2598,2599,2600,2601,2602,2603,2604,2605,2606,2607,2608,2609,2610,2611,2612,2613,2614,2615,2616,2617,2618,2619,2620,2621,2622,2623,2624,2625,2626,2627,2628,2629,2630,2631,2632,2633,2634,2635,2636,2637,2638,2639,2640,2641,2642)    AND branch_id = "1"  AND Logged_ID in (17) and is_actual = 0              group by d.Product_ID,year(i.Invoice_Date),month(i.Invoice_Date)
