mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-03 00:23:21 +00:00
fix: add type hints to make_request_for_quotation
This commit is contained in:
@@ -10,6 +10,7 @@ import json
|
||||
import frappe
|
||||
import frappe.defaults
|
||||
from frappe import _, msgprint
|
||||
from frappe.model.document import Document
|
||||
from frappe.model.mapper import get_mapped_doc
|
||||
from frappe.query_builder import Order
|
||||
from frappe.query_builder.functions import Sum
|
||||
@@ -763,7 +764,7 @@ def make_purchase_orders_by_supplier(source_name: str, item_suppliers: str | lis
|
||||
|
||||
|
||||
@frappe.whitelist()
|
||||
def make_request_for_quotation(source_name, target_doc=None):
|
||||
def make_request_for_quotation(source_name: str, target_doc: str | dict | Document | None = None):
|
||||
def update_item(obj, target, source_parent):
|
||||
qty = obj.ordered_qty or obj.received_qty
|
||||
target.qty = flt(flt(obj.stock_qty) - flt(qty)) / target.conversion_factor
|
||||
|
||||
Reference in New Issue
Block a user