feat: Quality Inspection in Subcontracting Receipt

This commit is contained in:
s-aga-r 2023-08-23 12:15:35 +05:30
parent 5b62bbe073
commit 3fdcd33b92
3 changed files with 6 additions and 2 deletions

View File

@ -599,6 +599,7 @@ class StockController(AccountsController):
inspection_fieldname_map = {
"Purchase Receipt": "inspection_required_before_purchase",
"Purchase Invoice": "inspection_required_before_purchase",
"Subcontracting Receipt": "inspection_required_before_purchase",
"Sales Invoice": "inspection_required_before_delivery",
"Delivery Note": "inspection_required_before_delivery",
}

View File

@ -74,7 +74,7 @@
"fieldname": "reference_type",
"fieldtype": "Select",
"label": "Reference Type",
"options": "\nPurchase Receipt\nPurchase Invoice\nDelivery Note\nSales Invoice\nStock Entry\nJob Card",
"options": "\nPurchase Receipt\nPurchase Invoice\nSubcontracting Receipt\nDelivery Note\nSales Invoice\nStock Entry\nJob Card",
"reqd": 1
},
{
@ -245,7 +245,7 @@
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2022-10-04 22:00:13.995221",
"modified": "2023-08-23 11:56:50.282878",
"modified_by": "Administrator",
"module": "Stock",
"name": "Quality Inspection",

View File

@ -81,6 +81,9 @@ class SubcontractingReceipt(SubcontractingController):
self.validate_posting_time()
self.validate_rejected_warehouse()
if not self.get("is_return"):
self.validate_inspection()
if getdate(self.posting_date) > getdate(nowdate()):
frappe.throw(_("Posting Date cannot be future date"))