Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add Total Ordered cost on Project #41308

Open
wants to merge 18 commits into
base: develop
Choose a base branch
from

Conversation

FHenry
Copy link
Contributor

@FHenry FHenry commented May 2, 2024

Please provide enough information so that others can review your pull request:

In Project, in section Costing and billing there is Total Sales Amount (from Sales Order) and Total Billed amount (From Sales Invoice), but on buying side there is only Total Purchase Cost (from Purchase Invoice). In order to have same feature on sales side that on buying side this PR add Total Ordered Cost (from Purchase Order)

Explain the details for making this change. What existing problem does the pull request solve?

As is it done for Total Purchase Cost, this PR ass a field with Total Ordered Cost, that is auto-calculated on the same setting as Total Purchase Cost

Screenshots/GIFs

image

image

no-docs

@FHenry FHenry changed the title feat: add Total ordered cost on Project feat: add Total Ordered cost on Project May 2, 2024
@FHenry
Copy link
Contributor Author

FHenry commented May 3, 2024

semgrep failed test not related to this PR
but fix by other PR #41309 anyway

This comment has been minimized.

@stale stale bot added the inactive label May 22, 2024
@stale stale bot removed the inactive label May 22, 2024

This comment has been minimized.

@stale stale bot added the inactive label Jun 24, 2024
@FHenry
Copy link
Contributor Author

FHenry commented Jun 24, 2024

Linters / semgrep (pull_request) failed test not related to this PR

@FHenry
Copy link
Contributor Author

FHenry commented Jun 25, 2024

@s-aga-r Could have a look ?

@stale stale bot removed the inactive label Jun 25, 2024

This comment has been minimized.

@stale stale bot added the inactive label Jul 10, 2024
@FHenry
Copy link
Contributor Author

FHenry commented Jul 11, 2024

@s-aga-r @rohitwaghchaure

just another dummy comment to remove "Inactive" label.

Hope you can find time to review this one and the other "fix semgrep" related PR #41309

@stale stale bot removed the inactive label Jul 11, 2024

This comment has been minimized.

@stale stale bot added the inactive label Jul 27, 2024
@stale stale bot removed the inactive label Jul 29, 2024

This comment has been minimized.

@stale stale bot added the inactive label Aug 14, 2024
@FHenry
Copy link
Contributor Author

FHenry commented Aug 14, 2024

@s-aga-r @rohitwaghchaure

just another dummy comment again to remove "Inactive" label.

Hope you can find time to review this one and the other "fix semgrep" related PR #41309

Also, could you guide us to the best process, as this PR already respect the Contributing Guideline, to avoid this kind of "lost in loophole" for code contribution ?
On the other-hand, I understand that at Frappe, you have lot's of other important/critical PR to review.

@stale stale bot removed the inactive label Aug 14, 2024

This comment has been minimized.

@stale stale bot added the inactive label Sep 1, 2024
@stale stale bot removed the inactive label Sep 3, 2024
Copy link

stale bot commented Oct 28, 2024

This pull request has been automatically marked as inactive because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing.

@stale stale bot added the inactive label Oct 28, 2024
@stale stale bot removed the inactive label Oct 29, 2024
.where((pitem.project == project) & (pitem.docstatus == 1))
.run(as_list=True)
)
return total_ordered_cost
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return total_ordered_cost and total_ordered_cost[0][0] or 0

@@ -772,3 +778,29 @@ def recalculate_project_total_purchase_cost(project: str | None = None):
"total_purchase_cost",
(total_purchase_cost and total_purchase_cost[0][0] or 0),
)


def calculate_total_ordered_cost(project: str | None = None):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

method name should be get_total_ordered_cost which should return numeric value and not list

.run(as_list=True)
)
return total_ordered_cost
return None
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return 0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants