Merge branch 'version-14-hotfix' into mergify/bp/version-14-hotfix/pr-38250

This commit is contained in:
Gursheen Kaur Anand
2023-11-30 14:15:12 +05:30
committed by GitHub
4 changed files with 18 additions and 5 deletions

View File

@@ -1809,6 +1809,8 @@ class QueryPaymentLedger(object):
.where(ple.delinked == 0) .where(ple.delinked == 0)
.where(Criterion.all(filter_on_against_voucher_no)) .where(Criterion.all(filter_on_against_voucher_no))
.where(Criterion.all(self.common_filter)) .where(Criterion.all(self.common_filter))
.where(Criterion.all(self.dimensions_filter))
.where(Criterion.all(self.voucher_posting_date))
.groupby(ple.against_voucher_type, ple.against_voucher_no, ple.party_type, ple.party) .groupby(ple.against_voucher_type, ple.against_voucher_no, ple.party_type, ple.party)
.orderby(ple.posting_date, ple.voucher_no) .orderby(ple.posting_date, ple.voucher_no)
.having(qb.Field("amount_in_account_currency") > 0) .having(qb.Field("amount_in_account_currency") > 0)

View File

@@ -15,6 +15,9 @@ from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import make_pu
class TestAssetValueAdjustment(unittest.TestCase): class TestAssetValueAdjustment(unittest.TestCase):
def setUp(self): def setUp(self):
create_asset_data() create_asset_data()
frappe.db.set_value(
"Company", "_Test Company", "capital_work_in_progress_account", "CWIP Account - _TC"
)
def test_current_asset_value(self): def test_current_asset_value(self):
pr = make_purchase_receipt( pr = make_purchase_receipt(

View File

@@ -705,8 +705,8 @@ def get_mapped_subcontracting_order(source_name, target_doc=None):
@frappe.whitelist() @frappe.whitelist()
def is_subcontracting_order_created(po_name) -> bool: def is_subcontracting_order_created(po_name) -> bool:
count = frappe.db.count( return (
"Subcontracting Order", {"purchase_order": po_name, "status": ["not in", ["Draft", "Cancelled"]]} True
if frappe.db.exists("Subcontracting Order", {"purchase_order": po_name, "docstatus": ["=", 1]})
else False
) )
return True if count else False

View File

@@ -45,6 +45,7 @@
"subcontracting_receipt_item", "subcontracting_receipt_item",
"section_break_45", "section_break_45",
"bom", "bom",
"include_exploded_items",
"serial_no", "serial_no",
"col_break5", "col_break5",
"batch_no", "batch_no",
@@ -465,12 +466,19 @@
"fieldname": "accounting_details_section", "fieldname": "accounting_details_section",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"label": "Accounting Details" "label": "Accounting Details"
},
{
"default": "0",
"fieldname": "include_exploded_items",
"fieldtype": "Check",
"label": "Include Exploded Items",
"print_hide": 1
} }
], ],
"idx": 1, "idx": 1,
"istable": 1, "istable": 1,
"links": [], "links": [],
"modified": "2023-11-14 18:38:26.459669", "modified": "2023-11-30 12:05:51.920705",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Subcontracting", "module": "Subcontracting",
"name": "Subcontracting Receipt Item", "name": "Subcontracting Receipt Item",