diff --git a/erpnext/accounts/services/base_gl_composer.py b/erpnext/accounts/services/base_gl_composer.py index 270658aca13..8e4279e7e13 100644 --- a/erpnext/accounts/services/base_gl_composer.py +++ b/erpnext/accounts/services/base_gl_composer.py @@ -150,6 +150,9 @@ def add_gl_entry( "remarks": remarks, } + if project: + gl_entry["project"] = project + if voucher_detail_no: gl_entry["voucher_detail_no"] = voucher_detail_no diff --git a/erpnext/stock/doctype/purchase_receipt/services/gl_composer.py b/erpnext/stock/doctype/purchase_receipt/services/gl_composer.py index 7cd7e3d2622..9d68546445a 100644 --- a/erpnext/stock/doctype/purchase_receipt/services/gl_composer.py +++ b/erpnext/stock/doctype/purchase_receipt/services/gl_composer.py @@ -67,6 +67,7 @@ class PurchaseReceiptGLComposer(BaseStockGLComposer): remarks=remarks, against_account=stock_asset_rbnb, account_currency=account_currency, + project=item.project, item=item, ) @@ -118,6 +119,7 @@ class PurchaseReceiptGLComposer(BaseStockGLComposer): against_account=stock_asset_account_name, debit_in_account_currency=-1 * flt(outgoing_amount, item.precision("base_net_amount")), account_currency=account_currency, + project=item.project, item=item, ) @@ -141,6 +143,7 @@ class PurchaseReceiptGLComposer(BaseStockGLComposer): against_account=doc.supplier, debit_in_account_currency=-1 * discrepancy_caused_by_exchange_rate_difference, account_currency=account_currency, + project=item.project, item=item, ) @@ -154,6 +157,7 @@ class PurchaseReceiptGLComposer(BaseStockGLComposer): against_account=doc.supplier, debit_in_account_currency=-1 * discrepancy_caused_by_exchange_rate_difference, account_currency=account_currency, + project=item.project, item=item, ) @@ -214,6 +218,7 @@ class PurchaseReceiptGLComposer(BaseStockGLComposer): remarks=remarks, against_account=stock_asset_account_name, account_currency=supplier_warehouse_account_currency, + project=item.project, item=item, )