Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion aumms/aumms/doctype/jewellery_receipt/jewellery_receipt.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"date",
"quantity",
"total_gold_weight",
"company",
"section_break_vxux",
"item_details",
"item_wise_stone_details",
Expand Down Expand Up @@ -137,12 +138,18 @@
"label": "Total Gold Weight",
"precision": "2",
"read_only": 1
},
{
"fieldname": "company",
"fieldtype": "Link",
"label": "Company",
"options": "Company"
}
],
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2025-02-13 15:28:43.982739",
"modified": "2025-03-14 11:28:36.902712",
"modified_by": "Administrator",
"module": "AuMMS",
"name": "Jewellery Receipt",
Expand Down
3 changes: 2 additions & 1 deletion aumms/aumms/doctype/jewellery_receipt/jewellery_receipt.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def autoname(self):
unique_item_code = f"{base_item_code}-{counter}"

item_detail.item_code = unique_item_code

def validate(self):
self.validate_date()

Expand Down Expand Up @@ -90,6 +90,7 @@ def create_purchase_receipt(self):
purchase_receipt = frappe.new_doc('Purchase Receipt')
purchase_receipt.supplier = self.supplier
purchase_receipt.keep_metal_ledger = 1
purchase_receipt.company = self.company

for item_detail in self.get("item_details"):
purchase_receipt.append('items', {
Expand Down
Loading