Question: Error In Product Report It Shows No Real Profit

Error In Product Report It Shows No Real Profit

Error. The Profit does not show it real, when a new purchase is made with a new price of a product, it continues to show the profit based on the previous price. even if the purchase price of

HM

Herman Morales

Asked

Error. The Profit does not show it real, when a new purchase is made with a new price of a product, it continues to show the profit based on the previous price. even if the purchase price of the product is changed in the product list.

Attached images of product purchase, and sample of the product report with the profit.

  • MS

    Mian Saleem

    Answered

    Hello,

    Simple POS uses the price and cost values from products table. If you have purchased the item on different price, then you will need to update the product cost too.

    There is no inventory accounting or track of purchased price.

    Thank you

  • HM

    Herman Morales

    Answered

    Change the purchase price of the product in the product list, in the report continue to perform the calculation with the previous price to see the profit.

  • MS

    Mian Saleem

    Answered

    Hello,

    Changing the cost/price will not have any effect on previous records. It will be used for future sales only.

    This is the query used to generate products report

    SELECT
    	tec_products.id AS id,
    	tec_products.name,
    	tec_products.code,
    	COALESCE(sum(tec_sale_items.quantity), 0) AS sold,
    	ROUND(COALESCE(((sum(tec_sale_items.subtotal) * tec_products.tax) / 100), 0), 2) AS tax,
    	COALESCE(sum(tec_sale_items.quantity) * tec_sale_items.cost, 0) AS
    	COST,
    	COALESCE(sum(tec_sale_items.subtotal), 0) AS income,
    	ROUND((COALESCE(sum(tec_sale_items.subtotal), 0)) - COALESCE(sum(tec_sale_items.quantity) * tec_sale_items.cost, 0) - COALESCE(((sum(tec_sale_items.subtotal) * tec_products.tax) / 100), 0), 2) AS profit
    FROM
    	`tec_sale_items`
    	LEFT JOIN `tec_products` ON `tec_sale_items`.`product_id` = `tec_products`.`id`
    	LEFT JOIN `tec_sales` ON `tec_sale_items`.`sale_id` = `tec_sales`.`id`
    WHERE
    	`tec_sales`.`store_id` = '1'
    GROUP BY
    	`tec_products`.`id`
    ORDER BY
    	`id` DESC
    LIMIT 10;
    

    Thank you

  • Login to Reply