fix: conflicts
This commit is contained in:
@@ -74,38 +74,6 @@ class BuyingController(SubcontractingController):
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
def create_package_for_transfer(self) -> None:
|
|
||||||
"""Create serial and batch package for Sourece Warehouse in case of inter transfer."""
|
|
||||||
|
|
||||||
if self.is_internal_transfer() and (
|
|
||||||
self.doctype == "Purchase Receipt" or (self.doctype == "Purchase Invoice" and self.update_stock)
|
|
||||||
):
|
|
||||||
field = "delivery_note_item" if self.doctype == "Purchase Receipt" else "sales_invoice_item"
|
|
||||||
|
|
||||||
doctype = "Delivery Note Item" if self.doctype == "Purchase Receipt" else "Sales Invoice Item"
|
|
||||||
|
|
||||||
ids = [d.get(field) for d in self.get("items") if d.get(field)]
|
|
||||||
bundle_ids = {}
|
|
||||||
if ids:
|
|
||||||
for bundle in frappe.get_all(
|
|
||||||
doctype, filters={"name": ("in", ids)}, fields=["serial_and_batch_bundle", "name"]
|
|
||||||
):
|
|
||||||
bundle_ids[bundle.name] = bundle.serial_and_batch_bundle
|
|
||||||
|
|
||||||
if not bundle_ids:
|
|
||||||
return
|
|
||||||
|
|
||||||
for item in self.get("items"):
|
|
||||||
if item.get(field) and not item.serial_and_batch_bundle and bundle_ids.get(item.get(field)):
|
|
||||||
item.serial_and_batch_bundle = self.make_package_for_transfer(
|
|
||||||
bundle_ids.get(item.get(field)),
|
|
||||||
item.from_warehouse,
|
|
||||||
type_of_transaction="Outward",
|
|
||||||
do_not_submit=True,
|
|
||||||
)
|
|
||||||
|
|
||||||
def set_rate_for_standalone_debit_note(self):
|
def set_rate_for_standalone_debit_note(self):
|
||||||
if self.get("is_return") and self.get("update_stock") and not self.return_against:
|
if self.get("is_return") and self.get("update_stock") and not self.return_against:
|
||||||
for row in self.items:
|
for row in self.items:
|
||||||
@@ -130,7 +98,6 @@ class BuyingController(SubcontractingController):
|
|||||||
row.discount_amount = 0.0
|
row.discount_amount = 0.0
|
||||||
row.margin_rate_or_amount = 0.0
|
row.margin_rate_or_amount = 0.0
|
||||||
|
|
||||||
>>>>>>> 6e198188ff (fix: incorrect gl entries for standalone debit note with update stock)
|
|
||||||
def set_missing_values(self, for_validate=False):
|
def set_missing_values(self, for_validate=False):
|
||||||
super(BuyingController, self).set_missing_values(for_validate)
|
super(BuyingController, self).set_missing_values(for_validate)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user