Skip to content

chore: useful method for mode of payments [backport/v4]

Bot Dokos requested to merge backport/v4-dev/1237 into v4-dev

Backport of !1237 (merged)

Conflicts detected for source commit: d1f3878f08829d214fc00a9694f8044b4527a469
diff --cc erpnext/accounts/doctype/payment_entry/payment_entry.json
index 2554123932,bba9eae9b5..0000000000
--- a/erpnext/accounts/doctype/payment_entry/payment_entry.json
+++ b/erpnext/accounts/doctype/payment_entry/payment_entry.json
@@@ -825,7 -824,7 +825,11 @@@
     "table_fieldname": "payment_entries"
    }
   ],
++<<<<<<< HEAD
 + "modified": "2024-01-08 13:17:15.744754",
++=======
+  "modified": "2023-12-28 17:19:23.833867",
++>>>>>>> d1f3878f08829d214fc00a9694f8044b4527a469
   "modified_by": "Administrator",
   "module": "Accounts",
   "name": "Payment Entry",
diff --cc erpnext/accounts/report/general_ledger/general_ledger.py
index 139d381172,6a3545dff1..0000000000
--- a/erpnext/accounts/report/general_ledger/general_ledger.py
+++ b/erpnext/accounts/report/general_ledger/general_ledger.py
@@@ -276,6 -276,9 +276,12 @@@ def get_conditions(filters)
  	if filters.get("voucher_no"):
  		conditions.append("voucher_no=%(voucher_no)s")
  
++<<<<<<< HEAD
++=======
+ 	if filters.get("against_voucher_no"):
+ 		conditions.append("against_voucher=%(against_voucher_no)s")
+ 
++>>>>>>> d1f3878f08829d214fc00a9694f8044b4527a469
  	if filters.get("voucher_no_not_in"):
  		conditions.append("voucher_no not in %(voucher_no_not_in)s")
  
diff --cc erpnext/assets/doctype/asset/asset.json
index b7ad26072d,477667d25b..0000000000
--- a/erpnext/assets/doctype/asset/asset.json
+++ b/erpnext/assets/doctype/asset/asset.json
@@@ -590,7 -590,7 +590,11 @@@
     "link_fieldname": "target_asset"
    }
   ],
++<<<<<<< HEAD
 + "modified": "2024-01-05 17:36:53.131512",
++=======
+  "modified": "2023-12-21 16:46:20.732869",
++>>>>>>> d1f3878f08829d214fc00a9694f8044b4527a469
   "modified_by": "Administrator",
   "module": "Assets",
   "name": "Asset",
diff --cc erpnext/assets/doctype/asset/asset.py
index 4fd0d571b9,26abfc39b2..0000000000
--- a/erpnext/assets/doctype/asset/asset.py
+++ b/erpnext/assets/doctype/asset/asset.py
@@@ -57,7 -57,7 +57,11 @@@ class Asset(AccountsController)
  		asset_owner: DF.Literal["", "Company", "Supplier", "Customer"]
  		asset_owner_company: DF.Link | None
  		asset_quantity: DF.Int
++<<<<<<< HEAD
 +		available_for_use_date: DF.Date | None
++=======
+ 		available_for_use_date: DF.Date
++>>>>>>> d1f3878f08829d214fc00a9694f8044b4527a469
  		booked_fixed_asset: DF.Check
  		calculate_depreciation: DF.Check
  		capitalized_in: DF.Link | None
@@@ -92,7 -92,7 +96,11 @@@
  		number_of_depreciations_booked: DF.Int
  		opening_accumulated_depreciation: DF.Currency
  		policy_number: DF.Data | None
++<<<<<<< HEAD
 +		purchase_date: DF.Date | None
++=======
+ 		purchase_date: DF.Date
++>>>>>>> d1f3878f08829d214fc00a9694f8044b4527a469
  		purchase_invoice: DF.Link | None
  		purchase_receipt: DF.Link | None
  		purchase_receipt_amount: DF.Currency
diff --cc erpnext/manufacturing/doctype/production_plan/test_production_plan.py
index fedeb7a477,f6dfaa5058..0000000000
--- a/erpnext/manufacturing/doctype/production_plan/test_production_plan.py
+++ b/erpnext/manufacturing/doctype/production_plan/test_production_plan.py
@@@ -1522,45 -1522,6 +1522,48 @@@ class TestProductionPlan(FrappeTestCase
  		for d in mr_items:
  			self.assertEqual(d.get("quantity"), 1000.0)
  
++<<<<<<< HEAD
 +	def test_fg_item_quantity(self):
 +		from erpnext.stock.doctype.warehouse.test_warehouse import create_warehouse
 +		from erpnext.stock.utils import get_or_make_bin
 +
 +		fg_item = make_item(properties={"is_stock_item": 1}).name
 +		rm_item = make_item(properties={"is_stock_item": 1}).name
 +
 +		make_bom(item=fg_item, raw_materials=[rm_item], source_warehouse="_Test Warehouse - _TC")
 +
 +		pln = create_production_plan(item_code=fg_item, planned_qty=10, do_not_submit=1)
 +
 +		pln.append(
 +			"po_items",
 +			{
 +				"item_code": rm_item,
 +				"planned_qty": 20,
 +				"bom_no": pln.po_items[0].bom_no,
 +				"warehouse": pln.po_items[0].warehouse,
 +				"planned_start_date": add_to_date(nowdate(), days=1),
 +			},
 +		)
 +		pln.submit()
 +		wo_qty = {}
 +
 +		for row in pln.po_items:
 +			wo_qty[row.name] = row.planned_qty
 +
 +		pln.make_work_order()
 +
 +		work_orders = frappe.get_all(
 +			"Work Order",
 +			fields=["qty", "production_plan_item as name"],
 +			filters={"production_plan": pln.name},
 +		)
 +		self.assertEqual(len(work_orders), 2)
 +
 +		for row in work_orders:
 +			self.assertEqual(row.qty, wo_qty[row.name])
 +
++=======
++>>>>>>> d1f3878f08829d214fc00a9694f8044b4527a469
  
  def create_production_plan(**args):
  	"""
diff --cc erpnext/stock/doctype/item/item.json
index d0d86cee2d,e6f070a363..0000000000
--- a/erpnext/stock/doctype/item/item.json
+++ b/erpnext/stock/doctype/item/item.json
@@@ -1009,7 -1006,7 +1009,11 @@@
   "index_web_pages_for_search": 1,
   "links": [],
   "make_attachments_public": 1,
++<<<<<<< HEAD
 + "modified": "2024-01-08 18:09:30.225085",
++=======
+  "modified": "2023-12-19 17:29:14.743888",
++>>>>>>> d1f3878f08829d214fc00a9694f8044b4527a469
   "modified_by": "Administrator",
   "module": "Stock",
   "name": "Item",
diff --cc erpnext/stock/doctype/serial_and_batch_bundle/test_serial_and_batch_bundle.py
index f70df084ba,21daa4ce95..0000000000
--- a/erpnext/stock/doctype/serial_and_batch_bundle/test_serial_and_batch_bundle.py
+++ b/erpnext/stock/doctype/serial_and_batch_bundle/test_serial_and_batch_bundle.py
@@@ -10,8 -10,6 +10,11 @@@ from frappe.utils import flt, nowtime, 
  from erpnext.stock.doctype.item.test_item import make_item
  from erpnext.stock.doctype.serial_and_batch_bundle.serial_and_batch_bundle import (
  	add_serial_batch_ledgers,
++<<<<<<< HEAD
 +	make_batch_nos,
 +	make_serial_nos,
++=======
++>>>>>>> d1f3878f08829d214fc00a9694f8044b4527a469
  )
  from erpnext.stock.doctype.stock_entry.stock_entry_utils import make_stock_entry
  
@@@ -483,38 -481,6 +486,41 @@@ class TestSerialandBatchBundle(FrappeTe
  		docstatus = frappe.db.get_value("Serial and Batch Bundle", bundle, "docstatus")
  		self.assertEqual(docstatus, 2)
  
++<<<<<<< HEAD
 +	def test_batch_duplicate_entry(self):
 +		item_code = make_item(properties={"has_batch_no": 1}).name
 +
 +		batch_id = "TEST-BATTCCH-VAL-00001"
 +		batch_nos = [{"batch_no": batch_id, "qty": 1}]
 +
 +		make_batch_nos(item_code, batch_nos)
 +		self.assertTrue(frappe.db.exists("Batch", batch_id))
 +
 +		batch_id = "TEST-BATTCCH-VAL-00001"
 +		batch_nos = [{"batch_no": batch_id, "qty": 1}]
 +
 +		# Shouldn't throw duplicate entry error
 +		make_batch_nos(item_code, batch_nos)
 +		self.assertTrue(frappe.db.exists("Batch", batch_id))
 +
 +	def test_serial_no_duplicate_entry(self):
 +		item_code = make_item(properties={"has_serial_no": 1}).name
 +
 +		serial_no_id = "TEST-SNID-VAL-00001"
 +		serial_nos = [{"serial_no": serial_no_id, "qty": 1}]
 +
 +		make_serial_nos(item_code, serial_nos)
 +		self.assertTrue(frappe.db.exists("Serial No", serial_no_id))
 +
 +		serial_no_id = "TEST-SNID-VAL-00001"
 +		serial_nos = [{"batch_no": serial_no_id, "qty": 1}]
 +
 +		# Shouldn't throw duplicate entry error
 +		make_serial_nos(item_code, serial_nos)
 +		self.assertTrue(frappe.db.exists("Serial No", serial_no_id))
 +
++=======
++>>>>>>> d1f3878f08829d214fc00a9694f8044b4527a469
  
  def get_batch_from_bundle(bundle):
  	from erpnext.stock.serial_batch_bundle import get_batch_nos

Merge request reports