Create cost price

Created on 11 October 2022, over 2 years ago
Updated 13 October 2023, over 1 year ago

Hi everybody.

I'm trying to make a patch for this module, i'm looking to add a price cost to the report view.
I have this field in the products which If added to the order line view i get the total price cost.
But when i add the same field to the sales report view the field is blank and I don't see anything.

So i tried to make the patch looking this issue:
https://www.drupal.org/project/commerce_reports/issues/3039050 Improve the sales report to display Gross and Net amounts Needs work

I already modify the view.view.sales_report.yml and i added the cost price. I also modified the OrderReport.php and i can see in the view the cost price, but it is empty.

The problem is: drupal says to me that he doesn´t find the table: commerce_order_report__price_cost.
Someone know what to do to generate this table?

Thanks in advance.

Feature request
Status

Needs work

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇩🇪Germany Anybody Porta Westfalica

    @ivanpg94 where does the cost information come from? Any contrib module for that? Stock?
    If it's a custom field, this needs to be implemented in a custom module.

    If based on a contrib module, that module should hook be able to hook in here and add such information or provide its own additional reports!

Production build 0.71.5 2024