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

fix: get project from PO into payment entry #29182

Merged

Conversation

ruthra-kumar
Copy link
Member

@ruthra-kumar ruthra-kumar commented Jan 7, 2022

Fix for Issue 16662

Now, creating payments for Purchase orders will pull the project from the line items.

output

no-docs

@codecov
Copy link

codecov bot commented Jan 7, 2022

Codecov Report

Merging #29182 (1e34300) into develop (3438e1f) will increase coverage by 0.07%.
The diff coverage is 100.00%.

❗ Current head 1e34300 differs from pull request most recent head 0917200. Consider uploading reports for the commit 0917200 to get more accurate results

@@             Coverage Diff             @@
##           develop   #29182      +/-   ##
===========================================
+ Coverage    57.93%   58.01%   +0.07%     
===========================================
  Files         1110     1110              
  Lines        68087    68090       +3     
===========================================
+ Hits         39449    39504      +55     
+ Misses       28638    28586      -52     
Impacted Files Coverage Δ
...xt/accounts/doctype/payment_entry/payment_entry.py 69.48% <100.00%> (+0.08%) ⬆️
...eport/item_variant_details/item_variant_details.py 84.33% <0.00%> (-3.62%) ⬇️
.../report/bom_operations_time/bom_operations_time.py 93.33% <0.00%> (-3.34%) ⬇️
...value/warehouse_wise_item_balance_age_and_value.py 92.40% <0.00%> (-2.54%) ⬇️
erpnext/stock/report/stock_ledger/stock_ledger.py 75.60% <0.00%> (-2.44%) ⬇️
...xt/stock/report/stock_analytics/stock_analytics.py 91.08% <0.00%> (-1.99%) ⬇️
...wise_balance_history/batch_wise_balance_history.py 91.37% <0.00%> (-1.73%) ⬇️
.../report/stock_projected_qty/stock_projected_qty.py 88.15% <0.00%> (-1.32%) ⬇️
erpnext/stock/report/stock_ageing/stock_ageing.py 92.48% <0.00%> (-1.16%) ⬇️
...ype/account/chart_of_accounts/chart_of_accounts.py 77.39% <0.00%> (-0.69%) ⬇️
... and 24 more

@@ -1522,6 +1523,8 @@ def get_payment_entry(dt, dn, party_amount=None, bank_account=None, bank_amount=
pe.paid_amount = paid_amount
pe.received_amount = received_amount
pe.letter_head = doc.get("letter_head")
if dt == 'Purchase Order':
Copy link
Member

Choose a reason for hiding this comment

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

This will also be applicable for other transactions like "Sales Order", "Purchase Receipt", "Delivery Note", "Sales Invoice" and "Purchase Invoice". Can we make this more generic to handle for all doctypes?

Copy link
Member Author

Choose a reason for hiding this comment

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

We can avoid 'Purchase Receipt' and 'Delivery Note', as there are no process available to create Payment Entry from them.

- sales order, sales invoice, purchase order and purchase order
- if project not found in transaction, get from items
@deepeshgarg007
Copy link
Member

@Mergifyio backport version-13-hotfix

@mergify
Copy link
Contributor

mergify bot commented Jan 17, 2022

backport version-13-hotfix

✅ Backports have been created

deepeshgarg007 added a commit that referenced this pull request Jan 17, 2022
…-29182

fix: get project from PO into payment entry (backport #29182)
@ruthra-kumar ruthra-kumar deleted the project_in_purchase_invoice branch April 19, 2022 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Payment entry from Purchase Invoice does NOT catch Project from PO line
3 participants