Skip to content

Commit 17c089c

Browse files
added company into Jewellery Receipt
1 parent 1cdfb73 commit 17c089c

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

aumms/aumms/doctype/jewellery_receipt/jewellery_receipt.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"date",
2020
"quantity",
2121
"total_gold_weight",
22+
"company",
2223
"section_break_vxux",
2324
"item_details",
2425
"item_wise_stone_details",
@@ -137,12 +138,18 @@
137138
"label": "Total Gold Weight",
138139
"precision": "2",
139140
"read_only": 1
141+
},
142+
{
143+
"fieldname": "company",
144+
"fieldtype": "Link",
145+
"label": "Company",
146+
"options": "Company"
140147
}
141148
],
142149
"index_web_pages_for_search": 1,
143150
"is_submittable": 1,
144151
"links": [],
145-
"modified": "2025-02-13 15:28:43.982739",
152+
"modified": "2025-03-14 11:28:36.902712",
146153
"modified_by": "Administrator",
147154
"module": "AuMMS",
148155
"name": "Jewellery Receipt",

aumms/aumms/doctype/jewellery_receipt/jewellery_receipt.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def autoname(self):
3030
unique_item_code = f"{base_item_code}-{counter}"
3131

3232
item_detail.item_code = unique_item_code
33-
33+
3434
def validate(self):
3535
self.validate_date()
3636

@@ -90,6 +90,7 @@ def create_purchase_receipt(self):
9090
purchase_receipt = frappe.new_doc('Purchase Receipt')
9191
purchase_receipt.supplier = self.supplier
9292
purchase_receipt.keep_metal_ledger = 1
93+
purchase_receipt.company = self.company
9394

9495
for item_detail in self.get("item_details"):
9596
purchase_receipt.append('items', {

0 commit comments

Comments
 (0)